1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`c643c0e51a09a3fc77cd9bb466ba6da3bb718fca`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`fe77d165-8b9b-4a69-8a58-a61ba379d38b`,e._sentryDebugIdIdentifier=`sentry-dbid-fe77d165-8b9b-4a69-8a58-a61ba379d38b`)}catch{}})();import{n as e,r as t,t as n}from"./rolldown-runtime-BDRlFqbV.js";function r(e,t){return function(){return e.apply(t,arguments)}}var{toString:i}=Object.prototype,{getPrototypeOf:a}=Object,{iterator:o,toStringTag:s}=Symbol,c=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),l=(e,t)=>{let n=e,r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),c(n,t))return!0;n=a(n)}return!1},u=(e,t)=>e!=null&&l(e,t)?e[t]:void 0,d=(e=>t=>{let n=i.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),f=e=>(e=e.toLowerCase(),t=>d(t)===e),p=e=>t=>typeof t===e,{isArray:m}=Array,h=p(`undefined`);function g(e){return e!==null&&!h(e)&&e.constructor!==null&&!h(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var _=f(`ArrayBuffer`);function v(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&_(e.buffer),t}var y=p(`string`),b=p(`function`),x=p(`number`),S=e=>typeof e==`object`&&!!e,C=e=>e===!0||e===!1,w=e=>{if(!S(e))return!1;let t=a(e);return(t===null||t===Object.prototype||a(t)===null)&&!l(e,s)&&!l(e,o)},T=e=>{if(!S(e)||g(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},E=f(`Date`),D=f(`File`),ee=e=>!!(e&&e.uri!==void 0),te=e=>e&&e.getParts!==void 0,O=f(`Blob`),k=f(`FileList`),ne=e=>S(e)&&b(e.pipe);function re(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var A=re(),ie=A.FormData===void 0?void 0:A.FormData,ae=e=>{if(!e)return!1;if(ie&&e instanceof ie)return!0;let t=a(e);if(!t||t===Object.prototype||!b(e.append))return!1;let n=d(e);return n===`formdata`||n===`object`&&b(e.toString)&&e.toString()===`[object FormData]`},j=f(`URLSearchParams`),[oe,se,ce,le]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(f),ue=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function de(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),m(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(g(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function fe(e,t){if(g(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-->0;)if(i=n[r],t===i.toLowerCase())return i;return null}var pe=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,me=e=>!h(e)&&e!==pe;function he(...e){let{caseless:t,skipUndefined:n}=me(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&typeof i==`string`&&fe(r,i)||i,o=c(r,a)?r[a]:void 0;w(o)&&w(e)?r[a]=he(o,e):w(e)?r[a]=he({},e):m(e)?r[a]=e.slice():(!n||!h(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++){let n=e[t];if(!n||g(n)||(de(n,i),typeof n!=`object`||m(n)))continue;let r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){let t=r[e];De.call(n,t)&&i(n[t],t)}}return r}var ge=(e,t,n,{allOwnKeys:i}={})=>(de(t,(t,i)=>{n&&b(t)?Object.defineProperty(e,i,{__proto__:null,value:r(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),e),_e=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ve=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},ye=(e,t,n,r)=>{let i,o,s,c={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-->0;)s=i[o],(!r||r(s,e,t))&&!c[s]&&(t[s]=e[s],c[s]=!0);e=n!==!1&&a(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t}
1,be=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},xe=e=>{if(!e)return null;if(m(e))return e;let t=e.length;if(!x(t))return null;let n=Array(t);for(;t-->0;)n[t]=e[t];return n},Se=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&a(Uint8Array)),Ce=(e,t)=>{let n=(e&&e[o]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},we=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Te=f(`HTMLFormElement`),Ee=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),{propertyIsEnumerable:De}=Object.prototype,Oe=f(`RegExp`),ke=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};de(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},Ae=e=>{ke(e,(t,n)=>{if(b(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(b(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},je=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return m(e)?r(e):r(String(e).split(t)),n},Me=()=>{},Ne=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Pe(e){return!!(e&&b(e.append)&&e[s]===`FormData`&&e[o])}var Fe=e=>{let t=new WeakSet,n=e=>{if(S(e)){if(t.has(e))return;if(g(e))return e;if(!(`toJSON`in e)){t.add(e);let r=m(e)?[]:{};return de(e,(e,t)=>{let i=n(e);!h(i)&&(r[t]=i)}),t.delete(e),r}}return e};return n(e)},Ie=f(`AsyncFunction`),Le=e=>e&&(S(e)||b(e))&&b(e.then)&&b(e.catch),Re=((e,t)=>e?setImmediate:t?((e,t)=>(pe.addEventListener(`message`,({source:n,data:r})=>{n===pe&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),pe.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,b(pe.postMessage)),ze=typeof queueMicrotask<`u`?queueMicrotask.bind(pe):typeof process<`u`&&process.nextTick||Re,Be=e=>e!=null&&b(e[o]),M={isArray:m,isArrayBuffer:_,isBuffer:g,isFormData:ae,isArrayBufferView:v,isString:y,isNumber:x,isBoolean:C,isObject:S,isPlainObject:w,isEmptyObject:T,isReadableStream:oe,isRequest:se,isResponse:ce,isHeaders:le,isUndefined:h,isDate:E,isFile:D,isReactNativeBlob:ee,isReactNative:te,isBlob:O,isRegExp:Oe,isFunction:b,isStream:ne,isURLSearchParams:j,isTypedArray:Se,isFileList:k,forEach:de,merge:he,extend:ge,trim:ue,stripBOM:_e,inherits:ve,toFlatObject:ye,kindOf:d,kindOfTest:f,endsWith:be,toArray:xe,forEachEntry:Ce,matchAll:we,isHTMLForm:Te,hasOwnProperty:c,hasOwnProp:c,hasOwnInPrototypeChain:l,getSafeProp:u,reduceDescriptors:ke,freezeMethods:Ae,toObjectSet:je,toCamelCase:Ee,noop:Me,toFiniteNumber:Ne,findKey:fe,global:pe,isContextDefined:me,isSpecCompliantForm:Pe,toJSONObject:Fe,isAsyncFn:Ie,isThenable:Le,setImmediate:Re,asap:ze,isIterable:Be,isSafeIterable:e=>e!=null&&l(e,o)&&Be(e)},Ve=M.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]),He=e=>{let t={},n,r,i;return e&&e.split(` 2`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&Ve[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t};function Ue(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}var We=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),Ge=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function Ke(e,t){return M.isArray(e)?e.map(e=>Ke(e,t)):Ue(String(e).replace(t,``))}var qe=e=>Ke(e,We),Je=e=>Ke(e,Ge);function Ye(e){let t=Object.create(null);return M.forEach(e.toJSON(),(e,n)=>{t[n]=Je(e)}),t}var Xe=Symbol(`internals`);function Ze(e){return e&&String(e).trim().toLowerCase()}function Qe(e){return e===!1||e==null?e:M.isArray(e)?e.map(Qe):qe(String(e))}function $e(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var et=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function tt(e,t,n,r,i){if(M.isFunction(r))return r.call(this,t,n);if(i&&(t=n),M.isString(t)){if(M.isString(r))return t.indexOf(r)!==-1;if(M.isRegExp(r))return r.test(t)}}function nt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function rt(e,t){let n=M.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var it=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=Ze(t);if(!i)return;let a=M.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=Qe(e))}let a=(e,t)=>
2M.forEach(e,(e,n)=>i(e,n,t));if(M.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(M.isString(e)&&(e=e.trim())&&!et(e))a(He(e),t);else if(M.isObject(e)&&M.isSafeIterable(e)){let n=Object.create(null),r,i;for(let t of e){if(!M.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);i=t[0],M.hasOwnProp(n,i)?(r=n[i],n[i]=M.isArray(r)?[...r,t[1]]:[r,t[1]]):n[i]=t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=Ze(e),e){let n=M.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return $e(e);if(M.isFunction(t))return t.call(this,e,n);if(M.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=Ze(e),e){let n=M.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||tt(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=Ze(e),e){let i=M.findKey(n,e);i&&(!t||tt(n,n[i],i,t))&&(delete n[i],r=!0)}}return M.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||tt(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return M.forEach(this,(r,i)=>{let a=M.findKey(n,i);if(a){t[a]=Qe(r),delete t[i];return}let o=e?nt(i):String(i).trim();o!==i&&delete t[i],t[o]=Qe(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return M.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&M.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(` 3`)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[Xe]=this[Xe]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=Ze(e);t[r]||(rt(n,e),t[r]=!0)}return M.isArray(e)?e.forEach(r):r(e),this}};it.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),M.reduceDescriptors(it.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),M.freezeMethods(it);var at=`[REDACTED ****]`;function ot(e){if(M.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(M.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function st(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||M.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof it&&(e=e.toJSON()),r.push(e);let t;if(M.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);M.isUndefined(r)||(t[n]=r)});else{if(!M.isPlainObject(e)&&ot(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?at:i(a);M.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}var N=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return Object.defineProperty(s,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&M.hasOwnProp(e,`redact`)?e.redact:void 0,n=M.isArray(t)&&t.length>0?st(e,t):M.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};N.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,N.ERR_BAD_OPTION=`ERR_BAD_OPTION`,N.ECONNABORTED=`ECONNABORTED`,N.ETIMEDOUT=`ETIMEDOUT`,N.ECONNREFUSED=`ECONNREFUSED`,N.ERR_NETWORK=`ERR_NETWORK`,N.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,N.ERR_DEPRECATED=`ERR_DEPRECATED`,N.ERR_BAD_RESPONSE=`E
3RR_BAD_RESPONSE`,N.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,N.ERR_CANCELED=`ERR_CANCELED`,N.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,N.ERR_INVALID_URL=`ERR_INVALID_URL`,N.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function ct(e){return M.isPlainObject(e)||M.isArray(e)}function lt(e){return M.endsWith(e,`[]`)?e.slice(0,-2):e}function ut(e,t,n){return e?e.concat(t).map(function(e,t){return e=lt(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function dt(e){return M.isArray(e)&&!e.some(ct)}var ft=M.toFlatObject(M,{},null,function(e){return/^is[A-Z]/.test(e)});function pt(e,t,n){if(!M.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=M.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!M.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||m,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&M.isSpecCompliantForm(t),u=[];if(!M.isFunction(i))throw TypeError(`visitor must be a function`);function d(e){if(e===null)return``;if(M.isDate(e))return e.toISOString();if(M.isBoolean(e))return e.toString();if(!l&&M.isBlob(e))throw new N(`Blob is not supported. Use a Buffer instead.`);if(M.isArrayBuffer(e)||M.isTypedArray(e)){if(l&&typeof s==`function`)return new s([e]);if(typeof Buffer<`u`)return Buffer.from(e);throw new N(`Blob is not supported. Use a Buffer instead.`,N.ERR_NOT_SUPPORT)}return e}function f(e){if(e>c)throw new N(`Object is too deeply nested (`+e+` levels). Max depth: `+c,N.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(e,t){if(c===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!M.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),f(t+n.length-1),r})}function m(e,n,i){let s=e;if(M.isReactNative(t)&&M.isReactNativeBlob(e))return t.append(ut(i,n,a),d(e)),!1;if(e&&!i&&typeof e==`object`){if(M.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=p(e,1);else if(M.isArray(e)&&dt(e)||(M.isFileList(e)||M.endsWith(n,`[]`))&&(s=M.toArray(e)))return n=lt(n),s.forEach(function(e,r){!(M.isUndefined(e)||e===null)&&t.append(o===!0?ut([n],r,a):o===null?n:n+`[]`,d(e))}),!1}return ct(e)?!0:(t.append(ut(i,n,a),d(e)),!1)}let h=Object.assign(ft,{defaultVisitor:m,convertValue:d,isVisitable:ct});function g(e,n,r=0){if(!M.isUndefined(e)){if(f(r),u.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));u.push(e),M.forEach(e,function(e,a){(!(M.isUndefined(e)||e===null)&&i.call(t,e,M.isString(a)?a.trim():a,n,h))===!0&&g(e,n?n.concat(a):[a],r+1)}),u.pop()}}if(!M.isObject(e))throw TypeError(`data must be an object`);return g(e),t}function mt(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function ht(e,t){this._pairs=[],e&&pt(e,this,t)}var gt=ht.prototype;gt.append=function(e,t){this._pairs.push([e,t])},gt.toString=function(e){let t=e?t=>e.call(this,t,mt):mt;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function _t(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function vt(e,t,n){if(!t)return e;e||=``;let r=M.isFunction(n)?{serialize:n}:n,i=M.getSafeProp(r,`encode`)||_t,a=M.getSafeProp(r,`serialize`),o;if(o=a?a(t,r):M.isURLSearchParams(t)?t.toString():new ht(t,r).toString(i),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var yt=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){M.forEach(this.handlers,function(t){t!==null&&e(t)})}},bt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},xt={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:ht,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},St=e({hasBrowserEnv:()=>Ct,hasStandardBrowserEnv:()=>Tt,hasStandardBrowserWebWorkerEnv:()=>Et,navigator:()=>wt,origin:()=>Dt}),Ct=typeof window<`u`&&typeof document<`u`,wt=typeof navigator==`object`&&navigator||void 0,Tt=Ct&&(!wt||[`ReactNative`,`NativeScript`,`NS`].indexOf(wt.product)<0),Et=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,Dt=Ct&&window.location.href||`http://localhost`,Ot={...St,...xt};function kt(e,t){return pt(e,new Ot.classes.URLSearchParams,{visitor:function(e,t,n,r){return Ot.isNode&&M.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}var At=100;function jt(e){if(e>At)throw new N(`FormData field is too deeply nested (`+e+` levels). Max depth: `+At,N.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Mt(e){let t=[],n=/\w+|\[(\w*)]/g,r;for(;(r=n.exec(e))!==null;)jt(t.length),t.push(r[0]===`[]`?``:r[1]||r[0]);return t}function Nt(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Pt(e){function t(e,n,r,i){jt(i);let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&M.isArray(r)?r.length:a,s?(M.hasOwnProp(r,a)?r[a]=M.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!M.hasOwnProp(r,a)||!M.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&M.isArray(r[a])&&(r[a]=Nt(r[a])),!o)}if(M.isFormData(e)&&M.isFunction(e.entries)){let n={};return M.forEachEntry(e,(e,r)=>{t(Mt(e),r,n,0)}),n}return null}var Ft=(e,t)=>
3e!=null&&M.hasOwnProp(e,t)?e[t]:void 0;function It(e,t,n){if(M.isString(e))try{return(t||JSON.parse)(e),M.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var Lt={transitional:bt,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=M.isObject(e);if(i&&M.isHTMLForm(e)&&(e=new FormData(e)),M.isFormData(e))return r?JSON.stringify(Pt(e)):e;if(M.isArrayBuffer(e)||M.isBuffer(e)||M.isStream(e)||M.isFile(e)||M.isBlob(e)||M.isReadableStream(e))return e;if(M.isArrayBufferView(e))return e.buffer;if(M.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=Ft(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return kt(e,t).toString();if((a=M.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=Ft(this,`env`),r=n&&n.FormData;return pt(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),It(e)):e}],transformResponse:[function(e){let t=Ft(this,`transitional`)||Lt.transitional,n=t&&t.forcedJSONParsing,r=Ft(this,`responseType`),i=r===`json`;if(M.isResponse(e)||M.isReadableStream(e))return e;if(e&&M.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,Ft(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?N.from(e,N.ERR_BAD_RESPONSE,this,null,Ft(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ot.classes.FormData,Blob:Ot.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};M.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{Lt.headers[e]={}});function Rt(e,t){let n=this||Lt,r=t||n,i=it.from(r.headers),a=r.data;return M.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function zt(e){return!!(e&&e.__CANCEL__)}var Bt=class extends N{constructor(e,t,n){super(e??`canceled`,N.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function Vt(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new N(`Request failed with status code `+n.status,n.status>=400&&n.status<500?N.ERR_BAD_REQUEST:N.ERR_BAD_RESPONSE,n.config,n.request,n))}function Ht(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function Ut(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function Wt(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var Gt=(e,t,n=3)=>{let r=0,i=Ut(50,250);return Wt(n=>{if(!n||typeof n.loaded!=`number`)return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=o==null?a:Math.min(a,o),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},Kt=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},qt=e=>(...t)=>M.asap(()=>e(...t)),Jt=Ot.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ot.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ot.origin),Ot.navigator&&/(msie|trident)/i.test(Ot.navigator.userAgent)):()=>!0,Yt=Ot.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];M.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),M.isString(r)&&s.push(`path=${r}`),M.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),M.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);
3if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function Xt(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function Zt(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}var Qt=/^https?:(?!\/\/)/i,$t=/[\t\n\r]/g;function en(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function tn(e){return en(e).replace($t,``)}function nn(e,t){if(typeof e==`string`&&Qt.test(tn(e)))throw new N(`Invalid URL: missing "//" after protocol`,N.ERR_INVALID_URL,t)}function rn(e,t,n,r){nn(t,r);let i=!Xt(t);return e&&(i||n===!1)?(nn(e,r),Zt(e,t)):t}var an=e=>e instanceof it?{...e}:e;function on(e,t){e||={},t||={};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return M.isPlainObject(e)&&M.isPlainObject(t)?M.merge.call({caseless:r},e,t):M.isPlainObject(t)?M.merge({},t):M.isArray(t)?t.slice():t}function i(e,t,n,i){if(!M.isUndefined(t))return r(e,t,n,i);if(!M.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!M.isUndefined(t))return r(void 0,t)}function o(e,t){if(!M.isUndefined(t))return r(void 0,t);if(!M.isUndefined(e))return r(void 0,e)}function s(n){let r=M.hasOwnProp(t,`transitional`)?t.transitional:void 0;if(!M.isUndefined(r))if(M.isPlainObject(r)){if(M.hasOwnProp(r,n))return r[n]}else return;let i=M.hasOwnProp(e,`transitional`)?e.transitional:void 0;if(M.isPlainObject(i)&&M.hasOwnProp(i,n))return i[n]}function c(n,i,a){if(M.hasOwnProp(t,a))return r(n,i);if(M.hasOwnProp(e,a))return r(void 0,n)}let l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:c,headers:(e,t,n)=>i(an(e),an(t),n,!0)};return M.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=M.hasOwnProp(l,r)?l[r]:i,o=a(M.hasOwnProp(e,r)?e[r]:void 0,M.hasOwnProp(t,r)?t[r]:void 0,r);M.isUndefined(o)&&a!==c||(n[r]=o)}),M.hasOwnProp(t,`validateStatus`)&&M.isUndefined(t.validateStatus)&&s(`validateStatusUndefinedResolves`)===!1&&(M.hasOwnProp(e,`validateStatus`)?n.validateStatus=r(void 0,e.validateStatus):delete n.val
3idateStatus),n}var sn=[`content-type`,`content-length`];function cn(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t||{}).forEach(([t,n])=>{sn.includes(t.toLowerCase())&&e.set(t,n)})}var ln=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)));function un(e){let t=on({},e),n=e=>M.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=it.from(s),t.url=vt(rn(l,d,u,t),n(`params`),n(`paramsSerializer`)),c){let t=M.getSafeProp(c,`username`)||``,n=M.getSafeProp(c,`password`)||``;try{s.set(`Authorization`,`Basic `+btoa(t+`:`+(n?ln(n):``)))}catch(t){throw N.from(t,N.ERR_BAD_OPTION_VALUE,e)}}if(M.isFormData(r)&&(Ot.hasStandardBrowserEnv||Ot.hasStandardBrowserWebWorkerEnv||M.isReactNative(r)?s.setContentType(void 0):M.isFunction(r.getHeaders)&&cn(s,r.getHeaders(),n(`formDataHeaderPolicy`))),Ot.hasStandardBrowserEnv&&(M.isFunction(i)&&(i=i(t)),i===!0||i==null&&Jt(t.url))){let e=a&&o&&Yt.read(o);e&&s.set(a,e)}return t}var dn=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=un(e),i=r.data,a=it.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=it.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());Vt(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith(`file:`))||setTimeout(g)},h.onabort=function(){h&&=(n(new N(`Request aborted`,N.ECONNABORTED,e,h)),m(),null)},h.onerror=function(t){let r=new N(t&&t.message?t.message:`Network Error`,N.ERR_NETWORK,e,h);r.event=t||null,n(r),m(),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||bt;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new N(t,i.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,e,h)),m(),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&M.forEach(Ye(a),function(e,t){h.setRequestHeader(t,e)}),M.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=Gt(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=Gt(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new Bt(null,e,h):t),h.abort(),m(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=Ht(r.url);if(_&&!Ot.protocols.includes(_)){n(new N(`Unsupported protocol `+_+`:`,N.ERR_BAD_REQUEST,e)),m();return}h.send(i||null)})},fn=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof N?t:new Bt(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new N(`timeout of ${t}ms exceeded`,N.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i,{once:!0}));let{signal:s}=n;return s.unsubscribe=()=>M.asap(o),s},pn=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},mn=async function*(e,t){for await(let n of hn(e))yield*pn(n,t)},hn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},gn=(e,t,n,r)=>{let i=mn(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},_n=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,vn=(e,t,n)=>t+2<n&&_n(e.charCodeAt(t+1))&&_n(e.charCodeAt(t+2));function yn(e){if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let t=e.indexOf(`,`);if(t<0)return 0;let n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length,t=r.length;for(let n=0;n<t;n++)if(r.charCodeAt(n)===37&&n+2<t){let t=r.charCodeAt(n+1),i=r.charCodeAt(n+2);_n(t)&&_n(i)&&(e-=2,n+=2)}let n=0,i=t-1,a=e=>e>=2&&r.charCodeAt(e-2)===37&&r.charCodeAt(e-1)===51&&(r.charCodeAt(e)===68||r.charCodeAt(e)===100);i>=0&&(r.charCodeAt(i)===61?(n++,i--):a(i)&&(n++,i-=3)),n===1&&i>=0&&(r.charCodeAt(i)===61||a(i))&&n++;
3let o=Math.floor(e/4)*3-(n||0);return o>0?o:0}let i=0;for(let e=0,t=r.length;e<t;e++){let n=r.charCodeAt(e);if(n===37&&vn(r,e,t))i+=1,e+=2;else if(n<128)i+=1;else if(n<2048)i+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=r.charCodeAt(e+1);t>=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i}var bn=`1.18.1`,xn=64*1024,{isFunction:Sn}=M,Cn=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),wn=e=>{if(!M.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Tn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},En=e=>{let t=e.indexOf(`://`),n=e;return t!==-1&&(n=n.slice(t+3)),n.includes(`@`)||n.includes(`:`)},Dn=e=>{let t=M.global!==void 0&&M.global!==null?M.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=M.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?Sn(i):typeof fetch==`function`,c=Sn(a),l=Sn(o);if(!s)return!1;let u=s&&Sn(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&Tn(()=>{let e=!1,t=new a(Ot.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&Tn(()=>M.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new N(`Response type '${e}' is not supported`,N.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(M.isBlob(e))return e.size;if(M.isSpecCompliantForm(e))return(await new a(Ot.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(M.isArrayBufferView(e)||M.isArrayBuffer(e))return e.byteLength;if(M.isURLSearchParams(e)&&(e+=``),M.isString(e))return(await d(e)).byteLength},g=async(e,t)=>M.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:d,timeout:_,onDownloadProgress:v,onUploadProgress:y,responseType:b,headers:x,withCredentials:S=`same-origin`,fetchOptions:C,maxContentLength:w,maxBodyLength:T}=un(e),E=M.isNumber(w)&&w>-1,D=M.isNumber(T)&&T>-1,ee=t=>M.hasOwnProp(e,t)?e[t]:void 0,te=i||fetch;b=b?(b+``).toLowerCase():`text`;let O=fn([l,d&&d.toAbortSignal()],_),k=null,ne=O&&O.unsubscribe&&(()=>{O.unsubscribe()}),re,A=null,ie=()=>new N(`Request body larger than maxBodyLength limit`,N.ERR_BAD_REQUEST,e,k);try{let i,l=ee(`auth`);if(l&&(i={username:M.getSafeProp(l,`username`)||``,password:M.getSafeProp(l,`password`)||``}),En(t)){let e=new URL(t,Ot.origin);!i&&(e.username||e.password)&&(i={username:wn(e.username),password:wn(e.password)}),(e.username||e.password)&&(e.username=``,e.password=``,t=e.href)}if(i&&(x.delete(`authorization`),x.set(`Authorization`,`Basic `+btoa(Cn((i.username||``)+`:`+(i.password||``))))),E&&typeof t==`string`&&t.startsWith(`data:`)&&yn(t)>w)throw new N(`maxContentLength size of `+w+` exceeded`,N.ERR_BAD_RESPONSE,e,k);if(D&&n!==`get`&&n!==`head`){let e=await h(s);if(typeof e==`number`&&isFinite(e)&&(re=e,e>T))throw ie()}let d=D&&(M.isReadableStream(s)||M.isStream(s)),_=(e,t,n)=>gn(e,xn,e=>{if(D&&e>T)throw A=ie();t&&t(e)},n);if(f&&n!==`get`&&n!==`head`&&(y||d)){if(re??=await g(x,s),re!==0||d){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(M.isFormData(s)&&(n=e.headers.get(`content-type`))&&x.setContentType(n),e.body){let[t,n]=y&&Kt(re,Gt(qt(y)))||[];s=_(e.body,t,n)}}}else if(d&&!c&&u&&n!==`get`&&n!==`head`)s=_(s);else if(d&&c&&!f&&n!==`get`&&n!==`head`)throw new N(`Stream request bodies are not supported by the current fetch implementation`,N.ERR_NOT_SUPPORT,e,k);M.isString(S)||(S=S?`include`:`omit`);let ae=c&&`credentials`in a.prototype;if(M.isFormData(s)){let e=x.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&x.delete(`content-type`)}x.set(`User-Agent`,`axios/`+bn,!1);let j={...C,signal:O,method:n.toUpperCase(),headers:Ye(x.normalize()),body:s,duplex:`half`,credentials:ae?S:void 0};k=c&&new a(t,j);let oe=await(c?te(k,C):te(t,j)),se=it.from(oe.headers);if(E){let t=M.toFiniteNumber(se.getContentLength());if(t!=null&&t>w)throw new N(`maxContentLength size of `+w+` exceeded`,N.ERR_BAD_RESPONSE,e,k)}let ce=p&&(b===`stream`||b===`response`);if(p&&oe.body&&(v||E||ce&&ne)){let t={};
3[`status`,`statusText`,`headers`].forEach(e=>{t[e]=oe[e]});let n=M.toFiniteNumber(se.getContentLength()),[r,i]=v&&Kt(n,Gt(qt(v),!0))||[],a=0;oe=new o(gn(oe.body,xn,t=>{if(E&&(a=t,a>w))throw new N(`maxContentLength size of `+w+` exceeded`,N.ERR_BAD_RESPONSE,e,k);r&&r(t)},()=>{i&&i(),ne&&ne()}),t)}b||=`text`;let le=await m[M.findKey(m,b)||`text`](oe,e);if(E&&!p&&!ce){let t;if(le!=null&&(typeof le.byteLength==`number`?t=le.byteLength:typeof le.size==`number`?t=le.size:typeof le==`string`&&(t=typeof r==`function`?new r().encode(le).byteLength:le.length)),typeof t==`number`&&t>w)throw new N(`maxContentLength size of `+w+` exceeded`,N.ERR_BAD_RESPONSE,e,k)}return!ce&&ne&&ne(),await new Promise((t,n)=>{Vt(t,n,{data:le,headers:it.from(oe.headers),status:oe.status,statusText:oe.statusText,config:e,request:k})})}catch(t){if(ne&&ne(),O&&O.aborted&&O.reason instanceof N){let n=O.reason;throw n.config=e,k&&(n.request=k),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(A)throw k&&!A.request&&(A.request=k),A;if(t instanceof N)throw k&&!t.request&&(t.request=k),t;if(t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)){let n=new N(`Network Error`,N.ERR_NETWORK,e,k,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw N.from(t,t&&t.code,e,k,t&&t.response)}}},On=new Map,kn=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=On;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Dn(t)),l=c;return c};kn();var An={http:null,xhr:dn,fetch:{get:kn}};M.forEach(An,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var jn=e=>`- ${e}`,Mn=e=>M.isFunction(e)||e===null||e===!1;function Nn(e,t){e=M.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!Mn(r)&&(i=An[(n=String(r)).toLowerCase()],i===void 0))throw new N(`Unknown adapter '${n}'`);if(i&&(M.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new N(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since : 4`+e.map(jn).join(` 5`):` `+jn(e[0]):`as no adapter specified`),N.ERR_NOT_SUPPORT)}return i}var Pn={getAdapter:Nn,adapters:An};function Fn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Bt(null,e)}function In(e){return Fn(e),e.headers=it.from(e.headers),e.data=Rt.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),Pn.getAdapter(e.adapter||Lt.adapter,e)(e).then(function(t){Fn(e),e.response=t;try{t.data=Rt.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=it.from(t.headers),t},function(t){if(!zt(t)&&(Fn(e),t&&t.response)){e.response=t.response;try{t.response.data=Rt.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=it.from(t.response.headers)}return Promise.reject(t)})}var Ln={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{Ln[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var Rn={};Ln.transitional=function(e,t,n){function r(e,t){return`[Axios v`+bn+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new N(r(i,` has been removed`+(t?` in `+t:``)),N.ERR_DEPRECATED);return t&&!Rn[i]&&(Rn[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},Ln.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function zn(e,t,n){if(typeof e!=`object`||!e)throw new N(`options must be an object`,N.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-->0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new N(`option `+a+` must be `+n,N.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new N(`Unknown option `+a,N.ERR_BAD_OPTION)}}var Bn={assertOptions:zn,validators:Ln},Vn=Bn.validators,Hn=class{constructor(e){this.defaults=e||{},this.interceptors={request:new yt,response:new yt}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>
5{if(!t.stack)return``;let e=t.stack.indexOf(` 6`);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(` 7`),r=t===-1?-1:n.indexOf(` 8`,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=` 9`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=on(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Bn.assertOptions(n,{silentJSONParsing:Vn.transitional(Vn.boolean),forcedJSONParsing:Vn.transitional(Vn.boolean),clarifyTimeoutError:Vn.transitional(Vn.boolean),legacyInterceptorReqResOrdering:Vn.transitional(Vn.boolean),advertiseZstdAcceptEncoding:Vn.transitional(Vn.boolean),validateStatusUndefinedResolves:Vn.transitional(Vn.boolean)},!1),r!=null&&(M.isFunction(r)?t.paramsSerializer={serialize:r}:Bn.assertOptions(r,{encode:Vn.function,serialize:Vn.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Bn.assertOptions(t,{baseUrl:Vn.spelling(`baseURL`),withXsrfToken:Vn.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&M.merge(i.common,i[t.method]);i&&M.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=it.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||bt;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[In.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=In.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=on(this.defaults,e),vt(rn(e.baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};M.forEach([`delete`,`get`,`head`,`options`],function(e){Hn.prototype[e]=function(t,n){return this.request(on(n||{},{method:e,url:t,data:n&&M.hasOwnProp(n,`data`)?n.data:void 0}))}}),M.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(on(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Hn.prototype[e]=t(),e!==`query`&&(Hn.prototype[e+`Form`]=t(!0))});var Un=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-->0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Bt(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Wn(e){return function(t){return e.apply(null,t)}}function Gn(e){return M.isObject(e)&&e.isAxiosError===!0}var Kn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
9alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Kn).forEach(([e,t])=>{Kn[t]=e});function qn(e){let t=new Hn(e),n=r(Hn.prototype.request,t);return M.extend(n,Hn.prototype,t,{allOwnKeys:!0}),M.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return qn(on(e,t))},n}var Jn=qn(Lt);Jn.Axios=Hn,Jn.CanceledError=Bt,Jn.CancelToken=Un,Jn.isCancel=zt,Jn.VERSION=bn,Jn.toFormData=pt,Jn.AxiosError=N,Jn.Cancel=Jn.CanceledError,Jn.all=function(e){return Promise.all(e)},Jn.spread=Wn,Jn.isAxiosError=Gn,Jn.mergeConfig=on,Jn.AxiosHeaders=it,Jn.formToJSON=e=>Pt(M.isHTMLForm(e)?new FormData(e):e),Jn.getAdapter=Pn.getAdapter,Jn.HttpStatusCode=Kn,Jn.default=Jn,window.axios=Jn,window.axios.defaults.headers.common[`X-Requested-With`]=`XMLHttpRequest`;var Yn=t(n(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).EF=r()})(e,function(){function e(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,(i=r.key,typeof(a=function(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n===void 0)return(t===`string`?String:Number)(e);var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}(i,`string`))==`symbol`?a:String(a)),r)}var i,a}function n(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,t){return(i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(e)}function o(e){var t=function(){if(typeof Reflect>`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=r(e);if(t){var o=r(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return a(this,n)}}var s=typeof globalThis<`u`&&globalThis||typeof self<`u`&&self||s!==void 0&&s,c=`URLSearchParams`in s,l=`Symbol`in s&&`iterator`in Symbol,u=`FileReader`in s&&`Blob`in s&&function(){try{return new Blob,!0}catch{return!1}}(),d=`FormData`in s,f=`ArrayBuffer`in s;if(f)var p=[`[object Int8Array]`,`[object Uint8Array]`,`[object Uint8ClampedArray]`,`[object Int16Array]`,`[object Uint16Array]`,`[object Int32Array]`,`[object Uint32Array]`,`[object Float32Array]`,`[object Float64Array
9]`],m=ArrayBuffer.isView||function(e){return e&&-1<p.indexOf(Object.prototype.toString.call(e))};function h(e){if(typeof e!=`string`&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e===``)throw TypeError(`Invalid character in header field name: "`+e+`"`);return e.toLowerCase()}function g(e){return typeof e!=`string`&&(e=String(e)),e}function _(e){var t={next:function(){var t=e.shift();return{done:t===void 0,value:t}}};return l&&(t[Symbol.iterator]=function(){return t}),t}function v(e){this.map={},e instanceof v?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function y(e){if(e.bodyUsed)return Promise.reject(TypeError(`Already read`));e.bodyUsed=!0}function b(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function x(e){var t=new FileReader,n=b(t);return t.readAsArrayBuffer(e),n}function S(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function C(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,(this._bodyInit=e)?typeof e==`string`?this._bodyText=e:u&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:d&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:c&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():f&&u&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=S(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):f&&(ArrayBuffer.prototype.isPrototypeOf(e)||m(e))?this._bodyArrayBuffer=S(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText=``,this.headers.get(`content-type`)||(typeof e==`string`?this.headers.set(`content-type`,`text/plain;charset=UTF-8`):this._bodyBlob&&this._bodyBlob.type?this.headers.set(`content-type`,this._bodyBlob.type):c&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set(`content-type`,`application/x-www-form-urlencoded;charset=UTF-8`))},u&&(this.blob=function(){var e=y(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw Error(`could not read FormData body as blob`);return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?y(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(x)}),this.text=function(){var e,t,n,r=y(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=b(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join(``)}(this._bodyArrayBuffer));if(this._bodyFormData)throw Error(`could not read FormData body as text`);return Promise.resolve(this._bodyText)},d&&(this.formData=function(){return this.text().then(E)}),this.json=function(){return this.text().then(JSON.parse)},this}v.prototype.append=function(e,t){e=h(e),t=g(t);var n=this.map[e];this.map[e]=n?n+`, `+t:t},v.prototype.delete=function(e){delete this.map[h(e)]},v.prototype.get=function(e){return e=h(e),this.has(e)?this.map[e]:null},v.prototype.has=function(e){return this.map.hasOwnProperty(h(e))},v.prototype.set=function(e,t){this.map[h(e)]=g(t)},v.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},v.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),_(e)},v.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),_(e)},v.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),_(e)},l&&(v.prototype[Symbol.iterator]=v.prototype.entries);
9var w=[`DELETE`,`GET`,`HEAD`,`OPTIONS`,`POST`,`PUT`];function T(e,t){if(!(this instanceof T))throw TypeError(`Please use the "new" operator, this DOM object constructor cannot be called as a function.`);var n,r,i=(t||={}).body;if(e instanceof T){if(e.bodyUsed)throw TypeError(`Already read`);this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new v(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||e._bodyInit==null||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||`same-origin`,!t.headers&&this.headers||(this.headers=new v(t.headers)),this.method=(n=t.method||this.method||`GET`,r=n.toUpperCase(),-1<w.indexOf(r)?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,(this.method===`GET`||this.method===`HEAD`)&&i)throw TypeError(`Body not allowed for GET or HEAD requests`);if(this._initBody(i),!(this.method!==`GET`&&this.method!==`HEAD`||t.cache!==`no-store`&&t.cache!==`no-cache`)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,`$1_=`+new Date().getTime()):this.url+=(/\?/.test(this.url)?`&`:`?`)+`_=`+new Date().getTime()}}function E(e){var t=new FormData;return e.trim().split(`&`).forEach(function(e){if(e){var n=e.split(`=`),r=n.shift().replace(/\+/g,` `),i=n.join(`=`).replace(/\+/g,` `);t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function D(e,t){if(!(this instanceof D))throw TypeError(`Please use the "new" operator, this DOM object constructor cannot be called as a function.`);t||={},this.type=`default`,this.status=t.status===void 0?200:t.status,this.ok=200<=this.status&&this.status<300,this.statusText=t.statusText===void 0?``:``+t.statusText,this.headers=new v(t.headers),this.url=t.url||``,this._initBody(e)}T.prototype.clone=function(){return new T(this,{body:this._bodyInit})},C.call(T.prototype),C.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new v(this.headers),url:this.url})},D.error=function(){var e=new D(null,{status:0,statusText:``});return e.type=`error`,e};var ee=[301,302,303,307,308];D.redirect=function(e,t){if(ee.indexOf(t)===-1)throw RangeError(`Invalid status code`);return new D(null,{status:t,headers:{location:e}})};var te=s.DOMException;try{new te}catch{(te=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),te.prototype.constructor=te}function O(e,t){return new Promise(function(n,r){var i=new T(e,t);if(i.signal&&i.signal.aborted)return r(new te(`Aborted`,`AbortError`));var a=new XMLHttpRequest;function o(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||``,t=new v,e.replace(/\r?\n[\t ]+/g,` `).split(`\r`).map(function(e){return e.indexOf(` 10`)===0?e.substr(1,e.length):e}).forEach(function(e){var n=e.split(`:`),r=n.shift().trim();if(r){var i=n.join(`:`).trim();t.append(r,i)}}),t)};r.url=`responseURL`in a?a.responseURL:r.headers.get(`X-Request-URL`);var i=`response`in a?a.response:a.responseText;setTimeout(function(){n(new D(i,r))},0)},a.onerror=function(){setTimeout(function(){r(TypeError(`Network request failed`))},0)},a.ontimeout=function(){setTimeout(function(){r(TypeError(`Network request failed`))},0)},a.onabort=function(){setTimeout(function(){r(new te(`Aborted`,`AbortError`))},0)},a.open(i.method,function(e){try{return e===``&&s.location.href?s.location.href:e}catch{return e}}(i.url),!0),i.credentials===`include`?a.withCredentials=!0:i.credentials===`omit`&&(a.withCredentials=!1),`responseType`in a&&(u?a.responseType=`blob`:f&&i.headers.get(`Content-Type`)&&i.headers.get(`Content-Type`).indexOf(`application/octet-stream`)!==-1&&(a.responseType=`arraybuffer`)),!t||typeof t.headers!=`object`||t.headers instanceof v?i.headers.forEach(function(e,t){a.setRequestHeader(t,e)}):Object.getOwnPropertyNames(t.headers).forEach(function(e){a.setRequestHeader(e,g(t.headers[e]))}),i.signal&&(i.signal.addEventListener(`abort`,o),a.onreadystatechange=function(){a.readyState===4&&i.signal.removeEventListener(`abort`,o)}),a.send(i._bodyInit===void 0?null:i._bodyInit)})}O.polyfill=!0,s.fetch||(s.fetch=O,s.Headers=v,s.Request=T,s.Response=D);var k=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function ne(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})}function re(e){return new this(function(t,n){if(!e||e.length===void 0)return n(TypeError(typeof e+` `+e+` is not iterable(cannot read property Symbol(Symbol.iterator))`));var r=Array.prototype.slice.call(e);
10if(r.length===0)return t([]);var i=r.length;function a(e,n){if(n&&(typeof n==`object`||typeof n==`function`)){var o=n.then;if(typeof o==`function`)return void o.call(n,function(t){a(e,t)},function(n){r[e]={status:`rejected`,reason:n},--i==0&&t(r)})}r[e]={status:`fulfilled`,value:n},--i==0&&t(r)}for(var o=0;o<r.length;o++)a(o,r[o])})}(function(e){function t(e){var t={next:function(){var t=e.shift();return{done:t===void 0,value:t}}};return o&&(t[Symbol.iterator]=function(){return t}),t}function n(e){return encodeURIComponent(e).replace(/%20/g,`+`)}function r(e){return decodeURIComponent(String(e).replace(/\+/g,` `))}var i,a,o=function(){try{return!!Symbol.iterator}catch{return!1}}();!function(){try{var t=e.URLSearchParams;return new t(`?a=1`).toString()===`a=1`&&typeof t.prototype.set==`function`&&typeof t.prototype.entries==`function`}catch{return!1}}()&&((a=(i=function(e){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var t=typeof e;if(t!=`undefined`)if(t==`string`)e!==``&&this._fromString(e);else if(e instanceof i){var n=this;e.forEach(function(e,t){n.append(t,e)})}else{if(e===null||t!=`object`)throw TypeError(`Unsupported input's type for URLSearchParams`);if(Object.prototype.toString.call(e)===`[object Array]`)for(var r=0;r<e.length;r++){var a=e[r];if(Object.prototype.toString.call(a)!==`[object Array]`&&a.length===2)throw TypeError(`Expected [string, any] as entry at index `+r+` of URLSearchParams's input`);this.append(a[0],a[1])}else for(var o in e)e.hasOwnProperty(o)&&this.append(o,e[o])}}).prototype).append=function(e,t){e in this._entries?this._entries[e].push(String(t)):this._entries[e]=[String(t)]},a.delete=function(e){delete this._entries[e]},a.get=function(e){return e in this._entries?this._entries[e][0]:null},a.getAll=function(e){return e in this._entries?this._entries[e].slice(0):[]},a.has=function(e){return e in this._entries},a.set=function(e,t){this._entries[e]=[String(t)]},a.forEach=function(e,t){var n;for(var r in this._entries)if(this._entries.hasOwnProperty(r)){n=this._entries[r];for(var i=0;i<n.length;i++)e.call(t,n[i],r,this)}},a.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),t(e)},a.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),t(e)},a.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),t(e)},o&&(a[Symbol.iterator]=a.entries),a.toString=function(){var e=[];return this.forEach(function(t,r){e.push(n(r)+`=`+n(t))}),e.join(`&`)},e.URLSearchParams=i);var s=e.URLSearchParams.prototype;typeof s.sort!=`function`&&(s.sort=function(){var e=this,t=[];this.forEach(function(n,r){t.push([r,n]),e._entries||e.delete(r)}),t.sort(function(e,t){return e[0]<t[0]?-1:+(e[0]>t[0])}),e._entries&&={};for(var n=0;n<t.length;n++)this.append(t[n][0],t[n][1])}),typeof s._fromString!=`function`&&Object.defineProperty(s,"_fromString",{enumerable:!1,configurable:!1,writable:!1,value:function(e){if(this._entries)this._entries={};else{var t=[];this.forEach(function(e,n){t.push(n)});for(var n=0;n<t.length;n++)this.delete(t[n])}var i,a=(e=e.replace(/^\?/,``)).split(`&`);for(n=0;n<a.length;n++)i=a[n].split(`=`),this.append(r(i[0]),1<i.length?r(i[1]):``)}})})(k===void 0?typeof window<`u`?window:typeof self<`u`?self:k:k),function(e){var t,n;function r(t,n){typeof t!=`string`&&(t=String(t)),n&&typeof n!=`string`&&(n=String(n));var r,i=document;if(n&&(e.location===void 0||n!==e.location.href)){n=n.toLowerCase(),(r=(i=document.implementation.createHTMLDocument(``)).createElement(`base`)).href=n,i.head.appendChild(r);try{if(r.href.indexOf(n)!==0)throw Error(r.href)}catch(e){throw Error(`URL unable to set base `+n+` due to `+e)}}var a=i.createElement(`a`);a.href=t,r&&(i.body.appendChild(a),a.href=a.href);var o=i.createElement(`input`);if(o.type=`url`,o.value=t,a.protocol===`:`||!/:/.test(a.href)||!o.checkValidity()&&!n)throw TypeError(`Invalid URL`);Object.defineProperty(this,"_anchorElement",{value:a});var s=new e.URLSearchParams(this.search),c=!0,l=!0,u=this;[`append`,`delete`,`set`].forEach(function(e){var t=s[e];s[e]=function(){t.apply(s,arguments),c&&(l=!1,u.search=s.toString(),l=!0)}}),Object.defineProperty(this,"searchParams",{value:s,enumerable:!0});var d=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,
10configurable:!1,writable:!1,value:function(){this.search!==d&&(d=this.search,l&&(c=!1,this.searchParams._fromString(this.search),c=!0))}})}if(!function(){try{var t=new e.URL(`b`,`http://a`);return t.pathname=`c d`,t.href===`http://a/c%20d`&&t.searchParams}catch{return!1}}()&&(t=e.URL,n=r.prototype,[`hash`,`host`,`hostname`,`port`,`protocol`].forEach(function(e){var t=e;Object.defineProperty(n,t,{get:function(){return this._anchorElement[t]},set:function(e){this._anchorElement[t]=e},enumerable:!0})}),Object.defineProperty(n,"search",{get:function(){return this._anchorElement.search},set:function(e){this._anchorElement.search=e,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(n,{toString:{get:function(){var e=this;return function(){return e.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,``)},set:function(e){this._anchorElement.href=e,this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,`/`)},set:function(e){this._anchorElement.pathname=e},enumerable:!0},origin:{get:function(){var e={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol],t=this._anchorElement.port!=e&&this._anchorElement.port!==``;return this._anchorElement.protocol+`//`+this._anchorElement.hostname+(t?`:`+this._anchorElement.port:``)},enumerable:!0},password:{get:function(){return``},set:function(e){},enumerable:!0},username:{get:function(){return``},set:function(e){},enumerable:!0}}),r.createObjectURL=function(e){return t.createObjectURL.apply(t,arguments)},r.revokeObjectURL=function(e){return t.revokeObjectURL.apply(t,arguments)},e.URL=r),e.location!==void 0&&!(`origin`in e.location)){var i=function(){return e.location.protocol+`//`+e.location.hostname+(e.location.port?`:`+e.location.port:``)};try{Object.defineProperty(e.location,"origin",{get:i,enumerable:!0})}catch{setInterval(function(){e.location.origin=i()},100)}}}(k===void 0?typeof window<`u`?window:typeof self<`u`?self:k:k);var A=setTimeout;function ie(e){return!!(e&&e.length!==void 0)}function ae(){}function j(e){if(!(this instanceof j))throw TypeError(`Promises must be constructed via new`);if(typeof e!=`function`)throw TypeError(`not a function`);this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],de(e,this)}function oe(e,t){for(;e._state===3;)e=e._value;e._state===0?e._deferreds.push(t):(e._handled=!0,j._immediateFn(function(){var n=e._state===1?t.onFulfilled:t.onRejected;if(n!==null){var r;try{r=n(e._value)}catch(e){ce(t.promise,e);return}se(t.promise,r)}else(e._state===1?se:ce)(t.promise,e._value)}))}function se(e,t){try{if(t===e)throw TypeError(`A promise cannot be resolved with itself.`);if(t&&(typeof t==`object`||typeof t==`function`)){var n=t.then;if(t instanceof j)return e._state=3,e._value=t,void le(e);if(typeof n==`function`)return void de((r=n,i=t,function(){r.apply(i,arguments)}),e)}e._state=1,e._value=t,le(e)}catch(t){ce(e,t)}var r,i}function ce(e,t){e._state=2,e._value=t,le(e)}function le(e){e._state===2&&e._deferreds.length===0&&j._immediateFn(function(){e._handled||j._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)oe(e,e._deferreds[t]);e._deferreds=null}function ue(e,t,n){this.onFulfilled=typeof e==`function`?e:null,this.onRejected=typeof t==`function`?t:null,this.promise=n}function de(e,t){var n=!1;try{e(function(e){n||(n=!0,se(t,e))},function(e){n||(n=!0,ce(t,e))})}catch(e){if(n)return;n=!0,ce(t,e)}}j.prototype.catch=function(e){return this.then(null,e)},j.prototype.then=function(e,t){var n=new this.constructor(ae);return oe(this,new ue(e,t,n)),n},j.prototype.finally=ne,j.all=function(e){return new j(function(t,n){if(!ie(e))return n(TypeError(`Promise.all accepts an array`));var r=Array.prototype.slice.call(e);if(r.length===0)return t([]);var i=r.length;function a(e,o){try{if(o&&(typeof o==`object`||typeof o==`function`)){var s=o.then;if(typeof s==`function`)return void s.call(o,function(t){a(e,t)},n)}r[e]=o,--i==0&&t(r)}catch(e){n(e)}}for(var o=0;o<r.length;o++)a(o,r[o])})},j.allSettled=re,j.resolve=function(e){return e&&typeof e==`object`&&e.constructor===j?e:new j(function(t){t(e)})},j.reject=function(e){return new j(function(t,n){n(e)})},j.race=function(e){return new j(function(t,n){if(!ie(e))return n(TypeError(`Promise.race accepts an array`));for(var r=0,i=e.length;r<i;r++)j.resolve(e[r]).then(t,n)})},j._immediateFn=typeof setImmediate==`function`?function(e){setImmediate(e)}:function(e){A(e,0)},j._unhandledRejectionFn=function(e){typeof console<`u`&&console&&console.warn(`Possible Unhandled Promise Rejection:`,e)};var fe=function(){if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(typeof global<`u`)return global;throw Error(`unable to locate global object`)}();typeof fe.Promise==`function`?fe.Promise.prototype.finally?fe.Promise.allSettled||(fe.Promise.allSettled=re):fe.Promise.prototype.finally=ne:fe.Promise=j;var pe=function(){function t(n){if(e(this,t),this.constructor===t)throw TypeError(`Can not construct abstract class.`);if(this._persist===t.prototype._persist)throw TypeError(`Please implement abstract method _persist.`);if(this._fetch===t.prototype._fetch)throw TypeError(`Please implement abstract method _fetch.`);this.customParamProvider=n,this._trackingDomain=`<<.TrackingDomain>>`,this._organicEnabled=!1}return n(t,[{key:`configure`,value:function(e){this._isDefined(e.tracking_domain)&&(this._trackingDomain=e.tracking_domain),this._isDefined(e.tld)&&(this._tld=e.tld),this._isDefined(e.organic)&&(this._isDefined(e.organic.offer_id)&&this._isDefined(e.organic.affiliate_id)?(this._organicEnabled=!0,this._organicOptions=Object.assign(this._getDefaultOrganicClickOptions(),e.organic.options||{},{affiliate_id:e.organic.affiliate_id,offer_id:e.organic.offer_id})):console.warn(`Unable to setup organic tracking. Missing "organic.offer_id" or "organic.affiliate_id" parameter.`))}},{key:`getAdvertiserTransactionId`,value:function(e){var t=this._fetch(`ef_tid_c_a_${e}`);return t=0<(t=t?t.split(`|`):[]).length?t[t.length-1]:this._fetch(`ef_tid_i_a_${e}`)}},{key:`getTransactionId`,value:function(e){var t=this._fetch(`ef_tid_c_o_${e}`);return t=(t=0<(t=t?t.split(`|`):[]).length?t[t.length-1]:this._fetch(`ef_tid_i_o_${e}`))||this._fetch(`ef_tid_${e}`)}}
10,{key:`impression`,value:function(e){var t=this;return e.offer_id||e.coupon_code?!0===e.do_not_track?Promise.resolve(``):new Promise(function(n,r){t._getCustomParams().then(function(r){var i=t._isDefined(e.tracking_domain)?e.tracking_domain:t._trackingDomain,a=new URL(`${i}/sdk/impression`),o=new URLSearchParams(a.search);for(var s in r)r.hasOwnProperty(s)&&o.set(s,r[s]);o.set(`oid`,e.offer_id),o.set(`affid`,e.affiliate_id||``),o.set(`async`,`json`),t._isDefined(e.sub1)&&o.set(`sub1`,e.sub1),t._isDefined(e.sub2)&&o.set(`sub2`,e.sub2),t._isDefined(e.sub3)&&o.set(`sub3`,e.sub3),t._isDefined(e.sub4)&&o.set(`sub4`,e.sub4),t._isDefined(e.sub5)&&o.set(`sub5`,e.sub5),t._isDefined(e.adv1)&&o.set(`adv1`,e.adv1),t._isDefined(e.adv2)&&o.set(`adv2`,e.adv2),t._isDefined(e.adv3)&&o.set(`adv3`,e.adv3),t._isDefined(e.adv4)&&o.set(`adv4`,e.adv4),t._isDefined(e.adv5)&&o.set(`adv5`,e.adv5),t._isDefined(e.source_id)&&o.set(`source_id`,e.source_id),t._isDefined(e.creative_id)&&o.set(`creative_id`,e.creative_id),t._isDefined(e.fbclid)?o.set(`fbclid`,e.fbclid):t._setDefaultFromURL(o,`fbclid`),t._isDefined(e.gclid)?o.set(`gclid`,e.gclid):t._setDefaultFromURL(o,`gclid`),t._isDefined(e.ttclid)?o.set(`ttclid`,e.ttclid):t._setDefaultFromURL(o,`ttclid`),t._isDefined(e.sccid)?o.set(`sccid`,e.sccid):t._setDefaultFromURL(o,`ScCid`),t._isDefined(e.coupon_code)&&o.set(`__cc`,e.coupon_code||``),t._isDefined(e.parameters)&&Object.keys(e.parameters).forEach(function(t){return o.set(t,e.parameters[t])}),!0===e.disable_fingerprinting&&o.delete(`effp`),a.search=o.toString(),fetch(a.toString(),{method:`GET`,credentials:`include`}).then(function(e){return e.json()},function(e){console.error(e),n(``)}).then(function(r){if(r.transaction_id&&0<r.transaction_id.length){var i=t._fetch(`ef_tid_i_o_${r.oid||e.offer_id}`);t._persist(`ef_tid_i_o_${r.oid||e.offer_id}`,i&&0<i.length?`${i}|${r.transaction_id}`:r.transaction_id);var a=t._fetch(`ef_tid_i_a_${r.aid}`);t._persist(`ef_tid_i_a_${r.aid}`,a&&0<a.length?`${a}|${r.transaction_id}`:r.transaction_id),n(r.transaction_id)}})})}):(console.warn(`Unable to track. Missing "offer_id" parameter.`),Promise.resolve(``))}},{key:`_getDefaultOrganicClickOptions`,value:function(){var e=``;return this.urlParameter(`fbclid`)&&(e=`Facebook`,this.urlParameter(`fbclid`).slice(0,3)===`PAA`&&(e=`Instagram`)),this.urlParameter(`gclid`)&&(e=`Google`),this.urlParameter(`ttclid`)&&(e=`Tiktok`),this.urlParameter(`sccid`)&&(e=`Snapchat`),(this.urlParameter(`MSCLKID`)||this.urlParameter(`msclkid`))&&(e=`Microsoft`),this.urlParameter(`OutbrainClickId`)&&(e=`Outbrain`),this.urlParameter(`TCLID`)&&(e=`Taboola`),{sub1:this.urlParameter(`sub1`)||e,sub2:this.urlParameter(`sub2`)||document.referrer,sub3:this.urlParameter(`sub3`)||`/`+window.location.pathname.split(`/`)[1],sub4:this.urlParameter(`sub4`)||window.location.pathname,sub5:this.urlParameter(`sub5`)||window.location.search,source_id:this.urlParameter(`source_id`)||`organic`,transaction_id:this.urlParameter(`_ef_transaction_id`),organic:1}}},{key:`click`,value:function(e){var t=this;if(!0===e.do_not_track)return Promise.resolve(``);if(!e.offer_id&&!e.transaction_id&&!e.coupon_code){if(!this._organicEnabled||this._fetch(`ef_witness`))return console.warn(`Unable to track. Missing "offer_id" or "transaction_id" parameter.`),Promise.resolve(``);e=this._organicOptions}return new Promise(function(n,r){t._getCustomParams().then(function(r){var i=t._isDefined(e.tracking_domain)?e.tracking_domain:t._trackingDomain,a=new URL(`${i}/sdk/click`),o=new URLSearchParams(a.search);for(var s in r)r.hasOwnProperty(s)&&o.set(s,r[s]);if(o.set(`_ef_transaction_id`,e.transaction_id||``),o.set(`oid`,e.offer_id||``),o.set(`affid`,e.affiliate_id||``),o.set(`__cc`,e.coupon_code||``),o.set(`async`,`json`),t._isDefined(e.uid)&&o.set(`uid`,e.uid),t._isDefined(e.sub1)&&o.set(`sub1`,e.sub1),t._isDefined(e.sub2)&&o.set(`sub2`,e.sub2),t._isDefined(e.sub3)&&o.set(`sub3`,e.sub3),t._isDefined(e.sub4)&&o.set(`sub4`,e.sub4),t._isDefined(e.sub5)&&o.set(`sub5`,e.sub5),t._isDefined(e.adv1)&&o.set(`adv1`,e.adv1),t._isDefined(e.adv2)&&o.set(`adv2`,e.adv2),t._isDefined(e.adv3)&&o.set(`adv3`,e.adv3),t._isDefined(e.adv4)&&o.set(`adv4`,e.adv4),t._isDefined(e.adv5)&&o.set(`adv5`,e.adv5),t._isDefined(e.source_id)&&o.set(`source_id`,e.source_id),t._isDefined(e.creative_id)&&o.set(`creative_id`,e.creative_id),t._isDefined(e.organic)&&o.set(`__organic_click`,e.organic||``),t._isDefined(e.cost)&&o.set(`cost`,e.cost),t._isDefined(e.fbclid)?o.set(`fbclid`,e.fbclid):t._setDefaultFromURL(o,`fbclid`),t._isDefined(e.gclid)?o.set(`gclid`,e.gclid):t._setDefaultFromURL(o,`gclid`),t._isDefined(e.ttclid)?o.set(`ttclid`,e.ttclid):t._setDefaultFromURL(o,`ttclid`),t._isDefined(e.sccid)?o.set(`sccid`,e.sccid):t._setDefaultFromURL(o,`ScCid`),!0===e.disable_fingerprinting&&o.delete(`effp`),o.set(`__rf`,document.referrer),t._isDefined(e.offer_id)){var c=t._fetch(`ef_session_${e.offer_id}`),l=Math.floor(100*Math.random());o.set(`__efckuq`,c===``?l%2==0?l:l+1:2*l+1)}
10t._isDefined(e.parameters)&&Object.keys(e.parameters).forEach(function(t){return o.set(t,e.parameters[t])}),a.search=o.toString(),fetch(a.toString(),{method:`GET`,credentials:`include`}).then(function(e){return e.json()},function(e){console.error(e),n(``)}).then(function(r){if(r.transaction_id&&0<r.transaction_id.length){t._persist(`ef_witness`,`1`),t._persist(`ef_session_${r.oid||e.offer_id}`,`1`,0<r.session_duration?r.session_duration:720);var i=t._fetch(`ef_tid_c_o_${r.oid||e.offer_id}`);t._persist(`ef_tid_c_o_${r.oid||e.offer_id}`,i&&0<i.length?`${i}|${r.transaction_id}`:r.transaction_id);var a=t._fetch(`ef_tid_c_a_${r.aid}`);t._persist(`ef_tid_c_a_${r.aid}`,a&&0<a.length?`${a}|${r.transaction_id}`:r.transaction_id),n(r.transaction_id)}})})})}},{key:`conversion`,value:function(e){var t=this;if(!e.transaction_id){if(this._isDefined(e.offer_id))e.transaction_id=this._fetch(`ef_tid_c_o_${e.offer_id}`),e.transaction_id||=this._fetch(`ef_tid_i_o_${e.offer_id}`),e.transaction_id||=this._fetch(`ef_tid_${e.offer_id}`);else if(this._isDefined(e.advertiser_id)||this._isDefined(e.aid)){var n=e.advertiser_id||e.aid;e.transaction_id=this._fetch(`ef_tid_c_a_${n}`),e.transaction_id||=this._fetch(`ef_tid_i_a_${n}`),e.transaction_id||=this._fetch(`ef_tid_${e.offer_id}`)}}return e.transaction_id&&332<e.transaction_id.length&&(e.transaction_id=e.transaction_id.substring(0,33)+e.transaction_id.substring(e.transaction_id.length-297,e.transaction_id.length)),new Promise(function(n,r){t._getCustomParams().then(function(r){var i=t._isDefined(e.tracking_domain)?e.tracking_domain:t._trackingDomain,a=new URL(`${i}/sdk/conversion`),o=new URLSearchParams(a.search);for(var s in r)r.hasOwnProperty(s)&&o.set(s,r[s]);o.set(`transaction_id`,e.transaction_id||``),o.set(`event_id`,e.event_id||0),t._isDefined(e.offer_id)&&o.set(`oid`,e.offer_id),t._isDefined(e.affiliate_id)&&o.set(`affid`,e.affiliate_id),t._isDefined(e.advertiser_id)&&o.set(`advid`,e.advertiser_id),t._isDefined(e.aid)&&o.set(`aid`,e.aid),t._isDefined(e.adv_event_id)&&(o.set(`adv_event_id`,e.adv_event_id),o.delete(`event_id`)),t._isDefined(e.coupon_code)&&o.set(`coupon_code`,e.coupon_code),t._isDefined(e.amount)&&o.set(`amount`,e.amount),t._isDefined(e.adv1)&&o.set(`adv1`,e.adv1),t._isDefined(e.adv2)&&o.set(`adv2`,e.adv2),t._isDefined(e.adv3)&&o.set(`adv3`,e.adv3),t._isDefined(e.adv4)&&o.set(`adv4`,e.adv4),t._isDefined(e.adv5)&&o.set(`adv5`,e.adv5),t._isDefined(e.sub1)&&o.set(`sub1`,e.sub1),t._isDefined(e.sub2)&&o.set(`sub2`,e.sub2),t._isDefined(e.sub3)&&o.set(`sub3`,e.sub3),t._isDefined(e.sub4)&&o.set(`sub4`,e.sub4),t._isDefined(e.sub5)&&o.set(`sub5`,e.sub5),t._isDefined(e.order_id)&&o.set(`order_id`,e.order_id),t._isDefined(e.verification_token)&&o.set(`verification_token`,e.verification_token),t._isDefined(e.email)&&o.set(`email`,e.email),t._isDefined(e.order)&&o.set(`order`,JSON.stringify(e.order)),t._isDefined(e.user_id)&&o.set(`user_id`,e.user_id),!0===e.disable_fingerprinting&&o.delete(`effp`),t._isDefined(e.parameters)&&Object.keys(e.parameters).forEach(function(t){return o.set(t,e.parameters[t])}),o.set(`event_source_url`,window.location.hostname),a.search=o.toString(),fetch(a.toString(),{method:`GET`,headers:{Accept:`application/json`},credentials:`include`}).then(function(e){if(e.status!==200)return{conversion_id:``,transaction_id:``,html_pixel:``};var t=e.json();return t.error?{conversion_id:``,transaction_id:``,html_pixel:``}:t}).then(function(e){if(e.html_pixel){var t=document.createElement(`iframe`);t.width=1,t.height=1,t.frameBorder=0,document.getElementsByTagName(`body`)[0].appendChild(t),t.contentWindow.document.open(),t.contentWindow.document.write(e.html_pixel),t.contentWindow.document.close()}n({transaction_id:e.transaction_id,conversion_id:e.conversion_id})}).catch(function(e){console.log(e),n({conversion_id:``,transaction_id:``,html_pixel:``})})})})}},{key:`_getCustomParams`,value:function(){return Promise.all([this.customParamProvider,this._getClientHints()]).then(function(e){return e.reduce(function(e,t){return Object.assign(e,t)},{})})}},{key:`_getClientHints`,value:function(){return window.navigator.userAgentData?navigator.userAgentData.getHighEntropyValues([`platform`,`platformVersion`,`model`]).then(function(e){return{sec_ch_ua_platform:e.platform,sec_ch_ua_platform_version:e.platformVersion,sec_ch_ua_model:e.model}}):Promise.resolve({})}},{key:`_fetch`,value:function(){throw TypeError(`Do not call abstract method _fetch`)}},{key:`_persist`,value:function(){throw TypeError(`Do not call abstract method _persist`)}},{key:`_isDefined`,value:function(e){return e!==void 0&&e!=null}},{key:`_setDefaultFromURL`,value:function(e,t){var n=this.urlParameter(t);this._isDefined(n)&&e.set(t,n)}},{key:`urlParameter`,value:function(e){return new URL(window.location.href).searchParams.get(e)}}]),t}();return new(function(){(function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)})(r,pe);var t=o(r);function r(){return e(this,r),t.call(this,Promise.resolve({}))}return n(r,[{key:`_fetch`,value:function(e){var t=document.cookie.split(`;`).map(function(e){return e.split(`=`)}).reduce(function(e,t){try{e[decodeURIComponent(t[0].trim())]=decodeURIComponent(t[1].trim())}catch{}return e},{});return t[e]?t[e].trim():``}},{key:`_persist`,value:function(e,t,n){var r=2<arguments.length&&n!==void 0?n:720,i=new Date;
10i.setTime(i.getTime()+60*r*60*1e3),1650<t.length&&(t=t.substring(0,33)+t.substring(t.length-1616,t.length)),this._tld?document.cookie=`${e}=${t};expires=${i.toUTCString()};path=/;domain=${this._tld}`:document.cookie=`${e}=${t};expires=${i.toUTCString()};path=/`}}]),r}())})}))(),1),P=typeof window<`u`?window:void 0,Xn=typeof globalThis<`u`?globalThis:P;typeof self>`u`&&(Xn.self=Xn),typeof File>`u`&&(Xn.File=function(){});var Zn=Xn?.navigator,F=Xn?.document,Qn=Xn?.location,$n=Xn?.fetch,er=Xn!=null&&Xn.XMLHttpRequest&&`withCredentials`in new Xn.XMLHttpRequest?Xn.XMLHttpRequest:void 0,tr=Xn?.AbortController,nr=Xn?.CompressionStream,rr=Zn?.userAgent,I=P??{},ir=`1.393.6`,ar={DEBUG:!1,LIB_VERSION:ir,LIB_NAME:`web`,JS_SDK_VERSION:ir};function or(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function sr(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){or(a,r,i,o,s,`next`,e)}function s(e){or(a,r,i,o,s,`throw`,e)}o(void 0)}))}}function L(){return L=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},L.apply(null,arguments)}function cr(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var lr=e=>{if(typeof e!=`string`)return e;try{return JSON.parse(e)}catch{return e}};function ur(e){return typeof e==`string`||e}function dr(e){return typeof e==`string`?e:void 0}var fr,pr=function(e){return e.AnonymousId=`anonymous_id`,e.DistinctId=`distinct_id`,e.Props=`props`,e.EnablePersonProcessing=`enable_person_processing`,e.PersonMode=`person_mode`,e.FeatureFlagDetails=`feature_flag_details`,e.FeatureFlags=`feature_flags`,e.FeatureFlagPayloads=`feature_flag_payloads`,e.BootstrapFeatureFlagDetails=`bootstrap_feature_flag_details`,e.BootstrapFeatureFlags=`bootstrap_feature_flags`,e.BootstrapFeatureFlagPayloads=`bootstrap_feature_flag_payloads`,e.OverrideFeatureFlags=`override_feature_flags`,e.Queue=`queue`,e.LogsQueue=`logs_queue`,e.OptedOut=`opted_out`,e.SessionId=`session_id`,e.SessionStartTimestamp=`session_start_timestamp`,e.SessionLastTimestamp=`session_timestamp`,e.PersonProperties=`person_properties`,e.GroupProperties=`group_properties`,e.InstalledAppBuild=`installed_app_build`,e.InstalledAppVersion=`installed_app_version`,e.SessionReplay=`session_replay`,e.SessionReplayEventTriggerActivatedSession=`session_replay_event_trigger_activated_session`,e.SurveyLastSeenDate=`survey_last_seen_date`,e.SurveysSeen=`surveys_seen`,e.Surveys=`surveys`,e.RemoteConfig=`remote_config`,e.FlagsEndpointWasHit=`flags_endpoint_was_hit`,e.DeviceId=`device_id`,e}({}),mr=function(e){return e.GZipJS=`gzip-js`,e.Base64=`base64`,e}({}),hr=[`$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`],gr=[`token`],_r=`NativeGzipValidationError`,vr=e=>e.length>=2&&e[0]===31&&e[1]===139,yr=e=>!(!e||typeof e!=`object`)&&(`name`in e?String(e.name):``)===`NotReadableError`,br=e=>{var t=Error(`Native gzip produced invalid output: `+e);throw t.name=_r,t},xr=function(){var e=sr((function*(e,t){18>e.size&&br(`too-short`);var n=new Uint8Array(yield e.slice(0,10).arrayBuffer());vr(n)&&n[2]===8||br(`invalid-header`);var r=new DataView(yield e.slice(e.size-8).arrayBuffer());r.getUint32(0,!0)!==(e=>{for(var t=(()=>{if(fr)return fr;fr=[];for(var e=0;256>e;e++){for(var t=e,n=0;8>n;n++)t=1&t?3988292384^t>>>1:t>>>1;fr[e]=t>>>0}return fr})(),n=4294967295,r=0;e.length>r;r++)n=t[255&(n^e[r])]^n>>>8;return(4294967295^n)>>>0})(t)&&br(`invalid-crc`);var i=t.length>>>0;r.getUint32(4,!0)!==i&&br(`invalid-size`)}));return function(t,n){return e.apply(this,arguments)}}();function Sr(){return Sr=sr((function*(e,t,n){t===void 0&&(t=!0);try{var r=new TextEncoder().encode(e),i=new CompressionStream(`gzip`),a=i.writable.getWriter(),o=a.write(r).then((()=>a.close())).catch(function(){var e=sr((function*(e){try{yield a.abort(e)}catch{}throw e}));return function(t){return e.apply(this,arguments)}}()),s=new Response(i.readable).blob(),[c]=yield Promise.all([s,o]);return yield xr(c,r),c}catch(e){if(n!=null&&n.rethrow)throw e;return t&&console.error(`Failed to gzip compress data`,e),null}})),Sr.apply(this,arguments)}var Cr=`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`.split(`,`),wr=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var n=e.toLowerCase();return Cr.concat(t).some((e=>{var t=e.toLowerCase();return n.indexOf(t)!==-1}))};function R(e,t){return e.indexOf(t)!==-1}var Tr=function(e){return e.trim()},Er=function(e){return e.replace(/^\$/,``)},Dr=Object.prototype,Or=Dr.hasOwnProperty,kr=Dr.toString,z=Array.isArray||function(e){return kr.call(e)===`[object Array]`},Ar=e=>typeof e==`function`,jr=e=>e===Object(e)&&!z(e),Mr=e=>{if(jr(e)){for(var t in e)if(Or.call(e,t))return!1;return!0}return!1},B=e=>e===void 0,Nr=e=>kr.call(e)==`[object String]`,Pr=e=>Nr(e)&&e.trim().length===0,Fr=e=>e===null,V=e=>B(e)||Fr(e),Ir=e=>kr.call(e)==`[object Number]`&&e==e,Lr=e=>Ir(e)&&e>0,Rr=e=>kr.call(e)===`[object Boolean]`,zr=e=>e instanceof FormData,Br=e=>R(hr,e),Vr=e=>R(gr,e);function Hr(e){return typeof e!=`object`||!e}function Ur(e,t){return{}.toString.call(e)===`[object `+t+`]`}function Wr(e){return typeof Event<`u`&&function(e,t){try{return e instanceof t}catch{return!1}}(e,Event)}var Gr=[!0,`true`,1,`1`,`yes`],Kr=e=>R(Gr,e),qr=[!1,`false`,0,`0`,`no`];function Jr(e,t,n,r,i){return t>n&&(r.warn(`min cannot be greater than max.`),t=n),Ir(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),Jr(i||n,t,n,r))}var Yr=class{constructor(e){this.Ee={},this.Pe=e.Pe,this.Fe=Jr(e.bucketSize,0,100,e.Ae),this.$e=Jr(e.refillRate,0,this.Fe,e.Ae),this.De=Jr(e.refillInterval,0,864e5,e.Ae)}Ne(e,t){var n=Math.floor((t-e.lastAccess)/this.De);
10n>0&&(e.tokens=Math.min(e.tokens+n*this.$e,this.Fe),e.lastAccess+=n*this.De)}consumeRateLimit(e){var t,n=Date.now(),r=String(e),i=this.Ee[r];return i?this.Ne(i,n):this.Ee[r]=i={tokens:this.Fe,lastAccess:n},i.tokens===0||(i.tokens--,i.tokens===0&&((t=this.Pe)==null||t.call(this,e)),i.tokens===0)}stop(){this.Ee={}}},Xr=`Mobile`,Zr=`iOS`,Qr=`Android`,$r=`Tablet`,ei=Qr+` `+$r,ti=`iPad`,ni=`Apple`,ri=ni+` Watch`,ii=`Safari`,ai=`BlackBerry`,oi=`Samsung`,si=oi+`Browser`,ci=oi+` Internet`,li=`Chrome`,ui=li+` OS`,di=li+` `+Zr,fi=`Internet Explorer`,pi=fi+` `+Xr,mi=`Opera`,hi=mi+` Mini`,gi=`Edge`,_i=`Microsoft `+gi,vi=`Firefox`,yi=vi+` `+Zr,bi=`Nintendo`,xi=`PlayStation`,Si=`Xbox`,Ci=Qr+` `+Xr,wi=Xr+` `+ii,Ti=`Windows`,Ei=Ti+` Phone`,Di=`Nokia`,Oi=`Ouya`,ki=`Generic`,Ai=ki+` `+Xr.toLowerCase(),ji=ki+` `+$r.toLowerCase(),Mi=`Konqueror`,Ni=`Oculus Browser`,Pi=`Vivaldi`,Fi=`Yandex`,Ii=`Whale`,Li=`DuckDuckGo`,Ri=`Pale Moon`,zi=`Waterfox`,Bi=`Brave`,Vi=`Google Search App`,Hi=`(\\d+(\\.\\d+)?)`,Ui=RegExp(`Version/`+Hi),Wi=new RegExp(Si,`i`),Gi=RegExp(xi+` \\w+`,`i`),Ki=RegExp(bi+` \\w+`,`i`),qi=RegExp(ai+`|PlayBook|BB10`,`i`),Ji={"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`},Yi=function(e,t,n,r){return t||=``,function(e){return e!=null&&e.brave?Bi:null}(n)||(r!=null&&r.detectGoogleSearchApp&&R(e,`GSA/`)?Vi:R(e,` OPR/`)&&R(e,`Mini`)?hi:R(e,` OPR/`)?mi:qi.test(e)?ai:R(e,`IE`+Xr)||R(e,`WPDesktop`)?pi:R(e,`OculusBrowser`)?Ni:R(e,si)?ci:R(e,gi)||R(e,`Edg/`)?_i:R(e,Pi+`/`)?Pi:R(e,`YaBrowser/`)?Fi:R(e,Ii+`/`)?Ii:R(e,Li+`/`)||R(e,`Ddg/`)?Li:R(e,`FBIOS`)?`Facebook `+Xr:R(e,`UCWEB`)||R(e,`UCBrowser`)?`UC Browser`:R(e,`CriOS`)?di:R(e,`CrMo`)||R(e,li)?li:R(e,Qr)&&R(e,ii)?Ci:R(e,`FxiOS`)?yi:R(e.toLowerCase(),Mi.toLowerCase())?Mi:R(e,Bi+`/`)?Bi:((e,t)=>t&&R(t,ni)||function(e){return R(e,ii)&&!R(e,li)&&!R(e,Qr)}(e))(e,t)?R(e,Xr)?wi:ii:R(e,`PaleMoon/`)?Ri:R(e,zi+`/`)?zi:R(e,vi)?vi:R(e,`MSIE`)||R(e,`Trident/`)?fi:R(e,`Gecko`)?vi:``)},Xi={[pi]:[RegExp(`rv:`+Hi)],[_i]:[RegExp(gi+`?\\/`+Hi)],[li]:[RegExp(`(`+li+`|CrMo)\\/`+Hi)],[di]:[RegExp(`CriOS\\/`+Hi)],"UC Browser":[RegExp(`(UCBrowser|UCWEB)\\/`+Hi)],[ii]:[Ui],[wi]:[Ui],[mi]:[RegExp(`(Opera|OPR)\\/`+Hi)],[vi]:[RegExp(vi+`\\/`+Hi)],[yi]:[RegExp(`FxiOS\\/`+Hi)],[Mi]:[RegExp(`Konqueror[:/]?`+Hi,`i`)],[ai]:[RegExp(ai+` `+Hi),Ui],[Ci]:[RegExp(`android\\s`+Hi,`i`)],[ci]:[RegExp(si+`\\/`+Hi)],[Ni]:[RegExp(`OculusBrowser\\/`+Hi)],[Pi]:[RegExp(Pi+`\\/`+Hi)],[Fi]:[RegExp(`YaBrowser\\/`+Hi)],[Ii]:[RegExp(Ii+`\\/`+Hi)],[Bi]:[RegExp(Bi+`\\/`+Hi)],[Li]:[RegExp(`(DuckDuckGo|Ddg)\\/`+Hi)],[Ri]:[RegExp(`PaleMoon\\/`+Hi)],[zi]:[RegExp(zi+`\\/`+Hi)],[Vi]:[RegExp(`GSA\\/`+Hi)],[fi]:[RegExp(`(rv:|MSIE )`+Hi)],Mozilla:[RegExp(`rv:`+Hi)]},Zi=function(e,t,n,r){var i=Xi[Yi(e,t,n,r)];if(B(i))return null;for(var a=0;i.length>a;a++){var o=e.match(i[a]);if(o)return parseFloat(o[o.length-2])}return null},Qi=[[RegExp(Si+`; `+Si+` (.*?)[);]`,`i`),e=>[Si,e&&e[1]||``]],[new RegExp(bi,`i`),[bi,``]],[new RegExp(xi,`i`),[xi,``]],[qi,[ai,``]],[new RegExp(Ti,`i`),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[Ei,``];if(new RegExp(Xr).test(t)&&!/IEMobile\b/.test(t))return[Ti+` `+Xr,``];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=Ji[n[1]]||``;return/arm/i.test(t)&&(r=`RT`),[Ti,r]}return[Ti,``]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[Zr,[e[3],e[4],e[5]||`0`].join(`.`)]:[Zr,``]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t=``;return e&&e.length>=3&&(t=B(e[2])?e[3]:e[2]),[`watchOS`,t]}],[RegExp(`(`+Qr+` (\\d+)\\.(\\d+)\\.?(\\d+)?|`+Qr+`)`,`i`),e=>e&&e[2]?[Qr,[e[2],e[3],e[4]||`0`].join(`.`)]:[Qr,``]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,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/,[ui,``]],[/Linux|debian/i,[`Linux`,``]]],$i=function(e){return Ki.test(e)?bi:Gi.test(e)?xi:Wi.test(e)?Si:new RegExp(Oi,`i`).test(e)?Oi:RegExp(`(`+Ei+`|WPDesktop)`,`i`).test(e)?Ei:/iPad/.test(e)?ti:/iPod/.test(e)?`iPod Touch`:/iPhone/.test(e)?`iPhone`:/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?ri:qi.test(e)?ai:/(kobo)\s(ereader|touch)/i.test(e)?`Kobo`:new RegExp(Di,`i`).test(e)?Di:/(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(Xr).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)?Qr:ei:RegExp(`(pda|`+Xr+`)`,`i`).test(e)?Ai:new RegExp($r,`i`).test(e)&&!RegExp($r+` pc`,`i`).test(e)?ji:``},ea=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function ta(e,t){return typeof(n=e)==`string`&&ea.test(n)?e:t();var n}function na(e){return e&&e.split(`#`)[0]}function ra(e,t){var n=setTimeout(e,t);return n!=null&&n.unref&&n?.unref(),n}var ia=e=>e instanceof Error,aa={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}},oa=aa.info;function sa(e){if(Rr(e))return{boolValue:e};if(typeof e==`number`)return Number.isFinite(e)?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:{stringValue:String(e)};if(typeof e==`string`)return{stringValue:e};if(z(e))return{arrayValue:{values:e.map((e=>sa(e)))}};try{return{stringValue:JSON.stringify(e)}}catch{return{stringValue:String(e)}}}function ca(e){var t=[];for(var n in e){var r=e[n];Fr(r)||B(r)||t.push({key:n,value:sa(r)})}return t}function la(e,t){var{text:n,number:r}=aa[e.level||`info`]||oa,i=String(Date.now())+`000000`,a={};t.distinctId&&(a.posthogDistinctId=t.distinctId),t.sessionId&&(a.sessionId=t.sessionId),t.windowId&&(a[`window.id`]=t.windowId),V(t.sessionStartTimestamp)||(a.sessionStartTimestamp=String(t.sessionStartTimestamp)),V(t.lastActivityTimestamp)||(a.lastActivityTimestamp=String(t.lastActivityTimestamp)),t.currentUrl&&(a[`url.full`]=t.currentUrl),t.screenName&&(a[`screen.name`]=t.screenName),t.appState&&(a[`app.state`]=t.appState),t.activeFeatureFlags&&t.activeFeatureFlags.length>0&&(a.feature_flags=t.activeFeatureFlags);var o=L({},a,e.attributes||{}),s={timeUnixNano:i,observedTimeUnixNano:i,severityNumber:r,severityText:n,body:{stringValue:e.body},attributes:ca(o)};return e.trace_id&&(s.traceId=e.trace_id),e.span_id&&(s.spanId=e.span_id),B(e.trace_flags)||(s.flags=e.trace_flags),s}function ua(e,t,n){return L({},e.resourceAttributes,{"service.name":e.serviceName||`unknown_service`},e.environment&&{"deployment.environment":e.environment},e.serviceVersion&&{"service.version":e.serviceVersion},{"telemetry.sdk.name":t,"telemetry.sdk.version":n})}function da(e,t,n,r){return{resourceLogs:[{resource:{attributes:ca(t)},scopeLogs:[{scope:{name:n,version:r},logRecords:e}]}]}}var fa=class{constructor(e,t,n,r,i,a,o){a===void 0&&(a=()=>Promise.resolve()),this._instance=e,this.Se=t,this.Ae=n,this.qe=r,this.Be=i,this.je=a,this.He=o,this.Ue=null,this.ze=0,this.Ve=0,this.We=0,this.Ge=0,this.Ze=!1,this.Qe=t.maxBufferSize,this.Je=Math.max(t.maxQueueSize??t.maxBufferSize,t.maxBufferSize),this.Ye=t.flushIntervalMs,this.Ke=t.maxBatchRecordsPerPost,this.Xe=t.rateCapWindowMs,this.et=t.maxLogsPerInterval}reset(){this.tt(),this.Ue=null,this.We=0,this.Ge=0,this.Ze=!1,this.ze=0,this.Ve=0,this.Ke=this.Se.maxBatchRecordsPerPost}onReconnect(){this.Ve=0,this.rt()}captureLog(e){if(!this._instance.isDisabled&&!this._instance.optedOut&&e!=null&&e.body){var t=this.it(e);
10if(t!==null)if(t.body){if(this.nt()){var n={record:la(t,this.qe())};this.Be((()=>this.st(n)))}}else this.Ae.info(`Log was rejected in beforeSend function`)}}it(e){var t=this.Se.beforeSend;if(!t)return e;var n=z(t)?t:[t],r=e;for(var i of n)try{var a=i(r);if(!a)return this.Ae.info(`Log was rejected in beforeSend function`),null;r=a}catch(e){return this.Ae.error(`Error in beforeSend function for log:`,e),null}return r}nt(){if(this.et===void 0)return!0;var e=Date.now(),t=e-this.We;return this.Xe>t&&t>=0||(this.We=e,this.Ge=0,this.Ze=!1),this.et>this.Ge?(this.Ge++,!0):(this.Ze||=(this.Ae.warn(`captureLog dropping logs: exceeded `+this.et+` logs per `+this.Xe+`ms`),!0),!1)}flush(){var e=this;return sr((function*(){if(!e._instance.isDisabled)return e.Ue||=e.ot().finally((()=>{e.Ue=null})),e.Ue}))()}ot(){var e=this;return sr((function*(){e.tt();var t=e._instance.getPersistedProperty(pr.LogsQueue)??[];if(t.length!==0)for(var n=t.length,r=0;t.length>0&&n>r;){e.ze=0;var i=Math.min(t.length,e.Ke),a=t.slice(0,i),o=da(a.map((e=>e.record)),e.ut(),e.He??e._instance.getLibraryId(),e._instance.getLibraryVersion()),s=yield e._instance.ht(o);if(s.kind===`too-large`&&a.length>1)e.Ke=Math.max(1,Math.floor(a.length/2)),e.Ae.warn(`Received 413 when sending logs batch of size `+a.length+`, reducing batch size to `+e.Ke);else if(s.kind===`retry-later`||(s.kind===`too-large`?e.Ae.warn(`Dropping a single log record after 413 with batch size 1 — the record is larger than the server cap and cannot be split further.`):s.kind===`ok`&&e.Se.maxBatchRecordsPerPost>e.Ke&&(e.Ke=Math.min(e.Se.maxBatchRecordsPerPost,e.Ke+1)),yield e.dt(a.length),t=e._instance.getPersistedProperty(pr.LogsQueue)??[],r+=a.length,s.kind===`fatal`))throw s.error}}))()}dt(e){var t=this;return sr((function*(){var n=Math.max(0,e-t.ze),r=t._instance.getPersistedProperty(pr.LogsQueue)??[];t._instance.setPersistedProperty(pr.LogsQueue,r.slice(n)),yield t.je()}))()}ut(){return ua(this.Se,this._instance.getLibraryId(),this._instance.getLibraryVersion())}st(e){if(!this._instance.optedOut){var t=this._instance.getPersistedProperty(pr.LogsQueue)??[];this.Je>t.length||(t.shift(),this.ze++,this.Ae.info(`Logs queue is full, dropping oldest record.`)),t.push(e),this._instance.setPersistedProperty(pr.LogsQueue,t),this.Qe>t.length?this.ct():this.rt()}}ct(e){e===void 0&&(e=this.Ye),this.vt||=ra((()=>{this.vt=void 0,this.rt()}),e)}ft(){var e=Math.min(Math.max(0,this.Ve-1),6);return this.Ye*2**e}yt(){var e=this._instance.getPersistedProperty(pr.LogsQueue);return!!e&&e.length>0}shutdown(e){var t=this;return sr((function*(){t.tt();var n=t.flush().catch((()=>{}));e===void 0?yield n:yield Promise.race([n,new Promise((t=>ra(t,e)))])}))()}flushWithTimeout(e){var t=this;return sr((function*(){var n=!1,r=t.flush(),i=new Promise((t=>ra((()=>{n=!0,t()}),e)));try{yield Promise.race([r,i])}finally{n&&r.catch((()=>{}))}}))()}rt(){this.flush().then((()=>{this.Ve=0}),(e=>{this.Ve++,this.Ae.error(`PostHog logs flush failed:`,e)})).finally((()=>{!this._instance.isDisabled&&this.yt()&&this.ct(this.ft())}))}tt(){this.vt&&=(clearTimeout(this.vt),void 0)}},pa,ma,ha;function ga(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return ha&&n.length===ma||(ma=n.length,ha=n.reduce(((n,r)=>{pa||={};var i=pa[r];if(i)n[i[0]]=i[1];else for(var a=e(r),o=a.length-1;o>=0;o--){var s=a[o]?.filename,c=t[r];if(s&&c){n[s]=c,pa[r]=[s,c];break}}return n}),{})),ha}}var _a=class{constructor(e,t,n){n===void 0&&(n=[]),this.coercers=e,this.stackParser=t,this.modifiers=n}buildFromUnknown(e,t){t===void 0&&(t={});var n=t&&t.mechanism||{handled:!0,type:`generic`},r=this.buildCoercingContext(n,t,0).apply(e),i=this.buildParsingContext(t),a=this.parseStacktrace(r,i);return{$exception_list:this.convertToExceptionList(a,n),$exception_level:`error`}}modifyFrames(e){var t=this;return sr((function*(){for(var n of e)n.stacktrace&&n.stacktrace.frames&&z(n.stacktrace.frames)&&(n.stacktrace.frames=yield t.applyModifiers(n.stacktrace.frames));return e}))()}coerceFallback(e){return{type:`Error`,value:`Unknown error`,stack:e.syntheticException?.stack,synthetic:!0}}parseStacktrace(e,t){var n,r;return e.cause!=null&&(n=this.parseStacktrace(e.cause,t)),e.stack!=``&&e.stack!=null&&(r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.ski
10pFirstLines:0),t.chunkIdMap)),L({},e,{cause:n,stack:r})}applyChunkIds(e,t){return e.map((e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e)))}applyCoercers(e,t){for(var n of this.coercers)if(n.match(e))return n.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return sr((function*(){var n=e;for(var r of t.modifiers)n=yield r(n);return n}))()}convertToExceptionList(e,t){var n,r,i={type:e.type,value:e.value,mechanism:{type:t.type??`generic`,handled:(n=t.handled)==null||n,synthetic:(r=e.synthetic)!=null&&r}};e.stack&&(i.stacktrace={type:`raw`,frames:e.stack});var a=[i];return e.cause!=null&&a.push(...this.convertToExceptionList(e.cause,L({},t,{handled:!0}))),a}buildParsingContext(e){return{chunkIdMap:ga(this.stackParser),skipFirstLines:e.skipFirstLines??1}}buildCoercingContext(e,t,n){n===void 0&&(n=0);var r=(n,r)=>{if(4>=r){var i=this.buildCoercingContext(e,t,r);return this.applyCoercers(n,i)}};return L({},t,{syntheticException:n==0?t.syntheticException:void 0,mechanism:e,apply:e=>r(e,n),next:e=>r(e,n+1)})}},va=`?`;function ya(e,t,n,r,i){var a={platform:e,filename:t,function:n===`<anonymous>`?va:n,in_app:!0};return B(r)||(a.lineno=r),B(i)||(a.colno=i),a}var ba=(e,t)=>{var n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?va:e.split(`@`)[0],n?`safari-extension:`+t:`safari-web-extension:`+t]:[e,t]},xa=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Sa=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ca=/\((\S*)(?::(\d+))(?::(\d+))\)/,wa=(e,t)=>{var n=xa.exec(e);if(n){var[,r,i,a]=n;return ya(t,r,va,+i,+a)}var o=Sa.exec(e);if(o){if(o[2]&&o[2].indexOf(`eval`)===0){var s=Ca.exec(o[2]);s&&(o[2]=s[1],o[3]=s[2],o[4]=s[3])}var[c,l]=ba(o[1]||va,o[2]);return ya(t,l,c,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}},Ta=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ea=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Da=(e,t)=>{var n=Ta.exec(e);if(n){if(n[3]&&n[3].indexOf(` > eval`)>-1){var r=Ea.exec(n[3]);r&&(n[1]=n[1]||`eval`,n[3]=r[1],n[4]=r[2],n[5]=``)}var i=n[3],a=n[1]||va;return[a,i]=ba(a,i),ya(t,i,a,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},Oa=/\(error: (.*)\)/,ka=class{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var n=Nr(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}}getType(e){return this.isDOMError(e)?`DOMError`:`DOMException`}getValue(e){var t=e.name||(this.isDOMError(e)?`DOMError`:`DOMException`);return e.message?t+`: `+e.message:t}isDOMException(e){return Ur(e,`DOMException`)}isDOMError(e){return Ur(e,`DOMError`)}},Aa=class{match(e){return(e=>e instanceof Error)(e)}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var n=e.message;return String(n.error&&typeof n.error.message==`string`?n.error.message:n)}getStack(e){return e.stacktrace||e.stack||void 0}},ja=class{constructor(){}match(e){return Ur(e,`ErrorEvent`)&&e.error!=null}coerce(e,t){return t.apply(e.error)||{type:`ErrorEvent`,value:e.message,stack:t.syntheticException?.stack,synthetic:!0}}},Ma=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,Na=class{match(e){return typeof e==`string`}coerce(e,t){var[n,r]=this.getInfos(e);return{type:n??`Error`,value:r??e,stack:t.syntheticException?.stack,synthetic:!0}}getInfos(e){var t=`Error`,n=e,r=e.match(Ma);return r&&(t=r[1],n=r[2]),[t,n]}},Pa=[`fatal`,`error`,`warning`,`log`,`info`,`debug`];function Fa(e,t){t===void 0&&(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 Ia=class{match(e){return typeof e==`object`&&!!e}coerce(e,t){var n=this.getErrorPropertyFromObject(e);return n?t.apply(n):{type:this.getType(e),value:this.getValue(e),stack:t.syntheticException?.stack,level:this.isSeverityLevel(e.level)?e.level:`error`,synthetic:!0}}getType(e){return Wr(e)?e.constructor.name:`Error`}getValue(e){if(`name`in e&&typeof e.name==`string`){var t=`'`+e.name+`' captured as exception`;return`message`in e&&typeof e.message==`string`&&(t+=` with message: '`+e.message+`'`),t}if(`message`in e&&typeof e.message==`string`)return e.message;var n=this.getObjectClassName(e);return(n&&n!==`Object`?`'`+n+`'`:`Object`)+` captured as exception with keys: `+Fa(e)}isSeverityLevel(e){return Nr(e)&&!Pr(e)&&Pa.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if({}.hasOwnProperty.call(e,t)){var n=e[t];if(ia(n))return n}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{return}}},La=class{match(e){return Wr(e)}coerce(e,t){var n=e.constructor.name;return{type:n,value:n+` captured as exception with keys: `+Fa(e),stack:t.syntheticException?.stack,synthetic:!0}}},Ra=class{match(e){return Hr(e)}coerce(e,t){return{type:`Error`,value:`Primitive value captured as exception: `+String(e),stack:t.syntheticException?.stack,synthetic:!0}}},za=class{match(e){return Ur(e,`PromiseRejectionEvent`)||this.isCu
10stomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!Wr(e))return!1;try{var t=e.detail;return typeof t==`object`&&!!t&&`reason`in t}catch{return!1}}coerce(e,t){var n=this.getUnhandledRejectionReason(e);return Hr(n)?{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: `+String(n),stack:t.syntheticException?.stack,synthetic:!0}:t.apply(n)}getUnhandledRejectionReason(e){try{if(`reason`in e)return e.reason;if(`detail`in e&&e.detail!=null&&typeof e.detail==`object`&&`reason`in e.detail)return e.detail.reason}catch{}return e}},Ba=`$message`,Va=`$timestamp`,Ha=new Set([Ba,Va]),Ua={enabled:!0,max_bytes:32768};function Wa(e){return e?{enabled:e.enabled??Ua.enabled,max_bytes:Ka(e.max_bytes,Ua.max_bytes)}:L({},Ua)}var Ga=class{constructor(e){this.bt=[],this._t=0,this.Se=Wa(e)}setConfig(e){this.Se=Wa(e),this.wt()}add(e){var t=function(e){var t=function(e){var t=new WeakSet;try{return JSON.stringify(e,((e,n)=>{if(typeof n==`bigint`)return n.toString();if(typeof n!=`function`&&typeof n!=`symbol`){if(n instanceof Date)return n.toISOString();if(n instanceof Error)return{name:n.name,message:n.message,stack:n.stack};if(n&&typeof n==`object`){if(t.has(n))return`[Circular]`;t.add(n)}return n}}))}catch{return}}(e);if(t)try{var n=JSON.parse(t);if(!jr(n))return;var r=n,i=r[Ba],a=r[Va];return!Nr(i)||i.trim().length===0||!Nr(a)&&!Ir(a)?void 0:{step:r,json:t}}catch{return}}(e);if(t){var n=function(e){if(typeof TextEncoder<`u`)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.Se.max_bytes||(this.bt.push({step:t.step,bytes:n}),this._t+=n,this.wt())}}getAttachable(){return this.bt.map((e=>e.step))}clear(){this.bt=[],this._t=0}size(){return this.bt.length}wt(){for(;this._t>this.Se.max_bytes&&this.bt.length>0;){var e=this.bt.shift();e&&(this._t-=e.bytes)}}};function Ka(e,t){if(!Ir(e)||e===1/0||e===-1/0)return t;var n=Math.floor(e);return 0>n?t:n}var qa=function(e,t){var{debugEnabled:n}=t===void 0?{}:t,r={k(t){if(P&&(ar.DEBUG||I.POSTHOG_DEBUG||n)&&!B(P.console)&&P.console){for(var r=(`__rrweb_original__`in P.console[t])?P.console[t].__rrweb_original__:P.console[t],i=arguments.length,a=Array(i>1?i-1:0),o=1;i>o;o++)a[o-1]=arguments[o];r(e,...a)}},debug(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k(`debug`,...t)},info(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k(`log`,...t)},warn(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k(`warn`,...t)},error(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k(`error`,...t)},critical(){for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];console.error(e,...n)},uninitializedWarning(e){r.error(`You must initialize PostHog before calling `+e)},createLogger:(t,n)=>qa(e+` `+t,n)};return r},H=qa(`[PostHog.js]`),Ja=H.createLogger,Ya=Ja(`[ExternalScriptsLoader]`),Xa=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return Ya.warn(t+` was requested but loading of external scripts is disabled.`),n(`Loading of external scripts is disabled`);var r=F?.querySelectorAll(`script`);if(r){for(var i,a=function(){if(r[o].src===t){var e=r[o];return e.__posthog_loading_callback_fired?{v:n()}:(e.addEventListener(`load`,(t=>{e.__posthog_loading_callback_fired=!0,n(void 0,t)})),e.onerror=e=>n(e),{v:void 0})}},o=0;r.length>o;o++)if(i=a())return i.v}var s=()=>{if(!F)return n(`document not found`);var r=F.createElement(`script`);if(r.type=`text/javascript`,r.crossOrigin=`anonymous`,r.src=t,r.onload=e=>{r.__posthog_loading_callback_fired=!0,n(void 0,e)},r.onerror=e=>n(e),e.config.prepare_external_dependency_script&&(r=e.config.prepare_external_dependency_script(r)),!r)return n(`prepare_external_dependency_script returned null`);if(e.config.external_scripts_inject_target===`head`)F.head.appendChild(r);else{var i,a=F.querySelectorAll(`body > script`);a.length>0?(i=a[0].parentNode)==null||i.insertBefore(r,a[0]):F.body.appendChild(r)}};
10F!=null&&F.body?s():F?.addEventListener(`DOMContentLoaded`,s)};I.__PosthogExtensions__=I.__PosthogExtensions__||{},I.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{if(t!==`remote-config`){var r;if(e.config.strict_script_versioning)r=e.requestRouter.endpointFor(`assets`,`/static/`+e.version+`/`+t+`.js`);else{var i=`/static/`+t+`.js?v=`+e.version;if(t===`toolbar`){var a=3e5;i=i+`&t=`+Math.floor(Date.now()/a)*a}r=e.requestRouter.endpointFor(`assets`,i)}Xa(e,r,n)}else Xa(e,e.requestRouter.endpointFor(`assets`,`/array/`+e.config.token+`/config.js`),n)},I.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{Xa(e,e.requestRouter.endpointFor(`api`,t),n)};var Za=`$people_distinct_id`,Qa=`$device_id`,$a=`__alias`,eo=`__timers`,to=`$autocapture_disabled_server_side`,no=`$heatmaps_enabled_server_side`,ro=`$exception_capture_enabled_server_side`,io=`$error_tracking_suppression_rules`,ao=`$error_tracking_capture_extension_exceptions`,oo=`$web_vitals_enabled_server_side`,so=`$dead_clicks_enabled_server_side`,co=`$product_tours_enabled_server_side`,lo=`$web_vitals_allowed_metrics`,uo=`$session_recording_remote_config`,fo=`$replay_sample_rate`,po=`$replay_override_sampling`,mo=`$replay_override_linked_flag`,ho=`$replay_override_url_trigger`,go=`$replay_override_event_trigger`,_o=`$sesid`,vo=`$session_is_sampled`,yo=`$enabled_feature_flags`,bo=`$active_feature_flags`,xo=`$early_access_features`,So=`$feature_flag_details`,Co=`$feature_flag_payloads`,wo=`$feature_flag_request_id`,To=`$override_feature_flags`,Eo=`$override_feature_flag_payloads`,Do=`$stored_person_properties`,Oo=`$stored_group_properties`,ko=`$surveys`,Ao=`$surveys_loaded_at`,jo=`$surveys_activated`,Mo=`ph_product_tours`,No=`$flag_call_reported`,Po=`$flag_call_reported_session_id`,Fo=`$feature_flag_errors`,Io=`$feature_flag_evaluated_at`,Lo=`$user_state`,Ro=`$client_session_props`,zo=`$capture_rate_limit`,Bo=`$initial_campaign_params`,Vo=`$initial_referrer_info`,Ho=`$initial_person_info`,Uo=`$epp`,Wo=`__POSTHOG_TOOLBAR__`,Go=`$posthog_cookieless`,Ko=`$sdk_debug_extensions_init_method`,qo=`$sdk_debug_extensions_init_time_ms`,Jo=`$sdk_debug_recording_script_not_loaded`,Yo=`PostHog loadExternalDependency extension not found.`,Xo=`on_reject`,Zo=`always`,Qo=`anonymous`,$o=`identified`,es=`identified_only`,ts=`visibilitychange`,ns=`beforeunload`,rs=`$pageview`,is=`$pageleave`,as=`$identify`,os=`$groupidentify`;function ss(e,t){z(e)&&e.forEach(t)}function cs(e,t){if(!V(e))if(z(e))e.forEach(t);else if(zr(e))e.forEach(((e,n)=>t(e,n)));else for(var n in e)Or.call(e,n)&&t(e[n],n)}var ls=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];for(var i of n)for(var a in i)i[a]!==void 0&&(e[a]=i[a]);return e};function us(e){for(var t=Object.keys(e),n=t.length,r=Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var ds=function(e){try{return e()}catch{return}},fs=function(e){return function(){try{for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,n)}catch(e){H.critical(`Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A.`),H.critical(e)}}},ps=function(e){var t={};return cs(e,(function(e,n){(Nr(e)&&e.length>0||Ir(e))&&(t[n]=e)})),t},ms=[`herokuapp.com`,`vercel.app`,`netlify.app`];function hs(e){var t=e?.hostname;if(!Nr(t))return!1;var n=t.split(`.`).slice(-2).join(`.`);for(var r of ms)if(n===r)return!1;return!0}function gs(e,t,n,r){var{capture:i=!1,passive:a=!0}=r??{};e?.addEventListener(t,n,{capture:i,passive:a})}function _s(e){return e.name===`ph_toolbar_internal`}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Ir(e)&&isFinite(e)&&Math.floor(e)===e});var vs=class e{constructor(e){if(this.bytes=e,e.length!==16)throw TypeError(`not 128-bit length`)}static fromFieldsV7(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 RangeError(`invalid field value`);var a=new Uint8Array(16);return a[0]=t/2**40,a[1]=t/2**32,a[2]=t/2**24,a[3]=t/2**16,a[4]=t/2**8,a[5]=t,a[6]=112|n>>>8,a[7]=n,a[8]=128|r>>>24,a[9]=r>>>16,a[10]=r>>>8,a[11]=r,a[12]=i>>>24,a[13]=i>>>16,a[14]=i>>>8,a[15]=i,new e(a)}toString(){for(var e=``,t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),t!==3&&t!==5&&t!==7&&t!==9||(e+=`-`);
10if(e.length!==36)throw Error(`Invalid UUIDv7 was generated`);return e}clone(){return new e(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var t=0;16>t;t++){var n=this.bytes[t]-e.bytes[t];if(n!==0)return Math.sign(n)}return 0}},ys=class{constructor(){this.S=0,this.C=0,this.I=new Ss}generate(){var e=this.generateOrAbort();if(B(e)){this.S=0;var t=this.generateOrAbort();if(B(t))throw Error(`Could not generate UUID after timestamp reset`);return t}return e}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.M();else{if(this.S>=e+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.M())}return vs.fromFieldsV7(this.S,Math.trunc(this.C/2**30),this.C&2**30-1,this.I.nextUint32())}M(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}},bs,xs=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<`u`&&UUIDV7_DENY_WEAK_RNG)throw 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};P&&!B(P.crypto)&&crypto.getRandomValues&&(xs=e=>crypto.getRandomValues(e));var Ss=class{constructor(){this.R=new Uint32Array(8),this.O=1/0}nextUint32(){return this.R.length>this.O||(xs(this.R),this.O=0),this.R[this.O++]}},Cs=()=>ws().toString(),ws=()=>(bs||=new ys).generate(),Ts=``,Es=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,Ds={N:()=>!!F,D(e){H.error(`cookieStore error: `+e)},P(e){if(F){try{for(var t=e+`=`,n=F.cookie.split(`;`).filter((e=>e.length)),r=0;n.length>r;r++){for(var i=n[r];i.charAt(0)==` `;)i=i.substring(1,i.length);if(i.indexOf(t)===0)return decodeURIComponent(i.substring(t.length,i.length))}}catch{}return null}},F(e){var t;try{t=JSON.parse(Ds.P(e))||{}}catch{}return t},q(e,t,n,r,i){if(!F)return!1;try{var a=``,o=``,s=function(e,t){if(t){var n=function(e,t){if(t===void 0&&(t=F),Ts)return Ts;if(!t||[`localhost`,`127.0.0.1`].includes(e))return``;for(var n=e.split(`.`),r=Math.min(n.length,8),i=`dmn_chk_`+Cs();!Ts&&r--;){var a=n.slice(r).join(`.`),o=i+`=1;domain=.`+a+`;path=/`;t.cookie=o+`;max-age=3`,t.cookie.includes(i)&&(t.cookie=o+`;max-age=0`,Ts=a)}return Ts}(e);if(!n){var r=(e=>{var t=e.match(Es);return t?t[0]:``})(e);r!==n&&H.info(`Warning: cookie subdomain discovery mismatch`,r,n),n=r}return n?`; domain=.`+n:``}return``}(F.location.hostname,r);if(n){var c=new Date;c.setTime(c.getTime()+864e5*n),a=`; expires=`+c.toUTCString()}i&&(o=`; secure`);var l=e+`=`+encodeURIComponent(JSON.stringify(t))+a+`; SameSite=Lax; path=/`+s+o;return l.length>3686.4&&H.warn(`cookieStore warning: large cookie, len=`+l.length),F.cookie=l,!0}catch{return!1}},A(e,t){if(F!=null&&F.cookie)try{Ds.q(e,``,-1,t)}catch{return}}},Os=null,ks={N(){if(!Fr(Os))return Os;var e=!0;if(B(P))e=!1;else try{var t=`__mplssupport__`;ks.q(t,`xyz`),ks.P(t)!==`"xyz"`&&(e=!1),ks.A(t)}catch{e=!1}return e||H.error(`localStorage unsupported; falling back to cookie store`),Os=e,e},D(e){H.error(`localStorage error: `+e)},P(e){try{return P?.localStorage.getItem(e)}catch(e){ks.D(e)}return null},F(e){try{return JSON.parse(ks.P(e))||{}}catch{}return null},q(e,t){try{return P?.localStorage.setItem(e,JSON.stringify(t)),!0}catch(e){ks.D(e)}return!1},A(e){try{P?.localStorage.removeItem(e)}catch(e){ks.D(e)}}},As=[Qa,`distinct_id`,_o,vo,Uo,Ho,Lo],js={},Ms={N:()=>!0,D(e){H.error(`memoryStorage error: `+e)},P:e=>js[e]||null,F:e=>js[e]||null,q:(e,t)=>(js[e]=t,!0),A(e){delete js[e]}},Ns=null,Ps={N(){if(!Fr(Ns))return Ns;if(Ns=!0,B(P))Ns=!1;else try{var e=`__support__`;Ps.q(e,`xyz`),Ps.P(e)!==`"xyz"`&&(Ns=!1),Ps.A(e)}catch{Ns=!1}return Ns},D(e){H.error(`sessionStorage error: `,e)},P(e){try{return P?.sessionStorage.getItem(e)}catch(e){Ps.D(e)}return null},F(e){try{return JSON.parse(Ps.P(e))||null}catch{}return null},q(e,t){try{return P?.sessionStorage.setItem(e,JSON.stringify(t)),!0}catch(e){Ps.D(e)}return!1},A(e){try{P?.sessionStorage.removeItem(e)}catch(e){Ps.D(e)}}},Fs=class{constructor(e){this._instance=e}get Se(){return this._instance.config}get consent(){return this.kt()?0:this.St}
10isOptedOut(){return this.Se.cookieless_mode===Zo||this.isRejected()||this.consent===-1&&this.Se.cookieless_mode===Xo}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.Se.opt_out_capturing_by_default}optInOut(e){this.Ct.q(this.It,+!!e,this.Se.cookie_expiration,this.Se.cross_subdomain_cookie,this.Se.secure_cookie)}reset(){this.Ct.A(this.It,this.Se.cross_subdomain_cookie)}get It(){var{token:e,opt_out_capturing_cookie_prefix:t,consent_persistence_name:n}=this._instance.config;return n||(t?t+e:`__ph_opt_in_out_`+e)}get St(){var e=this.Ct.P(this.It);return Kr(e)?1:R(qr,e)?0:-1}get Ct(){var e=this.Se.opt_out_capturing_persistence_type,t=e===`localStorage`?ks:Ds;if(!this.Tt||this.Tt!==t){this.Tt=t;var n=e===`localStorage`?Ds:ks;n.P(this.It)&&(this.Tt.P(this.It)||this.optInOut(Kr(n.P(this.It))),n.A(this.It,this.Se.cross_subdomain_cookie))}return this.Tt}kt(){return!!this.Se.respect_dnt&&[Zn?.doNotTrack,Zn?.msDoNotTrack,I.doNotTrack].some((e=>Kr(e)))}},Is=1,Ls=3,Rs=11;function zs(e){return e instanceof Element&&(e.id===Wo||!(e.closest==null||!e.closest(`.toolbar-global-fade-container`)))}function Bs(e){return!!e&&e.nodeType===Is}function Vs(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Hs(e){return!!e&&e.nodeType===Ls}function Us(e){return!!e&&e.nodeType===Rs&&Bs(e.host)}function Ws(e){return e?Tr(e).split(/\s+/):[]}function Gs(e){var t=P?.location.href;return!!(t&&e&&e.some((e=>t.match(e))))}function Ks(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 Ws(t)}function qs(e){return V(e)?null:Tr(e).split(/(\s+)/).filter((e=>gc(e))).join(``).replace(/[\r\n]/g,` `).replace(/[ ]+/g,` `).substring(0,255)}function Js(e){var t=``;return cc(e)&&!lc(e)&&e.childNodes&&e.childNodes.length&&cs(e.childNodes,(function(e){Hs(e)&&e.textContent&&(t+=qs(e.textContent)??``)})),Tr(t)}function Ys(e){return B(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var Xs=[`a`,`button`,`form`,`input`,`select`,`textarea`,`label`];function Zs(e,t){if(B(t))return!0;var n,r=function(e){if(t.some((t=>function(e,t){var n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;try{return!!n&&n.call(e,t)}catch{return!1}}(e,t))))return{v:!0}};for(var i of e)if(n=r(i))return n.v;return!1}function Qs(e){var t=e.parentNode;return!(!t||!Bs(t))&&t}var $s=[`.ph-no-autocapture`,`[data-ph-no-autocapture]`],ec=[`next`,`previous`,`prev`,`>`,`<`],tc=[...ec,`+`,`-`,`−`,`–`],nc=(e,t)=>/[a-z0-9]/i.test(t)?e.includes(t):e===t,rc=[`.ph-no-rageclick`,`.ph-no-capture`],ic=[``,`text`,`search`,`email`,`password`,`url`,`tel`,`number`];function ac(e,t){if(!P||oc(e))return!1;var n,r,i,a;if(Rr(t)?(n=!!t&&rc,r=void 0,i=!1):(n=t?.css_selector_ignorelist??rc,r=t?.content_ignorelist,i=(a=t?.ignore_text_selection)!=null&&a),!1===n||i&&function(e){return!(!e||!Bs(e))&&(!!Vs(e,`textarea`)||(Vs(e,`input`)?R(ic,(e.getAttribute(`type`)||``).toLowerCase()):function(e){if(e.isContentEditable)return!0;var t=e.getAttribute==null?void 0:e.getAttribute(`contenteditable`);return t===`true`||t===``}(e)))}(e))return!1;var{targetElementList:o}=sc(e,!1);return!function(e,t){if(!1===e||B(e))return!1;var n;if(!0===e)n=ec;else{if(!z(e))return!1;if(e.length>10)return H.error(`[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching.`),!1;n=e.map((e=>e.toLowerCase()))}return t.some((e=>{var{safeText:t,ariaLabel:r}=e;return n.some((e=>nc(t,e)||nc(r,e)))}))}(r,o.map((e=>({safeText:Js(e).toLowerCase(),ariaLabel:e.getAttribute(`aria-label`)?.toLowerCase().trim()||``}))))&&!Zs(o,n)}var oc=e=>!e||Vs(e,`html`)||!Bs(e),sc=(e,t)=>{if(!P||oc(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],i=e;i.parentNode&&!Vs(i,`body`);)if(Us(i.parentNode))r.push(i.parentNode.host),i=i.parentNode.host;else{var a=Qs(i);if(!a)break;if(t||Xs.indexOf(a.tagName.toLowerCase())>-1)n=!0;else{var o=P.getComputedStyle(a);o&&o.getPropertyValue(`cursor`)===`pointer`&&(n=!0)}r.push(a),i=a}return{parentIsUsefulElement:n,targetElementList:r}};function cc(e){for(var t=e;t.parentNode&&!Vs(t,`body`);t=t.parentNode){var n=Ks(t);if(R(n,`ph-sensitive`)||R(n,`ph-no-capture`))return!1}if(R(Ks(e),`ph-include`))return!0;var r=e.type||``;if(Nr(r))switch(r.toLowerCase()){case`hidden`:case`password`:return!1}
10var i=e.name||e.id||``;return!Nr(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 lc(e){return!!(Vs(e,`input`)&&![`button`,`checkbox`,`submit`,`reset`].includes(e.type)||Vs(e,`select`)||Vs(e,`textarea`)||e.getAttribute(`contenteditable`)===`true`)}var uc=`(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})`,dc=RegExp(`^(?:`+uc+`)$`),fc=new RegExp(uc),pc=`\\d{3}-?\\d{2}-?\\d{4}`,mc=RegExp(`^(`+pc+`)$`),hc=RegExp(`(`+pc+`)`);function gc(e,t){return t===void 0&&(t=!0),!(V(e)||Nr(e)&&(e=Tr(e),(t?dc:fc).test((e||``).replace(/[- ]/g,``))||(t?mc:hc).test(e)))}function _c(e){var t=Js(e);return gc(t=(t+` `+vc(e)).trim())?t:``}function vc(e){var t=``;return e&&e.childNodes&&e.childNodes.length&&cs(e.childNodes,(function(e){if(e&&e.tagName?.toLowerCase()===`span`)try{var n=Js(e);t=(t+` `+n).trim(),e.childNodes&&e.childNodes.length&&(t=(t+` `+vc(e)).trim())}catch(e){H.error(`[AutoCapture]`,e)}})),t}function yc(e){return e.replace(/"|\\"/g,`\\"`)}function bc(e){var t=e.attr__class;return t?z(t)?t:Ws(t):void 0}var xc=Ja(`[Dead Clicks]`),Sc=()=>!0,Cc=e=>{var t,n=!((t=e.instance.persistence)==null||!t.get_property(so)),r=e.instance.config.capture_dead_clicks;return Rr(r)?r:!!jr(r)||n},wc=class{get lazyLoadedDeadClicksAutocapture(){return this.Et}constructor(e,t,n){this.instance=e,this.isEnabled=t,this.onCapture=n,this.startIfEnabledOrStop()}onRemoteConfig(e){`captureDeadClicks`in e&&(this.instance.persistence&&this.instance.persistence.register({[so]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.Mt((()=>{this.Pt()})):this.stop()}Mt(e){var t,n;(t=I.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture?e():(n=I.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this.instance,`dead-clicks-autocapture`,(t=>{t?xc.error(`failed to load script`,t):e()}))}Pt(){var e;if(F){if(!this.Et&&(e=I.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var t=jr(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.Et=I.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.Et.start(F),xc.info(`starting...`)}}else xc.error("`document` not found. Cannot start.")}stop(){this.Et&&(this.Et.stop(),this.Et=void 0,xc.info(`stopping...`))}},Tc=Ja(`[SegmentIntegration]`),Ec=`posthog-js`;function Dc(e,t){var{organization:n,projectId:r,prefix:i,severityAllowList:a=[`error`],sendExceptionsToPostHog:o=!0}=t===void 0?{}:t;return t=>{if(a!==`*`&&!a.includes(t.level)||!e.__loaded)return t;t.tags||={};var s=e.requestRouter.endpointFor(`ui`,`/project/`+e.config.token+`/person/`+e.get_distinct_id());t.tags[`PostHog Person URL`]=s,e.sessionRecordingStarted()&&(t.tags[`PostHog Recording URL`]=e.get_session_replay_url({withTimestamp:!0}));var c,l=t.exception?.values||[],u=l.map((e=>L({},e,{stacktrace:e.stacktrace?L({},e.stacktrace,{type:`raw`,frames:(e.stacktrace.frames||[]).map((e=>L({},e,{platform:`web:javascript`})))}):void 0}))),d={$exception_message:l[0]?.value||t.message,$exception_type:l[0]?.type,$exception_level:t.level,$exception_list:u,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:l[0]?.value||t.message,$sentry_exception_type:l[0]?.type,$sentry_tags:t.tags};return n&&r&&(d.$sentry_url=(i||`https://sentry.io/organizations/`)+n+`/issues/?project=`+r+`&query=`+t.event_id),o&&((c=e.exceptions)==null||c.sendExceptionEvent(d)),t}}var Oc=class{constructor(e,t,n,r,i,a){this.name=Ec,this.setupOnce=function(o){o(Dc(e,{organization:t,projectId:n,prefix:r,severityAllowList:i,sendExceptionsToPostHog:a==null||a}))}}},kc=class{constructor(e){this.Rt=(e,t,n)=>{n&&(n.noSessionId||n.activityTimeout||n.sessionPastMaximumLength||n.crossTabAdoption)&&(H.info(`[PageViewManager] Session rotated, clearing pageview state`,{sessionId:e,changeReason:n}),this.Ot=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.Lt()}Lt(){this.Ft=this._instance.sessionManager?.onSessionId(this.Rt)}destroy(){var e;(e=this.Ft)==null||e.call(this),this.Ft=void 0}doPageView(e,t){var n=this.At(e,t);return this.Ot={pathname:P?.location.pathname??``,pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),n}doPageLeave(e){return this.At(e,this.Ot?.pageViewId)}doEvent(){return{$pageview_id:this.Ot?.pageViewId}}At(e,t){var n=this.Ot;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{maxScrollHeight:a,lastScrollY:o,maxScrollY:s,maxContentHeight:c,lastContentY:l,maxContentY:u}=i;if(!(B(a)||B(o)||B(s)||B(c)||B(l)||B(u))){a=Math.ceil(a),o=Math.ceil(o),s=Math.ceil(s),c=Math.ceil(c),l=Math.ceil(l),u=Math.ceil(u);var d=a>1?Jr(o/a,0,1,H):1,f=a>1?Jr(s/a,0,1,H):1,p=c>1?Jr(l/c,0,1,H):1,m=c>1?Jr(u/c,0,1,H):1;r=ls(r,{$prev_pageview_last_scroll:o,$prev_pageview_last_scroll_percentage:d,$prev_pageview_max_scroll:s,$prev_pageview_max_scroll_percentage:f,$prev_pageview_last_content:l,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:u,$prev_pageview_max_content_percentage:m})}}return n.pathname&&(r.$prev_pageview_pathname=n.pathname),n.timestamp&&(r.$prev_pageview_duration=(e.getTime()-n.timestamp.getTime())/1e3),r}}
10,Ac=[`flags`,`surveys`],jc={[Za]:{exposure:`hidden`},[$a]:{exposure:`hidden`},__cmpns:{exposure:`hidden`},[eo]:{exposure:`hidden`},[to]:{exposure:`event`},[no]:{exposure:`hidden`},[ro]:{exposure:`event`},[io]:{exposure:`hidden`},[ao]:{exposure:`event`},[oo]:{exposure:`event`},[so]:{exposure:`event`},[co]:{exposure:`hidden`},[lo]:{exposure:`event`},[uo]:{exposure:`hidden`},$session_recording_enabled_server_side:{exposure:`hidden`},[_o]:{exposure:`hidden`},[vo]:{exposure:`event`},[fo]:{exposure:`event`,shouldSkipFromEventProperties:e=>Fr(e)},$session_past_minimum_duration:{exposure:`event`},$session_recording_url_trigger_activated_session:{exposure:`event`},$session_recording_event_trigger_activated_session:{exposure:`event`},$debug_first_full_snapshot_timestamp:{exposure:`event`},$sess_rec_flush_size:{exposure:`hidden`},[yo]:{exposure:`derived`,storageGroup:`flags`,shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!jr(e))return{};for(var t={},n=Object.keys(e),r=0;n.length>r;r++)t[`$feature/`+n[r]]=e[n[r]];return t}},[bo]:{exposure:`event`,storageGroup:`flags`}
10,[xo]:{exposure:`hidden`},[So]:{exposure:`hidden`,storageGroup:`flags`},[Co]:{exposure:`event`,storageGroup:`flags`},[wo]:{exposure:`event`,storageGroup:`flags`,volatile:!0},[To]:{exposure:`event`},[Eo]:{exposure:`hidden`},[Do]:{exposure:`hidden`},[Oo]:{exposure:`hidden`},[ko]:{exposure:`hidden`,storageGroup:`surveys`},[Ao]:{exposure:`hidden`,storageGroup:`surveys`,volatile:!0},[jo]:{exposure:`event`},[Mo]:{exposure:`hidden`},$product_tours_activated:{exposure:`hidden`},$conversations_widget_session_id:{exposure:`event`},$conversations_ticket_id:{exposure:`event`},$conversations_widget_state:{exposure:`event`},$conversations_user_traits:{exposure:`event`},[No]:{exposure:`hidden`},[Po]:{exposure:`hidden`},[Fo]:{exposure:`hidden`},[Io]:{exposure:`hidden`,storageGroup:`flags`,volatile:!0},[Lo]:{exposure:`hidden`},[Ro]:{exposure:`hidden`},[zo]:{exposure:`hidden`},[Bo]:{exposure:`hidden`},[Vo]:{exposure:`hidden`},[Ho]:{exposure:`hidden`},[Uo]:{exposure:`hidden`},[po]:{exposure:`event`},[mo]:{exposure:`event`},[ho]:{exposure:`event`},[go]:{exposure:`event`},[Ko]:{exposure:`event`},[qo]:{exposure:`event`},[Jo]:{exposure:`event`},$sdk_debug_replay_event_trigger_status:{exposure:`event`},$sdk_debug_replay_linked_flag_trigger_status:{exposure:`event`},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:`event`},$sdk_debug_replay_remote_trigger_matching_config:{exposure:`event`},$sdk_debug_replay_trigger_groups_count:{exposure:`event`},$sdk_debug_replay_url_trigger_status:{exposure:`event`},$session_recording_start_reason:{exposure:`event`}},Mc=[[`$posthog_sr_group_event_trigger_`,{exposure:`hidden`}],[`$posthog_sr_group_url_trigger_`,{exposure:`hidden`}],[`$posthog_sr_group_sampling_`,{exposure:`hidden`}]],Nc=e=>{var t=jc[e];if(t)return t;for(var[n,r]of Mc)if(e.indexOf(n)===0)return r},Pc=e=>{var t=F?.createElement(`a`);return B(t)?null:(t.href=e,t)},Fc=function(e,t){for(var n,r=((e.split(`#`)[0]||``).split(/\?(.*)/)[1]||``).replace(/^\?+/g,``).split(`&`),i=0;r.length>i;i++){var a=r[i].split(`=`);
10if(a[0]===t){n=a;break}}if(!z(n)||2>n.length)return``;var o=n[1];try{o=decodeURIComponent(o)}catch{H.error(`Skipping decoding for malformed query param: `+o)}return o.replace(/\+/g,` `)},Ic=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split(`#`),i=r[1],a=(r[0]||``).split(`?`),o=a[1],s=a[0],c=(o||``).split(`&`),l=[],u=0;c.length>u;u++){var d=c[u].split(`=`);z(d)&&(t.includes(d[0])?l.push(d[0]+`=`+n):l.push(c[u]))}var f=s;return o!=null&&(f+=`?`+l.join(`&`)),i!=null&&(f+=`#`+i),f},Lc=function(e,t){var n=e.match(RegExp(t+`=([^&]*)`));return n?n[1]:null},Rc=`https?://(.*)`,zc=[`gclid`,`gclsrc`,`dclid`,`gbraid`,`wbraid`,`fbclid`,`msclkid`,`twclid`,`li_fat_id`,`igshid`,`ttclid`,`rdt_cid`,`epik`,`qclid`,`sccid`,`irclid`,`_kx`],Bc=[`utm_source`,`utm_medium`,`utm_campaign`,`utm_content`,`utm_term`,`gad_source`,`mc_cid`,...zc],Vc=`<masked>`,Hc=[`li_fat_id`];function Uc(e,t,n){if(!F)return{};var r,i=t?[...zc,...n||[]]:[],a=Wc(Ic(F.URL,i,Vc),e);return ls((r={},cs(Hc,(function(e){var t=Ds.P(e);r[e]=t||null})),r),a)}function Wc(e,t){var n=Bc.concat(t||[]),r={};return cs(n,(function(t){r[t]=Fc(e,t)||null})),r}function Gc(e){var t=function(e){return e?e.search(Rc+`google.([^/?]*)`)===0?`google`:e.search(Rc+`bing.com`)===0?`bing`:e.search(Rc+`yahoo.com`)===0?`yahoo`:e.search(Rc+`duckduckgo.com`)===0?`duckduckgo`:null:null}(e),n=t==`yahoo`?`p`:`q`,r={};if(!Fr(t)){r.$search_engine=t;var i=F?Fc(F.referrer,n):``;i.length&&(r.ph_keyword=i)}return r}function Kc(){return navigator.language||navigator.userLanguage}var qc=`$direct`;function Jc(){return F?.referrer||qc}function Yc(e,t,n){n===void 0&&(n=!1);var r=e?[...zc,...t||[]]:[],i=(n?na(Qn?.href):Qn?.href)?.substring(0,1e3);return{r:Jc().substring(0,1e3),u:i?Ic(i,r,Vc):void 0}}function Xc(e,t){t===void 0&&(t=!1);var{r:n,u:r}=e,i=t?na(r):r,a={$referrer:n,$referring_domain:n==null?void 0:n==qc?qc:Pc(n)?.host};if(i){a.$current_url=i;var o=Pc(i);a.$host=o?.host,a.$pathname=o?.pathname,ls(a,Wc(i))}return n&&ls(a,Gc(n)),a}function Zc(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function Qc(){try{return new Date().getTimezoneOffset()}catch{return}}var $c={flags:Io,surveys:Ao},el=[`cookie`,`localstorage`,`localstorage+cookie`,`sessionstorage`,`memory`],tl=`main`,nl=class{constructor(e,t,n){if(n===void 0&&(n=!0),this.$t={},this.Dt=!1,this.Nt=!1,this.Se=e,this.qt=n,this.props={},this.Bt=!1,this.jt=(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.Ct=this.Ht(e),this.Nt=this.Ut(e),this.load(),e.debug&&H.info(`Persistence loaded`,e.persistence,L({},this.props)),this.update_config(e,e,t),this.save(),P){var r=()=>this.flush();gs(P,`beforeunload`,r,{capture:!1}),gs(P,`pagehide`,r,{capture:!1})}}zt(){var e=this.Se?.persistence_save_debounce_ms;return Ir(e)&&e>0?e:0}isDisabled(){return!!this.Vt}Ht(e){el.indexOf(e.persistence.toLowerCase())===-1&&(H.critical(`Unknown persistence type `+e.persistence+`; falling back to localStorage+cookie`),e.persistence=`localStorage+cookie`);var t,n=function(e,t){e===void 0&&(e=[]),t===void 0&&(t=!1);var n=[...As,...e];return L({},ks,{F(e){try{var n={};try{n=Ds.F(e)||{}}catch{}var r,i=JSON.parse(ks.P(e)||`{}`);if(t){var a={};for(var o in n){var s=n[o];Fr(s)||s===``||(a[o]=s)}r=ls(i,a)}else r=ls(n,i);return ks.q(e,r),r}catch{}return null},q(e,t,r,i,a,o){var s=ks.q(e,t,void 0,void 0,o);try{var c={};n.forEach((e=>{t[e]&&(c[e]=t[e])})),Object.keys(c).length&&Ds.q(e,c,r,i,a,o)}catch(e){ks.D(e)}return s},A(e,t){try{P?.localStorage.removeItem(e),Ds.A(e,t)}catch(e){ks.D(e)}}})}(e.cookie_persisted_properties||[],e.__preview_cookie_wins_on_conflict||!1),r=!1,i=e.persistence.toLowerCase();return i===`localstorage`&&ks.N()?(t=ks,r=!0):i===`localstorage+cookie`&&n.N()?(t=n,r=!0):i===`sessionstorage`&&Ps.N()?t=Ps:i===`memory`?t=Ms:i===`cookie`?t=Ds:n.N()?(t=n,r=!0):t=Ds,this.Dt=r,t}Wt(e){return this.jt+`__`+e}Ut(e){return this.Dt&&!!e.split_storage}Gt(e){var t=e??this.Se.feature_flag_cache_ttl_ms;if(!t||0>=t)return!1;var n=this.props[Io];return!n||typeof n!=`number`||Date.now()-n>t}properties(){var e={};return cs(this.props,((t,n)=>{var r=Nc(n);if(r?.exposure===`derived`){if(r.shouldSkipFromEventProperties!=null&&r.shouldSkipFromEventProperties(t,n===yo?()=>this.Gt():()=>!1))return;r.transformToEventProperties&&ls(e,r.transformToEventProperties(t))}else if(!r||r.exposure===`event`){if(r!=null&&r.shouldSkipFromEventProperties!=null&&r.shouldSkipFromEventProperties(t,(()=>!1)))return;e[n]=t}})),e}load(){if(!this.Vt){var e=this.Ct.F(this.jt);e&&(this.props=ls({},e)),this.Nt&&this.Zt()}}Zt(){for(var e of Ac){var t=ks.F(this.Wt(e));if(t&&!Mr(t)){var n=this.Qt(e);n.persisted=!0,this.Jt(e)||(n.fingerprint=this.Yt(t,e)),this.Kt(e,t)||ls(this.props,t)}}}Jt(e){return Object.keys(this.props).some((t=>Nc(t)?.storageGroup===e))}Kt(e,t){var n=$c[e];if(!n)return!1;var r=t[n],i=this.props[n];return Ir(r)&&Ir(i)&&i>r}refreshKey(e){if(!this.Vt){var t=this.Nt?Nc(e)?.storageGroup:void 0,n=t?ks.F(this.Wt(t)):this.Ct.F(this.jt);if(n&&e in n)this.Xt(e,n[e]);else{if(t){var r=this.Ct.F(this.jt);if(r&&e in r)return void this.Xt(e,r[e])}this.er(e)}}}save(){if(!this.Vt){var e=this.zt();e>0?B(this.tr)&&(this.tr=setTimeout((()=>{this.tr=void 0,this.rr()}),e)):this.rr()}}flush(){B(this.tr)||(clearTimeout(this.tr),this.tr=void 0,this.rr())}rr(){this.Vt||(this.Nt?this.ir():this.nr(this.Ct,this.jt,this.props,tl))}ir(){var{main:e,groups:t}=this.sr();for(var n of(this.nr(this.Ct,this.jt,e,tl),Ac)){var r,i=t[n];(!Mr(i)||(r=this.$t[n])!=null&&r.persisted)&&this.nr(ks,this.Wt(n),i,n)}}sr(){var e={},t={};for(var n of Ac)t[n]={};return cs(this.props,((n,r)=>{var i=Nc(r)?.storageGroup;i?t[i][r]=n:e[r]=n})),{main:e,groups:t}}Yt(e,t){if(t===tl)return JSON.stringify(e)+`|`+this.ar+`|`+this.lr+`|`+this.ur;var n={};return cs(e,((e,t)=>
10{var r;n[t]=(r=Nc(t))!=null&&r.volatile?`__volatile__`:e})),JSON.stringify(n)}nr(e,t,n,r){var i=this.Qt(r);if(r===tl||i.dirty||B(i.fingerprint)){var a;try{if((a=this.Yt(n,r))===i.fingerprint)return void(i.dirty=!1)}catch{a=void 0}e.q(t,n,this.ar,this.lr,this.ur,this.Se.debug)?(i.dirty=!1,r!==tl&&(i.persisted=!0),B(a)||(i.fingerprint=a)):this.Se.debug&&H.warn(`failed to persist storage entry "`+t+`"; will retry on next save`)}}remove(e){var{keepGroupEntries:t=!1}=e===void 0?{}:e;if(B(this.tr)||(clearTimeout(this.tr),this.tr=void 0),this.Ct.A(this.jt,!1),this.Ct.A(this.jt,!0),!t&&this.qt)for(var n of Ac)ks.A(this.Wt(n));t?delete this.$t[tl]:this.$t={}}clear(){this.remove(),this.props={}}register_once(e,t,n){if(jr(e)){B(t)&&(t=`None`),this.ar=B(n)?this.hr:n;var r=!1;if(cs(e,((e,n)=>{this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.Xt(n,e),r=!0)})),r)return this.save(),!0}return!1}register(e,t){if(jr(e)){this.ar=B(t)?this.hr:t;var n=!1;if(cs(e,((t,r)=>{e.hasOwnProperty(r)&&this.props[r]!==t&&(this.Xt(r,t),n=!0)})),n)return this.save(),!0}return!1}unregister(e){e in this.props&&(this.er(e),this.save())}update_campaign_params(){if(!this.Bt){var e=Uc(this.Se.custom_campaign_params,this.Se.mask_personal_data_properties,this.Se.custom_personal_data_properties);Mr(ps(e))||this.register(e),this.Bt=!0}}update_search_keyword(){var e;this.register((e=F?.referrer)?Gc(e):{})}update_referrer_info(){this.register_once({$referrer:Jc(),$referring_domain:F!=null&&F.referrer&&Pc(F.referrer)?.host||qc},void 0)}set_initial_person_info(){this.props[Bo]||this.props[Vo]||this.register_once({[Ho]:Yc(this.Se.mask_personal_data_properties,this.Se.custom_personal_data_properties,this.Se.disable_capture_url_hashes)},void 0)}get_initial_props(){var e={};cs([Vo,Bo],(t=>{var n=this.props[t];n&&cs(n,(function(t,n){e[`$initial_`+Er(n)]=t}))}));var t=this.props[Ho];return t&&ls(e,function(e,t){t===void 0&&(t=!1);var n=Xc(e,t),r={};return cs(n,(function(e,t){r[`$initial_`+Er(t)]=e})),r}(t,this.Se.disable_capture_url_hashes)),e}safe_merge(e){return cs(this.props,(function(t,n){n in e||(e[n]=t)})),e}update_config(e,t,n){this.hr=this.ar=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!n),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie);var r=e.persistence!==t.persistence||!((e,t)=>{if(e.length!==t.length)return!1;var n=[...e].sort(),r=[...t].sort();return n.every(((e,t)=>e===r[t]))})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[]),i=r?this.Ht(e):this.Ct,a=this.Ut(e);if(r||a!==this.Nt){var o=this.props;this.clear(),this.Ct=i,this.Nt=a,this.props=o,this.save()}}set_disabled(e){this.Vt=e,this.Vt?this.remove():this.save()}set_cross_subdomain(e){e!==this.lr&&(this.lr=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.ur&&(this.ur=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,t){var n=this.props[eo]||{};n[e]=t,this.Xt(eo,n),this.save()}remove_event_timer(e){var t=this.props[eo]||{},n=t[e];return B(n)||(delete t[e],this.Xt(eo,t),this.save()),n}get_property(e){return this.props[e]}set_property(e,t){this.Xt(e,t),this.save()}Xt(e,t){var n;this.props[e]=t,(n=Nc(e))!=null&&n.volatile||this.dr(e)}er(e){delete this.props[e],this.dr(e)}dr(e){var t=Nc(e)?.storageGroup;t&&(this.Qt(t).dirty=!0)}Qt(e){return this.$t[e]||(this.$t[e]={})}},rl={Activation:`events`,Cancellation:`cancelEvents`},il={Popover:`popover`,API:`api`,Widget:`widget`,ExternalSurvey:`external_survey`},al={Once:`once`,Recurring:`recurring`,Always:`always`},ol={SHOWN:`survey shown`,DISMISSED:`survey dismissed`,SENT:`survey sent`,ABANDONED:`survey abandoned`},sl={SURVEY_ID:`$survey_id`,SURVEY_NAME:`$survey_name`,SURVEY_RESPONSE:`$survey_response`,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_QUESTIONS:`$survey_questions`,SURVEY_COMPLETED:`$survey_completed`,PRODUCT_TOUR_ID:`$product_tour_id`,SURVEY_LAST_SEEN_DATE:`$survey_last_seen_date`,SURVEY_LANGUAGE:`$survey_language`},cl={Popover:`popover`,Inline:`inline`},ll={SHOWN:`product tour shown`,DISMISSED:`product tour dismissed`,COMPLETED:`product tour completed`,STEP_SHOWN:`product tour step shown`,STEP_COMPLETED:`product tour step completed`,BUTTON_CLICKED:`product tour button clicked`,STEP_SELECTOR_FAILED:`product tour step selector failed`,BANNER_CONTAINER_SELECTOR_FAILED:`product tour banner container selector failed`,BANNER_ACTION_CLICKED:`product tour banner action clicked`},ul={TOUR_ID:`$product_tour_id`,TOUR_NAME:`$product_tour_name`,TOUR_ITERATION:`$product_tour_iteration`,TOUR_RENDER_REASON:`$product_tour_render_reason`,TOUR_STEP_ID:`$product_tour_step_id`,TOUR_STEP_ORDER:`$product_tour_step_order`,TOUR_STEP_TYPE:`$product_tour_step_type`,TOUR_DISMISS_REASON:`$product_tour_dismiss_reason`,TOUR_BUTTON_TEXT:`$product_tour_button_text`,TOUR_BUTTON_ACTION:`$product_tour_button_action`,TOUR_BUTTON_LINK:`$product_tour_button_link`,TOUR_BUTTON_TOUR_ID:`$product_tour_button_tour_id`,TOUR_STEPS_COUNT:`$product_tour_steps_count`,TOUR_STEP_SELECTOR:`$product_tour_step_selector`,TOUR_STEP_SELECTOR_FOUND:`$product_tour_step_selector_found`,TOUR_STEP_ELEMENT_TAG:`$product_tour_step_element_tag`,TOUR_STEP_ELEMENT_ID:`$product_tour_step_element_id`,TOUR_STEP_ELEMENT_CLASSES:`$product_tour_step_element_classes`,TOUR_STEP_ELEMENT_TEXT:`$product_tour_step_element_text`,TOUR_ERROR:`$product_tour_error`,TOUR_MATCHES_COUNT:`$product_tour_matches_count`,TOUR_FAILURE_PHASE:`$product_tour_failure_phase`,TOUR_WAITED_FOR_ELEMENT:`$product_tour_waited_for_element`,TOUR_WAIT_DURATION_MS:`$product_tour_wait_duration_ms`,TOUR_BANNER_SELECTOR:`$product_tour_banner_selector`,TOUR_LINKED_SURVEY_ID:`$product_tour_linked_survey_id`,USE_MANUAL_SELECTOR:`$use_manual_selector`,INFERENCE_DATA_PRESENT:`$inference_data_present`,TOUR_LAST_SEEN_DATE:`$product_tour_last_seen_date`,TOUR_TYPE:`$product_tour_type`},dl=Ja(`[RateLimiter]`),fl=class{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;
10if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach((e=>{dl.info((e||`events`)+` is quota limited.`),this.serverLimits[e]=new Date().getTime()+6e4}))}catch(e){dl.warn(`could not rate limit - continuing. Error: "`+e?.message+`"`,{text:t});return}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){return this.instance.config.rate_limiting?.events_per_second||10}get captureEventsBurstLimit(){return Math.max(this.instance.config.rate_limiting?.events_burst_limit||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){var t;e===void 0&&(e=!1);var{captureEventsBurstLimit:n,captureEventsPerSecond:r}=this,i=new Date().getTime(),a=this.instance.persistence?.get_property(zo)??{tokens:n,last:i};a.tokens+=(i-a.last)/1e3*r,a.last=i,a.tokens>n&&(a.tokens=n);var o=1>a.tokens;return o||e||(a.tokens=Math.max(0,a.tokens-1)),!o||this.lastEventRateLimited||e||this.instance.capture(`$$client_ingestion_warning`,{$$client_ingestion_warning_message:`posthog-js client rate limited. Config is set to `+r+` events per second and `+n+` events burst limit.`},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=o,(t=this.instance.persistence)==null||t.set_property(zo,a),{isRateLimited:o,remainingTokens:a.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||`events`]||!1;return!1!==t&&new Date().getTime()<t}},pl=Ja(`[RemoteConfig]`),ml=class{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=I._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}cr(e){var t,n;(t=I.__PosthogExtensions__)!=null&&t.loadExternalDependency?(n=I.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,`remote-config`,(()=>e(this.remoteConfig))):e()}vr(e){this._instance._send_request({method:`GET`,url:this._instance.requestRouter.endpointFor(`assets`,`/array/`+this._instance.config.token+`/config`),callback(t){e(t.json)}})}load(){try{if(this.remoteConfig)return pl.info(`Using preloaded remote config`,this.remoteConfig),this.pr(this.remoteConfig),void this.gr();if(this._instance.mr())return void pl.warn(`Remote config is disabled. Falling back to local config.`);this.cr((e=>{if(!e)return pl.info(`No config found after loading remote JS config. Falling back to JSON.`),void this.vr((e=>{this.pr(e),this.gr()}));this.pr(e),this.gr()}))}catch(e){pl.error(`Error loading remote config`,e)}}stop(){this.yr&&=(clearInterval(this.yr),void 0)}refresh(){!this._instance.mr()&&F&&F.visibilityState!==`hidden`&&this._instance.reloadFeatureFlags()}gr(){if(!this.yr){var e=this._instance.config.remote_config_refresh_interval_ms??3e5;e!==0&&(this.yr=setInterval((()=>{this.refresh()}),e))}}pr(e){var t;e||pl.error(`Failed to fetch remote config from PostHog.`),this._instance.pr(e??{}),!1!==e?.hasFeatureFlags&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(t=this._instance.featureFlags)==null||t.ensureFlagsLoaded())}},hl={GZipJS:`gzip-js`,Base64:`base64`},gl=Uint8Array,_l=Uint16Array,vl=Uint32Array,yl=new gl([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]),bl=new gl([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]),xl=new gl([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Sl=function(e,t){for(var n=new _l(31),r=0;31>r;++r)n[r]=t+=1<<e[r-1];var i=new vl(n[30]);for(r=1;30>r;++r)for(var a=n[r];n[r+1]>a;++a)i[a]=a-n[r]<<5|r;return[n,i]},Cl=Sl(yl,2),wl=Cl[1];Cl[0][28]=258,wl[258]=28;for(var Tl=Sl(bl,0)[1],El=new _l(32768),Dl=0;32768>Dl;++Dl){var Ol=(43690&Dl)>>>1|(21845&Dl)<<1;El[Dl]=((65280&(Ol=(61680&(Ol=(52428&Ol)>>>2|(13107&Ol)<<2))>>>4|(3855&Ol)<<4))>>>8|(255&Ol)<<8)>>>1}var kl=function(e,t,n){for(var r=e.length,i=0,a=new _l(t);r>i;++i)++a[e[i]-1];var o,s=new _l(t);for(i=0;t>i;++i)s[i]=s[i-1]+a[i-1]<<1;if(n){o=new _l(1<<t);var c=15-t;for(i=0;r>i;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=s[e[i]-1]++<<u,f=d|(1<<u)-1;f>=d;++d)o[El[d]>>>c]=l}else for(o=new _l(r),i=0;r>i;++i)o[i]=El[s[e[i]-1]++]>>>15-e[i];return o},Al=new gl(288);for(Dl=0;144>Dl;++Dl)Al[Dl]=8;for(Dl=144;256>Dl;++Dl)Al[Dl]=9;for(Dl=256;280>Dl;++Dl)Al[Dl]=7;for(Dl=280;288>Dl;++Dl)Al[Dl]=8;var jl=new gl(32);for(Dl=0;32>Dl;++Dl)jl[Dl]=5;var Ml=kl(Al,9,0),Nl=kl(jl,5,0),Pl=function(e){return(e/8>>0)+(7&e&&1)},Fl=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof _l?_l:e instanceof vl?vl:gl)(n-t);return r.set(e.subarray(t,n)),r},Il=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8},Ll=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8,e[r+2]|=n>>>16},Rl=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,a=n.slice();if(!i)return[new gl(0),0];if(i==1){var o=new gl(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var s=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};u!=i-1;)s=n[n[d].f>n[l].f?l++:d++],c=n[l!=u&&n[d].f>n[l].f?l++:d++],n[u++]={s:-1,f:s.f+c.f,l:s,r:c};var f=a[0].s;for(r=1;i>r;++r)a[r].s>f&&(f=a[r].s);var p=new _l(f+1),m=zl(n[u-1],p,0);if(m>t){r=0;var h=0,g=m-t,_=1<<g;for(a.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));i>r;++r){var v=a[r].s;if(t>=p[v])break;h+=_-(1<<m-p[v]),p[v]=t}for(h>>>=g;h>0;){var y=a[r].s;t>p[y]?h-=1<<t-p[y]++-1:++r}for(;r>=0&&h;--r){var b=a[r].s;p[b]==t&&(--p[b],++h)}m=t}return[new gl(p),m]},zl=function(e,t,n){return e.s==-1?Math.max(zl(e.l,t,n+1),zl(e.r,t,n+1)):t[e.s]=n},Bl=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new _l(++t),r=0,i=e[0],a=1,o=function(e){n[r++]=e},s=1;t>=s;++s)if(e[s]==i&&s!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>
102&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=e[s]}return[n.subarray(0,r),t]},Vl=function(e,t){for(var n=0,r=0;t.length>r;++r)n+=e[r]*t[r];return n},Hl=function(e,t,n){var r=n.length,i=Pl(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 a=0;r>a;++a)e[i+a+4]=n[a];return 8*(i+4+r)},Ul=function(e,t,n,r,i,a,o,s,c,l,u){Il(t,u++,n),++i[256];for(var d=Rl(i,15),f=d[0],p=d[1],m=Rl(a,15),h=m[0],g=m[1],_=Bl(f),v=_[0],y=_[1],b=Bl(h),x=b[0],S=b[1],C=new _l(19),w=0;v.length>w;++w)C[31&v[w]]++;for(w=0;x.length>w;++w)C[31&x[w]]++;for(var T=Rl(C,7),E=T[0],D=T[1],ee=19;ee>4&&!E[xl[ee-1]];--ee);var te,O,k,ne,re=l+5<<3,A=Vl(i,Al)+Vl(a,jl)+o,ie=Vl(i,f)+Vl(a,h)+o+14+3*ee+Vl(C,E)+(2*C[16]+3*C[17]+7*C[18]);if(A>=re&&ie>=re)return Hl(t,u,e.subarray(c,c+l));if(Il(t,u,1+(A>ie)),u+=2,A>ie){te=kl(f,p,0),O=f,k=kl(h,g,0),ne=h;var ae=kl(E,D,0);for(Il(t,u,y-257),Il(t,u+5,S-1),Il(t,u+10,ee-4),u+=14,w=0;ee>w;++w)Il(t,u+3*w,E[xl[w]]);u+=3*ee;for(var j=[v,x],oe=0;2>oe;++oe){var se=j[oe];for(w=0;se.length>w;++w)Il(t,u,ae[ce=31&se[w]]),u+=E[ce],ce>15&&(Il(t,u,se[w]>>>5&127),u+=se[w]>>>12)}}else te=Ml,O=Al,k=Nl,ne=jl;for(w=0;s>w;++w)if(r[w]>255){var ce;Ll(t,u,te[257+(ce=r[w]>>>18&31)]),u+=O[ce+257],ce>7&&(Il(t,u,r[w]>>>23&31),u+=yl[ce]);var le=31&r[w];Ll(t,u,k[le]),u+=ne[le],le>3&&(Ll(t,u,r[w]>>>5&8191),u+=bl[le])}else Ll(t,u,te[r[w]]),u+=O[r[w]];return Ll(t,u,te[256]),u+O[256]},Wl=new vl([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Gl=function(){for(var e=new vl(256),t=0;256>t;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),Kl=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function ql(e,t){t===void 0&&(t={});var n=function(){var e=4294967295;return{p(t){for(var n=e,r=0;t.length>r;++r)n=Gl[255&n^t[r]]^n>>>8;e=n},d(){return 4294967295^e}}}(),r=e.length;n.p(e);var i,a,o,s,c,l=(s=10+((i=t).filename&&i.filename.length+1||0),c=8,function(e,t,n,r,i,a){var o=e.length,s=new gl(r+o+5*(1+Math.floor(o/7e3))+i),c=s.subarray(r,s.length-i),l=0;if(!t||8>o)for(var u=0;o>=u;u+=65535){var d=u+65535;o>d?l=Hl(c,l,e.subarray(u,d)):(c[u]=!0,l=Hl(c,l,e.subarray(u,o)))}else{for(var f=Wl[t-1],p=f>>>13,m=8191&f,h=(1<<n)-1,g=new _l(32768),_=new _l(h+1),v=Math.ceil(n/3),y=2*v,b=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<y)&h},x=new vl(25e3),S=new _l(288),C=new _l(32),w=0,T=0,E=(u=0,0),D=0,ee=0;o>u;++u){var te=b(u),O=32767&u,k=_[te];if(g[O]=k,_[te]=O,u>=D){var ne=o-u;if((w>7e3||E>24576)&&ne>423){l=Ul(e,c,0,x,S,C,T,E,ee,u-ee,l),E=w=T=0,ee=u;for(var re=0;286>re;++re)S[re]=0;for(re=0;30>re;++re)C[re]=0}var A=2,ie=0,ae=m,j=O-k&32767;if(ne>2&&te==b(u-j))for(var oe=Math.min(p,ne)-1,se=Math.min(32767,u),ce=Math.min(258,ne);se>=j&&--ae&&O!=k;){if(e[u+A]==e[u+A-j]){for(var le=0;ce>le&&e[u+le]==e[u+le-j];++le);if(le>A){if(A=le,ie=j,le>oe)break;var ue=Math.min(j,le-2),de=0;for(re=0;ue>re;++re){var fe=u-j+re+32768&32767,pe=fe-g[fe]+32768&32767;pe>de&&(de=pe,k=fe)}}}j+=(O=k)-(k=g[O])+32768&32767}if(ie){x[E++]=268435456|wl[A]<<18|Tl[ie];var me=31&wl[A],he=31&Tl[ie];T+=yl[me]+bl[he],++S[257+me],++C[he],D=u+A,++w}else x[E++]=e[u],++S[e[u]]}}l=Ul(e,c,!0,x,S,C,T,E,ee,u-ee,l)}return Fl(s,0,r+Pl(l)+i)}(a=e,(o=t).level==null?6:o.level,o.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+o.mem,s,c)),u=l.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:t.level==9?2:0,e[9]=3,t.mtime!=0&&Kl(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)}}(l,t),Kl(l,u-8,n.d()),Kl(l,u-4,r),l}var Jl=!!er||!!$n,Yl=`text/plain`,Xl=!1,Zl=(e,t)=>{var[n,r]=e.split(`#`),[i,a]=n.split(`?`);if(!a)return e;var o=a.split(`&`).filter((e=>e.split(`=`)[0]!==t)).join(`&`);return i+(o?`?`+o:``)+(r?`#`+r:``)},Ql=function(e,t,n){n===void 0&&(n=!0);var[r,i]=e.split(`?`),a=L({},t),o=i?.split(`&`).map((e=>{var t,[r,i]=e.split(`=`),o=n&&(t=a[r])!=null?t:i;return delete a[r],r+`=`+o}))??[],s=function(e,t){var n,r;t===void 0&&(t=`&`);var i=[];return cs(e,(function(e,t){B(e)||B(t)||t===`undefined`||(n=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),r=encodeURIComponent(t),i[i.length]=r+`=`+n)})),i.join(t)}(a);return s&&o.push(s),r+`?`+o.join(`&`)},$l=(e,t)=>
10JSON.stringify(e,((e,t)=>typeof t==`bigint`?t.toString():t),t),eu=e=>{if(e.xt)return e.xt;var{data:t,compression:n}=e;if(t){if(n===hl.GZipJS){var r=ql(function(e,t){var n=e.length;if(typeof TextEncoder<`u`)return new TextEncoder().encode(e);for(var r=new gl(e.length+(e.length>>>1)),i=0,a=function(e){r[i++]=e},o=0;n>o;++o){if(i+5>r.length){var s=new gl(i+8+(n-o<<1));s.set(r),r=s}var c=e.charCodeAt(o);128>c?a(c):2048>c?(a(192|c>>>6),a(128|63&c)):c>55295&&57344>c?(a(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++o))>>>18),a(128|c>>>12&63),a(128|c>>>6&63),a(128|63&c)):(a(224|c>>>12),a(128|c>>>6&63),a(128|63&c))}return Fl(r,0,i)}($l(t)),{mtime:0});return{contentType:Yl,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(n===hl.Base64){var i=(e=>`data=`+encodeURIComponent(typeof e==`string`?e:$l(e)))(function(e){return e&&btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,((e,t)=>String.fromCharCode(parseInt(t,16)))))}($l(t)));return{contentType:`application/x-www-form-urlencoded`,body:i,estimatedSize:new Blob([i]).size}}var a=$l(t);return{contentType:`application/json`,body:a,estimatedSize:new Blob([a]).size}}},tu=e=>{var t,n,r,i=eu(e);return!i||(n=e.compression,r=Fc(e.url,`compression`),n!==mr.GZipJS&&r!==mr.GZipJS&&r!==`gzip`)||((t=i.body)instanceof ArrayBuffer?vr(new Uint8Array(t)):ArrayBuffer.isView(t)&&vr(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)))?{url:e.url,encodedBody:i}:(Xl=!0,{url:Zl(e.url,`compression`),encodedBody:eu(L({},e,{compression:void 0,xt:void 0}))})},nu=e=>{try{return tu(e)}catch(t){H.error(t),e.callback==null||e.callback({statusCode:0,error:t});return}},ru=function(){var e=sr((function*(e){var t=yield function(e,t,n){return Sr.apply(this,arguments)}($l(e.data),ar.DEBUG,{rethrow:!0});if(!t)return e;var n=yield t.arrayBuffer();return L({},e,{xt:{contentType:Yl,body:n,estimatedSize:n.byteLength}})}));return function(t){return e.apply(this,arguments)}}(),iu=(e,t)=>Ql(e,{_:new Date().getTime().toString(),ver:ar.JS_SDK_VERSION,compression:t}),au=[];$n&&au.push({transport:`fetch`,method(e){var t=nu(e);if(t){var{url:n,encodedBody:r}=t,{contentType:i,body:a,estimatedSize:o}=r??{},s=new Headers;cs(e.headers,(function(e,t){s.append(t,e)})),i&&s.append(`Content-Type`,i);var c=null,l=null;if(tr){var u=new tr;c={signal:u.signal,timeout:setTimeout((()=>{var t=e.timeout,n;(n=Error(`PostHog request timed out`+(t?` after `+t+`ms`:``))).name=`AbortError`,u.abort(l=n)}),e.timeout)}}$n(n,L({method:e?.method||`GET`,headers:s,keepalive:e.method===`POST`&&52428.8>(o||0),body:a,signal:c?.signal},e.fetchOptions)).then((t=>t.text().then((n=>{var r={statusCode:t.status,text:n};if(t.status===200)try{r.json=JSON.parse(n)}catch(e){H.error(e)}e.callback==null||e.callback(r)})))).catch((t=>{t===l?H.warn(t):H.error(t),e.callback==null||e.callback({statusCode:0,error:t})})).finally((()=>c?clearTimeout(c.timeout):null))}}}),er&&au.push({transport:`XHR`,method(e){var t=nu(e);if(t){var n=new er,{url:r,encodedBody:i}=t;n.open(e.method||`GET`,r,!0);var{contentType:a,body:o}=i??{};cs(e.headers,(function(e,t){n.setRequestHeader(t,e)})),a&&n.setRequestHeader(`Content-Type`,a),e.timeout&&(n.timeout=e.timeout),n.onreadystatechange=()=>{if(n.readyState===4){var t={statusCode:n.status,text:n.responseText};if(n.status===200)try{t.json=JSON.parse(n.responseText)}catch{}e.callback==null||e.callback(t)}},n.send(o)}}}),Zn!=null&&Zn.sendBeacon&&au.push({transport:`sendBeacon`,method(e){try{var{url:t,encodedBody:n}=tu(e),{contentType:r,body:i}=n??{};if(!i)return;var a=i instanceof Blob?i:new Blob([i],{type:r});Zn.sendBeacon(t,a)}catch{}}});var ou=3e3,su=class{constructor(e,t){this.br=!0,this._r=[],this.wr=Jr(t?.flush_interval_ms||ou,250,5e3,H.createLogger(`flush interval`),ou),this.kr=e}enqueue(e){this._r.push(e),this.Sr||this.Cr()}unload(){this.Ir();var e=this._r.length>0?this.Tr():{},t=Object.values(e);[...t.filter((e=>e.url.indexOf(`/e`)===0)),...t.filter((e=>e.url.indexOf(`/e`)!==0))].map((e=>{this.Er(L({},e,{transport:`sendBeacon`}))}))}enable(){this.br=!1,this.Cr()}Cr(){var e=this;this.br||(this.Sr=setTimeout((()=>
10{if(this.Ir(),this._r.length>0){var t=this.Tr(),n=function(){var n=t[r],i=new Date().getTime();n.data&&z(n.data)&&cs(n.data,(e=>{e.offset=Math.abs(e.timestamp-i),delete e.timestamp})),e.Er(n)};for(var r in t)n()}}),this.wr))}Er(e){try{this.kr(e)}catch(e){H.error(e)}}Ir(){clearTimeout(this.Sr),this.Sr=void 0}Tr(){var e={};return cs(this._r,(t=>{var n,r=t,i=(r?r.batchKey:null)||r.url;B(e[i])&&(e[i]=L({},r,{data:[]})),(n=e[i].data)==null||n.push(r.data)})),this._r=[],e}},cu=[`retriesPerformedSoFar`],lu=class{constructor(e){this.Mr=!1,this.Pr=3e3,this._r=[],this._instance=e,this._r=[],this.Rr=!0,!B(P)&&`onLine`in P.navigator&&(this.Rr=P.navigator.onLine,this.Or=()=>{this.Rr=!0,this.Lr()},this.Fr=()=>{this.Rr=!1},gs(P,`online`,this.Or),gs(P,`offline`,this.Fr))}get length(){return this._r.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,n=cr(e,cu);Lr(t)&&(n.url=Ql(n.url,{retry_count:t})),this._instance._send_request(L({},n,{callback:e=>{if(e.statusCode!==200&&(400>e.statusCode||e.statusCode>=500)){if((e.statusCode===0?3:10)>(t??0))return void this.st(L({retriesPerformedSoFar:t},n));e.statusCode===0&&H.warn(`Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after `+(t??0)+` retries.`)}n.callback==null||n.callback(e)}}))}st(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var n=function(e){var t=3e3*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._r.push({retryAt:r,requestOptions:e});var i=`Enqueued failed request for retry in `+n;navigator.onLine||(i+=` (Browser is offline)`),H.warn(i),this.Mr||(this.Mr=!0,this.Ar())}Ar(){if(this.$r&&clearTimeout(this.$r),this._r.length===0)return this.Mr=!1,void(this.$r=void 0);this.$r=setTimeout((()=>{this.Rr&&this._r.length>0&&this.Lr(),this.Ar()}),this.Pr)}Lr(){var e=Date.now(),t=[],n=this._r.filter((n=>e>n.retryAt||(t.push(n),!1)));if(this._r=t,n.length>0)for(var{requestOptions:r}of n)this.retriableRequest(r)}unload(){for(var{requestOptions:e}of(this.$r&&=(clearTimeout(this.$r),void 0),this.Mr=!1,B(P)||(this.Or&&=(P.removeEventListener(`online`,this.Or),void 0),this.Fr&&=(P.removeEventListener(`offline`,this.Fr),void 0)),this._r))try{this._instance._send_request(L({},e,{transport:`sendBeacon`}))}catch(e){H.error(e)}this._r=[]}},uu=class{constructor(e){this.Dr=()=>{this.Nr||={};var e=this.scrollElement(),t=this.scrollY(),n=e?Math.max(0,e.scrollHeight-e.clientHeight):0,r=t+(e?.clientHeight||0),i=e?.scrollHeight||0;this.Nr.lastScrollY=Math.ceil(t),this.Nr.maxScrollY=Math.max(t,this.Nr.maxScrollY??0),this.Nr.maxScrollHeight=Math.max(n,this.Nr.maxScrollHeight??0),this.Nr.lastContentY=r,this.Nr.maxContentY=Math.max(r,this.Nr.maxContentY??0),this.Nr.maxContentHeight=Math.max(i,this.Nr.maxContentHeight??0)},this._instance=e}get qr(){return this._instance.config.scroll_root_selector}getContext(){return this.Nr}resetContext(){var e=this.Nr;return setTimeout(this.Dr,0),e}startMeasuringScrollPosition(){gs(P,`scroll`,this.Dr,{capture:!0}),gs(P,`scrollend`,this.Dr,{capture:!0}),gs(P,`resize`,this.Dr)}scrollElement(){if(!this.qr)return P?.document.documentElement;for(var e of z(this.qr)?this.qr:[this.qr]){var t=P?.document.querySelector(e);if(t)return t}}Br(e){var t=e===`y`?`scrollTop`:`scrollLeft`;if(this.qr){var n=this.scrollElement();return n&&n[t]||0}return P?e===`y`?P.scrollY||P.pageYOffset||P.document.documentElement.scrollTop||0:P.scrollX||P.pageXOffset||P.document.documentElement.scrollLeft||0:0}scrollY(){return this.Br(`y`)}scrollX(){return this.Br(`x`)}},du=e=>Yc(e?.config.mask_personal_data_properties,e?.config.custom_personal_data_properties,e?.config.disable_capture_url_hashes),fu=class{constructor(e,t,n,r){this.jr=e=>{var t=this.Hr();if(!t||t.sessionId!==e){var n={sessionId:e,props:this.Ur(this._instance)};this.zr.register({[Ro]:n})}},this._instance=e,this.Vr=t,this.zr=n,this.Ur=r||du,this.Vr.onSessionId(this.jr)}Hr(){return this.zr.props[Ro]}getSetOnceProps(){var e=this.Hr()?.props;return e?`r`in e?Xc(e,this._instance.config.disable_capture_url_hashes
10):{$referring_domain:e.referringDomain,$pathname:e.initialPathName,utm_source:e.utm_source,utm_campaign:e.utm_campaign,utm_medium:e.utm_medium,utm_content:e.utm_content,utm_term:e.utm_term}:{}}getSessionProps(){var e={};return cs(ps(this.getSetOnceProps()),((t,n)=>{n===`$current_url`&&(n=`url`),e[`$session_entry_`+Er(n)]=t})),e}},pu=class{constructor(){this.Wr={}}on(e,t){return this.Wr[e]||(this.Wr[e]=[]),this.Wr[e].push(t),()=>{this.Wr[e]=this.Wr[e].filter((e=>e!==t))}}emit(e,t){for(var n of this.Wr[e]||[])n(t);for(var r of this.Wr[`*`]||[])r(e,t)}},mu=Ja(`[SessionId]`),hu=class{on(e,t){return this.Gr.on(e,t)}constructor(e,t,n){var r;if(this.Zr=null,this.Qr=[],this.Jr=void 0,this.Yr=!1,this.Gr=new pu,this.Kr=(e,t)=>!(!Lr(e)||!Lr(t))&&Math.abs(e-t)>this.sessionTimeoutMs,!e.persistence)throw Error(`SessionIdManager requires a PostHogPersistence instance`);if(e.config.cookieless_mode===Zo)throw Error(`SessionIdManager cannot be used with cookieless_mode="always"`);this.Se=e.config,this.zr=e.persistence,this.Xr=void 0,this.ei=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.ti=t||Cs,this.ri=n||Cs;var i=this.Se.persistence_name||this.Se.token;if(this._sessionTimeoutMs=1e3*Jr(this.Se.session_idle_timeout_seconds||1800,60,36e3,mu.createLogger(`session_idle_timeout_seconds`),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.ii(),this.ni=`ph_`+i+`_window_id`,this.si=`ph_`+i+`_primary_window_exists`,this.oi()){var a=Ps.F(this.ni),o=Ps.F(this.si);a&&!o?this.Xr=a:Ps.A(this.ni),Ps.q(this.si,!0)}if((r=this.Se.bootstrap)!=null&&r.sessionID)try{var s=(e=>{var t=this.Se.bootstrap.sessionID.replace(/-/g,``);if(t.length!==32)throw Error(`Not a valid UUID`);if(t[12]!==`7`)throw Error(`Not a UUIDv7`);return parseInt(t.substring(0,12),16)})();this.ai(this.Se.bootstrap.sessionID,new Date().getTime(),s)}catch(e){mu.error(`Invalid sessionID in bootstrap`,e)}this.li()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return B(this.Qr)&&(this.Qr=[]),this.Qr.push(e),this.ei&&e(this.ei,this.Xr),()=>{this.Qr=this.Qr.filter((t=>t!==e))}}oi(){return this.Se.persistence!==`memory`&&!this.zr.Vt&&Ps.N()}ui(e){e!==this.Xr&&(this.Xr=e,this.oi()&&Ps.q(this.ni,e))}hi(){return this.Xr?this.Xr:this.oi()?Ps.F(this.ni):null}di(e){var t=this.Zr;return!Fr(t)&&!Fr(e)&&5e3>Math.abs(e-t)}ai(e,t,n){var r=t!==this._sessionActivityTimestamp,i=!(e!==this.ei||n!==this._sessionStartTimestamp);this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this.ei=e,i&&!r||i&&this.di(t)||(this.Zr=t,this.zr.register({[_o]:[t,e,n]}))}ci(){var e=this.Se?.persistence_save_debounce_ms;return Lr(e)&&e>0}vi(){this.ci()?this.zr.refreshKey(_o):(this.zr.flush(),this.zr.load())}fi(){if(!Fr(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.Zr){this.vi();var[,e,t]=this.pi();e===this.ei&&t===this._sessionStartTimestamp&&(this.Zr=this._sessionActivityTimestamp,this.zr.register({[_o]:[this._sessionActivityTimestamp,this.ei??null,this._sessionStartTimestamp]}),this.zr.flush())}}gi(){var[e]=this.pi(),t=Lr(e)?e:0,n=Lr(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(t,n)}mi(e){return this.vi(),this.Kr(e,this.gi())}pi(){var e=this.zr.props[_o];return z(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Zr=null,clearTimeout(this.yi),this.yi=void 0,this.ai(null,null,null)}destroy(){this.Yr=!0,this.fi(),clearTimeout(this.yi),this.yi=void 0,this.Jr&&P&&(P.removeEventListener(ns,this.Jr,{capture:!1}),this.Jr=void 0),this.Qr=[]}li(){this.Jr=()=>{this.fi(),this.oi()&&Ps.A(this.si)},gs(P,ns,this.Jr,{capture:!1})}checkAndGetSessionAndWindowId(e,t){if(e===void 0&&(e=!1),t===void 0&&(t=null),this.Se.cookieless_mode===Zo)throw Error(`checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"`);var n=t||new Date().getTime(),[,r,i]=this.pi(),a=this.gi(),o=this.hi(),s=Lr(i)&&Math.abs(n-i)>864e5,c=!1,l=!1,u=!r,d=r,f=!u&&!e&&this.Kr(n,a);f&&((f=this.mi(n))||mu.info(`cross-tab refresh kept the session alive`,{sessionId:r}),[,r,i]=this.pi()),u||f||s?(r=this.ti(),o=this.ri(),mu.info(`new session ID generated`,{sessionId:r,windowId:o,changeReason:{noSessionId:u,activityTimeout:f,sessionPastMaximumLength:s}}),i=n,c=!0):(o||(o=this.ri(),c=!0),(l=r!==d)&&(mu.info(`adopted cross-tab session id`,{sessionId:r,windowId:o}),c=!0));var p=Lr(a)&&e&&!s?a:n,m=Lr(i)?i:new Date().getTime();this.ui(o),this.ai(r,p,m),e||this.ii();var h={noSessionId:u,activityTimeout:f,sessionPastMaximumLength:s,crossTabAdoption:l};return c&&this.Qr.forEach((e=>e(r,o,h))),{sessionId:r,windowId:o,sessionStartTimestamp:m,changeReason:c?h:void 0,lastActivityTimestamp:a}}ii(){this.Yr||(clearTimeout(this.yi),this.yi=setTimeout((()=>
10{if(!this.Yr)if(this.mi(new Date().getTime())){var e=this.ei;this.resetSessionId(),this.Gr.emit(`forcedIdleReset`,{idleSessionId:e})}else this.ii()}),1.1*this.sessionTimeoutMs))}},gu=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&wr(n,t))return!0;try{var r=e?.userAgentData;if(r!=null&&r.brands&&r.brands.some((e=>wr(e?.brand,t))))return!0}catch{}return!!e.webdriver},_u=function(e,t){if(!function(e){try{new RegExp(e)}catch{return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function vu(e,t,n){return $l({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var yu={exact:(e,t)=>t.some((t=>e.some((e=>t===e)))),is_not:(e,t)=>t.every((t=>e.every((e=>t!==e)))),regex:(e,t)=>t.some((t=>e.some((e=>_u(t,e))))),not_regex:(e,t)=>t.every((t=>e.every((e=>!_u(t,e))))),icontains:(e,t)=>t.map(bu).some((t=>e.map(bu).some((e=>t.includes(e))))),not_icontains:(e,t)=>t.map(bu).every((t=>e.map(bu).every((e=>!t.includes(e))))),gt:(e,t)=>t.some((t=>{var n=parseFloat(t);return!isNaN(n)&&e.some((e=>n>parseFloat(e)))})),lt:(e,t)=>t.some((t=>{var n=parseFloat(t);return!isNaN(n)&&e.some((e=>n<parseFloat(e)))}))},bu=e=>e.toLowerCase();function xu(e,t){return!e||Object.entries(e).every((e=>{var[n,r]=e,i=t?.[n];if(B(i)||Fr(i))return!1;var a=[String(i)],o=yu[r.operator];return!!o&&o(r.values,a)}))}var Su=`custom`,Cu=`i.posthog.com`,wu=/^\/static\//,Tu=class{constructor(e){this.bi={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,``);return e===`https://app.posthog.com`?`https://us.i.posthog.com`:e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,``):this.apiHost}get uiHost(){var e=this.instance.config.ui_host?.replace(/\/$/,``);return e||=this.apiHost.replace(`.`+Cu,`.posthog.com`),e===`https://app.posthog.com`?`https://us.posthog.com`:e}get region(){return this.bi[this.apiHost]||(this.bi[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`:Su),this.bi[this.apiHost]}wi(e){if(wu.test(e)){var t=this.instance.config.asset_host;if(typeof t==`string`)return t.trim().replace(/\/$/,``)||void 0}}endpointFor(e,t){if(t===void 0&&(t=``),t&&=t[0]===`/`?t:`/`+t,e===`ui`)return this.uiHost+t;if(e===`flags`)return this.flagsApiHost+t;if(e===`assets`){var n=this.wi(t);if(n)return``+n+t}if(this.region===Su)return this.apiHost+t;var r=Cu+t;switch(e){case`assets`:return`https://`+this.region+`-assets.`+r;case`api`:return`https://`+this.region+`.`+r}}},Eu=Ja(`[Surveys]`),Du=`seenSurvey_`,Ou=[il.Popover,il.Widget,il.API],ku={ignoreConditions:!1,ignoreDelay:!1,displayType:cl.Popover},Au=Ja(`[PostHog ExternalIntegrations]`),ju={intercom:`intercom-integration`,crispChat:`crisp-chat-integration`},Mu=class{constructor(e){this._instance=e}Mt(e,t){var n;(n=I.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,e,(e=>{if(e)return Au.error(`failed to load script`,e);t()}))}startIfEnabledOrStop(){var e=this,t=function(t){var n,i,a;!r||(n=I.__PosthogExtensions__)!=null&&(n=n.integrations)!=null&&n[t]||e.Mt(ju[t],(()=>{var n;(n=I.__PosthogExtensions__)==null||(n=n.integrations)==null||(n=n[t])==null||n.start(e._instance)})),!r&&(i=I.__PosthogExtensions__)!=null&&(i=i.integrations)!=null&&i[t]&&((a=I.__PosthogExtensions__)==null||(a=a.integrations)==null||(a=a[t])==null||a.stop())};for(var[n,r]of Object.entries((i=this._instance.config.integrations)??{})){var i;t(n)}}},Nu,Pu={},Fu=0,Iu=()=>{},Lu=`Consent opt in/out is not valid with cookieless_mode="always" and will be ignored`,Ru=`Surveys module not available`,zu=`sanitize_properties is deprecated. Use before_send instead`,Bu=`Invalid value for property_denylist config: `,Vu=`posthog`,Hu=!Jl&&rr?.indexOf(`MSIE`)===-1&&rr?.indexOf(`Mozilla`)===-1,Uu=e=>{var t;return L({api_host:`https://us.i.posthog.com`,flags_api_host:null,ui_host:null,asset_host:null,token:``,autocapture:!0,cross_subdomain_cookie:hs(F?.location),persistence:`localStorage+cookie`,persistence_name:``,cookie_persisted_properties:[],loaded:Iu,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:`if_capture_pageview`,defaults:e??`unset`,__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:Qn&&Nr(Qn?.search)&&Qn.search.indexOf(`__posthog_debug=true`)!==-1||!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,strict_script_versioning:!1,enable_recording_console_log:void 0,secure_cookie:(P==null||(t=P.location)==null?void 0:t.protocol)===`https:`,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(e){H.error(`Bad HTTP status: `+e.statusCode+` `+e.text)},get_device_id:e=>e,capture_performance:void 0,name:`posthog`,bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:es,before_send:void 0,request_queue_config:{flush_interval_ms:ou},error_tracking:{},_onCapture:Iu},(e=>({rageclick:e&&e>=`2026-05-30`?{content_ignorelist:tc,ignore_text_selection:!0}
10:!e||`2025-11-30`>e||{content_ignorelist:!0},capture_pageview:!e||`2025-05-24`>e||`history_change`,session_recording:e&&e>=`2026-06-25`?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6},streamNetworkBody:!0}:e&&e>=`2026-05-30`?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6}}: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,persistence_save_debounce_ms:e&&e>=`2026-05-30`?250:0,split_storage:!(!e||`2026-05-30`>e),detect_google_search_app:!(!e||`2026-05-30`>e),disable_capture_url_hashes:!(!e||`2026-06-25`>e)}))(e))},Wu=[[`process_person`,`person_profiles`],[`xhr_headers`,`request_headers`],[`cookie_name`,`persistence_name`],[`disable_cookie`,`disable_persistence`],[`__preview_disable_beacon`,`disable_beacon`],[`store_google`,`save_campaign_params`],[`verbose`,`debug`]],Gu=e=>{var t={};for(var[n,r]of Wu)B(e[n])||(t[r]=e[n]);var i=ls({},t,e),a=e.__preview_external_dependency_versioned_paths;return B(a)||(B(e.strict_script_versioning)&&(i.strict_script_versioning=!!a),Nr(a)&&B(e.asset_host)&&(i.asset_host=a)),z(e.property_blacklist)&&(B(e.property_denylist)?i.property_denylist=e.property_blacklist:z(e.property_denylist)?i.property_denylist=[...e.property_blacklist,...e.property_denylist]:H.error(Bu+e.property_denylist)),i},Ku=class{constructor(){this.__forceAllowLocalhost=!1}get xi(){return this.__forceAllowLocalhost}set xi(e){H.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}},qu=class e{ki(e,t){if(e){var n=this.Si.indexOf(e);n!==-1&&this.Si.splice(n,1)}return this.Si.push(t),t.initialize==null||t.initialize(),t}Ci(){return this.config.cookieless_mode===Zo||this.config.cookieless_mode===Xo&&this.consent.isRejected()}get decideEndpointWasHit(){var e;return(e=this.featureFlags?.hasLoadedFlags)!=null&&e}get flagsEndpointWasHit(){var e;return(e=this.featureFlags?.hasLoadedFlags)!=null&&e}constructor(){this.webPerformance=new Ku,this.Ii=!1,this.version=ar.LIB_VERSION,this.Ti=new pu,this.Si=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=Uu(),this.SentryIntegration=Oc,this.sentryIntegration=e=>function(e,t){var n=Dc(e,t);return{name:Ec,processEvent:e=>n(e)}}(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint=`/e/`,this.Ei=!1,this.Mi=null,this.Pi=null,this.Ri=null,this.scrollManager=new uu(this),this.pageViewManager=new kc(this),this.rateLimiter=new fl(this),this.requestRouter=new Tu(this),this.consent=new Fs(this),this.externalIntegrations=new Mu(this);var t=e.__defaultExtensionClasses??{};this.featureFlags=t.featureFlags&&new t.featureFlags(this),this.toolbar=t.toolbar&&new t.toolbar(this),this.surveys=t.surveys&&new t.surveys(this),this.conversations=t.conversations&&new t.conversations(this),this.logs=t.logs&&new t.logs(this),this.experiments=t.experiments&&new t.experiments(this),this.exceptions=t.exceptions&&new t.exceptions(this),this.people={set:(e,t,n)=>{var r=Nr(e)?{[e]:t}:e;this.setPersonProperties(r),n?.({})},set_once:(e,t,n)=>{var r=Nr(e)?{[e]:t}:e;this.setPersonProperties(void 0,r),n?.({})}},this.on(`eventCaptured`,(e=>H.info(`send "`+e?.event+`"`,e)))}init(t,n,r){if(r&&r!==Vu){var i=Pu[r]??new e;return i._init(t,n,r),Pu[r]=i,Pu[Vu][r]=i,i}return this._init(t,n,r)}_init(e,t,n){var r;t===void 0&&(t={});var i=Nr(e)?e.trim():``;if(!i)return H.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.Oi(t.debug),this.Li=t,this.Fi=[],t.person_profiles?this.Pi=t.person_profiles:t.process_person&&(this.Pi=t.process_person);var a=Uu(t.defaults),o=Gu(t),s=ls({},a,o,{name:n,token:i});jr(a.rageclick)&&jr(o.rageclick)&&(s.rageclick=ls({}
10,a.rageclick,o.rageclick)),jr(a.session_recording)&&jr(o.session_recording)&&(s.session_recording=ls({},a.session_recording,o.session_recording)),this.set_config(s),this.config.on_xhr_error&&H.error(`on_xhr_error is deprecated. Use on_request_error instead`),this.compression=t.disable_compression?void 0:hl.GZipJS;var c=this.Ai();this.persistence=new nl(this.config,c),this.sessionPersistence=this.config.persistence===`sessionStorage`||this.config.persistence===`memory`?this.persistence:new nl(L({},this.config,{persistence:`sessionStorage`}),c,!1);var l=L({},this.persistence.props),u=L({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.$i=new su((e=>this.Di(e)),this.config.request_queue_config),this.Ni=new lu(this),this.__request_queue=[];var d=this.Ci();if(d||(this.sessionManager=new hu(this),this.sessionPropsManager=new fu(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(H.info(`Deferring extension initialization to improve startup performance`),setTimeout((()=>{this.qi(d)}),0)):(H.info(`Initializing extensions synchronously`),this.qi(d)),ar.DEBUG=ar.DEBUG||this.config.debug,ar.DEBUG&&H.info(`Starting in debug mode`,{this:this,config:t,thisC:L({},this.config),p:l,s:u}),!this.config.identity_distinct_id||(r=t.bootstrap)!=null&&r.distinctID||(t.bootstrap=L({},t.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),t.bootstrap?.distinctID!==void 0){var f=t.bootstrap.distinctID,p=this.get_distinct_id(),m=this.persistence.get_property(Lo);if(t.bootstrap.isIdentifiedID&&p!=null&&p!==f&&m===Qo)this.identify(f);else if(t.bootstrap.isIdentifiedID&&p!=null&&p!==f&&m===$o)H.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 h=this.config.get_device_id(Cs()),g=t.bootstrap.isIdentifiedID?h:f;this.persistence.set_property(Lo,t.bootstrap.isIdentifiedID?$o:Qo),this.register({distinct_id:f,$device_id:g})}}if(d)this.register_once({distinct_id:Go,$device_id:null},``);else if(!this.get_distinct_id()){var _=this.config.get_device_id(Cs());this.register_once({distinct_id:_,$device_id:_},``),this.persistence.set_property(Lo,Qo)}return gs(P,`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=n=>{var r=()=>n.anonymousId()||Cs();e.config.get_device_id=r,n.id()&&(e.register({distinct_id:n.id(),$device_id:r()}),e.persistence.set_property(Lo,$o)),t()},i=n.user();`then`in i&&Ar(i.then)?i.then(r):r(i)})(e,(()=>{n.register((e=>{Promise&&Promise.resolve||Tc.warn(`This browser does not have Promise support, and can not use the segment integration`);var t=(t,n)=>{if(!n)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(Tc.info(`No userId set, resetting PostHog`),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(Tc.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:()=>!0,load:()=>Promise.resolve(),track:e=>t(e,e.event.event),page:e=>t(e,rs),identify:e=>t(e,as),screen:e=>t(e,`$screen`)}})(e)).then((()=>{t()}))}))}(this,(()=>this.Bi())):this.Bi(),Ar(this.config._onCapture)&&this.config._onCapture!==Iu&&(H.warn("onCapture is deprecated. Please use `before_send` instead"),this.on(`eventCaptured`,(e=>this.config._onCapture(e.event,e)))),this.config.ip&&H.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}qi(t){var n=performance.now(),r=L({},e.__defaultExtensionClasses,this.config.__extensionClasses),i=[];r.featureFlags&&this.Si.push(this.featureFlags=this.featureFlags??new r.featureFlags(this)),r.exceptions&&this.Si.push(this.exceptions=this.exceptions??new r.exceptions(this)),r.historyAutocapture&&this.Si.push(this.historyAutocapture=new r.historyAutocapture(this)),r.tracingHeaders&&this.Si.push(this.tracingHeaders=new r.tracingHeaders(this)),r.siteApps&&this.Si.push(this.siteApps=new r.siteApps(this)),r.sessionRecording&&!t&&this.Si.push(this.sessionRecording=new r.sessionRecording(this)),this.config.disable_scroll_properties||i.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),r.autocapture&&this.Si.push(this.autocapture=new r.autocapture(this)),r.surveys&&this.Si.push(this.surveys=this.surveys??new r.surveys(this)),r.logs&&this.Si.push(this.logs=this.logs??new r.logs(this)),r.conversations&&this.Si.push(this.conversations=this.conversations??new r.conversations(this)),r.productTours&&this.Si.push(this.productTours=new r.productTours(this)),r.heatmaps&&this.Si.push(this.heatmaps=new r.heatmaps(this)),r.webVitalsAutocapture&&this.Si.push(this.webVitalsAutocapture=new r.webVitalsAutocapture(this)),r.exceptionObserver&&this.Si.push(this.exceptionObserver=new r.exceptionObserver(this)),r.deadClicksAutocapture&&this.Si.push(this.deadClicksAutocapture=new r.deadClicksAutocapture(this,Cc)),r.toolbar&&this.Si.push(this.toolbar=this.toolbar??new r.toolbar(this)),r.experiments&&this.Si.push(this.experiments=this.experiments??new r.experiments(this)),this.Si.forEach((e=>{e.initialize&&i.push((()=>{e.initialize==null||e.initialize()}))})),i.push((()=>
10{if(this.ji){var e=this.ji;this.ji=void 0,this.pr(e)}})),this.Hi(i,n)}Hi(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout((()=>{this.Hi(e,t)}),0);var n=e.shift();if(n)try{n()}catch(e){H.error(`Error initializing extension:`,e)}}var r=Math.round(performance.now()-t);this.register_for_session({[Ko]:this.config.__preview_deferred_init_extensions?`deferred`:`synchronous`,[qo]:r}),this.config.__preview_deferred_init_extensions&&H.info(`PostHog extensions initialized (`+r+`ms)`)}pr(e){var t;if(!F||!F.body)return H.info(`document not ready yet, trying again in 500 milliseconds...`),void setTimeout((()=>{this.pr(e)}),500);this.config.__preview_deferred_init_extensions&&(this.ji=e),this.Ui=e,this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=R(e.supportedCompression,hl.GZipJS)?hl.GZipJS:R(e.supportedCompression,hl.Base64)?hl.Base64:void 0),(t=e.analytics)!=null&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Pi?this.Pi:es}),this.Si.forEach((t=>t.onRemoteConfig==null?void 0:t.onRemoteConfig(e)))}Bi(){try{this.config.loaded(this)}catch(e){H.critical("`loaded` function failed",e)}if(this.zi(),this.config.internal_or_test_user_hostname&&Qn!=null&&Qn.hostname){var e=Qn.hostname,t=this.config.internal_or_test_user_hostname;(typeof t==`string`?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.Ci())&&this.Vi()}),1),this.Wi=new ml(this),this.Wi.load()}zi(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.$i)==null||e.enable())}_dom_loaded(){this.is_capturing()&&ss(this.__request_queue,(e=>this.Di(e))),this.__request_queue=[],this.zi()}_handle_unload(){var e,t,n,r;(e=this.surveys)==null||e.handlePageUnload==null||e.handlePageUnload(),this.config.request_batching?(this.Gi()&&this.capture(is),(t=this.logs)==null||t.flushLogs(`sendBeacon`),(n=this.$i)==null||n.unload(),(r=this.Ni)==null||r.unload()):this.Gi()&&this.capture(is,null,{transport:`sendBeacon`})}_send_request(e){this.__loaded?Hu?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)?e.fireCallbackOnDrop&&(e.callback==null||e.callback({statusCode:429})):(e.transport=e.transport||this.config.api_transport,e.headers=L({},this.config.request_headers,e.headers),e.compression=e.compression===`best-available`?this.compression:e.compression,(B(this.config.disable_beacon)?this.config.__preview_disable_beacon:this.config.disable_beacon)&&(e.disableTransport=[`sendBeacon`]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(e=>{var t=L({},e);t.timeout=t.timeout||6e4,t.url=iu(t.url,t.compression);var n=t.transport??`fetch`,r=au.filter((e=>!t.disableTransport||!e.transport||!t.disableTransport.includes(e.transport))),i=function(e,t){for(var r=0;e.length>r;r++)if(e[r].transport===n)return e[r]}(r)?.method??r[0].method;if(!i)throw Error(`No available transport method`);n!==`sendBeacon`&&t.data&&t.compression===hl.GZipJS&&nr&&!Xl?ru(t).then((e=>{i(e)})).catch((n=>{if(yr(n))return Xl=!0,void i(L({},t,{compression:void 0,url:iu(e.url,void 0)}));(e=>{if(!e||typeof e!=`object`)return!1;var t=`name`in e?String(e.name):``;return yr(e)||t===_r})(n)&&(Xl=!0),i(t)})):i(t)})(L({},e,{callback:t=>{var n,r;this.rateLimiter.checkForLimiting(t),400>t.statusCode||(n=(r=this.config).on_request_error)==null||n.call(r,t),e.callback==null||e.callback(t)}}))):e.fireCallbackOnDrop&&(e.callback==null||e.callback({statusCode:0}))}Di(e){this.Ni?this.Ni.retriableRequest(e):this._send_request(e)}_execute_array(e){Fu++;try{var t,n=[],r=[],i=[];ss(e,(e=>{if(e)if(z(t=e[0]))i.push(e);else if(Ar(e))try{e.call(this)}catch(t){H.error(`Error executing queued PostHog call`,e,t)}else z(e)&&t===`alias`?n.push(e):z(e)&&t.indexOf(`capture`)!==-1&&Ar(this[t])?i.push(e):r.push(e)}));var a=function(e,t){ss(e,(function(e){try{if(z(e[0])){var n=t;cs(e,(function(e){n=n[e[0]].apply(n,e.slice(1))}))}else t[e[0]].apply(t,e.slice(1))}catch(t){H.error(`Error executing queued PostHog call`,e,t)}}))};a(n,this),a(r,this),a(i,this)}finally{Fu--}}push(t){if(Fu>
100&&z(t)&&Nr(t[0])){var n=e.prototype[t[0]];Ar(n)&&n.apply(this,t.slice(1))}else this._execute_array([t])}capture(e,t,n){var r,i,a,o;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.$i){if(this.is_capturing())if(!B(e)&&Nr(e)){var s=!this.config.opt_out_useragent_filter&&this._is_bot();if(!s||this.config.__preview_capture_bot_pageviews){var c=n!=null&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(c==null||!c.isRateLimited){t!=null&&t.$current_url&&!Nr(t?.$current_url)&&(H.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),t==null||delete t.$current_url),e!==`$exception`||n!=null&&n.Zi||H.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 l=new Date,u=n?.timestamp||l,d=ta(n?.uuid,Cs),f={uuid:d,event:e,properties:this.calculateEventProperties(e,t||{},u,d)};e===rs&&this.config.__preview_capture_bot_pageviews&&s&&(f.event=`$bot_pageview`,f.properties.$browser_type=`bot`),c&&(f.properties.$lib_rate_limit_remaining_tokens=c.remainingTokens),n!=null&&n.$set&&(f.$set=n?.$set);var p=n?.$unset;p&&(f.$unset=p);var m,h,g,_=this.Qi(n?.$set_once,e!==os,e===as);if(_&&(f.$set_once=_),n!=null&&n._noTruncate||(r=this.config.properties_string_max_length,i=f,a=e=>Nr(e)?e.slice(0,r):e,o=new Set,f=function e(t,n){return t===Object(t)?o.has(t)?void 0:(o.add(t),z(t)?(r=[],ss(t,(t=>{r.push(e(t))}))):(r={},cs(t,((t,n)=>{o.has(t)||(r[n]=e(t,n))}))),r):a?a(t):t;var r}(i)),f.timestamp=u,B(n?.timestamp)||(f.properties.$event_time_override_provided=!0,f.properties.$event_time_override_system_time=l),e===ol.DISMISSED||e===ol.SENT){var v=t?.[sl.SURVEY_ID],y=t?.[sl.SURVEY_ITERATION];(e=>{try{var t=(e=>((e,t)=>{var n=``+Du+t.id;return t.current_iteration&&t.current_iteration>0&&(n=``+Du+t.id+`_`+t.current_iteration),n})(0,e))(e);if(localStorage.getItem(t))return;localStorage.setItem(t,`true`)}catch(e){Eu.error(`Failed to persist survey seen state`,e)}})({id:v,current_iteration:y}),f.$set=L({},f.$set,{[(m={id:v,current_iteration:y},h=e===ol.SENT?`responded`:`dismissed`,g=`$survey_`+h+`/`+m.id,m.current_iteration&&m.current_iteration>0&&(g=`$survey_`+h+`/`+m.id+`/`+m.current_iteration),g)]:!0})}else e===ol.SHOWN&&(f.$set=L({},f.$set,{[sl.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(e===ll.SHOWN){var b=t?.[ul.TOUR_TYPE];b&&(f.$set=L({},f.$set,{[ul.TOUR_LAST_SEEN_DATE+`/`+b]:new Date().toISOString()}))}var x=L({},f.properties.$set,f.$set);if(Mr(x)||this.setPersonPropertiesForFlags(x),!V(this.config.before_send)){var S=this.it(f);if(!S)return;(f=S).uuid=ta(f.uuid,Cs)}this.Ti.emit(`eventCaptured`,f);var C={method:`POST`,url:n?._url??this.requestRouter.endpointFor(`api`,this.analyticsDefaultEndpoint),data:f,compression:`best-available`,batchKey:n?._batchKey,transport:n?.transport};return!this.config.request_batching||n&&(n==null||!n._batchKey)||n!=null&&n.send_instantly?this.Di(C):this.$i.enqueue(C),f}H.critical(`This capture call is ignored due to client rate limiting.`)}}else H.error(`No event name provided to posthog.capture`)}else H.uninitializedWarning(`posthog.capture`)}_addCaptureHook(e){return this.on(`eventCaptured`,(t=>e(t.event,t)))}calculateEventProperties(e,t,n,r,i){if(n||=new Date,!this.persistence||!this.sessionPersistence)return t;var a=i?void 0:this.persistence.remove_event_timer(e),o=L({},t);if(o.token=this.config.token,o.$config_defaults=this.config.defaults,this.Ci()&&(o.$cookieless_mode=!0),e===`$snapshot`){var s=L({},this.persistence.properties(),this.sessionPersistence.properties());return o.distinct_id=s.distinct_id,(!Nr(o.distinct_id)&&!Ir(o.distinct_id)||Pr(o.distinct_id))&&H.error(`Invalid distinct_id for replay event. This indicates a bug in your implementation`),o}var c,l=function(e,t,n,r){var i,a,o;if(r===void 0&&(r=!1),!rr)return{};var s,c,l,u,d,f=e?[...zc,...t||[]]:[],[p,m]=function(e){for(var t=0;Qi.length>t;t++){var[n,r]=Qi[t],i=n.exec(e),a=i&&(Ar(r)?r(i,e):r);if(a)return a}return[``,``]}(rr),h=(s=typeof navigator<`u`?navigator:void 0)!=null&&s.brave?{brave:!0}:{},g={detectGoogleSearchApp:n},_=ls(ps({$os:p,$os_version:m,$browser:Yi(rr,navigator.vendor,h,g),$device:$i(rr),$device_type:(l=rr,u={userAgentDataPlatform:(i=navigator)==null||(i=i.userAgentData)==null?void 0:i.platform,maxTouchPoints:navigator?.maxTouchPoints,screenWidth:P==null||(a=P.screen)==null?void 0:a.width,screenHeight:P==null||(o=P.screen)==null?void 0:o.height,devicePixelRatio:P?.devicePixelRatio},d=$i(l),d===ti||d===ei||d===`Kobo`||d===`Kindle Fire`||d===ji?$r:d===bi||d===Si||d===xi||d===Oi?`Console`:d===ri?`Wearable`:d?Xr:u?.userAgentDataPlatform===`Android`&&(u?.maxTouchPoints??0)>0?600>Math.min(u?.screenWidth??0,u?.screenHeight??0)/(u?.devicePixelRatio??1)?Xr:$r:`De
10sktop`),$timezone:Zc(),$timezone_offset:Qc()}),{$current_url:Ic(r?na(Qn?.href):Qn?.href,f,Vc),$host:Qn?.host,$pathname:Qn?.pathname,$raw_user_agent:rr.length>1e3?rr.substring(0,997)+`...`:rr,$browser_version:Zi(rr,navigator.vendor,h,g),$browser_language:Kc(),$browser_language_prefix:(c=Kc(),typeof c==`string`?c.split(`-`)[0]:void 0),$screen_height:P?.screen.height,$screen_width:P?.screen.width,$viewport_height:P?.innerHeight,$viewport_width:P?.innerWidth,$lib:ar.LIB_NAME,$lib_version:ar.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return ar.SDK_DIST_CHANNEL&&(_.$sdk_dist_channel=ar.SDK_DIST_CHANNEL),_}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties,this.config.detect_google_search_app,this.config.disable_capture_url_hashes);if(this.sessionManager){var{sessionId:u,windowId:d}=this.sessionManager.checkAndGetSessionAndWindowId(i,n.getTime());o.$session_id=u,o.$window_id=d}this.sessionPropsManager&&ls(o,this.sessionPropsManager.getSessionProps());try{this.sessionRecording&&ls(o,this.sessionRecording.sdkDebugProperties),o.$sdk_debug_retry_queue_size=this.Ni?.length}catch(e){o.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===Su&&(o.$lib_custom_api_host=this.config.api_host),c=e!==rs||i?e!==is||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(n):this.pageViewManager.doPageView(n,r),o=ls(o,c),e===rs&&F&&(o.title=F.title),!B(a)){var f=n.getTime()-a;o.$duration=parseFloat((f/1e3).toFixed(3))}rr&&this.config.opt_out_useragent_filter&&(o.$browser_type=this._is_bot()?`bot`:`browser`),(o=ls({},l,this.persistence.properties(),this.sessionPersistence.properties(),o)).$is_identified=this._isIdentified(),z(this.config.property_denylist)?cs(this.config.property_denylist,(function(e){delete o[e]})):H.error(Bu+this.config.property_denylist+` or property_blacklist config: `+this.config.property_blacklist);var p=this.config.sanitize_properties;p&&(H.error(zu),o=p(o,e));var m=this.Ji();return o.$process_person_profile=m,m&&!i&&this.Yi(`_calculate_event_properties`),o}Qi(e,t,n){if(t===void 0&&(t=!0),n===void 0&&(n=!1),!this.persistence||!this.Ji()||this.Ii&&!n)return e;var r=ls({},this.persistence.get_initial_props(),this.sessionPropsManager?.getSetOnceProps()||{},e||{}),i=this.config.sanitize_properties;return i&&(H.error(zu),r=i(r,`$set_once`)),t&&(this.Ii=!0),Mr(r)?void 0:r}register(e,t){var n;(n=this.persistence)==null||n.register(e,t)}register_once(e,t,n){var r;(r=this.persistence)==null||r.register_once(e,t,n)}register_for_session(e){var t;(t=this.sessionPersistence)==null||t.register(e)}unregister(e){var t;(t=this.persistence)==null||t.unregister(e)}unregister_for_session(e){var t;(t=this.sessionPersistence)==null||t.unregister(e)}Ki(e,t){this.register({[e]:t})}getFeatureFlag(e,t){return this.featureFlags?.getFeatureFlag(e,t)}getFeatureFlagPayload(e){return this.featureFlags?.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){return this.featureFlags?.getFeatureFlagResult(e,t)}isFeatureEnabled(e,t){return this.featureFlags?.isFeatureEnabled(e,t)}reloadFeatureFlags(){var e;(e=this.featureFlags)==null||e.reloadFeatureFlags()}updateFlags(e,t,n){var r;(r=this.featureFlags)==null||r.updateFlags(e,t,n)}updateEarlyAccessFeatureEnrollment(e,t,n){var r;(r=this.featureFlags)==null||r.updateEarlyAccessFeatureEnrollment(e,t,n)}getEarlyAccessFeatures(e,t,n){return t===void 0&&(t=!1),this.featureFlags?.getEarlyAccessFeatures(e,t,n)}on(e,t){return this.Ti.on(e,t)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:Ru}),()=>{})}onSessionId(e){return this.sessionManager?.onSessionId(e)??(()=>{})}getSurveys(e,t){t===void 0&&(t=!1),this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:Ru})}getActiveMatchingSurveys(e,t){t===void 0&&(t=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:Ru})}renderSurvey(e,t){var n;(n=this.surveys)==null||n.renderSurvey(e,t)}displaySurvey(e,t){var n;t===void 0&&(t=ku),(n=this.surveys)==null||n.displaySurvey(e,t)}cancelPendingSurvey(e){var t;(t=this.surveys)==null||t.cancelPendingSurvey(e)}canRenderSurvey(e){return this.surveys?.canRenderSurvey(e)??{visible:!1,disabledReason:Ru}}canRenderSurveyAsync(e,t){return t===void 0&&(t=!1),this.surveys?.canRenderSurveyAsync(e,t)??Promise.resolve({visible:!1,disabledReason:Ru})}Xi(e){return!e||Pr(e)?(H.critical(`Unique user id has not been set in posthog.identify`),!1):e===Go?(H.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())||(H.critical(`The string "`+e+`" was set in posthog.identify which indicates an error. This ID should be unique to the user and n
10ot a hardcoded string.`),!1)}identify(e,t,n){if(!this.__loaded||!this.persistence)return H.uninitializedWarning(`posthog.identify`);if(Ir(e)&&(e=e.toString(),H.warn(`The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.`)),this.Xi(e)&&this.Yi(`posthog.identify`)){var r=this.get_distinct_id();this.register({$user_id:e}),this.get_property(Qa)||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},``),e!==r&&e!==this.get_property($a)&&(this.unregister($a),this.register({distinct_id:e}));var i,a=(this.persistence.get_property(Lo)||Qo)===Qo;e!==r&&a?(this.persistence.set_property(Lo,$o),this.setPersonPropertiesForFlags({$set:t||{},$set_once:n||{}},!1),this.capture(as,{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:n||{}}),this.Ri=vu(e,t,n),(i=this.featureFlags)==null||i.setAnonymousDistinctId(r)):(t||n)&&this.setPersonProperties(t,n),e!==r&&(this.reloadFeatureFlags(),this.unregister(No))}}setPersonProperties(e,t){if((e||t)&&this.Yi(`posthog.setPersonProperties`)){var n=vu(this.get_distinct_id(),e,t);this.Ri===n?H.info(`A duplicate setPersonProperties call was made with the same properties. It has been ignored.`):(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},!0),this.capture(`$set`,{$set:e||{},$set_once:t||{}}),this.Ri=n)}}unsetPersonProperties(e){var t,n=(z(e)?e:[e]).filter((e=>Nr(e)&&e.length>0));n.length!==0&&this.Yi(`posthog.unsetPersonProperties`)&&((t=this.featureFlags)==null||t.unsetPersonPropertiesForFlags(n,!0),this.capture(`$set`,{$unset:n}),this.Ri=null)}group(e,t,n){if(e&&t){var r=this.getGroups(),i=r[e]!==t;if(i&&this.resetGroupPropertiesForFlags(e),this.register({$groups:L({},r,{[e]:t})}),i||n){var a={$group_type:e,$group_key:t};n&&(a.$group_set=n),this.capture(os,a)}n&&this.setGroupPropertiesForFlags({[e]:n}),i&&!n&&this.reloadFeatureFlags()}else H.error(`posthog.group requires a group type and group key`)}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){var n;t===void 0&&(t=!0),(n=this.featureFlags)==null||n.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(e){var t;e===void 0&&(e=!0),(t=this.featureFlags)==null||t.resetPersonPropertiesForFlags(e)}setGroupPropertiesForFlags(e,t){var n;t===void 0&&(t=!0),this.Yi(`posthog.setGroupPropertiesForFlags`)&&((n=this.featureFlags)==null||n.setGroupPropertiesForFlags(e,t))}resetGroupPropertiesForFlags(e){var t;(t=this.featureFlags)==null||t.resetGroupPropertiesForFlags(e)}reset(e){var t,n,r,i,a,o,s,c,l;if(H.info(`reset`),!this.__loaded)return H.uninitializedWarning(`posthog.reset`);var u,d=this.get_property(Qa),f=this.get_property(uo);if(this.consent.reset(),(t=this.persistence)==null||t.clear(),(n=this.sessionPersistence)==null||n.clear(),B(f)||(u=this.persistence)==null||u.register({[uo]:f}),(r=this.surveys)==null||r.reset(),(i=this.Wi)==null||i.stop(),(a=this.featureFlags)==null||a.reset(),(o=this.conversations)==null||o.reset(),(s=this.logs)==null||s.reset(),(c=this.persistence)==null||c.set_property(Lo,Qo),(l=this.sessionManager)==null||l.resetSessionId(),this.Ri=null,this.config.cookieless_mode===Zo)this.register_once({distinct_id:Go,$device_id:null},``);else{var p=this.config.get_device_id(Cs());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()}setIdentity(e,t){var n;this.config.identity_distinct_id=e,this.config.identity_hash=t,this.alias(e),(n=this.conversations)==null||n.en()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,(e=this.conversations)==null||e.tn()}get_distinct_id(){return this.get_property(`distinct_id`)}getGroups(){return this.get_property(`$groups`)||{}}get_session_id(){return this.sessionManager?.checkAndGetSessionAndWindowId(!0).sessionId??``}get_session_replay_url(e){if(!this.sessionManager)return``;var{sessionId:t,sessionStartTimestamp:n}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor(`ui`,`/project/`+this.config.token+`/replay/`+t);if(e!=null&&e.withTimestamp&&n){var i=e.timestampLookBack??10;if(!n)return r;r+=`?t=`+Math.max(Math.floor((new Date().getTime()-n)/1e3)-i,0)}return r}alias(e,t){return e===this.get_property(Za)?(H.critical(`Attempting to create alias for existing People user - aborting.`),-2):this.Yi(`posthog.alias`)?(B(t)&&(t=this.get_distinct_id()),e===t?(H.warn(`alias matches current distinct_id - skipping api call.`),this.identify(e),-1):(this.Ki($a,e),this.capture(`$create_alias`,{alias:e,distinct_id:t}))):void 0}set_config(e){var t=L({},this.config);if(jr(e)){var n,r,i,a,o,s,c,l,u,d,f;ls(this.config,Gu(e));var p=this.Ai();(n=this.persistence)==null||n.update_config(this.config,t,p),this.sessionPersistence=this.config.persistence===`
10sessionStorage`||this.config.persistence===`memory`?this.persistence:new nl(L({},this.config,{persistence:`sessionStorage`}),p,!1);var m=this.Oi(this.config.debug);Rr(m)&&(this.config.debug=m),Rr(this.config.debug)&&(this.config.debug?(ar.DEBUG=!0,ks.N()&&ks.q(`ph_debug`,!0),H.info(`set_config`,{config:e,oldConfig:t,newConfig:L({},this.config)})):(ar.DEBUG=!1,ks.N()&&ks.A(`ph_debug`))),(r=this.exceptionObserver)==null||r.onConfigChange(),(i=this.exceptions)==null||i.onConfigChange(),(a=this.sessionRecording)==null||a.startIfEnabledOrStop(),(o=this.tracingHeaders)==null||o.startIfEnabledOrStop(),(s=this.autocapture)==null||s.startIfEnabled(),(c=this.heatmaps)==null||c.startIfEnabled(),(l=this.exceptionObserver)==null||l.startIfEnabledOrStop(),(u=this.deadClicksAutocapture)==null||u.startIfEnabledOrStop(),(d=this.surveys)==null||d.loadIfEnabled(),this.rn(),(f=this.externalIntegrations)==null||f.startIfEnabledOrStop()}}_overrideSDKInfo(e,t){ar.LIB_NAME=e,ar.LIB_VERSION=t}startSessionRecording(e){var t,n,r,i,a,o=!0===e,s={sampling:o||!(e==null||!e.sampling),linked_flag:o||!(e==null||!e.linked_flag),url_trigger:o||!(e==null||!e.url_trigger),event_trigger:o||!(e==null||!e.event_trigger)};Object.values(s).some(Boolean)&&((t=this.sessionManager)==null||t.checkAndGetSessionAndWindowId(),s.sampling&&((n=this.sessionRecording)==null||n.overrideSampling()),s.linked_flag&&((r=this.sessionRecording)==null||r.overrideLinkedFlag()),s.url_trigger&&((i=this.sessionRecording)==null||i.overrideTrigger(`url`)),s.event_trigger&&((a=this.sessionRecording)==null||a.overrideTrigger(`event`))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,t){if(this.exceptions){var n=Error(`PostHog syntheticException`),r=this.exceptions.buildProperties(e,{handled:!0,syntheticException:n});return this.exceptions.sendExceptionEvent(L({},r,t))}}addExceptionStep(e,t){var n;(n=this.exceptions)==null||n.addExceptionStep(e,t)}captureLog(e){var t;(t=this.logs)==null||t.captureLog(e)}get logger(){return this.logs?.logger??e.nn}startExceptionAutocapture(e){this.set_config({capture_exceptions:e==null||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var t;return(t=this.toolbar?.loadToolbar(e))!=null&&t}get_property(e){return this.persistence?.props[e]}getSessionProperty(e){return this.sessionPersistence?.props[e]}toString(){var e=this.config.name??Vu;return e!==Vu&&(e=Vu+`.`+e),e}_isIdentified(){return this.persistence?.get_property(Lo)===$o||this.sessionPersistence?.get_property(Lo)===$o}Ji(){var e,t;return!(this.config.person_profiles===`never`||this.config.person_profiles===es&&!this._isIdentified()&&Mr(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[$a])&&((t=this.persistence)==null||(t=t.props)==null||!t[Uo]))}Gi(){return!0===this.config.capture_pageleave||this.config.capture_pageleave===`if_capture_pageview`&&(!0===this.config.capture_pageview||this.config.capture_pageview===`history_change`)}createPersonProfile(){this.Ji()||this.Yi(`posthog.createPersonProfile`)&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.Yi(`posthog.setInternalOrTestUser`)&&this.setPersonProperties({$internal_or_test_user:!0})}Yi(e){return this.config.person_profiles===`never`?(H.error(e+` was called, but process_person is set to "never". This call will be ignored.`),!1):(this.Ki(Uo,!0),!0)}Ai(){if(this.config.cookieless_mode===`always`)return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==Xo)}rn(){var e,t,n=this.Ai();return this.persistence?.Vt!==n&&((e=this.persistence)==null||e.set_disabled(n)),this.sessionPersistence?.Vt!==n&&((t=this.sessionPersistence)==null||t.set_disabled(n)),n}opt_in_capturing(t){var n;if(this.config.cookieless_mode!==Zo){if(this.Ci()){var r,i;this.reset(!0),(r=this.sessionManager)==null||r.destroy(),(i=this.pageViewManager)==null||i.destroy(),this.sessionManager=new hu(this),this.pageViewM
10anager=new kc(this),this.persistence&&(this.sessionPropsManager=new fu(this,this.sessionManager,this.persistence));var a,o=this.config.__extensionClasses?.sessionRecording??e.__defaultExtensionClasses?.sessionRecording;o&&(this.sessionRecording=this.ki(this.sessionRecording,new o(this)),this.Ui&&((a=this.sessionRecording)==null||a.onRemoteConfig==null||a.onRemoteConfig(this.Ui)))}var s;this.consent.optInOut(!0),this.rn(),this.zi(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode==Xo&&((s=this.surveys)==null||s.loadIfEnabled()),(B(t?.captureEventName)||t!=null&&t.captureEventName)&&this.capture(t?.captureEventName??`$opt_in`,t?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Vi()}else H.warn(Lu)}opt_out_capturing(){var e,t,n;this.config.cookieless_mode===Zo?H.warn(Lu):(this.config.cookieless_mode===Xo&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.rn(),this.config.cookieless_mode===Xo&&(this.register({distinct_id:Go,$device_id:null}),(e=this.sessionRecording)==null||e.stopRecording(),this.sessionRecording=void 0,(t=this.sessionManager)==null||t.destroy(),(n=this.pageViewManager)==null||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.Vi(),this.zi()))}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===1?`granted`:e===0?`denied`:`pending`}is_capturing(){return this.config.cookieless_mode===Zo||(this.config.cookieless_mode===Xo?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.rn()}_is_bot(){return Zn?gu(Zn,this.config.custom_blocked_useragents):void 0}Vi(){F&&(F.visibilityState===`visible`?this.Ei||(this.Ei=!0,this.capture(rs,{title:F.title},{send_instantly:!0}),this.Mi&&=(F.removeEventListener(ts,this.Mi),null)):this.Mi||(this.Mi=this.Vi.bind(this),gs(F,ts,this.Mi)))}debug(e){!1===e?(P?.console.log(`You've disabled debug mode.`),this.set_config({debug:!1})):(P?.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}))}mr(){var e,t,n,r,i,a,o=this.Li||{};return`advanced_disable_flags`in o?!!o.advanced_disable_flags:!1===this.config.advanced_disable_flags?!0===this.config.advanced_disable_decide?(H.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`,r=H,i=(t=`advanced_disable_flags`)in(e=o)&&!V(e[t]),a=n in e&&!V(e[n]),i?e[t]:!!a&&(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])):!!this.config.advanced_disable_flags}it(e){if(V(this.config.before_send))return e;var t=Object.keys(e.properties??{}).filter(Vr),n=z(this.config.before_send)?this.config.before_send:[this.config.before_send],r=e;for(var i of n){if(r=i(r),V(r)){var a=`Event '`+e.event+`' was rejected in beforeSend function`;return Br(e.event)?H.warn(a+`. This can cause unexpected behavior.`):H.info(a),null}r.properties&&!Mr(r.properties)||H.warn(`Event '`+e.event+`' has no properties after beforeSend function, this is likely an error.`)}for(var o of t)if(r.properties&&V(r.properties[o]))return H.warn(`Event '`+e.event+`' had its '`+o+`' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped.`),null;return r}getPageViewId(){return this.pageViewManager.Ot?.pageViewId}captureTraceFeedback(e,t){this.capture(`$ai_feedback`,{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,n){this.capture(`$ai_metric`,{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(n)})}Oi(e){var t=Rr(e)&&!e,n=ks.N()&&ks.P(`ph_debug`)===`true`;return!t&&(!!n||e)}};qu.__defaultExtensionClasses={},qu.nn={trace:Nu=()=>{},debug:Nu,info:Nu,warn:Nu,error:Nu,fatal:Nu},function(e,t){for(var n=0;t.length>n;n++)e.prototype[t[n]]=fs(e.prototype[t[n]])}(qu,[`identify`]);var Ju=class{constructor(e){this.disabled=!1===e;var t=jr(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,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}},Yu=`$copy_autocapture`,Xu=Ja(`[AutoCapture]`);function Zu(e,t){return t.length>e?t.slice(0,e)+`...`:t}function Qu(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!Bs(t));return t}function $u(e,t){var n,{e:r,maskAllElementAttributes:i,maskAllText:a,elementAttributeIgnoreList:o,elementsC
10hainAsString:s,disableCaptureUrlHashes:c}=t;if(!Bs(e))return{props:{}};for(var l=[e],u=e;u.parentNode&&!Vs(u,`body`);)if(Us(u.parentNode))l.push(u.parentNode.host),u=u.parentNode.host;else{if(!Bs(u.parentNode))break;l.push(u.parentNode),u=u.parentNode}var d,f,p=[],m={},h=!1,g=!1;if(cs(l,(e=>{var t=cc(e);if(Vs(e,`a`)){var n=e.getAttribute(`href`);h=!!(t&&n&&gc(n))&&(c?na(n):n)}R(Ks(e),`ph-no-capture`)&&(g=!0),p.push(function(e,t,n,r,i){i===void 0&&(i=!1);var a=e.tagName.toLowerCase(),o={tag_name:a};Xs.indexOf(a)>-1&&!n&&(o.$el_text=a.toLowerCase()===`a`||a.toLowerCase()===`button`?Zu(1024,_c(e)):Zu(1024,Js(e)));var s=Ks(e);s.length>0&&(o.classes=s.filter((function(e){return e!==``}))),cs(e.attributes,(function(n){var a;if((!lc(e)||[`name`,`id`,`class`,`aria-label`].indexOf(n.name)!==-1)&&(r==null||!r.includes(n.name))&&!t&&gc(n.value)&&(!Nr(a=n.name)||a.substring(0,10)!==`_ngcontent`&&a.substring(0,7)!==`_nghost`)){var s=n.value;n.name===`class`&&(s=Ws(s).join(` `)),o[`attr__`+n.name]=Zu(1024,n.name===`href`&&i?na(s):s)}}));for(var c=1,l=1,u=e;u=Qu(u);)c++,u.tagName===e.tagName&&l++;return o.nth_child=c,o.nth_of_type=l,o}(e,i,a,o,c)),ls(m,function(e){if(!cc(e))return{};var t={};return cs(e.attributes,(function(e){if(e.name&&e.name.indexOf(`data-ph-capture-attribute`)===0){var n=e.name.replace(`data-ph-capture-attribute-`,``),r=e.value;n&&r&&gc(r)&&(t[n]=r)}})),t}(e))})),g)return{props:{},explicitNoCapture:g};if(a||(p[0].$el_text=Vs(e,`a`)||Vs(e,`button`)?_c(e):Js(e)),h){var _;p[0].attr__href=h;var v=Pc(h)?.host,y=P==null||(_=P.location)==null?void 0:_.host;v&&y&&v!==y&&(d=h)}return{props:ls({$event_type:r.type,$ce_version:1},s?{}:{$elements:p},{$elements_chain:(f=p,function(e){return e.map((e=>{var t=``;if(e.tag_name&&(t+=e.tag_name),e.attr_class)for(var n of(e.attr_class.sort(),e.attr_class))t+=`.`+n.replace(/"/g,``);var r=L({},e.text?{text:e.text}:{},{"nth-child":e.nth_child??0,"nth-of-type":e.nth_of_type??0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),i={};return us(r).sort(((e,t)=>{var[n]=e,[r]=t;return n.localeCompare(r)})).forEach((e=>{var[t,n]=e;return i[yc(t.toString())]=yc(n.toString())})),(t+=`:`)+us(i).map((e=>{var[t,n]=e;return t+`="`+n+`"`})).join(``)})).join(`;`)}(function(e){return e.map((e=>{var t={text:e.$el_text?.slice(0,400),tag_name:e.tag_name,href:e.attr__href?.slice(0,2048),attr_class:bc(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return us(e).filter((e=>{var[t]=e;return t.indexOf(`attr__`)===0})).forEach((e=>{var[n,r]=e;return t.attributes[n]=r})),t}))}(f)))},(n=p[0])!=null&&n.$el_text?{$el_text:p[0]?.$el_text}:{},d&&r.type===`click`?{$external_click_url:d}:{},m)}}var ed=Ja(`[ExceptionAutocapture]`),td=Ja(`[TracingHeaders]`),nd=Ja(`[Web Vitals]`),rd=9e5,id=`disabled`,ad=`lazy_loading`,od=`awaiting_config`,sd=`missing_config`;Ja(`[SessionRecording]`),Ja(`[SessionRecording]`);var cd=`[SessionRecording]`,ld=Ja(cd),ud=Ja(`[Heatmaps]`);function dd(e){return jr(e)&&`clientX`in e&&`clientY`in e&&Ir(e.clientX)&&Ir(e.clientY)}var fd=Ja(`[Product Tours]`),pd=e=>{var t;return!e.config.disable_product_tours&&!((t=e.persistence)==null||!t.get_property(co))},md=[`$set_once`,`$set`],hd=Ja(`[SiteApps]`),gd=`Error while initializing PostHog app with config id `;function _d(e,t,n){if(V(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{return!1}default:return!1}}var vd=class{constructor(e){this.sn=new pu,this.an=(e,t)=>this.ln(e,t)&&this.un(e,t)&&this.hn(e,t)&&this.dn(e,t),this.ln=(e,t)=>t==null||!t.event||e?.event===t?.event,this._instance=e,this.cn=new Set,this.vn=new Set}init(){var e;B(this._instance?._addCaptureHook)||(e=this._instance)==null||e._addCaptureHook(((e,t)=>{this.on(e,t)}))}register(e){var t;if(!B(this._instance?._addCaptureHook)&&(e.forEach((e=>{var t,n;(t=this.vn)==null||t.add(e),(n=e.steps)==null||n.forEach((e=>{var t;(t=this.cn)==null||t.add(e?.event||``)}))})),(t=this._instance)!=null&&t.autocapture)){var n,r=new Set;e.forEach((e=>{var t;(t=e.steps)==null||t.forEach((e=>{e!=null&&e.selector&&r.add(e?.selector)}))}
10)),(n=this._instance)==null||n.autocapture.setElementSelectors(r)}}on(e,t){t!=null&&e.length!=0&&(this.cn.has(e)||this.cn.has(t?.event))&&this.vn&&this.vn?.size>0&&this.vn.forEach((e=>{this.fn(t,e)&&this.sn.emit(`actionCaptured`,e.name)}))}pn(e){this.onAction(`actionCaptured`,(t=>e(t)))}fn(e,t){if(t?.steps==null)return!1;for(var n of t.steps)if(this.an(e,n))return!0;return!1}onAction(e,t){return this.sn.on(e,t)}un(e,t){if(t!=null&&t.url){var n,r=e==null||(n=e.properties)==null?void 0:n.$current_url;if(!r||typeof r!=`string`||!_d(r,t.url,t.url_matching||`contains`))return!1}return!0}hn(e,t){return!!this.gn(e,t)&&!!this.mn(e,t)&&!!this.yn(e,t)}gn(e,t){var n;if(t==null||!t.href)return!0;var r=this.bn(e);if(r.length>0)return r.some((e=>_d(e.href,t.href,t.href_matching||`exact`)));var i,a=(e==null||(n=e.properties)==null?void 0:n.$elements_chain)||``;return!!a&&_d((i=a.match(/(?::|")href="(.*?)"/))?i[1]:``,t.href,t.href_matching||`exact`)}mn(e,t){var n;if(t==null||!t.text)return!0;var r=this.bn(e);if(r.length>0)return r.some((e=>_d(e.text,t.text,t.text_matching||`exact`)||_d(e.$el_text,t.text,t.text_matching||`exact`)));var i,a,o,s=(e==null||(n=e.properties)==null?void 0:n.$elements_chain)||``;return!!s&&(i=function(e){for(var t,n=[],r=/(?::|")text="(.*?)"/g;!V(t=r.exec(e));)n.includes(t[1])||n.push(t[1]);return n}(s),a=t.text,o=t.text_matching||`exact`,i.some((e=>_d(e,a,o))))}yn(e,t){var n,r;if(t==null||!t.selector)return!0;var i=e==null||(n=e.properties)==null?void 0:n.$element_selectors;if(i!=null&&i.includes(t.selector))return!0;var a=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||``;if(t.selector_regex&&a)try{return new RegExp(t.selector_regex).test(a)}catch{return!1}return!1}bn(e){var t;return(e==null||(t=e.properties)==null?void 0:t.$elements)==null?[]:e?.properties.$elements}dn(e,t){return t==null||!t.properties||t.properties.length===0||xu(t.properties.reduce(((e,t)=>{var n=z(t.value)?t.value.map(String):t.value==null?[]:[String(t.value)];return e[t.key]={values:n,operator:t.operator||`exact`},e}),{}),e?.properties)}},yd=class{constructor(e){this._n=[],this._instance=e,this.wn=new Map,this.xn=new Map,this.kn=new Map}Sn(e,t){return!!e&&xu(e.propertyFilters,t?.properties)}Cn(e,t){var n=new Map;return e.forEach((e=>{var r;(r=e.conditions)==null||(r=r[t])==null||(r=r.values)==null||r.forEach((t=>{if(t!=null&&t.name){var r=n.get(t.name)||[];r.push(e.id),n.set(t.name,r)}}))})),n}In(e,t,n){var r=(n===rl.Activation?this.wn:this.xn).get(e),i=[];return this.Tn((e=>{i=e.filter((e=>r?.includes(e.id)))})),i.filter((r=>{var i,a=(i=r.conditions)==null||(i=i[n])==null||(i=i.values)==null?void 0:i.find((t=>t.name===e));return this.Sn(a,t)}))}register(e){B(this._instance?._addCaptureHook)||(this.En(e),this.Mn(e))}Mn(e){var t=e.filter((e=>{var t;return e.conditions?.actions&&((t=e.conditions)==null||(t=t.actions)==null||(t=t.values)==null?void 0:t.length)>0}));t.length!==0&&(this.Pn??(this.Pn=new vd(this._instance),this.Pn.init(),this.Pn.pn((e=>{this.onAction(e)}))),t.forEach((e=>{var t,n,r,i,a;e.conditions&&(t=e.conditions)!=null&&t.actions&&(n=e.conditions)!=null&&(n=n.actions)!=null&&n.values&&((r=e.conditions)==null||(r=r.actions)==null||(r=r.values)==null?void 0:r.length)>0&&((i=this.Pn)==null||i.register(e.conditions.actions.values),(a=e.conditions)==null||(a=a.actions)==null||(a=a.values)==null||a.forEach((t=>{if(t&&t.name){var n=this.kn.get(t.name);n&&n.push(e.id),this.kn.set(t.name,n||[e.id])}})))})))}En(e){var t,n=e.filter((e=>{var t;return e.conditions?.events&&((t=e.conditions)==null||(t=t.events)==null||(t=t.values)==null?void 0:t.length)>0})),r=e.filter((e=>{var t;return e.conditions?.cancelEvents&&((t=e.conditions)==null||(t=t.cancelEvents)==null||(t=t.values)==null?void 0:t.length)>0}));n.length===0&&r.length===0||((t=this._instance)==null||t._addCaptureHook(((e,t)=>{this.onEvent(e,t)})),this.wn=this.Cn(e,rl.Activation),this.xn=this.Cn(e,rl.Cancellation))}onEvent(e,t){var n,r,i=this.Rn(),a=(t==null||(n=t.properties)==null?void 0:n.$survey_id)||(t==null||(r=t.properties)==null?void 0:r.$product_tour_id);if(a&&this.getActivatedIds().includes(a)){var o=this.On(e,a);if(o===`consume`)return i.info(`event consumed activated item, remov
10ing it`,{event:e,itemId:a}),void this.Ln([a]);if(o===`persist`)return i.info(`shown item promoted to persisted activation`,{event:e,itemId:a}),void this.Fn(a)}if(this.xn.has(e)){var s=this.In(e,t,rl.Cancellation);s.length>0&&(i.info(`cancel event matched, cancelling items`,{event:e,itemsToCancel:s.map((e=>e.id))}),this.Ln(s.map((e=>e.id))),s.forEach((e=>this.An(e.id))))}if(this.wn.has(e)){i.info(`event name matched`,{event:e,eventPayload:t,items:this.wn.get(e)});var c=this.In(e,t,rl.Activation);this.$n(c.map((e=>e.id)))}}onAction(e){this.kn.has(e)&&this.$n(this.kn.get(e)||[])}$n(e){e.length!==0&&(this._n=[...new Set([...this._n,...e])],this.Rn().info(`updating activated items`,{activatedItems:this.getActivatedIds()}))}Fn(e){this._n=this._n.filter((t=>t!==e));var t=this.Dn();t.includes(e)||this.Nn([...t,e])}Ln(e){var t=new Set(e);this._n=this._n.filter((e=>!t.has(e)));var n=this.Dn(),r=n.filter((e=>!t.has(e)));r.length!==n.length&&this.Nn(r)}Dn(){var e,t=this.qn();return((e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[t])||[]}getActivatedIds(){return[...new Set([...this.Dn(),...this._n])].filter((e=>!this.Bn(e)))}reset(){this._n=[],this.Dn().length>0&&this.Nn([])}getEventToItemsMap(){return this.wn}jn(){return this.Pn}},bd=class extends yd{constructor(e){super(e)}qn(){return jo}Hn(){return ol.SHOWN}Tn(e){var t;(t=this._instance)==null||t.getSurveys(e)}An(e){var t;(t=this._instance)==null||t.cancelPendingSurvey(e)}Rn(){return Eu}Nn(e){var t;(t=this._instance)==null||(t=t.persistence)==null||t.register({[jo]:e})}Bn(){return!1}On(e,t){var n;return this.Tn((e=>{n=e.find((e=>e.id===t))})),!n||function(e){var t,n,r=(((t=e.conditions)==null||(t=t.events)==null||(t=t.values)==null?void 0:t.length)??0)>0;return e.schedule===al.Always||!((n=e.conditions)==null||(n=n.events)==null||!n.repeatedActivation||!r)}(n)?e===ol.SHOWN?`consume`:`ignore`:e===ol.SHOWN?`persist`:e===ol.DISMISSED||e===ol.SENT?`consume`:`ignore`}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}},xd=`SDK is not enabled or survey functionality is not yet loaded`,Sd=`Disabled. Not loading surveys.`,Cd=P!=null&&P.location?Lc(P.location.hash,`__posthog`)||Lc(location.hash,`state`):null,wd=`_postHogToolbarParams`,Td=Ja(`[Toolbar]`),Ed=Ja(`[FeatureFlags]`),Dd=Ja(`[FeatureFlags]`,{debugEnabled:!0}),Od=`" failed. Feature flags didn't load in time.`,kd=e=>{for(var t={},n=0;e.length>n;n++)t[e[n]]=!0;return t},Ad=e=>{var t={};for(var[n,r]of us(e||{}))r&&(t[n]=r);return t},jd=Ja(`[Error tracking]`),Md=`Refusing to render web experiment since the viewer is a likely bot`,Nd={icontains:(e,t)=>!!P&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!P&&t.href.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>!!P&&_u(t.href,e),not_regex:(e,t)=>!!P&&!_u(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e},Pd=class e{get Se(){return this._instance.config}constructor(t){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(t){t===void 0&&(t=!1),n.getWebExperiments((t=>{e.Un(`retrieved web experiments from the server`),n.zn=new Map,t.forEach((t=>{if(t.feature_flag_key){var r;n.zn&&(e.Un(`setting flag key `,t.feature_flag_key,` to web experiment `,t),(r=n.zn)==null||r.set(t.feature_flag_key,t));var i=n._instance.getFeatureFlag(t.feature_flag_key);Nr(i)&&t.variants[i]&&n.Vn(t.name,i,t.variants[i].transforms)}else if(t.variants)for(var a in t.variants){var o=t.variants[a];e.Wn(o)&&n.Vn(t.name,a,o.transforms)}}))}),t)},this._instance=t,this._instance.onFeatureFlags((e=>{this.onFeatureFlags(e)}))}initialize(){}onFeatureFlags(t){if(this._is_bot())e.Un(Md);else if(!this.Se.disable_web_experiments){if(V(this.zn))return this.zn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();e.Un(`applying feature flags`,t),t.forEach((e=>{var t;if(this.zn&&(t=this.zn)!=null&&t.has(e)){var n=this._instance.getFeatureFlag(e),r=this.zn?.get(e);n&&r!=null&&r.variants[n]&&this.Vn(r.name,n,r.variants[n].transforms)}}))}}previewWebExperiment(){var t=e.getWindowLocation();if(t!=null&&t.search){var n=Fc(t?.search,`__experiment_id`),r=Fc(t?.search,`__experiment_variant`);n&&r&&(e.Un(`previewing web experiments `+n+` && `+r),this.getWebExperiments((e=>{this.Gn(parseInt(n),r,e)}),!1,!0))}}loadIfEnabled(){this.Se.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}
10getWebExperiments(e,t,n){if(this.Se.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.Se.token),method:`GET`,callback:t=>e(t.statusCode===200&&t.json&&t.json.experiments||[])})}Gn(t,n,r){var i=r.filter((e=>e.id===t));i&&i.length>0&&(e.Un(`Previewing web experiment [`+i[0].name+`] with variant [`+n+`]`),this.Vn(i[0].name,n,i[0].variants[n].transforms))}static Wn(t){return!V(t.conditions)&&e.Zn(t)&&e.Qn(t)}static Zn(t){if(V(t.conditions)||V(t.conditions?.url))return!0;var n,r=e.getWindowLocation();return!!r&&((n=t.conditions)==null||!n.url||Nd[t.conditions?.urlMatchType??`icontains`](t.conditions.url,r))}static getWindowLocation(){return P?.location}static Qn(e){if(V(e.conditions)||V(e.conditions?.utm))return!0;var t=Uc();if(t.utm_source){var n,r,i,a,o,s,c,l,u=(n=e.conditions)==null||(n=n.utm)==null||!n.utm_campaign||((r=e.conditions)==null||(r=r.utm)==null?void 0:r.utm_campaign)==t.utm_campaign,d=(i=e.conditions)==null||(i=i.utm)==null||!i.utm_source||((a=e.conditions)==null||(a=a.utm)==null?void 0:a.utm_source)==t.utm_source,f=(o=e.conditions)==null||(o=o.utm)==null||!o.utm_medium||((s=e.conditions)==null||(s=s.utm)==null?void 0:s.utm_medium)==t.utm_medium,p=(c=e.conditions)==null||(c=c.utm)==null||!c.utm_term||((l=e.conditions)==null||(l=l.utm)==null?void 0:l.utm_term)==t.utm_term;return u&&f&&p&&d}return!1}static Un(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];H.info(`[WebExperiments] `+e,n)}Vn(t,n,r){this._is_bot()?e.Un(Md):n===`control`?e.Un(`Control variants leave the page unmodified.`):r.forEach((r=>{r.selector&&(e.Un(`applying transform of variant `+n+` for experiment `+t+` `,r),(document?.querySelectorAll(r.selector))?.forEach((e=>{var t=e;r.html&&(t.innerHTML=r.html),r.css&&t.setAttribute(`style`,r.css)})))}))}_is_bot(){return Zn&&this._instance?gu(Zn,this.Se.custom_blocked_useragents):void 0}},Fd=Ja(`[Conversations]`),Id=`Conversations not available yet.`,Ld=`console`,Rd={featureFlags:class{constructor(e){this.Jn=!1,this.Yn=!1,this.Kn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.ns=!1,this._instance=e,this.featureFlagEventHandlers=[]}get Se(){return this._instance.config}get zr(){return this._instance.persistence}ss(e){return this._instance.get_property(e)}os(){var e;return(e=this.zr?.Gt(this.Se.feature_flag_cache_ttl_ms))!=null&&e}ls(){return!!this.os()&&(this.ns||this.Kn||(this.ns=!0,Ed.warn(`Feature flag cache is stale, triggering refresh...`),this.reloadFeatureFlags()),!0)}us(){var e=this.Se.evaluation_contexts??this.Se.evaluation_environments;return!this.Se.evaluation_environments||this.Se.evaluation_contexts||this.rs||(Ed.warn(`evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version.`),this.rs=!0),e!=null&&e.length?e.filter((e=>{var t=e&&typeof e==`string`&&e.trim().length>0;return t||Ed.error(`Invalid evaluation context found:`,e,`Expected non-empty string`),t})):[]}hs(){return this.us().length>0}ds(){var e=this.Se.flag_keys;if(!B(e)){if(z(e))return e.filter((e=>{var t=e&&typeof e==`string`&&e.trim().length>0;return t||Ed.error(`Invalid flag key found:`,e,`Expected non-empty string`),t}));Ed.error(`Invalid flag_keys found:`,e,`Expected array of non-empty strings`)}}initialize(){var{config:e}=this._instance,t=e.bootstrap?.featureFlags??{};if(Object.keys(t).length){var n=e.bootstrap?.featureFlagPayloads??{},r=Object.keys(t).filter((e=>!!t[e])).reduce(((e,n)=>(e[n]=t[n]||!1,e)),{}),i=Object.keys(n).filter((e=>r[e])).reduce(((e,t)=>(n[t]&&(e[t]=n[t]),e)),{});this.receivedFeatureFlags({featureFlags:r,featureFlagPayloads:i})}}updateFlags(e,t,n){var r,i,a=n!=null&&n.merge&&(r=this.ss(yo))!=null?r:{},o=n!=null&&n.merge&&(i=this.ss(Co))!=null?i:{},s=L({},a,e),c=L({},o,t),l={};for(var[u,d]of Object.entries(s))l[u]={key:u,enabled:ur(d),variant:dr(d),reason:void 0,metadata:B(c?.[u])?void 0:{id:0,version:void 0,description:void 0,payload:c[u]}};this.receivedFeatureFlags({flags:l})}get hasLoadedFlags(){return this.Yn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.ss(So),t=this.ss(To),n=this.ss(Eo);if(!n&&!t)return e||{};var r=ls({},e||{});for(var i of[...new Set([...Object.keys(n||{}),...Object.keys(t||{})])]){var a,o,s=r[i],c=t?.[i],l=B(c)?(a=s?.enabled)!=null&&a:!!c,u=B(c)?s.variant:typeof c==`string`?c:void 0,d=n?.[i],f=L({},s,{enabled:l,variant:l?u??s?.variant:void 0});l!==s?.enabled&&(f.original_enabled=s?.enabled),u!==s?.variant&&(f.original_variant=s?.variant),d&&(f.metadata=L({},s?.metadata,{payload:d,original_payload:s==null||(o=s.metadata)==null?void 0:o.payload})),r[i]=f}return this.Jn||=(Ed.warn(` Overriding feature flag details!`,{flagDetails:e,overriddenPayloads:n,finalDetails:r}),!0),r}getFlagVariants(){var e=this.ss(yo),t=this.ss(To);if(!t)return e||{};for(var n=ls({},e),r=Object.keys(t),i=0;r.length>i;i++)n[r[i]]=t[r[i]];return this.Jn||=(Ed.warn(` Overriding feature flags!`,{enabledFlags:e,overriddenFlags:t,finalFlags:n}),!0),n}getFlagPayloads(){var e=this.ss(Co),t=this.ss(Eo);if(!t)return e||{};for(var n=ls({},e||{}),r=Object.keys(t),i=0;r.length>i;i++)n[r[i]]=t[r[i]];return this.Jn||=(Ed.warn(` Overriding feature flag payloads!`,{flagPayloads:e,overriddenPayloads:t,finalPayloads:n}),!0),n}reloadFeatureFlags(){this.Xn||this.Se.advanced_disable_feature_flags||this.cs||(this._instance.Ti.emit(`featureFlagsReloading`,!0),this.cs=setTimeout((()=>{this.vs()}),5))}fs(){clearTimeout(this.cs),this.cs=void 0}ensureFlagsLoaded(){this.Yn||this.Kn||this.cs||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.Xn=e}vs(e){if(this.fs(),!this._instance.mr())if(this.Kn)this.es=!0;else{var t=this.Se.token,n=this.ss(Qa),r={token:t,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:L({},this.zr?.get_initial_props()||{},this.ss(Do)||{}),group_properties:this.ss(Oo),timezone:Zc()};Fr(n)||B(n)||(r.$device_id=n),(e!=null&&e.disableFlags||this.Se.advanced_disable_feature_flags)&&(r.disable_flags=!0),this.hs()&&(r.evaluation_contexts=this.us());var i=this.ds();B(i)||(r.flag_keys=i);var a=!!this.Se.advanced_only_evaluate_survey_feature_flags,o=this._instance.requestRouter.endpointFor(`flags`,`/flags/?v=2`+(this.Se.advanced_only_evaluate_survey_feature_flags?`&only_evaluate_survey_feature_flags=true`:``));this.Kn=!0,this._instance._send_request({method:`POST`,url:o,data:r,compression:this.Se.disable_compression?void 0:hl.Base64,timeout:this.Se.feature_flag_request_timeout_ms,callback:e=>{var t,n,i,o=!0;if(e.statusCode===200&&(this.es||(this.$anon_distinct_id=void 0),o=!1),this.Kn=!1,!r.disable_flags||this.es){this.ts=!o;var s=[];e.error?e.error instanceof Error?s.push(e.error.name===`AbortError`?`timeout`:`connection_error`):s.push(`unknown_error`):e.statusCode!==200&&s.push(`api_error_`+e.statusCode),(t=e.json)!=null&&t.errorsWhileComputingFlags&&s.push(`errors_while_computing_flags`);var c=!((n=e.json)==null||(n=n.quotaLimited)==null||!n.includes(`feature_flags`));c&&s.push(`quota_limited`),(i=this.zr)==null||i.register({[Fo]:s}),c?Ed.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.`):(r.disable_flags||this.receivedFeatureFlags(e.json??{},o,{partialResponse:a}
10),this.es&&(this.es=!1,this.vs()))}}})}}getFeatureFlag(e,t){if(t===void 0&&(t={}),!t.fresh||this.ts)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var n=this.getFeatureFlagResult(e,t);return n?.variant??n?.enabled}}else Ed.warn(`getFeatureFlag for key "`+e+Od)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){return this.getFeatureFlagResult(e,{send_event:!1})?.payload}getFeatureFlagResult(e,t){if(t===void 0&&(t={}),!t.fresh||this.ts)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var n=this.getFlagVariants(),r=e in n,i=n[e],a=this.getFlagPayloads()[e],o=String(i),s=this.ss(wo)||void 0,c=this.ss(Io)||void 0,l=this.ss(No)||{};if(this.Se.advanced_feature_flags_dedup_per_session){var u,d=this._instance.get_session_id(),f=this.ss(Po);d&&d!==f&&(l={},(u=this.zr)==null||u.register({[No]:l,[Po]:d}))}if((t.send_event||!(`send_event`in t))&&(!(e in l)||!l[e].includes(o))){var p,m,h,g,_,v,y,b;z(l[e])?l[e].push(o):l[e]=[o],(p=this.zr)==null||p.register({[No]:l});var x=this.getFeatureFlagDetails(e),S=[...this.ss(Fo)??[]];B(i)&&S.push(`flag_missing`);var C={$feature_flag:e,$feature_flag_response:i,$feature_flag_payload:a||null,$feature_flag_request_id:s,$feature_flag_evaluated_at:c,$feature_flag_bootstrapped_response:((m=this.Se.bootstrap)==null||(m=m.featureFlags)==null?void 0:m[e])||null,$feature_flag_bootstrapped_payload:((h=this.Se.bootstrap)==null||(h=h.featureFlagPayloads)==null?void 0:h[e])||null,$used_bootstrap_value:!this.ts};B(x==null||(g=x.metadata)==null?void 0:g.version)||(C.$feature_flag_version=x.metadata.version);var w,T=(x==null||(_=x.reason)==null?void 0:_.description)??(x==null||(v=x.reason)==null?void 0:v.code);T&&(C.$feature_flag_reason=T),x!=null&&(y=x.metadata)!=null&&y.id&&(C.$feature_flag_id=x.metadata.id),B(x?.original_variant)&&B(x?.original_enabled)||(C.$feature_flag_original_response=B(x.original_variant)?x.original_enabled:x.original_variant),x!=null&&(b=x.metadata)!=null&&b.original_payload&&(C.$feature_flag_original_payload=x==null||(w=x.metadata)==null?void 0:w.original_payload),S.length&&(C.$feature_flag_error=S.join(`,`)),this._instance.capture(`$feature_flag_called`,C)}if(r)return{key:e,enabled:!!i,variant:typeof i==`string`?i:void 0,payload:lr(a)}}}else Ed.warn(`getFeatureFlagResult for key "`+e+Od)}getRemoteConfigPayload(e,t){var n=this.Se.token,r={distinct_id:this._instance.get_distinct_id(),token:n};this.hs()&&(r.evaluation_contexts=this.us());var i=this.ds();B(i)||(r.flag_keys=i),this._instance._send_request({method:`POST`,url:this._instance.requestRouter.endpointFor(`flags`,`/flags/?v=2`),data:r,compression:this.Se.disable_compression?void 0:hl.Base64,timeout:this.Se.feature_flag_request_timeout_ms,callback(n){var r=n.json?.featureFlagPayloads;t(r?.[e]||void 0)}})}isFeatureEnabled(e,t){if(t===void 0&&(t={}),!t.fresh||this.ts){if(this.Yn||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(e,t);return B(n)?void 0:!!n}Ed.warn(`isFeatureEnabled for key "`+e+Od)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((t=>t!==e))}receivedFeatureFlags(e,t,n){if(this.zr){this.Yn=!0;var r=this.getFlagVariants(),i=this.getFlagPayloads(),a=this.getFlagsWithDetails();(function(e,t,n,r,i,a){n===void 0&&(n={}),r===void 0&&(r={}),i===void 0&&(i={});var o=(e=>{var t=e.flags;return t?(e.featureFlags=Object.fromEntries(Object.keys(t).map((e=>[e,t[e].variant??t[e].enabled]))),e.featureFlagPayloads=Object.fromEntries(Object.keys(t).filter((e=>t[e].enabled)).filter((e=>t[e].metadata?.payload)).map((e=>[e,t[e].metadata?.payload])))):e.featureFlags&&Ed.warn(`Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version`),e})(e),s=o.flags,c=o.featureFlags,l=o.featureFlagPayloads;if(c){var u=e.requestId,d=e.evaluatedAt;if(z(c)){Ed.warn(`v1 of the feature flags endpoint is deprecated. Please use the latest version.`);var f={};if(c)for(var p=0;c.length>p;p++)f[c[p]]=!0;t&&t.register({[bo]:c,[yo]:f})}else{var m=c,h=l,g=s;if(a!=null&&a.partialResponse)m=L({},n,m),h=L({},r,h),g=L({},i,g);else if(e.errorsWhileComputingFlags)if(s){var _=new Set(Object.keys(s).filter((e=>{var t;return!((t=s[e])!=null&&t.failed)})));m=L({},n,Object.fromEntries(Object.entries(m).filter((e=>{var[t]=e;return _.has(t)})))),h=L({},r,Object.fromEntries(Object.entries(h||{}).filter((e=>{var[t]=e;return _.has(t)})))),g=L({},i,Object.fromEntries(Object.entries(g||{}).filter((e=>{var[t]=e;return _.has(t)}))))}else m=L({},n,m),h=L({},r,h),g=L({},i,g);t&&t.register(L({[bo]:Object.keys(Ad(m)),[yo]:m||{},[Co]:h||{},[So]:g||{}},u?{[wo]:u}:{},d?{[Io]:d}:{}))}}})(e,this.zr,r,i,a,n),t||(this.ns=!1),this.ps(t)}}override(e,t){t===void 0&&(t=!1),Ed.warn(`override is deprecated. Please use overrideFeatureFlags instead.`),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.zr)return Ed.uninitializedWarning(`posthog.featureFlags.overrideFeatureFlags`);if(!1===e)return this.zr.unregister(To),this.zr.unregister(Eo),this.ps(),Dd.info(`All overrides cleared`);if(z(e)){var t=kd(e);return this.zr.register({[To]:t}),this.ps(),Dd.info(`Flag overrides set`,{flags:e})}if(e&&typeof e==`object`&&(`flags`in e||`payloads`in e)){var n,r=e;if(this.Jn=!!((n=r.suppressWarning)!=null&&n),`flags`in r){if(!1===r.flags)this.zr.unregister(To),Dd.info(`Flag overrides cleared`);else if(r.flags){if(z(r.flags)){var i=kd(r.flags);this.zr.register({[To]:i})}else this.zr.register({[To]:r.flags});Dd.info(`Flag overrides set`,{flags:r.flags})}}`payloads`in r&&(!1===r.payloads?(this.zr.unregister(Eo),Dd.info(`Payload overrides cleared`)):r.payloads&&(this.zr.register({[Eo]:r.payloads}),Dd.info(`Payload overrides set`,{payloads:r.payloads}))),this.ps();return}if(e&&typeof e==`object`)return this.zr.register({[To]:e}),this.ps(),Dd.info(`Flag overrides set`,{flags:e});Ed.warn(`Invalid overrideOptions provided to overrideFeatureFlags`,{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Yn){var{flags:t,flagVariants:n}=this.gs();e(t,n)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,n){var r,i=(this.ss(xo)||[]).find((t=>t.flagKey===e)),a={[`$feature_enrollment/`+e]:t},o={$feature_flag:e,$feature_enrollment:t,$set:a};i&&(o.$early_access_feature_name=i.name),n&&(o.$feature_enrollment_stage=n),this._instance.capture(`$feature_enrollment_update`,o),this.setPersonPropertiesForFlags(a,!1);var s=L({},this.getFlagVariants(),{[e]:t});(r=this.zr)==null||r.register({[bo]:Object.keys(Ad(s)),[yo]:s}),this.ps()}
10getEarlyAccessFeatures(e,t,n){t===void 0&&(t=!1);var r=this.ss(xo),i=n?`&`+n.map((e=>`stage=`+e)).join(`&`):``;if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor(`api`,`/api/early_access_features/?token=`+this.Se.token+i),method:`GET`,callback:t=>{var n,r;if(t.json){var i=t.json.earlyAccessFeatures;return(n=this.zr)==null||n.unregister(xo),(r=this.zr)==null||r.register({[xo]:i}),e(i)}}})}gs(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter((e=>t[e])),flagVariants:Object.keys(t).filter((e=>t[e])).reduce(((e,n)=>(e[n]=t[n],e)),{})}}ps(e){var{flags:t,flagVariants:n}=this.gs();this.featureFlagEventHandlers.forEach((r=>r(t,n,{errorsLoading:e})))}setPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=this.ss(Do)||{},r=e?.$set||(e!=null&&e.$set_once?{}:e),i=e?.$set_once,a={};if(i)for(var o in i)({}).hasOwnProperty.call(i,o)&&(o in n||(a[o]=i[o]));this._instance.register({[Do]:L({},n,a,r)}),t&&this._instance.reloadFeatureFlags()}unsetPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=L({},this.ss(Do)||{});e.forEach((e=>{delete n[e]})),this._instance.register({[Do]:n}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(e){e===void 0&&(e=!0),this._instance.unregister(Do),e&&this._instance.reloadFeatureFlags()}setGroupPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=this.ss(Oo)||{};Object.keys(n).length!==0&&Object.keys(n).forEach((t=>{n[t]=L({},n[t],e[t]),delete e[t]})),this._instance.register({[Oo]:L({},n,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.ss(Oo)||{};this._instance.register({[Oo]:L({},t,{[e]:{}})})}else this._instance.unregister(Oo)}reset(){this.Yn=!1,this.Kn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.$anon_distinct_id=void 0,this.fs(),this.Jn=!1}}},zd={sessionRecording:class{get Se(){return this._instance.config}get zr(){return this._instance.persistence}get started(){var e;return!((e=this.ys)==null||!e.isStarted)}get status(){return this.bs===od||this.bs===sd?this.bs:this.ys?.status??this.bs}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.bs=id,this._s=void 0,this._instance=e,!this._instance.sessionManager)throw ld.error(`started without valid sessionManager`),Error(cd+` started without valid sessionManager. This is a bug.`);if(this.Se.cookieless_mode===Zo)throw Error(cd+` cannot be used with cookieless_mode="always"`)}initialize(){this.startIfEnabledOrStop()}get ws(){var e,t=!((e=this._instance.get_property(uo))==null||!e.enabled),n=!this.Se.disable_session_recording,r=this.Se.disable_session_recording||this._instance.consent.isOptedOut();return P&&t&&n&&!r}startIfEnabledOrStop(e){var t;if(!this.ws||(t=this.ys)==null||!t.isStarted){var n=!B(Object.assign)&&!B(Array.from);this.ws&&n?(this.xs(e),ld.info(`starting`)):(this.bs=id,this.stopRecording())}}xs(e){var t,n,r;this.ws&&(this.bs!==od&&this.bs!==sd&&(this.bs=ad),I!=null&&(t=I.__PosthogExtensions__)!=null&&(t=t.rrweb)!=null&&t.record&&(n=I.__PosthogExtensions__)!=null&&n.initSessionRecording?this.ks(e):(r=I.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.Ss,(t=>{if(t)return ld.error(`could not load recorder`,t);this.ks(e)})))}stopRecording(){var e,t;(e=this._s)==null||e.call(this),this._s=void 0,(t=this.ys)==null||t.stop()}Cs(){var e,t;(e=this._s)==null||e.call(this),this._s=void 0,(t=this.ys)==null||t.discard()}Is(){var e,t;(e=this.zr)==null||e.unregister(vo),(t=this.zr)==null||t.unregister(fo)}Ts(e,t){if(V(e))return null;var n,r=Ir(e)?e:parseFloat(e);return typeof(n=r)!=`number`||!Number.isFinite(n)||0>n||n>1?(ld.warn(t+` must be between 0 and 1. Ignoring invalid value:`,e),null):r}Es(e){if(this.zr){var t,n=this.zr,r=()=>{var t=!1===e.sessionRecording?void 0:e.sessionRecording,r=this.Ts(this.Se.session_recording?.sampleRate,`session_recording.sampleRate`),i=this.Ts(t?.sampleRate,`remote config sampleRate`),a=r??i;V(a)&&this.Is();var o=t?.minimumDurationMilliseconds;n.register({[uo]:L({cache_timestamp:Date.now(),enabled:!!t},t,{networkPayloadCapture:L({capturePerformance:e.capturePerformance},t?.networkPayloadCapture),canvasRecording:{enabled:t?.recordCanvas,fps:t?.canvasFps,quality:t?.canvasQuality},sampleRate:a,minimumDurationMilliseconds:B(o)?null:o,endpoint:t?.endpoint,triggerMatchType:t?.triggerMatchType,masking:t?.masking,urlTriggers:t?.urlTriggers,version:t?.version,triggerGroups:t?.triggerGroups})})};r(),(t=this._s)==null||t.call(this),this._s=this._instance.sessionManager?.onSessionId(r)}}onRemoteConfig(e){`sessionRecording`in e?!1===e.sessionRecording?(this.Es(e),this.Cs()):(this.Es(e),this.startIfEnabledOrStop()):(this.bs===od&&(this.bs=sd,ld.warn(`config refresh failed, recording will not start until page reload`)),this.startIfEnabledOrStop())}log(e,t){var n;t===void 0&&(t=`log`),(n=this.ys)!=null&&n.log?this.ys.log(e,t):ld.warn(`log called before recorder was ready`)}get Ss(){var e,t,n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(uo);return(n==null||(t=n.scriptConfig)==null?void 0:t.script)||`lazy-recorder`}Ms(){var e,t=this._instance.get_property(uo);if(!t)return!1;try{e=typeof t==`object`?t:JSON.parse(t)}catch(e){return ld.warn(`persisted remote config for session recording is invali
10d and will be ignored`,e),!1}var n=e.cache_timestamp??Date.now();return 36e5>=Date.now()-n}ks(e){var t;if((t=I.__PosthogExtensions__)==null||!t.initSessionRecording)return ld.warn(`Called on script loaded before session recording is available. This can be caused by adblockers.`),void this._instance.register_for_session({[Jo]:!0});if(this.ys||(this.ys=I.__PosthogExtensions__?.initSessionRecording(this._instance),this.ys._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Ms()){if(this.bs===sd||this.bs===od)return;this.bs=od,ld.info(`persisted remote config is stale, requesting fresh config before starting`),new ml(this._instance).load();return}this.bs=ad,this.ys.start(e)}onRRwebEmit(e){var t;(t=this.ys)==null||t.onRRwebEmit==null||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.ys||(t=this.zr)==null||t.register({[mo]:!0}),(e=this.ys)==null||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.ys||(t=this.zr)==null||t.register({[po]:!0}),(e=this.ys)==null||e.overrideSampling()}overrideTrigger(e){var t,n;this.ys||(n=this.zr)==null||n.register({[e===`url`?ho:go]:!0}),(t=this.ys)==null||t.overrideTrigger(e)}get sdkDebugProperties(){return this.ys?.sdkDebugProperties||{$recording_status:this.status}}tryAddCustomEvent(e,t){var n;return!((n=this.ys)==null||!n.tryAddCustomEvent(e,t))}}},Bd={autocapture:class{constructor(e){this.Ps=!1,this.Rs=null,this.Os=!1,this.instance=e,this.rageclicks=new Ju(e.config.rageclick),this.Ls=null}initialize(){this.startIfEnabled()}get Se(){var e=jr(this.instance.config.autocapture)?this.instance.config.autocapture:{};return e.url_allowlist=e.url_allowlist?.map((e=>new RegExp(e))),e.url_ignorelist=e.url_ignorelist?.map((e=>new RegExp(e))),e}Fs(){if(this.isBrowserSupported()){if(P&&F){var e=e=>{e||=P?.event;try{this.As(e)}catch(e){Xu.error(`Failed to capture event`,e)}};if(gs(F,`submit`,e,{capture:!0}),gs(F,`change`,e,{capture:!0}),gs(F,`click`,e,{capture:!0}),this.Se.capture_copied_text){var t=e=>{e||=P?.event;try{this.As(e,Yu)}catch(e){Xu.error(`Failed to capture copy/cut event`,e)}};gs(F,`copy`,t,{capture:!0}),gs(F,`cut`,t,{capture:!0})}}}else Xu.info(`Disabling Automatic Event Collection because this browser is not supported`)}startIfEnabled(){this.isEnabled&&!this.Ps&&(this.Fs(),this.Ps=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.Os=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[to]:!!e.autocapture_opt_out}),this.Rs=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Ls=e}getElementSelectors(e){var t,n=[];return(t=this.Ls)==null||t.forEach((t=>{(F?.querySelectorAll(t))?.forEach((r=>{e===r&&n.push(t)}))})),n}get isEnabled(){var e=this.instance.persistence?.props[to];if(Fr(this.Rs)&&!Rr(e)&&!this.instance.mr())return!1;var t=this.Rs??!!e;return!!this.instance.config.autocapture&&!t}As(e,t){if(t===void 0&&(t=`$autocapture`),this.isEnabled){var n,r=Ys(e);Hs(r)&&(r=r.parentNode||null),t===`$autocapture`&&e.type===`click`&&e instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&ac(r,this.instance.config.rageclick)&&this.As(e,`$rageclick`);var i=t===Yu;if(r&&function(e,t,n,r,i){var a,o,s;if(n===void 0&&(n=void 0),!P||oc(e)||(a=n)!=null&&a.url_allowlist&&!Gs(n.url_allowlist)||(o=n)!=null&&o.url_ignorelist&&Gs(n.url_ignorelist))return!1;if((s=n)!=null&&s.dom_event_allowlist){var c=n.dom_event_allowlist;if(c&&!c.some((e=>t.type===e)))return!1}var{parentIsUsefulElement:l,targetElementList:u}=sc(e,r);if(!function(e,t){var n=t?.element_allowlist;if(B(n))return!0;var r,i=function(e){if(n.some((t=>e.tagName.toLowerCase()===t)))return{v:!0}};for(var a of e)if(r=i(a))return r.v;return!1}(u,n)||!Zs(u,n?.css_selector_allowlist)||Zs(u,n?.css_selector_ignorelist??$s))return!1;var d=P.getComputedStyle(e);if(d&&d.getPropertyValue(`cursor`)===`pointer`&&t.type===`click`)return!0;var f=e.tagName.toLowerCase();switch(f){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 l?(i||[`click`]).indexOf(t.type)>=0:(i||[`click`]).indexOf(t.type)>=0&&(Xs.indexOf(f)>-1||e.getAttribute(`contenteditable`)===`true`)}}(r,e,this.Se,i,i?[`copy`,`cut`]:void 0)){var{props:a,explicitNoCapture:o}=$u(r,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Se.element_attribute_ignorelist,elementsC
10hainAsString:this.Os,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes});if(o)return!1;var s=this.getElementSelectors(r);if(s&&s.length>0&&(a.$element_selectors=s),t===Yu){var c,l=qs(P==null||(c=P.getSelection())==null?void 0:c.toString()),u=e.type||`clipboard`;if(!l)return!1;a.$selected_content=l,a.$copy_type=u}return this.instance.capture(t,a),!0}}}isBrowserSupported(){return Ar(F?.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.$s=(P==null||(t=P.location)==null?void 0:t.pathname)||``}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview===`history_change`}startIfEnabled(){this.isEnabled&&(H.info(`History API monitoring enabled, starting...`),this.monitorHistoryChanges())}stop(){this.Ds&&this.Ds(),this.Ds=void 0,H.info(`History API monitoring stopped`)}monitorHistoryChanges(){P&&P.history&&(this.Ns(`pushState`),this.Ns(`replaceState`),this.qs())}Ns(e){var t;if(P&&((t=P.history[e])==null||!t.__posthog_wrapped__)){var n=this;(function(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],i=n(r);return Ar(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=i,()=>{e[t]===i&&(e[t]=r)}}catch{return()=>{}}})(P.history,e,(t=>function(r,i,a){t.call(this,r,i,a),n.Bs(e)}))}}Bs(e){try{var t,n=P==null||(t=P.location)==null?void 0:t.pathname;if(!n)return;n!==this.$s&&this.isEnabled&&this._instance.capture(rs,{navigation_type:e}),this.$s=n}catch(t){H.error(`Error capturing `+e+` pageview`,t)}}qs(){if(!this.Ds){var e=()=>{this.Bs(`popstate`)};gs(P,`popstate`,e),this.Ds=()=>{P&&P.removeEventListener(`popstate`,e)}}}},heatmaps:class{get Se(){return this.instance.config}constructor(e){var t;this.js=!1,this.Ps=!1,this.Hs=null,this.instance=e,this.js=!((t=this.instance.persistence)==null||!t.props[no]),this.rageclicks=new Ju(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return jr(this.Se.capture_heatmaps)&&this.Se.capture_heatmaps.flush_interval_milliseconds&&(e=this.Se.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return V(this.Se.capture_heatmaps)?V(this.Se.enable_heatmaps)?this.js:this.Se.enable_heatmaps:!1!==this.Se.capture_heatmaps}startIfEnabled(){if(this.isEnabled){if(this.Ps)return;ud.info(`starting...`),this.Us(),this.ke()}else clearInterval(this.Hs??void 0),this.zs(),this.getAndClearBuffer()}onRemoteConfig(e){if(`heatmaps`in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[no]:t}),this.js=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.R;return this.R=void 0,e}Vs(e){this.fe(e.originalEvent,`deadclick`)}ke(){this.Hs&&clearInterval(this.Hs),this.Hs=F?.visibilityState===`visible`?setInterval(this.Lr.bind(this),this.flushIntervalMilliseconds):null}Us(){P&&F&&(this.Ws=this.Lr.bind(this),gs(P,ns,this.Ws),this.Gs=e=>this.fe(e||P?.event),gs(F,`click`,this.Gs,{capture:!0}),this.Zs=e=>this.Qs(e||P?.event),gs(F,`mousemove`,this.Zs,{capture:!0}),this.Js=new wc(this.instance,Sc,this.Vs.bind(this)),this.Js.startIfEnabledOrStop(),this.Ys=this.ke.bind(this),gs(F,ts,this.Ys),this.Ps=!0)}zs(){var e;P&&F&&(this.Ws&&P.removeEventListener(ns,this.Ws),this.Gs&&F.removeEventListener(`click`,this.Gs,{capture:!0}),this.Zs&&F.removeEventListener(`mousemove`,this.Zs,{capture:!0}),this.Ys&&F.removeEventListener(ts,this.Ys),clearTimeout(this.Ks),(e=this.Js)==null||e.stop(),this.Ps=!1)}Xs(e,t){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),a=function(e,t,n){for(var r=e;r&&Bs(r)&&!Vs(r,`body`);){if(r===n)return!1;if(R(t,P?.getComputedStyle(r).position))return!0;r=Qs(r)}return!1}(Ys(e),[`fixed`,`sticky`],i);return{x:e.clientX+(a?0:r),y:e.clientY+(a?0:n),target_fixed:a,type:t}}fe(e,t){var n;if(t===void 0&&(t=`click`),!zs(e.target)&&dd(e)){var r=this.Xs(e,t);(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,new Date().getTime())&&ac(Ys(e),this.instance.config.rageclick)&&this.eo(L({},r,{type:`rageclick`})),this.eo(r)}}Qs(e){!zs(e.target)&&dd(e)&&(clearTimeout(this.Ks),this.Ks=setTimeout((()=>{this.eo(this.Xs(e,`mousemove`))}),500))}eo(e){if(P){var t=this.Se.disable_capture_url_hashes?na(P.location.href):P.location.href,n=this.Se.custom_personal_data_properties,r=Ic(t,this.Se.mask_personal_data_properties?[...zc,...n||[]]:[],Vc);this.R=this.R||{},this.R[r]||(this.R[r]=[]),this.R[r].push(e)}}Lr(){this.R&&!Mr(this.R)&&this.instance.capture(`$$heatmap`,{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:wc,webVitalsAutocapture:class{constructor(e){var t;this.js=!1,this.Ps=!1,this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.ro=()=>{clearTimeout(this.io),this.R.metrics.length!==0&&(this._instance.capture(`$web_vitals`,this.R.metrics.reduce(((e,t)=>L({},e,{[`$web_vitals_`+t.name+`_event`]:L({},t),[`$web_vitals_`+t.name+`_value`]:t.value})),{})),this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.no=e=>{this.R=this.R||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var t=this.so();if(!B(t))if(V(e?.name)||V(e?.value))nd.error(`Invalid metric received`,e);else if(!this.oo||this.oo>e.value){this.R.url!==t&&(this.ro(),this.io=setTimeout(this.ro,this.flushToCaptureTimeoutMs)),B(this.R.url)&&(this.R.url=t),this.R.firstMetricTimestamp=B(this.R.firstMetricTimestamp)?Date.now():this.R.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0);var n=this._instance.sessionManager?.checkAndGetSessionAndWindowId(!0),r=L({},e,{$current_url:t,timestamp:Date.now()});B(n)||(r.$session_id=n.sessionId,r.$window_id=n.windowId),this.R.metrics.push(r),this.R.metrics.length===this.allowedMetrics.length&&this.ro()}else nd.error(`Ignoring metric with value >= `+this.oo,e)},this.ao=()=>
10{if(!this.Ps){var e,t,n,r,i=I.__PosthogExtensions__;B(i)||B(i.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:n,onINP:r}=i.postHogWebVitalsCallbacks),e&&t&&n&&r?(this.allowedMetrics.indexOf(`LCP`)>-1&&e(this.no.bind(this)),this.allowedMetrics.indexOf(`CLS`)>-1&&t(this.no.bind(this)),this.allowedMetrics.indexOf(`FCP`)>-1&&n(this.no.bind(this)),this.allowedMetrics.indexOf(`INP`)>-1&&r(this.no.bind(this)),this.Ps=!0):nd.error(`web vitals callbacks not loaded - not starting`)}},this._instance=e,this.js=!((t=this._instance.persistence)==null||!t.props[oo]),this.startIfEnabled()}get lo(){return this._instance.config.capture_performance}get allowedMetrics(){var e=jr(this.lo)?this.lo?.web_vitals_allowed_metrics:void 0;return V(e)?this._instance.persistence?.props[lo]||[`CLS`,`FCP`,`INP`,`LCP`]:e}get flushToCaptureTimeoutMs(){return(jr(this.lo)?this.lo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=jr(this.lo)?this.lo.web_vitals_attribution:void 0;return e!=null&&e}get oo(){var e=jr(this.lo)&&Ir(this.lo.__web_vitals_max_value)?this.lo.__web_vitals_max_value:rd;return e>0&&6e4>=e?rd:e}get isEnabled(){var e=Qn?.protocol;if(e!==`http:`&&e!==`https:`)return nd.info(`Web Vitals are disabled on non-http/https protocols`),!1;var t=jr(this.lo)?this.lo.web_vitals:Rr(this.lo)?this.lo:void 0;return Rr(t)?t:this.js}startIfEnabled(){this.isEnabled&&!this.Ps&&(nd.info(`enabled, starting...`),this.Mt(this.ao))}onRemoteConfig(e){if(`capturePerformance`in e){var t=jr(e.capturePerformance)&&!!e.capturePerformance.web_vitals,n=jr(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[oo]:t}),this._instance.persistence.register({[lo]:n})),this.js=t,this.startIfEnabled()}}Mt(e){var t,n;(t=I.__PosthogExtensions__)!=null&&t.postHogWebVitalsCallbacks?e():(n=I.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.useAttribution?`web-vitals-with-attribution`:`web-vitals`,(t=>{t?nd.error(`failed to load script`,t):e()}))}so(){var e=P?this._instance.config.disable_capture_url_hashes?na(P.location.href):P.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties;return Ic(e,this._instance.config.mask_personal_data_properties?[...zc,...t||[]]:[],Vc)}nd.error(`Could not determine current URL`)}}},Vd={exceptionObserver:class{constructor(e){var t;this.ao=()=>{var e;if(P&&this.isEnabled&&(e=I.__PosthogExtensions__)!=null&&e.errorWrappingFunctions){var t=I.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,n=I.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=I.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.uo&&this.Se.capture_unhandled_errors&&(this.uo=t(this.captureException.bind(this))),!this.ho&&this.Se.capture_unhandled_rejections&&(this.ho=n(this.captureException.bind(this))),!this.do&&this.Se.capture_console_errors&&(this.do=r(this.captureException.bind(this)))}catch(e){ed.error(`failed to start`,e),this.co()}}},this._instance=e,this.vo=!((t=this._instance.persistence)==null||!t.props[ro]),this.fo=new Yr({refillRate:this._instance.config.error_tracking.__exceptionRateLimiterRefillRate??1,bucketSize:this._instance.config.error_tracking.__exceptionRateLimiterBucketSize??10,refillInterval:1e4,Ae:ed}),this.Se=this.po(),this.startIfEnabledOrStop()}po(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return jr(e)?t=L({},t,e):(B(e)?this.vo:e)&&(t=L({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.Se.capture_console_errors||this.Se.capture_unhandled_errors||this.Se.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(ed.info(`enabled`),this.co(),this.Mt(this.ao)):this.co()}Mt(e){var t,n;(t=I.__PosthogExtensions__)!=null&&t.errorWrappingFunctions?e():(n=I.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,`exception-autocapture`,(t=>{if(t)return ed.error(`failed to load script`,t);
10e()}))}co(){var e,t,n;(e=this.uo)==null||e.call(this),this.uo=void 0,(t=this.ho)==null||t.call(this),this.ho=void 0,(n=this.do)==null||n.call(this),this.do=void 0}onRemoteConfig(e){`autocaptureExceptions`in e&&(this.vo=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[ro]:this.vo}),this.Se=this.po(),this.startIfEnabledOrStop())}onConfigChange(){this.Se=this.po()}captureException(e){var t,n,r=(e==null||(t=e.$exception_list)==null||(t=t[0])==null?void 0:t.type)??`Exception`;this.fo.consumeRateLimit(r)?ed.info(`Skipping exception capture because of client rate limiting.`,{exception:r}):(n=this._instance.exceptions)==null||n.sendExceptionEvent(e)}},exceptions:class{constructor(e){this.mo=[],this.yo=new _a([new ka,new za,new ja,new Aa,new La,new Ia,new Na,new Ra],function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];return function(t,r){r===void 0&&(r=0);for(var i=[],a=t.split(` 11`),o=r;a.length>o;o++){var s=a[o];if(1024>=s.length){var c=Oa.test(s)?s.replace(Oa,`$1`):s;if(!c.match(/\S*Error: /)){for(var l of n){var u=l(c,e);if(u){i.push(u);break}}if(i.length>=50)break}}}return function(e){if(!e.length)return[];var t=Array.from(e);return t.reverse(),t.slice(0,50).map((e=>{return L({},e,{filename:e.filename||(n=t,n[n.length-1]||{}).filename,function:e.function||va});var n}))}(i)}}(`web:javascript`,wa,Da)),this._instance=e,this.mo=this._instance.persistence?.get_property(io)??[],this.bo=Wa(this._o()),this.wo=new Ga(this.bo)}onConfigChange(){this.bo=Wa(this._o()),this.wo.setConfig(this.bo)}onRemoteConfig(e){if(`errorTracking`in e){var t=e.errorTracking?.suppressionRules??[],n=e.errorTracking?.captureExtensionExceptions;this.mo=t,this._instance.persistence&&this._instance.persistence.register({[io]:this.mo,[ao]:n})}}get xo(){var e,t=!!this._instance.get_property(ao);return(e=this._instance.config.error_tracking.captureExtensionExceptions??t)!=null&&e}buildProperties(e,t){return this.yo.buildFromUnknown(e,{syntheticException:t?.syntheticException,mechanism:{handled:t?.handled}})}addExceptionStep(e,t){if(this.bo.enabled)try{if(!Nr(e)||e.trim().length===0)return void jd.warn(`Ignoring exception step because message must be a non-empty string`);var{sanitizedProperties:n,droppedKeys:r}=function(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};var t=[];return{sanitizedProperties:Object.keys(e).reduce(((n,r)=>Ha.has(r)?(t.push(r),n):(n[r]=e[r],n)),{}),droppedKeys:t}}(this.ko(t));r.length>0&&jd.warn(`Ignoring reserved exception step fields`,{droppedKeys:r}),this.wo.add(L({[Ba]:e,[Va]:new Date().toISOString()},n))}catch(e){jd.error(`Failed to add exception step. Ignoring breadcrumb.`,e)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.So(t)){if(this.Co(t))return this.Io(`Exception dropped: matched a suppression rule`),void jd.info(`Skipping exception capture because a suppression rule matched`);if(!this.xo&&this.To(t))return this.Io(`Exception dropped: thrown by a browser extension`),void jd.info(`Skipping exception capture because it was thrown by an extension`);if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.Eo(t))return this.Io(`Exception dropped: thrown by the PostHog SDK`),void jd.info(`Skipping exception capture because it was thrown by the PostHog SDK`)}var n=this.bo.enabled&&V(e.$exception_steps)?this.Mo(e):e;try{var r=this._instance.capture(`$exception`,n,{_noTruncate:!0,_batchKey:`exceptionEvent`,Zi:!0});return r&&this.wo.clear(),r}catch(e){jd.error(`Failed to capture exception event. Dropping this exception.`,e),this.wo.clear();return}}catch(e){jd.error(`Failed to process exception event. Ignoring this exception.`,e);return}}Mo(e){try{var t=this.wo.getAttachable();return t.length===0?e:L({},e,{$exception_steps:t})}catch(t){return jd.error(`Failed to read buffered exception steps. Capturing exception without steps.`,t),e}}Io(e){this.bo.enabled&&this.wo.add({[Ba]:e,[Va]:new Date().toISOString()})}ko(e){return jr(e)?L({},e):{}}_o(){return this._instance.config.error_tracking?.exception_steps??{}}Co(e){if(e.length===0)return!1;var t=e.reduce(((e,t)=>{var{type:n,value:r}=t;return Nr(n)&&n.length>0&&e.$exception_types.push(n),Nr(r)&&r.length>0&&e.$exception_values.push(r),e}),{$exception_types:[],$exception_values:[]});return this.mo.some((e=>{var n=e.values.map((e=>{var n=yu[e.operator],r=z(e.value)?e.value:[e.value],i=t[e.key]??[];return r.length>0&&n(r,i)}));return e.type===`OR`?n.some(Boolean):n.every(Boolean)}))}To(e){return e.flatMap((e=>e.stacktrace?.frames??[])).some((e=>e.filename&&e.filename.startsWith(`chrome-extension://`)))}Eo(e){if(e.length>0){var t,n,r=e[0].stacktrace?.frames??[],i=r[r.length-1];return(t=i==null||(n=i.filename)==null?void 0:n.includes(`posthog.com/static`))!=null&&t}return!1}So(e){return!V(e)&&z(e)}}},Hd=L({productTours:class{get zr(){return this._instance.persistence}constructor(e){this.Po=null,this.Ro=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(`productTours`in e){var t;if(this.zr&&this.zr.register({[co]:!!e.productTours}),!pd(this._instance))return!this.Po&&V(this.zr?.props[Mo])||fd.info(`product tours disabled; stopping and clearing cached tours`),(t=this.Po)==null||t.stop(),this.Po=null,void this.clearCache();this.loadIfEnabled()}}loadIfEnabled(){!this.Po&&pd(this._instance)&&this.Mt((()=>this.Oo()))}Mt(e){var t,n;(t=I.__PosthogExtensions__)!=null&&t.generateProductTours?e():(n=I.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,`product-tours`,(t=>{t?fd.error(`Could not load product tours script`,t):e()}))}Oo(){var e;!this.Po&&(e=I.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.Po=I.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(t===void 0&&(t=!1),!z(this.Ro)||t){var n=this.zr;if(n){var r=n.props[Mo];if(z(r)&&!t)return this.Ro=r,void e(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor(`api`,`/api/product_tours/?token=`+this._instance.config.token),method:`GET`,callback:t=>{if(pd(this._instance)){var r=t.statusCode;if(r!==200||!t.json){var i=`Product Tours API could not be loaded, status: `+r;fd.error(i),e([],{isLoaded:!1,error:i});return}var a=z(t.json.product_tours)?t.json.product_tours:[];this.Ro=a,n&&n.register({[Mo]:a}),e(a,{isLoaded:!0})}else e([],{isLoaded:!0})}})}else e(this.Ro,{isLoaded:!0})}getActiveProductTours(e){V(this.Po)?e([],{isLoaded:!1,error:`Product tours not loaded`}):this.Po.getActiveProductTours(e)}showProductTour(e){var t;(t=this.Po)==null||t.showTourById(e)}previewTour(e){this.Po?this.Po.previewTour(e):this.Mt((()=>{var t;this.Oo(),(t=this.Po)==null||t.previewTour(e)}))}dismissProductTour(){var e;(e=this.Po)==null||e.dismissTour(`user_clicked_skip`)}nextStep(){var e;(e=this.Po)==null||e.nextStep()}previousStep(){var e;(e=this.Po)==null||e.previousStep()}clearCache(){var e;this.Ro=null,(e=this.zr)==null||e.unregister(Mo)}resetTour(e){var t;(t=this.Po)==null||t.resetTour(e)}resetAllTours(){var e;(e=this.Po)==null||e.resetAllTours()}cancelPendingTour(e){var t;(t=this.Po)==null||t.cancelPendingTour(e)}}},Rd),Ud={siteApps:class{constructor(e){this.Lo=0,this._instance=e,this.Fo=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Ao(e,t){if(t){var n=this.globalsForEvent(t);this.Fo.push(n),this.Fo.length>1e3&&(this.Fo=this.Fo.slice(10))}}get siteAppLoaders(){var e;return(e=I._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.Ao.bind(this));this.$o=()=>{e(),this.Fo=[],this.$o=void 0}}}globalsForEvent(e){if(!e)throw Error(`Event payload is required`);var t={},n=this._instance.get_property(`$groups`)||[],r=this._instance.get_property(`$stored_group_properties`)||{};for(var[i,a]of Object.entries(r))t[i]={id:n[i],type:i,properties:a};var{$set_once:o,$set:s}=e;return{event:L({},cr(e,md),{properties:L({},e.properties,s?{$set:L({},e.properties?.$set??{},s)}:{},o?{$set_once:L({},e.properties?.$set_once??{},o)}:{}),elements_chain:e.properties?.$elements_chain??``,distinct_id:e.properties?.distinct_id}),person:{properties:this._instance.get_property(`$stored_person_properties`)},groups:t}}Do(e){var t=e.tagName?.toLowerCase();
11return t===`style`&&this._instance.config.prepare_external_dependency_stylesheet?this._instance.config.prepare_external_dependency_stylesheet(e)||(hd.error(`prepare_external_dependency_stylesheet returned null`),null):t===`script`&&this._instance.config.prepare_external_dependency_script?this._instance.config.prepare_external_dependency_script(e)||(hd.error(`prepare_external_dependency_script returned null`),null):e}No(){var e;if(!this._instance.config.prepare_external_dependency_stylesheet&&!this._instance.config.prepare_external_dependency_script)return()=>{};var t=F?.defaultView,n=t==null||(e=t.Node)==null?void 0:e.prototype;if(!t||!n)return()=>{};if(this.Lo++,this.qo)return this.Bo();var r=[],i=this,a=new WeakSet,o=(e,t,n)=>{if(e!=null&&e[t]){var i=e[t];e[t]=n(i),r.push((()=>{e[t]=i}))}},s=e=>{if(a.has(e))return e;var t=i.Do(e);return t&&a.add(t),t},c=e=>e.map((e=>typeof e==`string`?e:s(e))).filter((e=>!Fr(e)));return o(n,`appendChild`,(e=>function(t){var n=s(t);return n?e.call(this,n):t})),o(n,`insertBefore`,(e=>function(t,n){var r=s(t);return r?e.call(this,r,n):t})),o(n,`replaceChild`,(e=>function(t,n){var r=s(t);return r?e.call(this,r,n):n})),[t.Element?.prototype,t.Document?.prototype,t.DocumentFragment?.prototype].forEach((e=>{o(e,`append`,(e=>function(){for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,c(n))})),o(e,`prepend`,(e=>function(){for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,c(n))}))})),[t.Element?.prototype,t.CharacterData?.prototype,t.DocumentType?.prototype].forEach((e=>{o(e,`before`,(e=>function(){for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,c(n))})),o(e,`after`,(e=>function(){for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,c(n))})),o(e,`replaceWith`,(e=>function(){for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];var i=c(n);return n.length&&!i.length?void 0:e.apply(this,i)}))})),o(t.Element?.prototype,`insertAdjacentElement`,(e=>function(t,n){var r=s(n);return r?e.call(this,t,r):null})),this.qo=()=>{r.forEach((e=>e())),this.qo=void 0},this.Bo()}Bo(){var e=!1;return()=>{var t;e||(e=!0,this.Lo--,this.Lo===0&&((t=this.qo)==null||t.call(this)))}}jo(e,t){t===void 0&&(t=!0);var n=this.No();try{var r=e(n);return t&&n(),r}catch(e){throw n(),e}}setupSiteApp(e){var t=this.apps[e.id],n=()=>{var n;!t.errored&&this.Fo.length&&(hd.info(`Processing `+this.Fo.length+` events for site app with id `+e.id),this.Fo.forEach((e=>this.jo((()=>t.processEvent==null?void 0:t.processEvent(e))))),t.processedBuffer=!0),Object.values(this.apps).every((e=>e.processedBuffer||e.errored))&&((n=this.$o)==null||n.call(this))},r=!1,i=i=>{t.errored=!i,t.loaded=!0,hd.info(`Site app with id `+e.id+` `+(i?`loaded`:`errored`)),r&&n()};try{var{processEvent:a}=this.jo((t=>e.init({posthog:this._instance,callback(e){t(),i(e)}})),!1);a&&(t.processEvent=a),r=!0}catch(t){hd.error(gd+e.id,t),i(!1)}if(r&&t.loaded)try{n()}catch(n){hd.error(`Error while processing buffered events PostHog app with config id `+e.id,n),t.errored=!0}}Ho(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of e)this.setupSiteApp(n)}Uo(e){var t=this;if(Object.keys(this.apps).length!==0){var n=this.globalsForEvent(e),r=function(r){try{t.jo((()=>r.processEvent==null?void 0:r.processEvent(n)))}catch(t){hd.error(`Error while processing event `+e.event+` for site app `+r.id,t)}};for(var i of Object.values(this.apps))r(i)}}onRemoteConfig(e){var t,n,r,i=this;if((t=this.siteAppLoaders)!=null&&t.length)return this.isEnabled?(this.Ho(),void this._instance.on(`eventCaptured`,(e=>this.Uo(e)))):void hd.error(`PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.`);if((n=this.$o)==null||n.call(this),(r=e.siteApps)!=null&&r.length)if(this.isEnabled){var a=function(e){var t;I[`__$$ph_site_app_`+e]=i._instance,(t=I.__PosthogExtensions__)==null||t.loadSiteApp==null||t.loadSiteApp(i._instance,s,(t=>{if(t)return hd.error(gd+e,t)}))};for(var{id:o,url:s}of e.siteApps)a(o)}else hd.error(`PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.`)}}},Wd={tracingHeaders:class{constructor(e){this.zo=void 0,this.Vo=void 0,this.Wo=void 0,this.ao=()=>{var e,t,n=this.Go();n?(B(this.zo)&&(this.zo=(e=I.__PosthogExtensions__)==null||(e=e.tracingHeadersPatchFns)==null?void 0:e._patchXHR(n,(()=>this._instance.get_distinct_id()),this._instance.sessionManager)),B(this.Vo)&&(this.Vo=(t=I.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null?void 0:t._patchFetch(n,(()=>this._instance.get_distinct_id()),this._instance.sessionManager))):this.co()},this._instance=e}initialize(){this.startIfEnabledOrStop()}Mt(e){var t,n;(t=I.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns?e():(n=I.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,`tracing-headers`,(t=>{if(t)return td.error(`failed to load script`,t);
11e()}))}Zo(){return this._instance.config.tracing_headers??this._instance.config.addTracingHeaders??this._instance.config.__add_tracing_headers}Go(){var e=this.Zo();return z(e)?(z(this.Wo)?this.Wo.splice(0,this.Wo.length,...e):this.Wo=[...e],e.length>0?this.Wo:void 0):(z(this.Wo)&&this.Wo.splice(0),this.Wo=e||void 0,this.Wo)}co(){var e,t;(e=this.zo)==null||e.call(this),(t=this.Vo)==null||t.call(this),this.zo=void 0,this.Vo=void 0}startIfEnabledOrStop(){this.Go()?this.Mt(this.ao):this.co()}}},Gd=L({surveys:class{get Se(){return this._instance.config}constructor(e){this.Qo=void 0,this._surveyManager=null,this.Jo=!1,this.Yo=[],this.Ko=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.Se.disable_surveys){var t=e.surveys;if(V(t))return Eu.warn(`Flags not loaded yet. Not loading surveys.`);var n=z(t);this.Qo=n?t.length>0:t,Eu.info(`flags response received, isSurveysEnabled: `+this.Qo),this.loadIfEnabled()}}reset(){try{var e;(e=this._surveyEventReceiver)==null||e.reset(),localStorage.removeItem(`lastSeenSurveyDate`);for(var t=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);(r!=null&&r.startsWith(Du)||r!=null&&r.startsWith(`inProgressSurvey_`))&&t.push(r)}t.forEach((e=>localStorage.removeItem(e)))}catch{}}loadIfEnabled(){if(!this._surveyManager)if(this.Jo)Eu.info(`Already initializing surveys, skipping...`);else if(this.Se.disable_surveys)Eu.info(Sd);else if(this.Se.cookieless_mode&&this._instance.consent.isOptedOut())Eu.info(`Not loading surveys in cookieless mode without consent.`);else{var e=I?.__PosthogExtensions__;if(e){if(!B(this.Qo)||this.Se.advanced_enable_surveys){var t=this.Qo||this.Se.advanced_enable_surveys;this.Jo=!0;try{var n=e.generateSurveys;if(n)return void this.Xo(n,t);var r=e.loadExternalDependency;if(!r)return void this.ea(Yo);r(this._instance,`surveys`,(n=>{n||!e.generateSurveys?this.ea(`Could not load surveys script`,n):this.Xo(e.generateSurveys,t)}))}catch(e){throw this.ea(`Error initializing surveys`,e),e}finally{this.Jo=!1}}}else Eu.error(`PostHog Extensions not found.`)}}Xo(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new bd(this._instance),Eu.info(`Surveys loaded successfully`),this.ta({isLoaded:!0})}ea(e,t){Eu.error(e,t),this.ta({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Yo.push(e),this._surveyManager&&this.ta({isLoaded:!0}),()=>{this.Yo=this.Yo.filter((t=>t!==e))}}getSurveys(e,t){if(t===void 0&&(t=!1),this.Se.disable_surveys)return Eu.info(Sd),e([]);var n,r=this._instance.get_property(ko);if(r&&!t)return e(r,{isLoaded:!0});typeof Promise<`u`&&this.Ko?this.Ko.then((t=>{var{surveys:n,context:r}=t;return e(n,r)})):(typeof Promise<`u`&&(this.Ko=new Promise((e=>{n=e}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor(`api`,`/api/surveys/?token=`+this.Se.token),method:`GET`,timeout:this.Se.surveys_request_timeout_ms,callback:t=>{var r;this.Ko=null;var i=t.statusCode;if(i!==200||!t.json){var a=`Surveys API could not be loaded, status: `+i;Eu.error(a);var o={isLoaded:!1,error:a};e([],o),n?.({surveys:[],context:o});return}var s,c=t.json.surveys||[],l=c.filter((e=>function(e){return!(!e.start_date||e.end_date)}(e)&&(function(e){var t;return!((t=e.conditions)==null||(t=t.events)==null||(t=t.values)==null||!t.length)}(e)||function(e){var t;return!((t=e.conditions)==null||(t=t.actions)==null||(t=t.values)==null||!t.length)}(e))));l.length>0&&((s=this._surveyEventReceiver)==null||s.register(l)),(r=this._instance.persistence)==null||r.register({[ko]:c,[Ao]:Date.now()});var u={isLoaded:!0};e(c,u),n?.({surveys:c,context:u})}}))}ta(e){for(var t of this.Yo)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(e){Eu.error(`Error in survey callback`,e)}}getActiveMatchingSurveys(e,t){if(t===void 0&&(t=!1),!V(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);Eu.warn(`init was not called`)}ra(e){var t=null;return this.getSurveys((n=>{t=n.find((t=>t.id===e))??null})),t}ia(e){if(V(this._surveyManager))return{eligible:!1,reason:xd};var t=typeof e==`string`?this.ra(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:`Survey not found`}}canRenderSurvey(e){if(V(this._surveyManager))return Eu.warn(`init was not called`),{visible:!1,disabledReason:xd};var t=this.ia(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return V(this._surveyManager)?(Eu.warn(`init was not called`),Promise.resolve({visible:!1,disabledReason:xd})):new Promise((n=>
11{this.getSurveys((t=>{var r=t.find((t=>t.id===e))??null;if(r){var i=this.ia(r);n({visible:i.eligible,disabledReason:i.reason})}else n({visible:!1,disabledReason:`Survey not found`})}),t)}))}renderSurvey(e,t,n){var r;if(V(this._surveyManager))Eu.warn(`init was not called`);else{var i=typeof e==`string`?this.ra(e):e;if(i!=null&&i.id)if(Ou.includes(i.type)){var a=F?.querySelector(t);if(a)return(r=i.appearance)!=null&&r.surveyPopupDelaySeconds?(Eu.info(`Rendering survey `+i.id+` with delay of `+i.appearance.surveyPopupDelaySeconds+` seconds`),void setTimeout((()=>{var e;Eu.info(`Rendering survey `+i.id+` with delay of `+i.appearance?.surveyPopupDelaySeconds+` seconds`),(e=this._surveyManager)==null||e.renderSurvey(i,a,n),Eu.info(`Survey `+i.id+` rendered`)}),1e3*i.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(i,a,n);Eu.warn(`Survey element not found`)}else Eu.warn(`Surveys of type `+i.type+` cannot be rendered in the app`);else Eu.warn(`Survey not found`)}}displaySurvey(e,t){var n;if(V(this._surveyManager))Eu.warn(`init was not called`);else{var r=this.ra(e);if(r){var i=r;if((n=r.appearance)!=null&&n.surveyPopupDelaySeconds&&t.ignoreDelay&&(i=L({},r,{appearance:L({},r.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==cl.Popover&&t.initialResponses&&Eu.warn(`initialResponses is only supported for popover surveys. prefill will not be applied.`),!1===t.ignoreConditions){var a=this.canRenderSurvey(r);if(!a.visible)return void Eu.warn(`Survey is not eligible to be displayed: `,a.disabledReason)}t.displayType===cl.Inline?this.renderSurvey(i,t.selector,t.properties):this._surveyManager.handlePopoverSurvey(i,t)}else Eu.warn(`Survey not found`)}}cancelPendingSurvey(e){V(this._surveyManager)?Eu.warn(`init was not called`):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;(e=this._surveyManager)==null||e.handlePageUnload()}}},Rd),Kd={toolbar:class{constructor(e){this.instance=e}na(e){I.ph_toolbar_state=e}sa(){return I.ph_toolbar_state??0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,n){if(e===void 0&&(e=void 0),t===void 0&&(t=void 0),n===void 0&&(n=void 0),_s(this.instance.config)||!P||!F)return!1;e??=P.location,n??=P.history;try{if(!t){try{P.localStorage.setItem(`test`,`test`),P.localStorage.removeItem(`test`)}catch{return!1}t=P?.localStorage}var r,i=Cd||Lc(e.hash,`__posthog`)||Lc(e.hash,`state`),a=i?ds((()=>JSON.parse(atob(decodeURIComponent(i)))))||ds((()=>JSON.parse(decodeURIComponent(i)))):null;return a&&a.action===`ph_authorize`?((r=a).source=`url`,r&&Object.keys(r).length>0&&(a.desiredHash?e.hash=a.desiredHash:n?n.replaceState(n.state,``,e.pathname+e.search):e.hash=``)):((r=JSON.parse(t.getItem(wd)||`{}`)).source=`localstorage`,delete r.userIntent),!(!r.token||this.instance.config.token!==r.token||(this.loadToolbar(r),0))}catch{return!1}}oa(e){var t=I.ph_load_toolbar||I.ph_load_editor;!V(t)&&Ar(t)?t(e,this.instance):Td.warn(`No toolbar load function found`)}loadToolbar(e){var t=!(F==null||!F.getElementById(Wo));if(!P||t)return!1;var n=this.instance.requestRouter.region===`custom`&&this.instance.config.advanced_disable_toolbar_metrics,r=L({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor(`ui`)},n?{instrument:!1}:{});if(P.localStorage.setItem(wd,JSON.stringify(L({},r,{source:void 0}))),this.sa()===2)this.oa(r);else if(this.sa()===0){var i;this.na(1),(i=I.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this.instance,`toolbar`,(e=>{if(e)return Td.error(`[Toolbar] Failed to load`,e),void this.na(0);this.na(2),this.oa(r)})),gs(P,`turbolinks:load`,(()=>{this.na(0),this.loadToolbar(r)}))}return!0}aa(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,n){return e===void 0&&(e=void 0),t===void 0&&(t=void 0),n===void 0&&(n=void 0),this.maybeLoadToolbar(e,t,n)}}},qd=L({experiments:Pd},Rd),Jd=L({},Rd,zd,Bd,Vd,Hd,Ud,Gd,Wd,Kd,qd,{conversations:class{constructor(e){this.la=void 0,this._conversationsManager=null,this.ua=!1,this.ha=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;V(t)||(Rr(t)?this.la=t:(this.la=t.enabled,this.ha=t),this.loadIfEnabled())}}reset(){var e;(e=this._conversationsManager)==null||e.reset(),this._conversationsManager=null,this.la=void 0,this.ha=null}loadIfEnabled(){if(!(this._conversationsManager||this.ua||this._instance.config.disable_conversations||_s(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=I?.__PosthogExtensions__;if(e&&!B(this.la)&&this.la)if(this.ha&&this.ha.token){this.ua=!0;try{var t=e.initConversations;if(t)return this.da(t),void(this.ua=!1);var n=e.loadExternalDependency;if(!n)return void this.ca(Yo);n(this._instance,`conversations`,(t=>{t||!e.initConversations?this.ca(`Could not load conversations script`,t):this.da(e.initConversations),this.ua=!1}))}catch(e){this.ca(`Error initializing conversations`,e),this.ua=!1}}else Fd.error(`Conversations enabled but missing token in remote config.`)}}da(e){if(this.ha)try{this._conversationsManager=e(this.ha,this._instance),Fd.info(`Conversations loaded successfully`)}
11catch(e){this.ca(`Error completing conversations initialization`,e)}else Fd.error(`Cannot complete initialization: remote config is null`)}ca(e,t){Fd.error(e,t),this._conversationsManager=null,this.ua=!1}show(){this._conversationsManager?this._conversationsManager.show():Fd.warn(`Conversations not loaded yet.`)}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return!0===this.la&&!Fr(this._conversationsManager)}isVisible(){var e;return(e=this._conversationsManager?.isVisible())!=null&&e}sendMessage(e,t,n){var r=this;return sr((function*(){return r._conversationsManager?r._conversationsManager.sendMessage(e,t,n):(Fd.warn(Id),null)}))()}getMessages(e,t){var n=this;return sr((function*(){return n._conversationsManager?n._conversationsManager.getMessages(e,t):(Fd.warn(Id),null)}))()}markAsRead(e){var t=this;return sr((function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(Fd.warn(Id),null)}))()}getTickets(e){var t=this;return sr((function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(Fd.warn(Id),null)}))()}requestRestoreLink(e){var t=this;return sr((function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(Fd.warn(Id),null)}))()}restoreFromToken(e){var t=this;return sr((function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(Fd.warn(Id),null)}))()}restoreFromUrlToken(){var e=this;return sr((function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(Fd.warn(Id),null)}))()}getCurrentTicketId(){return this._conversationsManager?.getCurrentTicketId()??null}getWidgetSessionId(){return this._conversationsManager?.getWidgetSessionId()??null}en(){var e;(e=this._conversationsManager)==null||e.setIdentity()}tn(){var e;(e=this._conversationsManager)==null||e.clearIdentity()}}},{logs:class{constructor(e){var t;this.va=!1,this.fa=!1,this.Ae=Ja(`[logs]`),this._r=[],this.pa=[],this.ga=()=>{var e,t;(e=this.ma)==null||e.onReconnect(),(t=this.ya)==null||t.onReconnect()},this._instance=e,this._instance&&(t=this._instance.config.logs)!=null&&t.captureConsoleLogs&&(this.va=!0),P&&gs(P,`online`,this.ga)}ba(e,t,n,r){var i,a=function(e,t){var n=e?.flushIntervalMs??3e3,r=e?.maxBufferSize??100,i=t!=null&&t.consoleCapture?void 0:e?.maxLogsPerInterval??1e3,a=B(i)?Math.max(r,2048):Math.max(r,i),o=e?.resourceAttributes;return{serviceName:o?.[`service.name`]??e?.serviceName??t?.serviceNameDefault,serviceVersion:o?.[`service.version`]??e?.serviceVersion,environment:o?.[`deployment.environment`]??e?.environment,resourceAttributes:o,beforeSend:e?.beforeSend,flushIntervalMs:n,maxBufferSize:r,maxQueueSize:a,maxBatchRecordsPerPost:100,rateCapWindowMs:n,maxLogsPerInterval:i,backgroundFlushBudgetMs:0,terminationFlushBudgetMs:0}}((i=this._instance)==null||(i=i.config)==null?void 0:i.logs,n);return[new fa(this._a(e,t),a,this.Ae,(()=>this.wa()),(e=>e()),void 0,r),a]}xa(){var e,t,n=(e=this._instance)==null||(e=e.config)==null?void 0:e.logs;return this.ma&&this.ka===n||((t=this.ma)==null||t.reset(),this.ka=n,[this.ma,this.Sa]=this.ba((()=>this._r),(e=>{this._r=e}))),this.ma}Ca(){var e,t,n=(e=this._instance)==null||(e=e.config)==null?void 0:e.logs;return this.ya&&this.Ia===n||((t=this.ya)==null||t.reset(),this.Ia=n,[this.ya,this.Ta]=this.ba((()=>this.pa),(e=>{this.pa=e}),{serviceNameDefault:`posthog-browser-logs`,consoleCapture:!0},Ld)),this.ya}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t=e.logs?.captureConsoleLogs;!V(t)&&t&&(this.va=!0,this.loadIfEnabled())}reset(){var e,t;this._r=[],(e=this.ma)==null||e.reset(),this.pa=[],(t=this.ya)==null||t.reset()}captureLog(e){this.xa().captureLog(e)}le(e){this.Ca().captureLog(e)}get logger(){return this.Ea||={trace:(e,t)=>this.captureLog({body:e,level:`trace`,attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:`debug`,attributes:t}),info:(e,t)=>this.captureLog({body:e,level:`info`,attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:`warn`,attributes:t}),error:(e,t)=>this.captureLog({body:e,level:`error`,attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:`fatal`,attributes:t})},this.Ea}flushLogs(e){e?this.Ma(e):(this.ma&&this.ma.flush().catch((e=>this.Ae.error(`PostHog logs flush failed:`,e))),this.ya&&this.ya.flush().catch((e=>this.Ae.error(`PostHog logs flush failed:`,e))))}loadIfEnabled(){if(this.va&&!this.fa){var e=I?.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,`logs`,(t=>{var n;t||(n=e.logs)==null||!n.initializeLogs?this.Ae.error(`Could not load logs script`,t):(e.logs.initializeLogs(this._instance),this.fa=!0)})):this.Ae.error(Yo)}else this.Ae.error(`PostHog Extensions not found.`)}}_a(e,t){var n=this._instance;return{get isDisabled(){return!1},get optedOut(){return!n.is_capturing()},getPersistedProperty:t=>t===pr.LogsQueue?e():void 0,setPersistedProperty(e,n){e===pr.LogsQueue&&t(n??[])},ht:e=>this.ht(e),getLibraryId:()=>ar.LIB_NAME,getLibraryVersion:()=>ar.LIB_VERSION}}ht(e){return new Promise((t=>{var n=!1,r=e=>{n||(n=!0,clearTimeout(i),t(e))},i=setTimeout((()=>r({kind:`retry-later`,error:Error(`logs request timed out`)})),9e4);this._instance._send_request({method:`POST`,url:this.Pa(),data:e,compression:`best-available`,batchKey:`logs`,fireCallbackOnDrop:!0,callback(e){var t=e.statusCode;r(t>=200&&300>t?{kind:`ok`}:t===413?{kind:`too-large`}:t!==0&&t!==429&&500>t?{kind:`fatal`,error:Error(`logs request failed with status `+t)}
11:{kind:`retry-later`,error:e.error??Error(`logs request failed with status `+t)})}})}))}Ma(e){this._r.length>0&&this.Ra(e,this._r,this.Sa,ar.LIB_NAME,(e=>{this._r=e})),this.pa.length>0&&this.Ra(e,this.pa,this.Ta,Ld,(e=>{this.pa=e}))}Ra(e,t,n,r,i){if(t.length!==0){var a=t.map((e=>e.record));i([]);var o=da(a,ua(n,ar.LIB_NAME,ar.LIB_VERSION),r,ar.LIB_VERSION);this._instance._send_request({method:`POST`,url:this.Pa(),data:o,compression:`best-available`,batchKey:`logs`,transport:e})}}Pa(){return this._instance.requestRouter.endpointFor(`api`,`/i/v1/logs`)+`?token=`+encodeURIComponent(this._instance.config.token)}wa(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:n,windowId:r,sessionStartTimestamp:i,lastActivityTimestamp:a}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=n,t.windowId=r,V(i)||(t.sessionStartTimestamp=i),V(a)||(t.lastActivityTimestamp=a)}if(I!=null&&(e=I.location)!=null&&e.href&&(t.currentUrl=this._instance.config.disable_capture_url_hashes?na(I.location.href):I.location.href),this._instance.featureFlags){var o=this._instance.featureFlags.getFlags();o&&o.length>0&&(t.activeFeatureFlags=o)}return t}}});qu.__defaultExtensionClasses=L({},Jd);var Yd=function(){ar.SDK_DIST_CHANNEL=`npm`;var e=Pu[Vu]=new qu;return function(){function e(){e.done||(e.done=!0,Hu=!1,cs(Pu,(function(e){e._dom_loaded()})))}F!=null&&F.addEventListener?F.readyState===`complete`?e():gs(F,`DOMContentLoaded`,e,{capture:!1}):P&&H.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),e}(),Xd=`10.62.0`,U=globalThis;function Zd(){return Qd(U),U}function Qd(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||`10.62.0`,t[Xd]=t[`10.62.0`]||{}}function $d(e,t,n=U){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[Xd]=r[`10.62.0`]||{};return i[e]||(i[e]=t())}var ef=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],tf={};function nf(e){if(!(`console`in U))return e();let t=U.console,n={},r=Object.keys(tf);r.forEach(e=>{let r=tf[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function rf(){uf().enabled=!0}function af(){uf().enabled=!1}function of(){return uf().enabled}function sf(...e){[...e]}function cf(...e){[...e]}function lf(...e){[...e]}function uf(){return{enabled:!1}}var df={enable:rf,disable:af,isEnabled:of,log:sf,warn:cf,error:lf},ff=Object.prototype.toString;function pf(e){switch(ff.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return Tf(e,Error)}}function mf(e,t){return ff.call(e)===`[object ${t}]`}function hf(e){return mf(e,`ErrorEvent`)}function gf(e){return mf(e,`DOMError`)}function _f(e){return mf(e,`DOMException`)}function vf(e){return mf(e,`String`)}function yf(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function bf(e){return e===null||yf(e)||typeof e!=`object`&&typeof e!=`function`}function xf(e){return mf(e,`Object`)}function Sf(e){return typeof Event<`u`&&Tf(e,Event)}function Cf(e){return mf(e,`RegExp`)}function wf(e){return!!(e?.then&&typeof e.then==`function`)}function Tf(e,t){try{return e instanceof t}catch{return!1}}function Ef(e){return typeof Request<`u`&&Tf(e,Request)}function Df(e,t,n){if(!(t in e))return;let r=e[t];if(typeof r!=`function`)return;let i=n(r);typeof i==`function`&&kf(i,r);try{e[t]=i}catch{}}function Of(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{}}function kf(e,t){try{e.prototype=t.prototype=t.prototype||{},Of(e,`__sentry_original__`,t)}catch{}}function Af(e){return e.__sentry_original__}function jf(e){if(pf(e))return{message:e.message,name:e.name,stack:e.stack,...Mf(e)};if(Sf(e)){let{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...Mf(e)}}return e}function Mf(e){return typeof e==`object`&&e?Object.fromEntries(Object.entries(e)):{}}function Nf(e){let t=Object.keys(jf(e));return t.sort(),t[0]?t.join(`, `):`[object has no keys]`}function Pf(e){try{let t=U.WeakRef;if(typeof t==`function`)return new t(e)}catch{}return e}function Ff(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}var If=`_sentrySpan`;function Lf(e,t){t?Of(e,If,Pf(t)):delete e[If]}function Rf(e){return Ff(e[If])}var zf;function Bf(e){if(zf!==void 0)return zf?zf(e):e();let t=Symbol.for(`__SENTRY_SAFE_RANDOM_ID_WRAPPER__`),n=U;return t in n&&typeof n[t]==`function`?(zf=n[t],zf(e)):(zf=null,e())}function Vf(){return Bf(()=>Math.random())}function Hf(){return Bf(()=>Date.now())}var Uf=Symbol.for(`sentry.skipNormalization`),Wf=Symbol.for(`sentry.overrideNormalizationDepth`);function Gf(e){Of(e,Uf,!0)}function Kf(e){return!!e[Uf]}function qf(e){let t=e[Wf];return typeof t==`number`?t:void 0}var Jf=50,Yf=/\(error: (.*)\)/,Xf=/captureMessage|captureException/;function Zf(...e){let t=e.sort((e,t)=>
11e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(` 12`);for(let e=n;e<a.length;e++){let n=a[e];n.length>1024&&(n=n.slice(0,1024));let o=Yf.test(n)?n.replace(Yf,`$1`):n;if(!o.includes(`Error: `)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=Jf+r)break}}return $f(i.slice(r))}}function Qf(e){return Array.isArray(e)?Zf(...e):e}function $f(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(ep(t).function||``)&&t.pop(),t.reverse(),Xf.test(ep(t).function||``)&&(t.pop(),Xf.test(ep(t).function||``)&&t.pop()),t.slice(0,Jf).map(e=>({...e,filename:e.filename||ep(t).filename,function:e.function||`?`}))}function ep(e){return e[e.length-1]||{}}var tp=`<anonymous>`;function np(e){try{return!e||typeof e!=`function`?tp:e.name||tp}catch{return tp}}function rp(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}function ip(e){let t=e?.startsWith(`file://`)?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}var ap;function op(e){ap=e}function sp(e,t=100,n=1/0){try{return lp(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function cp(e,t=3,n=100*1024){let r=sp(e,t);return pp(r)>n?cp(e,t-1,n):r}function lp(e,t,n=1/0,r=1/0,i=mp()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=up(e,t);if(!s.startsWith(`[object `))return s;if(Kf(t))return t;let c=qf(t),l=c===void 0?n:c;if(l===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let u=t;if(u&&typeof u.toJSON==`function`)try{return lp(``,u.toJSON(),l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},f=0,p=jf(t);for(let e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(f>=r){d[e]=`[MaxProperties ~]`;break}let t=p[e];d[e]=lp(e,t,l-1,r,i),f++}return o(t),d}function up(e,t){try{if(ap){let e=ap(t);if(e)return e}return typeof global<`u`&&t===global?`[Global]`:typeof t==`number`&&!Number.isFinite(t)?`[${t}]`:typeof t==`function`?`[Function: ${np(t)}]`:typeof t==`symbol`?`[${String(t)}]`:typeof t==`bigint`?`[BigInt: ${String(t)}]`:`[object ${dp(t)}]`}catch(e){return`**non-serializable** (${e})`}}function dp(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function fp(e){return~-encodeURI(e).split(/%..|./).length}function pp(e){return fp(JSON.stringify(e))}function mp(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function hp(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function gp(e,t){let n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let a=Math.min(i+140,r);return a>r-5&&(a=r),a===r&&(i=Math.max(a-140,0)),n=n.slice(i,a),i>0&&(n=`'{snip} ${n}`),a<r&&(n+=` {snip}`),n}function _p(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];bf(r)?n.push(String(r)):r instanceof Error?n.push(r.message?`${r.name}: ${r.message}`:r.name):n.push(up(void 0,r))}return n.join(t)}function vp(e,t,n=!1){return vf(e)?Cf(t)?t.test(e):vf(t)?n?e===t:e.includes(t):typeof t==`function`?t(e):!1:!1}function yp(e,t=[],n=!1){for(let r of t)if(vp(e,r,n))return!0;return!1}function bp(){let e=U;return e.crypto||e.msCrypto}var xp;function Sp(){return Vf()*16}function Cp(e=bp()){try{if(e?.randomUUID)return Bf(()=>e.randomUUID()).replace(/-/g,``)}catch{}return xp||=`10000000100040008000100000000000`,xp.replace(/[018]/g,e=>(e^(Sp()&15)>>e/4).toString(16))}function wp(e){return e.exception?.values?.[0]}function Tp(e){let{message:t,event_id:n}=e;if(t)return t;let r=wp(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function Ep(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function Dp(e,t){let n=wp(e);if(!n)return;let r={type:`generic`,handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&`data`in t){let e={...i?.data,...t.data};n.mechanism.data=e}}function Op(e,t,n=5){if(t.lineno===void 0)return;let r=e.length,i=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,i-n),i).map(e=>gp(e,0)),t.context_line=gp(e[Math.min(r-1,i)],t.colno||0),t.post_context=e.slice(Math.min(i+1,r),i+1+n).map(e=>gp(e,0))}function kp(e){if(Ap(e))return!0;try{Of(e,`__sentry_captured__`,!0)}catch{}return!1}function Ap(e){try{return e.__sentry_captured__}catch{}}var jp=1e3;function Mp(){return Hf()/jp}function Np(){let{performance:e}=U;if(!e?.now||!e.timeOrigin)return Mp;let t=e.timeOrigin;return()=>(t+Bf(()=>e.now()))/jp}var Pp;function Fp(){return(Pp??=Np())()}var Ip=null;function Lp(){let{performance:e}=U;if(!e?.now)return;let t=3e5,n=Bf(()=>e.now()),r=Hf(),i=e.timeOrigin;if(typeof i==`number`&&Math.abs(i+n-r)<t)return i;let a=e.timing?.navigationStart;return typeof a==`number`&&Math.abs(a+n-r)<t?a:r-n}function Rp(){return Ip===null&&(Ip=Lp()),Ip}function zp(e){let t=Fp(),n={sid:Cp(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>Hp(n)};return e&&Bp(n,e),n}function Bp(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Fp(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Cp()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),t
12ypeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Vp(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),Bp(e,n)}function Hp(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function Up(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Up(r[e],t[e],n-1));return r}function Wp(){return Cp()}function Gp(){return Cp().substring(16)}var Kp=100,qp=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Wp(),sampleRand:Vf()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Lf(t,Rf(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Bp(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t==`function`?t(this):t,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=(n instanceof e?n.getScopeData():xf(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Lf(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Wp(),sampleRand:Vf()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:Kp;if(n<=0)return this;let r={timestamp:Mp(),...e,message:e.message?hp(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent(`buffer_overflow`,`log_item`)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Rf(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Up(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t?.event_id||Cp();if(!this._client)return n;let r=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n?.event_id||Cp();if(!this._client)return r;let i=n?.syntheticException??Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){let n=e.event_id||t?.event_id||Cp();return this._client&&this._client.captureEvent(e,{...t,event_id:n},this),n}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEac
12h(e=>{e(this)}),!1)}};function Jp(){return $d(`defaultCurrentScope`,()=>new qp)}function Yp(){return $d(`defaultIsolationScope`,()=>new qp)}var Xp=e=>e instanceof Promise&&!e[Zp],Zp=Symbol(`chained PromiseLike`),Qp=(e,t,n)=>{let r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Xp(r)&&Xp(e)?r:$p(e,r)},$p=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i==`function`?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Zp]:!0}),t},em=class{constructor(e,t){let n;n=e||new qp;let r;r=t||new qp,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return wf(n)?Qp(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function tm(){let e=Qd(Zd());return e.stack=e.stack||new em(Jp(),Yp())}function nm(e){return tm().withScope(e)}function rm(e,t){let n=tm();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function im(e){return tm().withScope(()=>e(tm().getIsolationScope()))}function am(){return{withIsolationScope:im,withScope:nm,withSetScope:rm,withSetIsolationScope:(e,t)=>im(t),getCurrentScope:()=>tm().getScope(),getIsolationScope:()=>tm().getIsolationScope()}}function om(e){let t=Qd(e);return t.acs?t.acs:am()}var sm;function cm(){return sm?.()}function lm(){return sm!==void 0}function W(){return om(Zd()).getCurrentScope()}function um(){return om(Zd()).getIsolationScope()}function dm(){return $d(`globalScope`,()=>new qp)}function fm(...e){let t=om(Zd());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function pm(...e){let t=om(Zd());if(e.length===2){let[n,r]=e;return n?t.withSetIsolationScope(n,r):t.withIsolationScope(r)}return t.withIsolationScope(e[0])}function G(){return W().getClient()}function mm(e){let t=cm();if(t)return{trace_id:t.traceId,span_id:t.spanId};let{traceId:n,parentSpanId:r,propagationSpanId:i}=e.getPropagationContext(),a={trace_id:n,span_id:i||Gp()};return r&&(a.parent_span_id=r),a}var hm=`sentry.source`,gm=`sentry.sample_rate`,_m=`sentry.previous_trace_sample_rate`,vm=`sentry.op`,K=`sentry.origin`,ym=`sentry.idle_span_finish_reason`,bm=`sentry.measurement_unit`,xm=`sentry.measurement_value`,Sm=`sentry.release`,Cm=`sentry.environment`,wm=`sentry.segment.name`,Tm=`sentry.segment.id`,Em=`sentry.sdk.name`,Dm=`sentry.sdk.version`,Om=`sentry.sdk.integrations`,km=`user.id`,Am=`user.email`,jm=`user.ip_address`,Mm=`user.name`,Nm=`sentry.custom_span_name`,Pm=`sentry.profile_id`,Fm=`sentry.exclusive_time`,Im=`sentry.link.type`,Lm=`gen_ai.conversation.id`,Rm=`sentry-`;function zm(e){let t=Vm(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(`sentry-`)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function Bm(e){if(e)return Um(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${Rm}${t}`]=n),e),{}))}function Vm(e){if(!(!e||!vf(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=Hm(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Hm(e)}function Hm(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}function Um(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((e,[t,n],r)=>{let i=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,a=r===0?i:`${e},${i}`;return a.length>8192?e:a},``)}function Wm(e,t,n=()=>{},r=()=>{}){let i;try{i=e()}catch(e){throw t(e),n(),e}return Gm(i,t,n,r)}function Gm(e,t,n,r){return wf(e)?Qp(e,e=>{n(),r(e)},e=>{t(e),n()}):(n(),r(e),e)}function Km(e){return!1}function qm(e,t){if(!t?.length)return!1;for(let n of t){if(Xm(n)){if(e.description&&vp(e.description,n))return!0;continue}let t=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!t)continue;let r=n.name?e.description&&vp(e.description,n.name):!0,i=n.op?e.op&&vp(e.op,n.op):!0,a=n.attributes?Object.entries(n.attributes).every(([t,n])=>Jm(e.attributes?.[t],n)):!0;if(r&&i&&a)return!0}return!1}function Jm(e,t){return typeof e==`string`&&(typeof t==`string`||t instanceof RegExp)?vp(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function Ym(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function Xm(e){return typeof e==`string`||e instanceof RegExp}function Zm(e){return e.getOptions().traceLifecycle===`stream`}function Qm(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}function $m(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).includes(`value`)}function eh(e,t){let{value:n,unit:r}=$m(e)?e:{value:e,unit:void 0},i=ih(n),a=r&&typeof r==`string`?{unit:r}:{};if(i)return{...i,...a};
12if(!t||t===`skip-undefined`&&n===void 0)return;let o=``;try{o=JSON.stringify(n)??``}catch{}return{value:o,type:`string`,...a}}function th(e,t=!1){let n={};for(let[r,i]of Object.entries(e??{})){let e=eh(i,t);e&&(n[r]=e)}return n}function nh(e){if(!e)return 0;let t=0;for(let[n,r]of Object.entries(e)){t+=n.length*2,t+=r.type.length*2,t+=(r.unit?.length??0)*2;let e=r.value;Array.isArray(e)?t+=rh(e[0])*e.length:bf(e)?t+=rh(e):t+=100}return t}function rh(e){return typeof e==`string`?e.length*2:typeof e==`boolean`?4:typeof e==`number`?8:0}function ih(e){if(Array.isArray(e))return{value:e,type:`array`};let t=typeof e==`string`?`string`:typeof e==`boolean`?`boolean`:typeof e==`number`&&!Number.isNaN(e)?Number.isInteger(e)?`integer`:`double`:null;if(t)return{value:e,type:t}}function ah(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:`unauthenticated`};case 403:return{code:2,message:`permission_denied`};case 404:return{code:2,message:`not_found`};case 409:return{code:2,message:`already_exists`};case 413:return{code:2,message:`failed_precondition`};case 429:return{code:2,message:`resource_exhausted`};case 499:return{code:2,message:`cancelled`};default:return{code:2,message:`invalid_argument`}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:`unimplemented`};case 503:return{code:2,message:`unavailable`};case 504:return{code:2,message:`deadline_exceeded`};default:return{code:2,message:`internal_error`}}return{code:2,message:`internal_error`}}function oh(e,t){e.setAttribute(`http.response.status_code`,t);let n=ah(t);n.message!==`unknown_error`&&e.setStatus(n)}var sh=`_sentryScope`,ch=`_sentryIsolationScope`,lh=Symbol.for(`sentry.otelSourceInference`);function uh(e,t,n){e&&(Of(e,ch,Pf(n)),Of(e,sh,t))}function dh(e){let t=e;return{scope:t[sh],isolationScope:Ff(t[ch])}}function fh(e){return e[lh]===!0}var ph=/^o(\d+)\./,mh=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function hh(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function gh(e){let t=mh.exec(e);if(!t){nf(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return _h({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}function _h(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function vh(e){return!0}function yh(e){return e.match(ph)?.[1]}function bh(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=yh(n)),r}function xh(e){let t=typeof e==`string`?gh(e):_h(e);if(!(!t||!vh(t)))return t}var Sh=RegExp(`^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$`);function Ch(e){if(!e)return;let t=e.match(Sh);if(!t)return;let n;return t[3]===`1`?n=!0:t[3]===`0`&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function wh(e,t){let n=Ch(e),r=zm(t);if(!n?.traceId)return{traceId:Wp(),sampleRand:Vf()};let i=Dh(n,r);r&&(r.sample_rand=i.toString());let{traceId:a,parentSpanId:o,parentSampled:s}=n;return{traceId:a,parentSpanId:o,sampled:s,dsc:r||{},sampleRand:i}}function Th(e=Wp(),t=Gp(),n){let r=``;return n!==void 0&&(r=n?`-1`:`-0`),`${e}-${t}${r}`}function Eh(e=Wp(),t=Gp(),n){return`00-${e}-${t}-${n?`01`:`00`}`}function Dh(e,t){let n=Qm(t?.sample_rand);if(n!==void 0)return n;let r=Qm(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Vf()*r:r+Vf()*(1-r):Vf()}function Oh(e,t){let n=bh(e);return t&&n&&t!==n?(df.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):e.getOptions().strictTraceContinuation&&(t&&!n||!t&&n)?(df.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1):!0}var kh=!1;function Ah(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:o,origin:s,links:c}=q(e);return{parent_span_id:a,span_id:t,trace_id:n,data:r,op:i,status:o,origin:s,links:c}}function jh(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:q(e).parent_span_id,a=dh(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||Gp():t,trace_id:n}}function Mh(e){let{traceId:t,spanId:n}=e.spanContext();return Th(t,n,Uh(e))}function Nh(e){let{traceId:t,spanId:n}=e.spanContext();return Eh(t,n,Uh(e))}function Ph(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function Fh(e){if(e?.length)return e.map(({context:{spanId:e,traceId:t,traceFlags:n},attributes:r})=>({span_id:e,trace_id:t,sampled:n===1,attributes:r}))}function Ih(e){return typeof e==`number`?Lh(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Lh(e.getTime()):Fp()}function Lh(e){return e>9999999999?e/1e3:e}function q(e){if(Hh(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Vh(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:zh(e),start_timestamp:Ih(i),timestamp:Ih(o)||void 0,status:Wh(s),op:r[vm],origin:r[K],links:Ph(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Rh(e){if(Hh(e))return e.getStreamedSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Vh(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{name:a,span_id:t,trace_id:n,parent_span_id:zh(e),start_timestamp:Ih(i),end_timestamp:Ih(o),is_segment:e===Qh(e),status:Gh(s),attributes:r,links:Fh(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:``,end_timestamp:0,status:`ok`,is_segment:e===Qh(e)}}function zh(e){return`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?e.parentSpanContext?.spanId:void 0}function Bh(e){return{...e,attributes:th(e.attributes),links:e.links?.map(e=>({...e,attributes:th(e.attributes)}))}}function Vh(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Hh(e){return typeof e.getSpanJSON==`function`}function Uh(e){let{traceFlags:t}=e.spanContext();return t===1}function Wh(e){if(!(!e||e.code===0))return e.code===1?`ok`:e.message||`internal_error`}function Gh(e){return!e||e.code===1||e.code===0||e.message===`cancelled`?`ok`:`error`}var Kh=`_sentryChildSpans`,qh=`_sentryRootSpan`;function Jh(e,t){Of(t,qh,e[qh]||e),e[Kh]?e[Kh].add(t):Of(e,Kh,new Set([t]))}function Yh(e,t){e[Kh]&&e[Kh].delete(t)}function Xh(e){let t=new Set;function n(e){if(!t.has(e)&&Uh(e)){t.add(e);let r=e[Kh]?Array.from(e[Kh]):[];for(let e of r)n(e)}}return n(e),Array.from(t)}var Zh=Qh;function Qh(e){return e[qh]||e}function $h(){let e=om(Zd());return e.getActiveSpan?e.getActiveSpan():Rf(W())}function eg(){kh||=(nf(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),!0)}function tg(e,t){e.updateName(t),e.setAttributes({[hm]:`custom`,[Nm]:t})}var ng=`production`,rg=Symbol.for(`sentry.nonRecordingSpan`),ig=class{constructor(e={}){this._traceId=e.traceId||Wp(),this._spanId=e.spanId||Gp(),this.dropReason=e.dropReason,Of(this,rg,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}
12addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}};function ag(e){return!!e&&e[rg]===!0}var og=`_frozenDsc`;function sg(e,t){Of(e,og,t)}function cg(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:bh(t)};return t.emit(`createDsc`,i),i}function lg(e,t){let n=t.getPropagationContext();return n.dsc||cg(n.traceId,e)}function ug(e){let t=G();if(!t)return{};let n=Zh(e),r=q(n),i=r.data,a=n.spanContext().traceState,o=a?.get(`sentry.sample_rate`)??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[og];if(c)return s(c);if(ag(n)&&!Km(t.getOptions())){let e=dh(n).scope;if(e)return s({...lg(t,e)})}let l=a?.get(`sentry.dsc`),u=l&&zm(l);if(u)return s(u);let d=cg(e.spanContext().traceId,t),f=i[`sentry.source`]??i[`sentry.span.source`],p=r.description;return f!==`url`&&p&&(d.transaction=p),Km()&&(d.sampled=String(Uh(n)),d.sample_rand=a?.get(`sentry.sample_rand`)??dh(n).scope?.getPropagationContext().sampleRand.toString()),s(d),t.emit(`createDsc`,d,n),d}function dg(e){return Bm(ug(e))}function fg(e,t,n){if(!Km(e))return[!1];let r,i;typeof e.tracesSampler==`function`?(i=e.tracesSampler({...t,inheritOrSampleWith:e=>typeof t.parentSampleRate==`number`?t.parentSampleRate:typeof t.parentSampled==`boolean`?Number(t.parentSampled):e}),r=!0):t.parentSampled===void 0?e.tracesSampleRate!==void 0&&(i=e.tracesSampleRate,r=!0):i=t.parentSampled;let a=Qm(i);return a===void 0?[!1]:a?[n<a,a,r]:[!1,a,r]}function pg(e){return Of(e,`_streamed`,!0),e}function mg(e){return!!e&&typeof e==`function`&&`_streamed`in e&&!!e._streamed}function hg(e,t=[]){return[e,t]}function gg(e,t){let[n,r]=e;return[n,[...r,t]]}function _g(e,t){let n=e[1];for(let e of n){let n=e[0].type;if(t(e,n))return!0}return!1}function vg(e,t){return _g(e,(e,n)=>t.includes(n))}function yg(e){let t=Qd(U);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function bg(e){let t=Qd(U);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function xg(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[yg(r),e]:r.push(typeof e==`string`?yg(e):e)}for(let e of n){let[t,n]=e;if(i(` 13${JSON.stringify(t)} 14`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(sp(n))}i(e)}}return typeof r==`string`?r:Sg(r)}function Sg(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function Cg(e){let t=typeof e==`string`?yg(e):e;function n(e){let n=t.subarray(0,e);return t=t.subarray(e+1),n}function r(){let e=t.indexOf(10);return e<0&&(e=t.length),JSON.parse(bg(n(e)))}let i=r(),a=[];for(;t.length;){let e=r(),t=typeof e.length==`number`?e.length:void 0;a.push([e,t?n(t):r()])}return[i,a]}function wg(e){return[{type:`span`},e]}function Tg(e){let t=typeof e.data==`string`?yg(e.data):e.data;return[{type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Eg={sessions:`session`,event:`error`,client_report:`internal`,user_report:`default`,profile_chunk:`profile`,replay_event:`replay`,replay_recording:`replay`,check_in:`monitor`,raw_security:`security`,log:`log_item`,trace_metric:`metric`};function Dg(e){return e in Eg}function Og(e){return Dg(e)?Eg[e]:e}function kg(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ag(e,t,n,r){let i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(Hf()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:hh(r)},...i&&{trace:i}}}function jg(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function Mg(e,t,n,r){let i=kg(n);return hg({sent_at:new Date(Hf()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:hh(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function Ng(e,t,n,r){let i=kg(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;jg(e,n?.sdk);let o=Ag(e,i,r,t);return delete e.sdkProcessingMetadata,hg(o,[[{type:a},e]])}function Pg(e,t){function n(e){return!!e.trace_id&&!!e.public_key}let r=ug(e[0]),i=t?.getDsn(),a=t?.getOptions().tunnel,o={sent_at:new Date(Hf()).toISOString(),...n(r)&&{trace:r},...!!a&&i&&{dsn:hh(i)}},{beforeSendSpan:s,ignoreSpans:c}=t?.getOptions()||{},l=c?.length?e.filter(e=>{let t=q(e);return!qm({description:t.description,op:t.op,attributes:t.data},c)}):e,u=e.length-l.length;u&&t?.recordDroppedEvent(`before_send`,`span`,u);let d=s?e=>{let t=q(e);return(mg(s)?t:s(t))||(eg(),t)}:q,f=[];for(let e of l){let t=d(e);t&&f.push(wg(t))}return hg(o,f)}function Fg(e,t,n,r=$h()){let i=r&&Zh(r);i&&i.addEvent(e,{[xm]:t,[bm]:n})}function Ig(e){if(!e||e.length===0)return;let t={};
14return e.forEach(e=>{let n=e.attributes||{},r=n[bm],i=n[xm];typeof r==`string`&&typeof i==`number`&&(t[e.name]={value:i,unit:r})}),t}var Lg=1e3,Rg=class{constructor(e={}){this._traceId=e.traceId||Wp(),this._spanId=e.spanId||Gp(),this._startTime=e.startTimestamp||Fp(),this._links=e.links,this._attributes={},this.setAttributes({[K]:`manual`,[vm]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),`sampled`in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,t){}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:+!!n}}setAttribute(e,t){return t===void 0?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=Ih(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,fh(this)||this.setAttribute(hm,`custom`),this}end(e){this._endTime||(this._endTime=Ih(e),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[vm],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Wh(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[K],profile_id:this._attributes[Pm],exclusive_time:this._attributes[Fm],measurements:Ig(this._events),is_segment:this._isStandaloneSpan&&Zh(this)===this||void 0,segment_id:this._isStandaloneSpan?Zh(this).spanContext().spanId:void 0,links:Ph(this._links)}}getStreamedSpanJSON(){return{name:this._name??``,span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===Zh(this),status:Gh(this._status),attributes:this._attributes,links:Fh(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){let r=zg(t)?t:n||Fp(),i=zg(t)?{}:t||{},a={name:e,time:Ih(r),attributes:i};return this._events.push(a),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=G();if(e&&(e.emit(`spanEnd`,this),this._isStandaloneSpan||e.emit(`afterSpanEnd`,this)),!(this._isStandaloneSpan||this===Zh(this)))return;if(this._isStandaloneSpan){this._sampled?Hg(Pg([this],e)):e&&e.recordDroppedEvent(`sample_rate`,`span`);return}else if(e&&Zm(e)){e.emit(`afterSegmentSpanEnd`,this);return}let t=this._convertSpanToTransaction();t&&(dh(this).scope||W()).captureEvent(t)}_convertSpanToTransaction(){if(!Bg(q(this)))return;this._name||=`<unlabeled transaction>`;let{scope:e,isolationScope:t}=dh(this),n=e?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let r=Xh(this).filter(e=>e!==this&&!Vg(e)).map(e=>q(e)).filter(Bg),i=this._attributes[hm];delete this._attributes[Nm];let a=!1;r.forEach(e=>{delete e.data[Nm],e.op?.startsWith(`gen_ai.`)&&(a=!0)});let o={contexts:{trace:Ah(this)},spans:r.length>Lg?r.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,Lg):r,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:`transaction`,sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,dynamicSamplingContext:ug(this),hasGenAiSpans:a},request:n,...i&&{transaction_info:{source:i}}},s=Ig(this._events);return s&&Object.keys(s).length&&(o.measurements=s),o}};function zg(e){return e&&typeof e==`number`||e instanceof Date||Array.isArray(e)}function Bg(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Vg(e){return e instanceof Rg&&e.isStandaloneSpan()}function Hg(e){let t=G();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent(`before_send`,`span`);return}t.sendEnvelope(e)}var Ug=`__SENTRY_SUPPRESS_TRACING__`;function Wg(e,t){let n=e_();if(n.startSpan)return n.startSpan(e,t);let r=$g(e),{forceTransaction:i,parentSpan:a,scope:o}=e,s=o?.clone();return fm(s,()=>i_(a)(()=>{let n=W(),o=r_(n,a),s=G(),c=e.onlyIfParent&&!o?Zg(n,s):Qg({parentSpan:o,spanArguments:r,forceTransaction:i,scope:n});
14return(!o_(c)||!o)&&Lf(n,c),Wm(()=>t(c),()=>{let{status:e}=q(c);c.isRecording()&&(!e||e===`ok`)&&c.setStatus({code:2,message:`internal_error`})},()=>{c.end()})}))}function Gg(e,t){let n=e_();if(n.startSpanManual)return n.startSpanManual(e,t);let r=$g(e),{forceTransaction:i,parentSpan:a,scope:o}=e,s=o?.clone();return fm(s,()=>i_(a)(()=>{let n=W(),o=r_(n,a),s=e.onlyIfParent&&!o?Zg(n,G()):Qg({parentSpan:o,spanArguments:r,forceTransaction:i,scope:n});return(!o_(s)||!o)&&Lf(n,s),Wm(()=>t(s,()=>s.end()),()=>{let{status:e}=q(s);s.isRecording()&&(!e||e===`ok`)&&s.setStatus({code:2,message:`internal_error`})})}))}function Kg(e){let t=e_();if(t.startInactiveSpan)return t.startInactiveSpan(e);let n=$g(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?t=>fm(e.scope,t):i===void 0?e=>e():e=>Jg(i,e))(()=>{let t=W(),a=r_(t,i),o=G();return e.onlyIfParent&&!a?Zg(t,o):Qg({parentSpan:a,spanArguments:n,forceTransaction:r,scope:t})})}var qg=(e,t)=>{let n=om(Zd());if(n.continueTrace)return n.continueTrace(e,t);let{sentryTrace:r,baggage:i}=e,a=G(),o=zm(i);return a&&!Oh(a,o?.org_id)?Xg(t):fm(e=>{let n=wh(r,i);return e.setPropagationContext(n),Lf(e,void 0),t()})};function Jg(e,t){let n=e_();return n.withActiveSpan?n.withActiveSpan(e,t):fm(n=>(Lf(n,e||void 0),t(n)))}function Yg(e){let t=e_();return t.suppressTracing?t.suppressTracing(e):fm(t=>{t.setSDKProcessingMetadata({[Ug]:!0});let n=e();return t.setSDKProcessingMetadata({[Ug]:void 0}),n})}function Xg(e){let t=e_();return t.startNewTrace?t.startNewTrace(e):fm(t=>(t.setPropagationContext({traceId:Wp(),sampleRand:Vf()}),Jg(null,e)))}function Zg(e,t){t?.recordDroppedEvent(`no_parent_span`,`span`);let n=new ig({traceId:e.getPropagationContext().traceId});return uh(n,e,um()),n}function Qg({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){let i=um();if(!Km()){let t={...i.getPropagationContext(),...r.getPropagationContext()},a=new ig({traceId:e?e.spanContext().traceId:t.traceId});return e&&!n&&Jh(e,a),uh(a,r,i),a}let a=G();if(a_(a,t)){s_(r)||a?.recordDroppedEvent(`ignored`,`span`);let t=new ig({dropReason:`ignored`,traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});return uh(t,r,i),t}let o;if(e&&!n)o=n_(e,r,t,i),Jh(e,o);else if(e){let n=ug(e),{traceId:a,spanId:s}=e.spanContext(),c=Uh(e);o=t_({traceId:a,parentSpanId:s,...t},r,i,c),sg(o,n)}else{let{traceId:e,dsc:n,parentSpanId:a,sampled:s}={...i.getPropagationContext(),...r.getPropagationContext()};o=t_({traceId:e,parentSpanId:a,...t},r,i,s),n&&sg(o,n)}return o}function $g(e){let t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...t};return n.startTimestamp=Ih(e.startTime),delete n.startTime,n}return t}function e_(){return om(Zd())}function t_(e,t,n,r){let i=G(),a=i?.getOptions()||{},{name:o=``}=e,s={spanAttributes:{...e.attributes},spanName:o,parentSampled:r};i?.emit(`beforeSampling`,s,{decision:!1});let c=s.parentSampled??r,l=s.spanAttributes,u=t.getPropagationContext(),d=s_(t),[f,p,m]=d?[!1]:fg(a,{name:o,parentSampled:c,attributes:l,parentSampleRate:Qm(u.dsc?.sample_rate)},u.sampleRand),h=new Rg({...e,attributes:{[hm]:`custom`,[gm]:p!==void 0&&m?p:void 0,...l},sampled:f});return!f&&i&&!d&&i.recordDroppedEvent(`sample_rate`,Zm(i)?`span`:`transaction`),uh(h,t,n),i&&i.emit(`spanStart`,h),h}function n_(e,t,n,r){let{spanId:i,traceId:a}=e.spanContext(),o=s_(t),s=o?!1:Uh(e),c=s?new Rg({...n,parentSpanId:i,traceId:a,sampled:s}):new ig({traceId:a});Jh(e,c),uh(c,t,r);let l=G();return l?(Zm(l)&&ag(c)&&(ag(e)&&e.dropReason?(c.dropReason=e.dropReason,l.recordDroppedEvent(e.dropReason,`span`)):o||(c.dropReason=`sample_rate`,l.recordDroppedEvent(`sample_rate`,`span`))),l.emit(`spanStart`,c),n.endTimestamp&&(l.emit(`spanEnd`,c),l.emit(`afterSpanEnd`,c)),c):c}function r_(e,t){if(t)return t;if(t===null)return;let n=Rf(e);if(!n)return;let r=G();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Zh(n):n}function i_(e){return e===void 0?e=>e():t=>Jg(e,t)}function a_(e,t){let n=e?.getOptions().ignoreSpans;return!e||!Zm(e)||!n?.length?!1:qm({description:t.name||``,op:t.attributes?.[`sentry.op`]||t.op,attributes:t.attributes},n)}function o_(e){return ag(e)&&e.dropReason===`ignored`}function s_(e){return e.getScopeData().sdkProcessingMetadata[Ug]===!0}function c_(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;f_(e,t),r&&h_(e,r),g_(e,n),p_(e,i),m_(e,a)}function l_(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m,span:h}=t;
14u_(e,`extra`,n),u_(e,`tags`,r),u_(e,`attributes`,i),u_(e,`user`,a),u_(e,`contexts`,o),e.sdkProcessingMetadata=Up(e.sdkProcessingMetadata,c,2),s&&(e.level=s),m&&(e.transactionName=m),h&&(e.span=h),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function u_(e,t,n){e[t]=Up(e[t],n,1)}function d_(e,t){let n=dm().getScopeData();return e&&l_(n,e.getScopeData()),t&&l_(n,t.getScopeData()),n}function f_(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function p_(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function m_(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function h_(e,t){e.contexts={trace:jh(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:ug(t),...e.sdkProcessingMetadata};let n=q(Zh(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function g_(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function __(e){let t={},{response:n,profile:r,cloud_resource:i,culture:a,state:o}=e;if(n&&(n.status_code!=null&&(t[`http.response.status_code`]=n.status_code),n.body_size!=null&&(t[`http.response.body.size`]=n.body_size)),r&&(r.profile_id&&(t[`sentry.profile_id`]=r.profile_id),r.profiler_id&&(t[`sentry.profiler_id`]=r.profiler_id)),i)for(let[e,n]of Object.entries(i))n!=null&&(t[e]=n);a&&(a.locale&&(t[`culture.locale`]=a.locale),a.timezone&&(t[`culture.timezone`]=a.timezone)),o?.state&&typeof o.state.type==`string`&&(t[`state.type`]=o.state.type);let s=e.angular;if(s){let e=s.version;(typeof e==`string`||typeof e==`number`)&&(t[`angular.version`]=e)}let c=e.react;if(c){let e=c.version;(typeof e==`string`||typeof e==`number`)&&(t[`react.version`]=e)}return t}function v_(e,t){let n=Rh(e),r=Qh(e),i=Rh(r),{isolationScope:a,scope:o}=dh(e),s=d_(a,o);S_(n,i,t,s);let c=e.kind;t.emit(`preprocessSpan`,n,{spanKind:c}),n.is_segment&&(y_(n,s),x_(n,t),t.emit(`processSegmentSpan`,n)),t.emit(`processSpan`,n);let{beforeSendSpan:l}=t.getOptions(),u=l&&mg(l)?C_(n,l):n,d=u.attributes?.[hm];return d&&b_(u,{"sentry.span.source":d}),{...Bh(u),_segmentSpan:r}}function y_(e,t){b_(e,__(t.contexts))}function b_(e,t){let n=e.attributes??={};Object.entries(t).forEach(([e,t])=>{t!=null&&!(e in n)&&(n[e]=t)})}function x_(e,t){let n=t.getIntegrationNames();n.length&&b_(e,{[Om]:n})}function S_(e,t,n,r){let i=n.getSdkMetadata(),{release:a,environment:o}=n.getOptions();b_(e,{[Sm]:a,[Cm]:o||`production`,[wm]:t.name,[Tm]:t.span_id,[Em]:i?.sdk?.name,[Dm]:i?.sdk?.version,[km]:r.user?.id,[Am]:r.user?.email,[jm]:r.user?.ip_address,[Mm]:r.user?.username,...r.attributes})}function C_(e,t){return t(e)||(eg(),e)}var w_=0,T_=1,E_=2;function D_(e){return new k_(t=>{t(e)})}function O_(e){return new k_((t,n)=>{n(e)})}var k_=class e{constructor(e){this._state=w_,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{if(i){n(r);return}e(r)})})}_executeHandlers(){if(this._state===w_)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===T_&&e[1](this._value),this._state===E_&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{if(this._state===w_){if(wf(t)){t.then(n,r);return}this._state=e,this._value=t,this._executeHandlers()}},n=e=>{t(T_,e)},r=e=>{t(E_,e)};try{e(n,r)}catch(e){r(e)}}};function A_(e,t,n,r=0){try{let i=j_(t,n,e,r);return wf(i)?i:D_(i)}catch(e){return O_(e)}}function j_(e,t,n,r){let i=n[r];if(!e||!i)return e;let a=i({...e},t);return wf(a)?a.then(e=>j_(e,t,n,r+1)):j_(a,t,n,r+1)}var M_,N_,P_,F_;function I_(e){let t=U._sentryDebugIds,n=U._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],i=n?Object.keys(n):[];if(F_&&r.length===N_&&i.length===P_)return F_;N_=r.length,P_=i.length,F_={},M_||={};let a=(t,n)=>{for(let r of t){let t=n[r],i=M_?.[r];if(i&&F_&&t)F_[i[0]]=t,M_&&(M_[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e]?.filename;if(i&&F_&&M_){F_[i]=t,M_[r]=[i,t];break}}}}};return t&&a(r,t),n&&a(i,n),F_}function L_(e,t){let n=I_(e);if(!n)return[];let r=[];for(let e of t){let t=ip(e);t&&n[t]&&r.push({type:`sourcemap`,code_file:e,debug_id:n[t]})}return r}function R_(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Cp(),timestamp:t.timestamp||Mp()},l=n.integrations||e.integrations.map(e=>e.name);z_(c,e),H_(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&B_(c,e.stackParser);let u=W_(r,n.captureContext);n.mechanism&&Dp(c,n.mechanism);let d=i?i.getEventProcessors():[],f=d_(a,u),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),c_(c,f);let m=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?D_(c):A_(m,c,n)).then(e=>(e&&V_(e),typeof o==`number`&&o>0?U_(e,o,s):e))}function z_(e,t){let{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||`production`,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let o=e.request;o?.url&&a&&(o.url=hp(o.url,a)),a&&e.exception?.values?.forEach(e
14=>{e.value&&=hp(e.value,a)})}function B_(e,t){let n=I_(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}function V_(e){let t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}function H_(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function U_(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:sp(e.data,t,n)}}))},...e.user&&{user:sp(e.user,t,n)},...e.contexts&&{contexts:sp(e.contexts,t,n)},...e.extra&&{extra:sp(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=sp(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:sp(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=sp(e.contexts.flags,3,n)),r}function W_(e,t){if(!t)return e;let n=e?e.clone():new qp;return n.update(t),n}function G_(e){if(e)return K_(e)||J_(e)?{captureContext:e}:e}function K_(e){return e instanceof qp||typeof e==`function`}var q_=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function J_(e){return Object.keys(e).some(e=>q_.includes(e))}function Y_(e,t){return W().captureException(e,G_(t))}function X_(e,t){let n=typeof t==`string`?t:void 0,r=typeof t==`string`?void 0:{captureContext:t};return W().captureMessage(e,n,r)}function Z_(e,t){return W().captureEvent(e,t)}function Q_(e,t){um().setContext(e,t)}function $_(e){um().setExtras(e)}function ev(e,t){um().setExtra(e,t)}function tv(e){um().setTags(e)}function nv(e,t){um().setTag(e,t)}function rv(e){um().setAttributes(e)}function iv(e,t){um().setAttribute(e,t)}function av(e){um().setUser(e)}function ov(e){um().setConversationId(e)}function sv(){return um().lastEventId()}async function cv(e){let t=G();return t?t.flush(e):Promise.resolve(!1)}async function lv(e){let t=G();return t?t.close(e):Promise.resolve(!1)}function uv(){return!!G()}function dv(){let e=G();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function fv(e){um().addEventProcessor(e)}function pv(e){let t=um(),{user:n}=d_(t,W()),{userAgent:r}=U.navigator||{},i=zp({user:n,...r&&{userAgent:r},...e}),a=t.getSession();return a?.status===`ok`&&Bp(a,{status:`exited`}),mv(),t.setSession(i),i}function mv(){let e=um(),t=W().getSession()||e.getSession();t&&Vp(t),hv(),e.setSession()}function hv(){let e=um(),t=G(),n=e.getSession();n&&t&&t.captureSession(n)}function gv(e=!1){if(e){mv();return}hv()}var _v=[];function vv(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}function yv(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n==`function`){let e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return vv(r)}function bv(e,t){let n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&Sv(e,t,n)}),n}function xv(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Sv(e,t,n){if(!n[t.name]){if(n[t.name]=t,!_v.includes(t.name)&&typeof t.setupOnce==`function`&&(t.setupOnce(),_v.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}[`processSpan`,`processSegmentSpan`].forEach(n=>{let r=t[n];typeof r==`function`&&e.on(n,n=>r.call(t,n,e))})}}function Cv(e){let t=G();t&&t.addIntegration(e)}function J(e){return e}var wv=`thismessage:/`;function Tv(e){return`isRelative`in e}function Ev(e,t){let n=e.indexOf(`://`)<=0&&e.indexOf(`//`)!==0,r=t??(n?wv:void 0);try{if(`canParse`in URL&&!URL.canParse(e,r))return;let t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function Dv(e){if(Tv(e))return e.pathname;let t=new URL(e);return t.search=``,t.hash=``,[`80`,`443`].includes(t.port)&&(t.port=``),t.password&&=`%filtered%`,t.username&&=`%filtered%`,t.toString()}function Ov(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function kv(e){return e.split(/[?#]/,1)[0]}function Av(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function jv(e,t){let n=t?.getDsn(),r=t?.getOptions().tunnel;return Nv(e,n)||Mv(e,r)}function Mv(e,t){return t?Fv(e)===Fv(t):!1}function Nv(e,t){let n=Ev(e);return!n||Tv(n)||!t?!1:Pv(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function Pv(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function Fv(e){return e[e.length-1]===`/`?e.slice(0,-1):e}function Iv(e,t,n){let r,i,a,o=n?.maxWait?Math.max(n.maxWait,t):0,s=n?.setTimeoutImpl||setTimeout;function c(){return l(),r=e(),r}function l(){i!==void 0&&clearTimeout(i),a!==void 0&&clearTimeout(a),i=a=void 0}function u(){return i!==void 0||a!==void 0?c():r}function d(){return i&&clearTimeout(i),i=s(c,t),o&&a===void 0&&(a=s(c,o)),r}return d.cancel=l,d.flush=u,d}var Lv=100;function Rv(e,t){let n=G(),r=um();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=Lv}=n.getOptions();if(a<=0)return;let o={timestamp:Mp(),...e},s=i?nf(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}
14function zv(e,t={},n=W()){let{message:r,name:i,email:a,url:o,source:s,associatedEventId:c,tags:l}=e,u={contexts:{feedback:{contact_email:a,name:i,message:r,url:o,source:s,associated_event_id:c}},type:`feedback`,level:`info`,tags:l},d=n?.getClient()||G();return d&&d.emit(`beforeSendFeedback`,u,t),n.captureEvent(u,t)}var Bv=`sentry.timestamp.sequence`,Vv=0,Hv;function Uv(e){let t=Math.floor(e*1e3);Hv!==void 0&&t!==Hv&&(Vv=0);let n=Vv;return Vv++,Hv=t,{key:Bv,value:{value:n,type:`integer`}}}function Wv(e,t){return t?fm(t,()=>{let n=$h(),r=n?jh(n):mm(t);return[n?ug(n):lg(e,t),r]}):[void 0,void 0]}function Gv(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function Kv(){return`npm`}function qv(){return!Gv()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function Jv(){return typeof window<`u`&&(!qv()||Yv())}function Yv(){return U.process?.type===`renderer`}function Xv(e,t){let n=t?`auto`:`never`;return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{version:2,...Jv()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Zv(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=hh(r)),hg(a,[Xv(e,i)])}var Qv=1e3;function $v(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function ey(e,t){let n=oy(),r=ay(e);r===void 0?n.set(e,[t]):r.length>=Qv?(iy(e,r),n.set(e,[t])):n.set(e,[...r,t])}function ty(e,t,n){let{release:r,environment:i}=t.getOptions(),a={...e.attributes};$v(a,`user.id`,n.id,!1),$v(a,`user.email`,n.email,!1),$v(a,`user.name`,n.username,!1),$v(a,`sentry.release`,r),$v(a,`sentry.environment`,i);let{name:o,version:s}=t.getSdkMetadata()?.sdk??{};$v(a,`sentry.sdk.name`,o),$v(a,`sentry.sdk.version`,s);let c=t.getIntegrationByName(`Replay`),l=c?.getReplayId(!0);return $v(a,`sentry.replay_id`,l),l&&c?.getRecordingMode()===`buffer`&&$v(a,`sentry._internal.replay_is_buffering`,!0),{...e,attributes:a}}function ny(e,t,n,r){let[,i]=Wv(t,n),a=Rf(n),o=a?a.spanContext().traceId:i?.trace_id,s=a?a.spanContext().spanId:void 0,c=Fp(),l=Uv(c);return{timestamp:c,trace_id:o??``,span_id:s,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...th(r),...th(e.attributes,`skip-undefined`),[l.key]:l.value}}}
14function ry(e,t){let n=t?.scope??W(),r=t?.captureSerializedMetric??ey,i=n?.getClient()??G();if(!i)return;let{_experiments:a,enableMetrics:o,beforeSendMetric:s}=i.getOptions();if(!(o??a?.enableMetrics??!0))return;let{user:c,attributes:l}=d_(um(),n),u=ty(e,i,c);i.emit(`processMetric`,u);let d=s||a?.beforeSendMetric,f=d?d(u):u;f&&(r(i,ny(f,i,n,l)),i.emit(`afterCaptureMetric`,f))}function iy(e,t){let n=t??ay(e)??[];if(n.length===0)return;let r=e.getOptions(),i=Zv(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);oy().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function ay(e){return oy().get(e)}function oy(){return $d(`clientToMetricBufferMap`,()=>new WeakMap)}var sy=e({count:()=>ly,distribution:()=>dy,gauge:()=>uy});function cy(e,t,n,r){ry({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function ly(e,t=1,n){cy(`counter`,e,t,n)}function uy(e,t,n){cy(`gauge`,e,t,n)}function dy(e,t,n){cy(`distribution`,e,t,n)}var fy=U;function py(){return`history`in fy&&!!fy.history}function my(){if(!(`fetch`in fy))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function hy(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function gy(){if(typeof EdgeRuntime==`string`)return!0;if(!my())return!1;if(hy(fy.fetch))return!0;let e=!1,t=fy.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=hy(n.contentWindow.fetch)),t.head.removeChild(n)}catch{}return e}function _y(){return`ReportingObserver`in fy}var vy={},yy={};function by(e,t){return vy[e]=vy[e]||[],vy[e].push(t),()=>{let n=vy[e];if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}function xy(e,t){if(!yy[e]){yy[e]=!0;try{t()}catch{}}}function Sy(e,t){let n=e&&vy[e];if(n)for(let e of n)try{e(t)}catch{}}function Cy(e,t){let n=`fetch`,r=by(n,e);return xy(n,()=>Ty(void 0,t)),r}function wy(e){let t=`fetch-body-resolved`,n=by(t,e);return xy(t,()=>Ty(Dy)),n}function Ty(e,t=!1){t&&!gy()||Df(U,`fetch`,function(t){return function(...n){let r=Error(),{method:i,url:a}=Ay(n),o={args:n,fetchData:{method:i,url:a},startTimestamp:Fp()*1e3,virtualError:r,headers:jy(n)};return e||Sy(`fetch`,{...o}),t.apply(U,n).then(async t=>(e?e(t):Sy(`fetch`,{...o,endTimestamp:Fp()*1e3,response:t}),t),e=>{Sy(`fetch`,{...o,endTimestamp:Fp()*1e3,error:e}),pf(e)&&e.stack===void 0&&(e.stack=r.stack,Of(e,`framesToPop`,1));let t=G()?.getOptions().enhanceFetchErrorMessages??`always`;if(t!==!1&&e instanceof TypeError&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{let n=new URL(o.fetchData.url).host;t===`always`?e.message=`${e.message} (${n})`:Of(e,`__sentry_fetch_url_host__`,n)}catch{}throw e})}})}async function Ey(e,t){if(e?.body){let n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3),a=!0;for(;a;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);let{done:i}=await r.read();clearTimeout(e),i&&(t(),a=!1)}catch{a=!1}finally{clearTimeout(e)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function Dy(e){let t;try{t=e.clone()}catch{return}Ey(t,()=>{Sy(`fetch-body-resolved`,{endTimestamp:Fp()*1e3,response:e})})}function Oy(e,t){return!!e&&typeof e==`object`&&!!e[t]}function ky(e){return typeof e==`string`?e:e?Oy(e,`url`)?e.url:e.toString?e.toString():``:``}function Ay(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:ky(t),method:Oy(n,`method`)?String(n.method).toUpperCase():Ef(t)&&Oy(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:ky(t),method:Oy(t,`method`)?String(t.method).toUpperCase():`GET`}}function jy(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(Ef(t))return new Headers(t.headers)}catch{}}function My(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var Ny=60*1e3;function Py(e,t=Hf()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?Ny:r-t}function Fy(e,t){return e[t]||e.all||0}function Iy(e,t,n=Hf()){return Fy(e,t)>n}function Ly(e,{statusCode:t,headers:n},r=Hf()){let i={...e},a=n?.[`x-sentry-rate-limits`],o=n?.[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+Py(o,r):t===429&&(i.all=r+60*1e3);return i}var Ry=U;function zy(){try{return Ry.document.location.href}catch{return``}}function By(e,t=5){if(!Ry.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}var Vy=U,Hy=Vy.document,Uy=Vy.navigator,Wy=`Report a Bug`,Gy=`Cancel`,Ky=`Send Bug Report`,qy=`Confirm`,Jy=`Report a Bug`,Yy=`[email protected]`,Xy=`Email`,Zy=`What's the bug? What did you expect?`,Qy=`Description`,$y=`Your Name`,eb=`Name`,tb=`Thank you for your report!`,nb=`(required)`,rb=`Add a screenshot`,ib=`Remove screenshot`,ab=`Highlight`,ob=`Hide`,sb=`Remove`,cb=`Unable to submit feedback with empty message`,lb=`No client setup, cannot send feedback.`,ub=`Unable to determine if Feedback was correctly sent.`,db=`Unable to send feedback. This could be because this domain is not in your list of allowed domains.`,fb=`Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.`,pb=`widget`,mb=`api`,hb=5e3,gb={ERROR_EMPTY_MESSAGE:cb,ERROR_NO_CLIENT:lb,ERROR_TIMEOUT:ub,ERROR_FORBIDDEN:db,ERROR_GENERIC:fb};function _b(e,t){return t?.[e]??gb[e]}function vb(e,t){return Error(_b(e,t))}var yb=(e,t={includeReplay:!0})=>{let n=t.errorMessages;if(!e.message)throw vb(`ERROR_EMPTY_MESSAGE`,n);let r=G();if(!r)throw vb(`ERROR_NO_CLIENT`,n);e.tags&&Object.keys(e.tags).length&&W().setTags(e.tags);let i=zv({source:mb,url:zy(),...e},t);return new Promise((e,t)=>
14{let a=setTimeout(()=>{o(),t(_b(`ERROR_TIMEOUT`,n))},3e4),o=r.on(`afterSendEvent`,(r,s)=>{if(r.event_id===i)return clearTimeout(a),o(),s?.statusCode&&s.statusCode>=200&&s.statusCode<300?e(i):s?.statusCode===403?t(_b(`ERROR_FORBIDDEN`,n)):t(_b(`ERROR_GENERIC`,n))})})};function bb(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Uy.userAgent)||/Macintosh/i.test(Uy.userAgent)&&Uy.maxTouchPoints&&Uy.maxTouchPoints>1||!isSecureContext)}function xb(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function Sb(e){let t=Hy.createElement(`style`);return t.textContent=` 15.widget__actor { 16 position: fixed; 17 z-index: var(--z-index); 18 margin: var(--page-margin); 19 inset: var(--actor-inset); 20 21 display: flex; 22 align-items: center; 23 gap: 8px; 24 padding: 16px; 25 26 font-family: inherit; 27 font-size: var(--font-size); 28 font-weight: 600; 29 line-height: 1.14em; 30 text-decoration: none; 31 32 background: var(--actor-background, var(--background)); 33 border-radius: var(--actor-border-radius, 1.7em/50%); 34 border: var(--actor-border, var(--border));
35 box-shadow: var(--actor-box-shadow, var(--box-shadow)); 36 color: var(--actor-color, var(--foreground)); 37 fill: var(--actor-color, var(--foreground)); 38 cursor: pointer; 39 opacity: 1; 40 transition: transform 0.2s ease-in-out; 41 transform: translate(0, 0) scale(1); 42} 43.widget__actor[aria-hidden="true"] { 44 opacity: 0; 45 pointer-events: none; 46 visibility: hidden; 47 transform: translate(0, 16px) scale(0.98); 48} 49 50.widget__actor:hover { 51 background: var(--actor-hover-background, var(--background)); 52 filter: var(--interactive-filter); 53} 54 55.widget__actor svg { 56 width: 1.14em; 57 height: 1.14em; 58} 59 60@media (max-width: 600px) { 61 .widget__actor span { 62 display: none; 63 } 64} 65`,e&&t.setAttribute(`nonce`,e),t}function Cb(e,t){return Object.entries(t).forEach(([t,n])=>{e.setAttributeNS(null,t,n)}),e}var wb=20,Tb=`http://www.w3.org/2000/svg`;function Eb(){let e=e=>Vy.document.createElementNS(Tb,e),t=Cb(e(`svg`),{width:`${wb}`,height:`${wb}`,viewBox:`0 0 ${wb} ${wb}`,fill:`var(--actor-color, var(--foreground))`}),n=Cb(e(`g`),{clipPath:`url(#clip0_57_80)`}),r=Cb(e(`path`),{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z`});t.appendChild(n).appendChild(r);let i=e(`defs`),a=Cb(e(`clipPath`),{id:`clip0_57_80`}),o=Cb(e(`rect`),{width:`${wb}`,height:`${wb}`,fill:`white`});return a.appendChild(o),i.appendChild(a),t.appendChild(i).appendChild(a).appendChild(o),t}function Db({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){let i=Hy.createElement(`button`);if(i.type=`button`,i.className=`widget__actor`,i.ariaHidden=`false`,i.ariaLabel=t||e||Wy,i.appendChild(Eb()),e){let t=Hy.createElement(`span`);t.appendChild(Hy.createTextNode(e)),i.appendChild(t)}let a=Sb(r);return{el:i,appendToDom(){n.appendChild(a),n.appendChild(i)},removeFromDom(){i.remove(),a.remove()},show(){i.ariaHidden=`false`},hide(){i.ariaHidden=`true`}}}var Ob=`rgba(88, 74, 192, 1)`,kb={foreground:`#2b2233`,background:`#ffffff`,accentForeground:`white`,accentBackground:Ob,successColor:`#268d75`,errorColor:`#df3338`,border:`1.5px solid rgba(41, 35, 47, 0.13)`,boxShadow:`0px 4px 24px 0px rgba(43, 34, 51, 0.12)`,outline:`1px auto var(--accent-background)`,interactiveFilter:`brightness(95%)`},Ab={foreground:`#ebe6ef`,background:`#29232f`,accentForeground:`white`,accentBackgroun
65d:Ob,successColor:`#2da98c`,errorColor:`#f55459`,border:`1.5px solid rgba(235, 230, 239, 0.15)`,boxShadow:`0px 4px 24px 0px rgba(43, 34, 51, 0.12)`,outline:`1px auto var(--accent-background)`,interactiveFilter:`brightness(150%)`};function jb(e){return` 66 --foreground: ${e.foreground}; 67 --background: ${e.background}; 68 --accent-foreground: ${e.accentForeground}; 69 --accent-background: ${e.accentBackground}; 70 --success-color: ${e.successColor}; 71 --error-color: ${e.errorColor}; 72 --border: ${e.border}; 73 --box-shadow: ${e.boxShadow}; 74 --outline: ${e.outline}; 75 --interactive-filter: ${e.interactiveFilter}; 76 `}function Mb({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){let i=Hy.createElement(`style`);return i.textContent=` 77:host { 78 --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif; 79 --font-size: 14px; 80 --z-index: 100000; 81 82 --page-margin: 16px; 83 --inset: auto 0 0 auto; 84 --actor-inset: var(--inset); 85 86 font-family: var(--font-family); 87 font-size: var(--font-size); 88 89 ${e===`system`?``:`color-scheme: only ${e};`} 90 91 ${jb(e===`dark`?{...Ab,...t}:{...kb,...n})} 92} 93 94${e===`system`?` 95@media (prefers-color-scheme: dark) { 96 :host { 97 color-scheme: only dark; 98 99 ${jb({...Ab,...t})} 100 } 101}`:``} 102`,r&&i.setAttribute(`nonce`,r),i}var Nb=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>(({id:r=`sentry-feedback`,autoInject:i=!0,showBranding:a=!0,isEmailRequired:o=!1,isNameRequired:s=!1,showEmail:c=!0,showName:l=!0,enableScreenshot:u=!0,useSentryUser:d={email:`email`,name:`username`},tags:f,styleNonce:p,scriptNonce:m,colorScheme:h=`system`,themeLight:g={},themeDark:_={},addScreenshotButtonLabel:v=rb,cancelButtonLabel:y=Gy,confirmButtonLabel:b=qy,emailLabel:x=Xy,emailPlaceholder:S=Yy,formTitle:C=Jy,isRequiredLabel:w=nb,messageLabel:T=Qy,messagePlaceholder:E=Zy,nameLabel:D=eb,namePlaceholder:ee=$y,removeScreenshotButtonLabel:te=ib,submitButtonLabel:O=Ky,successMessageText:k=tb,triggerLabel:ne=Wy,triggerAriaLabel:re=``,highlightToolText:A=ab,hideToolText:ie=ob,removeHighlightText:ae=sb,errorEmptyMessageText:j=cb,errorNoClientText:oe=lb,errorTimeoutText:se=ub,errorForbiddenText:ce=db,errorGenericText:le=fb,onFormOpen:ue,onFormClose:de,onSubmitSuccess:fe,onSubmitError:pe,onFormSubmitted:me}={})=>{let he={id:r,autoInject:i,showBranding:a,isEmailRequired:o,isNameRequired:s,showEmail:c,showName:l,enableScreenshot:u,useSentryUser:d,tags:f,styleNonce:p,scriptNonce:m,colorScheme:h,themeDark:_,themeLight:g,triggerLabel:ne,triggerAriaLabel:re,cancelButtonLabel:y,submitButtonLabel:O,confirmButtonLabel:b,formTitle:C,emailLabel:x,emailPlaceholder:S,messageLabel:T,messagePlaceholder:E,nameLabel:D,namePlaceholder:ee,successMessageText:k,isRequiredLabel:w,addScreenshotButtonLabel:v,removeScreenshotButtonLabel:te,highlightToolText:A,hideToolText:ie,removeHighlightText:ae,errorEmptyMessageText:j,errorNoClientText:oe,errorTimeoutText:se,errorForbiddenText:ce,errorGenericText:le,onFormClose:de,onFormOpen:ue,onSubmitError:pe,onSubmitSuccess:fe,onFormSubmitted:me},ge=null,_e=null,ve=[],ye=e=>{if(!ge){let t=Hy.createElement(`div`);t.id=String(e.id),Hy.body.appendChild(t),ge=t.attachShadow({mode:`open`}),_e=Mb(e),ge.appendChild(_e)}return ge},be=async r=>{let i=r.enableScreenshot&&bb(),a,o;try{a=(t?t():await e(`feedbackModalIntegration`,m))(),Cv(a)}catch{throw Error(`[Feedback] Missing feedback modal integration!`)}try{let t=i?n?n():await e(`feedbackScreenshotIntegration`,m):void 0;t&&(o=t(),Cv(o))}catch{}let s={ERROR_EMPTY_MESSAGE:r.errorEmptyMessageText,ERROR_NO_CLIENT:r.errorNoClientText,ERROR_TIMEOUT:r.errorTimeoutText,ERROR_FORBIDDEN:r.errorForbiddenText,ERROR_GENERIC:r.errorGenericText},c=(e,t)=>yb(e,{includeReplay:!0,...t,errorMessages:s}),l=a.createDialog({options:{...r,onFormClose:()=>{l?.close(),r.onFormClose?.()},onFormSubmitted:()=>{l?.close(),r.onFormSubmitted?.()}},screenshotIntegration:o,sendFeedback:c,shadow:ye(r)});return l},xe=(e,t={})=>{let n=xb(he,t),r=typeof e==`string`?Hy.querySelector(e):typeof e.addEventListener==`function`?e:null;if(!r)throw Error(`Unable to attach to target element`);let i=null,a=async()=>{i||=await be({...n,onFormSubmitted:()=>{i?.removeFromDom(),n.onFormSubmitted?.()}}),i.appendToDom(),i.open()};r.addEventListener(`click`,a);let o=()=>{ve=ve.filter(e=>e!==o),i?.removeFromDom(),i=null,r.removeEventListener(`click`,a)};return ve.push(o),o},Se=(e={})=>{let t=xb(he,e),n=ye(t),r=Db({triggerLabel:t.triggerLabel,triggerAriaLabel:t.triggerAriaLabel,shadow:n,styleNonce:p});return xe(r.el,{...t,onFormOpen(){r.hide()},onFormClose(){r.show()},onFormSubmitted(){r.show()}}),r};return{name:`Feedback`,setupOnce(){!Jv()||!he.autoInject||(Hy.readyState===`loading`?Hy.addEventListener(`DOMContentLoaded`,()=>Se().appendToDom()):Se().appendToDom())},attachTo:xe,createWidget(e={}){let t=Se(xb(he,e));return t.appendToDom(),t},async createForm(e={}){return be(xb(he,e))},setTheme(e){if(he.colorScheme=e,ge){let e=Mb(he);_e?ge.replaceChild(e,_e):ge.prepend(e),_e=e}},remove(){ge&&(ge.parentElement?.remove(),ge=null,_e=null),ve.forEach(e
102=>e()),ve=[]}}});function Pb(){return G()?.getIntegrationByName(`Feedback`)}var Fb,Ib,Lb,Rb,zb,Bb,Vb,Hb={},Ub=[],Wb=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Gb=Array.isArray;function Kb(e,t){for(var n in t)e[n]=t[n];return e}function qb(e){var t=e.parentNode;t&&t.removeChild(e)}function Y(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?Fb.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Jb(e,o,r,i,null)}function Jb(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++Lb,__i:-1,__u:0};return i==null&&Ib.vnode!=null&&Ib.vnode(a),a}function Yb(e){return e.children}function Xb(e,t){this.props=e,this.context=t}function Zb(e,t){if(t==null)return e.__?Zb(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?Zb(e):null}function Qb(e,t,n){var r,i=e.__v,a=i.__e,o=e.__P;if(o)return(r=Kb({},i)).__v=i.__v+1,Ib.vnode&&Ib.vnode(r),ux(o,r,i,e.__n,o.ownerSVGElement!==void 0,32&i.__u?[a]:null,t,a??Zb(i),!!(32&i.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=a&&$b(r),r}function $b(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return $b(e)}}function ex(e){(!e.__d&&(e.__d=!0)&&Rb.push(e)&&!tx.__r++||zb!==Ib.debounceRendering)&&((zb=Ib.debounceRendering)||Bb)(tx)}function tx(){var e,t,n,r=[],i=[];for(Rb.sort(Vb);e=Rb.shift();)e.__d&&(n=Rb.length,t=Qb(e,r,i)||t,n===0||Rb.length>n?(dx(r,t,i),i.length=r.length=0,t=void 0,Rb.sort(Vb)):t&&Ib.__c&&Ib.__c(t,Ub));t&&dx(r,t,i),tx.__r=0}function nx(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g=r&&r.__k||Ub,_=t.length;for(n.__d=c,rx(n,t,g),c=n.__d,d=0;d<_;d++)(p=n.__k[d])!=null&&typeof p!=`boolean`&&typeof p!=`function`&&(f=p.__i===-1?Hb:g[p.__i]||Hb,p.__i=d,ux(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&px(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),65536&p.__u||f.__k===p.__k?c=ix(p,c,e):typeof p.type==`function`&&p.__d!==void 0?c=p.__d:m&&(c=m.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=c,n.__e=h}function rx(e,t,n){var r,i,a,o,s,c=t.length,l=n.length,u=l,d=0;for(e.__k=[],r=0;r<c;r++)(i=e.__k[r]=(i=t[r])==null||typeof i==`boolean`||typeof i==`function`?null:typeof i==`string`||typeof i==`number`||typeof i==`bigint`||i.constructor==String?Jb(null,i,null,null,i):Gb(i)?Jb(Yb,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?Jb(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)==null?(a=n[r])&&a.key==null&&a.__e&&(a.__e==e.__d&&(e.__d=Zb(a)),mx(a,a,!1),n[r]=null,u--):(i.__=e,i.__b=e.__b+1,s=ax(i,n,o=r+d,u),i.__i=s,a=null,s!==-1&&(u--,(a=n[s])&&(a.__u|=131072)),a==null||a.__v===null?(s==-1&&d--,typeof i.type!=`function`&&(i.__u|=65536)):s!==o&&(s===o+1?d++:s>o?u>c-o?d+=s-o:d--:d=s<o&&s==o-1?s-o:0,s!==r+d&&(i.__u|=65536)));if(u)for(r=0;r<l;r++)(a=n[r])!=null&&!(131072&a.__u)&&(a.__e==e.__d&&(e.__d=Zb(a)),mx(a,a))}function ix(e,t,n){var r,i;if(typeof e.type==`function`){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=ix(r[i],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType===8);return t}function ax(e,t,n,r){var i=e.key,a=e.type,o=n-1,s=n+1,c=t[n];if(c===null||c&&i==c.key&&a===c.type)return n;if(r>+(c!=null&&!(131072&c.__u)))for(;o>=0||s<t.length;){if(o>=0){if((c=t[o])&&!(131072&c.__u)&&i==c.key&&a===c.type)return o;o--}if(s<t.length){if((c=t[s])&&!(131072&c.__u)&&i==c.key&&a===c.type)return s;s++}}return-1}function ox(e,t,n){t[0]===`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||Wb.test(t)?n:n+`px`}function sx(e,t,n,r,i){var a;n:if(t===`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||ox(e.style,t,``);if(n)for(t in n)r&&n[t]===r[t]||ox(e.style,t,n[t])}else if(t[0]===`o`&&t[1]===`n`)a=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,`$1`)),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,a?lx:cx,a)):e.removeEventListener(t,a?lx:cx,a);else{if(i)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!==`width`&&t!==`height`&&t!==`href`&&t!==`list`&&t!==`form`&&t!==`tabIndex`&&t!==`download`&&t!==`rowSpan`&&t!==`colSpan`&&t!==`role`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!==`-`?e.removeAttribute(t):e.setAttribute(t,n))}}function cx(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(Ib.event?Ib.event(e):e)}}function lx(e){if(this.l)return this.l[e.type+!0](Ib.event?Ib.event(e):e)}function ux(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(u=Ib.__b)&&u(t);n:if(typeof T==`function`)try{if(_=t.props,v=(u=T.contextType)&&r[u.__c],y=u?v?v.props.value:u.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:(`prototype`in T&&T.prototype.render?t.__c=d=new T(_,y):(t.__c=d=new Xb(_,
102y),d.constructor=T,d.render=hx),v&&v.sub(d),d.props=_,d.state||={},d.context=y,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),d.__s??=d.state,T.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Kb({},d.__s)),Kb(d.__s,T.getDerivedStateFromProps(_,d.__s))),p=d.props,m=d.state,d.__v=t,f)T.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(T.getDerivedStateFromProps==null&&_!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(_,y),!d.__e&&(d.shouldComponentUpdate!=null&&!1===d.shouldComponentUpdate(_,d.__s,y)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=_,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&o.push(d);break n}d.componentWillUpdate!=null&&d.componentWillUpdate(_,d.__s,y),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,m,h)})}if(d.context=y,d.props=_,d.__P=e,d.__e=!1,x=Ib.__r,S=0,`prototype`in T&&T.prototype.render){for(d.state=d.__s,d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),C=0;C<d._sb.length;C++)d.__h.push(d._sb[C]);d._sb=[]}else do d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++S<25);d.state=d.__s,d.getChildContext!=null&&(r=Kb(Kb({},r),d.getChildContext())),f||d.getSnapshotBeforeUpdate==null||(h=d.getSnapshotBeforeUpdate(p,m)),nx(e,Gb(w=u!=null&&u.type===Yb&&u.key==null?u.props.children:u)?w:[w],t,n,r,i,a,o,s,c,l),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),g&&(d.__E=d.__=null)}catch(e){t.__v=null,c||a!=null?(t.__e=s,t.__u|=c?160:32,a[a.indexOf(s)]=null):(t.__e=n.__e,t.__k=n.__k),Ib.__e(e,t,n)}else a==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=fx(n.__e,t,n,r,i,a,o,c,l);(u=Ib.diffed)&&u(t)}function dx(e,t,n){for(var r=0;r<n.length;r++)px(n[r],n[++r],n[++r]);Ib.__c&&Ib.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){Ib.__e(e,t.__v)}})}function fx(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g=n.props,_=t.props,v=t.type;if(v===`svg`&&(i=!0),a!=null){for(l=0;l<a.length;l++)if((p=a[l])&&`setAttribute`in p==!!v&&(v?p.localName===v:p.nodeType===3)){e=p,a[l]=null;break}}if(e==null){if(v===null)return document.createTextNode(_);e=i?document.createElementNS(`http://www.w3.org/2000/svg`,v):document.createElement(v,_.is&&_),a=null,s=!1}if(v===null)g===_||s&&e.data===_||(e.data=_);else{if(a&&=Fb.call(e.childNodes),g=n.props||Hb,!s&&a!=null)for(g={},l=0;l<e.attributes.length;l++)g[(p=e.attributes[l]).name]=p.value;for(l in g)p=g[l],l==`children`||(l==`dangerouslySetInnerHTML`?d=p:l===`key`||l in _||sx(e,l,null,p,i));for(l in _)p=_[l],l==`children`?f=p:l==`dangerouslySetInnerHTML`?u=p:l==`value`?m=p:l==`checked`?h=p:l===`key`||s&&typeof p!=`function`||g[l]===p||sx(e,l,p,g[l],i);if(u)s||d&&(u.__html===d.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=``),nx(e,Gb(f)?f:[f],t,n,r,i&&v!==`foreignObject`,a,o,a?a[0]:n.__k&&Zb(n,0),s,c),a!=null)for(l=a.length;l--;)a[l]!=null&&qb(a[l]);s||(l=`value`,m!==void 0&&(m!==e[l]||v===`progress`&&!m||v===`option`&&m!==g[l])&&sx(e,l,m,g[l],!1),l=`checked`,h!==void 0&&h!==e[l]&&sx(e,l,h,g[l],!1))}return e}function px(e,t,n){try{typeof e==`function`?e(t):e.current=t}catch(e){Ib.__e(e,n)}}function mx(e,t,n){var r,i;if(Ib.unmount&&Ib.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||px(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Ib.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&mx(r[i],t,n||typeof e.type!=`function`);n||e.__e==null||qb(e.__e),e.__=e.__e=e.__d=void 0}function hx(e,t,n){return this.constructor(e,n)}function gx(e,t,n){var r,i,a,o;Ib.__&&Ib.__(e,t),i=(r=!1)?null:t.__k,a=[],o=[],ux(t,e=t.__k=Y(Yb,null,[e]),i||Hb,Hb,t.ownerSVGElement!==void 0,i?null:t.firstChild?Fb.call(t.childNodes):null,a,i?i.__e:t.firstChild,r,o),e.__d=void 0,dx(a,e,o)}Fb=Ub.slice,Ib={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},Lb=0,Xb.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Kb({},this.state);typeof e==`function`&&(e=e(Kb({},n),this.props)),e&&Kb(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ex(this))},Xb.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ex(this))},Xb.prototype.render=Yb,Rb=[],Bb=typeof Promise==`function`?Promise.prototype.then.bind(Prom
102ise.resolve()):setTimeout,Vb=function(e,t){return e.__v.__b-t.__v.__b},tx.__r=0;var _x,vx,yx,bx,xx=0,Sx=[],Cx=[],wx=Ib,Tx=wx.__b,Ex=wx.__r,Dx=wx.diffed,Ox=wx.__c,kx=wx.unmount,Ax=wx.__;function jx(e,t){wx.__h&&wx.__h(vx,e,xx||t),xx=0;var n=vx.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({__V:Cx}),n.__[e]}function Mx(e){return xx=1,Nx(Xx,e)}function Nx(e,t,n){var r=jx(_x++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Xx(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=vx,!vx.u)){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!a||a.call(this,e,t,n);var o=!1;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),!(!o&&r.__c.props===e)&&(!a||a.call(this,e,t,n))};vx.u=!0;var a=vx.shouldComponentUpdate,o=vx.componentWillUpdate;vx.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},vx.shouldComponentUpdate=i}return r.__N||r.__}function Px(e,t){var n=jx(_x++,3);!wx.__s&&Yx(n.__H,t)&&(n.__=e,n.i=t,vx.__H.__h.push(n))}function Fx(e,t){var n=jx(_x++,4);!wx.__s&&Yx(n.__H,t)&&(n.__=e,n.i=t,vx.__h.push(n))}function Ix(e){return xx=5,Rx(function(){return{current:e}},[])}function Lx(e,t,n){xx=6,Fx(function(){return typeof e==`function`?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function Rx(e,t){var n=jx(_x++,7);return Yx(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function zx(e,t){return xx=8,Rx(function(){return e},t)}function Bx(e){var t=vx.context[e.__c],n=jx(_x++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(vx)),t.props.value):e.__}function Vx(e,t){wx.useDebugValue&&wx.useDebugValue(t?t(e):e)}function Hx(e){var t=jx(_x++,10),n=Mx();return t.__=e,vx.componentDidCatch||=function(e,r){t.__&&t.__(e,r),n[1](e)},[n[0],function(){n[1](void 0)}]}function Ux(){var e=jx(_x++,11);if(!e.__){for(var t=vx.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||=[0,0];e.__=`P`+n[0]+`-`+n[1]++}return e.__}function Wx(){for(var e;e=Sx.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(qx),e.__H.__h.forEach(Jx),e.__H.__h=[]}catch(t){e.__H.__h=[],wx.__e(t,e.__v)}}wx.__b=function(e){vx=null,Tx&&Tx(e)},wx.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ax&&Ax(e,t)},wx.__r=function(e){Ex&&Ex(e),_x=0;var t=(vx=e.__c).__H;t&&(yx===vx?(t.__h=[],vx.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=Cx,e.__N=e.i=void 0})):(t.__h.forEach(qx),t.__h.forEach(Jx),t.__h=[],_x=0)),yx=vx},wx.diffed=function(e){Dx&&Dx(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Sx.push(t)!==1&&bx===wx.requestAnimationFrame||((bx=wx.requestAnimationFrame)||Kx)(Wx)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==Cx&&(e.__=e.__V),e.i=void 0,e.__V=Cx})),yx=vx=null},wx.__c=function(e,t){t.some(function(e){try{e.__h.forEach(qx),e.__h=e.__h.filter(function(e){return!e.__||Jx(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],wx.__e(n,e.__v)}}),Ox&&Ox(e,t)},wx.unmount=function(e){kx&&kx(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{qx(e)}catch(e){t=e}}),n.__H=void 0,t&&wx.__e(t,n.__v))};var Gx=typeof requestAnimationFrame==`function`;function Kx(e){var t,n=function(){clearTimeout(r),Gx&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Gx&&(t=requestAnimationFrame(n))}function qx(e){var t=vx,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),vx=t}function Jx(e){var t=vx;e.__c=e.__(),vx=t}function Yx(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Xx(e,t){return typeof t==`function`?t(e):t}var Zx=Object.defineProperty({__proto__:null,useCallback:zx,useContext:Bx,useDebugValue:Vx,useEffect:Px,useErrorBoundary:Hx,useId:Ux,useImperativeHandle:Lx,useLayoutEffect:Fx,useMemo:Rx,useReducer:Nx,useRef
102:Ix,useState:Mx},Symbol.toStringTag,{value:`Module`}),Qx=`http://www.w3.org/2000/svg`;function $x(){let e=e=>Hy.createElementNS(Qx,e),t=Cb(e(`svg`),{width:`32`,height:`30`,viewBox:`0 0 72 66`,fill:`inherit`}),n=Cb(e(`path`),{transform:`translate(11, 11)`,d:`M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z`});return t.appendChild(n),t}function eS({options:e}){let t=Rx(()=>({__html:$x().outerHTML}),[]);return Y(`h2`,{class:`dialog__header`},Y(`span`,{class:`dialog__title`},e.formTitle),e.showBranding?Y(`a`,{class:`brand-link`,target:`_blank`,href:`https://sentry.io/welcome/`,title:`Powered by Sentry`,rel:`noopener noreferrer`,dangerouslySetInnerHTML:t}):null)}function tS(e,t){let n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}function nS(e,t){let n=e.get(t);return typeof n==`string`?n.trim():``}function rS({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:i,onSubmitSuccess:a,onSubmitError:o,showEmail:s,showName:c,screenshotInput:l}){let{tags:u,addScreenshotButtonLabel:d,removeScreenshotButtonLabel:f,cancelButtonLabel:p,emailLabel:m,emailPlaceholder:h,isEmailRequired:g,isNameRequired:_,messageLabel:v,messagePlaceholder:y,nameLabel:b,namePlaceholder:x,submitButtonLabel:S,isRequiredLabel:C}=e,[w,T]=Mx(!1),[E,D]=Mx(null),[ee,te]=Mx(!1),O=l?.input,[k,ne]=Mx(null),re=zx(e=>{ne(e),te(!1)},[]),A=zx(e=>{let t=tS(e,{emailLabel:m,isEmailRequired:g,isNameRequired:_,messageLabel:v,nameLabel:b});return t.length>0?D(`Please enter in the following required fields: ${t.join(`, `)}`):D(null),t.length===0},[m,g,_,v,b]);return Y(`form`,{class:`form`,onSubmit:zx(async e=>{T(!0);try{if(e.preventDefault(),!(e.target instanceof HTMLFormElement))return;let t=new FormData(e.target),n=await(l&&ee?l.value():void 0),r={name:nS(t,`name`),email:nS(t,`email`),message:nS(t,`message`),attachments:n?[n]:void 0};if(!A(r))return;try{a(r,await i({name:r.name,email:r.email,message:r.message,source:pb,tags:u},{attachments:r.attachments}))}catch(e){let t=e instanceof Error?e:Error(String(e));D(t.message),o(t)}}finally{T(!1)}},[l&&ee,a,o])},O&&ee?Y(O,{onError:re}):null,Y(`fieldset`,{class:`form__right`,"data-sentry-feedback":!0,disabled:w},Y(`div`,{class:`form__top`},E?Y(`div`,{class:`form__error-container`},E):null,c?Y(`label`,{for:`name`,class:`form__label`},Y(iS,{label:b,isRequiredLabel:C,isRequired:_}),Y(`input`,{class:`form__input`,defaultValue:n,id:`name`,name:`name`,placeholder:x,required:_,type:`text`})):Y(`input`,{"aria-hidden":!0,value:n,name:`name`,type:`hidden`}),s?Y(`label`,{for:`email`,class:`form__label`},Y(iS,{label:m,isRequiredLabel:C,isRequired:g}),Y(`input`,{class:`form__input`,defaultValue:t,id:`email`,name:`email`,placeholder:h,required:g,type:`email`})):Y(`input`,{"aria-hidden":!0,value:t,name:`email`,type:`hidden`}),Y(`label`,{for:`message`,class:`form__label`},Y(iS,{label:v,isRequiredLabel:C,isRequired:!0}),Y(`textarea`,{autoFocus:!0,class:`form__input form__input--textarea`,id:`message`,name:`message`,placeholder:y,required:!0,rows:5})),O?Y(`label`,{for:`screenshot`,class:`form__label`},Y(`button`,{class:`btn btn--default`,disabled:w,type:`button`,onClick:()=>{ne(null),te(e=>!e)}},ee?f:d),k?Y(`div`,{class:`form__error-container`},k.message):null):null),Y(`div`,{class:`btn-group`},Y(`button`,{class:`btn btn--primary`,disabled:w,type:`submit`},S),Y(`button`,{class:`btn btn--default`,disabled:w,type:`button`,onClick:r},p))))}function iS({label:e,isRequired:t,isRequiredLabel:n}){return Y(`span`,{class:`form__label__text`},e,t&&Y(`span`,{class:`form__label__text--required`},n))}var aS=16,oS=17,sS=`http://www.w3.org/2000/svg`;function cS(){let e=e=>Vy.document.createElementNS(sS,e),t=Cb(e(`svg`),{width:`${aS}`,height:`${oS}`,viewBox:`0 0 ${aS} ${oS}`,fill:`inherit`}),n=Cb(e(`g`),{clipPath:`url(#clip0_57_156)`}),r=Cb(e(`path`),{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z`}),i=Cb(e(`path`),{d:`M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173
10210.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z`});t.appendChild(n).append(i,r);let a=e(`defs`),o=Cb(e(`clipPath`),{id:`clip0_57_156`}),s=Cb(e(`rect`),{width:`${aS}`,height:`${aS}`,fill:`white`,transform:`translate(0 0.5)`});return o.appendChild(s),a.appendChild(o),t.appendChild(a).appendChild(o).appendChild(s),t}function lS({open:e,onFormSubmitted:t,...n}){let r=n.options,i=Rx(()=>({__html:cS().outerHTML}),[]),[a,o]=Mx(null),s=zx(()=>{a&&(clearTimeout(a),o(null)),t()},[a]),c=zx((e,r)=>{n.onSubmitSuccess(e,r),o(setTimeout(()=>{t(),o(null)},hb))},[t]);return Y(Yb,null,a?Y(`div`,{class:`success__position`,onClick:s},Y(`div`,{class:`success__content`},r.successMessageText,Y(`span`,{class:`success__icon`,dangerouslySetInnerHTML:i}))):Y(`dialog`,{class:`dialog`,onClick:r.onFormClose,open:e},Y(`div`,{class:`dialog__position`},Y(`div`,{class:`dialog__content`,onClick:e=>{e.stopPropagation()}},Y(eS,{options:r}),Y(rS,{...n,onSubmitSuccess:c})))))}var uS=` 103.dialog { 104 position: fixed; 105 z-index: var(--z-index); 106 margin: 0; 107 inset: 0; 108 109 display: flex; 110 align-items: center; 111 justify-content: center; 112 padding: 0; 113 height: 100vh; 114 width: 100vw; 115 116 color: var(--dialog-color, var(--foreground)); 117 fill: var(--dialog-color, var(--foreground)); 118 line-height: 1.75em; 119 120 background-color: rgba(0, 0, 0, 0.05); 121 border: none; 122 inset: 0; 123 opacity: 1; 124 transition: opacity 0.2s ease-in-out; 125} 126 127.dialog__position { 128 position: fixed; 129 z-index: var(--z-index); 130 inset: var(--dialog-inset); 131 padding: var(--page-margin); 132 display: flex; 133 max-height: calc(100vh - (2 * var(--page-margin))); 134} 135@media (max-width: 600px) { 136 .dialog__position { 137 inset: var(--page-margin); 138 padding: 0; 139 } 140} 141 142.dialog__position:has(.editor) { 143 inset: var(--page-margin); 144 padding: 0; 145} 146 147.dialog:not([open]) { 148 opacity: 0; 149 pointer-events: none; 150 visibility: hidden; 151} 152.dialog:not([open]) .dialog__content { 153 transform: translate(0, -16px) scale(0.98); 154} 155 156.dialog__content { 157 display: flex; 158 flex-direction: column; 159 gap: 16px; 160 padding: var(--dialog-padding, 24px); 161 max-width: 100%; 162 width: 100%; 163 max-height: 100%; 164 overflow: auto; 165 166 background: var(--dialog-background, var(--background)); 167 border-radius: var(--dialog-border-radius, 20px); 168 border: var(--dialog-border, var(--border));
169 box-shadow: var(--dialog-box-shadow, var(--box-shadow)); 170 transform: translate(0, 0) scale(1); 171 transition: transform 0.2s ease-in-out; 172} 173 174`,dS=` 175.dialog__header { 176 display: flex; 177 gap: 4px; 178 justify-content: space-between; 179 font-weight: var(--dialog-header-weight, 600); 180 margin: 0; 181} 182.dialog__title { 183 align-self: center; 184 width: var(--form-width, 272px); 185} 186 187@media (max-width: 600px) { 188 .dialog__title { 189 width: auto; 190 } 191} 192 193.dialog__position:has(.editor) .dialog__title { 194 width: auto; 195} 196 197 198.brand-link { 199 display: inline-flex; 200} 201.brand-link:focus-visible { 202 outline: var(--outline); 203} 204`,fS=` 205.form { 206 display: flex; 207 overflow: auto; 208 flex-direction: row; 209 gap: 16px; 210 flex: 1 0; 211} 212 213.form fieldset { 214 border: none; 215 margin: 0; 216 padding: 0; 217} 218 219.form__right { 220 flex: 0 0 auto; 221 display: flex; 222 overflow: auto; 223 flex-direction: column; 224 justify-content: space-between; 225 gap: 20px; 226 width: var(--form-width, 100%); 227} 228 229.dialog__position:has(.editor) .form__right { 230 width: var(--form-width, 272px); 231} 232 233.form__top { 234 display: flex; 235 flex-direction: column; 236 gap: 8px; 237} 238 239.form__error-container { 240 color: var(--error-color); 241 fill: var(--error-color); 242} 243 244.form__label { 245 display: flex; 246 flex-direction: column; 247 gap: 4px; 248 margin: 0px; 249} 250 251.form__label__text { 252 display: flex; 253 gap: 4px; 254 align-items: center; 255} 256 257.form__label__text--required { 258 font-size: 0.85em; 259} 260 261.form__input { 262 font-family: inherit; 263 line-height: inherit; 264 background: transparent; 265 box-sizing: border-box; 266 border: var(--input-border, var(--border)); 267 border-radius: var(--input-border-radius, 6px); 268 color: var(--input-color, inherit); 269 fill: var(--input-color, inherit); 270 font-size: var(--input-font-size, inherit); 271 font-weight: var(--input-font-weight, 500); 272 padding: 6px 12px; 273} 274 275.form__input::placeholder { 276 opacity: 0.65; 277 color: var(--input-placeholder-color, inherit); 278 filter: var(--interactive-filter); 279} 280 281.form__input:focus-visible { 282 outline: var(--input-focus-outline, var(--outline)); 283} 284 285.form__input--textarea { 286 font-family: inherit; 287 resize: vertical; 288} 289 290.error { 291 color: var(--error-color); 292 fill: var(--error-color); 293} 294`,pS=` 295.btn-group { 296 display: grid; 297 gap: 8px; 298} 299 300.btn { 301 line-height: inherit; 302 border: var(--button-border, var(--border)); 303 border-radius: var(--button-border-radius, 6px); 304 cursor: pointer; 305 font-family: inherit; 306 font-size: var(--button-font-size, inherit); 307 font-weight: var(--button-font-weight, 600); 308 padding: var(--button-padding, 6px 16px); 309} 310.btn[disabled] { 311 opacity: 0.6; 312 pointer-events: none; 313} 314 315.btn--primary { 316 color: var(--button-primary-color, var(--accent-foreground)); 317 fill: var(--button-primary-color, var(--accent-foreground)); 318 background: var(--button-primary-background, var(--accent-background)); 319 border: var(--button-primary-border, var(--border)); 320 border-radius: var(--button-primary-border-radius, 6px); 321 font-weight: var(--button-primary-font-weight, 500); 322} 323.btn--primary:hover { 324 color: var(--button-primary-hover-color, var(--accent-foreground)); 325 fill: var(--button-primary-hover-color, var(--accent-foreground)); 326 background: var(--button-primary-hover-background, var(--accent-background)); 327 filter: var(--interactive-filter); 328} 329.btn--primary:focus-visible { 330 background: var(--button-primary-hover-background, var(--accent-background)); 331 filter: var(--interactive-filter); 332 outline: var(--button-primary-focus-outline, var(--outline)); 333} 334 335.btn--default { 336 color: var(--button-color, var(--foreground)); 337 fill: var(--button-color, var(--foreground)); 338 background: var(--button-background, var(--background)); 339 border: var(--button-border, var(--border)); 340 border-radius: var(--button-border-radius, 6px); 341 font-weight: var(--button-font-weight, 500); 342} 343.btn--default:hover { 344 color: var(--button-color, var(--foreground)); 345 fill: var(--button-color, var(--foreground)); 346 background: var(--button-hover-background, var(--background)); 347 filter: var(--interactive-filter); 348} 349.btn--default:focus-visible { 350 background: var(--button-hover-background, var(--background)); 351 filter: var(--interactive-filter); 352 outline: var(--button-focus-outline, var(--outline)); 353} 354`,mS=` 355.success__position { 356 position: fixed; 357 inset: var(--dialog-inset); 358 padding: var(--page-margin); 359 z-index: var(--z-index); 360} 361.success__content { 362 background: var(--success-background, var(--background)); 363 border: var(--success-border, var(--border)); 364 border-radius: var(--success-border-radius, 1.7em/50%);
365 box-shadow: var(--success-box-shadow, var(--box-shadow)); 366 font-weight: var(--success-font-weight, 600); 367 color: var(--success-color); 368 fill: var(--success-color); 369 padding: 12px 24px; 370 line-height: 1.75em; 371 372 display: grid; 373 align-items: center; 374 grid-auto-flow: column; 375 gap: 6px; 376 cursor: default; 377} 378 379.success__icon { 380 display: flex; 381} 382`;function hS(e){let t=Hy.createElement(`style`);return t.textContent=` 383:host { 384 --dialog-inset: var(--inset); 385} 386 387${uS} 388${dS} 389${fS} 390${pS} 391${mS} 392`,e&&t.setAttribute(`nonce`,e),t}function gS(){let e=W().getUser(),t=um().getUser(),n=dm().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}var _S=(()=>({name:`FeedbackModal`,setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{let i=r,a=e.useSentryUser,o=gS(),s=Hy.createElement(`div`),c=hS(e.styleNonce),l=``,u={get el(){return s},appendToDom(){!i.contains(c)&&!i.contains(s)&&(i.appendChild(c),i.appendChild(s))},removeFromDom(){s.remove(),c.remove(),Hy.body.style.overflow=l},open(){f(!0),e.onFormOpen?.(),G()?.emit(`openFeedbackWidget`),l=Hy.body.style.overflow,Hy.body.style.overflow=`hidden`},close(){f(!1),Hy.body.style.overflow=l}},d=t?.createInput({h:Y,hooks:Zx,dialog:u,options:e}),f=t=>{gx(Y(lS,{options:e,screenshotInput:d,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(a&&o?.[a.name]||``),defaultEmail:String(a&&o?.[a.email]||``),onFormClose:()=>{f(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(t,n)=>{f(!1),e.onSubmitSuccess?.(t,n)},onSubmitError:t=>{e.onSubmitError?.(t)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:t}),s)};return u}}));function vS({h:e}){return function(){return e(`svg`,{"data-test-id":`icon-close`,viewBox:`0 0 16 16`,fill:`#2B2233`,height:`25px`,width:`25px`},e(`circle`,{r:`7`,cx:`8`,cy:`8`,fill:`white`}),e(`path`,{strokeWidth:`1.5`,d:`M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z`}),e(`path`,{strokeWidth:`1.5`,d:`M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z`}),e(`path`,{strokeWidth:`1.5`,d:`M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z`}))}}function yS(e){let t=Hy.createElement(`style`),n=`#1A141F`,r=`#302735`;return t.textContent=` 393.editor { 394 display: flex; 395 flex-grow: 1; 396 flex-direction: column; 397} 398 399.editor__image-container { 400 justify-items: center; 401 padding: 15px; 402 position: relative; 403 height: 100%; 404 border-radius: var(--menu-border-radius, 6px); 405 406 background-color: ${n}; 407 background-image: repeating-linear-gradient( 408 -145deg, 409 transparent, 410 transparent 8px, 411 ${n} 8px, 412 ${n} 11px 413 ), 414 repeating-linear-gradient( 415 -45deg, 416 transparent, 417 transparent 15px, 418 ${r} 15px, 419 ${r} 16px 420 ); 421} 422 423.editor__canvas-container { 424 width: 100%; 425 height: 100%; 426 position: relative; 427 display: flex; 428 align-items: center; 429 justify-content: center; 430} 431 432.editor__canvas-container > * { 433 object-fit: contain; 434 position: absolute; 435} 436 437.editor__tool-container { 438 padding-top: 8px; 439 display: flex; 440 justify-content: center; 441} 442 443.editor__tool-bar { 444 display: flex; 445 gap: 8px; 446} 447 448.editor__tool { 449 display: flex; 450 padding: 8px 12px; 451 justify-content: center; 452 align-items: center; 453 border: var(--button-border, var(--border)); 454 border-radius: var(--button-border-radius, 6px); 455 background: var(--button-background, var(--background)); 456 color: var(--button-color, var(--foreground)); 457} 458 459.editor__tool--active { 460 background: var(--button-primary-background, var(--accent-background)); 461 color: var(--button-primary-color, var(--accent-foreground)); 462} 463 464.editor__rect { 465 position: absolute; 466 z-index: 2; 467} 468 469.editor__rect button { 470 opacity: 0; 471 position: absolute; 472 top: -12px; 473 right: -12px; 474 cursor: pointer; 475 padding: 0; 476 z-index: 3; 477 border: none; 478 background: none; 479} 480 481.editor__rect:hover button { 482 opacity: 1; 483} 484`,e&&t.setAttribute(`nonce`,e),t}function bS({h:e}){return function({action:t,setAction:n,options:r}){return e(`div`,{class:`editor__tool-container`},e(`div`,{class:`editor__tool-bar`},e(`button`,{type:`button`,class:`editor__tool ${t===`highlight`?`editor__tool--active`:``}`,onClick:()=>{n(t===`highlight`?``:`highlight`)}},r.highlightToolText),e(`button`,{type:`button`,class:`editor__tool ${t===`hide`?`editor__tool--active`:``}`,onClick:()=>{n(t===`hide`?``:`hide`)}},r.hideToolText)))}}function xS({hooks:e}){function t(){let[t,n]=e.useState(Vy.devicePixelRatio??1);return e.useEffect(()=>{let e=()=>{n(Vy.devicePixelRatio)},t=matchMedia(`(resolution: ${Vy.devicePixelRatio}dppx)`);return t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)}},[]),t}return function({onBeforeScreenshot:n,onScreenshot:r,onAfterScreenshot:i,onError:a}){let o=t();e.useEffect(()=>{(async()=>{n();let e=await Uy.mediaDevices.getDisplayMedia({video:{width:Vy.innerWidth*o,height:Vy.innerHeight*o},audio:!1,monitorTypeSurfaces:`exclude`,preferCurrentTab:!0,selfBrowserSurface:`include`,surfaceSwitching:`exclude`}),t=Hy.createElement(`video`);await new Promise((n,i)=>{t.srcObject=e,t.onloadedmetadata=()=>
484{r(t,o),e.getTracks().forEach(e=>e.stop()),n()},t.play().catch(i)}),i()})().catch(a)},[])}}function SS(e,t,n){switch(e.type){case`highlight`:t.shadowColor=`rgba(0, 0, 0, 0.7)`,t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break;case`hide`:t.fillStyle=`rgb(0, 0, 0)`,t.fillRect(e.x,e.y,e.w,e.h);break}}function CS(e,t,n){if(!e)return;let r=e.getContext(`2d`,t);r&&n(e,r)}function wS(e,t){CS(e,{alpha:!0},(e,n)=>{n.drawImage(t,0,0,t.width,t.height,0,0,e.width,e.height)})}function TS(e,t,n){CS(e,{alpha:!0},(e,r)=>{n.length&&(r.fillStyle=`rgba(0, 0, 0, 0.25)`,r.fillRect(0,0,e.width,e.height)),n.forEach(e=>{SS(e,r,t)})})}function ES({h:e,hooks:t,outputBuffer:n,dialog:r,options:i}){let a=xS({hooks:t}),o=bS({h:e}),s=vS({h:e}),c={__html:yS(i.styleNonce).innerText},l=r.el.style,u=({screenshot:r})=>{let[a,l]=t.useState(`highlight`),[u,d]=t.useState([]),f=t.useRef(null),p=t.useRef(null),m=t.useRef(null),h=t.useRef(null),[g,_]=t.useState(1),v=t.useMemo(()=>{let e=Hy.getElementById(i.id);if(!e)return`white`;let t=getComputedStyle(e);return t.getPropertyValue(`--button-primary-background`)||t.getPropertyValue(`--accent-background`)},[i.id]);t.useLayoutEffect(()=>{let e=()=>{let t=f.current;t&&(CS(r.canvas,{alpha:!1},e=>{_(Math.min(t.clientWidth/e.width,t.clientHeight/e.height))}),(t.clientHeight===0||t.clientWidth===0)&&setTimeout(e,0))};return e(),Vy.addEventListener(`resize`,e),()=>{Vy.removeEventListener(`resize`,e)}},[r]);let y=t.useCallback((e,t)=>{CS(e,{alpha:!0},(e,n)=>{n.scale(t,t),e.width=r.canvas.width,e.height=r.canvas.height})},[r]);t.useEffect(()=>{y(p.current,r.dpi),wS(p.current,r.canvas)},[r]),t.useEffect(()=>{y(m.current,r.dpi),CS(m.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),TS(m.current,v,u)},[u,v]),t.useEffect(()=>{y(n,r.dpi),wS(n,r.canvas),CS(Hy.createElement(`canvas`),{alpha:!0},(e,t)=>{t.scale(r.dpi,r.dpi),e.width=r.canvas.width,e.height=r.canvas.height,TS(e,v,u),wS(n,e)})},[u,r,v]);let b=e=>{if(!a||!h.current)return;let t=h.current.getBoundingClientRect(),n={type:a,x:e.offsetX/g,y:e.offsetY/g},r=(e,n)=>{let r=(n.clientX-t.x)/g,i=(n.clientY-t.y)/g;return{type:e.type,x:Math.min(e.x,r),y:Math.min(e.y,i),w:Math.abs(r-e.x),h:Math.abs(i-e.y)}},i=e=>{CS(m.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),TS(m.current,v,[...u,r(n,e)])},o=e=>{let t=r(n,e);t.w*g>=1&&t.h*g>=1&&d(e=>[...e,t]),Hy.removeEventListener(`mousemove`,i),Hy.removeEventListener(`mouseup`,o)};Hy.addEventListener(`mousemove`,i),Hy.addEventListener(`mouseup`,o)},x=t.useCallback(e=>t=>{t.preventDefault(),t.stopPropagation(),d(t=>{let n=[...t];return n.splice(e,1),n})},[]),S={width:`${r.canvas.width*g}px`,height:`${r.canvas.height*g}px`},C=e=>{e.stopPropagation()};return e(`div`,{class:`editor`},e(`style`,{nonce:i.styleNonce,dangerouslySetInnerHTML:c}),e(`div`,{class:`editor__image-container`},e(`div`,{class:`editor__canvas-container`,ref:f},e(`canvas`,{ref:p,id:`background`,style:S}),e(`canvas`,{ref:m,id:`foreground`,style:S}),e(`div`,{ref:h,onMouseDown:b,style:S},u.map((t,n)=>
484e(`div`,{key:n,class:`editor__rect`,style:{top:`${t.y*g}px`,left:`${t.x*g}px`,width:`${t.w*g}px`,height:`${t.h*g}px`}},e(`button`,{"aria-label":i.removeHighlightText,onClick:x(n),onMouseDown:C,onMouseUp:C,type:`button`},e(s,null))))))),e(o,{options:i,action:a,setAction:l}))};return function({onError:r}){let[i,o]=t.useState();return a({onBeforeScreenshot:t.useCallback(()=>{l.display=`none`},[]),onScreenshot:t.useCallback((e,t)=>{CS(Hy.createElement(`canvas`),{alpha:!1},(n,r)=>{r.scale(t,t),n.width=e.videoWidth,n.height=e.videoHeight,r.drawImage(e,0,0,n.width,n.height),o({canvas:n,dpi:t})}),n.width=e.videoWidth,n.height=e.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{l.display=`block`},[]),onError:t.useCallback(e=>{l.display=`block`,r(e)},[])}),i?e(u,{screenshot:i}):e(`div`,null)}}var DS=(()=>({name:`FeedbackScreenshot`,setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{let i=Hy.createElement(`canvas`);return{input:ES({h:e,hooks:t,outputBuffer:i,dialog:n,options:r}),value:async()=>{let e=await new Promise(e=>{i.toBlob(e,`image/png`)});if(e)return{data:new Uint8Array(await e.arrayBuffer()),filename:`screenshot.png`,contentType:`application/png`}}}}})),OS=null;function kS(e){let t=`error`;by(t,e),xy(t,AS)}function AS(){OS=U.onerror,U.onerror=function(e,t,n,r,i){return Sy(`error`,{column:r,error:i,line:n,msg:e,url:t}),OS?OS.apply(this,arguments):!1},U.onerror.__SENTRY_INSTRUMENTED__=!0}var jS=null;function MS(e){let t=`unhandledrejection`;by(t,e),xy(t,NS)}function NS(){jS=U.onunhandledrejection,U.onunhandledrejection=function(e){return Sy(`unhandledrejection`,e),jS?jS.apply(this,arguments):!0},U.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var PS=!1;function FS(){if(PS)return;function e(){let e=$h(),t=e&&Zh(e);t&&t.setStatus({code:2,message:`internal_error`})}PS=!0,kS(e),MS(e)}var IS={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},LS=`heartbeatFailed`,RS=`idleTimeout`,zS=`finalTimeout`,BS=`externalFinish`;function VS(e,t={}){let n=new Map,r=!1,i,a=BS,o=!t.disableAutoFinish,s=[],{idleTimeout:c=IS.idleTimeout,finalTimeout:l=IS.finalTimeout,childSpanTimeout:u=IS.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:f=!0}=t,p=G(),m=W();if(!p||!Km()){let e=new ig({traceId:m.getPropagationContext().traceId});return uh(e,m,um()),e}let h=$h(),g=HS(e);g.end=new Proxy(g.end,{apply(e,t,n){if(d&&d(g),ag(t))return;let[r,...i]=n,a=Ih(r||Fp()),o=Xh(g).filter(e=>e!==g),s=q(g);if(!o.length||!f)return S(a),Reflect.apply(e,t,[a,...i]);let c=p.getOptions().ignoreSpans,u=o?.reduce((e,t)=>{let n=q(t);return!n.timestamp||c&&qm({description:n.description,op:n.op,attributes:n.data},c)?e:e?Math.max(e,n.timestamp):n.timestamp},void 0),m=s.start_timestamp,h=Math.min(m?m+l/1e3:1/0,Math.max(m||-1/0,Math.min(a,u||1/0)));return S(h),Reflect.apply(e,t,[h,...i])}});function _(){i&&=(clearTimeout(i),void 0)}function v(e){_(),i=setTimeout(()=>{!r&&n.size===0&&o&&(a=RS,g.end(e))},c)}function y(e){i=setTimeout(()=>{!r&&o&&(a=LS,g.end(e))},u)}function b(e){_(),n.set(e,!0),y(Fp()+u/1e3)}function x(e){n.has(e)&&n.delete(e),n.size===0&&v(Fp()+c/1e3)}function S(e){r=!0,n.clear(),s.forEach(e=>e()),Lf(m,h);let t=q(g),{start_timestamp:i}=t;if(!i)return;t.data[`sentry.idle_span_finish_reason`]||g.setAttribute(ym,a);let o=t.status;(!o||o===`unknown`)&&g.setStatus({code:1}),df.log(`[Tracing] Idle span "${t.op}" finished`);let u=Xh(g).filter(e=>e!==g),d=0;u.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:`cancelled`}),t.end(e));let{timestamp:n=0,start_timestamp:r=0}=q(t),i=r<=e,a=(l+c)/1e3;(!(n-r<=a)||!i)&&(Yh(g,t),d++)}),d>0&&g.setAttribute(`sentry.idle_span_discarded_spans`,d)}return s.push(p.on(`spanStart`,e=>{r||e===g||q(e).timestamp||e instanceof Rg&&e.isStandaloneSpan()||Xh(g).includes(e)&&b(e.spanContext().spanId)})),s.push(p.on(`spanEnd`,e=>{r||x(e.spanContext().spanId)})),s.push(p.on(`idleSpanEnableAutoFinish`,e=>{e===g&&(o=!0,v(),n.size&&y())})),t.disableAutoFinish||v(),setTimeout(()=>{r||(g.setStatus({code:2,message:`deadline_exceeded`}),a=zS,g.end())},l),g}function HS(e){let t=Kg(e);return Lf(W(),t),t}var US=[`addListener`,`on`,`once`,`prependListener`,`prependOnceListener`,`addEventListener`],WS=[`removeListener`,`off`,`removeEventListener`],GS=Symbol(`SentryScopeBoundListeners`),KS;function qS(e){return KS!==void 0&&(e===KS||e.listener===KS)}function JS(e,t=W()){let n=e;if(tC(n))return e;eC(n);for(let e of US)typeof n[e]==`function`&&(n[e]=ZS(n,n[e],t));for(let e of WS)typeof n[e]==`function`&&(n[e]=QS(n,n[e]));return typeof n.removeAllListeners==`function`&&(n.removeAllListeners=$S(n,n.removeAllListeners)),e}function YS(e,t){return function(...n){return fm(t,()=>e.apply(this,n))}}function XS(e){return typeof e==`function`}function ZS(e,t,n){return function(...r){let i=r[0],a=r[1],o=r.slice(2);
484if(!XS(a)||qS(a))return t.apply(this,r);let s=tC(e)||eC(e),c=s.get(i);c||(c=new WeakMap,s.set(i,c));let l=c.get(a);l||(l=YS(a,n),c.set(a,l));let u=KS;KS=l;try{return t.call(this,i,l,...o)}finally{KS=u}}}function QS(e,t){return function(...n){let r=n[0],i=n[1],a=n.slice(2),o=XS(i)?tC(e)?.get(r)?.get(i):void 0;return o?t.call(this,r,o,...a):t.apply(this,n)}}function $S(e,t){return function(...n){let r=tC(e);if(r)if(n.length===0)eC(e);else{let e=n[0];r.delete(e)}return t.apply(this,n)}}function eC(e){let t=new Map;return e[GS]=t,t}function tC(e){return e[GS]}function nC(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function rC(e){return`${nC(e)}${e.projectId}/envelope/`}function iC(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function aC(e,t,n){return t||`${rC(e)}?${iC(e,n)}`}function oC(e,t){let n=xh(e);if(!n)return``;let r=`${nC(n)}embed/error-page/`,i=`dsn=${hh(n)}`;for(let e in t)if(e!==`dsn`&&e!==`onClose`)if(e===`user`){let e=t.user;if(!e)continue;e.name&&(i+=`&name=${encodeURIComponent(e.name)}`),e.email&&(i+=`&email=${encodeURIComponent(e.email)}`)}else i+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${r}?${i}`}var sC={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function cC(e,t){let n=t?`auto`:`never`;return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{version:2,...Jv()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function lC(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=hh(r)),hg(a,[cC(e,i)])}var uC=100;function dC(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function fC(e,t){let n=gC(),r=hC(e);r===void 0?n.set(e,[t]):r.length>=uC?(mC(e,r),n.set(e,[t])):n.set(e,[...r,t])}function pC(e,t=W(),n=fC){let r=t?.getClient()??G();if(!r)return;let{release:i,environment:a,enableLogs:o=!1,beforeSendLog:s}=r.getOptions();if(!o)return;let[,c]=Wv(r,t),l={...e.attributes},{user:{id:u,email:d,username:f},attributes:p={}}=d_(um(),t);dC(l,`user.id`,u,!1),dC(l,`user.email`,d,!1),dC(l,`user.name`,f,!1),dC(l,`sentry.release`,i),dC(l,`sentry.environment`,a);let{name:m,version:h}=r.getSdkMetadata()?.sdk??{};dC(l,`sentry.sdk.name`,m),dC(l,`sentry.sdk.version`,h);let g=r.getIntegrationByName(`Replay`),_=g?.getReplayId(!0);dC(l,`sentry.replay_id`,_),_&&g?.getRecordingMode()===`buffer`&&dC(l,`sentry._internal.replay_is_buffering`,!0);let v=e.message;if(yf(v)){let{__sentry_template_string__:e,__sentry_template_values__:t=[]}=v;t?.length&&(l[`sentry.message.template`]=e),t.forEach((e,t)=>{l[`sentry.message.parameter.${t}`]=e})}dC(l,`sentry.trace.parent_span_id`,Rf(t)?.spanContext().spanId);let y={...e,attributes:l};r.emit(`beforeCaptureLog`,y);let b=s?nf(()=>s(y)):y;if(!b){r.recordDroppedEvent(`before_send`,`log_item`,1);return}let{level:x,message:S,attributes:C={},severityNumber:w}=b,T=Fp(),E=Uv(T);n(r,{timestamp:T,level:x,body:vC(String(S)),trace_id:c?.trace_id,severity_number:w??sC[x],attributes:_C({...th(p),...th(C,!0),[E.key]:E.value})}),r.emit(`afterCaptureLog`,b)}function mC(e,t){let n=t??hC(e)??[];if(n.length===0)return;let r=e.getOptions(),i=lC(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);gC().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function hC(e){return gC().get(e)}function gC(){return $d(`clientToLogBufferMap`,()=>new WeakMap)}function _C(e){let t={};for(let[n,r]of Object.entries(e)){let e=vC(n);r.type===`string`?t[e]={...r,value:vC(r.value)}:t[e]=r}return t}function vC(e){let t=Object(e),n=t.isWellFormed,r=t.toWellFormed;return typeof n==`function`&&typeof r==`function`?n.call(e)?e:r.call(e):e}function yC(e){return Bh({trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||``,start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status===`ok`||e.status===`cancelled`?`ok`:`error`,is_segment:!1,attributes:{...e.data},links:e.links})}function bC(e,t){if(e.type!==`transaction`||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||t.getOptions().streamGenAiSpans===!1||Zm(t))return;let n=[],r=[];for(let t of e.spans)t.op?.startsWith(`gen_ai.`)?n.push(yC(t)):r.push(t);if(n.length===0)return;e.spans=r;let i=t.getDataCollectionOptions().userInfo?`auto`:`never`;return[{type:`span`,item_count:n.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,...Jv()&&{ingest_settings:{infer_ip:i,infer_user_agent:i}},items:n}]}function xC(e){return typeof e==`object`&&typeof e.unref==`function`&&e.unref(),e}var SC=Symbol.for(`SentryBufferFullError`);function CC(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return O_(SC);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return D_(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>xC(setTimeout(()=>t(!1),e)))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}function wC(e,t,n=CC(e.bufferSize||64)){let r={},i=e=>n.drain(e);function a(i){let a=[];if(_g(i,(t,n)=>{let i=Og(n);Iy(r,i)?e.recordDroppedEvent(`ratelimit_backoff`,i):a.push(t)}),a.length===0)return Promise.resolve({});let o=hg(i[0],a),s=t=>{vg(o,[`client_report`])||_g(o,(n,r)=>{e.recordDroppedEvent(t,Og(r))})};return n.add(()=>t({body:xg(o)}).then(e=>e.statusCode===413?(s(`send_error`),e):(r=Ly(r,e),e),e=>{throw s(`network_error`),e})).then(e=>e,e=>
484{if(e===SC)return s(`queue_overflow`),Promise.resolve({});throw e})}return{send:a,flush:i}}function TC(e,t,n){let r=[{type:`client_report`},{timestamp:n||Mp(),discarded_events:e}];return hg(t?{dsn:t}:{},[r])}function EC(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function DC(e){let{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:a,data:o,op:s}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??``,start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??``,origin:a,profile_id:o?.[Pm],exclusive_time:o?.[Fm],measurements:e.measurements,is_segment:!0}}function OC(e){return{type:`transaction`,timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}var kC=`[Filtered]`,AC=[`forwarded`,`-ip`,`remote-`,`via`,`-user`],jC=[`auth`,`token`,`secret`,`session`,`password`,`passwd`,`pwd`,`key`,`jwt`,`bearer`,`sso`,`saml`,`csrf`,`xsrf`,`credentials`,`sid`,`identity`,`set-cookie`,`cookie`],MC=[`.sid`,`sessid`,`remember`,`oidc`,`pkce`,`nonce`,`__secure-`,`__host-`,`awsalb`,`awselb`,`akamai`,`__stripe`,`cognito`,`firebase`,`supabase`,`sb-`,`mfa`,`2fa`];function NC(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:AC},httpHeaders:{request:{deny:AC},response:{deny:AC}},httpBodies:[],queryParams:{deny:AC},genAI:{inputs:!1,outputs:!1},stackFrameVariables:!0,frameContextLines:7}}var PC={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5};function FC(e){let t=e.dataCollection==null?NC(e.sendDefaultPii):PC,n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:n.httpHeaders?.request??t.httpHeaders.request,response:n.httpHeaders?.response??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,queryParams:n.queryParams??t.queryParams,genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}var IC=Symbol.for(`SentryInternalError`),LC=Symbol.for(`SentryDoNotSendEventError`),RC=5e3;function zC(e){return{message:e,[IC]:!0}}function BC(e){return{message:e,[LC]:!0}}function VC(e){return!!e&&typeof e==`object`&&IC in e}function HC(e){return!!e&&typeof e==`object`&&LC in e}function UC(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{if(a+=r(t),a>=8e5)i(e);else if(!s){let t=e.getOptions()._flushInterval??RC;t>0&&(s=!0,o=xC(setTimeout(()=>{i(e)},t)))}}),e.on(`flush`,()=>{i(e)})}var WC=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=CC(e.transportOptions?.bufferSize??64),this._dataCollection=FC(e),e.dsn&&(this._dsn=xh(e.dsn)),this._dsn){let t=aC(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&UC(this,`afterCaptureLog`,`flushLogs`,ZC,mC),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&UC(this,`afterCaptureMetric`,`flushMetrics`,XC,iy)}captureException(e,t,n){let r=Cp();if(kp(e))return r;let i={event_id:r,...t};return this._process(()=>this.eventFromException(e,i).then(e=>this._captureEvent(e,i,n)).then(e=>e),`error`),i.event_id}captureMessage(e,t,n,r){let i={event_id:Cp(),...n}
484,a=yf(e)?e:String(e),o=bf(e),s=o?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>s.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(e,t,n){let r=Cp();if(t?.originalException&&kp(t.originalException))return r;let i={event_id:r,...t},a=e.sdkProcessingMetadata||{},o=a.capturedSpanScope,s=a.capturedSpanIsolationScope,c=GC(e.type);return this._process(()=>this._captureEvent(e,i,o||n,s),c),i.event_id}captureSession(e){this.sendSession(e),Bp(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(this.emit(`flush`),!t)return!0;let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){mC(this);let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit(`close`),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith(`Spotlight`)))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){let t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),Sv(this,e,this._integrations),t||xv(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=bC(e,this),r=Ng(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])r=gg(r,Tg(e));n&&(r=gg(r,n)),this.sendEnvelope(r).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(e){let{release:t,environment:n=ng}=this._options;if(`aggregates`in e){let r=e.attrs||{};if(!r.release&&!t)return;r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t)return;e.release=e.release||t,e.environment=e.environment||n}this.emit(`beforeSendSession`,e);let r=Mg(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){let r=`${e}:${t}`;this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch{return{}}return{}}registerCleanup(e){}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=bv(this,e),xv(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception?.values;if(i){r=!0,n=!1;for(let e of i)if(e.mechanism?.handled===!1){n=!0;break}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(Bp(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){let i=this.getOptions(),a=this.getIntegrationNames();return!t.integrations&&a.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),R_(i,e,t,n,this,r).then(e=>e===null?e:(this.emit(`postprocessEvent`,e,t),e.contexts={trace:{...e.contexts?.trace,...mm(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:lg(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(e,t={},n=W(),r=um()){return this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=YC(e),s=JC(e),c=`before send for type \`${e.type||`error`}\``,l=a===void 0?void 0:Qm(a);if(s&&typeof l==`number`&&Vf()>l)return this.recordDroppedEvent(`sample_rate`,`error`),O_(BC(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));let u=GC(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(e===null)throw this.recordDroppedEvent(`event_processor`,u),BC("An event processor returned `null`, will not send event.");return t.data?.__sentry__===!0?e:KC(qC(this,i,e,t),c)}).then(i=>{if(i===null){if(this.recordDroppedEvent(`before_send`,u),o){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw BC(`${c} returned \`null\`, will not send event.`)}
484let a=n.getSession()||r.getSession();if(s&&a&&this._updateSessionFromEvent(a,i),o){let e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let l=i.transaction_info;return o&&l&&i.transaction!==e.transaction&&(i.transaction_info={...l,source:`custom`}),this.sendEvent(i,t),i}).then(null,e=>{throw HC(e)||VC(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),zC(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 485Reason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===SC&&this.recordDroppedEvent(`queue_overflow`,t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0||!this._dsn)return;let t=TC(e,this._options.tunnel&&hh(this._dsn));this.sendEnvelope(t)}};function GC(e){return e===`replay_event`?`replay`:e||`error`}function KC(e,t){let n=`${t} must return \`null\` or a valid event.`;if(wf(e))return e.then(e=>{if(!xf(e)&&e!==null)throw zC(n);return e},e=>{throw zC(`${t} rejected with ${e}`)});if(!xf(e)&&e!==null)throw zC(n);return e}function qC(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,ignoreSpans:o}=t,s=!mg(t.beforeSendSpan)&&t.beforeSendSpan,c=n;if(JC(c)&&i)return i(c,r);if(YC(c)){if(s||o){let t=DC(c);if(o?.length&&qm({description:t.description,op:t.op,attributes:t.data},o))return null;if(s){let e=s(t);e?c=Up(n,OC(e)):eg()}if(c.spans){let t=[],n=c.spans;for(let e of n){if(o?.length&&qm({description:e.description,op:e.op,attributes:e.data},o)){Ym(n,e);continue}if(s){let n=s(e);n?t.push(n):(eg(),t.push(e))}else t.push(e)}let r=c.spans.length-t.length;r&&e.recordDroppedEvent(`before_send`,`span`,r),c.spans=t}}if(a){if(c.spans){let e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(c,r)}}return c}function JC(e){return e.type===void 0}function YC(e){return e.type===`transaction`}function XC(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+QC(e.attributes)}function ZC(e){let t=0;return e.message&&(t+=e.message.length*2),t+QC(e.attributes)}function QC(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*$C(e[0]):bf(e)?t+=$C(e):t+=100}),t}function $C(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}function ew(e,t){t.debug===!0&&nf(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}),W().update(t.initialScope);let n=new e(t);return tw(n),n.init(),n}function tw(e){W().setClient(e)}var nw=5e3,rw=36e5;function iw(e){return t=>{let n=e(t);if(!t.createStore)throw Error("No `createStore` function was provided");let r=t.createStore(t),i=nw,a;function o(e,n,r){return vg(e,[`client_report`])?!1:t.shouldStore?t.shouldStore(e,n,r):!0}function s(e){a&&clearTimeout(a),a=xC(setTimeout(async()=>{a=void 0;let e=await r.shift();e&&(e[0].sent_at=new Date(Hf()).toISOString(),l(e,!0).catch(e=>{}))},e))}function c(){a||(s(i),i=Math.min(i*2,rw))}async function l(e,a=!1){if(!a&&vg(e,[`replay_event`,`replay_recording`]))return await r.push(e),s(100),{};try{if(t.shouldSend&&await t.shouldSend(e)===!1)throw Error("Envelope not sent because `shouldSend` callback returned false");let r=await n.send(e),a=100;if(r){if(r.headers?.[`retry-after`])a=Py(r.headers[`retry-after`]);else if(r.headers?.[`x-sentry-rate-limits`])a=6e4;else if((r.statusCode||0)>=400)return r}return s(a),i=nw,r}catch(t){if(await o(e,t,i))return a?await r.unshift(e):await r.push(e),c(),{};throw t}}return t.flushAtStartup&&c(),{send:l,flush:e=>(e===void 0&&(i=nw,s(100)),n.flush(e))}}}var aw=`MULTIPLEXED_TRANSPORT_EXTRA_KEY`;function ow(e,t){let n;return _g(e,(e,r)=>(t.includes(r)&&(n=Array.isArray(e)?e[1]:void 0),!!n)),n}function sw(e,t){return n=>{let r=e(n);return{...r,send:async e=>{let n=ow(e,[`event`,`transaction`,`profile`,`replay_event`]);return n&&(n.release=t),r.send(e)}}}}function cw(e,t){return hg(t?{...e[0],dsn:t}:e[0],e[1])}function lw(e,t){return n=>{let r=e(n),i=new Map,a=t||(e=>{let t=e.getEvent();return t?.extra?.MULTIPLEXED_TRANSPORT_EXTRA_KEY&&Array.isArray(t.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY)?t.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY:[]});function o(t,r){let a=r?`${t}:${r}`:t,o=i.get(a);if(!o){let s=gh(t);if(!s)return;let c=aC(s,n.tunnel);o=r?sw(e,r)({...n,url:c}):e({...n,url:c}),i.set(a,o)}return[t,o]}async function s(e){function t(t){return ow(e,t?.length?t:[`event`])}let n=a({envelope:e,getEvent:t}).map(e=>typeof e==`string`?o(e,void 0):o(e.dsn,e.release)).filter(e=>!!e),i=n.length?n:[[``,r]];return(await Promise.all(i.map(([t,n])=>n.send(cw(e,t)))))[0]}async function c(e){let t=[...i.values(),r];return(await Promise.all(t.map(t=>t.flush(e)))).every(e=>e)}return{send:s,flush:c}
485}}function uw(e,t){return t.some(t=>e.includes(t))}function dw(e,t,n){if(t===!1)return{};let r=n==null?jC:[...jC,...n],i={};if(t===!0){for(let t of Object.keys(e))i[t]=uw(t.toLowerCase(),r)?kC:e[t];return i}if(`deny`in t){let n=t.deny.map(e=>e.toLowerCase());for(let t of Object.keys(e)){let a=t.toLowerCase();i[t]=uw(a,r)||n.some(e=>a.includes(e))?kC:e[t]}return i}let a=t.allow.map(e=>e.toLowerCase());for(let t of Object.keys(e)){let n=t.toLowerCase();uw(n,r)?i[t]=kC:i[t]=a.some(e=>n.includes(e))?e[t]:kC}return i}function fw(e){let t={},n=0;for(;n<e.length;){let r=e.indexOf(`=`,n);if(r===-1)break;let i=e.indexOf(`;`,n);if(i===-1)i=e.length;else if(i<r){n=e.lastIndexOf(`;`,r-1)+1;continue}let a=e.slice(n,r).trim();if(t[a]===void 0){let n=e.slice(r+1,i).trim();n.charCodeAt(0)===34&&(n=n.slice(1,-1));try{t[a]=n.indexOf(`%`)===-1?n:decodeURIComponent(n)}catch{t[a]=n}}n=i+1}return t}function pw(e,t){if(t===!1)return{};try{let n=fw(e);return Object.keys(n).length===0?{}:dw(n,t,MC)}catch{return kC}}function mw(e,...t){let n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join(`\0`).replace(/%/g,`%%`).replace(/\0/g,`%s`),n.__sentry_template_values__=t,n}var hw=mw;function gw(e){`aggregates`in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:`{{auto}}`}):e.ipAddress===void 0&&(e.ipAddress=`{{auto}}`)}function _w(e,t,n=[t],r=`npm`){let i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:Xd})),i.version=Xd)}function vw(e={}){let t=e.client||G();if(!dv()||!t)return{};let n=om(Zd());if(n.getTraceData)return n.getTraceData(e);let r=e.scope||W(),i=e.span||$h(),a=ag(i)&&!Km(t.getOptions());if(!i&&lm())return{};let o=i&&!a?Mh(i):yw(r),s=Bm(i?ug(i):lg(t,r));if(!Sh.test(o))return df.warn(`Invalid sentry-trace data. Cannot generate trace data`),{};let c={"sentry-trace":o,baggage:s};return e.propagateTraceparent&&(c.traceparent=i&&!a?Nh(i):bw(r)),c}function yw(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Th(t,r,n)}function bw(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Eh(t,r,n)}var xw,Sw=`FunctionToString`,Cw=new WeakMap,ww=J((()=>({name:Sw,setupOnce(){xw=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Af(this),n=Cw.has(G())&&t!==void 0?t:this;return xw.apply(n,e)}}catch{}},setup(e){Cw.set(e,!0)}}))),Tw=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],Ew=`EventFilters`,Dw=J((e={})=>{let t;return{name:Ew,setup(n){t=kw(e,n.getOptions())},processEvent(n,r,i){return t||=kw(e,i.getOptions()),Aw(n,t)?null:n}}}),Ow=J(((e={})=>({...Dw(e),name:`InboundFilters`})));function kw(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Tw],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Aw(e,t){if(!e.type){if(jw(e,t.ignoreErrors)||Lw(e)||Nw(e,t.denyUrls)||!Pw(e,t.allowUrls))return!0}else if(e.type===`transaction`&&Mw(e,t.ignoreTransactions))return!0;return!1}function jw(e,t){return t?.length?EC(e).some(e=>yp(e,t)):!1}function Mw(e,t){if(!t?.length)return!1;let n=e.transaction;return n?yp(n,t):!1}function Nw(e,t){if(!t?.length)return!1;let n=Iw(e);return n?yp(n,t):!1}function Pw(e,t){if(!t?.length)return!0;let n=Iw(e);return n?yp(n,t):!0}function Fw(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function Iw(e){try{let t=[...e.exception?.values??[]].reverse().find(e=>e.mechanism?.parent_id===void 0&&e.stacktrace?.frames?.length)?.stacktrace?.frames;return t?Fw(t):null}catch{return null}}function Lw(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value):!1}var Rw=new Map,zw=new Set;function Bw(e){if(U._sentryModuleMetadata)for(let t of Object.keys(U._sentryModuleMetadata)){let n=U._sentryModuleMetadata[t];if(zw.has(t))continue;zw.add(t);let r=e(t);for(let e of r.reverse())if(e.filename){Rw.set(e.filename,n);break}}}function Vw(e,t){return Bw(e),Rw.get(t)}function Hw(e,t){t.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(t=>{if(!t.filename||t.module_metadata)return;let n=Vw(e,t.filename);n&&(t.module_metadata=n)})})}
485function Uw(e){e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{delete e.module_metadata})})}var Ww=J(()=>({name:`ModuleMetadata`,setup(e){e.on(`beforeEnvelope`,e=>{_g(e,(e,t)=>{if(t===`event`){let t=Array.isArray(e)?e[1]:void 0;t&&(Uw(t),e[1]=t)}})}),e.on(`applyFrameMetadata`,t=>{if(t.type)return;let n=e.getOptions().stackParser;Hw(n,t)})}})),Gw=new Set([]);function Kw(e){let t=`console`,n=by(t,e);return xy(t,qw),n}function qw(){`console`in U&&ef.forEach(function(e){e in U.console&&Df(U.console,e,function(t){return tf[e]=t,function(...t){let n=t[0],r=tf[e],i=Gw.size&&typeof n==`string`&&yp(n,Gw);i||Sy(`console`,{args:t,level:e}),i||r?.apply(U.console,t)}})})}var Jw=`CaptureConsole`,Yw=J(((e={})=>{let t=e.levels||ef,n=e.handled??!0;return{name:Jw,setup(e){`console`in U&&Kw(({args:r,level:i})=>{G()!==e||!t.includes(i)||Xw(r,i,n)})}}}));function Xw(e,t,n){let r=My(t),i=Error(),a={level:My(t),extra:{arguments:e}};fm(o=>{if(o.addEventProcessor(e=>(e.logger=`console`,Dp(e,{handled:n,type:`auto.core.capture_console`}),e)),t===`assert`){if(!e[0]){let t=`Assertion failed: ${_p(e.slice(1),` `)||`console.assert`}`;o.setExtra(`arguments`,e.slice(1)),o.captureMessage(t,r,{captureContext:a,syntheticException:i})}return}let s=e.find(e=>e instanceof Error);if(s){Y_(s,a);return}let c=_p(e,` `);o.captureMessage(c,r,{captureContext:a,syntheticException:i})})}var Zw=`Dedupe`,Qw=J((()=>{let e;return{name:Zw,processEvent(t){if(t.type)return t;try{if($w(t,e))return null}catch{}return e=t}}}));function $w(e,t){return t?!!(eT(e,t)||tT(e,t)):!1}function eT(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!rT(e,t)||!nT(e,t))}function tT(e,t){let n=iT(t),r=iT(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!rT(e,t)||!nT(e,t))}function nT(e,t){let n=rp(e),r=rp(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function rT(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join(``)===r.join(``)}catch{return!1}}function iT(e){return e.exception?.values?.[0]}var aT=`ExtraErrorData`,oT=J(((e={})=>{let{depth:t=3,captureErrorCause:n=!0}=e;return{name:aT,processEvent(e,r,i){let{maxValueLength:a}=i.getOptions();return sT(e,r,t,n,a)}}}));function sT(e,t={},n,r,i){if(!t.originalException||!pf(t.originalException))return e;let a=t.originalException.name||t.originalException.constructor.name,o=cT(t.originalException,r,i);if(o){let t={...e.contexts},r=sp(o,n);return xf(r)&&(Gf(r),t[a]=r),{...e,contexts:t}}return e}function cT(e,t,n){try{let r=[`name`,`message`,`stack`,`line`,`column`,`fileName`,`lineNumber`,`columnNumber`,`toJSON`],i={};for(let t of Object.keys(e)){if(r.indexOf(t)!==-1)continue;let a=e[t];i[t]=pf(a)||typeof a==`string`?n?hp(`${a}`,n):`${a}`:a}if(t&&e.cause!==void 0&&(pf(e.cause)?i.cause={[e.cause.name||e.cause.constructor.name]:cT(e.cause,!1,n)}:i.cause=e.cause),typeof e.toJSON==`function`){let t=e.toJSON();for(let e of Object.keys(t)){let n=t[e];i[e]=pf(n)?n.toString():n}}return i}catch{}return null}function lT(e,t){let n=0;for(let t=e.length-1;t>=0;t--){let r=e[t];r===`.`?e.splice(t,1):r===`..`?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(t)for(;n--;)e.unshift(`..`);return e}var uT=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function dT(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=uT.exec(t);return n?n.slice(1):[]}function fT(...e){let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:`/`;i&&(t=`${i}/${t}`,n=i.charAt(0)===`/`)}return t=lT(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`}function pT(e){let t=0;for(;t<e.length&&e[t]===``;t++);let n=e.length-1;for(;n>=0&&e[n]===``;n--);return t>n?[]:e.slice(t,n-t+1)}function mT(e,t){e=fT(e).slice(1),t=fT(t).slice(1);let n=pT(e.split(`/`)),r=pT(t.split(`/`)),i=Math.min(n.length,r.length),a=i;for(let e=0;e<i;e++)if(n[e]!==r[e]){a=e;break}let o=[];for(let e=a;
485e<n.length;e++)o.push(`..`);return o=o.concat(r.slice(a)),o.join(`/`)}function hT(e,t){let n=dT(e)[2]||``;return t&&n.slice(t.length*-1)===t&&(n=n.slice(0,n.length-t.length)),n}var gT=`RewriteFrames`,_T=J((e={})=>{let t=e.root,n=e.prefix||`app:///`,r=`window`in U&&!!U.window,i=e.iteratee||vT({isBrowser:r,root:t,prefix:n});function a(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map(e=>({...e,...e.stacktrace&&{stacktrace:o(e.stacktrace)}}))}}}catch{return e}}function o(e){return{...e,frames:e?.frames?.map(e=>i(e))}}return{name:gT,processEvent(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=a(t)),t}}});function vT({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;let i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes(`\\`)&&!r.filename.includes(`/`),a=/^\//.test(r.filename);if(e){if(t){let e=r.filename;e.indexOf(t)===0&&(r.filename=e.replace(t,n))}}else if(i||a){let e=i?r.filename.replace(/^[a-zA-Z]:/,``).replace(/\\/g,`/`):r.filename;r.filename=`${n}${t?mT(t,e):hT(e)}`}return r}}var yT=[`reauthenticate`,`signInAnonymously`,`signInWithOAuth`,`signInWithIdToken`,`signInWithOtp`,`signInWithPassword`,`signInWithSSO`,`signOut`,`signUp`,`verifyOtp`],bT=[`createUser`,`deleteUser`,`listUsers`,`getUserById`,`updateUserById`,`inviteUserByEmail`],xT={eq:`eq`,neq:`neq`,gt:`gt`,gte:`gte`,lt:`lt`,lte:`lte`,like:`like`,"like(all)":`likeAllOf`,"like(any)":`likeAnyOf`,ilike:`ilike`,"ilike(all)":`ilikeAllOf`,"ilike(any)":`ilikeAnyOf`,is:`is`,in:`in`,cs:`contains`,cd:`containedBy`,sr:`rangeGt`,nxl:`rangeGte`,sl:`rangeLt`,nxr:`rangeLte`,adj:`rangeAdjacent`,ov:`overlaps`,fts:``,plfts:`plain`,phfts:`phrase`,wfts:`websearch`,not:`not`},ST=[`select`,`insert`,`upsert`,`update`,`delete`];function CT(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function wT(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function TT(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}function ET(e,t){return TT(e,t)!==void 0}function DT(e,t={}){switch(e){case`GET`:return`select`;case`POST`:return t.Prefer?.includes(`resolution=`)?`upsert`:`insert`;case`PATCH`:return`update`;case`DELETE`:return`delete`;default:return`<unknown-op>`}}function OT(e,t){if(t===``||t===`*`)return`select(*)`;if(e===`select`)return`select(${t})`;if(e===`or`||e.endsWith(`.or`))return`${e}${t}`;let[n,...r]=t.split(`.`),i;return i=n?.startsWith(`fts`)?`textSearch`:n?.startsWith(`plfts`)?`textSearch[plain]`:n?.startsWith(`phfts`)?`textSearch[phrase]`:n?.startsWith(`wfts`)?`textSearch[websearch]`:n&&xT[n]||`filter`,`${i}(${e}, ${r.join(`.`)})`}function kT(e,t=!1){return new Proxy(e,{apply(n,r,i){return Wg({name:`auth ${t?`(admin) `:``}${e.name}`,attributes:{[K]:`auto.db.supabase`,[vm]:`db`,"db.system":`postgresql`,"db.operation":`auth.${t?`admin.`:``}${e.name}`}},e=>Reflect.apply(n,r,i).then(t=>(t&&typeof t==`object`&&`error`in t&&t.error?(e.setStatus({code:2}),Y_(t.error,{mechanism:{handled:!1,type:`auto.db.supabase.auth`}})):e.setStatus({code:1}),e.end(),t)).catch(t=>{throw e.setStatus({code:2}),e.end(),Y_(t,{mechanism:{handled:!1,type:`auto.db.supabase.auth`}}),t}).then(...i))}})}function AT(e){let t=e.auth;if(!(!t||wT(e.auth))){for(let n of yT){let r=t[n];r&&typeof e.auth[n]==`function`&&(e.auth[n]=kT(r))}for(let n of bT){let r=t.admin[n];r&&typeof e.auth.admin[n]==`function`&&(e.auth.admin[n]=kT(r,!0))}CT(e.auth)}}function jT(e,t){wT(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(e,n,r){let i=Reflect.apply(e,n,r),a=i.constructor;return NT(a,t),i}}),CT(e.prototype.from))}function MT(e,t){wT(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(e,n,r){let i=ST,a=n,o=DT(a.method,a.headers);if(!i.includes(o)||!a?.url?.pathname||typeof a.url.pathname!=`string`)return Reflect.apply(e,n,r);let s=a.url.pathname.split(`/`),c=s.length>0?s[s.length-1]:``,l=[];for(let[e,t]of a.url.searchParams.entries())l.push(OT(e,t));let u=Object.create(null);if(xf(a.body))for(let[e,t]of Object.entries(a.body))u[e]=t;let d=G(),f=t.sendOperationData??d?.getDataCollectionOptions().userInfo===!0,p=TT(a.body,u),m=o===`select`?``:`${o}${ET(a.body,u)?`(...) `:``}`,h=f?l.join(` `):l.length>
4850?`[redacted]`:``,g=[m.trimEnd(),h].filter(Boolean).join(` `),_=g?`${g} from(${c})`:`from(${c})`,v={"db.table":c,"db.schema":a.schema,"db.url":a.url.origin,"db.sdk":a.headers[`X-Client-Info`],"db.system":`postgresql`,"db.operation":o,[K]:`auto.db.supabase`,[vm]:`db`};return l.length&&f&&(v[`db.query`]=l),p!==void 0&&f&&(v[`db.body`]=p),Wg({name:_,attributes:v},t=>Reflect.apply(e,n,[]).then(e=>{if(t&&(e&&typeof e==`object`&&`status`in e&&oh(t,e.status||500),t.end()),e?.error){let t=Error(e.error.message);e.error.code&&(t.code=e.error.code),e.error.details&&(t.details=e.error.details);let n={};l.length&&f&&(n.query=l),p!==void 0&&f&&(n.body=p),Y_(t,e=>(e.addEventProcessor(e=>(Dp(e,{handled:!1,type:`auto.db.supabase.postgres`}),e)),e.setContext(`supabase`,n),e))}let n={type:`supabase`,category:`db.${o}`,message:_},r={};return l.length&&f&&(r.query=l),p!==void 0&&f&&(r.body=p),Object.keys(r).length&&(n.data=r),Rv(n),e},e=>{throw t&&(oh(t,500),t.end()),e}).then(...r))}}),CT(e.prototype.then))}function NT(e,t){for(let n of ST)wT(e.prototype[n])||(e.prototype[n]=new Proxy(e.prototype[n],{apply(e,n,r){let i=Reflect.apply(e,n,r),a=i.constructor;return MT(a,t),i}}),CT(e.prototype[n]))}var PT=(e,t={})=>{e&&(jT(e.constructor===Function?e:e.constructor,t),AT(e))},FT=`Supabase`,IT=((e,t)=>({setupOnce(){PT(e,t)},name:FT})),LT=J(e=>IT(e.supabaseClient,{sendOperationData:e.sendOperationData})),RT=10,zT=`ZodErrors`;function BT(e){return pf(e)&&e.name===`ZodError`&&Array.isArray(e.issues)}function VT(e){return{...e,path:`path`in e&&Array.isArray(e.path)?e.path.join(`.`):void 0,keys:`keys`in e?JSON.stringify(e.keys):void 0,unionErrors:`unionErrors`in e?JSON.stringify(e.unionErrors):void 0}}function HT(e){return e.map(e=>typeof e==`number`?`<array>`:e).join(`.`)}function UT(e){let t=new Set;for(let n of e.issues){let e=HT(n.path);e.length>0&&t.add(e)}let n=Array.from(t);if(n.length===0){let t=`variable`;if(e.issues.length>0){let n=e.issues[0];n!==void 0&&`expected`in n&&typeof n.expected==`string`&&(t=n.expected)}return`Failed to validate ${t}`}return`Failed to validate keys: ${hp(n.join(`, `),100)}`}function WT(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!BT(r.originalException)||r.originalException.issues.length===0)return n;try{let i=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(VT);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:`zod_issues.json`,data:JSON.stringify({issues:i})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:UT(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":i.slice(0,e)}}}catch(e){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:`an exception was thrown while processing ZodError within applyZodErrorsToEvent()`,error:e instanceof Error?`${e.name}: ${e.message} 486${e.stack}`:`unknown`}}}}}var GT=J(((e={})=>{let t=e.limit??RT;return{name:zT,processEvent(n,r){return WT(t,e.saveZodIssuesAsAttachment,n,r)}}})),KT=J(e=>({name:`ThirdPartyErrorsFilter`,setup(e){e.on(`beforeEnvelope`,e=>{_g(e,(e,t)=>{if(t===`event`){let t=Array.isArray(e)?e[1]:void 0;t&&(Uw(t),e[1]=t)}})}),e.on(`applyFrameMetadata`,t=>{if(t.type)return;let n=e.getOptions().stackParser;Hw(n,t)})},preprocessEvent(t){e.ignoreSentryInternalFrames&&(U._sentryWrappedDepth??0)>0&&(t.sdkProcessingMetadata={...t.sdkProcessingMetadata,insideSentryWrapped:!0})},processEvent(t){let n=e.ignoreSentryInternalFrames?t.sdkProcessingMetadata?.insideSentryWrapped===!0&&t.exception?.values?.length===1:!1,r=JT(t,e.ignoreSentryInternalFrames,n);if(r&&r[e.behaviour===`drop-error-if-contains-third-party-frames`||e.behaviour===`apply-tag-if-contains-third-party-frames`?`some`:`every`](t=>!t.some(t=>e.filterKeys.includes(t)))){if(e.behaviour===`drop-error-if-contains-third-party-frames`||e.behaviour===`drop-error-if-exclusively-contains-third-party-frames`)return null;t.tags={...t.tags,third_party_code:!0}}return t}}));function qT(e,t,n){if(t!==0)return!1;if(n&&YT(e)||e.function===`sentryWrapped`)return!0;if(!e.context_line||!e.filename||!e.filename.includes(`sentry`)||!e.filename.includes(`helpers`)||!e.context_line.includes(QT))return!1;if(e.pre_context){let t=e.pre_context.length;for(let n=0;n<t;n++)if(e.pre_context[n]?.includes(ZT))return!0}return!1}function JT(e,t,n){let r=rp(e);if(r)return r.filter((e,r)=>!e.filename||e.lineno==null&&e.colno==null&&e.instruction_addr==null?!1:!t||!qT(e,r,!!n)).map(e=>e.module_metadata?Object.keys(e.module_metadata).filter(e=>e.startsWith(XT)).map(e=>e.slice(XT.length)):[])}function YT(e){return!e.context_line&&!e.pre_context&&!!e.function&&e.function.length<=2}var XT=`_sentryBundlerPluginAppKey:`,ZT=`Attempt to invoke user-land function`,QT=`fn.apply(this, wrappedArguments)`,$T=`flag.evaluation.`;function eE(e){if(e.type)return e;let t=W().getScopeData().contexts.flags,n=t?t.values:[];return n.length?(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...n]},e):e}function tE(e,t,n=100){let r=W().getScopeData().contexts;r.flags||={values:[]};let i=r.flags.values;nE(i,e,t,n)}function nE(e,t,n,r){if(typeof n!=`boolean`||e.length>r)return;let i=e.findIndex(e=>e.flag===t);i!==-1&&e.splice(i,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function rE(e,t,n=10){if(typeof t!=`boolean`)return;let r=$h();if(!r)return;let i=q(r).data;if(`${$T}${e}`in i){r.setAttribute(`${$T}${e}`,t);return}Object.keys(i).filter(e=>e.startsWith($T)).length<n&&r.setAttribute(`${$T}${e}`,t)}var iE=J(()=>({name:`FeatureFlags`,processEvent(e,t,n){return eE(e)},addFeatureFlag(e,t){tE(e,t),rE(e,t)}})),aE=J(({growthbookClass:e})=>({name:`GrowthBook`,setupOnce(){let t=e.prototype;typeof t.isOn==`function`&&Df(t,`isOn`,oE),typeof t.getFeatureValue==`function`&&Df(t,`getFeatureValue`,oE)},processEvent(e,t,n){return eE(e)}}));function oE(e){return function(...t){let n=t[0],r=e.apply(this,t);return typeof n==`string`&&typeof r==`boolean`&&(tE(n,r),rE(n,r)),r}}var sE=`ConversationId`,cE=J((()=>({name:sE,setup(e){e.on(`spanStart`,e=>{let t=W().getScopeData(),n=um().getScopeData(),r=t.conversationId||n.conversationId;if(r){let{op:t,data:n,description:i}=q(e);if(!t?.startsWith(`gen_ai.`)&&!n[`ai.operationId`]&&!i?.startsWith(`ai.`))return;e.setAttribute(Lm,r)}})}})));function lE(e,t,n,r,i){if(!e.fetchData)return;let{method:a,url:o}=e.fetchData,s=Km()&&t(o);if(e.endTimestamp){let t=e.fetchData.__span;if(!t)return;let n=r[t];n&&(s&&(fE(n,e),uE(n,e,i)),delete r[t]);return}let{spanOrigin:c=`auto.http.browser`,propagateTraceparent:l=!1}=typeof i==`object`?i:{spanOrigin:i},u=G(),d=!!$h()||!!u&&Zm(u),f=s&&d?Kg(gE(o,a,c)):new ig;if(s&&!d&&u?.recordDroppedEvent(`no_parent_span`,`span`),e.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f,n(e.fetchData.url)){let t=e.args[0],n={...e.args[1]||{}},r=dE(t,n,Km()&&d?f:void 0,l);r&&(e.args[1]=n,n.headers=r)}if(u){let t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};u.emit(`beforeOutgoingRequestSpan`,f,t)}return f}
486function uE(e,t,n){(typeof n==`object`&&n?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function dE(e,t,n,r){let i=vw({span:n,propagateTraceparent:r}),a=i[`sentry-trace`],o=i.baggage,s=i.traceparent;if(!a)return;let c=t.headers||(Ef(e)?e.headers:void 0);if(!c)return{...i};if(mE(c)){let e=new Headers(c);if(e.get(`sentry-trace`)||e.set(`sentry-trace`,a),r&&s&&!e.get(`traceparent`)&&e.set(`traceparent`,s),o){let t=e.get(`baggage`);t?pE(t)||e.set(`baggage`,`${t},${o}`):e.set(`baggage`,o)}return e}else if(hE(c)){let e=[...c];e.find(e=>e[0]===`sentry-trace`)||e.push([`sentry-trace`,a]),r&&s&&!e.find(e=>e[0]===`traceparent`)&&e.push([`traceparent`,s]);let t=c.find(e=>e[0]===`baggage`&&typeof e[1]==`string`&&pE(e[1]));return o&&!t&&e.push([`baggage`,o]),e}else{let e=`sentry-trace`in c?c[`sentry-trace`]:void 0,t=`traceparent`in c?c.traceparent:void 0,n=`baggage`in c?c.baggage:void 0,i=n?Array.isArray(n)?[...n]:[n]:[],l=n&&(Array.isArray(n)?n.find(e=>pE(e)):pE(n));o&&!l&&i.push(o);let u=Object.assign({},c,{"sentry-trace":e??a,baggage:i.length>0?i.join(`,`):void 0});return r&&s&&!t&&(u.traceparent=s),u}}function fE(e,t){if(t.response){oh(e,t.response.status);let n=t.response?.headers?.get(`content-length`);if(n){let t=parseInt(n);t>0&&e.setAttribute(`http.response_content_length`,t)}}else t.error&&e.setStatus({code:2,message:`internal_error`});e.end()}function pE(e){return typeof e==`string`?e.split(`,`).some(e=>e.trim().startsWith(Rm)):!1}function mE(e){return typeof Headers<`u`&&Tf(e,Headers)}function hE(e){return Array.isArray(e)?e.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]==`string`):!1}function gE(e,t,n){if(e.startsWith(`data:`))return{name:`${t} ${Av(e)}`,attributes:_E(e,void 0,t,n)};let r=Ev(e);return{name:`${t} ${r?Dv(r):e}`,attributes:_E(e,r,t,n)}}function _E(e,t,n,r){let i={url:Av(e),type:`fetch`,"http.method":n,[K]:r,[vm]:`http.client`};return t&&(Tv(t)||(i[`http.url`]=Av(t.href),i[`server.address`]=t.host),t.search&&(i[`http.query`]=t.search),t.hash&&(i[`http.fragment`]=t.hash)),i}var vE=e({debug:()=>xE,error:()=>wE,fatal:()=>TE,fmt:()=>hw,info:()=>SE,trace:()=>bE,warn:()=>CE});function yE(e,t,n,r,i){pC({level:e,message:t,attributes:n,severityNumber:i},r)}function bE(e,t,{scope:n}={}){yE(`trace`,e,t,n)}function xE(e,t,{scope:n}={}){yE(`debug`,e,t,n)}function SE(e,t,{scope:n}={}){yE(`info`,e,t,n)}function CE(e,t,{scope:n}={}){yE(`warn`,e,t,n)}function wE(e,t,{scope:n}={}){yE(`error`,e,t,n)}function TE(e,t,{scope:n}={}){yE(`fatal`,e,t,n)}function EE(e,t,n){return`util`in U&&typeof U.util.format==`function`?U.util.format(...e):DE(e,t,n)}function DE(e,t,n){return e.map(e=>bf(e)?String(e):JSON.stringify(sp(e,t,n))).join(` `)}function OE(e){return/%[sdifocO]/.test(e)}function kE(e,t){let n={};return n[`sentry.message.template`]=`${e} ${Array(t.length).fill(`{}`).join(` `)}`,t.forEach((e,t)=>{n[`sentry.message.parameter.${t}`]=e}),n}var AE=`ConsoleLogs`,jE={[K]:`auto.log.console`},ME=J(((e={})=>{let t=e.levels||ef;return{name:AE,setup(e){let{enableLogs:n,normalizeDepth:r=3,normalizeMaxBreadth:i=1e3}=e.getOptions();if(!n)return;let a=Kw(({args:n,level:a})=>{if(G()!==e||!t.includes(a))return;let o=n[0],s=n.slice(1);if(a===`assert`){o||pC({level:`error`,message:s.length>0?`Assertion failed: ${EE(s,r,i)}`:`Assertion failed`,attributes:jE});return}let c=a===`log`,l={...jE};if(xf(o)){Object.assign(l,sp(o,r,i));let e=typeof n[1]==`string`?2:1;n.slice(e).forEach((e,t)=>{l[`sentry.message.parameter.${t}`]=sp(e,r,i)})}else if(s.length>0&&typeof o==`string`&&!OE(o)){let e=kE(o,s);for(let[t,n]of Object.entries(e))l[t]=t.startsWith(`sentry.message.parameter.`)?sp(n,r,i):n}pC({level:c?`info`:a,message:EE(n,r,i),severityNumber:c?10:void 0,attributes:l})});e.registerCleanup(a)}}})),NE=[`trace`,`debug`,`info`,`warn`,`error`,`fatal`];function PE(e={}){let t=new Set(e.levels??NE),n=e.client;return{log(e){let{type:r,level:i,message:a,args:o,tag:s,date:c,...l}=e,u=n||G();if(!u)return;let d=LE(r,i);if(!t.has(d))return;let{normalizeDepth:f=3,normalizeMaxBreadth:p=1e3}=u.getOptions(),m={};for(let[e,t]of Object.entries(l))m[e]=sp(t,f,p);m[`sentry.origin`]=`auto.log.consola`,s&&(m[`consola.tag`]=s),r&&(m[`consola.type`]=r),i!=null&&typeof i==`number`&&(m[`consola.level`]=i);let h=zE(RE(o,f,p),f,p);h?.attributes&&Object.assign(m,h.attributes),pC({level:d,message:h?.message||a||o&&EE(o,f,p)||``,attributes:m})}}}var FE={silent:`trace`,fatal:`fatal`,error:`error`,warn:`warn`,log:`info`,info:`info`,success:`info`,fail:`error`,ready:`info`,start:`info`,box:`info`,debug:`debug`,trace:`trace`,verbose:`debug`,critical:`fatal`,notice:`info`},IE={0:`fatal`,1:`warn`,2:`info`,3:`info`,4:`debug`,5:`trace`};function LE(e,t){if(e===`verbose`)return`debug`;if(e===`silent`)return`trace`;if(e){let t=FE[e];if(t)return t}if(typeof t==`number`){let e=IE[t];if(e)return e}return`info`}function RE(e,t,n){if(!e?.length)return{message:``};let r=EE(e,t,n),i=e[0];if(xf(i)){let t=typeof e[1]==`string`?2:1;return{message:r,attributes:i,messageParameters:e.slice(t)}}else{let t=e.slice(1),n=t.length>0&&typeof i==`string`&&!OE(i);return{message:r,messageTemplate:n?i:void 0,messageParameters:n?t:void 0}}}function zE(e,t,n){let{message:r,attributes:i,messageTemplate:a,messageParameters:o}=e,s={};if(a&&o){let e=kE(a,o);for(let[r,i]of Object.entries(e))s[r]=r.startsWith(`sentry.message.parameter.`)?sp(i,t,n):i}else o&&o.length>0&&o.forEach((e,r)=>{s[`sentry.message.parameter.${r}`]=sp(e,t,n)});return{message:r,attributes:{...sp(i,t,n),...s}}}var BE=`gen_ai.prompt`,VE=`gen_ai.system`,HE=`gen_ai.request.model`,UE=`gen_ai.request.stream`,WE=`gen_ai.request.temperature`,GE=`gen_ai.request.max_tokens`,KE=`gen_ai.request.frequency_penalty`,qE=`gen_ai.request.presence_penalty`,JE=`gen_ai.request.top_p`,YE=`gen_ai.request.top_k`,XE=`gen_ai.request.encoding_format`,ZE=`gen_ai.request.dimensions`,QE=`gen_ai.response.finish_reasons`,$E=`gen_ai.response.model`,eD=`gen_ai.response.id`,tD=`gen_ai.response.stop_reason`,nD=`gen_ai.usage.input_tokens`,rD=`gen_ai.usage.output_tokens`,iD=`gen_ai.usage.total_tokens`,aD=`gen_ai.operation.name`,oD=`sentry.sdk_meta.gen_ai.input.messages.original_length`,sD=`gen_ai.input.messages`,cD=`gen_ai.system_instructions`,lD=`gen_ai.response.text`,uD=`gen_ai.request.available_tools`,dD=`gen_ai.response.streaming`,fD=`gen_ai.response.tool_calls`,pD=`gen_ai.agent.name`,mD=`gen_ai.pipeline.name`,hD=`gen_ai.conversation.id`,gD=`gen_ai.usage.cache_creation_input_tokens`,_D=`gen_ai.usage.cache_read_input_tokens`,vD=`gen_ai.invoke_agent`,yD=`gen_ai.embeddings.input`,bD=`gen_ai.embeddings`,xD=`gen_ai.execute_tool`,SD=`gen_ai.tool.name`,CD=`gen_ai.tool.call.id`,wD=`gen_ai.tool.type`,TD=`gen_ai.tool.input`,ED=`gen_ai.tool.output`,DD=`gen_ai.tool.description`;function OD(e){return!e||typeof e!=`object`?!1:jD(e)||MD(e)||kD(e)||ND(e)||PD(e)||FD(e)||ID(e)||LD(e)||RD(e)||zD(e)||BD(e)||VD(e)}function kD(e){return`image_url`in e?typeof e.image_url==`string`?e.image_url.startsWith(`data:`):AD(e):!1}
486function AD(e){return`image_url`in e&&!!e.image_url&&typeof e.image_url==`object`&&`url`in e.image_url&&typeof e.image_url.url==`string`&&e.image_url.url.startsWith(`data:`)}function jD(e){return`type`in e&&typeof e.type==`string`&&`source`in e&&OD(e.source)}function MD(e){return`inlineData`in e&&!!e.inlineData&&typeof e.inlineData==`object`&&`data`in e.inlineData&&typeof e.inlineData.data==`string`}function ND(e){return`type`in e&&e.type===`input_audio`&&`input_audio`in e&&!!e.input_audio&&typeof e.input_audio==`object`&&`data`in e.input_audio&&typeof e.input_audio.data==`string`}function PD(e){return`type`in e&&e.type===`file`&&`file`in e&&!!e.file&&typeof e.file==`object`&&`file_data`in e.file&&typeof e.file.file_data==`string`}function FD(e){return`media_type`in e&&typeof e.media_type==`string`&&`data`in e}function ID(e){return`type`in e&&e.type===`file`&&`mediaType`in e&&typeof e.mediaType==`string`&&`data`in e&&typeof e.data==`string`&&!e.data.startsWith(`http://`)&&!e.data.startsWith(`https://`)}function LD(e){return`type`in e&&e.type===`image`&&`image`in e&&typeof e.image==`string`&&!e.image.startsWith(`http://`)&&!e.image.startsWith(`https://`)}function RD(e){return`type`in e&&(e.type===`blob`||e.type===`base64`)}function zD(e){return`b64_json`in e}function BD(e){return`type`in e&&`result`in e&&e.type===`image_generation`}function VD(e){return`uri`in e&&typeof e.uri==`string`&&e.uri.startsWith(`data:`)}var HD=`[Blob substitute]`,UD=[`image_url`,`data`,`content`,`b64_json`,`result`,`uri`,`image`];function WD(e){let t={...e};OD(t.source)&&(t.source=WD(t.source)),MD(e)&&(t.inlineData={...e.inlineData,data:HD}),AD(e)&&(t.image_url={...e.image_url,url:HD}),ND(e)&&(t.input_audio={...e.input_audio,data:HD}),PD(e)&&(t.file={...e.file,file_data:HD});for(let e of UD)typeof t[e]==`string`&&(t[e]=HD);return t}var GD=2e4,KD=e=>new TextEncoder().encode(e).length,qD=e=>KD(JSON.stringify(e));function JD(e,t){if(KD(e)<=t)return e;let n=0,r=e.length,i=``;for(;n<=r;){let a=Math.floor((n+r)/2),o=e.slice(0,a);KD(o)<=t?(i=o,n=a+1):r=a-1}return i}function YD(e){return typeof e==`string`?e:`text`in e&&typeof e.text==`string`?e.text:``}function XD(e,t){return typeof e==`string`?t:{...e,text:t}}function ZD(e){return typeof e==`object`&&!!e&&`content`in e&&typeof e.content==`string`}function QD(e){return typeof e==`object`&&!!e&&`content`in e&&Array.isArray(e.content)}function $D(e){return typeof e==`object`&&!!e&&`parts`in e&&Array.isArray(e.parts)&&e.parts.length>0}function eO(e,t){let n=t-qD({...e,content:``});if(n<=0)return[];let r=JD(e.content,n);return[{...e,content:r}]}function tO(e){return`parts`in e&&Array.isArray(e.parts)?{key:`parts`,items:e.parts}:`content`in e&&Array.isArray(e.content)?{key:`content`,items:e.content}:{key:null,items:[]}}function nO(e,t){let{key:n,items:r}=tO(e);if(n===null||r.length===0)return[];let i=r.map(e=>XD(e,``)),a=t-qD({...e,[n]:i});if(a<=0)return[];let o=[];for(let e of r){let t=YD(e),n=KD(t);if(n<=a)o.push(e),a-=n;else if(o.length===0){let n=JD(t,a);n&&o.push(XD(e,n));break}else break}return o.length<=0?[]:[{...e,[n]:o}]}function rO(e,t){if(!e)return[];if(typeof e==`string`){let n=JD(e,t);return n?[n]:[]}return typeof e==`object`?ZD(e)?eO(e,t):QD(e)||$D(e)?nO(e,t):[]:[]}function iO(e){return e.map(e=>{let t;return e&&typeof e==`object`&&(QD(e)?t={...e,content:iO(e.content)}:`content`in e&&OD(e.content)&&(t={...e,content:WD(e.content)}),$D(e)&&(t={...t??e,parts:iO(e.parts)}),OD(t)?t=WD(t):OD(e)&&(t=WD(e))),t??e})}function aO(e,t){if(!Array.isArray(e)||e.length===0)return e;let n=t-2,r=e[e.length-1],i=iO([r]),a=i[0];return qD(a)<=n?i:rO(a,n)}function oO(e){return aO(e,GD)}function sO(e){return JD(e,GD)}function cO(e){let t=G()?.getDataCollectionOptions().genAI;return{...e,recordInputs:e?.recordInputs??t?.inputs??!1,recordOutputs:e?.recordOutputs??t?.outputs??!1}}function lO(e){if(e!==void 0)return e;let t=G();return t?!Zm(t)&&t.getOptions().streamGenAiSpans===!1:!0}function uO(e,t){return e?`${e}.${t}`:t}function dO(e,t,n,r,i){if(t!==void 0&&e.setAttributes({[nD]:t}),n!==void 0&&e.setAttributes({[rD]:n}),t!==void 0||n!==void 0||r!==void 0||i!==void 0){let a=(t??0)+(n??0)+(r??0)+(i??0);e.setAttributes({[iD]:a})}}function fO(e,t,n){if(!e.isRecording())return;let r={[dD]:!0};t.responseId&&(r[eD]=t.responseId),t.responseModel&&(r[$E]=t.responseModel),t.promptTokens!==void 0&&(r[nD]=t.promptTokens),t.completionTokens!==void 0&&(r[rD]=t.completionTokens),t.totalTokens===void 0?(t.promptTokens!==void 0||t.completionTokens!==void 0||t.cacheCreationInputTokens!==void 0||t.cacheReadInputTokens!==void 0)&&(r[iD]=(t.promptTokens??0)+(t.completionTokens??0)+(t.cacheCreationInputTokens??0)+(t.cacheReadInputTokens??0)):r[iD]=t.totalTokens,t.finishReasons.length&&(r[QE]=JSON.stringify(t.finishReasons)),n&&t.responseTexts.length&&(r[lD]=t.responseTexts.join(``)),n&&t.toolCalls.length&&(r[fD]=JSON.stringify(t.toolCalls)),e.setAttributes(r),e.end()}function pO(e){return typeof e==`string`?e:JSON.stringify(e)}function mO(e){if(typeof e==`string`)return sO(e);
486if(Array.isArray(e)){let t=oO(e);return JSON.stringify(t)}return JSON.stringify(e)}function hO(e){if(!Array.isArray(e))return{systemInstructions:void 0,filteredMessages:e};let t=e.findIndex(e=>e&&typeof e==`object`&&`role`in e&&e.role===`system`);if(t===-1)return{systemInstructions:void 0,filteredMessages:e};let n=e[t],r=typeof n.content==`string`?n.content:n.content===void 0?void 0:JSON.stringify(n.content);return r?{systemInstructions:JSON.stringify([{type:`text`,content:r}]),filteredMessages:[...e.slice(0,t),...e.slice(t+1)]}:{systemInstructions:void 0,filteredMessages:e}}async function gO(e,t,n){let r=e.catch(e=>{throw Y_(e,{mechanism:{handled:!1,type:n}}),e}),i=await t,a=await r;return a&&typeof a==`object`&&`data`in a?{...a,data:i}:i}function _O(e,t,n){return wf(e)?new Proxy(e,{get(e,r){let i=r in Promise.prototype||r===Symbol.toStringTag?t:e,a=Reflect.get(i,r);return r===`withResponse`&&typeof a==`function`?function(){return gO(a.call(e),t,n)}:typeof a==`function`?a.bind(i):a}}):t}var vO={"responses.create":{operation:`chat`},"chat.completions.create":{operation:`chat`},"embeddings.create":{operation:`embeddings`},"conversations.create":{operation:`chat`}},yO=[`response.created`,`response.in_progress`,`response.failed`,`response.completed`,`response.incomplete`,`response.queued`,`response.output_text.delta`,`response.output_item.added`,`response.function_call_arguments.delta`,`response.function_call_arguments.done`,`response.output_item.done`];function bO(e){return typeof e==`object`&&!!e&&`type`in e&&typeof e.type==`string`&&e.type.startsWith(`response.`)}function xO(e){return typeof e==`object`&&!!e&&`object`in e&&e.object===`chat.completion.chunk`}function SO(e,t,n){if(!t||typeof t!=`object`)return;let r=t,i={};if(typeof r.id==`string`&&(i[eD]=r.id),typeof r.model==`string`&&(i[$E]=r.model),r.object===`conversation`&&typeof r.id==`string`&&(i[hD]=r.id),r.usage&&typeof r.usage==`object`){let e=r.usage,t=e.prompt_tokens??e.input_tokens;typeof t==`number`&&(i[nD]=t);let n=e.completion_tokens??e.output_tokens;
486typeof n==`number`&&(i[rD]=n),typeof e.total_tokens==`number`&&(i[iD]=e.total_tokens)}if(Array.isArray(r.choices)){let e=r.choices,t=e.map(e=>e.finish_reason).filter(e=>typeof e==`string`);if(t.length>0&&(i[QE]=JSON.stringify(t)),n){let t=e.map(e=>e.message?.content||``);i[lD]=JSON.stringify(t);let n=e.map(e=>e.message?.tool_calls).filter(e=>Array.isArray(e)&&e.length>0).flat();n.length>0&&(i[fD]=JSON.stringify(n))}}if(typeof r.status==`string`&&(i[`gen_ai.response.finish_reasons`]||(i[QE]=JSON.stringify([r.status]))),n&&(typeof r.output_text==`string`&&!i[`gen_ai.response.text`]&&(i[lD]=r.output_text),Array.isArray(r.output)&&r.output.length>0&&!i[`gen_ai.response.tool_calls`])){let e=r.output.filter(e=>e?.type===`function_call`);e.length>0&&(i[fD]=JSON.stringify(e))}e.setAttributes(i)}function CO(e){if(`conversation`in e&&typeof e.conversation==`string`)return e.conversation;if(`previous_response_id`in e&&typeof e.previous_response_id==`string`)return e.previous_response_id}function wO(e){let t={[HE]:e.model??`unknown`};`temperature`in e&&(t[WE]=e.temperature),`top_p`in e&&(t[JE]=e.top_p),`frequency_penalty`in e&&(t[KE]=e.frequency_penalty),`presence_penalty`in e&&(t[qE]=e.presence_penalty),`stream`in e&&(t[UE]=e.stream),`encoding_format`in e&&(t[XE]=e.encoding_format),`dimensions`in e&&(t[ZE]=e.dimensions);let n=CO(e);return n&&(t[hD]=n),t}function TO(e,t){for(let n of e){let e=n.index;if(!(e===void 0||!n.function))if(!(e in t.chatCompletionToolCalls))t.chatCompletionToolCalls[e]={...n,function:{name:n.function.name,arguments:n.function.arguments||``}};else{let r=t.chatCompletionToolCalls[e];n.function.arguments&&r?.function&&(r.function.arguments+=n.function.arguments)}}}function EO(e,t,n){t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,e.usage&&(t.promptTokens=e.usage.prompt_tokens,t.completionTokens=e.usage.completion_tokens,t.totalTokens=e.usage.total_tokens);for(let r of e.choices??[])n&&(r.delta?.content&&t.responseTexts.push(r.delta.content),r.delta?.tool_calls&&TO(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}function DO(e,t,n,r){if(!(e&&typeof e==`object`)){t.eventTypes.push(`unknown:non-object`);return}if(e instanceof Error){r.setStatus({code:2,message:`internal_error`}),Y_(e,{mechanism:{handled:!1,type:`auto.ai.openai.stream-response`}});return}if(!(`type`in e))return;let i=e;if(!yO.includes(i.type)){t.eventTypes.push(i.type);return}if(n&&(i.type===`response.output_item.done`&&`item`in i&&t.responsesApiToolCalls.push(i.item),i.type===`response.output_text.delta`&&`delta`in i&&i.delta)){t.responseTexts.push(i.delta);return}if(`response`in i){let{response:e}=i;t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,e.usage&&(t.promptTokens=e.usage.input_tokens,t.completionTokens=e.usage.output_tokens,t.totalTokens=e.usage.total_tokens),e.status&&t.finishReasons.push(e.status),n&&e.output_text&&t.responseTexts.push(e.output_text)}}async function*OO(e,t,n){let r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:``,responseModel:``,promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(let i of e)xO(i)?EO(i,r,n):bO(i)&&DO(i,r,n,t),yield i}finally{let e=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];fO(t,{...r,toolCalls:e},n)}}function kO(e){let t=Array.isArray(e.tools)?e.tools:[],n=e.web_search_options&&typeof e.web_search_options==`object`?[{type:`web_search_options`,...e.web_search_options}]:[],r=[...t,...n];if(r.length!==0)try{return JSON.stringify(r)}catch{return}}function AO(e,t){let n={[VE]:`openai`,[aD]:t,[K]:`auto.ai.openai`};if(e.length>0&&typeof e[0]==`object`&&e[0]!==null){let t=e[0],r=kO(t);r&&(n[uD]=r),Object.assign(n,wO(t))}else n[HE]=`unknown`;return n}function jO(e,t,n,r){if(n===`embeddings`&&`input`in t){let n=t.input;if(n==null||typeof n==`string`&&n.length===0||Array.isArray(n)&&n.length===0)return;e.setAttribute(yD,typeof n==`string`?n:JSON.stringify(n));return}let i=`input`in t?t.input:`messages`in t?t.messages:void 0;if(!i||Array.isArray(i)&&i.length===0)return;let{systemInstructions:a,filteredMessages:o}=hO(i);a&&e.setAttribute(cD,a),e.setAttribute(sD,r?mO(o):pO(o)),Array.isArray(o)?e.setAttribute(oD,o.length):e.setAttribute(oD,1)}function MO(e,t,n,r,i){return function(...a){let o=n.operation||`unknown`,s=AO(a,o),c=s[`gen_ai.request.model`]||`unknown`,l=a[0],u=l&&typeof l==`object`&&l.stream===!0,d={name:`${o} ${c}`,op:`gen_ai.${o}`,attributes:s};if(u){let n,s=Gg(d,s=>(n=e.apply(r,a),i.recordInputs&&l&&jO(s,l,o,lO(i.enableTruncation)),(async()=>{try{return OO(await n,s,i.recordOutputs??!1)}catch(e){throw s.setStatus({code:2,message:`internal_error`}),Y_(e,{mechanism:{handled:!1,type:`auto.ai.openai.stream`,data:{function:t}}}),s.end(),e}})()));return _O(n,s,`auto.ai.openai`)}let f,p=Wg(d,n=>(f=e.apply(r,a),i.recordInputs&&l&&jO(n,l,o,lO(i.enableTruncation)),f.then(e=>(SO(n,e,i.recordOutputs),e),e=>{throw Y_(e,{mechanism:{handled:!1,type:`auto.ai.openai`,data:{function:t}}}),e}
486)));return _O(f,p,`auto.ai.openai`)}}function NO(e,t=``,n){return new Proxy(e,{get(e,r){let i=e[r],a=uO(t,String(r)),o=vO[a];return typeof i==`function`&&o?MO(i,a,o,e,n):typeof i==`function`?i.bind(e):i&&typeof i==`object`?NO(i,a,n):i}})}function PO(e,t){return NO(e,``,cO(t))}var FO={"messages.create":{operation:`chat`},"messages.stream":{operation:`chat`,streaming:!0},"messages.countTokens":{operation:`chat`},"models.get":{operation:`models`},"completions.create":{operation:`chat`},"models.retrieve":{operation:`models`},"beta.messages.create":{operation:`chat`}};function IO(e,t,n){if(Array.isArray(t)&&t.length===0)return;let{systemInstructions:r,filteredMessages:i}=hO(t);r&&e.setAttributes({[cD]:r});let a=Array.isArray(i)?i.length:1;e.setAttributes({[sD]:n?mO(i):pO(i),[oD]:a})}var LO={invalid_request_error:`invalid_argument`,authentication_error:`unauthenticated`,permission_error:`permission_denied`,not_found_error:`not_found`,request_too_large:`failed_precondition`,rate_limit_error:`resource_exhausted`,api_error:`internal_error`,overloaded_error:`unavailable`};function RO(e){return e&&LO[e]||`internal_error`}function zO(e,t){t.error&&(e.setStatus({code:2,message:RO(t.error.type)}),Y_(t.error,{mechanism:{handled:!1,type:`auto.ai.anthropic.anthropic_error`}}))}function BO(e){let{system:t,messages:n,input:r}=e,i=typeof t==`string`?[{role:`system`,content:e.system}]:[],a=(Array.isArray(r)?r:r==null?void 0:[r])??(Array.isArray(n)?n:n==null?[]:[n]);return[...i,...a]}function VO(e,t){return`type`in e&&typeof e.type==`string`&&e.type===`error`?(t.setStatus({code:2,message:RO(e.error?.type)}),Y_(e.error,{mechanism:{handled:!1,type:`auto.ai.anthropic.anthropic_error`}}),!0):!1}function HO(e,t){if(e.type===`message_delta`&&e.usage&&`output_tokens`in e.usage&&typeof e.usage.output_tokens==`number`&&(t.completionTokens=e.usage.output_tokens),e.message){let n=e.message;n.id&&(t.responseId=n.id),n.model&&(t.responseModel=n.model),n.stop_reason&&t.finishReasons.push(n.stop_reason),n.usage&&(typeof n.usage.input_tokens==`number`&&(t.promptTokens=n.usage.input_tokens),typeof n.usage.cache_creation_input_tokens==`number`&&(t.cacheCreationInputTokens=n.usage.cache_creation_input_tokens),typeof n.usage.cache_read_input_tokens==`number`&&(t.cacheReadInputTokens=n.usage.cache_read_input_tokens))}}function UO(e,t){e.type!==`content_block_start`||typeof e.index!=`number`||!e.content_block||(e.content_block.type===`tool_use`||e.content_block.type===`server_tool_use`)&&(t.activeToolBlocks[e.index]={id:e.content_block.id,name:e.content_block.name,inputJsonParts:[]})}function WO(e,t,n){if(!(e.type!==`content_block_delta`||!e.delta)){if(typeof e.index==`number`&&`partial_json`in e.delta&&typeof e.delta.partial_json==`string`){let n=t.activeToolBlocks[e.index];n&&n.inputJsonParts.push(e.delta.partial_json)}n&&typeof e.delta.text==`string`&&t.responseTexts.push(e.delta.text)}}function GO(e,t){if(e.type!==`content_block_stop`||typeof e.index!=`number`)return;let n=t.activeToolBlocks[e.index];if(!n)return;let r=n.inputJsonParts.join(``),i;try{i=r?JSON.parse(r):{}}catch{i={__unparsed:r}}t.toolCalls.push({type:`tool_use`,id:n.id,name:n.name,input:i}),delete t.activeToolBlocks[e.index]}function KO(e,t,n,r){e&&typeof e==`object`&&(VO(e,r)||(HO(e,t),UO(e,t),WO(e,t,n),GO(e,t)))}async function*qO(e,t,n){let r={responseTexts:[],finishReasons:[],responseId:``,responseModel:``,promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{for await(let i of e)KO(i,r,n,t),yield i}finally{fO(t,r,n)}}function JO(e,t,n){let r={responseTexts:[],finishReasons:[],responseId:``,responseModel:``,promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return e.on(`streamEvent`,e=>{KO(e,r,n,t)}),e.on(`message`,()=>{fO(t,r,n)}),e.on(`error`,e=>{Y_(e,{mechanism:{handled:!1,type:`auto.ai.anthropic.stream_error`}}),t.isRecording()&&(t.setStatus({code:2,message:`internal_error`}),t.end())}),e}function YO(e,t,n){let r={[VE]:`anthropic`,[aD]:n,[K]:`auto.ai.anthropic`};if(e.length>0&&typeof e[0]==`object`&&e[0]!==null){let t=e[0];t.tools&&Array.isArray(t.tools)&&(r[uD]=JSON.stringify(t.tools)),r[HE]=t.model??`unknown`,`temperature`in t&&(r[WE]=t.temperature),`top_p`in t&&(r[JE]=t.top_p),`stream`in t&&(r[UE]=t.stream),`top_k`in t&&(r[YE]=t.top_k),`frequency_penalty`in t&&(r[KE]=t.frequency_penalty),`max_tokens`in t&&(r[GE]=t.max_tokens)}else t===`models.retrieve`||t===`models.get`?r[HE]=e[0]:r[HE]=`unknown`;return r}function XO(e,t,n){IO(e,BO(t),n),`prompt`in t&&e.setAttributes({[BE]:JSON.stringify(t.prompt)})}function ZO(e,t){if(`content`in t&&Array.isArray(t.content)){e.setAttributes({[lD]:t.content.map(e=>e.text).filter(e=>!!e).join(``)});let n=[];for(let e of t.content)(e.type===`tool_use`||e.type===`server_tool_use`)&&n.push(e);n.length>0&&e.setAttributes({[fD]:JSON.stringify(n)})}`completion`in t&&e.setAttributes({[lD]:t.completion}),`input_tokens`in t&&e.setAttributes({[lD]:JSON.stringify(t.input_tokens)})}function QO(e,t){`id`in t&&`model`in t&&(e.setAttributes({[eD]:t.id,[$E]:t.model}),`usage`in t&&t.usage&&dO(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function $O(e,t,n){if(!(!t||typeof t!=`object`)){if(`type`in t&&t.type===`error`){zO(e,t);return}n&&ZO(e,t),QO(e,t)}}function ek(e,t,n){throw Y_(e,{mechanism:{handled:!1,type:`auto.ai.anthropic`,data:{function:n}}}),t.isRecording()&&(t.setStatus({code:2,message:`internal_error`}),t.end()),e}function tk(e,t,n,r,i,a,o,s,c,l,u){let d={name:`${a} ${i[`gen_ai.request.model`]??`unknown`}`,op:`gen_ai.${a}`,attributes:i};if(l&&!u){let t,i=Gg(d,i=>(t=e.apply(n,r),c.recordInputs&&s&&XO(i,s,lO(c.enableTruncation)),(async()=>{try{return qO(await t,i,c.recordOutputs??!1)}catch(e){return ek(e,i,o)}})()));return _O(t,i,`auto.ai.anthropic`)}else return Gg(d,e=>{try{return c.recordInputs&&s&&XO(e,s,lO(c.enableTruncation)),JO(t.apply(n,r),e,c.recordOutputs??!1)}catch(t){return ek(t,e,o)}})}function nk(e,t,n,r,i){return new Proxy(e,{apply(a,o,s){let c=n.operation||`unknown`,l=YO(s,t,c),u=l[`gen_ai.request.model`]??`unknown`,d=typeof s[0]==`object`?s[0]:void 0,f=!!d?.stream,p=n.streaming===!0;if(f||p)return tk(e,a,r,s,l,c,t,d,i,f,p);let m,h=Wg({name:`${c} ${u}`,op:`gen_ai.${c}`,attributes:l},e=>(m=a.apply(r,s),i.recordInputs&&d&&XO(e,d,lO(i.enableTruncation)),m.then(t=>($O(e,t,i.recordOutputs),t),e=>{throw Y_(e,{mechanism:{handled:!1,type:`auto.ai.anthropic`,data:{function:t}}}),e}
486)));return _O(m,h,`auto.ai.anthropic`)}})}function rk(e,t=``,n){return new Proxy(e,{get(e,r){let i=e[r],a=uO(t,String(r)),o=FO[a];return typeof i==`function`&&o?nk(i,a,o,e,n):typeof i==`function`?i.bind(e):i&&typeof i==`object`?rk(i,a,n):i}})}function ik(e,t){return rk(e,``,cO(t))}var ak={"models.generateContent":{operation:`generate_content`},"models.generateContentStream":{operation:`generate_content`,streaming:!0},"models.embedContent":{operation:`embeddings`},"chats.create":{proxyResultPath:`chat`},"chat.sendMessage":{operation:`chat`},"chat.sendMessageStream":{operation:`chat`,streaming:!0}},ok=`google_genai`;function sk(e,t){let n=e?.promptFeedback;if(n?.blockReason){let e=n.blockReasonMessage??n.blockReason;return t.setStatus({code:2,message:`internal_error`}),Y_(`Content blocked: ${e}`,{mechanism:{handled:!1,type:`auto.ai.google_genai`}}),!0}return!1}function ck(e,t){typeof e.responseId==`string`&&(t.responseId=e.responseId),typeof e.modelVersion==`string`&&(t.responseModel=e.modelVersion);let n=e.usageMetadata;n&&(typeof n.promptTokenCount==`number`&&(t.promptTokens=n.promptTokenCount),typeof n.candidatesTokenCount==`number`&&(t.completionTokens=n.candidatesTokenCount),typeof n.totalTokenCount==`number`&&(t.totalTokens=n.totalTokenCount))}function lk(e,t,n){Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls);for(let r of e.candidates??[]){r?.finishReason&&!t.finishReasons.includes(r.finishReason)&&t.finishReasons.push(r.finishReason);for(let e of r?.content?.parts??[])n&&e.text&&t.responseTexts.push(e.text),e.functionCall&&t.toolCalls.push({type:`function`,id:e.functionCall.id,name:e.functionCall.name,arguments:e.functionCall.args})}}function uk(e,t,n,r){!e||sk(e,r)||(ck(e,t),lk(e,t,n))}async function*dk(e,t,n){let r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(let i of e)uk(i,r,n,t),yield i}finally{fO(t,r,n)}}function fk(e,t=`user`){return typeof e==`string`?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(e=>fk(e,t)):typeof e!=`object`||!e?[]:`role`in e&&typeof e.role==`string`?[e]:`parts`in e?[{...e,role:t}]:[{role:t,content:e}]}function pk(e,t){if(`model`in e&&typeof e.model==`string`)return e.model;if(t&&typeof t==`object`){let e=t;if(`model`in e&&typeof e.model==`string`)return e.model;if(`modelVersion`in e&&typeof e.modelVersion==`string`)return e.modelVersion}return`unknown`}function mk(e){let t={};return`temperature`in e&&typeof e.temperature==`number`&&(t[WE]=e.temperature),`topP`in e&&typeof e.topP==`number`&&(t[JE]=e.topP),`topK`in e&&typeof e.topK==`number`&&(t[YE]=e.topK),`maxOutputTokens`in e&&typeof e.maxOutputTokens==`number`&&(t[GE]=e.maxOutputTokens),`frequencyPenalty`in e&&typeof e.frequencyPenalty==`number`&&(t[KE]=e.frequencyPenalty),`presencePenalty`in e&&typeof e.presencePenalty==`number`&&(t[qE]=e.presencePenalty),t}function hk(e,t,n){let r={[VE]:ok,[aD]:e,[K]:`auto.ai.google_genai`};if(t){if(r[HE]=pk(t,n),`config`in t&&typeof t.config==`object`&&t.config){let e=t.config;if(Object.assign(r,mk(e)),`tools`in e&&Array.isArray(e.tools)){let t=e.tools.flatMap(e=>e.functionDeclarations);r[uD]=JSON.stringify(t)}}}else r[HE]=pk({},n);return r}function gk(e,t,n,r){if(n){let n=t.contents;n!=null&&e.setAttribute(yD,typeof n==`string`?n:JSON.stringify(n));return}let i=[];if(`config`in t&&t.config&&typeof t.config==`object`&&`systemInstruction`in t.config&&t.config.systemInstruction&&i.push(...fk(t.config.systemInstruction,`system`)),`history`in t&&i.push(...fk(t.history,`user`)),`contents`in t&&i.push(...fk(t.contents,`user`)),`message`in t&&i.push(...fk(t.message,`user`)),Array.isArray(i)&&i.length){let{systemInstructions:t,filteredMessages:n}=hO(i);t&&e.setAttribute(cD,t);let a=Array.isArray(n)?n.length:0;e.setAttributes({[oD]:a,[sD]:r?mO(n):pO(n)})}}function _k(e,t,n){if(!(!t||typeof t!=`object`)){if(t.modelVersion&&e.setAttribute($E,t.modelVersion),t.usageMetadata&&typeof t.usageMetadata==`object`){let n=t.usageMetadata;typeof n.promptTokenCount==`number`&&e.setAttributes({[nD]:n.promptTokenCount}),typeof n.candidatesTokenCount==`number`&&e.setAttributes({[rD]:n.candidatesTokenCount}),typeof n.totalTokenCount==`number`&&e.setAttributes({[iD]:n.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){let n=t.candidates.map(e=>e.content?.parts&&Array.isArray(e.content.parts)?e.content.parts.map(e=>typeof e.text==`string`?e.text:``).filter(e=>e.length>0).join(``):``).filter(e=>e.length>0);n.length>0&&e.setAttributes({[lD]:n.join(``)})}if(n&&t.functionCalls){let n=t.functionCalls;Array.isArray(n)&&n.length>0&&e.setAttributes({[fD]:JSON.stringify(n)})}}}function vk(e,t,n,r,i){let a=n.operation===`embeddings`;return new Proxy(e,{apply(e,o,s){let c=n.operation||`unknown`,l=s[0],u=hk(c,l,r),d=u[`gen_ai.request.model`]??`unknown`;return n.streaming?Gg({name:`${c} ${d}`,op:`gen_ai.${c}`,attributes:u},async n=>{try{return i.recordInputs&&l&&gk(n,l,a,lO(i.enableTruncation)),dk(await e.apply(r,s),n,!!i.recordOutputs)}catch(e){throw n.setStatus({code:2,message:`internal_error`}),Y_(e,{mechanism:{handled:!1,type:`auto.ai.google_genai`,data:{function:t}}}),n.end(),e}}):Wg({name:`${c} ${d}`,op:`gen_ai.${c}`,attributes:u},n=>(i.recordInputs&&l&&gk(n,l,a,lO(i.enableTruncation)),Wm(()=>e.apply(r,s),e=>{Y_(e,{mechanism:{handled:!1,type:`auto.ai.google_genai`,data:{function:t}}})},()=>{},e=>{a||_k(n,e,i.recordOutputs)})))}})}
486function yk(e,t=``,n){return new Proxy(e,{get:(e,r,i)=>{let a=Reflect.get(e,r,i),o=uO(t,String(r)),s=ak[o];if(typeof a==`function`&&s){let t=s.operation?vk(a,o,s,e,n):a.bind(e);return s.proxyResultPath?function(...e){let r=t(...e);return r&&typeof r==`object`?yk(r,s.proxyResultPath,n):r}:t}return typeof a==`function`?a.bind(e):a&&typeof a==`object`?yk(a,o,n):a}})}function bk(e,t){return yk(e,``,cO(t))}var xk=`auto.ai.langchain`,Sk={human:`user`,ai:`assistant`,assistant:`assistant`,system:`system`,function:`function`,tool:`tool`},Ck=(e,t,n)=>{n!=null&&(e[t]=n)},wk=(e,t,n)=>{let r=Number(n);Number.isNaN(r)||(e[t]=r)};function Tk(e){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function Ek(e){if(Array.isArray(e))try{let t=e.map(e=>e&&typeof e==`object`&&OD(e)?WD(e):e);return JSON.stringify(t)}catch{return String(e)}return Tk(e)}function Dk(e){let t=e.toLowerCase();return Sk[t]??t}function Ok(e){return e.includes(`System`)?`system`:e.includes(`Human`)?`user`:e.includes(`AI`)||e.includes(`Assistant`)?`assistant`:e.includes(`Function`)?`function`:e.includes(`Tool`)?`tool`:`user`}function kk(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function Ak(e){return e.map(e=>{let t=e._getType;if(typeof t==`function`)return{role:Dk(t.call(e)),content:Ek(e.content)};if(e.lc===1&&e.kwargs){let t=e.id,n=Array.isArray(t)&&t.length>0?t[t.length-1]:``;return{role:Dk(typeof n==`string`?Ok(n):`user`),content:Ek(e.kwargs?.content)}}if(e.type)return{role:Dk(String(e.type).toLowerCase()),content:Ek(e.content)};if(e.role)return{role:Dk(String(e.role)),content:Ek(e.content)};let n=e.constructor?.name;return n&&n!==`Object`?{role:Dk(Ok(n)),content:Ek(e.content)}:{role:`user`,content:Ek(e.content)}})}function jk(e,t,n){let r={},i=`kwargs`in e?e.kwargs:void 0;wk(r,WE,t?.temperature??n?.ls_temperature??i?.temperature),wk(r,GE,t?.max_tokens??n?.ls_max_tokens??i?.max_tokens),wk(r,JE,t?.top_p??i?.top_p);let a=t?.frequency_penalty;wk(r,KE,a);let o=t?.presence_penalty;return wk(r,qE,o),t&&`stream`in t&&Ck(r,UE,!!t.stream),r}function Mk(e,t,n,r,i){return{[VE]:Tk(e??`langchain`),[aD]:`chat`,[HE]:Tk(t),[K]:xk,...jk(n,r,i)}}function Nk(e,t,n,r,i,a){let o=a?.ls_provider,s=Mk(o,i?.model??a?.ls_model_name??`unknown`,e,i,a);if(n&&Array.isArray(t)&&t.length>0){Ck(s,oD,t.length);let e=t.map(e=>({role:`user`,content:e}));Ck(s,sD,r?mO(e):pO(e))}return s}function Pk(e,t,n,r,i,a){let o=Mk(a?.ls_provider??e.id?.[2],i?.model??a?.ls_model_name??`unknown`,e,i,a);if(n&&Array.isArray(t)&&t.length>0){let{systemInstructions:e,filteredMessages:n}=hO(Ak(t.flat()));e&&Ck(o,cD,e),Ck(o,oD,Array.isArray(n)?n.length:0),Ck(o,sD,r?mO(n):pO(n))}return o}function Fk(e,t){let n=[],r=e.flat();for(let e of r){let t=e.message?.tool_calls;if(Array.isArray(t)&&t.length>0)n.push(...t);else{let t=e.message?.content;if(Array.isArray(t))for(let e of t){let t=e;t.type===`tool_use`&&n.push(t)}}}n.length>0&&Ck(t,fD,Tk(n))}function Ik(e,t){if(!e)return;let n=e.tokenUsage,r=e.usage;if(n)wk(t,nD,n.promptTokens),wk(t,rD,n.completionTokens),wk(t,iD,n.totalTokens);else if(r){wk(t,nD,r.input_tokens),wk(t,rD,r.output_tokens);let e=Number(r.input_tokens),n=Number(r.output_tokens),i=(Number.isNaN(e)?0:e)+(Number.isNaN(n)?0:n);i>0&&wk(t,iD,i),r.cache_creation_input_tokens!==void 0&&wk(t,gD,r.cache_creation_input_tokens),r.cache_read_input_tokens!==void 0&&wk(t,_D,r.cache_read_input_tokens)}}function Lk(e,t){if(!e)return;let n={};if(Array.isArray(e.generations)){let r=e.generations.flat().map(e=>e.generationInfo?.finish_reason?e.generationInfo.finish_reason:e.generation_info?.finish_reason?e.generation_info.finish_reason:null).filter(e=>typeof e==`string`);if(r.length>0&&Ck(n,QE,Tk(r)),Fk(e.generations,n),t){let t=e.generations.flat().map(e=>e.text??e.message?.content).filter(e=>typeof e==`string`);t.length>0&&Ck(n,lD,Tk(t))}}Ik(e.llmOutput,n);let r=e.llmOutput,i=e.generations?.[0]?.[0]?.message,a=r?.model_name??r?.model??i?.response_metadata?.model_name;a&&Ck(n,$E,a);let o=r?.id??i?.id;o&&Ck(n,eD,o);let s=r?.stop_reason??i?.response_metadata?.finish_reason;return s&&Ck(n,tD,Tk(s)),n}function Rk(e){let t={},n=e?.lc_agent_name;return typeof n==`string`&&(t[pD]=n),t}function zk(e){let t=e?.invocation_params?.tools??e?.options?.tools;if(!Array.isArray(t)||t.length===0)return;let n=t.map(e=>{let t=e.function;return{type:`function`,name:e.name??t?.name??``,description:e.description??t?.de
486scription}});return JSON.stringify(n)}function Bk(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.addHandler==`function`&&typeof t.copy==`function`}function Vk(e){return typeof e==`object`&&e?.name===`SentryCallbackHandler`}function Hk(e){return e.some(Vk)}function Uk(e,t){if(!e)return[t];if(Bk(e)){if(Hk(e.handlers??[]))return e;let n=e.copy();return n.addHandler(t,!0),n}let n=Array.isArray(e)?e:[e];return Hk(n)?e:[...n,t]}function Wk(e={}){let{recordInputs:t,recordOutputs:n}=cO(e),r=lO(e.enableTruncation),i=new Map,a=e=>{let t=i.get(e);t?.isRecording()&&(t.end(),i.delete(e))},o={lc_serializable:!1,lc_namespace:[`langchain_core`,`callbacks`,`sentry`],lc_secrets:void 0,lc_attributes:void 0,lc_aliases:void 0,lc_serializable_keys:void 0,lc_id:[`langchain_core`,`callbacks`,`sentry`],lc_kwargs:{},name:`SentryCallbackHandler`,ignoreLLM:!1,ignoreChain:!1,ignoreAgent:!1,ignoreRetriever:!1,ignoreCustomEvent:!1,raiseError:!1,awaitHandlers:!0,handleLLMStart(e,n,a,o,s,c,l,u){let d=Nk(e,n,t,r,kk(c),l),f=d[HE],p=d[aD];Gg({name:`${p} ${f}`,op:`gen_ai.chat`,attributes:{...Rk(l),...d,[vm]:`gen_ai.chat`}},e=>(i.set(a,e),e))},handleChatModelStart(e,n,a,o,s,c,l,u){let d=Pk(e,n,t,r,kk(c),l),f=zk(s);f&&(d[uD]=f);let p=d[HE],m=d[aD];Gg({name:`${m} ${p}`,op:`gen_ai.chat`,attributes:{...Rk(l),...d,[vm]:`gen_ai.chat`}},e=>(i.set(a,e),e))},handleLLMEnd(e,t,r,o,s){let c=i.get(t);if(c?.isRecording()){let r=Lk(e,n);r&&c.setAttributes(r),a(t)}},handleLLMError(e,t){let n=i.get(t);n?.isRecording()&&(n.setStatus({code:2,message:`internal_error`}),a(t)),Y_(e,{mechanism:{handled:!1,type:`${xk}.llm_error_handler`}})},handleChainStart(e,n,r,a,o,s,c,l){if(s?.__sentry_langgraph__)return;let u=l||e.name||`unknown_chain`,d={[K]:`auto.ai.langchain`,"langchain.chain.name":u};t&&(d[`langchain.chain.inputs`]=JSON.stringify(n)),Gg({name:`chain ${u}`,op:`gen_ai.invoke_agent`,attributes:{...d,[vm]:`gen_ai.invoke_agent`}},e=>(i.set(r,e),e))},handleChainEnd(e,t){let r=i.get(t);r?.isRecording()&&(n&&r.setAttributes({"langchain.chain.outputs":JSON.stringify(e)}),a(t))},handleChainError(e,t){let n=i.get(t);n?.isRecording()&&(n.setStatus({code:2,message:`internal_error`}),a(t)),Y_(e,{mechanism:{handled:!1,type:`${xk}.chain_error_handler`}})},handleToolStart(e,n,r,a,o,s,c){if(s?.__sentry_langgraph__)return;let l=c||e.name||`unknown_tool`,u={...Rk(s),[K]:xk,[aD]:`execute_tool`,[SD]:l};t&&(u[TD]=n),Gg({name:`execute_tool ${l}`,op:`gen_ai.execute_tool`,attributes:{...u,[vm]:`gen_ai.execute_tool`}},e=>(i.set(r,e),e))},handleToolEnd(e,t){let r=i.get(t);if(r?.isRecording()){if(n){let t=e,n=t&&typeof t==`object`&&`content`in t?t.content:e;r.setAttributes({[ED]:typeof n==`string`?n:JSON.stringify(n)})}a(t)}},handleToolError(e,t){let n=i.get(t);n?.isRecording()&&(n.setStatus({code:2,message:`internal_error`}),a(t)),Y_(e,{mechanism:{handled:!1,type:`${xk}.tool_error_handler`}})},copy(){return o},toJSON(){return{lc:1,type:`not_implemented`,id:o.lc_id}},toJSONNotImplemented(){return{lc:1,type:`not_implemented`,id:o.lc_id}}};return o}var Gk=`auto.ai.langgraph`;function Kk(e){let t=e[0];if(typeof t!=`object`||!t||!(`llm`in t)||!t.llm||typeof t.llm!=`object`)return null;let n=t.llm;return typeof n.modelName!=`string`&&typeof n.model!=`string`?null:n}function qk(e){let t=e[0];return typeof t==`object`&&t&&`name`in t&&typeof t.name==`string`?t.name:null}function Jk(e,t,n){let r=`__sentry_tool_wrapped__`;for(let i of e){if(!i||typeof i!=`object`)continue;let e=i,a=e.invoke;if(typeof a!=`function`||Object.prototype.hasOwnProperty.call(e,r))continue;let o=typeof e.name==`string`?e.name:`unknown_tool`,s=typeof e.description==`string`?e.description:void 0;e.invoke=new Proxy(a,{apply(e,r,i){let a={[K]:Gk,[vm]:xD,[aD]:`execute_tool`,[SD]:o,[wD]:`function`},c=i[1]?.metadata?.lc_agent_name??n;typeof c==`string`&&(a[pD]=c),s&&(a[DD]=s);let l=i[0];if(typeof l==`object`&&l&&(`id`in l&&typeof l.id==`string`&&(a[CD]=l.id),t.recordInputs)){let e=`args`in l&&typeof l.args==`object`?l.args:l;try{a[TD]=JSON.stringify(e)}catch{}}return Wg({op:xD,name:`execute_tool ${o}`,attributes:a},async n=>
486{try{let a=await Reflect.apply(e,r,i);if(t.recordOutputs)try{let e=a,t=e&&typeof e==`object`&&`content`in e?e.content:a;n.setAttribute(ED,typeof t==`string`?t:JSON.stringify(t))}catch{}return a}catch(e){throw n.setStatus({code:2,message:`internal_error`}),Y_(e,{mechanism:{handled:!1,type:`auto.ai.langgraph.error`}}),e}})}}),Object.defineProperty(e,r,{value:!0,enumerable:!1})}return e}function Yk(e){if(!e||e.length===0)return null;let t=[];for(let n of e)if(n&&typeof n==`object`){let e=n.tool_calls;e&&Array.isArray(e)&&t.push(...e)}return t.length>0?t:null}function Xk(e){let t=e,n=0,r=0,i=0;if(t.usage_metadata&&typeof t.usage_metadata==`object`){let e=t.usage_metadata;return typeof e.input_tokens==`number`&&(n=e.input_tokens),typeof e.output_tokens==`number`&&(r=e.output_tokens),typeof e.total_tokens==`number`&&(i=e.total_tokens),{inputTokens:n,outputTokens:r,totalTokens:i}}if(t.response_metadata&&typeof t.response_metadata==`object`){let e=t.response_metadata;if(e.tokenUsage&&typeof e.tokenUsage==`object`){let t=e.tokenUsage;typeof t.promptTokens==`number`&&(n=t.promptTokens),typeof t.completionTokens==`number`&&(r=t.completionTokens),typeof t.totalTokens==`number`&&(i=t.totalTokens)}}return{inputTokens:n,outputTokens:r,totalTokens:i}}function Zk(e,t){let n=t;if(n.response_metadata&&typeof n.response_metadata==`object`){let t=n.response_metadata;t.model_name&&typeof t.model_name==`string`&&e.setAttribute($E,t.model_name),t.finish_reason&&typeof t.finish_reason==`string`&&e.setAttribute(QE,[t.finish_reason])}}function Qk(e){if(!e.builder?.nodes?.tools?.runnable?.tools)return null;let t=e.builder?.nodes?.tools?.runnable?.tools;return!t||!Array.isArray(t)||t.length===0?null:t.map(e=>({name:e.lc_kwargs?.name,description:e.lc_kwargs?.description,schema:e.lc_kwargs?.schema}))}function $k(e,t,n){let r=n?.messages;if(!r||!Array.isArray(r))return;let i=t?.length??0,a=r.length>i?r.slice(i):[];if(a.length===0)return;let o=Yk(a);o&&e.setAttribute(fD,JSON.stringify(o));let s=Ak(a);e.setAttribute(lD,JSON.stringify(s));let c=0,l=0,u=0;for(let t of a){let n=Xk(t);c+=n.inputTokens,l+=n.outputTokens,u+=n.totalTokens,Zk(e,t)}c>0&&e.setAttribute(nD,c),l>0&&e.setAttribute(rD,l),u>0&&e.setAttribute(iD,u)}var eA=!1,tA=`__sentry_patched__`;function nA(e,t){if(Object.prototype.hasOwnProperty.call(e,tA))return e;let n=Wk(t),r=new Proxy(e,{apply(e,r,i){return eA?Reflect.apply(e,r,i
486):Wg({op:`gen_ai.create_agent`,name:`create_agent`,attributes:{[K]:Gk,[vm]:`gen_ai.create_agent`,[aD]:`create_agent`}},a=>{try{let o=Reflect.apply(e,r,i),s=i.length>0?i[0]:{};s?.name&&typeof s.name==`string`&&(a.setAttribute(pD,s.name),a.updateName(`create_agent ${s.name}`));let c=o.invoke;return c&&typeof c==`function`&&(o.invoke=rA(c.bind(o),o,s,t,void 0,n)),o}catch(e){throw a.setStatus({code:2,message:`internal_error`}),Y_(e,{mechanism:{handled:!1,type:`auto.ai.langgraph.error`}}),e}})}});return Object.defineProperty(r,tA,{value:!0,enumerable:!1}),r}function rA(e,t,n,r,i,a){return new Proxy(e,{apply(e,o,s){let c=i?.modelName??i?.model;return Wg({op:`gen_ai.invoke_agent`,name:`invoke_agent`,attributes:{[K]:Gk,[vm]:vD,[aD]:`invoke_agent`}},async i=>{try{let l=n?.name;l&&typeof l==`string`&&(i.setAttribute(mD,l),i.setAttribute(pD,l),i.updateName(`invoke_agent ${l}`)),c&&i.setAttribute(HE,c);let u=(s.length>1?s[1]:void 0)?.configurable?.thread_id;if(u&&typeof u==`string`&&i.setAttribute(hD,u),a){let e=s[1]??{};s[1]=e,e.metadata={...e.metadata??{},__sentry_langgraph__:!0,...typeof l==`string`?{lc_agent_name:l}:{}},e.callbacks=Uk(e.callbacks,a)}let d=Qk(t);d&&i.setAttribute(uD,JSON.stringify(d));let f=r.recordInputs,p=r.recordOutputs,m=s.length>0?s[0]?.messages??[]:[];if(m&&f){let{systemInstructions:e,filteredMessages:t}=hO(Ak(m));e&&i.setAttribute(cD,e);let n=lO(r.enableTruncation),a=Array.isArray(t)?t.length:0;i.setAttributes({[sD]:n?mO(t):pO(t),[oD]:a})}let h=await Reflect.apply(e,o,s);return p&&$k(i,m??null,h),h}catch(e){throw i.setStatus({code:2,message:`internal_error`}),Y_(e,{mechanism:{handled:!1,type:`auto.ai.langgraph.error`}}),e}})}})}function iA(e,t){if(Object.prototype.hasOwnProperty.call(e,tA))return e;let n=cO(t),r=Wk(n),i=new Proxy(e,{apply(e,t,i){let a=Kk(i),o=qk(i),s=i[0];s&&Array.isArray(s.tools)&&s.tools.length>0&&Jk(s.tools,n,o??void 0),eA=!0;let c;try{c=Reflect.apply(e,t,i)}finally{eA=!1}let l=c.invoke;if(l&&typeof l==`function`){let e={};o&&(e.name=o),c.invoke=rA(l.bind(c),c,e,n,a,r)}return c}});return Object.defineProperty(i,tA,{value:!0,enumerable:!1}),i}function aA(e,t){return e.compile=nA(e.compile,cO(t)),e}function oA(e,t,n){let r=n.getOptions(),i=n.getDsn(),a=r.tunnel,o=kg(r._metadata),s={sent_at:new Date(Hf()).toISOString(),...sA(t)&&{trace:t},...o&&{sdk:o},...!!a&&i&&{dsn:hh(i)}},c=n.getDataCollectionOptions().userInfo?`auto`:`never`;return hg(s,[[{type:`span`,item_count:e.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,...Jv()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}},items:e}]])}function sA(e){return!!e.trace_id&&!!e.public_key}function cA(e){let t=156;if(t+=e.name.length*2,t+=nh(e.attributes),e.links&&e.links.length>0){let n=e.links[0]?.attributes,r=100+(n?nh(n):0);t+=r*e.links.length}return t}var lA=1e3,uA=5e6,dA=class{constructor(e,t){this._traceBuckets=new Map,this._client=e;let{maxSpanLimit:n,flushInterval:r,maxTraceWeightInBytes:i}=t??{};this._maxSpanLimit=n&&n>0&&n<=lA?n:lA,this._flushInterval=r&&r>0?r:5e3,this._maxTraceWeight=i&&i>0?i:uA,this._client.on(`flush`,()=>{this.drain()}),this._client.on(`close`,()=>{this._traceBuckets.forEach(e=>{clearTimeout(e.timeout)}),this._traceBuckets.clear()})}add(e){let t=e.trace_id,n=this._traceBuckets.get(t);n||(n={spans:new Set,size:0,timeout:xC(setTimeout(()=>{this.flush(t)},this._flushInterval))},this._traceBuckets.set(t,n)),n.spans.add(e),n.size+=cA(e),(n.spans.size>=this._maxSpanLimit||n.size>=this._maxTraceWeight)&&this.flush(t)}drain(){this._traceBuckets.size&&this._traceBuckets.forEach((e,t)=>{this.flush(t)})}flush(e){let t=this._traceBuckets.get(e);if(!t)return;if(!t.spans.size){this._removeTrace(e);return}let n=Array.from(t.spans),r=n[0]?._segmentSpan;if(!r){this._removeTrace(e);return}let i=ug(r),a=oA(n.map(e=>{let{_segmentSpan:t,...n}=e;return n}),i,this._client);this._client.sendEnvelope(a).then(null,e=>{}),this._removeTrace(e)}_removeTrace(e){let t=this._traceBuckets.get(e);t&&clearTimeout(t.timeout),this._traceBuckets.delete(e)}};function fA(e,t,n,r,i,a){if(!i.exception?.values||!a||!Tf(a.originalException,Error))return;let o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=pA(e,t,r,a.originalException,n,i.exception.values,o,0))}
486function pA(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(Tf(r[i],Error)){hA(o,s,r);let a=e(t,r[i]),l=c.length;gA(a,i,l,s),c=pA(e,t,n,r[i],i,[a,...c],a,l)}return mA(r)&&r.errors.forEach((a,l)=>{if(Tf(a,Error)){hA(o,s,r);let u=e(t,a),d=c.length;gA(u,`errors[${l}]`,d,s),c=pA(e,t,n,a,i,[u,...c],u,d)}}),c}function mA(e){return Array.isArray(e.errors)}function hA(e,t,n){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...mA(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function gA(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function _A(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}function vA(e){return pf(e)&&`__sentry_fetch_url_host__`in e&&typeof e.__sentry_fetch_url_host__==`string`}function yA(e){return vA(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function bA(e){let t=e.constructor?.name??``;return t.includes(`OpenAI`)?`openai`:t.includes(`Google`)?`google_genai`:t.includes(`Mistral`)?`mistralai`:t.includes(`Vertex`)?`google_vertexai`:t.includes(`Bedrock`)?`aws_bedrock`:t.includes(`Ollama`)?`ollama`:t.includes(`Cloudflare`)?`cloudflare`:t.includes(`Cohere`)?`cohere`:`langchain`}function xA(e){let t=e??{},n={[K]:xk,[vm]:bD,[aD]:`embeddings`,[HE]:t.model??`unknown`};return n[VE]=bA(t),`dimensions`in t&&(n[ZE]=t.dimensions),`encodingFormat`in t&&(n[XE]=t.encodingFormat),n}function SA(e,t={}){let{recordInputs:n}=cO(t);return new Proxy(e,{apply(e,t,r){let i=xA(t),a=i[`gen_ai.request.model`]||`unknown`;if(n){let e=r[0];e!=null&&(i[yD]=typeof e==`string`?e:JSON.stringify(e))}return Wg({name:`embeddings ${a}`,op:bD,attributes:i},()=>Reflect.apply(e,t,r).then(void 0,e=>{throw Y_(e,{mechanism:{handled:!1,type:`auto.ai.langchain`}}),e}))}})}function CA(e,t){let n=e;return typeof n.embedQuery==`function`&&(n.embedQuery=SA(n.embedQuery,t)),typeof n.embedDocuments==`function`&&(n.embedDocuments=SA(n.embedDocuments,t)),e}var X=U,wA=0;function TA(){return wA>0}function EA(){wA++,setTimeout(()=>{wA--})}function DA(e,t={}){function n(e){return typeof e==`function`}if(!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,`__sentry_wrapped__`)){let t=e.__sentry_wrapped__;return typeof t==`function`?t:e}if(Af(e))return e}catch{return e}let r=function(...n){U._sentryWrappedDepth=(U._sentryWrappedDepth||0)+1;try{let r=n.map(e=>DA(e,t));return e.apply(this,r)}catch(e){throw EA(),fm(r=>{r.addEventProcessor(e=>(t.mechanism&&(Ep(e,void 0,void 0),Dp(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),Y_(e)}),e}finally{U._sentryWrappedDepth=(U._sentryWrappedDepth||0)-1}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}kf(r,e),Of(e,`__sentry_wrapped__`,r);try{Object.getOwnPropertyDescriptor(r,`name`).configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function OA(){let e=zy(),{referrer:t}=X.document||{},{userAgent:n}=X.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}var kA=[`replayIntegration`,`replayCanvasIntegration`,`feedbackIntegration`,`feedbackModalIntegration`,`feedbackScreenshotIntegration`,`captureConsoleIntegration`,`contextLinesIntegration`,`linkedErrorsIntegration`,`dedupeIntegration`,`extraErrorDataIntegration`,`graphqlClientIntegration`,`httpClientIntegration`,`reportingObserverIntegration`,`rewriteFramesIntegration`,`browserProfilingIntegration`,`moduleMetadataIntegration`,`instrumentAnthropicAiClient`,`instrumentOpenAiClient`,`instrumentGoogleGenAIClient`,`instrumentLangGraph`,`createLangChainCallbackHandler`,`instrumentLangChainEmbeddings`],AA={replayCanvasIntegration:`replay-canvas`,feedbackModalIntegration:`feedback-modal`,feedbackScreenshotIntegration:`feedback-screenshot`};function jA(e){return AA[e]||e.replace(`Integration`,``).toLowerCase()}var MA=X;async function NA(e,t){let n=kA.includes(e)?jA(e):void 0,r=MA.Sentry=MA.Sentry||{};if(!n)throw Error(`Cannot lazy load integration: ${e}`);let i=r[e];if(typeof i==`function`&&!(`_isShim`in i))return i;let a=PA(n),o=X.document.createElement(`script`);o.src=a,o.crossOrigin=`anonymous`,o.referrerPolicy=`strict-origin`,t&&o.setAttribute(`nonce`,t);let s=new Promise((e,t)=>
486{o.addEventListener(`load`,()=>e()),o.addEventListener(`error`,t)}),c=X.document.currentScript,l=X.document.body||X.document.head||c?.parentElement;if(l)l.appendChild(o);else throw Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await s}catch{throw Error(`Error when loading integration: ${e}`)}let u=r[e];if(typeof u!=`function`)throw Error(`Could not load integration: ${e}`);return u}function PA(e){let t=G()?.getOptions()?.cdnBaseUrl||`https://browser.sentry-cdn.com`;return new URL(`/${Xd}/${e}.min.js`,t).toString()}var FA=Nb({lazyLoadIntegration:NA}),IA=Nb({getModalIntegration:()=>_S,getScreenshotIntegration:()=>DS});function LA(e,t){let n=BA(e,t),r={type:GA(t),value:KA(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function RA(e,t,n,r){let i=G()?.getOptions().normalizeDepth,a=$A(t),o={__serialized__:cp(t,i)};if(a)return{exception:{values:[LA(e,a)]},extra:o};let s={exception:{values:[{type:Sf(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:ZA(t,{isUnhandledRejection:r})}]},extra:o};if(n){let t=BA(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}function zA(e,t){return{exception:{values:[LA(e,t)]}}}function BA(e,t){let n=t.stacktrace||t.stack||``,r=HA(t),i=UA(t);try{return e(n,r,i)}catch{}return[]}var VA=/Minified React error #\d+;/i;function HA(e){return e&&VA.test(e.message)?1:0}function UA(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function WA(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0?e instanceof WebAssembly.Exception:!1}function GA(e){let t=e?.name;return!t&&WA(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function KA(e){let t=e?.message;return WA(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?yA(t.error):yA(e):`No error message`}function qA(e,t,n,r){let i=YA(e,t,n?.syntheticException||void 0,r);return Dp(i),i.level=`error`,n?.event_id&&(i.event_id=n.event_id),D_(i)}function JA(e,t,n=`info`,r,i){let a=XA(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),D_(a)}function YA(e,t,n,r,i){let a;if(hf(t)&&t.error)return zA(e,t.error);if(gf(t)||_f(t)){let i=t;if(`stack`in t){a=zA(e,t);let i=a.exception?.values?.[0];if(r&&n&&i&&!i.stacktrace){let t=BA(e,n);t.length&&(i.stacktrace={frames:t},Dp(a,{synthetic:!0}))}}else{let t=i.name||(gf(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=XA(e,o,n,r),Ep(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return pf(t)?zA(e,t):xf(t)||Sf(t)?(a=RA(e,t,n,i),Dp(a,{synthetic:!0}),a):(a=XA(e,t,n,r),Ep(a,`${t}`,void 0),Dp(a,{synthetic:!0}),a)}function XA(e,t,n,r){let i={};if(r&&n){let r=BA(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),Dp(i,{synthetic:!0})}if(yf(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function ZA(e,{isUnhandledRejection:t}){let n=Nf(e),r=t?`promise rejection`:`exception`;return hf(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Sf(e)?`Event \`${QA(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function QA(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function $A(e){return Object.values(e).find(e=>e instanceof Error)}var ej=class extends WC{constructor(e){let t=tj(e);_w(t,`browser`,[`browser`],X.SENTRY_SDK_SOURCE||Kv()),super(t);let{userInfo:n}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:n?`auto`:`never`,...t._metadata.sdk.settings});let{sendClientReports:r,enableLogs:i,_experiments:a,enableMetrics:o}=this._options,s=o??a?.enableMetrics??!0;X.document&&(r||i||s)&&X.document.addEventListener(`visibilitychange`,()=>{X.document.visibilityState===`hidden`&&(r&&this._flushOutcomes(),i&&mC(this),s&&iy(this))}),n&&this.on(`beforeSendSession`,gw)}eventFromException(e,t){return qA(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return JA(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n,r)}};function tj(e){return{release:typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:X.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var Z=U,nj=(e,t)=>e>t[1]?`poor`:e>t[0]?`needs-improvement`:`good`,rj=(e,t,n,r)=>{let i,a;return o=>{t.value>=0&&(o||r)&&(a=t.value-(i??0),(a||i===void 0)&&(i=t.value,t.delta=a,t.rating=nj(t.value,n),e(t)))}},ij=(e=!0)=>{let t=Z.performance?.getEntriesByType?.(`navigation`)[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},aj=()=>ij()?.activationStart??0;function oj(e,t,n){Z.document&&Z.addEventListener(e,t,n)}function sj(e,t,n){Z.document&&Z.removeEventListener(e,t,n)}var cj=-1,lj=new Set,uj=()=>Z.document?.visibilityState===`hidden`&&!Z.document?.prerendering?0:1/0,dj=e=>{if(pj(e)&&cj>-1){if(e.type===`visibilitychange`||e.type===`pagehide`)for(let e of lj)e();isFinite(cj)||(cj=e.type===`visibilitychange`?e.timeStamp:0,sj(`prerenderingchange`,dj,!0))}},fj=()=>
486{if(Z.document&&cj<0){let e=aj();cj=(Z.document.prerendering?void 0:globalThis.performance.getEntriesByType(`visibility-state`).filter(t=>t.name===`hidden`&&t.startTime>e)[0]?.startTime)??uj(),oj(`visibilitychange`,dj,!0),oj(`pagehide`,dj,!0),oj(`prerenderingchange`,dj,!0)}return{get firstHiddenTime(){return cj},onHidden(e){lj.add(e)}}};function pj(e){return e.type===`pagehide`||Z.document?.visibilityState===`hidden`}var mj=()=>`v5-${Date.now()}-${Math.floor(Math.random()*8999999999999)+0xe8d4a51000}`,hj=(e,t=-1)=>{let n=ij(),r=`navigate`;return n&&(Z.document?.prerendering||aj()>0?r=`prerender`:Z.document?.wasDiscarded?r=`restore`:n.type&&(r=n.type.replace(/_/g,`-`))),{name:e,value:t,rating:`good`,delta:0,entries:[],id:mj(),navigationType:r}},gj=new WeakMap;function _j(e,t){try{return gj.get(e)||gj.set(e,new t),gj.get(e)}catch{return new t}}var vj=class{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;let t=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}},yj=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},bj=e=>{let t=!1;return()=>{t||=(e(),!0)}},xj=e=>{Z.document?.prerendering?addEventListener(`prerenderingchange`,()=>e(),!0):e()},Sj=[1800,3e3],Cj=(e,t={})=>{xj(()=>{let n=fj(),r=hj(`FCP`),i,a=yj(`paint`,e=>{for(let t of e)t.name===`first-contentful-paint`&&(a.disconnect(),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-aj(),0),r.entries.push(t),i(!0)))});a&&(i=rj(e,r,Sj,t.reportAllChanges))})},wj=[.1,.25],Tj=(e,t={})=>{Cj(bj(()=>{let n=hj(`CLS`,0),r,i=fj(),a=_j(t,vj),o=e=>{for(let t of e)a._processEntry(t);a._sessionValue>n.value&&(n.value=a._sessionValue,n.entries=a._sessionEntries,r())},s=yj(`layout-shift`,o);s&&(r=rj(e,n,wj,t.reportAllChanges),i.onHidden(()=>{o(s.takeRecords()),r(!0)}),Z?.setTimeout?.(r))}))},Ej=0,Dj=1/0,Oj=0,kj=e=>{e.forEach(e=>{e.interactionId&&(Dj=Math.min(Dj,e.interactionId),Oj=Math.max(Oj,e.interactionId),Ej=Oj?(Oj-Dj)/7+1:0)})},Aj,jj=()=>Aj?Ej:performance.interactionCount||0,Mj=()=>{`interactionCount`in performance||Aj||(Aj=yj(`event`,kj,{type:`event`,buffered:!0,durationThreshold:0}))},Nj=10,Pj=0,Fj=()=>jj()-Pj,Ij=class{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){Pj=jj(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let e=Math.min(this._longestInteractionList.length-1,Math.floor(Fj()/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!(e.interactionId||e.entryType===`first-input`))return;let t=this._longestInteractionList.at(-1),n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<Nj||e.duration>t._latency){if(n?e.duration>n._latency?(n.entries=[e],n._latency=e.duration):e.duration===n._latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((e,t)=>t._latency-e._latency),this._longestInteractionList.length>Nj){let e=this._longestInteractionList.splice(Nj);for(let t of e)this._longestInteractionMap.delete(t.id)}this._onAfterProcessingINPCandidate?.(n)}}},Lj=e=>{let t=Z.requestIdleCallback||Z.setTimeout;Z.document?.visibilityState===`hidden`?e():(e=bj(e),oj(`visibilitychange`,e,{once:!0,capture:!0}),oj(`pagehide`,e,{once:!0,capture:!0}),t(()=>{e(),sj(`visibilitychange`,e,{capture:!0}),sj(`pagehide`,e,{capture:!0})}))},Rj=[200,500],zj=40,Bj=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype))return;let n=fj();xj(()=>{Mj();let r=hj(`INP`),i,a=_j(t,Ij),o=e=>{Lj(()=>{for(let t of e)a._processEntry(t);let t=a._estimateP98LongestInteraction();t&&t._latency!==r.value&&(r.value=t._latency,r.entries=t.entries,i())})},s=yj(`event`,o,{durationThreshold:t.durationThreshold??zj});i=rj(e,r,Rj,t.reportAllChanges),s&&(s.observe({type:`first-input`,buffered:!0}),n.onHidden(()=>{o(s.takeRecords()),i(!0)}))})},Vj=class{_processEntry(e){this._onBeforeProcessingEntry?.(e)}},Hj=[2500,4e3],Uj=(e,t={})=>{xj(()=>{let n=fj(),r=hj(`LCP`),i,a=_j(t,Vj),o=e=>{t.reportAllChanges||(e=e.slice(-1));for(let t of e)a._processEntry(t),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-aj(),0),r.entries=[t],i())},s=yj(`largest-contentful-paint`,o);if(s){i=rj(e,r,Hj,t.reportAllChanges);let n=bj(()=>{o(s.takeRecords()),s.disconnect(),i(!0)}),a=e=>{e.isTrusted&&(Lj(n),sj(e.type,a,{capture:!0}))};for(let e of[`keydown`,`click`,`visibilitychange`])oj(e,a,{capture:!0})}})},Wj=[800,1800],Gj=e=>{Z.document?.prerendering?xj(()=>Gj(e)):Z.document?.readyState===`complete`?setTimeout(e):addEventListener(`load`,()=>Gj(e),!0)},Kj=(e,t={})=>{let n=hj(`TTFB`),r=rj(e,n,Wj,t.reportAllChanges);Gj(()=>{let e=ij();e&&(n.value=Math.max(e.responseStart-aj(),0),n.entries=[e],r(!0))})},qj={},Jj={},Yj,Xj,Zj,Qj;function $j(e,t=!1){return lM(`cls`,e,aM,Yj,t)}function eM(e,t=!1){return lM(`lcp`,e,oM,Xj,t)}function tM(e){return lM(`ttfb`,e,sM,Zj)}function nM(e){return lM(`inp`,e,cM,Qj)}function rM(e,t){return dM(e,t),Jj[e]||(uM(e),Jj[e]=!0),fM(e,t)}function iM(e,t){let n=qj[e];if(n?.length)for(let e of n)try{e(t)}catch{}}function aM(){return Tj(e=>{iM(`cls`,{metric:e}),Yj=e},{reportAllChanges:!0})}function oM(){return Uj(e=>{iM(`lcp`,{metric:e}),Xj=e},{reportAllChanges:!0})}function sM(){return Kj(e=>{iM(`ttfb`,{metric:e}),Zj=e})}function cM(){return Bj(e=>{iM(`inp`,{metric:e}),Qj=e})}function lM(e,t,n,r,i=!1){dM(e,t);let a;return Jj[e]||(a=n(),Jj[e]=!0),r&&t({metric:r}),fM(e,t,i?a:void 0)}function uM(e){let t={};e===`event`&&(t.durationThreshold=0),yj(e,t=>{iM(e,{entries:t})},t)}function dM(e,t){qj[e]=qj[e]||[],qj[e].push(t)}function fM(e,t,n){return()=>{n&&n();let r=qj[e];if(!r)return;let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function pM(e){return`duration`in e}var mM=80,hM={};try{typeof Node<`u`&&(hM.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,`parentNode`).get),typeof Element<`u`&&(hM.tagName=Object.getOwnPropertyDescriptor(Element.prototype,`tagName`).get,hM.id=Object.getOwnPropertyDescriptor(Element.prototype,`id`).get,hM.className=Object.getOwnPropertyDescriptor(Element.prototype,`className`).get,hM.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<`u`&&(hM.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,`dataset`).get)}catch{}function gM(e,t,n){let r=hM[t];if(r)try{return r.call(e,n)}catch{}let i=e[t];return typeof i==`function`?i.call(e,n):i}function _M(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||mM;for(;n&&i++<5&&(o=vM(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=gM(n,`parentNode`);return r.reverse().join(` > `)}catch{return`<unknown>`}}function vM(e,t){let n=[],r=gM(e,`tagName`);if(!r)return``;if(typeof HTMLElement<`u`&&e instanceof HTMLElement){let t=gM(e,`dataset`);if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());let i=t?.length?t.filter(t=>gM(e,`getAttribute`,t)).map(t=>[t,gM(e,`getAttribute`,t)]):null;
486if(i?.length)i.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{let t=gM(e,`id`);t&&n.push(`#${t}`);let r=gM(e,`className`);if(r&&vf(r)){let e=r.split(/\s+/);for(let t of e)n.push(`.${t}`)}}for(let t of[`aria-label`,`type`,`name`,`title`,`alt`]){let r=gM(e,`getAttribute`,t);r&&n.push(`[${t}="${r}"]`)}return n.join(``)}var yM=e=>{let t=t=>{(t.type===`pagehide`||Z.document?.visibilityState===`hidden`)&&e(t)};oj(`visibilitychange`,t,{capture:!0,once:!0}),oj(`pagehide`,t,{capture:!0,once:!0})};function bM(e){return typeof e==`number`&&isFinite(e)}function xM(e,t,n,{...r}){let i=q(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime==`function`&&e.updateStartTime(t),Jg(e,()=>{let e=Kg({startTime:t,...r});return e&&e.end(n),e})}function SM(e){let t=G();if(!t)return;let{name:n,transaction:r,attributes:i,startTime:a}=e,{release:o,environment:s}=t.getOptions(),{userInfo:c}=t.getDataCollectionOptions(),l=t.getIntegrationByName(`Replay`)?.getReplayId(),u=W(),d=u.getUser(),f=d===void 0?void 0:d.email||d.id||d.ip_address,p;try{p=u.getScopeData().contexts.profile.profile_id}catch{}return Kg({name:n,attributes:{release:o,environment:s,user:f||void 0,profile_id:p||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":Z.navigator?.userAgent,"client.address":c?`{{auto}}`:void 0,...i},startTime:a,experimental:{standalone:!0}})}function CM(){return Z.addEventListener&&Z.performance}function wM(e){return e/1e3}function TM(e){let t=`unknown`,n=`unknown`,r=``;for(let i of e){if(i===`/`){[t,n]=e.split(`/`);break}if(!isNaN(Number(i))){t=r===`h`?`http`:r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function EM(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function DM(e,t){let n,r=!1;function i(e){!r&&n&&t(e,n.spanContext().spanId,n),r=!0}yM(()=>{i(`pagehide`)});let a=e.on(`beforeStartNavigationSpan`,(e,t)=>{t?.isRedirect||(i(`navigation`),a(),o())}),o=e.on(`afterStartPageLoadSpan`,e=>{n=e,o()})}function OM(e){let t=0,n;if(!EM(`layout-shift`))return;let r=$j(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);DM(e,(e,i)=>{kM(t,n,i,e),r()})}function kM(e,t,n,r){let i=t?wM((Rp()||0)+t.startTime):Fp(),a=W().getScopeData().transactionName,o=t?_M(t.sources[0]?.node):`Layout shift`,s={[K]:`auto.http.browser.cls`,[vm]:`ui.webvital.cls`,[Fm]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((e,t)=>{s[`cls.source.${t+1}`]=_M(e.node)});let c=SM({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`cls`,{[bm]:``,[xm]:e}),c.end(i))}function AM(e){return e!=null&&e>0&&e<=6e4}function jM(e){let t=0,n;if(!EM(`largest-contentful-paint`))return;let r=eM(({metric:e})=>{let r=e.entries[e.entries.length-1];!r||!AM(e.value)||(t=e.value,n=r)},!0);DM(e,(e,i)=>{MM(t,n,i,e),r()})}function MM(e,t,n,r){if(!AM(e))return;let i=wM((Rp()||0)+(t?.startTime||0)),a=W().getScopeData().transactionName,o=t?_M(t.element):`Largest contentful paint`,s={[K]:`auto.http.browser.lcp`,[vm]:`ui.webvital.lcp`,[Fm]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(s[`lcp.element`]=_M(t.element)),t.id&&(s[`lcp.id`]=t.id),t.url&&(s[`lcp.url`]=t.url),t.loadTime!=null&&(s[`lcp.loadTime`]=t.loadTime),t.renderTime!=null&&(s[`lcp.renderTime`]=t.renderTime),t.size!=null&&(s[`lcp.size`]=t.size));let c=SM({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`lcp`,{[bm]:`millisecond`,[xm]:e}),c.end(i))}function NM(e){return e&&((Rp()||performance.timeOrigin)+e)/1e3}function PM(e){let t={};if(e.nextHopProtocol!=null){let{name:n,version:r}=TM(e.nextHopProtocol);t[`network.protocol.version`]=r,t[`network.protocol.name`]=n}return Rp()||CM()?.timeOrigin?FM({...t,"http.request.redirect_start":NM(e.redirectStart),"http.request.redirect_end":NM(e.redirectEnd),"http.request.worker_start":NM(e.workerStart),"http.request.fetch_start":NM(e.fetchStart),"http.request.domain_lookup_start":NM(e.domainLookupStart),"http.request.domain_lookup_end":NM(e.domainLookupEnd),"http.request.connect_start":NM(e.connectStart),"http.request.secure_connection_start":NM(e.secureConnectionStart),"http.request.connection_end":NM(e.connectEnd),"http.request.request_start":NM(e.requestStart),"http.request.response_start":NM(e.responseStart),"http.request.response_end":NM(e.responseEnd),"http.request.time_to_first_byte":e.responseStart==null?void 0:e.responseStart/1e3}):t}function FM(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!=null))}var IM=2147483647,LM=0,RM={},zM,BM;
486function VM({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){let r=CM();if(r&&Rp()){r.mark&&Z.performance.mark(`sentry-tracing-init`);let i=t?jM(n):t===!1?KM():void 0,a=e?OM(n):e===!1?GM():void 0,o=qM(),s=JM();return()=>{o(),s(),i?.(),a?.()}}return()=>void 0}function HM(){rM(`longtask`,({entries:e})=>{let t=$h();if(!t)return;let{op:n,start_timestamp:r}=q(t);for(let i of e){let e=wM(Rp()+i.startTime),a=wM(i.duration);n===`navigation`&&r&&e<r||xM(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-task`,attributes:{[K]:`auto.ui.browser.metrics`}})}})}function UM(){new PerformanceObserver(e=>{let t=$h();if(t)for(let n of e.getEntries()){if(!n.scripts[0])continue;let e=wM(Rp()+n.startTime),{start_timestamp:r,op:i}=q(t);if(i===`navigation`&&r&&e<r)continue;let a=wM(n.duration),o={[K]:`auto.ui.browser.metrics`},{invoker:s,invokerType:c,sourceURL:l,sourceFunctionName:u,sourceCharPosition:d}=n.scripts[0];o[`browser.script.invoker`]=s,o[`browser.script.invoker_type`]=c,l&&(o[`code.filepath`]=l),u&&(o[`code.function`]=u),d!==-1&&(o[`browser.script.source_char_position`]=d),xM(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-animation-frame`,attributes:o})}}).observe({type:`long-animation-frame`,buffered:!0})}function WM(){rM(`event`,({entries:e})=>{let t=$h();if(t){for(let n of e)if(n.name===`click`){let e=wM(Rp()+n.startTime),r=wM(n.duration),i={name:_M(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[K]:`auto.ui.browser.metrics`}},a=By(n.target);a&&(i.attributes[`ui.component_name`]=a),xM(t,e,e+r,i)}}})}function GM(){return $j(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(RM.cls={value:e.value,unit:``},BM=t)},!0)}function KM(){return eM(({metric:e})=>{let t=e.entries[e.entries.length-1];!t||!AM(e.value)||(RM.lcp={value:e.value,unit:`millisecond`},zM=t)},!0)}function qM(){return tM(({metric:e})=>{e.entries[e.entries.length-1]&&(RM.ttfb={value:e.value,unit:`millisecond`})})}function JM(){return rM(`paint`,({entries:e})=>{let t=fj();for(let n of e){let e=n.startTime<t.firstHiddenTime;n.name===`first-paint`&&e&&(RM.fp={value:n.startTime,unit:`millisecond`}),n.name===`first-contentful-paint`&&e&&(RM.fcp={value:n.startTime,unit:`millisecond`})}})}function YM(e,t){let n=CM(),r=Rp();if(!n?.getEntries||!r)return;let{spanStreamingEnabled:i,ignorePerformanceApiSpans:a,ignoreResourceSpans:o}=t,s=wM(r),c=n.getEntries(),{op:l,start_timestamp:u}=q(e);c.slice(LM).forEach(t=>{let n=wM(t.startTime),r=wM(Math.max(0,t.duration));if(!(l===`navigation`&&u&&s+n<u))switch(t.entryType){case`navigation`:tN(e,t,s);break;case`mark`:case`paint`:case`measure`:$M(e,t,n,r,s,a);break;case`resource`:aN(e,t,t.name,n,r,s,o);break}}),LM=Math.max(c.length-1,0),oN(e,i)}function XM(e,t){let n=Rp();if(!CM()?.getEntries||!n){ZM();return}let{spanStreamingEnabled:r,recordClsOnPageloadSpan:i,recordLcpOnPageloadSpan:a}=t,o=wM(n);if(q(e).op===`pageload`){if(lN(RM),r){let t=(t,n,r)=>{let i=r??`browser.web_vital.${t}.value`;e.setAttribute(i,n)};[`ttfb`,`fp`,`fcp`].forEach(e=>{RM[e]&&t(e,RM[e].value)}),RM[`ttfb.requestTime`]&&t(`ttfb.requestTime`,RM[`ttfb.requestTime`].value,`browser.web_vital.ttfb.request_time`)}else i||delete RM.cls,a||delete RM.lcp,Object.entries(RM).forEach(([t,n])=>{Fg(t,n.value,n.unit,e)}),sN(e,t);e.setAttribute(r?`browser.performance.time_origin`:`performance.timeOrigin`,o),e.setAttribute(r?`browser.performance.navigation.activation_start`:`performance.activationStart`,aj())}ZM()}function ZM(){zM=void 0,BM=void 0,RM={}}function QM(e){if(e?.entryType===`measure`)try{return e.detail.devtools.track===`Components ⚛`}catch{return}}function $M(e,t,n,r,i,a){if(QM(t)||[`mark`,`measure`].includes(t.entryType)&&yp(t.name,a))return;let o=ij(!1),s=wM(o?o.requestStart:0),c=i+Math.max(n,s),l=i+n,u=l+r,d={[K]:`auto.resource.browser.metrics`};c!==l&&(d[`sentry.browser.measure_happened_before_request`]=!0,d[`sentry.browser.measure_start_time`]=c),eN(d,t),c<=u&&xM(e,c,u,{name:t.name,op:t.entryType,attributes:d})}function eN(e,t){try{let n=t.detail;if(!n)return;if(typeof n==`object`){for(let[t,r]of Object.entries(n))if(r&&bf(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(r!==void 0)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(bf(n)){e[`sentry.browser.measure.detail`]=n;return}try{e[`sentry.browser.measure.detail`]=JSON.stringify(n)}catch{}}catch{}}function tN(e,t,n){[`unloadEvent`,`redirect`,`domContentLoadedEvent`,`loadEvent`,`connect`].forEach(r=>{nN(e,t,r,n)}),nN(e,t,`secureConnection`,n,`TLS/SSL`),nN(e,t,`fetch`,n,`cache`),nN(e,t,`domainLookup`,n,`DNS`),iN(e,t,n)}function nN(e,t,n,r,i=n){let a=t[rN(n)],o=t[`${n}Start`];!o||!a||xM(e,r+wM(o),r+wM(a),{op:`browser.${i}`,name:t.name,attributes:{[K]:`auto.ui.browser.metrics`,...n===`redirect`&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function rN(e){return e===`secureConnection`?`connectEnd`:e===`fetch`?`domainLookupStart`:`${e}End`}function iN(e,t,n){let r=n+wM(t.requestStart),i=n+wM(t.responseEnd),a=n+wM(t.responseStart);t.responseEnd&&(xM(e,r,i,{op:`browser.request`,name:t.name,attributes:{[K]:`auto.ui.browser.metrics`}}),xM(e,a,i,{op:`browser.response`,name:t.name,attributes:{[K]:`auto.ui.browser.metrics`}}))}function aN(e,t,n,r,i,a,o){if(t.initiatorType===`xmlhttprequest`||t.initiatorType===`fetch`)return;let s=t.initiatorType?`resource.${t.initiatorType}`:`resource.other`;if(o?.includes(s))return;let c={[K]:`auto.resource.browser.metrics`},l=Ov(n);l.protocol&&(c[`url.scheme`]=l.protocol.split(`:`).pop()),l.host&&(c[`server.address`]=l.host),c[`url.same_origin`]=n.includes(Z.location.origin),cN(t,c,[[`responseStatus`,`http.response.status_code`],[`transferSize`,`http.response_transfer_size`],[`encodedBodySize`,`http.response_content_length`],[`decodedBodySize`,`http.decoded_response_content_length`],[`renderBlockingStatus`,`resource.render_blocking_status`],[`deliveryType`,`http.response_delivery_type`]]);let u={...c,...PM(t)},d=a+r;xM(e,d,d+i,{name:n.replace(Z.location.origin,``),op:s,attributes:u})}function oN(e,t){let n=Z.navigator;if(!n)return;let r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?`network.connection.effective_type`:`effectiveConnectionType`,r.effectiveType),r.type&&e.setAttribute(t?`network.connection.type`:`connectionType`,r.type),bM(r.rtt)&&(t?e.setAttribute(`network.connection.rtt`,r.rtt):q(e).op===`pageload`&&Fg(`connection.rtt`,r.rtt,`millisecond`))),bM(n.deviceMemory)&&(t?e.setAttribute(`device.memory.estimated_capacity`,n.deviceMemory):e.setAttribute(`deviceMemory`,`${n.deviceMemory} GB`)),bM(n.hardwareConcurrency)&&(t?e.setAttribute(`device.processor_count`,n.hardwareConcurrency):e.setAttribute(`hardwareConcurrency`,String(n.hardwareConcurrency)))}function sN(e,t){zM&&t.recordLcpOnPageloadSpan&&(zM.element&&e.setAttribute(`lcp.element`,_M(zM.element)),zM.id&&e.setAttribute(`lcp.id`,zM.id),zM.url&&e.setAttribute(`lcp.url`,zM.url.trim().slice(0,200)),zM.loadTime!=null&&e.setAttribute(`lcp.loadTime`,zM.loadTime),zM.renderTime!=null&&e.setAttribute(`lcp.renderTime`,zM.renderTime),e.setAttribute(`lcp.size`,zM.size)),BM?.sources&&t.recordClsOnPageloadSpan&&BM.sources.forEac
486h((t,n)=>e.setAttribute(`cls.source.${n+1}`,_M(t.node)))}function cN(e,t,n){n.forEach(([n,r])=>{let i=e[n];i!=null&&(typeof i==`number`&&i<IM||typeof i==`string`)&&(t[r]=i)})}function lN(e){let t=ij(!1);if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e[`ttfb.requestTime`]={value:n-r,unit:`millisecond`})}var uN=`ElementTiming`,dN=J((()=>({name:uN,setup(){!CM()||!Rp()||rM(`element`,({entries:e})=>{for(let t of e){let e=t;if(!e.identifier)continue;let n=e.identifier,r=e.name,i=e.renderTime,a=e.loadTime,o={"sentry.origin":`auto.ui.browser.element_timing`,"ui.element.identifier":n};r&&(o[`ui.element.paint_type`]=r),e.id&&(o[`ui.element.id`]=e.id),e.element&&(o[`ui.element.type`]=e.element.tagName.toLowerCase()),e.url&&(o[`ui.element.url`]=e.url),e.naturalWidth&&(o[`ui.element.width`]=e.naturalWidth),e.naturalHeight&&(o[`ui.element.height`]=e.naturalHeight),i>0&&dy(`ui.element.render_time`,i,{unit:`millisecond`,attributes:o}),a>0&&dy(`ui.element.load_time`,a,{unit:`millisecond`,attributes:o})}})}}))),fN=[],pN=new Map,mN=new Map;function hN(){if(CM()&&Rp()){let e=_N();return()=>{e()}}return()=>void 0}var gN={click:`click`,pointerdown:`click`,pointerup:`click`,mousedown:`click`,mouseup:`click`,touchstart:`click`,touchend:`click`,mouseover:`hover`,mouseout:`hover`,mouseenter:`hover`,mouseleave:`hover`,pointerover:`hover`,pointerout:`hover`,pointerenter:`hover`,pointerleave:`hover`,dragstart:`drag`,dragend:`drag`,drag:`drag`,dragenter:`drag`,dragleave:`drag`,dragover:`drag`,drop:`drag`,keydown:`press`,keyup:`press`,keypress:`press`,input:`press`};function _N(){return nM(vN)}var vN=({metric:e})=>{if(e.value==null)return;let t=wM(e.value);if(t>60)return;let n=e.entries.find(t=>t.duration===e.value&&gN[t.name]);if(!n)return;let{interactionId:r}=n,i=gN[n.name],a=wM(Rp()+n.startTime),o=$h(),s=o?Zh(o):void 0,c=r==null?void 0:pN.get(r),l=c?.span||s,u=l?q(l).description:W().getScopeData().transactionName,d=SM({name:c?.elementName||_M(n.target),transaction:u,attributes:{[K]:`auto.http.browser.inp`,[vm]:`ui.interaction.${i}`,[Fm]:n.duration},startTime:a});d&&(d.addEvent(`inp`,{[bm]:`millisecond`,[xm]:e.value}),d.end(a+t))};function yN(e){return e==null?void 0:pN.get(e)}function bN(){let e=Object.keys(gN);Jv()&&e.forEach(e=>{Z.addEventListener(e,t,{capture:!0,passive:!0})});function t(e){let t=e.target;if(!t)return;let n=_M(t),r=Math.round(e.timeStamp);if(mN.set(r,n),mN.size>50){let e=mN.keys().next().value;e!==void 0&&mN.delete(e)}}function n(e){let t=Math.round(e.startTime),n=mN.get(t);if(!n)for(let e=-5;e<=5;e++){let r=mN.get(t+e);if(r){n=r;break}}return n||`<unknown>`}let r=({entries:e})=>{let t=$h(),r=t&&Zh(t);e.forEach(e=>{if(!pM(e))return;let t=e.interactionId;if(t==null||pN.has(t))return;let i=e.target?_M(e.target):n(e);if(fN.length>10){let e=fN.shift();pN.delete(e)}fN.push(t),pN.set(t,{span:r,elementName:i})})};rM(`event`,r),rM(`first-input`,r)}function xN(e){let{name:t,op:n,origin:r,metricName:i,value:a,attributes:o,parentSpan:s,reportEvent:c,startTime:l,endTime:u}=e,d=W().getScopeData().transactionName,f={[K]:r,[vm]:n,[Fm]:0,[`browser.web_vital.${i}.value`]:a,"sentry.transaction":d,"user_agent.original":Z.navigator?.userAgent,...o};s&&Rh(s).attributes?.[`sentry.op`]===`pageload`&&(f[`sentry.pageload.span_id`]=s.spanContext().spanId),c&&(f[`browser.web_vital.${i}.report_event`]=c);let p=Kg({name:t,attributes:f,startTime:l,parentSpan:s});p&&p.end(u??l)}function SN(e){let t=0,n;if(!EM(`largest-contentful-paint`))return;let r=eM(({metric:e})=>{let r=e.entries[e.entries.length-1];!r||!AM(e.value)||(t=e.value,n=r)},!0);DM(e,(e,i,a)=>{CN(t,n,a,e),r()})}function CN(e,t,n,r){if(!AM(e))return;let i=Rp()||0,a=wM(i),o=wM(i+(t?.startTime||0)),s=t?_M(t.element):`Largest contentful paint`,c={};t?.element&&(c[`browser.web_vital.lcp.element`]=_M(t.element)),t?.id&&(c[`browser.web_vital.lcp.id`]=t.id),t?.url&&(c[`browser.web_vital.lcp.url`]=t.url),t?.loadTime!=null&&(c[`browser.web_vital.lcp.load_time`]=t.loadTime),t?.renderTime!=null&&(c[`browser.web_vital.lcp.render_time`]=t.renderTime),t?.size!=null&&(c[`browser.web_vital.lcp.size`]=t.size),xN({name:s,op:`ui.webvital.lcp`,origin:`auto.http.browser.lcp`,metricName:`lcp`,value:e,attributes:c,parentSpan:n,reportEvent:r,startTime:a,endTime:o})}function wN(e){let t=0,n;if(!EM(`layout-shift`))return;let r=$j(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);DM(e,(e,i,a)=>
486{TN(t,n,a,e),r()})}function TN(e,t,n,r){let i=t?wM((Rp()||0)+t.startTime):Fp(),a=t?_M(t.sources[0]?.node):`Layout shift`,o={};t?.sources&&t.sources.forEach((e,t)=>{o[`browser.web_vital.cls.source.${t+1}`]=_M(e.node)}),xN({name:a,op:`ui.webvital.cls`,origin:`auto.http.browser.cls`,metricName:`cls`,value:e,attributes:o,parentSpan:n,reportEvent:r,startTime:i})}function EN(){!CM()||!Rp()||nM(({metric:e})=>{if(e.value==null||wM(e.value)>60)return;let t=e.entries.find(t=>t.duration===e.value&&gN[t.name]);t&&DN(e.value,t)})}function DN(e,t){let n=wM(Rp()+t.startTime),r=wM(e),i=gN[t.name],a=yN(t.interactionId),o=$h(),s=o?Zh(o):void 0,c=a?.span||s,l=c?Rh(c).name:W().getScopeData().transactionName;xN({name:a?.elementName||_M(t.target),op:`ui.interaction.${i}`,origin:`auto.http.browser.inp`,metricName:`inp`,value:e,attributes:{[Fm]:t.duration,"sentry.transaction":l},startTime:n,endTime:n+r,parentSpan:c})}var ON=1e3,kN,AN,jN;function MN(e){by(`dom`,e),xy(`dom`,NN)}function NN(){if(!Z.document)return;let e=Sy.bind(null,`dom`),t=IN(e,!0);Z.document.addEventListener(`click`,t,!1),Z.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=Z[t]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(Df(n,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=IN(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),Df(n,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function PN(e){if(e.type!==AN)return!1;try{if(!e.target||e.target._sentryId!==jN)return!1}catch{}return!0}function FN(e,t){return e===`keypress`?t?.tagName?!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!0:!1}function IN(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=LN(n);if(FN(n.type,r))return;Of(n,`_sentryCaptured`,!0),r&&!r._sentryId&&Of(r,`_sentryId`,Cp());let i=n.type===`keypress`?`input`:n.type;PN(n)||(e({event:n,name:i,global:t}),AN=n.type,jN=r?r._sentryId:void 0),clearTimeout(kN),kN=Z.setTimeout(()=>{jN=void 0,AN=void 0},ON)}}function LN(e){try{return e.target}catch{return null}}var RN;function zN(e){let t=`history`;by(t,e),xy(t,BN)}function BN(){if(Z.addEventListener(`popstate`,()=>{let e=Z.location.href,t=RN;RN=e,t!==e&&Sy(`history`,{from:t,to:e})}),!py())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=RN,i=VN(String(n));if(RN=i,r===i)return e.apply(this,t);Sy(`history`,{from:r,to:i})}return e.apply(this,t)}}Df(Z.history,`pushState`,e),Df(Z.history,`replaceState`,e)}function VN(e){try{return new URL(e,Z.location.origin).toString()}catch{return e}}var HN={};function UN(e){let t=HN[e];if(t)return t;let n=Z[e];if(hy(n))return HN[e]=n.bind(Z);let r=Z.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch{}return n&&(HN[e]=n.bind(Z))}function WN(e){HN[e]=void 0}function GN(...e){return UN(`setTimeout`)(...e)}var KN=`__sentry_xhr_v3__`;function qN(e){by(`xhr`,e),xy(`xhr`,JN)}function JN(){if(!Z.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=Fp()*1e3,a=vf(n[0])?n[0].toUpperCase():void 0,o=YN(n[1]);if(!a||!o)return e.apply(t,n);t[KN]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[KN];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}Sy(`xhr`,{endTimestamp:Fp()*1e3,startTimestamp:i,xhr:t,virtualError:r})}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[KN];return a&&vf(r)&&vf(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[KN];return r?(n[0]!==void 0&&(r.body=n[0]),Sy(`xhr`,{startTimestamp:Fp()*1e3,xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function YN(e){if(vf(e))return e;try{return e.toString()}catch{}}var XN=Symbol.for(`sentry__originalRequestBody`);function ZN(e){return new URLSearchParams(e).toString()}function QN(e,t=df){try{if(typeof e==`string`)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[ZN(e)];if(!e)return[void 0]}catch{return[void 0,`BODY_PARSE_ERROR`]}return[void 0,`UNPARSEABLE_BODY_TYPE`]}function $N(e=[]){if(e.length>
486=2&&e[1]&&typeof e[1]==`object`&&`body`in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){let t=e[0][XN];return t===void 0?void 0:t}}function eP(e){let t;try{t=e.getAllResponseHeaders()}catch{return{}}return t?t.split(`\r 487`).reduce((e,t)=>{let[n,r]=t.split(`: `);return r&&(e[n.toLowerCase()]=r),e},{}):{}}function tP(e){if(typeof Element>`u`)return!1;try{return e instanceof Element}catch{return!1}}var nP=40;function rP(e,t=UN(`fetch`)){let n=0,r=0;async function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`strict-origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get(`X-Sentry-Rate-Limits`),"retry-after":n.headers.get(`Retry-After`)}}}catch(e){throw WN(`fetch`),e}finally{n-=a,r--}}return wC(e,i,CC(e.bufferSize||nP))}function iP(){let e=G();e&&e.getIntegrationByName(`BrowserProfiling`)&&e.emit(`startUIProfiler`)}function aP(){let e=G();e&&e.getIntegrationByName(`BrowserProfiling`)&&e.emit(`stopUIProfiler`)}var oP={startProfiler:iP,stopProfiler:aP},sP=10,cP=20,lP=30,uP=40,dP=50;function fP(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?`?`:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var pP=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,mP=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,hP=/\((\S*)(?::(\d+))(?::(\d+))\)/,gP=/at (.+?) ?\(data:(.+?),/,_P=[lP,e=>{let t=e.match(gP);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=pP.exec(e);if(n){let[,e,t,r]=n;return fP(e,`?`,+t,+r)}let r=mP.exec(e);if(r){if(r[2]?.indexOf(`eval`)===0){let e=hP.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=kP(r[1]||`?`,r[2]);return fP(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],vP=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,yP=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,bP=[dP,e=>{let t=vP.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=yP.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||`?`;return[n,e]=kP(n,e),fP(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],xP=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,SP=[uP,e=>{let t=xP.exec(e);return t?fP(t[2],t[1]||`?`,+t[3],t[4]?+t[4]:void 0):void 0}],CP=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,wP=[sP,e=>{let t=CP.exec(e);return t?fP(t[2],t[3]||`?`,+t[1]):void 0}],TP=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,EP=[cP,e=>{let t=TP.exec(e);return t?fP(t[5],t[3]||t[4]||`?`,+t[1],+t[2]):void 0}],DP=[_P,bP],OP=Zf(...DP),kP=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function AP(e,{metadata:t,tunnel:n,dsn:r}){return hg({event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:hh(r)}},[jP(e)])}function jP(e){return[{type:`user_report`},e]}var MP=1024,NP=`Breadcrumbs`,PP=J(((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:NP,setup(e){t.console&&Kw(LP(e)),t.dom&&MN(IP(e,t.dom)),t.xhr&&qN(RP(e)),t.fetch&&Cy(zP(e)),t.history&&zN(BP(e)),t.sentry&&e.on(`beforeSendEvent`,FP(e))}}}));function FP(e){return function(t){G()===e&&Rv({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:Tp(t)},{event:t})}}function IP(e,t){return function(n){if(G()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>MP&&(o=MP),typeof a==`string`&&(a=[a]);try{let e=n.event,t=VP(e)?e.target:e;r=_M(t,{keyAttrs:a,maxStringLength:o}),i=By(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};
487i&&(s.data={"ui.component_name":i}),Rv(s,{event:n.event,name:n.name,global:n.global})}}function LP(e){return function(t){if(G()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:My(t.level),message:_p(t.args,` `)};if(t.level===`assert`)if(t.args[0]===!1)n.message=`Assertion failed: ${_p(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1);else return;Rv(n,{input:t.args,level:t.level})}}function RP(e){return function(t){if(G()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[KN];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:`xhr`,data:l,type:`http`,level:_A(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),Rv(d,u)}}function zP(e){return function(t){if(G()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`))if(t.error){let i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:`fetch`,data:t.fetchData,level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,a,i),Rv(a,i)}else{let i=t.response,a={...t.fetchData,status_code:i?.status},o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:_A(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),Rv(s,o)}}}function BP(e){return function(t){if(G()!==e)return;let n=t.from,r=t.to,i=Ov(X.location.href),a=n?Ov(n):void 0,o=Ov(r);a?.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),Rv({category:`navigation`,data:{from:n,to:r}})}}function VP(e){return!!e&&!!e.target}var HP=`EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload`.split(`,`),UP=`BrowserApiErrors`,WP=J(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:UP,setupOnce(){t.setTimeout&&Df(X,`setTimeout`,GP),t.setInterval&&Df(X,`setInterval`,GP),t.requestAnimationFrame&&Df(X,`requestAnimationFrame`,KP),t.XMLHttpRequest&&`XMLHttpRequest`in X&&Df(XMLHttpRequest.prototype,`send`,qP);let e=t.eventTarget;e&&(Array.isArray(e)?e:HP).forEach(e=>JP(e,t))}}}));function GP(e){return function(...t){let n=t[0];return t[0]=DA(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${np(e)}`}}),e.apply(this,t)}}function KP(e){return function(t){return e.apply(this,[DA(t,{mechanism:{data:{handler:np(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function qP(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&Df(n,e,function(t){let n={mechanism:{data:{handler:np(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Af(t);return r&&(n.mechanism.data.handler=np(r)),DA(t,n)})}),e.apply(this,t)}}function JP(e,t){let n=X[e]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(Df(n,`addEventListener`,function(n){return function(r,i,a){try{YP(i)&&(i.handleEvent=DA(i.handleEvent,{mechanism:{data:{handler:np(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&XP(this,r,i),n.apply(this,[r,DA(i,{mechanism:{data:{handler:np(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),Df(n,`removeEventListener`,function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,`__sentry_wrapped__`)){let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}}catch{}return e.call(this,t,n,r)}}))}function YP(e){return typeof e.handleEvent==`function`}function XP(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var ZP=J((e={})=>{let t=e.lifecycle??`route`;return{name:`BrowserSession`,setupOnce(){if(X.document===void 0)return;pv({ignoreDuration:!0}),gv();let e=um(),n=e.getUser();e.addScopeListener(e=>{let t=e.getUser();
487(n?.id!==t?.id||n?.ip_address!==t?.ip_address)&&(gv(),n=t)}),t===`route`&&zN(({from:e,to:t})=>{e!==t&&(pv({ignoreDuration:!0}),gv())})}}}),QP=`CultureContext`,$P=J((()=>({name:QP,preprocessEvent(e){let t=eF();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=eF();t&&b_(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})));function eF(){try{let e=X.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var tF=`GlobalHandlers`,nF=J(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:tF,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&rF(e),t.onunhandledrejection&&iF(e)}}}));function rF(e){kS(t=>{let{stackParser:n,attachStacktrace:r}=cF();if(G()!==e||TA())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=sF(YA(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,Z_(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function iF(e){MS(t=>{let{stackParser:n,attachStacktrace:r}=cF();if(G()!==e||TA())return;let i=aF(t),a=bf(i)?oF(i):YA(n,i,void 0,r,!0);a.level=`error`,Z_(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function aF(e){if(bf(e))return e;try{if(`reason`in e)return e.reason;if(`detail`in e&&`reason`in e.detail)return e.detail.reason}catch{}return e}function oF(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function sF(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:lF(t)??zy(),function:`?`,in_app:!0}),e}function cF(){return G()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function lF(e){if(!(!vf(e)||e.length===0))return e.startsWith(`data:`)?`<${Av(e,!1)}>`:e}var uF=J(()=>({name:`HttpContext`,preprocessEvent(e){if(!X.navigator&&!X.location&&!X.document)return;let t=OA(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){let t=e.attributes?.[vm];if(!X.navigator&&!X.location&&!X.document)return;let n=OA();b_(e,{"url.full":t===`http.client`?void 0:n.url,"http.request.header.user_agent":n.headers[`User-Agent`],"http.request.header.referer":n.headers.Referer})}})),dF=`cause`,fF=5,pF=`LinkedErrors`,mF=J(((e={})=>{let t=e.limit||fF,n=e.key||dF;return{name:pF,preprocessEvent(e,r,i){fA(LA,i.getOptions().stackParser,n,t,e,r)}}})),hF=/^HTML(\w*)Element$/;function gF(e){if(typeof window<`u`&&e===window)return`[Window]`;if(typeof document<`u`&&e===document)return`[Document]`;if(tP(e)){let t=_F(e);if(hF.test(t))return`[HTMLElement: ${_M(e)}]`}}function _F(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function vF(){return!!yF()}function yF(){if(X.window===void 0)return!1;let e=X;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let t=zy();return!(X===X.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}function bF(e){return[Ow(),ww(),cE(),WP(),PP(),nF(),mF(),Qw(),uF(),$P(),ZP()]}function xF(e={}){let t=!e.skipBrowserExtensionCheck&&vF(),n=e.defaultIntegrations==null?bF():e.defaultIntegrations,r={...e,enabled:t?!1:e.enabled,stackParser:Qf(e.stackParser||OP),integrations:yv({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||rP};return op(gF),ew(ej,r)}function SF(){}function CF(e){e()}function wF(e={}){let t=X.document,n=t?.head||t?.body;if(!n)return;let r=W(),i=G()?.getDsn();if(!i)return;let a={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||sv()},o=X.document.createElement(`script`);o.async=!0,o.crossOrigin=`anonymous`,o.src=oC(i,a);let{onLoad:s,onClose:c}=a;if(s&&(o.onload=s),c){let e=t=>{if(t.data===`__sentry_reportdialog_closed__`)try{c()}finally{X.removeEventListener(`message`,e)}};X.addEventListener(`message`,e)}n.appendChild(o)}var TF=U,EF=`ReportingObserver`,DF=new WeakMap,OF=J(((e={})=>{let t=e.types||[`crash`,`deprecation`,`intervention`];function n(e){if(DF.has(G()))for(let t of e)fm(e=>{e.setExtra(`url`,t.url);let n=`ReportingObserver [${t.type}]`,r=`No details available`;if(t.body){let n={};for(let e in t.body)n[e]=t.body[e];if(e.setExtra(`body`,n),t.type===`crash`){let e=t.body;r=[e.crashId||``,e.reason||``].join(` `).trim()||r}else r=t.body.message||r}X_(`${n}: ${r}`)})}return{name:EF,setupOnce(){_y()&&new TF.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(e){DF.set(e,!0)}}})),kF=`HttpClient`,AF=J(((e={})=>{let t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:kF,setup(e){RF(e,t),zF(e,t)}}}));function jF(e,t,n,r,i){if(BF(e,n.status,n.url)){let e=HF(t,r),a,o,s,c,l=UF();if(l.requestHeaders!==!1&&(a=dw(PF(e.headers),l.requestHeaders)),l.responseHeaders!==!1&&(o=dw(PF(n.headers),l.responseHeaders)),l.cookies!==!1){let t=e.headers.get(`Cookie`)||void 0;if(t){let e=pw(t,l.cookies);typeof e==`object`&&(s=e)}let r=n.headers.get(`Set-Cookie`)||void 0;if(r){let e=pw(r,l.cookies);typeof e==`object`&&(c=e)}}Z_(VF({url:e.url,method:e.method,status:n.status,requestHeaders:a,responseHeaders:o,requestCookies:s,responseCookies:c,error:i,type:`fetch`}))}}function MF(e,t,n,r,i){if(BF(e,t.status,t.responseURL)){let e,a,o,s=UF();if(s.cookies!==!1)try{let e=t.getResponseHeader(`Set-Cookie`)||t.getResponseHeader(`set-cookie`)||void 0;if(e){let t=pw(e,s.cookies);typeof t==`object`&&(a=t)}}catch{}if(s.responseHeaders!==!1)try{o=dw(FF(t),s.responseHeaders)}catch{}s.requestHeaders!==!1&&(e=dw(r,s.requestHeaders)),Z_(VF({url:t.responseURL,method:n,status:t.status,requestHeaders:e,responseHeaders:o,responseCookies:a,error:i,type:`xhr`}))}}
487function NF(e){if(e){let t=e[`Content-Length`]||e[`content-length`];if(t)return parseInt(t,10)}}function PF(e){let t={};return e.forEach((e,n)=>{t[n]=e}),t}function FF(e){let t=e.getAllResponseHeaders();return t?t.split(`\r 488`).reduce((e,t)=>{let[n,r]=t.split(`: `);return n&&r&&(e[n]=r),e},{}):{}}function IF(e,t){return e.some(e=>typeof e==`string`?t.includes(e):e.test(t))}function LF(e,t){return e.some(e=>typeof e==`number`?e===t:t>=e[0]&&t<=e[1])}function RF(e,t){gy()&&Cy(n=>{if(G()!==e)return;let{response:r,args:i,error:a,virtualError:o}=n,[s,c]=i;r&&jF(t,s,r,c,a||o)},!1)}function zF(e,t){`XMLHttpRequest`in U&&qN(n=>{if(G()!==e)return;let{error:r,virtualError:i}=n,a=n.xhr,o=a[KN];if(!o)return;let{method:s,request_headers:c}=o;try{MF(t,a,s,c,r||i)}catch{}})}function BF(e,t,n){return LF(e.failedRequestStatusCodes,t)&&IF(e.failedRequestTargets,n)&&!jv(n,G())}function VF(e){let t=G(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,i=`HTTP Client Error with status code: ${e.status}`,a={message:i,exception:{values:[{type:`Error`,value:i,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:NF(e.responseHeaders)}}};return Dp(a,{type:`auto.http.client.${e.type}`,handled:!1}),a}function HF(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function UF(){let e=G();if(!e)return{cookies:!1,requestHeaders:!1,responseHeaders:!1};let t=e.getOptions();if(t.dataCollection==null){let e=!!t.sendDefaultPii;return{cookies:e,requestHeaders:e,responseHeaders:e}}let{cookies:n,httpHeaders:r}=e.getDataCollectionOptions();return{cookies:n,requestHeaders:r.request,responseHeaders:r.response}}var WF=U,GF=7,KF=`ContextLines`,qF=J(((e={})=>({name:KF,processEvent(t,n,r){return JF(t,e.frameContextLines??r?.getDataCollectionOptions().frameContextLines??GF)}})));function JF(e,t){let n=WF.document,r=WF.location&&kv(WF.location.href);if(!n||!r)return e;let i=e.exception?.values;if(!i?.length)return e;let a=n.documentElement.innerHTML;if(!a)return e;let o=[`<!DOCTYPE html>`,`<html>`,...a.split(` 489`),`</html>`];return i.forEach(e=>{let n=e.stacktrace;n?.frames&&(n.frames=n.frames.map(e=>YF(e,o,r,t)))}),e}function YF(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Op(t,e,r),e}var XF=`GraphQLClient`,ZF=(e=>({name:XF,setup(t){QF(t,e),$F(t,e)}}));function QF(e,t){e.on(`beforeOutgoingRequestSpan`,(e,n)=>{let r=q(e).data||{};if(r[`sentry.op`]!==`http.client`)return;let i=r[`url.full`]||r[`http.url`]||r.url,a=r[`http.request.method`]||r[`http.method`];if(!vf(i)||!vf(a))return;let{endpoints:o}=t,s=yp(i,o),c=tI(n);if(s&&c){let t=oI(c);if(t){let n=eI(t);e.updateName(`${a} ${i} (${n})`),iI(t)&&e.setAttribute(`graphql.document`,t.query),aI(t)&&(e.setAttribute(`graphql.persisted_query.hash.sha256`,t.extensions.persistedQuery.sha256Hash),e.setAttribute(`graphql.persisted_query.version`,t.extensions.persistedQuery.version))}}})}function $F(e,t){e.on(`beforeOutgoingRequestBreadcrumb`,(e,n)=>{let{category:r,type:i,data:a}=e;if(i===`http`&&(r===`fetch`||r===`xhr`)){let e=a?.url,{endpoints:r}=t,i=yp(e,r),o=tI(n);if(i&&a&&o){let e=oI(o);!a.graphql&&e&&(a[`graphql.operation`]=eI(e),iI(e)&&(a[`graphql.document`]=e.query),aI(e)&&(a[`graphql.persisted_query.hash.sha256`]=e.extensions.persistedQuery.sha256Hash,a[`graphql.persisted_query.version`]=e.extensions.persistedQuery.version))}}})}function eI(e){if(aI(e))return`persisted ${e.operationName}`;if(iI(e)){let{query:t,operationName:n}=e,{operationName:r=n,operationType:i}=nI(t);return r?`${i} ${r}`:`${i}`}return`unknown`}function tI(e){let t=`xhr`in e,n;if(t){let t=e.xhr[KN];n=t&&QN(t.body)[0]}else n=QN($N(e.input))[0];return n}function nI(e){let t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};let i=e.match(n);return i?{operationType:i[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function rI(e){return typeof e==`object`&&!!e}function iI(e){return rI(e)&&typeof e.query==`string`}
489function aI(e){return rI(e)&&typeof e.operationName==`string`&&rI(e.extensions)&&rI(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash==`string`&&typeof e.extensions.persistedQuery.version==`number`}function oI(e){try{let t=JSON.parse(e);return iI(t)||aI(t)?t:void 0}catch{return}}var sI=J(ZF),cI=J((e={})=>{let t=[`script`];function n(r,i,a=0){if(!r)return;let o=`shadowRoot`in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(let r of o){if(!(r instanceof HTMLElement))continue;let o=By(r,1)||void 0,s=r.tagName.toLowerCase();if(t.includes(s))continue;let c=e.onElement?.({element:r,componentName:o,tagName:s,depth:a})||{};if(c===`skip`)continue;if(c===`children`){n(r,i,a+1);continue}let{x:l,y:u,width:d,height:f}=r.getBoundingClientRect(),p={identifier:r.id||void 0,type:o||s,visible:!0,alpha:1,height:f,width:d,x:l,y:u,...c};p.children=[],n(r,p.children,a+1),i.push(p)}}return{name:`ViewHierarchy`,processEvent:(t,r)=>{if(t.type!==void 0||e.shouldAttach?.(t,r)===!1)return t;let i={rendering_system:`DOM`,positioning:`absolute`,windows:[]};n(e.rootElement?.()||X.document.body,i.windows);let a={filename:`view-hierarchy.json`,attachmentType:`event.view_hierarchy`,contentType:`application/json`,data:JSON.stringify(i)};return r.attachments=r.attachments||[],r.attachments.push(a),t}}}),lI=U,uI=`sentryReplaySession`,dI=`replay_event`,fI=`Unable to send Replay`,pI=3e5,mI=9e5,hI=5e3,gI=5500,_I=6e4,vI=5e3,yI=3,bI=15e4,xI=5e3,SI=3e3,CI=300,wI=2e7,TI=4999,EI=5e4,DI=36e5,OI=Object.defineProperty,kI=(e,t,n)=>t in e?OI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,AI=(e,t,n)=>kI(e,typeof t==`symbol`?t:t+``,n),jI=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(jI||{});function MI(e){return e.nodeType===e.ELEMENT_NODE}function NI(e){return e?.host?.shadowRoot===e}function PI(e){return Object.prototype.toString.call(e)===`[object ShadowRoot]`}function FI(e){return e.includes(` background-clip: text;`)&&!e.includes(` -webkit-background-clip: text;`)&&(e=e.replace(/\sbackground-clip:\s*text;/g,` -webkit-background-clip: text; background-clip: text;`)),e}function II(e){let{cssText:t}=e;if(t.split(`"`).length<3)return t;let n=[`@import`,`url(${JSON.stringify(e.href)})`];return e.layerName===``?n.push(`layer`):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(` `)+`;`}function LI(e){try{let t=e.rules||e.cssRules;return t?FI(Array.from(t,zI).join(``)):null}catch{return null}}function RI(e){let t=``;for(let n=0;n<e.style.length;n++){let r=e.style,i=r[n],a=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${a?` !important`:``};`}return`${e.selectorText} { ${t} }`}function zI(e){let t;if(VI(e))try{t=LI(e.styleSheet)||II(e)}catch{}else if(HI(e)){let t=e.cssText,n=e.selectorText.includes(`:`),r=typeof e.style.all==`string`&&e.style.all;if(r&&(t=RI(e)),n&&(t=BI(t)),n||r)return t}return t||e.cssText}function BI(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,`$1\\$2`)}function VI(e){return`styleSheet`in e}function HI(e){return`selectorText`in e}var UI=class{constructor(){AI(this,`idNodeMap`,new Map),AI(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function WI(){return new UI}function GI({maskInputOptions:e,tagName:t,type:n}){return t===`OPTION`&&(t=`SELECT`),!!(e[t.toLowerCase()]||n&&e[n]||n===`password`||t===`INPUT`&&!n&&e.text)}function KI({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||``;return e?(r&&(i=r(i,t)),`*`.repeat(i.length)):i}function qI(e){return e.toLowerCase()}function JI(e){return e.toUpperCase()}var YI=`__rrweb_original__`;function XI(e){let t=e.getContext(`2d`);if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let i=t.getImageData,a=YI in i?i[YI]:i;
489if(new Uint32Array(a.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>e!==0))return!1}return!0}function ZI(e){let t=e.type;return e.hasAttribute(`data-rr-is-password`)?`password`:t?qI(t):null}function QI(e,t,n){return t===`INPUT`&&(n===`radio`||n===`checkbox`)?e.getAttribute(`value`)||``:e.value}function $I(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}return n.pathname.match(/\.([0-9a-z]+)(?:$)/i)?.[1]??null}var eL={};function tL(e){let t=eL[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return eL[e]=r.bind(window)}function nL(...e){return tL(`setTimeout`)(...e)}function rL(...e){return tL(`clearTimeout`)(...e)}function iL(e){try{return e.contentDocument}catch{}}function aL(e){try{return e.contentWindow}catch{}}var oL=1,sL=RegExp(`[^a-z0-9-_:]`),cL=-2;function lL(){return oL++}function uL(e){if(e instanceof HTMLFormElement)return`form`;let t=qI(e.tagName);return sL.test(t)?`div`:t}function dL(e){let t=``;return t=e.indexOf(`//`)>-1?e.split(`/`).slice(0,3).join(`/`):e.split(`/`)[0],t=t.split(`?`)[0],t}var fL,pL,mL=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,hL=/^(?:[a-z+]+:)?\/\//i,gL=/^www\..*/i,_L=/^(data:)([^,]*),(.*)/i;function vL(e,t){if(!e||t.size===0)return e;try{let n=e.split(`;`),r=[];for(let e of n){if(e=e.trim(),!e)continue;let n=e.indexOf(`:`);if(n===-1){r.push(e);continue}let i=e.slice(0,n).trim();t.has(i)||r.push(e)}return r.join(`; `)+(r.length>0&&e.endsWith(`;`)?`;`:``)}catch(t){return console.warn(`Error filtering CSS properties:`,t),e}}function yL(e,t){return(e||``).replace(mL,(e,n,r,i,a,o)=>{let s=r||a||o,c=n||i||``;if(!s)return e;if(hL.test(s)||gL.test(s)||_L.test(s))return`url(${c}${s}${c})`;if(s[0]===`/`)return`url(${c}${dL(t)+s}${c})`;let l=t.split(`/`),u=s.split(`/`);l.pop();for(let e of u)if(e===`.`)continue;else e===`..`?l.pop():l.push(e);return`url(${c}${l.join(`/`)}${c})`})}var bL=/^[^ \t\n\r\u000c]+/,xL=/^[, \t\n\r\u000c]+/;function SL(e,t){if(t.trim()===``)return t;let n=0;function r(e){let r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):``}let i=[];for(;r(xL),!(n>=t.length);){let a=r(bL);if(a.slice(-1)===`,`)a=wL(e,a.substring(0,a.length-1)),i.push(a);else{let r=``;a=wL(e,a);let o=!1;for(;;){let e=t.charAt(n);if(e===``){i.push((a+r).trim());break}else if(o)e===`)`&&(o=!1);else if(e===`,`){n+=1,i.push((a+r).trim());break}else e===`(`&&(o=!0);r+=e,n+=1}}}return i.join(`, `)}var CL=new WeakMap;function wL(e,t){return!t||t.trim()===``?t:EL(e,t)}function TL(e){return!!(e.tagName===`svg`||e.ownerSVGElement)}function EL(e,t){let n=CL.get(e);if(n||(n=e.createElement(`a`),CL.set(e,n)),!t)t=``;else if(t.startsWith(`blob:`)||t.startsWith(`data:`))return t;return n.setAttribute(`href`,t),n.href}function DL(e,t,n,r,i,a,o){if(!r)return r;if(n===`src`||n===`href`&&!(t===`use`&&r[0]===`#`)||n===`xlink:href`&&r[0]!==`#`||n===`background`&&(t===`table`||t===`td`||t===`th`))return wL(e,r);if(n===`srcset`)return SL(e,r);if(n===`style`){let t=yL(r,EL(e));return o&&o.size>0&&(t=vL(t,o)),t}else if(t===`object`&&n===`data`)return wL(e,r);return typeof a==`function`?a(n,r,i):r}function OL(e,t,n){return(e===`video`||e===`audio`)&&t===`autoplay`}function kL(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t==`string`){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function AL(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function jL(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:jL(e.parentNode,t,n,r+1)}function ML(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e==`string`){if(r.matches(`.${e}`))return!0}else if(AL(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function NL(e,t,n,r,i,a){try{let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName===`INPUT`){let e=o.getAttribute(`autocomplete`);if([`current-password`,`new-password`,`cc-number`,`cc-exp`,`cc-exp-month`,`cc-exp-year`,`cc-csc`].includes(e))return!0}let s=-1,c=-1;if(a){if(c=jL(o,ML(r,i)),c<0)return!0;s=jL(o,ML(t,n),c>=0?c:1/0)}else{if(s=jL(o,ML(t,n)),s<0)return!1;c=jL(o,ML(r,i),s>=0?s:1/0)}return s>=0?c>=0?s<=c:!0:c>=0?!1:!!a}catch{}return!!a}function PL(e,t,n){let r=aL(e);if(!r)return;let i=!1,a;try{a=r.document.readyState}catch{return}if(a!==`complete`){let r=nL(()=>{i||=(t(),!0)},n);e.addEventListener(`load`,()=>{rL(r),i=!0,t()});return}let o=`about:blank`;if(r.location.href!==o||e.src===o||e.src===``)return nL(t,0),e.addEventListener(`load`,t);e.addEventListener(`load`,t)}function FL(e,t,n){let r=!1,i;try{i=e.sheet}catch{i=null}if(i)return;let a=nL(()=>{r||=(t(),!0)},n);e.addEventListener(`load`,()=>{rL(a),r=!0,t()})}function IL(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:m={}
489,maskTextFn:h,maskInputFn:g,dataURLOptions:_={},inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x=!1,ignoreCSSAttributes:S}=t,C=LL(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode===`CSS1Compat`?{type:jI.Document,childNodes:[]}:{type:jI.Document,childNodes:[],compatMode:e.compatMode};case e.DOCUMENT_TYPE_NODE:return{type:jI.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return zL(e,{doc:n,blockClass:i,blockSelector:a,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:m,maskInputFn:g,dataURLOptions:_,inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x,rootId:C,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,ignoreCSSAttributes:S});case e.TEXT_NODE:return RL(e,{doc:n,maskAllText:s,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:h,maskInputOptions:m,maskInputFn:g,rootId:C});case e.CDATA_SECTION_NODE:return{type:jI.CDATA,textContent:``,rootId:C};case e.COMMENT_NODE:return{type:jI.Comment,textContent:e.textContent||``,rootId:C};default:return!1}}function LL(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function RL(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:a,unmaskTextSelector:o,maskTextFn:s,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName,f=e.textContent,p=d===`STYLE`?!0:void 0,m=d===`SCRIPT`?!0:void 0,h=d===`TEXTAREA`?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(f=LI(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}f=yL(f,EL(t.doc))}m&&(f=`SCRIPT_PLACEHOLDER`);let g=NL(e,r,a,i,o,n);return!p&&!m&&!h&&f&&g&&(f=s?s(f,e.parentElement):f.replace(/[\S]/g,`*`)),h&&f&&(c.textarea||g)&&(f=l?l(f,e.parentNode):f.replace(/[\S]/g,`*`)),d===`OPTION`&&f&&(f=KI({isMasked:NL(e,r,a,i,o,GI({type:null,tagName:d,maskInputOptions:c})),element:e,value:f,maskInputFn:l})),{type:jI.Text,textContent:f||``,isStyle:p,rootId:u}}function zL(e,t){let{doc:n,blockClass:r,blockSelector:i,unblockSelector:a,inlineStylesheet:o,maskInputOptions:s={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:h,maskTextClass:g,unmaskTextClass:_,maskTextSelector:v,unmaskTextSelector:y,ignoreCSSAttributes:b}=t,x=kL(e,r,i,a),S=uL(e),C={},w=e.attributes.length;for(let t=0;t<w;t++){let r=e.attributes[t];r.name&&!OL(S,r.name,r.value)&&(C[r.name]=DL(n,S,qI(r.name),r.value,e,c,b))}if(S===`link`&&o){let t=Array.from(n.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=LI(t)),r&&(C.rel=null,C.href=null,C.crossorigin=null,C._cssText=yL(r,t.href))}if(S===`style`&&e.sheet&&!(e.innerText||e.textContent||``).trim().length){let t=LI(e.sheet);t&&(C._cssText=yL(t,EL(n)))}if(S===`input`||S===`textarea`||S===`select`||S===`option`){let t=e,n=ZI(t),r=QI(t,JI(S),n),i=t.checked;if(n!==`submit`&&n!==`button`&&r){let e=NL(t,g,v,_,y,GI({type:n,tagName:JI(S),maskInputOptions:s}));C.value=KI({isMasked:e,element:t,value:r,maskInputFn:l})}i&&(C.checked=i)}if(S===`option`&&(e.selected&&!s.select?C.selected=!0:delete C.selected),S===`canvas`&&f){if(e.__context===`2d`)XI(e)||(C.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!(`__context`in e)){let t=e.toDataURL(u.type,u.quality),r=n.createElement(`canvas`);r.width=e.width,r.height=e.height,t!==r.toDataURL(u.type,u.quality)&&(C.rr_dataURL=t)}}if(S===`img`&&d){fL||(fL=n.createElement(`canvas`),pL=fL.getContext(`2d`));let t=e,r=t.currentSrc||t.getAttribute(`src`)||`<unknown-src>`,i=t.crossOrigin,a=()=>{t.removeEventListener(`load`,a);try{fL.width=t.naturalWidth,fL.height=t.naturalHeight,pL.drawImage(t,0,0),C.rr_dataURL=fL.toDataURL(u.type,u.quality)}catch(e){if(t.crossOrigin!==`anonymous`){t.crossOrigin=`anonymous`,t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a);return}else console.warn(`Cannot inline img src=${r}! Error: ${e}`)}t.crossOrigin===`anonymous`&&(i?C.crossOrigin=i:t.removeAttribute(`crossorigin`))};
489t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a)}if((S===`audio`||S===`video`)&&(C.rr_mediaState=e.paused?`paused`:`played`,C.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),x){let{width:t,height:n}=e.getBoundingClientRect();C={class:C.class,rr_width:`${t}px`,rr_height:`${n}px`}}S===`iframe`&&!p(C.src)&&(!x&&!iL(e)&&(C.rr_src=C.src),delete C.src);let T;try{customElements.get(S)&&(T=!0)}catch{}return{type:jI.Element,tagName:S,attributes:C,childNodes:[],isSVG:TL(e)||void 0,needBlock:x,rootId:h,isCustom:T}}function BL(e){return e==null?``:e.toLowerCase()}function VL(e,t){return!!(t.comment&&e.type===jI.Comment||e.type===jI.Element&&(t.script&&(e.tagName===`script`||e.tagName===`link`&&(e.attributes.rel===`preload`||e.attributes.rel===`modulepreload`)||e.tagName===`link`&&e.attributes.rel===`prefetch`&&typeof e.attributes.href==`string`&&$I(e.attributes.href)===`js`)||t.headFavicon&&(e.tagName===`link`&&e.attributes.rel===`shortcut icon`||e.tagName===`meta`&&(BL(e.attributes.name).match(/^msapplication-tile(image|color)$/)||BL(e.attributes.name)===`application-name`||BL(e.attributes.rel)===`icon`||BL(e.attributes.rel)===`apple-touch-icon`||BL(e.attributes.rel)===`shortcut icon`))||e.tagName===`meta`&&(t.headMetaDescKeywords&&BL(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(BL(e.attributes.property).match(/^(og|twitter|fb):/)||BL(e.attributes.name).match(/^(og|twitter):/)||BL(e.attributes.name)===`pinterest`)||t.headMetaRobots&&(BL(e.attributes.name)===`robots`||BL(e.attributes.name)===`googlebot`||BL(e.attributes.name)===`bingbot`)||t.headMetaHttpEquiv&&e.attributes[`http-equiv`]!==void 0||t.headMetaAuthorship&&(BL(e.attributes.name)===`author`||BL(e.attributes.name)===`generator`||BL(e.attributes.name)===`framework`||BL(e.attributes.name)===`publisher`||BL(e.attributes.name)===`progid`||BL(e.attributes.property).match(/^article:/)||BL(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(BL(e.attributes.name)===`google-site-verification`||BL(e.attributes.name)===`yandex-verification`||BL(e.attributes.name)===`csrf-token`||BL(e.attributes.name)===`p:domain_verify`||BL(e.attributes.name)===`verify-v1`||BL(e.attributes.name)===`verification`||BL(e.attributes.name)===`shopify-checkout-api-token`))))}function HL(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:m={},maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y={},inlineImages:b=!1,recordCanvas:x=!1,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w=5e3,onBlockedImageLoad:T,onStylesheetLoad:E,stylesheetLoadTimeout:D=5e3,keepIframeSrcFn:ee=()=>!1,newlyAddedElement:te=!1,ignoreCSSAttributes:O}=t,{preserveWhiteSpace:k=!0}=t,ne=IL(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,dataURLOptions:y,inlineImages:b,recordCanvas:x,keepIframeSrcFn:ee,newlyAddedElement:te,ignoreCSSAttributes:O});if(!ne)return console.warn(e,`not serialized`),null;let re;re=r.hasNode(e)?r.getId(e):VL(ne,v)||!k&&ne.type===jI.Text&&!ne.isStyle&&!ne.textContent.trim().length?cL:lL();let A=Object.assign(ne,{id:re});if(r.add(e,A),re===cL)return null;S&&S(e);let ie=!f;if(A.type===jI.Element){ie&&=!A.needBlock;let t=e.shadowRoot;t&&PI(t)&&(A.isShadowHost=!0)}if((A.type===jI.Document||A.type===jI.Element)&&ie){v.headWhitespace&&A.type===jI.Element&&A.tagName===`head`&&(k=!1);let t={doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:k,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onBlockedImageLoad:T,onStylesheetLoad:E,stylesheetLoadTimeout:D,keepIframeSrcFn:ee,ignoreCSSAttributes:O},te=e.childNodes?Array.from(e.childNodes):[];for(let e of te){let n=HL(e,t);n&&A.childNodes.push(n)}if(MI(e)&&e.shadowRoot)for(let n of Array.from(e.shadowRoot.childNodes)){let r=HL(n,t);r&&(PI(e.shadowRoot)&&(r.isShadow=!0),A.childNodes.push(r))}}if(e.parentNode&&NI(e.parentNode)&&PI(e.parentNode)&&(A.isShadow=!0),A.type===jI.Element&&A.tagName===`iframe`&&!A.needBlock&&PL(e,()=>{let t=iL(e);if(t&&C){let n=HL(t,{doc:t,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:k,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:E,stylesheetLoadTimeout:D,keepIframeSrcFn:ee,ignoreCSSAttributes:O});n&&C(e,n)}},w),A.type===jI.Element&&A.tagName===`img`&&!e.complete&&A.needBlock){let t=e,n=()=>
489{if(t.isConnected&&!t.complete&&T)try{let e=t.getBoundingClientRect();e.width>0&&e.height>0&&T(t,A,e)}catch{}t.removeEventListener(`load`,n)};t.isConnected&&t.addEventListener(`load`,n)}return A.type===jI.Element&&A.tagName===`link`&&typeof A.attributes.rel==`string`&&(A.attributes.rel===`stylesheet`||A.attributes.rel===`preload`&&typeof A.attributes.href==`string`&&$I(A.attributes.href)===`css`)&&FL(e,()=>{if(E){let t=HL(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:k,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:E,stylesheetLoadTimeout:D,keepIframeSrcFn:ee,ignoreCSSAttributes:O});t&&E(e,t)}},D),A.type===jI.Element&&delete A.needBlock,A}function UL(e,t){let{mirror:n=new UI,blockClass:r=`rr-block`,blockSelector:i=null,unblockSelector:a=null,maskAllText:o=!1,maskTextClass:s=`rr-mask`,unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:m=!1,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOM:v=!1,dataURLOptions:y,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onBlockedImageLoad:w,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:ee=new Set([])}=t||{};return HL(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,maskAllText:o,maskTextClass:s,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:m===!1?{}:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v===!0||v===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:v===`all`,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:v===!1?{}:v,dataURLOptions:y,inlineImages:f,recordCanvas:p,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onBlockedImageLoad:w,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:D,newlyAddedElement:!1,ignoreCSSAttributes:ee})}function WL(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var GL=`Please stop import mirror directly. Instead of that,\r 490now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 491or you can use record.mirror to access the mirror instance during recording.`,KL={map:{},getId(){return console.error(GL),-1},getNode(){return console.error(GL),null},removeNodeFromMap(){console.error(GL)},has(){return console.error(GL),!1},reset(){console.error(GL)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(KL=new Proxy(KL,{get(e,t,n){return t===`map`&&console.error(GL),Reflect.get(e,t,n)}}));function qL(e,t,n={}){let r=null,i=0;return function(...a){let o=Date.now();!i&&n.leading===!1&&(i=o);let s=t-(o-i),c=this;s<=0||s>t?(r&&=(yR(r),null),i=o,e.apply(c,a)):!r&&n.trailing!==!1&&(r=vR(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,a)},s))}}function JL(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){vR(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>JL(e,t,a||{},!0)}function YL(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var XL=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(XL=()=>new Date().getTime());function ZL(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset===void 0?t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0:e.pageXOffset,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset===void 0?t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0:e.pageYOffset}}function QL(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function $L(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function eR(e){if(!e)return null;
491try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function tR(e,t,n,r,i){if(!e)return!1;let a=eR(e);if(!a)return!1;let o=ML(t,n);if(!i){let e=r&&a.matches(r);return o(a)&&!e}let s=jL(a,o),c=-1;return s<0?!1:(r&&(c=jL(a,ML(null,r))),s>-1&&c<0?!0:s<c)}function nR(e,t){return t.getId(e)!==-1}function rR(e,t){return t.getId(e)===cL}function iR(e,t){if(NI(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?iR(e.parentNode,t):!0:!0}function aR(e){return!!e.changedTouches}function oR(e=window){`NodeList`in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),`DOMTokenList`in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw TypeError(`1 argument is required`);do if(this===t)return!0;while(t&&=t.parentNode);return!1})}function sR(e,t){return!!(e.nodeName===`IFRAME`&&t.getMeta(e))}function cR(e,t){return!!(e.nodeName===`LINK`&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute(`rel`)===`stylesheet`&&t.getMeta(e))}function lR(e){return!!e?.shadowRoot}var uR=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=t===void 0?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function dR(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function fR(e){let t=e,n;for(;n=dR(t);)t=n;return t}function pR(e){let t=e.ownerDocument;if(!t)return!1;let n=fR(e);return t.contains(n)}function mR(e){let t=e.ownerDocument;return t?t.contains(e)||pR(e):!1}var hR={};function gR(e){let t=hR[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return hR[e]=r.bind(window)}function _R(...e){return gR(`requestAnimationFrame`)(...e)}function vR(...e){return gR(`setTimeout`)(...e)}function yR(...e){return gR(`clearTimeout`)(...e)}var Q=(e=>(e[e.DomContentLoaded=0]=`DomContentLoaded`,e[e.Load=1]=`Load`,e[e.FullSnapshot=2]=`FullSnapshot`,e[e.IncrementalSnapshot=3]=`IncrementalSnapshot`,e[e.Meta=4]=`Meta`,e[e.Custom=5]=`Custom`,e[e.Plugin=6]=`Plugin`,e))(Q||{}),bR=(e=>(e[e.Mutation=0]=`Mutation`,e[e.MouseMove=1]=`MouseMove`,e[e.MouseInteraction=2]=`MouseInteraction`,e[e.Scroll=3]=`Scroll`,e[e.ViewportResize=4]=`ViewportResize`,e[e.Input=5]=`Input`,e[e.TouchMove=6]=`TouchMove`,e[e.MediaInteraction=7]=`MediaInteraction`,e[e.StyleSheetRule=8]=`StyleSheetRule`,e[e.CanvasMutation=9]=`CanvasMutation`,e[e.Font=10]=`Font`,e[e.Log=11]=`Log`,e[e.Drag=12]=`Drag`,e[e.StyleDeclaration=13]=`StyleDeclaration`,e[e.Selection=14]=`Selection`,e[e.AdoptedStyleSheet=15]=`AdoptedStyleSheet`,e[e.CustomElement=16]=`CustomElement`,e))(bR||{}),xR=(e=>(e[e.MouseUp=0]=`MouseUp`,e[e.MouseDown=1]=`MouseDown`,e[e.Click=2]=`Click`,e[e.ContextMenu=3]=`ContextMenu`,e[e.DblClick=4]=`DblClick`,e[e.Focus=5]=`Focus`,e[e.Blur=6]=`Blur`,e[e.TouchStart=7]=`TouchStart`,e[e.TouchMove_Departed=8]=`TouchMove_Departed`,e[e.TouchEnd=9]=`TouchEnd`,e[e.TouchCancel=10]=`TouchCancel`,e))(xR||{}),SR=(e=>(e[e.Mouse=0]=`Mouse`,e[e.Pen=1]=`Pen`,e[e.Touch=2]=`Touch`,e))(SR||{}),CR=(e=>(e[e.Play=0]=`Play`,e[e.Pause=1]=`Pause`,e[e.Seeked=2]=`Seeked`,e[e.VolumeChange=3]=`VolumeChange`,e[e.RateChange=4]=`RateChange`,e))(CR||{}),wR;function TR(e){wR=e}function ER(){wR=void 0}for(var $=e=>wR?((...t)=>{try{return e(...t)}catch(e){if(wR&&wR(e)===!0)return()=>{};throw e}}):e,DR=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,OR=typeof Uint8Array>`u`?[]:new Uint8Array(256),kR=0;kR<DR.length;
491kR++)OR[DR.charCodeAt(kR)]=kR;var AR=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}};function jR(e){try{return e.contentDocument}catch{}}function MR(e){try{return e.contentWindow}catch{}}var NR=class{constructor(e){this.doc=e,this.unattachedDoc=null}parse(e){return this.parseWithConstructableStylesheet(e)||this.parseWithDetachedElement(e)}parseWithConstructableStylesheet(e){if(typeof CSSStyleSheet>`u`||typeof CSSStyleSheet.prototype.replaceSync!=`function`)return null;try{let t=new CSSStyleSheet;t.replaceSync(`x { ${e} }`);let n=t.cssRules[0];return!n||n.type!==CSSRule.STYLE_RULE?null:n.style}catch{return null}}parseWithDetachedElement(e){let t=this.getUnattachedDoc().createElement(`span`);return t.setAttribute(`style`,e),t.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}};function PR(e){return`__ln`in e}var FR=class{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error(`Position outside of list range`);let t=this.head;for(let n=0;n<e;n++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&PR(e.previousSibling)){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&PR(e.nextSibling)&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},IR=(e,t)=>`${e}@${t}`,LR=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,n=new FR,r=e=>{let t=e,n=cL;for(;n===cL;)t&&=t.nextSibling,n=t&&this.mirror.getId(t);return n},i=i=>{if(!i.parentNode||!mR(i))return;let a=NI(i.parentNode)?this.mirror.getId(dR(i)):this.mirror.getId(i.parentNode),o=r(i);if(a===-1||o===-1)return n.addNode(i);let s=HL(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{sR(e,this.mirror)&&!tR(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),cR(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),lR(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{if(tR(e,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(e,t);let n=MR(e);n&&this.canvasManager.addWindow(n),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});s&&(e.push({parentId:a,nextId:o,node:s}),t.add(s.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)zR(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||i(e);for(let e of this.addedSet)!VR(this.droppedSet,e)&&!zR(this.removes,e,this.mirror)||V
491R(this.movedSet,e)?i(e):this.droppedSet.add(e);let a=null;for(;n.length;){let e=null;if(a){let t=this.mirror.getId(a.value.parentNode),n=r(a.value);t!==-1&&n!==-1&&(e=a)}if(!e){let t=n.tail;for(;t;){let n=t;if(t=t.previous,n){let t=this.mirror.getId(n.value.parentNode);if(r(n.value)===-1)continue;if(t!==-1){e=n;break}else{let t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=t.parentNode.host;if(this.mirror.getId(r)!==-1){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}a=e.previous,n.removeNode(e.value),i(e.value)}let o={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if(typeof t.style==`string`){let n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split(`var(`).length===t.style.split(`var(`).length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};!o.texts.length&&!o.attributes.length&&!o.removes.length&&!o.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(o))},this.processMutation=e=>{if(!rR(e.target,this.mirror))switch(e.type){case`characterData`:{let t=e.target.textContent;!tR(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:NL(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,eR(e.target)):t.replace(/[\S]/g,`*`):t,node:e.target});break}case`attributes`:{let t=e.target,n=e.attributeName,r=e.target.getAttribute(n);if(n===`value`){let n=ZI(t),i=t.tagName;r=QI(t,i,n);let a=GI({maskInputOptions:this.maskInputOptions,tagName:i,type:n});r=KI({isMasked:NL(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a),element:t,value:r,maskInputFn:this.maskInputFn})}if(tR(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let i=this.attributeMap.get(e.target);if(t.tagName===`IFRAME`&&n===`src`&&!this.keepIframeSrcFn(r))if(!jR(t))n=`rr_src`;else return;if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}}
491,this.attributes.push(i),this.attributeMap.set(e.target,i)),n===`type`&&t.tagName===`INPUT`&&(e.oldValue||``).toLowerCase()===`password`&&t.setAttribute(`data-rr-is-password`,`true`),!OL(t.tagName,n)&&(i.attributes[n]=DL(this.doc,qI(t.tagName),qI(n),r,t,this.maskAttributeFn),n===`style`)){let n=e.oldValue?this.styleDeclarationParser.parse(e.oldValue):null;for(let e of Array.from(t.style)){let r=t.style.getPropertyValue(e),a=t.style.getPropertyPriority(e);r!==(n?.getPropertyValue(e)||``)||a!==(n?.getPropertyPriority(e)||``)?a===``?i.styleDiff[e]=r:i.styleDiff[e]=[r,a]:i._unchangedStyles[e]=[r,a]}if(n)for(let e of Array.from(n))t.style.getPropertyValue(e)===``&&(i.styleDiff[e]=!1)}break}case`childList`:if(tR(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),r=NI(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);tR(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||rR(t,this.mirror)||!nR(t,this.mirror)||(this.addedSet.has(t)?(RR(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||iR(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[IR(n,r)]?RR(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:NI(e.target)&&PI(e.target)?!0:void 0})),this.mapRemoves.push(t))});break}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(rR(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[IR(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);tR(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(e=>this.genAdds(e)),lR(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){`mutationCb.blockClass.blockSelector.unblockSelector.maskAllText.maskTextClass.unmaskTextClass.maskTextSelector.unmaskTextSelector.inlineStylesheet.maskInputOptions.maskAttributeFn.maskTextFn.maskInputFn.keepIframeSrcFn.recordCanvas.inlineImages.slimDOMOptions.dataURLOptions.doc.mirror.iframeManager.stylesheetManager.shadowDomManager.canvasManager.processedNodeManager.ignoreCSSAttributes`.split(`.`).forEach(t=>{this[t]=e[t]}),this.styleDeclarationParser=new NR(this.doc)}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function RR(e,t){e.delete(t),t.childNodes?.forEach(t=>RR(e,t))}function zR(e,t,n){return e.length===0?!1:BR(e,t,n)}function BR(e,t,n){let r=t.parentNode;for(;r;){let t=n.getId(r);if(e.some(e=>e.id===t))return!0;r=r.parentNode}return!1}function VR(e,t){return e.size===0?!1:HR(e,t)}function HR(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:HR(e,n):!1}var UR=[];function WR(e){try{if(`composedPath`in e){let t=e.composedPath();if(t.length)return t[0]}else if(`path`in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function GR(e,t){let n=new LR;UR.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver,i=window?.Zone?.__symbol__?.(`MutationObserver`);i&&window[i]&&(r=window[i]);let a=new r($(t=>{e.onMutation&&e.onMutation(t)===!1||n.processMutations.bind(n)(t)}));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function KR({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let i=typeof t.mousemove==`number`?t.mousemove:50,a=typeof t.mousemoveCallback==`number`?t.mousemoveCallback:500,o=[],s,c=qL($(t=>{let n=Date.now()-s;e(o.map(e=>(e.timeOffset-=n,e)),t),o=[],s=null}),a),l=$(qL($(e=>{let t=WR(e),{clientX:n,clientY:i}=aR(e)?e.changedTouches[0]:e;s||=XL(),o.push({x:n,y:i,id:r.getId(t),timeOffset:XL()-s}),c(typeof DragEvent<`u`&&e instanceof DragEvent?bR.Drag:e instanceof MouseEvent?bR.MouseMove:bR.TouchMove)}),i,{trailing:!1})),u=[WL(`mousemove`,l,n),WL(`touchmove`,l,n),WL(`drag`,l,n)];return $(()=>
491{u.forEach(e=>e())})}function qR({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],l=null,u=t=>o=>{let s=WR(o);if(tR(s,r,i,a,!0))return;let c=null,u=t;if(`pointerType`in o){switch(o.pointerType){case`mouse`:c=SR.Mouse;break;case`touch`:c=SR.Touch;break;case`pen`:c=SR.Pen;break}c===SR.Touch?xR[t]===xR.MouseDown?u=`TouchStart`:xR[t]===xR.MouseUp&&(u=`TouchEnd`):SR.Pen}else aR(o)&&(c=SR.Touch);c===null?xR[t]===xR.Click&&(c=l,l=null):(l=c,(u.startsWith(`Touch`)&&c===SR.Touch||u.startsWith(`Mouse`)&&c===SR.Mouse)&&(c=null));let d=aR(o)?o.changedTouches[0]:o;if(!d)return;let f=n.getId(s),{clientX:p,clientY:m}=d;$(e)({type:xR[u],id:f,x:p,y:m,...c!==null&&{pointerType:c}})};return Object.keys(xR).filter(e=>Number.isNaN(Number(e))&&!e.endsWith(`_Departed`)&&s[e]!==!1).forEach(e=>{let n=qI(e),r=u(e);if(window.PointerEvent)switch(xR[e]){case xR.MouseDown:case xR.MouseUp:n=n.replace(`mouse`,`pointer`);break;case xR.TouchStart:case xR.TouchEnd:return}c.push(WL(n,r,t))}),$(()=>{c.forEach(e=>e())})}function JR({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){return WL(`scroll`,$(qL($(o=>{let s=WR(o);if(!s||tR(s,r,i,a,!0))return;let c=n.getId(s);if(s===t&&t.defaultView){let n=ZL(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:s.scrollLeft,y:s.scrollTop})}),o.scroll||100)),t)}function YR({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return WL(`resize`,$(qL($(()=>{let t=QL(),i=$L();(n!==t||r!==i)&&(e({width:Number(i),height:Number(t)}),n=t,r=i)}),200)),t)}var XR=[`INPUT`,`TEXTAREA`,`SELECT`],ZR=new WeakMap;function QR({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,ignoreClass:o,ignoreSelector:s,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:h}){function g(e){let n=WR(e),u=e.isTrusted,g=n&&JI(n.tagName);if(g===`OPTION`&&(n=n.parentElement),!n||!g||XR.indexOf(g)<0||tR(n,r,i,a,!0))return;let v=n;if(v.classList.contains(o)||s&&v.matches(s))return;let y=ZI(n),b=QI(v,g,y),x=!1,S=GI({maskInputOptions:c,tagName:g,type:y}),C=NL(n,f,m,p,h,S);(y===`radio`||y===`checkbox`)&&(x=n.checked),b=KI({isMasked:C,element:n,value:b,maskInputFn:l}),_(n,d?{text:b,isChecked:x,userTriggered:u}:{text:b,isChecked:x});let w=n.name;y===`radio`&&w&&x&&t.querySelectorAll(`input[type="radio"][name="${w}"]`).forEach(e=>{if(e!==n){let t=KI({isMasked:C,element:e,value:QI(e,g,y),maskInputFn:l});_(e,d?{text:t,isChecked:!x,userTriggered:!1}:{text:t,isChecked:!x})}})}function _(t,r){let i=ZR.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){ZR.set(t,r);let i=n.getId(t);$(e)({...r,id:i})}}let v=(u.input===`last`?[`change`]:[`input`,`change`]).map(e=>WL(e,$(g),t)),y=t.defaultView;if(!y)return()=>{v.forEach(e=>e())};let b=y.Object.getOwnPropertyDescriptor(y.HTMLInputElement.prototype,`value`),x=[[y.HTMLInputElement.prototype,`value`],[y.HTMLInputElement.prototype,`checked`],[y.HTMLSelectElement.prototype,`value`],[y.HTMLTextAreaElement.prototype,`value`],[y.HTMLSelectElement.prototype,`selectedIndex`],[y.HTMLOptionElement.prototype,`selected`]];return b&&b.set&&v.push(...x.map(e=>JL(e[0],e[1],{set(){$(g)({target:this,isTrusted:!1})}},!1,y))),$(()=>{v.forEach(e=>e())})}function $R(e){let t=[];function n(e,t){if(lz(`CSSGroupingRule`)&&e.parentRule instanceof CSSGroupingRule||lz(`CSSMediaRule`)&&e.parentRule instanceof CSSMediaRule||lz(`CSSSupportsRule`)&&e.parentRule instanceof CSSSupportsRule||lz(`CSSConditionRule`)&&e.parentRule instanceof CSSConditionRule){let n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){let n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}return n(e,t)}function ez(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function tz({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:$((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=ez(i,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:s}]}),r.apply(i,a)})});let a=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:$((r,i,a)=>{let[o]=a,{id:s,styleId:c}=ez(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:o}]}),r.apply(i,a)})});let o;
491r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:$((r,i,a)=>{let[o]=a,{id:s,styleId:c}=ez(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replace:o}),r.apply(i,a)})}));let s;r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:$((r,i,a)=>{let[o]=a,{id:s,styleId:c}=ez(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replaceSync:o}),r.apply(i,a)})}));let c={};uz(`CSSGroupingRule`)?c.CSSGroupingRule=r.CSSGroupingRule:(uz(`CSSMediaRule`)&&(c.CSSMediaRule=r.CSSMediaRule),uz(`CSSConditionRule`)&&(c.CSSConditionRule=r.CSSConditionRule),uz(`CSSSupportsRule`)&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([r,i])=>{l[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(l[r].insertRule,{apply:$((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=ez(i.parentStyleSheet,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:[...$R(i),s||0]}]}),r.apply(i,a)})}),i.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:$((r,i,a)=>{let[o]=a,{id:s,styleId:c}=ez(i.parentStyleSheet,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:[...$R(i),o]}]}),r.apply(i,a)})})}),$(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=a,o&&(r.CSSStyleSheet.prototype.replace=o),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}function nz({mirror:e,stylesheetManager:t},n){let r=null;r=n.nodeName===`#document`?e.getId(n):e.getId(n.host);let i=n.nodeName===`#document`?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,a=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,`adoptedStyleSheets`):void 0;return r===null||r===-1||!i||!a?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){return a.get?.call(this)},set(e){let n=a.set?.call(this,e);if(r!==null&&r!==-1)try{t.adoptStyleSheets(e,r)}catch{}return n}}),$(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function rz({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:$((i,o,s)=>{let[c,l,u]=s;if(n.has(c))return a.apply(o,[c,l,u]);let{id:d,styleId:f}=ez(o.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,set:{property:c,value:l,priority:u},index:$R(o.parentRule)}),i.apply(o,s)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:$((i,a,s)=>{let[c]=s;if(n.has(c))return o.apply(a,[c]);let{id:l,styleId:u}=ez(a.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||u&&u!==-1)&&e({id:l,styleId:u,remove:{property:c},index:$R(a.parentRule)}),i.apply(a,s)})}),$(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function iz({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:a,doc:o}){let s=$(o=>qL($(a=>{let s=WR(a);if(!s||tR(s,t,n,r,!0))return;let{currentTime:c,volume:l,muted:u,playbackRate:d}=s;e({type:o,id:i.getId(s),currentTime:c,volume:l,muted:u,playbackRate:d})}),a.media||500)),c=[WL(`play`,s(CR.Play),o),WL(`pause`,s(CR.Pause),o),WL(`seeked`,s(CR.Seeked),o),WL(`volumechange`,s(CR.VolumeChange),o),WL(`ratechange`,s(CR.RateChange),o)];return $(()=>{c.forEach(e=>e())})}function az({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,n){let r=new a(e,t,n);return i.set(r,{family:e,buffer:typeof t!=`string`,descriptors:n,fontSource:typeof t==`string`?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let o=YL(t.fonts,`add`,function(t){return function(n){return vR($(()=>{let t=i.get(n);t&&(e(t),i.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=a}),r.push(o),$(()=>
491{r.forEach(e=>e())})}function oz(e){let{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,selectionCb:o}=e,s=!0,c=$(()=>{let e=t.getSelection();if(!e||s&&e?.isCollapsed)return;s=e.isCollapsed||!1;let c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){let{startContainer:o,startOffset:s,endContainer:l,endOffset:u}=e.getRangeAt(t);tR(o,r,i,a,!0)||tR(l,r,i,a,!0)||c.push({start:n.getId(o),startOffset:s,end:n.getId(l),endOffset:u})}o({ranges:c})});return c(),WL(`selectionchange`,c)}function sz({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:YL(n.customElements,`define`,function(e){return function(n,r,i){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,i])}})}function cz(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=GR(e,e.doc));let i=KR(e),a=qR(e),o=JR(e),s=YR(e,{win:n}),c=QR(e),l=iz(e),u=()=>{},d=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(u=tz(e,{win:n}),d=nz(e,e.doc),f=rz(e,{win:n}),e.collectFonts&&(p=az(e)));let m=oz(e),h=sz(e),g=[];for(let t of e.plugins)g.push(t.observer(t.callback,n,t.options));return $(()=>{UR.forEach(e=>e.reset()),r?.disconnect(),i(),a(),o(),s(),c(),l(),u(),d(),f(),p(),m(),h(),g.forEach(e=>e())})}function lz(e){return window[e]!==void 0}function uz(e){return!!(window[e]!==void 0&&window[e].prototype&&`insertRule`in window[e].prototype&&`deleteRule`in window[e].prototype)}var dz=class{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){let i=n||this.getIdToRemoteIdMap(e),a=r||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),a.set(o,t)),o}getIds(e,t){let n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}
491getRemoteId(e,t,n){let r=n||this.getRemoteIdToIdMap(e);return typeof t==`number`?r.get(t)||-1:t}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},fz=class{constructor(){this.crossOriginIframeMirror=new dz(lL),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},pz=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},mz=class{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new uR,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){`_cssText`in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:zI(e),index:t}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},hz=class{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,_R(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},gz,_z;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}var vz=WI();function yz(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i=`rr-block`,blockSelector:a=null,unblockSelector:o=null,ignoreClass:s=`rr-ignore`,ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u=`rr-mask`,unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:m=!0,maskAllInputs:h,maskInputOptions:g,slimDOMOptions:_,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,maxCanvasSize:x=null,packFn:S,sampling:C={},dataURLOptions:w={},mousemoveWait:T,recordDOM:E=!0,recordCanvas:D=!1,recordCrossOriginIframes:ee=!1,recordAfter:te=e.recordAfter===`DOMContentLoaded`?e.recordAfter:`load`,userTriggeredOnInput:O=!1,collectFonts:k=!1,inlineImages:ne=!1,plugins:re,keepIframeSrcFn:A=()=>!1,ignoreCSSAttributes:ie=new Set([]),errorHandler:ae,onMutation:j,getCanvasManager:oe}=e;TR(ae);let se=ee?window.parent===window:!0,ce=!1;if(!se)try{window.parent.document&&(ce=!1)}catch{ce=!0}if(se&&!t)throw Error(`emit function is required`);if(!se&&!ce)return()=>{};T!==void 0&&C.mousemove===void 0&&(C.mousemove=T),vz.reset();let le=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g===void 0?{}:g,ue=_===!0||_===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:_===`all`,headMetaDescKeywords:_===`all`}:_||{};oR();let de,fe=0,pe=e=>{for(let t of re||[])t.eventProcessor&&(e=t.eventProcessor(e));return S&&!ce&&(e=S(e)),e};gz=(e,i)=>{let a=e;if(a.timestamp=XL(),UR[0]?.isFrozen()&&a.type!==Q.FullSnapshot&&!(a.type===Q.IncrementalSnapshot&&a.data.source===bR.Mutation)&&UR.forEach(e=>e.unfreeze()),se)t?.(pe(a),i);else if(ce){let e={type:`rrweb`,event:pe(a),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,`*`)}if(a.type===Q.FullSnapshot)de=a,fe=0;else if(a.type===Q.IncrementalSnapshot){if(a.data.source===bR.Mutation&&a.data.isAttachIframe)return;fe++;let e=r&&fe>=r,t=n&&de&&a.timestamp-de.timestamp>n;(e||t)&&Se(!0)}};let me=e=>{gz({type:Q.IncrementalSnapshot,data:{source:bR.Mutation,...e}})},he=e=>gz({type:Q.IncrementalSnapshot,data:{source:bR.Scroll,...e}}),ge=e=>gz({type:Q.IncrementalSnapshot,data:{source:bR.CanvasMutation,...e}}),_e=new mz({mutationCb:me,adoptedStyleSheetCb:e=>gz({type:Q.IncrementalSnapshot,data:{source:bR.AdoptedStyleSheet,...e}})}),ve=new fz;for(let e of re||[])e.getMirror&&e.getMirror({nodeMirror:vz,crossOriginIframeMirror:ve.crossOriginIframeMirror,crossOriginIframeStyleMirror:ve.crossOriginIframeStyleMirror});let ye=new hz,be=xz(oe,{mirror:vz,win:window,mutationCb:e=>gz({type:Q.IncrementalSnapshot,data:{source:bR.CanvasMutation,...e}}),recordCanvas:D,blockClass:i,blockSelector:a,unblockSelector:o,maxCanvasSize:x,sampling:C.canvas,dataURLOptions:w,errorHandler:ae}),xe=new pz,Se=(e=!1)=>
491{if(!E)return;gz({type:Q.Meta,data:{href:window.location.href,width:$L(),height:QL()}},e),_e.reset(),xe.init(),UR.forEach(e=>e.lock());let t=UL(document,{mirror:vz,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskAllInputs:le,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,slimDOM:ue,dataURLOptions:w,recordCanvas:D,inlineImages:ne,onSerialize:e=>{sR(e,vz)&&ve.addIframe(e),cR(e,vz)&&_e.trackLinkElement(e),lR(e)&&xe.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{ve.attachIframe(e,t);let n=MR(e);n&&be.addWindow(n),xe.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{_e.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{me({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},keepIframeSrcFn:A,ignoreCSSAttributes:ie});if(!t)return console.warn(`Failed to snapshot the document`);gz({type:Q.FullSnapshot,data:{node:t,initialOffset:ZL(window)}}),UR.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&_e.adoptStyleSheets(document.adoptedStyleSheets,vz.getId(document))};_z=Se;try{let e=[],t=e=>$(cz)({onMutation:j,mutationCb:me,mousemoveCb:(e,t)=>gz({type:Q.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>gz({type:Q.IncrementalSnapshot,data:{source:bR.MouseInteraction,...e}}),scrollCb:he,viewportResizeCb:e=>gz({type:Q.IncrementalSnapshot,data:{source:bR.ViewportResize,...e}}),inputCb:e=>gz({type:Q.IncrementalSnapshot,data:{source:bR.Input,...e}}),mediaInteractionCb:e=>gz({type:Q.IncrementalSnapshot,data:{source:bR.MediaInteraction,...e}}),styleSheetRuleCb:e=>gz({type:Q.IncrementalSnapshot,data:{source:bR.StyleSheetRule,...e}}),styleDeclarationCb:e=>gz({type:Q.IncrementalSnapshot,data:{source:bR.StyleDeclaration,...e}}),canvasMutationCb:ge,fontCb:e=>gz({type:Q.IncrementalSnapshot,data:{source:bR.Font,...e}}),selectionCb:e=>{gz({type:Q.IncrementalSnapshot,data:{source:bR.Selection,...e}})},customElementCb:e=>{gz({type:Q.IncrementalSnapshot,data:{source:bR.CustomElement,...e}})},blockClass:i,ignoreClass:s,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:le,inlineStylesheet:m,sampling:C,recordDOM:E,recordCanvas:D,inlineImages:ne,userTriggeredOnInput:O,collectFonts:k,doc:e,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,keepIframeSrcFn:A,blockSelector:a,unblockSelector:o,slimDOMOptions:ue,dataURLOptions:w,mirror:vz,iframeManager:ve,stylesheetManager:_e,shadowDomManager:xe,processedNodeManager:ye,canvasManager:be,ignoreCSSAttributes:ie,plugins:re?.filter(e=>e.observer)?.map(e=>({observer:e.observer,options:e.options,callback:t=>gz({type:Q.Plugin,data:{plugin:e.name,payload:t}})}))||[]},{});ve.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{Se(),e.push(t(document))};return document.readyState===`interactive`||document.readyState===`complete`?n():(e.push(WL(`DOMContentLoaded`,()=>{gz({type:Q.DomContentLoaded,data:{}}),te===`DOMContentLoaded`&&n()})),e.push(WL(`load`,()=>{gz({type:Q.Load,data:{}}),te===`load`&&n()},window))),()=>{e.forEach(e=>e()),ye.destroy(),_z=void 0,ER()}}catch(e){console.warn(e)}}function bz(e){if(!_z)throw Error(`please take full snapshot after start recording`);_z(e)}yz.mirror=vz,yz.takeFullSnapshot=bz;function xz(e,t){try{return e?e(t):new AR}catch{return console.warn(`Unable to initialize CanvasManager`),new AR}}var Sz;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(Sz||={});var Cz=3,wz=5;function Tz(e){return e>9999999999?e:e*1e3}function Ez(e){return e>9999999999?e/1e3:e}function Dz(e,t){t.category!==`sentry.transaction`&&([`ui.click`,`ui.input`].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Q.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:`breadcrumb`,payload:sp(t,10,1e3)}}),t.category===`console`)))}var Oz=`button,a`;function kz(e){return e.closest(Oz)||e}function Az(e){let t=jz(e);return!t||!(t instanceof Element)?t:kz(t)}function jz(e){return Mz(e)?e.target:e}function Mz(e){return typeof e==`object`&&!!e&&`target`in e}var Nz;function Pz(e){return Nz||(Nz=[],Fz()),Nz.push(e),()=>{let t=Nz?Nz.indexOf(e):-1;t>-1&&Nz.splice(t,1)}}function Fz(){Df(lI,`open`,function(e){return function(...t){if(Nz)try{Nz.forEach(e
491=>e())}catch{}return e.apply(lI,t)}})}var Iz=new Set([bR.Mutation,bR.StyleSheetRule,bR.StyleDeclaration,bR.AdoptedStyleSheet,bR.CanvasMutation,bR.Selection,bR.MediaInteraction]);function Lz(e,t,n){e.handleClick(t,n)}var Rz=class{constructor(e,t,n=Dz){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){let e=Pz(()=>{this._lastMutation=Hz()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(Bz(t,this._ignoreSelector)||!Vz(e))return;let n={timestamp:Ez(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1)||(this._clicks.push(n),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Ez(e)}registerScroll(e=Date.now()){this._lastScroll=Ez(e)}registerClick(e){let t=kz(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){let e=[],t=Hz();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(let t of e){let e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){let t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,i=!n&&!r,{clickCount:a,clickBreadcrumb:o}=e;if(i){let n=Math.min(e.mutationAfter||this._timeout,this._timeout)*1e3,r=n<this._timeout*1e3?`mutation`:`timeout`,i={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.slowClickDetected`,data:{...o.data,url:lI.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:a||1}};this._addBreadcrumbEvent(t,i);return}if(a>1){let e={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.multiClick`,data:{...o.data,url:lI.location.href,route:t.getCurrentRoute(),clickCount:a,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=GN(()=>this._checkClicks(),1e3)}},zz=[`A`,`BUTTON`,`INPUT`];function Bz(e,t){return!!(!zz.includes(e.tagName)||e.tagName===`INPUT`&&![`submit`,`button`].includes(e.getAttribute(`type`)||``)||e.tagName===`A`&&(e.hasAttribute(`download`)||e.hasAttribute(`target`)&&e.getAttribute(`target`)!==`_self`)||t&&e.matches(t))}function Vz(e){return!!(e.data&&typeof e.data.nodeId==`number`&&e.timestamp)}function Hz(){return Date.now()/1e3}function Uz(e,t){try{if(!Wz(t))return;let{source:n}=t.data;if(Iz.has(n)&&e.registerMutation(t.timestamp),n===bR.Scroll&&e.registerScroll(t.timestamp),Gz(t)){let{type:n,id:r}=t.data,i=yz.mirror.getNode(r);i instanceof HTMLElement&&n===xR.Click&&e.registerClick(i)}}catch{}}function Wz(e){return e.type===Cz}function Gz(e){return e.data.source===bR.MouseInteraction}function Kz(e){return{timestamp:Date.now()/1e3,type:`default`,...e}}var qz=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(qz||{}),Jz=new Set([`id`,`class`,`aria-label`,`role`,`name`,`alt`,`title`,`data-test-id`,`data-testid`,`disabled`,`aria-disabled`,`data-sentry-component`]);function Yz(e){let t={};!e[`data-sentry-component`]&&e[`data-sentry-element`]&&(e[`data-sentry-component`]=e[`data-sentry-element`]);for(let n in e)if(Jz.has(n)){let r=n;(n===`data-testid`||n===`data-test-id`)&&(r=`testId`),t[r]=e[n]}return t}var Xz=e=>t=>{if(!e.isEnabled())return;
491let n=Qz(t);if(!n)return;let r=t.name===`click`,i=r?t.event:void 0;r&&e.clickDetector&&i?.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&Lz(e.clickDetector,n,Az(t.event)),Dz(e,n)};function Zz(e,t){let n=yz.mirror.getId(e),r=n&&yz.mirror.getNode(n),i=r&&yz.mirror.getMeta(r),a=i&&eB(i)?i:null;return{message:t,data:a?{nodeId:n,node:{id:n,tagName:a.tagName,textContent:Array.from(a.childNodes).map(e=>e.type===qz.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(``),attributes:Yz(a.attributes)}}:{}}}function Qz(e){let{target:t,message:n}=$z(e);return Kz({category:`ui.${e.name}`,...Zz(t,n)})}function $z(e){let t=e.name===`click`,n,r=null;try{r=t?Az(e.event):jz(e.event),n=_M(r,{maxStringLength:200})||`<unknown>`}catch{n=`<unknown>`}return{target:r,message:n}}function eB(e){return e.type===qz.Element}function tB(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=nB(t);n&&Dz(e,n)}function nB(e){let{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:a,target:o}=e;if(!o||rB(o)||!a)return null;let s=t||r||i,c=a.length===1;if(!s&&c)return null;let l=_M(o,{maxStringLength:200})||`<unknown>`;return Kz({category:`ui.keyDown`,message:l,data:{...Zz(o,l).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:a}})}function rB(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.isContentEditable}var iB={resource:dB,paint:lB,navigation:uB};function aB(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function oB(e){return e.map(sB).filter(Boolean)}function sB(e){let t=iB[e.entryType];return t?t(e):null}function cB(e){return((Rp()||lI.performance.timeOrigin)+e)/1e3}function lB(e){let{duration:t,entryType:n,name:r,startTime:i}=e,a=cB(i);return{type:n,name:r,start:a,end:a+t,data:void 0}}function uB(e){let{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:a,encodedBodySize:o,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:m,type:h}=e;return i===0?null:{type:`${t}.${h}`,start:cB(p),end:cB(a),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:l,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:a,redirectCount:f}}}function dB(e){let{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:a,decodedBodySize:o,encodedBodySize:s,responseStatus:c,transferSize:l}=e;return[`fetch`,`xmlhttprequest`].includes(n)?null:{type:`${t}.${n}`,start:cB(a),end:cB(i),name:r,data:{size:l,statusCode:c,decodedBodySize:o,encodedBodySize:s}}}function fB(e){let t=e.entries[e.entries.length-1];return gB(e,`largest-contentful-paint`,t?.element?[t.element]:void 0)}function pB(e){return e.sources!==void 0}function mB(e){let t=[],n=[];for(let r of e.entries)if(pB(r)){let e=[];for(let t of r.sources)if(t.node){n.push(t.node);let r=yz.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return gB(e,`cumulative-layout-shift`,n,t)}function hB(e){let t=e.entries[e.entries.length-1];return gB(e,`interaction-to-next-paint`,t?.target?[t.target]:void 0)}function gB(e,t,n,r){let i=e.value,a=e.rating,o=cB(i);return{type:`web-vital`,name:t,start:o,end:o,data:{value:i,size:i,rating:a,nodeIds:n?n.map(e=>yz.mirror.getId(e)):void 0,attributions:r}}}function _B(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}let r=[];return[`navigation`,`paint`,`resource`].forEach(e=>{r.push(rM(e,n))}),r.push(eM(aB(fB,e)),$j(aB(mB,e)),nM(aB(hB,e))),()=>{r.forEach(e=>e())}}var vB=
vendor: 10,332 bytes, line 491
491`var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([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]),i=new t([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]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});`;
491function yB(){let e=new Blob([vB]);return URL.createObjectURL(e)}var bB=[`log`,`warn`,`error`];function xB(){let e={exception:()=>void 0,infoTick:()=>void 0,setConfig:e=>{e.captureExceptions,e.traceInternals}};return bB.forEach(t=>{e[t]=()=>void 0}),e}var SB=xB(),CB=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${wI}.`)}},wB=class{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return`sync`}destroy(){this.events=[]}async addEvent(e){let t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>wI)throw new CB;this.events.push(e)}finish(){return new Promise(e=>{let t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=null;for(let{timestamp:t}of this.events)(e===null||t<e)&&(e=t);return e===null?e:Tz(e)}},TB=class{constructor(e){this._onMessage=({data:e})=>{let t=e;if(typeof t.id!=`number`)return;let n=this._pending.get(t.id);if(!(!n||n.method!==t.method)){if(this._pending.delete(t.id),!t.success){n.reject(Error(`Error in compression worker`));return}n.resolve(t.response)}},this._worker=e,this._id=0,this._pending=new Map,this._worker.addEventListener(`message`,this._onMessage)}ensureReady(){return this._ensureReadyPromise||=new Promise((e,t)=>{this._worker.addEventListener(`message`,({data:n})=>{n.success?e():t(Error(`Received worker message with unsuccessful status`))},{once:!0}),this._worker.addEventListener(`error`,e=>{t(Error(`Failed to load Replay compression worker: ${e instanceof ErrorEvent&&e.message?e.message:`Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load.`}`))},{once:!0})}),this._ensureReadyPromise}destroy(){this._worker.removeEventListener(`message`,this._onMessage),this._pending.forEach(e=>e.reject(Error(`Worker destroyed`))),this._pending.clear(),this._worker.terminate()}postMessage(e,t){let n=this._getAndIncrementId();return new Promise((r,i)=>{this._pending.set(n,{method:e,resolve:r,reject:i});try{this._worker.postMessage({id:n,method:e,arg:t})}catch(e){this._pending.delete(n),i(e)}})}_getAndIncrementId(){return this._id++}},EB=class{constructor(e){this._worker=new TB(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return`worker`}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){let t=Tz(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);let n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>wI?Promise.reject(new CB):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage(`clear`).then(null,e=>{})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage(`addEvent`,e)}async _finishRequest(){let e=await this._worker.postMessage(`finish`);return this._earliestTimestamp=null,this._totalSize=0,e}},DB=class{constructor(e){this._fallback=new wB,this._compression=new EB(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch{return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(let t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch{}}};function OB({useCompression:e,workerUrl:t}){if(e&&window.Worker){let e=kB(t);if(e)return e}return new wB}function kB(e){try{let t=e||AB();return t?new DB(new Worker(t)):void 0}catch{}}function AB(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>`u`||!__SENTRY_EXCLUDE_REPLAY_WORKER__?yB():``}function jB(){try{return`sessionStorage`in lI&&!!lI.sessionStorage}catch{return!1}}function MB(e){NB(),e.session=void 0}function NB(){if(jB())try{lI.sessionStorage.removeItem(uI)}catch{}}function PB(e){return e===void 0?!1:Math.random()<e}function FB(e){if(jB())try{lI.sessionStorage.setItem(uI,JSON.stringify(e))}catch{}}function IB(e){let t=Date.now();return{id:e.id||Cp(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId,dirty:e.dirty||!1}}function LB(e,t){return PB(e)?`session`:t?`buffer`:!1}function RB({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let i=IB({sampled:LB(e,t),previousSessionId:r});return n&&FB(i),i}function zB(){if(!jB())return null;try{let e=lI.sessionStorage.getItem(uI);return e?IB(JSON.parse(e)):null}catch{return null}}function BB(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function VB(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return BB(e.started,t,r)||BB(e.lastActivity,n,r)}function HB(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!VB(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled===`buffer`&&e.segmentId===0)}function UB({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){let i=r.stickySession&&zB();return i?HB(i,{sessionIdleExpire:e,maxReplayDuration:t})?RB(r,{previousSessionId:i.id}):i:RB(r,{previousSessionId:n})}function WB(e){return e.type===Q.Custom}function GB(e,t,n){return JB(e,t)?(qB(e,t,n),!0):!1}function KB(e,t,n){return JB(e,t)?qB(e,t,n):Promise.resolve(null)}async function qB(e,t,n){let{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;let i=e.recordingMode===`buffer`;
491try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);let a=YB(t,e.getOptions().beforeAddRecordingEvent);return a?await r.addEvent(a):void 0}catch(t){let n=t&&t instanceof CB,a=n?`eventBufferOverflow`:`eventBufferError`,o=G();if(o){let e=n?`buffer_overflow`:`internal_sdk_error`;o.recordDroppedEvent(e,`replay`)}if(n&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:a})}}function JB(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=Tz(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now()||n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)}function YB(e,t){try{if(typeof t==`function`&&WB(e))return t(e)}catch{return null}return e}var XB=100;function ZB(e,t){let n=e.getContext();n.traceIds.size<XB&&n.traceIds.add(t)}function QB(e){return t=>{if(!e.isEnabled()||!Uh(t))return;let n=t.spanContext().traceId;n&&ZB(e,n)}}function $B(e){return!e.type}function eV(e){return e.type===`transaction`}function tV(e){return e.type===`replay_event`}function nV(e){return e.type===`feedback`}function rV(e){return(t,n)=>{if(!e.isEnabled()||!$B(t)&&!eV(t))return;let r=n.statusCode;if(!(!r||r<200||r>=300)){if(eV(t)){iV(e,t);return}aV(e,t)}}}function iV(e,t){let n=t.contexts?.trace?.trace_id;n&&ZB(e,n)}function aV(e,t){let n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!==`buffer`||!t.tags?.replayId)return;let{beforeErrorSampling:r}=e.getOptions();typeof r==`function`&&!r(t)||GN(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}function oV(e){return t=>{!e.isEnabled()||!$B(t)||sV(e,t)}}function sV(e,t){let n=t.exception?.values?.[0]?.value;typeof n==`string`&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&Dz(e,Kz({category:`replay.hydrate-error`,data:{url:zy()}}))}function cV(e){let t=G();t&&t.on(`beforeAddBreadcrumb`,t=>lV(e,t))}function lV(e,t){if(!e.isEnabled()||!fV(t))return;let n=uV(t);n&&Dz(e,n)}function uV(e){return!fV(e)||[`fetch`,`xhr`,`sentry.event`,`sentry.transaction`].includes(e.category)||e.category.startsWith(`ui.`)?null:e.category===`console`?dV(e):Kz(e)}function dV(e){let t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return Kz(e);let n=!1,r=t.map(e=>{if(!e)return e;if(typeof e==`string`)return e.length>xI?(n=!0,`${e.slice(0,xI)}\u2026`):e;if(typeof e==`object`)try{let t=sp(e,7);return JSON.stringify(t).length>xI?(n=!0,`${JSON.stringify(t,null,2).slice(0,xI)}\u2026`):t}catch{}return e});return Kz({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:[`CONSOLE_ARG_TRUNCATED`]}}:{}}})}function fV(e){return!!e.category}function pV(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function mV(){let e=W().getPropagationContext().dsc;e&&delete e.replay_id;let t=$h();if(t){let e=ug(t);delete e.replay_id}}function hV(e){let t=W().getPropagationContext().dsc;t&&(t.replay_id=e);let n=$h();if(n){let t=ug(n);t.replay_id=e}}function gV(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:Q.Custom,timestamp:t.timestamp*1e3,data:{tag:`breadcrumb`,payload:{timestamp:t.timestamp,type:`default`,category:`sentry.feedback`,data:{feedbackId:t.event_id}}}}),!1):!0)}function _V(e,t){return e.recordingMode!==`buffer`||t.message===fI||!t.exception||t.type?!1:PB(e.getOptions().errorSampleRate)}function vV(e){return Object.assign((t,n)=>{if(e.session&&HB(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&mV(),!e.isEnabled()||e.isPaused())return t;if(tV(t))return delete t.breadcrumbs,t;if(!$B(t)&&!eV(t)&&!nV(t))return t;if(!e.checkAndHandleExpiredSession())return mV(),t;if(nV(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),gV(e,t),t;if(pV(t,n)&&!e.getOptions()._experiments.captureExceptions)return null;let r=_V(e,t);if((r||e.recordingMode===`session`)&&(t.tags={...t.tags,replayId:e.getSessionId()}),r&&e.recordingMode===`buffer`&&e.session?.sampled===`buffer`){let t=e.session;t.dirty=!0,e.getOptions().stickySession&&FB(t)}return t},{id:`Replay`})}function yV(e,t){return t.map(({type:t,start:n,end:r,name:i,data:a})=>{let o=e.throttledAddEvent({type:Q.Custom,timestamp:n,data:{tag:`performanceSpan`,payload:{op:t,description:i,startTimestamp:n,endTimestamp:r,data:a}}});return typeof o==`string`?Promise.resolve(null):o})}function bV(e){let{from:t,to:n}=e,r=Date.now()/1e3;return{type:`navigation.push`,start:r,end:r,name:n,data:{previous:t}}}function xV(e){return t=>{if(!e.isEnabled())return;let n=bV(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(yV(e,[n]),!1)))}}function SV(e,t){return jv(t,G())}function CV(e,t){e.isEnabled()&&t!==null&&(SV(e,t.name)||e.addUpdate(()=>(yV(e,[t]),!0)))}function wV(e){if(!e)return;let t=new TextEncoder;try{if(typeof e==`string`)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let n=ZN(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function TV(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function EV(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n={...e._meta};return n.warnings=[...n.warnings||[],t],e._meta=n,e}function DV(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:i,method:a,statusCode:o,request:s,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:{method:a,statusCode:o,request:s,response:c}}}function OV(e){return{headers:{},size:e,_meta:{warnings:[`URL_SKIPPED`]}}}function kV(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:i,warnings:a}=jV(n);return r.body=i,a?.length&&(r._meta={warnings:a}),r}function AV(e,t){return Object.entries(e).reduce((n,[r,i])=>{let a=r.toLowerCase();return t.includes(a)&&e[r]&&(n[a]=i),n},{})}function jV(e){if(!e||typeof e!=`string`)return{body:e};let t=e.length>bI,n=MV(e);if(t){let t=e.slice(0,bI);return n?{body:t,warnings:[`MAYBE_JSON_TRUNCATED`]}:{body:`${t}\u2026`,warnings:[`TEXT_TRUNCATED`]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function MV(e){let t=e[0],n=e[e.length-1];return t===`[`&&n===`]`||t===`{`&&n===`}`}function NV(e,t){return yp(PV(e),t)}function PV(e,t=lI.document.baseURI){if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(lI.location.origin))return e;let n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;let r=n.href;return!e.endsWith(`/`)&&r.endsWith(`/`)?r.slice(0,-1):r}async function FV(e,t,n){try{let r=DV(`resource.fetch`,await LV(e,t,n));CV(n.replay,r)}catch{}}
491function IV(e,t){let{input:n,response:r}=t,i=wV(n?$N(n):void 0),a=r?TV(r.headers.get(`content-length`)):void 0;i!==void 0&&(e.data.request_body_size=i),a!==void 0&&(e.data.response_body_size=a)}async function LV(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r}=t,{url:o,method:s,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=NV(o,n.networkDetailAllowUrls)&&!NV(o,n.networkDetailDenyUrls);return{startTimestamp:i,endTimestamp:a,url:o,method:s,statusCode:c,request:d?RV(n,t.input,l):OV(l),response:await zV(d,n,t.response,u)}}function RV({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let i=n?UV(n,t):{};if(!e)return kV(i,r,void 0);let[a,o]=QN($N(n),SB),s=kV(i,r,a);return o?EV(s,o):s}async function zV(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return OV(i);let a=r?HV(r.headers,n):{};if(!r||!t&&i!==void 0)return kV(a,i,void 0);let[o,s]=await VV(r),c=BV(o,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:a});return s?EV(c,s):c}function BV(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{let a=e?.length&&n===void 0?wV(e):n;return r?t?kV(i,a,e):kV(i,a,void 0):OV(a)}catch{return kV(i,n,void 0)}}async function VV(e){let t=GV(e);if(!t)return[void 0,`BODY_PARSE_ERROR`];try{return[await KV(t)]}catch(e){return e instanceof Error&&e.message.indexOf(`Timeout`)>-1?[void 0,`BODY_PARSE_TIMEOUT`]:[void 0,`BODY_PARSE_ERROR`]}}function HV(e,t){let n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function UV(e,t){return e.length===1&&typeof e[0]!=`string`?WV(e[0],t):e.length===2?WV(e[1],t):{}}function WV(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?HV(n,t):Array.isArray(n)?{}:AV(n,t):{}}function GV(e){try{return e.clone()}catch{}}function KV(e){return new Promise((t,n)=>{let r=GN(()=>n(Error(`Timeout while trying to read response body`)),500);qV(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(r))})}async function qV(e){return await e.text()}async function JV(e,t,n){try{let r=DV(`resource.xhr`,XV(e,t,n));CV(n.replay,r)}catch{}}function YV(e,t){let{xhr:n,input:r}=t;if(!n)return;let i=wV(r),a=n.getResponseHeader(`content-length`)?TV(n.getResponseHeader(`content-length`)):$V(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),a!==void 0&&(e.data.response_body_size=a)}function XV(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r,input:o,xhr:s}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:f}=e.data;if(!c)return null;if(!s||!NV(c,n.networkDetailAllowUrls)||NV(c,n.networkDetailDenyUrls))return{startTimestamp:i,endTimestamp:a,url:c,method:l,statusCode:u,request:OV(d),response:OV(f)};let p=s[KN],m=p?AV(p.request_headers,n.networkRequestHeaders):{},h=AV(eP(s),n.networkResponseHeaders),[g,_]=n.networkCaptureBodies?QN(o,SB):[void 0],[v,y]=n.networkCaptureBodies?ZV(s):[void 0],b=kV(m,d,g),x=kV(h,f,v);return{startTimestamp:i,endTimestamp:a,url:c,method:l,statusCode:u,request:_?EV(b,_):b,response:y?EV(x,y):x}}function ZV(e){let t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return QV(e.response,e.responseType)}catch(e){t.push(e)}return[void 0]}function QV(e,t){try{if(typeof e==`string`)return[e];if(e instanceof Document)return[e.body.outerHTML];if(t===`json`&&e&&typeof e==`object`)return[JSON.stringify(e)];if(!e)return[void 0]}catch{return[void 0,`BODY_PARSE_ERROR`]}return[void 0,`UNPARSEABLE_BODY_TYPE`]}function $V(e,t){try{return wV(t===`json`&&e&&typeof e==`object`?JSON.stringify(e):e)}catch{return}}function eH(e){let t=G();try{let{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:o}=e.getOptions(),s={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:o};t&&t.on(`beforeAddBreadcrumb`,(e,t)=>tH(s,e,t))}catch{}}function tH(e,t,n){if(t.data)try{nH(t)&&iH(n)&&(YV(t,n),JV(t,n,e)),rH(t)&&aH(n)&&(IV(t,n),FV(t,n,e))}catch{}}function nH(e){return e.category===`xhr`}function rH(e){return e.category===`fetch`}function iH(e){return e?.xhr}function aH(e){return e?.input!==void 0}function oH(e){let t=G();MN(Xz(e)),zN(xV(e)),cV(e),eH(e),fv(vV(e)),t&&(t.on(`beforeSendEvent`,oV(e)),t.on(`afterSendEvent`,rV(e)),t.on(`createDsc`,t=>{let n=e.getSessionId();n&&e.isEnabled()&&e.recordingMode===`session`&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)}),t.on(`afterSegmentSpanEnd`,QB(e)),t.on(`spanStart`,t=>{e.lastActiveSpan=t}),t.on(`spanEnd`,t=>{e.lastActiveSpan=t}),t.on(`beforeSendFeedback`,async(t,n)=>{let r=e.getSessionId();n?.includeReplay&&e.isEnabled()&&r&&t.contexts?.feedback&&(t.contexts.feedback.source===`api`&&await e.sendBufferedReplayOrFlush(),t.contexts.feedback.replay_id=r)}),t.on(`openFeedbackWidget`,async()=>{await e.sendBufferedReplayOrFlush()}))}async function sH(e){try{return Promise.all(yV(e,[cH(lI.performance.memory)]))}catch{return[]}}function cH(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:`memory`,name:`memory`,start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function lH(e,t,n){return Iv(e,t,{...n,setTimeoutImpl:GN})}var uH=U.navigator;function dH(){return/iPhone|iPad|iPod/i.test(uH?.userAgent??``)||/Macintosh/i.test(uH?.userAgent??``)&&uH?.maxTouchPoints&&uH?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function fH(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return;let i=r||!t;t=!0,pH(n),e.clickDetector&&Uz(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode===`buffer`&&i&&e.setInitialState(),!GB(e,n,i))return!0;
491if(!i)return!1;let t=e.session;if(hH(e,i),e.recordingMode===`buffer`&&t&&e.eventBuffer&&!t.dirty){let n=e.eventBuffer.getEarliestTimestamp();n&&(t.started=n,e.getOptions().stickySession&&FB(t))}return t?.previousSessionId||e.recordingMode===`session`&&e.flush(),!0})}}function pH(e){let t=e.data;if(!(e.type!==Q.IncrementalSnapshot||!t||typeof t!=`object`||!(`source`in t)||t.source!==bR.Mutation||!(`attributes`in t)||!Array.isArray(t.attributes)))for(let e of t.attributes){let t=yz.mirror.getNode(e.id),n=t&&yz.mirror.getMeta(t);if(n?.type===qz.Element)for(let[t,r]of Object.entries(e.attributes))r===null?delete n.attributes[t]:n.attributes[t]=r}}function mH(e){let t=e.getOptions();return{type:Q.Custom,timestamp:Date.now(),data:{tag:`options`,payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type===`worker`:!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function hH(e,t){!t||e.session?.segmentId!==0||GB(e,mH(e),!1)}function gH(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function _H(e,t,n,r){return hg(Ag(e,kg(e),r,n),[[{type:`replay_event`},e],[{type:`replay_recording`,length:typeof t==`string`?new TextEncoder().encode(t).length:t.length},t]])}function vH({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)} 492`;if(typeof e==`string`)n=`${r}${e}`;else{let t=new TextEncoder().encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}async function yH({client:e,scope:t,replayId:n,event:r}){let i={event_id:n,integrations:typeof e._integrations==`object`&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0};e.emit(`preprocessEvent`,r,i);let a=await R_(e.getOptions(),r,i,t,e,um());if(!a)return null;e.emit(`postprocessEvent`,a,i),a.platform=a.platform||`javascript`;let{name:o,version:s,settings:c}=e.getSdkMetadata()?.sdk||{};return a.sdk={...a.sdk,name:o||`sentry.javascript.unknown`,version:s||`0.0.0`,settings:c},a}async function bH({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:a}){let o=vH({recordingData:e,headers:{segment_id:n}}),{urls:s,errorIds:c,traceIds:l,initialTimestamp:u}=r,d=G(),f=W(),p=d?.getTransport(),m=d?.getDsn();if(!d||!p||!m||!a.sampled)return Promise.resolve({});let h=await yH({scope:f,client:d,replayId:t,event:{type:dI,replay_start_timestamp:u/1e3,timestamp:i/1e3,error_ids:c,trace_ids:l,urls:s,replay_id:t,segment_id:n,replay_type:a.sampled}});if(!h)return d.recordDroppedEvent(`event_processor`,`replay`),Promise.resolve({});delete h.sdkProcessingMetadata;let g=_H(h,o,m,d.getOptions().tunnel),_;try{_=await p.send(g)}catch(e){let t=Error(fI);try{t.cause=e}catch{}throw t}let v=Ly({},_);if(Iy(v,`replay`))throw new SH(v);if(typeof _.statusCode==`number`&&(_.statusCode<200||_.statusCode>=300))throw new xH(_.statusCode);return _}var xH=class extends Error{constructor(e){super(`Transport returned status code ${e}`)}},SH=class extends Error{constructor(e){super(`Rate limit hit`),this.rateLimits=e}},CH=class extends Error{constructor(){super(`Session is too long, not sending replay`)}};async function wH(e,t={count:0,interval:vI}){let{recordingData:n,onError:r}=e;if(n.length)try{return await bH(e),!0}catch(n){if(n instanceof xH||n instanceof SH)throw n;if(Q_(`Replays`,{_retryCount:t.count}),r&&r(n),t.count>=yI){let e=Error(`${fI} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise((n,r)=>{GN(async()=>{try{await wH(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}var TH=`__THROTTLED`,EH=`__SKIPPED`;function DH(e,t,n){let r=new Map,i=e=>{let t=e-n;r.forEach((e,n)=>{n<t&&r.delete(n)})},a=()=>[...r.values()].reduce((e,t)=>e+t,0),o=!1;return(...n)=>{let s=Math.floor(Date.now()/1e3);if(i(s),a()>=t){let e=o;return o=!0,e?EH:TH}o=!1;let c=r.get(s)||0;return r.set(s,c+1),e(...n)}}var OH=class{constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode=`session`,this.timeouts={sessionIdlePause:pI,sessionIdleExpire:mI},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:``},this._recordingOptions=t,this._options=e,this._debouncedFlush=lH(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=DH((e,t)=>KB(this,e,t),300,5);let{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),i=n?{threshold:Math.min(SI,n),timeout:n,scrollTimeout:CI,ignoreSelector:r?r.join(`,`):``}:void 0;i&&(this.clickDetector=new Rz(this,i)),this._handleVisibilityChange=()=>{lI.document.visibilityState===`visible`?this._doChangeToForegroundTasks():this._doChangeToBackgroun
492dTasks()},this._handleWindowBlur=()=>{let e=Kz({category:`ui.blur`});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{let e=Kz({category:`ui.focus`});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{tB(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){this._options.onError&&this._options.onError(e)}initializeSampling(e){let{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;this._requiresManualStart=r,!r&&(this._initializeSessionForSampling(e),this.session&&this.session.sampled!==!1&&(this.recordingMode=this.session.sampled===`buffer`&&this.session.segmentId===0?`buffer`:`session`,this._initializeRecording()))}start(){if(this._isEnabled&&this.recordingMode===`session`||this._isEnabled&&this.recordingMode===`buffer`)return;this._updateUserActivity();let e=UB({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode=`session`,this._initializeRecording()}startBuffering(){if(this._isEnabled)return;let e=UB({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode=`buffer`,this._initializeRecording()}startRecording(){try{let e=this._canvas;this._stopRecording=yz({...this._recordingOptions,...this.recordingMode===`buffer`?{checkoutEveryNms:_I}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:fH(this),...dH(),onMutation:this._onMutationHandler.bind(this),...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&=(this._stopRecording(),void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode=`buffer`;let n=t??`manual`;G()?.emit(`replayEnd`,{sessionId:this.session?.id,reason:n});try{mV(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,MB(this)}catch(e){this.handleException(e)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording())}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording())}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode===`session`)return this.flushImmediate();let t=Date.now();await this.flushImmediate();let n=this.stopRecording();!e||!n||this.recordingMode!==`session`&&(this.recordingMode=`session`,this.session&&(this.session.dirty=!1,this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession(),hV(this.session.id)),this.startRecording())}addUpdate(e){let t=e();this.recordingMode===`buffer`||!this._isEnabled||t!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode===`buffer`?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(e){if(!(e&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&BB(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled===`session`){this.pause();return}return!!this._checkSession()}setInitialState(){let e=`${lI.location.pathname}${lI.location.hash}${lI.location.search}`,t=`${lI.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.
492initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){let n=this._throttledAddEvent(e,t);if(n===TH){let e=Kz({category:`replay.throttled`});this.addUpdate(()=>!GB(this,{type:wz,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e,metric:!0}}))}return n}getCurrentRoute(){let e=this.lastActiveSpan||$h(),t=e&&Zh(e),n=(t&&q(t).data||{})[hm];if(!(!t||!n||![`route`,`custom`].includes(n)))return q(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=OB({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&G()?.emit(`replayStart`,{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode===`session`&&this.session&&hV(this.session.id)}_initializeSessionForSampling(e){let t=this._options.errorSampleRate>0,n=UB({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;let e=this.session;return HB(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(e),!1):!0}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:`sessionExpired`}),this.initializeSampling(e.id))}_addListeners(){try{lI.document.addEventListener(`visibilitychange`,this._handleVisibilityChange),lI.addEventListener(`blur`,this._handleWindowBlur),lI.addEventListener(`focus`,this._handleWindowFocus),lI.addEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||=(oH(this),!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=_B(this)}_removeListeners(){try{lI.document.removeEventListener(`visibilitychange`,this._handleVisibilityChange),lI.removeEventListener(`blur`,this._handleWindowBlur),lI.removeEventListener(`focus`,this._handleWindowFocus),lI.removeEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){if(this.session){if(HB(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){mV();return}e&&this._createCustomBreadcrumb(e),this.conditionalFlush()}}_doChangeToForegroundTasks(e){this.session&&this.checkAndHandleExpiredSession()&&e&&this._createCustomBreadcrumb(e)}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:Q.Custom,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e}})})}_addPerformanceEntries(){let e=oB(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(yV(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;let n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}
492_popEventContext(){let e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){let e=this.getSessionId();if(!(!this.session||!this.eventBuffer||!e)&&(await this._addPerformanceEntries(),this.eventBuffer?.hasEvents&&(await sH(this),this.eventBuffer&&e===this.getSessionId())))try{this._updateInitialTimestampFromEventBuffer();let t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new CH;let n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await wH({replayId:e,recordingData:await this.eventBuffer.finish(),segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:`sendError`});let t=G();if(t){let n;n=e instanceof SH?`ratelimit_backoff`:e instanceof CH?`invalid`:`send_error`,t.recordDroppedEvent(n,`replay`)}}}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e||!this.checkAndHandleExpiredSession()||!this.session)return;let t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();let r=n<this._options.minReplayDuration,i=n>this._options.maxReplayDuration+5e3;if(r||i){r&&this._debouncedFlush();return}let a=this.eventBuffer;a&&this.session.segmentId===0&&a.hasCheckout;let o=!!this._flushLock;this._flushLock||=this._runFlush();try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,o&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&FB(this.session)}_onMutationHandler(e){let{ignoreMutations:t}=this._options._experiments;if(t?.length&&e.some(e=>{let n=gH(e.target),r=t.join(`,`);return n?.matches(r)}))return!1;let n=e.length,r=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,a=r&&n>r;if(n>i||a){let e=Kz({category:`replay.mutations`,data:{count:n,limit:a}});this._createCustomBreadcrumb(e)}return a?(this.stop({reason:`mutationLimit`,forceFlush:this.recordingMode===`session`}),!1):!0}};function kH(e,t){return[...e,...t].join(`,`)}function AH({mask:e,unmask:t,block:n,unblock:r,ignore:i}){return{maskTextSelector:kH(e,[`.sentry-mask`,`[data-sentry-mask]`]),unmaskTextSelector:kH(t,[]),blockSelector:kH(n,[`.sentry-block`,`[data-sentry-block]`,`base`,`iframe[srcdoc]:not([src])`]),unblockSelector:kH(r,[]),ignoreSelector:kH(i,[`.sentry-ignore`,`[data-sentry-ignore]`,`input[type="file"]`])}}function jH({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:a}){if(i.unmaskTextSelector&&e.matches(i.unmaskTextSelector))return a;let o=n.includes(t),s=r&&t===`value`&&e.tagName===`INPUT`&&[`submit`,`button`].includes(e.getAttribute(`type`)||``);return o||s?a.replace(/[\S]/g,`*`):a}var MH=`img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]`,NH=[`content-length`,`content-type`,`accept`],PH=Symbol.for(`sentry__originalRequestBody`),FH=!1,IH=!1;function LH(){if(typeof Request>`u`||IH)return;let e=Request;try{let t=function(t,n){let r=new e(t,n);return n?.body!=null&&(r[PH]=n.body),r};t.prototype=e.prototype,U.Request=t,IH=!0}catch{}}var RH=(e=>new zH(e)),zH=class{constructor({flushMinDelay:e=hI,flushMaxDelay:t=gI,minReplayDuration:n=TI,maxReplayDuration:r=DI,stickySession:i=!0,useCompression:a=!0,workerUrl:o,_experiments:s={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:f=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:h=[],networkDetailDenyUrls:g=[],networkCaptureBodies:_=!0,networkRequestHeaders:v=[],networkResponseHeaders:y=[],mask:b=[],maskAttributes:x=[`title`,`placeholder`,`aria-label`],unmask:S=[],block:C=[],unblock:w=[],ignore:T=[],maskFn:E,beforeAddRecordingEvent:D,beforeErrorSampling:ee,onError:te,attachRawBodyFromRequest:O=!1}={}){this.name=`Replay`;let k=AH({mask:b,unmask:S,block:C,unblock:w,ignore:T});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:E,maskInputFn:E,maskAttributeFn:(e,t,n)=>jH({maskAttributes:x,maskAllText:c,privacyOptions:k,key:e,value:t,el:n}),...k,slimDOMOptions:`all`,inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!s.recordCrossOriginIframes},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,EI),maxReplayDuration:Math.min(r,DI),stickySession:i,useCompression:a,workerUrl:o,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:f,slowClickTimeout:p,slowClickIgnoreSelectors:m,networkDetailAllowUrls:h,networkDetailDenyUrls:g,networkCaptureBodies:_,networkRequestHeaders:VH(v),networkResponseHeaders:VH(y),beforeAddRecordingEvent:D,beforeErrorSampling:ee,onError:te,attachRawBodyFromRequest:O,_experiments:s},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${MH}`:MH,this._recordingOptions.ignoreCSSAttributes=new Set([`background-image`])),this._isInitialized&&Jv())throw Error(`Multiple Sentry Session Replay instances are not supported`);this._isInitialized=!0}get _isInitialized(){return FH}set _isInitialized(e){FH=e}afterAllSetup(e){!Jv()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&LH(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}
492startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode===`session`,reason:`manual`}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(e){if(this._replay?.isEnabled())return this._replay.getSessionId(e)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}processSpan(e){let t=this.getReplayId(!0);t&&(b_(e,{"sentry.replay_id":t}),this.getRecordingMode()===`buffer`&&b_(e,{"sentry._internal.replay_is_buffering":!0}))}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){let t=BH(this._initialOptions,e);this._replay=new OH({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{let t=e.getIntegrationByName(`ReplayCanvas`);if(!t)return;this._replay._canvas=t.getOptions()}catch{}}};function BH(e,t){let n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=Qm(n.replaysSessionSampleRate),a=Qm(n.replaysOnErrorSampleRate);return i==null&&a==null&&nf(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),a!=null&&(r.errorSampleRate=a),r}function VH(e){return[...NH,...e.map(e=>e.toLowerCase())]}function HH(){return G()?.getIntegrationByName(`Replay`)}var UH=Object.defineProperty,WH=(e,t,n)=>t in e?UH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,GH=(e,t,n)=>WH(e,typeof t==`symbol`?t:t+``,n),KH=class{constructor(){GH(this,`idNodeMap`,new Map),GH(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function qH(){return new KH}function JH(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function YH(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:YH(e.parentNode,t,n,r+1)}function XH(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e==`string`){if(r.matches(`.${e}`))return!0}else if(JH(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}var ZH=`Please stop import mirror directly. Instead of that,\r 493now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 494or you can use record.mirror to access the mirror instance during recording.`,QH={map:{},getId(){return console.error(ZH),-1},getNode(){return console.error(ZH),null},removeNodeFromMap(){console.error(ZH)},has(){return console.error(ZH),!1},reset(){console.error(ZH)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(QH=new Proxy(QH,{get(e,t,n){return t===`map`&&console.error(ZH),Reflect.get(e,t,n)}}));function $H(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){oU(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>$H(e,t,a||{},!0)}function eU(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function tU(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function nU(e,t,n,r,i){if(!e)return!1;let a=tU(e);if(!a)return!1;let o=XH(t,n);if(!i){let e=r&&a.matches(r);return o(a)&&!e}let s=YH(a,o),c=-1;return s<0?!1:(r&&(c=YH(a,XH(null,r))),s>-1&&c<0?!0:s<c)}var rU={};function iU(e){let t=rU[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return rU[e]=r.bind(window)}function aU(...e){return iU(`requestAnimationFrame`)(...e)}function oU(...e){return iU(`setTimeout`)(...e)}var sU=(e=>(e[e[`2D`]=0]=`2D`,e[e.WebGL=1]=`WebGL`,e[e.WebGL2=2]=`WebGL2`,e))(sU||{}),cU;function lU(e){cU=e}for(var uU=e=>cU?((...t)=>{try{return e(...t)}catch(e){if(cU&&cU(e)===!0)return()=>{};throw e}}):e,dU=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
494+/`,fU=typeof Uint8Array>`u`?[]:new Uint8Array(256),pU=0;pU<dU.length;pU++)fU[dU.charCodeAt(pU)]=pU;var mU=function(e){var t=new Uint8Array(e),n,r=t.length,i=``;for(n=0;n<r;n+=3)i+=dU[t[n]>>2],i+=dU[(t[n]&3)<<4|t[n+1]>>4],i+=dU[(t[n+1]&15)<<2|t[n+2]>>6],i+=dU[t[n+2]&63];return r%3==2?i=i.substring(0,i.length-1)+`=`:r%3==1&&(i=i.substring(0,i.length-2)+`==`),i},hU=new Map;function gU(e,t){let n=hU.get(e);return n||(n=new Map,hU.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var _U=(e,t,n)=>{if(!e||!(bU(e,t)||typeof e==`object`))return;let r=e.constructor.name,i=gU(n,r),a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function vU(e,t,n){if(e instanceof Array)return e.map(e=>vU(e,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:mU(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[vU(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}else if(e instanceof HTMLCanvasElement)return{rr_type:`HTMLImageElement`,src:e.toDataURL()};else if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[vU(e.data,t,n),e.width,e.height]};else if(bU(e,t)||typeof e==`object`)return{rr_type:e.constructor.name,index:_U(e,t,n)};return e}var yU=(e,t,n)=>e.map(e=>vU(e,t,n)),bU=(e,t)=>!![`WebGLActiveInfo`,`WebGLBuffer`,`WebGLFramebuffer`,`WebGLProgram`,`WebGLRenderbuffer`,`WebGLShader`,`WebGLShaderPrecisionFormat`,`WebGLTexture`,`WebGLUniformLocation`,`WebGLVertexArrayObject`,`WebGLVertexArrayObjectOES`].filter(e=>typeof t[e]==`function`).find(n=>e instanceof t[n]);function xU(e,t,n,r,i){let a=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let s of o)try{if(typeof t.CanvasRenderingContext2D.prototype[s]!=`function`)continue;let o=eU(t.CanvasRenderingContext2D.prototype,s,function(a){return function(...o){return nU(this.canvas,n,r,i,!0)||oU(()=>{let n=yU(o,t,this);e(this.canvas,{type:sU[`2D`],property:s,args:n})},0),a.apply(this,o)}});a.push(o)}catch{let n=$H(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:sU[`2D`],property:s,args:[t],setter:!0})}});a.push(n)}return()=>{a.forEach(e=>e())}}function SU(e){return e===`experimental-webgl`?`webgl`:e}function CU(e,t,n,r,i){let a=[];try{let o=eU(e.HTMLCanvasElement.prototype,`getContext`,function(e){return function(a,...o){if(!nU(this,t,n,r,!0)){let e=SU(a);if(`__context`in this||(this.__context=e),i&&[`webgl`,`webgl2`].includes(e))if(o[0]&&typeof o[0]==`object`){let e=o[0];e.preserveDrawingBuffer||=!0}else o.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[a,...o])}});a.push(o)}catch{console.error(`failed to patch HTMLCanvasElement.prototype.getContext`)}return()=>{a.forEach(e=>e())}}function wU(e,t,n,r,i,a,o,s){let c=[],l=Object.getOwnPropertyNames(e);for(let o of l)if(![`isContextLost`,`canvas`,`drawingBufferWidth`,`drawingBufferHeight`].includes(o))try{if(typeof e[o]!=`function`)continue;let l=eU(e,o,function(e){return function(...c){let l=e.apply(this,c);if(_U(l,s,this),`tagName`in this.canvas&&!nU(this.canvas,r,i,a,!0)){let e={type:t,property:o,args:yU(c,s,this)};n(this.canvas,e)}return l}});c.push(l)}catch{let r=$H(e,o,{set(e){n(this.canvas,{type:t,property:o,args:[e],setter:!0})}});c.push(r)}return c}function TU(e,t,n,r,i,a){let o=[];return o.push(...wU(t.WebGLRenderingContext.prototype,sU.WebGL,e,n,r,i,a,t)),t.WebGL2RenderingContext!==void 0&&o.push(...wU(t.WebGL2RenderingContext.prototype,sU.WebGL2,e,n,r,i,a,t)),()=>{o.forEach(e=>e())}}var EU=`for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;
494if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};`;function DU(){let e=new Blob([EU]);return URL.createObjectURL(e)}var OU=class{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};let{enableManualSnapshot:t,sampling:n=`all`,win:r,recordCanvas:i,errorHandler:a}=e;e.sampling=n,this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,a&&lU(a),(i&&typeof n==`number`||t)&&(this.worker=this.initFPSWorker()),this.addWindow(r),!t&&uU(()=>{i&&n===`all`&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),i&&typeof n==`number`&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(e){let{sampling:t=`all`,blockClass:n,blockSelector:r,unblockSelector:i,recordCanvas:a,enableManualSnapshot:o}=this.options;if(!this.windowsSet.has(e)){if(o){this.windowsSet.add(e),this.windows.push(new WeakRef(e));return}uU(()=>{if(a&&t===`all`&&this.initCanvasMutationObserver(e,n,r,i),a&&typeof t==`number`){let t=CU(e,n,r,i,!0);this.restoreHandlers.push(()=>{t()})}})(),this.windowsSet.add(e),this.windows.push(new WeakRef(e))}}addShadowRoot(e){this.shadowDoms.add(new WeakRef(e))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(e,t){if(t?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,e);return}aU(t=>this.takeSnapshot(t,!0,e))}initFPSWorker(){let e=new Worker(DU());return e.onmessage=e=>{let t=e.data,{id:n}=t;if(this.snapshotInProgressMap.set(n,!1),!(`base64`in t))return;let{base64:r,type:i,width:a,height:o}=t;this.mutationCb({id:n,type:sU[`2D`],commands:[{property:`clearRect`,args:[0,0,a,o]},{property:`drawImage`,args:[{rr_type:`ImageBitmap`,args:[{rr_type:`Blob`,data:[{rr_type:`ArrayBuffer`,base64:r}],type:i}]},0,0,a,o]}]})},e}initCanvasFPSObserver(){let e;if(!this.windows.length&&!this.shadowDoms.size)return;let t=n=>{this.takeSnapshot(n,!1),e=aU(t)};e=aU(t),this.restoreHandlers.push(()=>{e&&cancelAnimationFrame(e)})}initCanvasMutationObserver(e,t,n,r){let i=CU(e,t,n,r,!1),a=xU(this.processMutation.bind(this),e,t,n,r),o=TU(this.processMutation.bind(this),e,t,n,r,this.mirror);this.restoreHandlers.push(()=>{i(),a(),o()})}getCanvasElements(e,t,n){let r=[],i=i=>{i.querySelectorAll(`canvas`).forEach(i=>{nU(i,e,t,n,!0)||r.push(i)})};for(let e of this.windows){let t=e.deref(),n;try{n=t&&t.document}catch{}n&&i(n)}for(let e of this.shadowDoms){let t=e.deref();t&&i(t)}return r}takeSnapshot(e,t,n){let{sampling:r,blockClass:i,blockSelector:a,unblockSelector:o,dataURLOptions:s,maxCanvasSize:c}=this.options,l=1e3/(r===`all`?2:r||2);return this.lastSnapshotTime&&e-this.lastSnapshotTime<l?!1:(this.lastSnapshotTime=e,(n?[n]:this.getCanvasElements(i,a,o)).forEac
494h(e=>{let n=this.mirror.getId(e);if(!(!this.mirror.hasNode(e)||!e.width||!e.height||this.snapshotInProgressMap.get(n))){if(this.snapshotInProgressMap.set(n,!0),!t&&[`webgl`,`webgl2`].includes(e.__context)){let t=e.getContext(e.__context);t?.getContextAttributes()?.preserveDrawingBuffer===!1&&t.clear(t.COLOR_BUFFER_BIT)}createImageBitmap(e).then(t=>{this.worker?.postMessage({id:n,bitmap:t,width:e.width,height:e.height,dataURLOptions:s,maxCanvasSize:c},[t])}).catch(e=>{uU(()=>{throw this.snapshotInProgressMap.delete(n),e})()})}}),!0)}startPendingCanvasMutationFlusher(){aU(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,aU(e)};aU(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),aU(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;let r=n.map(e=>{let{type:t,...n}=e;return n}),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}};try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}qH();var kU;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(kU||={});var AU={low:{sampling:{canvas:1},dataURLOptions:{type:`image/webp`,quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:`image/webp`,quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:`image/webp`,quality:.5}}},jU=`ReplayCanvas`,MU=1280,NU=J(((e={})=>{let[t,n]=e.maxCanvasSize||[],r={quality:e.quality||`medium`,enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,MU):MU,n?Math.min(n,MU):MU]},i,a,o=new Promise(e=>a=e);return{name:jU,getOptions(){let{quality:e,enableManualSnapshot:t,maxCanvasSize:n}=r;return{enableManualSnapshot:t,recordCanvas:!0,getCanvasManager:e=>{let r=new OU({...e,enableManualSnapshot:t,maxCanvasSize:n,errorHandler:e=>{try{typeof e==`object`&&(e.__rrweb__=!0)}catch{}}});return i=r,a(r),r},...AU[e]||AU.medium}},async snapshot(e,t){(i||await o).snapshot(e,t)}}}));function PU(e){return e.split(`,`).some(e=>e.trim().startsWith(`sentry-`))}function FU(e){try{return new URL(e,X.location.origin).href}catch{return}}function IU(e){return e.entryType===`resource`&&`initiatorType`in e&&typeof e.nextHopProtocol==`string`&&(e.initiatorType===`fetch`||e.initiatorType===`xmlhttprequest`)}function LU(e){try{return new Headers(e)}catch{return}}var RU={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function zU(e,t){let{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:i,enableHTTPTimings:a,tracePropagationTargets:o,onRequestSpanStart:s,onRequestSpanEnd:c}
494={...RU,...t},l=typeof i==`function`?i:e=>!0,u=e=>HU(e,o),d={},f=e.getOptions().propagateTraceparent;n&&Cy(t=>{let n=lE(t,l,u,d,{propagateTraceparent:f,onRequestSpanEnd:c});if(n){let r=FU(t.fetchData.url),i=r?Ov(r).host:void 0,o=r?Av(r):void 0;n.setAttributes({"http.url":o,"url.full":o,"server.address":i}),a&&VU(n,e),s?.(n,{headers:t.headers})}}),r&&qN(t=>{let n=UU(t,l,u,d,f,c);n&&(a&&VU(n,e),s?.(n,{headers:LU(t.xhr.__sentry_xhr_v3__?.request_headers)}))})}var BU=300;function VU(e,t){let{url:n}=q(e).data;if(!n||typeof n!=`string`)return;let r=()=>void setTimeout(i);if(Zm(t)){let t=e.end.bind(e);e.end=e=>{let n=e??Fp(),a=!1,o=()=>{a||(a=!0,setTimeout(i),t(n),clearTimeout(s))};r=o;let s=setTimeout(o,BU)}}let i=rM(`resource`,({entries:t})=>{t.forEach(t=>{IU(t)&&t.name.endsWith(n)&&(e.setAttributes(PM(t)),r())})})}function HU(e,t){let n=zy();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}let a=r.origin===i;return t?yp(r.toString(),t)||a&&yp(r.pathname,t):a}else{let n=!!e.match(/^\/(?!\/)/);return t?yp(e,t):n}}function UU(e,t,n,r,i,a){let o=e.xhr,s=o?.[KN];if(!o||o.__sentry_own_request__||!s)return;let{url:c,method:l}=s,u=Km()&&t(c);if(e.endTimestamp){let t=o.__sentry_xhr_span_id__;if(!t)return;let n=r[t];n&&(u&&s.status_code!==void 0&&(oh(n,s.status_code),n.end(),a?.(n,{headers:LU(eP(o)),error:e.error})),delete r[t]);return}let d=FU(c),f=Ov(d||c),p=d?Av(d):void 0,m=Av(kv(c)),h=G(),g=!!$h()||!!h&&Zm(h),_=u&&g?Kg({name:`${l} ${m}`,attributes:{url:Av(c),type:`xhr`,"http.method":l,"http.url":p,"url.full":p,"server.address":f?.host,[K]:`auto.http.browser`,[vm]:`http.client`,...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new ig;return u&&!g&&h?.recordDroppedEvent(`no_parent_span`,`span`),o.__sentry_xhr_span_id__=_.spanContext().spanId,r[o.__sentry_xhr_span_id__]=_,n(c)&&WU(o,Km()&&g?_:void 0,i),h&&h.emit(`beforeOutgoingRequestSpan`,_,e),_}function WU(e,t,n){let{"sentry-trace":r,baggage:i,traceparent:a}=vw({span:t,propagateTraceparent:n});r&&GU(e,r,i,a)}function GU(e,t,n,r){let i=e.__sentry_xhr_v3__?.request_headers;if(!(i?.[`sentry-trace`]||!e.setRequestHeader))try{if(e.setRequestHeader(`sentry-trace`,t),r&&!i?.traceparent&&e.setRequestHeader(`traceparent`,r),n){let t=i?.baggage;(!t||!PU(t))&&e.setRequestHeader(`baggage`,n)}}catch{}}var KU=new WeakMap,qU=new WeakMap,JU=9e4,YU=[`text/event-stream`,`application/x-ndjson`,`application/stream+json`],XU=J(()=>({name:`FetchStreamPerformance`,setup(){wy(e=>{if(e.response){let t=KU.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);let n=qU.get(e.response);n&&clearTimeout(n)}}}),Cy(e=>{if(e.endTimestamp&&e.response){let t=e.response.headers?.get(`content-type`)||``;if(e.response.headers?.get(`content-length`)||!YU.some(e=>t.startsWith(e)))return;let n=e.fetchData?.url||``,r=e.fetchData?.method||`GET`,i=Ev(n),a=Kg({name:`${r} ${n.startsWith(`data:`)?Av(n):i?Dv(i):n}`,startTime:e.endTimestamp,attributes:{url:Av(n),"http.method":r,type:`fetch`,[vm]:`http.client.stream`,[K]:`auto.http.browser.stream`}});KU.set(e.response,a);let o=setTimeout(()=>{a.isRecording()&&a.end()},JU);qU.set(e.response,o)}})}})),ZU=`WebVitals`,QU=J((e={})=>{let t=new Set(e.ignore??[]);return{name:ZU,setup(n){let r=Zm(n),{enableStandaloneClsSpans:i,enableStandaloneLcpSpans:a}=e._experiments??{},o=r||t.has(`cls`)?void 0:i||!1,s=r||t.has(`lcp`)?void 0:a||!1,c=VM({recordClsStandaloneSpans:o,recordLcpStandaloneSpans:s,client:n}),l=new WeakSet;n.on(`afterStartPageLoadSpan`,e=>{l.add(e)}),n.on(`spanEnd`,e=>{l.delete(e)&&(c(),XM(e,{recordClsOnPageloadSpan:o===!1,recordLcpOnPageloadSpan:s===!1,spanStreamingEnabled:r}))}),r?(t.has(`lcp`)||SN(n),t.has(`cls`)||wN(n),t.has(`inp`)||EN()):t.has(`inp`)||hN()},afterAllSetup(){t.has(`inp`)||bN()}}});function $U(){X.document&&X.document.addEventListener(`visibilitychange`,()=>{let e=$h();if(!e)return;let t=Zh(e);if(X.document.hidden&&t){let{op:e,status:n}=q(t);n||t.setStatus({code:2,message:`cancelled`}),t.setAttribute(`sentry.cancellation_reason`,`document.hidden`),t.end()}})}var eW=`sentry_previous_trace`,tW=`sentry.previous_trace`;function nW(e,{linkPreviousTrace:t,consistentTraceSampling:n}){let r=t===`session-storage`,i=r?aW():void 0;e.on(`spanStart`,e=>{if(Zh(e)!==e)return;let t=W().getPropagationContext();i=rW(i,e,t),r&&iW(i)});let a=!0;n&&e.on(`beforeSampling`,e=>{if(!i)return;let t=W(),n=t.getPropagationContext();if(a&&n.parentSpanId){a=!1;return}t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(i.sampleRate),sampled:String(oW(i.spanContext))},sampleRand:i.sampleRand}),e.parentSampled=oW(i.spanContext),e.parentSampleRate=i.sampleRate,e.spanAttributes={...e.spanAttributes,[_m]:i.sampleRate}})}function rW(e,t,n){let r=q(t);function i(){try{let e=Number(r.data?.[`sentry.sample_rate`]??n.dsc?.sample_rate);return Number.isNaN(e)?0:e}catch{return 0}}let a={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return a;let o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=3600&&(t.addLink({context:o,attributes:{[Im]:`previous_trace`}}),t.setAttribute(tW,`${o.traceId}-${o.spanId}-${+!!oW(o)}`)),a)}function iW(e){try{X.sessionStorage.setItem(eW,JSON.stringify(e))}catch{}}function aW(){try{let e=X.sessionStorage?.getItem(eW);return JSON.parse(e)}catch{return}}function oW(e){return e.traceFlags===1}var sW=`BrowserTracing`,cW=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function lW(){let e=X.navigator;return e?.userAgent?cW.test(e.userAgent):!1}var uW={...IS,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroun
494dSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:`in-memory`,consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...RU},dW=((e={})=>{`enableElementTiming`in e&&nf(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});let t={name:void 0,source:void 0},n=X.document,{enableInp:r,enableLongTask:i,enableLongAnimationFrame:a,_experiments:{enableInteractions:o,enableStandaloneClsSpans:s,enableStandaloneLcpSpans:c},beforeStartSpan:l,idleTimeout:u,finalTimeout:d,childSpanTimeout:f,markBackgroundSpan:p,traceFetch:m,traceXHR:h,trackFetchStreamPerformance:g,shouldCreateSpanForRequest:_,enableHTTPTimings:v,ignoreResourceSpans:y,ignorePerformanceApiSpans:b,instrumentPageLoad:x,instrumentNavigation:S,detectRedirects:C,linkPreviousTrace:w,consistentTraceSampling:T,enableReportPageLoaded:E,onRequestSpanStart:D,onRequestSpanEnd:ee}={...uW,...e},te=lW(),O,k;function ne(e,r,i=!0){let a=r.op===`pageload`,o=r.name,s=l?l(r):r,c=s.attributes||{};if(o!==s.name&&(c[hm]=`custom`,s.attributes=c),!i){let e=Mp();Kg({...s,startTime:e}).end(e);return}t.name=s.name,t.source=c[hm];let p=VS(s,{idleTimeout:u,finalTimeout:d,childSpanTimeout:f,disableAutoFinish:a,beforeSpanEnd:t=>{YM(t,{ignoreResourceSpans:y,ignorePerformanceApiSpans:b,spanStreamingEnabled:Zm(e)}),yW(e,void 0);let n=W(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:p.spanContext().traceId,sampled:Uh(p),dsc:ug(t)}),a&&(k=void 0)},trimIdleSpanEndTimestamp:!E});a&&E&&(k=p),yW(e,p);function m(){n&&[`interactive`,`complete`].includes(n.readyState)&&(e.emit(`idleSpanEnableAutoFinish`,p),n.removeEventListener(`readystatechange`,m))}a&&!E&&n&&(n.addEventListener(`readystatechange`,m),m())}return{name:sW,setup(e){if(te)return;if(FS(),a&&U.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes(`long-animation-frame`)?UM():i&&HM(),o&&WM(),C&&n){let e=()=>{O=Fp()};addEventListener(`click`,e,{capture:!0}),addEventListener(`keydown`,e,{capture:!0,passive:!0})}function t(){let t=vW(e);t&&!q(t).timestamp&&(t.setAttribute(ym,`cancelled`),t.end())}e.on(`startNavigationSpan`,(n,r)=>{if(G()!==e)return;if(r?.isRedirect){ne(e,{op:`navigation.redirect`,...n},!1);return}O=void 0,t(),um().setPropagationContext({traceId:Wp(),sampleRand:Math.random(),propagationSpanId:Km()?void 0:Gp()});let i=W();i.setPropagationContext({traceId:Wp(),sampleRand:Math.random(),propagationSpanId:Km()?void 0:Gp()}),i.setSDKProcessingMetadata({normalizedRequest:void 0}),ne(e,{op:`navigation`,...n,parentSpan:null,forceTransaction:!0})}),e.on(`startPageLoadSpan`,(n,r={})=>{if(G()!==e)return;t();let i=wh(r.sentryTrace||mW(`sentry-trace`)||hW(`sentry-trace`),r.baggage||mW(`baggage`)||hW(`baggage`)),a=W();a.setPropagationContext(i),Km()||(a.getPropagationContext().propagationSpanId=Gp()),a.setSDKProcessingMetadata({normalizedRequest:OA()}),ne(e,{op:`pageload`,...n})}),e.on(`endPageloadSpan`,()=>{E&&k&&(k.setAttribute(ym,`reportPageLoaded`),k.end())})},afterAllSetup(e){if(te)return;e.addIntegration&&!e.getIntegrationByName?.(`WebVitals`)&&e.addIntegration(QU({ignore:r?[]:[`inp`],_experiments:{enableStandaloneClsSpans:s,enableStandaloneLcpSpans:c}}));let n=zy();if(w!==`off`&&nW(e,{linkPreviousTrace:w,consistentTraceSampling:T}),X.location){if(x){let t=Rp();fW(e,{name:X.location.pathname,startTime:t?t/1e3:void 0,attributes:{[hm]:`url`,[K]:`auto.pageload.browser`}})}S&&zN(({to:t,from:r})=>{if(r===void 0&&n?.indexOf(t)!==-1){n=void 0;return}n=void 0;let i=Ev(t),a=vW(e),o=a&&C&&xW(a,O);pW(e,{name:i?.pathname||X.location.pathname,attributes:{[hm]:`url`,[K]:`auto.navigation.browser`}},{url:t,isRedirect:o})})}p&&$U(),o&&gW(e,u,d,f,t),zU(e,{traceFetch:m,traceXHR:h,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:_,enableHTTPTimings:v,onRequestSpanStart:D,onRequestSpanEnd:ee}),g&&e.addIntegration(XU())}}});function fW(e,t,n){e.emit(`startPageLoadSpan`,t,n),W().setTransactionName(t.name);let r=vW(e);return r&&e.emit(`afterStartPageLoadSpan`,r),r}function pW(e,t,n){let{url:r,isRedirect:i}=n||{};e.emit(`beforeStartNavigationSpan`,t,{isRedirect:i}),e.emit(`startNavigationSpan`,t,{isRedirect:i});let a=W();return a.setTransactionName(t.name),r&&!i&&a.setSDKProcessingMetadata({normalizedRequest:{...OA(),url:r}}),vW(e)}function mW(e){return(X.document?.querySelector(`meta[name=${e}]`))?.getAttribute(`content`)||void 0}function hW(e){return(X.performance?.getEntriesByType?.(`navigation`)[0])?.serverTiming?.find(t=>t.name===e)?.description}function gW(e,t,n,r,i){let a=X.document,o;a&&addEventListener(`click`,()=>{let a=vW(e);if(a){let e=q(a).op;if([`navigation`,`pageload`].includes(e))return}o&&=(o.setAttribute(ym,`interactionInterrupted`),o.end(),void 0),i.name&&(o=VS({name:i.name,op:`ui.action.click`,attributes:{[hm]:i.source||`url`}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r}))},{capture:!0})}var _W=`_sentry_idleSpan`;function vW(e){return e[_W]}function yW(e,t){Of(e,_W,t)}var bW=1.5;function xW(e,t){let n=q(e),r=Mp();return!(r-n.start_timestamp>bW||t&&r-t<=bW)}function SW(e=G()){e?.emit(`endPageloadSpan`)}function CW(e){let t=$h();if(t===e)return;let n=W();
494e.end=new Proxy(e.end,{apply(e,r,i){return Lf(n,t),Reflect.apply(e,r,i)}}),Lf(n,e)}var wW=J(()=>({name:`SpanStreaming`,beforeSetup(e){let t=e.getOptions();t.traceLifecycle||=`stream`},setup(e){let t=e.getOptions();if(!Zm(e)){t.traceLifecycle=`static`;return}let n=t.beforeSendSpan;if(n&&!mg(n)){t.traceLifecycle=`static`;return}let r=new dA(e);e.on(`afterSpanEnd`,t=>{Uh(t)&&r.add(v_(t,e))}),e.on(`afterSegmentSpanEnd`,e=>{let t=e.spanContext().traceId;setTimeout(()=>{r.flush(t)},500)})}}));function TW(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function EW(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=TW(n);return e=>r.then(n=>e(n.transaction(t,`readwrite`).objectStore(t)))}function DW(e){return TW(e.getAllKeys())}function OW(e,t,n){return e(e=>DW(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.max(...r,0)+1),TW(e.transaction)}))}function kW(e,t,n){return e(e=>DW(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.min(...r,0)-1),TW(e.transaction)}))}function AW(e){return e(e=>DW(e).then(t=>{let n=t[0];if(n!=null)return TW(e.get(n)).then(t=>(e.delete(n),TW(e.transaction).then(()=>t)))}))}function jW(e){let t;function n(){return t??=EW(e.dbName||`sentry-offline`,e.storeName||`queue`),t}return{push:async t=>{try{let r=xg(t);await OW(n(),r,e.maxQueueSize||30)}catch{}},unshift:async t=>{try{let r=xg(t);await kW(n(),r,e.maxQueueSize||30)}catch{}},shift:async()=>{try{let e=await AW(n());if(e)return Cg(e)}catch{}}}}function MW(e){return t=>{let n=e({...t,createStore:jW});return X.addEventListener(`online`,async e=>{await n.flush()}),n}}function NW(e=rP){return MW(iw(e))}var PW=1e6,FW=`window`in U&&U.window===U&&typeof importScripts>`u`,IW=`0`,LW=FW?`main`:`worker`,RW=X.navigator,zW=``,BW=``,VW=``,HW=RW?.userAgent||``,UW=``,WW=RW?.language||RW?.languages?.[0]||``;function GW(e){return typeof e==`object`&&!!e&&`getHighEntropyValues`in e}var KW=RW?.userAgentData;GW(KW)&&KW.getHighEntropyValues([`architecture`,`model`,`platform`,`platformVersion`,`fullVersionList`]).then(e=>{if(zW=e.platform||``,VW=e.architecture||``,UW=e.model||``,BW=e.platformVersion||``,e.fullVersionList?.length){let t=e.fullVersionList[e.fullVersionList.length-1];HW=`${t.brand} ${t.version}`}}).catch(e=>void 0);function qW(e){return!(`thread_metadata`in e)}function JW(e){return qW(e)?tG(e):e}function YW(e){let t=e.contexts?.trace?.trace_id;return typeof t==`string`&&t.length,typeof t==`string`?t:``}function XW(e,t,n,r){if(r.type!==`transaction`)throw TypeError(`Profiling events may only be attached to transactions, this should never occur.`);if(n==null)throw TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);let i=YW(r),a=JW(n),o=t||(typeof r.start_timestamp==`number`?r.start_timestamp*1e3:Fp()*1e3),s=typeof r.timestamp==`number`?r.timestamp*1e3:Fp()*1e3;return{event_id:e,timestamp:new Date(o).toISOString(),platform:`javascript`,version:`1`,release:r.release||``,environment:r.environment||`production`,runtime:{name:`javascript`,version:X.navigator.userAgent},os:{name:zW,version:BW,build_number:HW},device:{locale:WW,model:UW,manufacturer:HW,architecture:VW,is_emulator:!1},debug_meta:{images:iG(n.resources)},profile:a,transactions:[{name:r.transaction||``,id:r.event_id||Cp(),trace_id:i,active_thread_id:IW,relative_start_ns:`0`,relative_end_ns:((s-o)*1e6).toFixed(0)}]}}function ZW(e,t,n){if(e==null)throw TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);let r=$W(e),i=t.getOptions(),a=t.getSdkMetadata?.()?.sdk;return{chunk_id:Cp(),client_sdk:{name:a?.name??`sentry.javascript.browser`,version:a?.version??`0.0.0`},profiler_id:n||Cp(),platform:`javascript`,version:`2`,release:i.release??``,environment:i.environment??`production`,debug_meta:{images:iG(e.resources)},profile:r}}function QW(e){try{if(!e||typeof e!=`object`)return{reason:`chunk is not an object`};let t=e=>typeof e==`string`&&/^[a-f0-9]{32}$/.test(e);if(!t(e.profiler_id))return{reason:`missing or invalid profiler_id`};if(!t(e.chunk_id))return{reason:`missing or invalid chunk_id`};if(!e.client_sdk)return{reason:`missing client_sdk metadata`};let n=e.profile;return n?!Array.isArray(n.frames)||!n.frames.length?{reason:`profile has no frames`}
494:!Array.isArray(n.stacks)||!n.stacks.length?{reason:`profile has no stacks`}:!Array.isArray(n.samples)||!n.samples.length?{reason:`profile has no samples`}:{valid:!0}:{reason:`missing profile data`}}catch(e){return{reason:`unknown validation error: ${e}`}}}function $W(e){let t=[];for(let n=0;n<e.frames.length;n++){let r=e.frames[n];r&&(t[n]={function:r.name,abs_path:typeof r.resourceId==`number`?e.resources[r.resourceId]:void 0,lineno:r.line,colno:r.column})}let n=[];for(let t=0;t<e.stacks.length;t++){let r=e.stacks[t];if(!r)continue;let i=[],a=r;for(;a;)i.push(a.frameId),a=a.parentId===void 0?void 0:e.stacks[a.parentId];n[t]=i}let r=Rp(),i=typeof performance.timeOrigin==`number`?performance.timeOrigin:r||0,a=i-(r||i),o=[];for(let t=0;t<e.samples.length;t++){let n=e.samples[t];if(!n)continue;let r=(i+(n.timestamp-a))/1e3;o[t]={stack_id:n.stackId??0,thread_id:IW,timestamp:r}}return{frames:t,stacks:n,samples:o,thread_metadata:{[IW]:{name:LW}}}}function eG(e){return q(e).op===`pageload`}function tG(e){let t,n=0,r={samples:[],stacks:[],frames:[],thread_metadata:{[IW]:{name:LW}}},i=e.samples[0];if(!i)return r;let a=i.timestamp,o=Rp(),s=typeof performance.timeOrigin==`number`?performance.timeOrigin:o||0,c=s-(o||s);return e.samples.forEach((i,o)=>{if(i.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[o]={elapsed_since_start_ns:((i.timestamp+c-a)*PW).toFixed(0),stack_id:t,thread_id:IW};return}let s=e.stacks[i.stackId],l=[];for(;s;){l.push(s.frameId);let t=e.frames[s.frameId];t&&r.frames[s.frameId]===void 0&&(r.frames[s.frameId]={function:t.name,abs_path:typeof t.resourceId==`number`?e.resources[t.resourceId]:void 0,lineno:t.line,colno:t.column}),s=s.parentId===void 0?void 0:e.stacks[s.parentId]}let u={elapsed_since_start_ns:((i.timestamp+c-a)*PW).toFixed(0),stack_id:n,thread_id:IW};r.stacks[n]=l,r.samples[o]=u,n++}),r}function nG(e,t){if(!t.length)return e;for(let n of t)e[1].push([{type:`profile`},n]);return e}function rG(e){let t=[];return _g(e,(e,n)=>{if(n===`transaction`)for(let n=1;n<e.length;n++)e[n]?.contexts?.profile?.profile_id&&t.push(e[n])}),t}function iG(e){let t=G()?.getOptions()?.stackParser;return t?L_(t,e):[]}function aG(e){return typeof e!=`number`&&typeof e!=`boolean`||typeof e==`number`&&isNaN(e)?!1:e===!0||e===!1?!0:!(e<0||e>1)}function oG(e){return!(e.samples.length<2||!e.frames.length)}var sG=!1,cG=3e4;function lG(e){return typeof e==`function`}function uG(){let e=X.Profiler;if(!lG(e))return;let t=Math.floor(cG/10);try{return new e({sampleInterval:10,maxBufferSize:t})}catch{sG=!0}}function dG(e){if(sG||!e.isRecording())return!1;let t=G()?.getOptions();if(!t)return!1;let n=t.profilesSampleRate;return!(!aG(n)||!n||!(n===!0||Math.random()<n))}function fG(e){if(sG||e.profileLifecycle!==`trace`&&e.profileLifecycle!==`manual`)return!1;let t=e.profileSessionSampleRate;return!aG(t)||!t?!1:Math.random()<=t}function pG(e){return e.profilesSampleRate!==void 0}function mG(e,t,n,r){return oG(n)?XW(e,t,n,r):null}var hG=new Map;function gG(){return hG.size}function _G(e){let t=hG.get(e);return t&&hG.delete(e),t}function vG(e,t){if(hG.set(e,t),hG.size>30){let e=hG.keys().next().value;e!==void 0&&hG.delete(e)}}var yG=new WeakSet;function bG(e){e.setAttribute(`thread.id`,IW),e.setAttribute(`thread.name`,LW)}function xG(e){let t;eG(e)&&(t=Fp()*1e3);let n=uG();if(!n)return;let r=Cp(),i=null;W().setContext(`profile`,{profile_id:r,start_timestamp:t}),yG.add(e),bG(e);async function a(){if(e&&n&&!i)return n.stop().then(e=>{o&&=(X.clearTimeout(o),void 0),e&&(i=e,vG(r,e))}).catch(e=>{})}let o=X.setTimeout(()=>{a()},cG),s=e.end.bind(e);function c(){return e?(a().then(()=>{s()},()=>{s()}),e):s()}e.end=c}var SG=6e4,CG=3e5,wG=class{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1,this._lifecycleMode=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map}initialize(e){let t=e.getOptions().profileLifecycle,n=fG(e.getOptions());this._profilerId=Cp(),this._client=e,this._sessionSampled=n,this._lifecycleMode=t,t===`trace`&&this._setupTraceLifecycleListeners(e),e.on(`spanStart`,e=>{this._isRunning&&bG(e)})}start(){this._lifecycleMode!==`trace`&&(this._isRunning||this._sessionSampled&&this._beginProfiling())}stop(){this._lifecycleMode!==`trace`&&this._isRunning&&this._endProfiling()}notifyRootSpanActive(e){if(this._lifecycleMode!==`trace`||!this._sessionSampled)return;let t=e.spanContext().spanId;!t||this._activeRootSpanIds.has(t)||(this._registerTraceRootSpan(t),this._activeRootSpanIds.size===1&&this._beginProfiling(),this._isRunning&&bG(e))}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,dm().setContext(`profile`,{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&=(clearTimeout(this._chunkTimer),void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(e=>{}),this._lifecycleMode===`manual`&&dm().setContext(`profile`,{}))}_setupTraceLifecycleListeners(e){e.on(`spanStart`,e=>{if(!this._sessionSampled||e!==Zh(e)||!e.isRecording())return;let t=e.spanContext().spanId;!t||this._activeRootSpanIds.has(t)||(this._registerTraceRootSpan(t),this._activeRootSpanIds.size===1&&this._beginProfiling())}),e.on(`spanEnd`,e=>
494{if(!this._sessionSampled)return;let t=e.spanContext().spanId;!t||!this._activeRootSpanIds.has(t)||(this._activeRootSpanIds.delete(t),this._activeRootSpanIds.size===0&&(this._collectCurrentChunk().catch(e=>{}),this._endProfiling()))})}_resetProfilerInfo(){this._isRunning=!1,dm().setContext(`profile`,{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(e=>clearTimeout(e)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(e){this._activeRootSpanIds.add(e);let t=setTimeout(()=>this._onRootSpanTimeout(e),CG);this._rootSpanTimeouts.set(e,t)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;let e=uG();e&&(this._profiler=e)}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(e=>{}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},SG))}_onRootSpanTimeout(e){this._rootSpanTimeouts.has(e)&&(this._rootSpanTimeouts.delete(e),this._activeRootSpanIds.has(e)&&(this._activeRootSpanIds.delete(e),this._activeRootSpanIds.size===0&&this._endProfiling()))}async _collectCurrentChunk(){let e=this._profiler;if(this._profiler=void 0,e)try{let t=ZW(await e.stop(),this._client,this._profilerId);if(`reason`in QW(t))return;this._sendProfileChunk(t)}catch{}}_sendProfileChunk(e){let t=this._client,n=kg(t.getSdkMetadata?.()),r=t.getDsn(),i=t.getOptions().tunnel,a=hg({event_id:Cp(),sent_at:new Date().toISOString(),...n&&{sdk:n},...!!i&&r&&{dsn:hh(r)}},[[{type:`profile_chunk`,platform:`javascript`},e]]);t.sendEnvelope(a).then(null,e=>{})}},TG=`BrowserProfiling`,EG=J((()=>({name:TG,setup(e){let t=e.getOptions(),n=new wG;if(!pG(t)&&!t.profileLifecycle&&(t.profileLifecycle=`manual`),pG(t)&&!t.profilesSampleRate)return;let r=$h(),i=r&&Zh(r);if(pG(t)&&t.profileSessionSampleRate,pG(t))i&&eG(i)&&dG(i)&&xG(i),e.on(`spanStart`,e=>{let t=Zh(e);e===t?dG(e)&&xG(e):yG.has(t)&&bG(e)}),e.on(`beforeEnvelope`,e=>{if(!gG())return;let t=rG(e);if(!t.length)return;let n=[];for(let e of t){let t=e?.contexts,r=t?.profile?.profile_id,i=t?.profile?.start_timestamp;if(typeof r!=`string`||!r)continue;t?.profile&&delete t.profile;let a=_G(r);if(!a)continue;let o=mG(r,i,a,e);o&&n.push(o)}nG(e,n)});else{let r=t.profileLifecycle;if(e.on(`startUIProfiler`,()=>n.start()),e.on(`stopUIProfiler`,()=>n.stop()),r===`manual`)n.initialize(e);else if(r===`trace`){if(!Km(t))return;n.initialize(e),i&&n.notifyRootSpanActive(i),X.setTimeout(()=>{let e=$h(),t=e&&Zh(e);t&&n.notifyRootSpanActive(t)},0)}}}}))),DG=`SpotlightBrowser`,OG=[{op:`ui.interaction.click`,name:`#sentry-spotlight`}],kG=((e={})=>{let t=e.sidecarUrl||`http://localhost:8969/stream`;return{name:DG,setup:()=>{},beforeSetup(e){let t=e.getOptions();t.ignoreSpans=[...t.ignoreSpans||[],...OG]},afterAllSetup:e=>{AG(e,t)}}});function AG(e,t){let n=UN(`fetch`),r=0;e.on(`beforeEnvelope`,e=>{if(r>3){df.warn(`[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:`,r);return}n(t,{method:`POST`,body:xg(e),headers:{"Content-Type":`application/x-sentry-envelope`},mode:`cors`}).then(e=>{e.status>=200&&e.status<400&&(r=0)},e=>{r++,df.error(`Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/`,e)})})}var jG=J(kG),MG=J(()=>({name:`LaunchDarkly`,processEvent(e,t,n){return eE(e)}}));function NG(){return{name:`sentry-flag-auditor`,type:`flag-used`,synchronous:!0,method:(e,t,n)=>{tE(e,t.value),rE(e,t.value)}}}var PG=J(()=>({name:`OpenFeature`,processEvent(e,t,n){return eE(e)}})),FG=class{after(e,t){tE(t.flagKey,t.value),rE(t.flagKey,t.value)}error(e,t,n){tE(e.flagKey,e.defaultValue),rE(e.flagKey,e.defaultValue)}},IG=J(({featureFlagClientClass:e})=>({name:`Unleash`,setupOnce(){let t=e.prototype;Df(t,`isEnabled`,LG)},processEvent(e,t,n){return eE(e)}}));function LG(e){return function(...t){let n=t[0],r=e.apply(this,t);return typeof n==`string`&&typeof r==`boolean`&&(tE(n,r),rE(n,r)),r}}var RG=(({growthbookClass:e})=>aE({growthbookClass:e})),zG=J(({featureFlagClient:e})=>({name:`Statsig`,setup(t){e.on(`gate_evaluation`,e=>
494{tE(e.gate.name,e.gate.value),rE(e.gate.name,e.gate.value)})},processEvent(e,t,n){return eE(e)}}));async function BG(){let e=G();if(!e)return`no-client-active`;if(!e.getDsn())return`no-dsn-configured`;let t=e.getOptions().tunnel||`https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7`;try{await Yg(()=>fetch(t,{body:`{}`,method:`POST`,mode:`cors`,credentials:`omit`}))}catch{return`sentry-unreachable`}}var VG=`WebWorker`,HG=J(({worker:e})=>({name:VG,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(e=>UG(e))},addWorker:e=>UG(e)}));function UG(e){e.addEventListener(`message`,e=>{if(KG(e.data)){if(e.stopImmediatePropagation(),e.data._sentryDebugIds&&(X._sentryDebugIds={...e.data._sentryDebugIds,...X._sentryDebugIds}),e.data._sentryModuleMetadata&&(X._sentryModuleMetadata={...e.data._sentryModuleMetadata,...X._sentryModuleMetadata}),e.data._sentryWasmImages){let t=X._sentryWasmImages||[],n=e.data._sentryWasmImages.filter(e=>xf(e)&&typeof e.code_file==`string`&&!t.some(t=>t.code_file===e.code_file));X._sentryWasmImages=[...t,...n]}e.data._sentryWorkerError&&WG(e.data._sentryWorkerError)}})}function WG(e){let t=G();if(!t)return;let n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,i=e.reason,a=bf(i)?oF(i):YA(n,i,void 0,r,!0);a.level=`error`,e.filename&&(a.contexts={...a.contexts,worker:{filename:e.filename}}),Z_(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.web_worker.onunhandledrejection`}})}function GG({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0}),e.addEventListener(`unhandledrejection`,t=>{let n={reason:aF(t),filename:e.location?.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:n})})}function KG(e){if(!xf(e)||e._sentryMessage!==!0)return!1;
494let t=`_sentryDebugIds`in e,n=`_sentryModuleMetadata`in e,r=`_sentryWorkerError`in e,i=`_sentryWasmImages`in e;return!(!t&&!n&&!r&&!i||t&&!(xf(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(xf(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!xf(e._sentryWorkerError)||i&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(e=>xf(e)&&typeof e.code_file==`string`)))}var qG=e({BrowserClient:()=>ej,MULTIPLEXED_TRANSPORT_EXTRA_KEY:()=>aw,OpenFeatureIntegrationHook:()=>FG,SDK_VERSION:()=>Xd,SEMANTIC_ATTRIBUTE_SENTRY_OP:()=>vm,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:()=>K,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:()=>gm,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:()=>hm,Scope:()=>qp,WINDOW:()=>X,addBreadcrumb:()=>Rv,addEventProcessor:()=>fv,addIntegration:()=>Cv,bindScopeToEmitter:()=>JS,breadcrumbsIntegration:()=>PP,browserApiErrorsIntegration:()=>WP,browserProfilingIntegration:()=>EG,browserSessionIntegration:()=>ZP,browserTracingIntegration:()=>dW,buildLaunchDarklyFlagUsedHandler:()=>NG,captureConsoleIntegration:()=>Yw,captureEvent:()=>Z_,captureException:()=>Y_,captureFeedback:()=>zv,captureMessage:()=>X_,captureSession:()=>gv,chromeStackLineParser:()=>_P,close:()=>lv,consoleLoggingIntegration:()=>ME,contextLinesIntegration:()=>qF,continueTrace:()=>qg,createConsolaReporter:()=>PE,createLangChainCallbackHandler:()=>Wk,createTransport:()=>wC,createUserFeedbackEnvelope:()=>AP,cultureContextIntegration:()=>$P,dedupeIntegration:()=>Qw,defaultRequestInstrumentationOptions:()=>RU,defaultStackLineParsers:()=>DP,defaultStackParser:()=>OP,diagnoseSdkConnectivity:()=>BG,elementTimingIntegration:()=>dN,endSession:()=>mv,eventFiltersIntegration:()=>Dw,eventFromException:()=>qA,eventFromMessage:()=>JA,exceptionFromError:()=>LA,extraErrorDataIntegration:()=>oT,featureFlagsIntegration:()=>iE,feedbackAsyncIntegration:()=>FA,feedbackIntegration:()=>IA,feedbackSyncIntegration:()=>IA,fetchStreamPerformanceIntegration:()=>XU,flush:()=>cv,forceLoad:()=>SF,functionToStringIntegration:()=>ww,geckoStackLineParser:()=>bP,getActiveSpan:()=>$h,getClient:()=>G,getCurrentScope:()=>W,getDefaultIntegrations:()=>bF,getFeedback:()=>Pb,getGlobalScope:()=>dm,getIsolationScope:()=>um,getReplay:()=>HH,getRootSpan:()=>Zh,getSpanDescendants:()=>Xh,getSpanStatusFromHttpCode:()=>ah,getTraceData:()=>vw,globalHandlersIntegration:()=>nF,graphqlClientIntegration:()=>sI,growthbookIntegration:()=>RG,httpClientIntegration:()=>AF,httpContextIntegration:()=>uF,inboundFiltersIntegration:()=>Ow,init:()=>xF,instrumentAnthropicAiClient:()=>ik,instrumentCreateReactAgent:()=>iA,instrumentGoogleGenAIClient:()=>bk,instrumentLangChainEmbeddings:()=>CA,instrumentLangGraph:()=>aA,instrumentOpenAiClient:()=>PO,instrumentOutgoingRequests:()=>zU,instrumentSupabaseClient:()=>PT,isBotUserAgent:()=>lW,isEnabled:()=>dv,isInitialized:()=>uv,lastEventId:()=>sv,launchDarklyIntegration:()=>MG,lazyLoadIntegration:()=>NA,linkedErrorsIntegration:()=>mF,logger:()=>vE,makeBrowserOfflineTransport:()=>NW,makeFetchTransport:()=>rP,makeMultiplexedTransport:()=>lw,metrics:()=>sy,moduleMetadataIntegration:()=>Ww,normalizeStringifyValue:()=>gF,onLoad:()=>CF,openFeatureIntegration:()=>PG,opera10StackLineParser:()=>wP,opera11StackLineParser:()=>EP,parameterize:()=>mw,registerSpanErrorInstrumentation:()=>FS,registerWebWorker:()=>GG,replayCanvasIntegration:()=>NU,replayIntegration:()=>RH,reportPageLoaded:()=>SW,reportingObserverIntegration:()=>OF,rewriteFramesIntegration:()=>_T,sendFeedback:()=>yb,setActiveSpanInBrowser:()=>CW,setAttribute:()=>iv,setAttributes:()=>rv,setContext:()=>Q_,setConversationId:()=>ov,setCurrentClient:()=>tw,setExtra:()=>ev,setExtras:()=>$_,setHttpStatus:()=>oh,setMeasurement:()=>Fg,setTag:()=>nv,setTags:()=>tv,setUser:()=>av,showReportDialog:()=>wF,spanStreamingIntegration:()=>wW,spanToBaggageHeader:()=>dg,spanToJSON:()=>q,spanToTraceHeader:()=>Mh,spotlightBrowserIntegration:()=>jG,startBrowserTracingNavigationSpan:()=>pW,startBrowserTracingPageLoadSpan:()=>fW,startInactiveSpan:()=>Kg,startNewTrace:()=>Xg,startSession:()=>pv,startSpan:()=>Wg,startSpanManual:()=>Gg,statsigIntegration:()=>zG,supabaseIntegration:()=>LT,suppressTracing:()=>Yg,thirdPartyErrorFilterIntegration:()=>KT,uiProfiler:()=>oP,unleashIntegration:()=>IG,updateSpanName:()=>tg,viewHierarchyIntegration:()=>cI,webVitalsIntegration:()=>QU,webWorkerIntegration:()=>
494HG,winjsStackLineParser:()=>SP,withActiveSpan:()=>Jg,withIsolationScope:()=>pm,withScope:()=>fm,withStreamedSpan:()=>pg,zodErrorsIntegration:()=>GT});if(window.EF=Yn.default,window.Sentry=qG,window.posthogConfig?.apiKey){let e=window.posthogConfig;Yd.init(e.apiKey,{api_host:e.apiHost||`https://app.posthog.com`,capture_pageview:!1,persistence:`localStorage+cookie`}),window.posthog=Yd,e.distinctId&&Yd.identify(e.distinctId,e.personProperties||{}),e.personProperties&&Yd.register(e.personProperties)}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.