/*! For license information please see 836.48cdcabe4c1845fa5d7b.js.LICENSE.txt */ !function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="091cf21a-6109-48c5-a146-af05683580ff",t._sentryDebugIdIdentifier="sentry-dbid-091cf21a-6109-48c5-a146-af05683580ff")}catch(t){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"ee29e06d3ab9fde0b52529e17350da51d77b4fc3"},(self.webpackChunktadaam_tenant_v3=self.webpackChunktadaam_tenant_v3||[]).push([[836],{8100:(t,e,n)=>{"use strict";n.d(e,{D3:()=>bt,tw:()=>vt});var r=n(7294),o=n(5108),i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},s=function(){return s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?setTimeout(n,e):n()}}window.addEventListener("storage",s),t.addToWaiting(s);var a=setTimeout(s,Math.max(0,e-Date.now()))}))];case 1:return n.sent(),[2]}}))}))},t.addToWaiting=function(e){this.removeFromWaiting(e),void 0!==t.waiters&&t.waiters.push(e)},t.removeFromWaiting=function(e){void 0!==t.waiters&&(t.waiters=t.waiters.filter((function(t){return t!==e})))},t.notifyWaiters=function(){void 0!==t.waiters&&t.waiters.slice().forEach((function(t){return t()}))},t.prototype.releaseLock=function(t){return n(this,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return[4,this.releaseLock__private__(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.releaseLock__private__=function(e){return n(this,void 0,void 0,(function(){var n,i,s;return r(this,(function(r){switch(r.label){case 0:return n=window.localStorage,i=o+"-"+e,null===(s=n.getItem(i))?[2]:(s=JSON.parse(s)).id!==this.id?[3,2]:[4,f.default().lock(s.iat)];case 1:r.sent(),this.acquiredIatSet.delete(s.iat),n.removeItem(i),f.default().unlock(s.iat),t.notifyWaiters(),r.label=2;case 2:return[2]}}))}))},t.lockCorrector=function(){for(var e=Date.now()-5e3,n=window.localStorage,r=Object.keys(n),i=!1,s=0;sDate.now();class v extends Error{constructor(t,e){super(e),this.error=t,this.error_description=e,Object.setPrototypeOf(this,v.prototype)}static fromPayload({error:t,error_description:e}){return new v(t,e)}}class b extends v{constructor(t,e,n,r=null){super(t,e),this.state=n,this.appState=r,Object.setPrototypeOf(this,b.prototype)}}class x extends v{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,x.prototype)}}class w extends x{constructor(t){super(),this.popup=t,Object.setPrototypeOf(this,w.prototype)}}class k extends v{constructor(t){super("cancelled","Popup closed"),this.popup=t,Object.setPrototypeOf(this,k.prototype)}}class S extends v{constructor(t,e,n){super(t,e),this.mfa_token=n,Object.setPrototypeOf(this,S.prototype)}}class C extends v{constructor(t,e){super("missing_refresh_token",`Missing Refresh Token (audience: '${A(t,["default"])}', scope: '${A(e)}')`),this.audience=t,this.scope=e,Object.setPrototypeOf(this,C.prototype)}}function A(t,e=[]){return t&&!e.includes(t)?t:""}const E=()=>window.crypto,T=()=>{let t="";return Array.from(E().getRandomValues(new Uint8Array(43))).forEach((e=>t+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~."[e%66])),t},P=t=>btoa(t),O=t=>{var{clientId:e}=t,n=c(t,["clientId"]);return new URLSearchParams((t=>Object.keys(t).filter((e=>void 0!==t[e])).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{}))(Object.assign({client_id:e},n))).toString()},R=t=>(t=>decodeURIComponent(atob(t).split("").map((t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2))).join("")))(t.replace(/_/g,"/").replace(/-/g,"+")),I=async(t,e)=>{const n=await fetch(t,e);return{ok:n.ok,json:await n.json()}},M=async(t,e,n,r,o,i,s=1e4)=>o?(async(t,e,n,r,o,i,s)=>{return a={auth:{audience:e,scope:n},timeout:o,fetchUrl:t,fetchOptions:r,useFormData:s},l=i,new Promise((function(t,e){const n=new MessageChannel;n.port1.onmessage=function(r){r.data.error?e(new Error(r.data.error)):t(r.data),n.port1.close()},l.postMessage(a,[n.port2])}));var a,l})(t,e,n,r,s,o,i):(async(t,e,n)=>{const r=new AbortController;let o;return e.signal=r.signal,Promise.race([I(t,e),new Promise(((t,e)=>{o=setTimeout((()=>{r.abort(),e(new Error("Timeout when executing 'fetch'"))}),n)}))]).finally((()=>{clearTimeout(o)}))})(t,r,s);async function L(t,e){var{baseUrl:n,timeout:r,audience:o,scope:i,auth0Client:s,useFormData:a}=t,l=c(t,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);const u=a?O(l):JSON.stringify(l);return await async function(t,e,n,r,o,i,s){let a,l=null;for(let c=0;c<3;c++)try{a=await M(t,n,r,o,i,s,e),l=null;break}catch(t){l=t}if(l)throw l;const u=a.json,{error:d,error_description:h}=u,f=c(u,["error","error_description"]),{ok:p}=a;if(!p){const e=h||`HTTP error. Unable to fetch ${t}`;if("mfa_required"===d)throw new S(d,e,f.mfa_token);if("missing_refresh_token"===d)throw new C(n,r);throw new v(d||"request_error",e)}return f}(`${n}/oauth/token`,r,o||"default",i,{method:"POST",body:u,headers:{"Content-Type":a?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(s||m))}},e,a)}const j=(...t)=>{return(e=t.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(e))).join(" ");var e};class _{constructor(t,e="@@auth0spajs@@",n){this.prefix=e,this.suffix=n,this.clientId=t.clientId,this.scope=t.scope,this.audience=t.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(t){const[e,n,r,o]=t.split("::");return new _({clientId:n,scope:o,audience:r},e)}static fromCacheEntry(t){const{scope:e,audience:n,client_id:r}=t;return new _({scope:e,audience:n,clientId:r})}}class D{set(t,e){localStorage.setItem(t,JSON.stringify(e))}get(t){const e=window.localStorage.getItem(t);if(e)try{return JSON.parse(e)}catch(t){return}}remove(t){localStorage.removeItem(t)}allKeys(){return Object.keys(window.localStorage).filter((t=>t.startsWith("@@auth0spajs@@")))}}class F{constructor(){this.enclosedCache=function(){let t={};return{set(e,n){t[e]=n},get(e){const n=t[e];if(n)return n},remove(e){delete t[e]},allKeys:()=>Object.keys(t)}}()}}class N{constructor(t,e,n){this.cache=t,this.keyManifest=e,this.nowProvider=n||y}async setIdToken(t,e,n){var r;const o=this.getIdTokenCacheKey(t);await this.cache.set(o,{id_token:e,decodedToken:n}),await(null===(r=this.keyManifest)||void 0===r?void 0:r.add(o))}async getIdToken(t){const e=await this.cache.get(this.getIdTokenCacheKey(t.clientId));if(!e&&t.scope&&t.audience){const e=await this.get(t);if(!e)return;if(!e.id_token||!e.decodedToken)return;return{id_token:e.id_token,decodedToken:e.decodedToken}}if(e)return{id_token:e.id_token,decodedToken:e.decodedToken}}async get(t,e=0){var n;let r=await this.cache.get(t.toKey());if(!r){const e=await this.getCacheKeys();if(!e)return;const n=this.matchExistingCacheKey(t,e);n&&(r=await this.cache.get(n))}if(!r)return;const o=await this.nowProvider(),i=Math.floor(o/1e3);return r.expiresAt-e!t||e.includes(t))).reduce((async(t,e)=>{await t,await this.cache.remove(e)}),Promise.resolve()),await(null===(e=this.keyManifest)||void 0===e?void 0:e.clear()))}async wrapCacheEntry(t){const e=await this.nowProvider();return{body:t,expiresAt:Math.floor(e/1e3)+t.expires_in}}async getCacheKeys(){var t;return this.keyManifest?null===(t=await this.keyManifest.get())||void 0===t?void 0:t.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(t){return new _({clientId:t},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(t,e){return e.filter((e=>{var n;const r=_.fromKey(e),o=new Set(r.scope&&r.scope.split(" ")),i=(null===(n=t.scope)||void 0===n?void 0:n.split(" "))||[],s=r.scope&&i.reduce(((t,e)=>t&&o.has(e)),!0);return"@@auth0spajs@@"===r.prefix&&r.clientId===t.clientId&&r.audience===t.audience&&s}))[0]}}class B{constructor(t,e,n){this.storage=t,this.clientId=e,this.cookieDomain=n,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(t){this.storage.save(this.storageKey,t,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}}const z=t=>"number"==typeof t,V=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"];var $=h((function(t,e){var n=u&&u.__assign||function(){return n=Object.assign||function(t){for(var e,n=1,r=arguments.length;nq.get(t)||q.get(`_legacy_${t}`),save(t,e,n){let r={};"https:"===window.location.protocol&&(r={secure:!0}),(null==n?void 0:n.daysUntilExpire)&&(r.expires=n.daysUntilExpire),(null==n?void 0:n.cookieDomain)&&(r.domain=n.cookieDomain),U(`_legacy_${t}`,JSON.stringify(e),r),q.save(t,e,n)},remove(t,e){let n={};(null==e?void 0:e.cookieDomain)&&(n.domain=e.cookieDomain),H(t,n),q.remove(t,e),q.remove(`_legacy_${t}`,e)}},Y={get(t){if("undefined"==typeof sessionStorage)return;const e=sessionStorage.getItem(t);return null!=e?JSON.parse(e):void 0},save(t,e){sessionStorage.setItem(t,JSON.stringify(e))},remove(t){sessionStorage.removeItem(t)}};var Z,K=function(t){return Z=Z||function(){var t=function(t){var e=atob(t);return e}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9Y29uc3Qgcz1lPT57dmFye2NsaWVudElkOnR9PWUscj1mdW5jdGlvbihlLHQpe3ZhciByPXt9O2Zvcih2YXIgcyBpbiBlKU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChlLHMpJiZ0LmluZGV4T2Yocyk8MCYmKHJbc109ZVtzXSk7aWYobnVsbCE9ZSYmImZ1bmN0aW9uIj09dHlwZW9mIE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMpe3ZhciBvPTA7Zm9yKHM9T2JqZWN0LmdldE93blByb3BlcnR5U3ltYm9scyhlKTtvPHMubGVuZ3RoO28rKyl0LmluZGV4T2Yoc1tvXSk8MCYmT2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZS5jYWxsKGUsc1tvXSkmJihyW3Nbb11dPWVbc1tvXV0pfXJldHVybiByfShlLFsiY2xpZW50SWQiXSk7cmV0dXJuIG5ldyBVUkxTZWFyY2hQYXJhbXMoKGU9Pk9iamVjdC5rZXlzKGUpLmZpbHRlcigodD0+dm9pZCAwIT09ZVt0XSkpLnJlZHVjZSgoKHQscik9Pk9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSx0KSx7W3JdOmVbcl19KSkse30pKShPYmplY3QuYXNzaWduKHtjbGllbnRfaWQ6dH0scikpKS50b1N0cmluZygpfTtsZXQgbz17fTtjb25zdCBuPShlLHQpPT5gJHtlfXwke3R9YDthZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIiwoYXN5bmMoe2RhdGE6e3RpbWVvdXQ6ZSxhdXRoOnIsZmV0Y2hVcmw6aSxmZXRjaE9wdGlvbnM6Yyx1c2VGb3JtRGF0YTphfSxwb3J0czpbZl19KT0+e2xldCBwO2NvbnN0e2F1ZGllbmNlOmwsc2NvcGU6dX09cnx8e307dHJ5e2NvbnN0IHI9YT8oZT0+e2NvbnN0IHQ9bmV3IFVSTFNlYXJjaFBhcmFtcyhlKSxyPXt9O3JldHVybiB0LmZvckVhY2goKChlLHQpPT57clt0XT1lfSkpLHJ9KShjLmJvZHkpOkpTT04ucGFyc2UoYy5ib2R5KTtpZighci5yZWZyZXNoX3Rva2VuJiYicmVmcmVzaF90b2tlbiI9PT1yLmdyYW50X3R5cGUpe2NvbnN0IGU9KChlLHQpPT5vW24oZSx0KV0pKGwsdSk7aWYoIWUpdGhyb3cgbmV3IHQobCx1KTtjLmJvZHk9YT9zKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxyKSx7cmVmcmVzaF90b2tlbjplfSkpOkpTT04uc3RyaW5naWZ5KE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxyKSx7cmVmcmVzaF90b2tlbjplfSkpfWxldCBkLGc7ImZ1bmN0aW9uIj09dHlwZW9mIEFib3J0Q29udHJvbGxlciYmKGQ9bmV3IEFib3J0Q29udHJvbGxlcixjLnNpZ25hbD1kLnNpZ25hbCk7dHJ5e2c9YXdhaXQgUHJvbWlzZS5yYWNlKFsoaD1lLG5ldyBQcm9taXNlKChlPT5zZXRUaW1lb3V0KGUsaCkpKSksZmV0Y2goaSxPYmplY3QuYXNzaWduKHt9LGMpKV0pfWNhdGNoKGUpe3JldHVybiB2b2lkIGYucG9zdE1lc3NhZ2Uoe2Vycm9yOmUubWVzc2FnZX0pfWlmKCFnKXJldHVybiBkJiZkLmFib3J0KCksdm9pZCBmLnBvc3RNZXNzYWdlKHtlcnJvcjoiVGltZW91dCB3aGVuIGV4ZWN1dGluZyAnZmV0Y2gnIn0pO3A9YXdhaXQgZy5qc29uKCkscC5yZWZyZXNoX3Rva2VuPygoKGUsdCxyKT0+e29bbih0LHIpXT1lfSkocC5yZWZyZXNoX3Rva2VuLGwsdSksZGVsZXRlIHAucmVmcmVzaF90b2tlbik6KChlLHQpPT57ZGVsZXRlIG9bbihlLHQpXX0pKGwsdSksZi5wb3N0TWVzc2FnZSh7b2s6Zy5vayxqc29uOnB9KX1jYXRjaChlKXtmLnBvc3RNZXNzYWdlKHtvazohMSxqc29uOntlcnJvcjplLmVycm9yLGVycm9yX2Rlc2NyaXB0aW9uOmUubWVzc2FnZX19KX12YXIgaH0pKX0oKTsKCg=="),e=t.indexOf("\n",10)+1,n=t.substring(e)+"",r=new Blob([n],{type:"application/javascript"});return URL.createObjectURL(r)}(),new Worker(Z,t)};const X={};class J{constructor(t,e){this.cache=t,this.clientId=e,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(t){var e;const n=new Set((null===(e=await this.cache.get(this.manifestKey))||void 0===e?void 0:e.keys)||[]);n.add(t),await this.cache.set(this.manifestKey,{keys:[...n]})}async remove(t){const e=await this.cache.get(this.manifestKey);if(e){const n=new Set(e.keys);return n.delete(t),n.size>0?await this.cache.set(this.manifestKey,{keys:[...n]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(t){return`@@auth0spajs@@::${t}`}}const Q={memory:()=>(new F).enclosedCache,localstorage:()=>new D},tt=t=>Q[t],et=t=>{const{openUrl:e,onRedirect:n}=t,r=c(t,["openUrl","onRedirect"]);return Object.assign(Object.assign({},r),{openUrl:!1===e||e?e:n})},nt=new p;class rt{constructor(t){let e,n;if(this.userCache=(new F).enclosedCache,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{await nt.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),t),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),t.authorizationParams)}),"undefined"!=typeof window&&(()=>{if(!E())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===E().subtle)throw new Error("\n auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/master/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.\n ")})(),t.cache&&t.cacheLocation&&o.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),t.cache)n=t.cache;else{if(e=t.cacheLocation||"memory",!tt(e))throw new Error(`Invalid cache location "${e}"`);n=tt(e)()}this.httpTimeoutMs=t.httpTimeoutInSeconds?1e3*t.httpTimeoutInSeconds:1e4,this.cookieStorage=!1===t.legacySameSiteCookie?q:G,this.orgHintCookieName=`auth0.${this.options.clientId}.organization_hint`,this.isAuthenticatedCookieName=(()=>`auth0.${this.options.clientId}.is.authenticated`)(),this.sessionCheckExpiryDays=t.sessionCheckExpiryDays||1;const r=t.useCookiesForTransactions?this.cookieStorage:Y;var i;this.scope=j("openid",this.options.authorizationParams.scope,this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new B(r,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||y,this.cacheManager=new N(n,n.allKeys?void 0:new J(n,this.options.clientId),this.nowProvider),this.domainUrl=(i=this.options.domain,/^https?:\/\//.test(i)?i:`https://${i}`),this.tokenIssuer=((t,e)=>t?t.startsWith("https://")?t:`https://${t}/`:`${e}/`)(this.options.issuer,this.domainUrl),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&"memory"===e&&(this.worker=new K)}_url(t){const e=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||m)));return`${this.domainUrl}${t}&auth0Client=${e}`}_authorizeUrl(t){return this._url(`/authorize?${O(t)}`)}async _verifyIdToken(t,e,n){const r=await this.nowProvider();return(t=>{if(!t.id_token)throw new Error("ID token is required but missing");const e=(t=>{const e=t.split("."),[n,r,o]=e;if(3!==e.length||!n||!r||!o)throw new Error("ID token could not be decoded");const i=JSON.parse(R(r)),s={__raw:t},a={};return Object.keys(i).forEach((t=>{s[t]=i[t],V.includes(t)||(a[t]=i[t])})),{encoded:{header:n,payload:r,signature:o},header:JSON.parse(R(n)),claims:s,user:a}})(t.id_token);if(!e.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(e.claims.iss!==t.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${t.iss}", found "${e.claims.iss}"`);if(!e.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if("RS256"!==e.header.alg)throw new Error(`Signature algorithm of "${e.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!e.claims.aud||"string"!=typeof e.claims.aud&&!Array.isArray(e.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(e.claims.aud)){if(!e.claims.aud.includes(t.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${t.aud}" but was not one of "${e.claims.aud.join(", ")}"`);if(e.claims.aud.length>1){if(!e.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(e.claims.azp!==t.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${t.aud}", found "${e.claims.azp}"`)}}else if(e.claims.aud!==t.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${t.aud}" but found "${e.claims.aud}"`);if(t.nonce){if(!e.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(e.claims.nonce!==t.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${t.nonce}", found "${e.claims.nonce}"`)}if(t.max_age&&!z(e.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(null==e.claims.exp||!z(e.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!z(e.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const n=t.leeway||60,r=new Date(t.now||Date.now()),o=new Date(0);if(o.setUTCSeconds(e.claims.exp+n),r>o)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${r}) is after expiration time (${o})`);if(null!=e.claims.nbf&&z(e.claims.nbf)){const t=new Date(0);if(t.setUTCSeconds(e.claims.nbf-n),ro)throw new Error(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (${r}) is after last auth at ${o}`)}if(t.organization){const n=t.organization.trim();if(n.startsWith("org_")){const t=n;if(!e.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(t!==e.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${t}", found "${e.claims.org_id}"`)}else{const t=n.toLowerCase();if(!e.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(t!==e.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${t}", found "${e.claims.org_name}"`)}}return e})({iss:this.tokenIssuer,aud:this.options.clientId,id_token:t,nonce:e,organization:n,leeway:this.options.leeway,max_age:(o=this.options.authorizationParams.max_age,"string"!=typeof o?o:parseInt(o,10)||void 0),now:r});var o}_processOrgHint(t){t?this.cookieStorage.save(this.orgHintCookieName,t,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(t,e,n){const r=P(T()),o=P(T()),i=T(),s=(t=>{const e=new Uint8Array(t);return(t=>{const e={"+":"-","/":"_","=":""};return t.replace(/[+/=]/g,(t=>e[t]))})(window.btoa(String.fromCharCode(...Array.from(e))))})(await(async t=>{const e=E().subtle.digest({name:"SHA-256"},(new TextEncoder).encode(t));return await e})(i)),a=((t,e,n,r,o,i,s,a)=>Object.assign(Object.assign(Object.assign({client_id:t.clientId},t.authorizationParams),n),{scope:j(e,n.scope),response_type:"code",response_mode:a||"query",state:r,nonce:o,redirect_uri:s||t.authorizationParams.redirect_uri,code_challenge:i,code_challenge_method:"S256"}))(this.options,this.scope,t,r,o,s,t.redirect_uri||this.options.authorizationParams.redirect_uri||n,null==e?void 0:e.response_mode),l=this._authorizeUrl(a);return{nonce:o,code_verifier:i,scope:a.scope,audience:a.audience||"default",redirect_uri:a.redirect_uri,state:r,url:l}}async loginWithPopup(t,e){var n;if(t=t||{},!(e=e||{}).popup&&(e.popup=(()=>{const t=window.screenX+(window.innerWidth-400)/2,e=window.screenY+(window.innerHeight-600)/2;return window.open("","auth0:authorize:popup",`left=${t},top=${e},width=400,height=600,resizable,scrollbars=yes,status=1`)})(),!e.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");const r=await this._prepareAuthorizeUrl(t.authorizationParams||{},{response_mode:"web_message"},window.location.origin);e.popup.location.href=r.url;const o=await(t=>new Promise(((e,n)=>{let r;const o=setInterval((()=>{t.popup&&t.popup.closed&&(clearInterval(o),clearTimeout(i),window.removeEventListener("message",r,!1),n(new k(t.popup)))}),1e3),i=setTimeout((()=>{clearInterval(o),n(new w(t.popup)),window.removeEventListener("message",r,!1)}),1e3*(t.timeoutInSeconds||60));r=function(s){if(s.data&&"authorization_response"===s.data.type){if(clearTimeout(i),clearInterval(o),window.removeEventListener("message",r,!1),t.popup.close(),s.data.response.error)return n(v.fromPayload(s.data.response));e(s.data.response)}},window.addEventListener("message",r)})))(Object.assign(Object.assign({},e),{timeoutInSeconds:e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(r.state!==o.state)throw new v("state_mismatch","Invalid state");const i=(null===(n=t.authorizationParams)||void 0===n?void 0:n.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:r.audience,scope:r.scope,code_verifier:r.code_verifier,grant_type:"authorization_code",code:o.code,redirect_uri:r.redirect_uri},{nonceIn:r.nonce,organization:i})}async getUser(){var t;const e=await this._getIdTokenFromCache();return null===(t=null==e?void 0:e.decodedToken)||void 0===t?void 0:t.user}async getIdTokenClaims(){var t;const e=await this._getIdTokenFromCache();return null===(t=null==e?void 0:e.decodedToken)||void 0===t?void 0:t.claims}async loginWithRedirect(t={}){var e;const n=et(t),{openUrl:r,fragment:o,appState:i}=n,s=c(n,["openUrl","fragment","appState"]),a=(null===(e=s.authorizationParams)||void 0===e?void 0:e.organization)||this.options.authorizationParams.organization,l=await this._prepareAuthorizeUrl(s.authorizationParams||{}),{url:u}=l,d=c(l,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},d),{appState:i}),a&&{organization:a}));const h=o?`${u}#${o}`:u;r?await r(h):window.location.assign(h)}async handleRedirectCallback(t=window.location.href){const e=t.split("?").slice(1);if(0===e.length)throw new Error("There are no query params available for parsing.");const{state:n,code:r,error:o,error_description:i}=(t=>{t.indexOf("#")>-1&&(t=t.substring(0,t.indexOf("#")));const e=new URLSearchParams(t);return{state:e.get("state"),code:e.get("code")||void 0,error:e.get("error")||void 0,error_description:e.get("error_description")||void 0}})(e.join("")),s=this.transactionManager.get();if(!s)throw new v("missing_transaction","Invalid state");if(this.transactionManager.remove(),o)throw new b(o,i||o,n,s.appState);if(!s.code_verifier||s.state&&s.state!==n)throw new v("state_mismatch","Invalid state");const a=s.organization,l=s.nonce,c=s.redirect_uri;return await this._requestToken(Object.assign({audience:s.audience,scope:s.scope,code_verifier:s.code_verifier,grant_type:"authorization_code",code:r},c?{redirect_uri:c}:{}),{nonceIn:l,organization:a}),{appState:s.appState}}async checkSession(t){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(t)}catch(t){}}async getTokenSilently(t={}){var e;const n=Object.assign(Object.assign({cacheMode:"on"},t),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),t.authorizationParams),{scope:j(this.scope,null===(e=t.authorizationParams)||void 0===e?void 0:e.scope)})}),r=await((t,e)=>{let n=X[e];return n||(n=t().finally((()=>{delete X[e],n=null})),X[e]=n),n})((()=>this._getTokenSilently(n)),`${this.options.clientId}::${n.authorizationParams.audience}::${n.authorizationParams.scope}`);return t.detailedResponse?r:null==r?void 0:r.access_token}async _getTokenSilently(t){const{cacheMode:e}=t,n=c(t,["cacheMode"]);if("off"!==e){const t=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(t)return t}if("cache-only"!==e){if(!await(async(t,e=3)=>{for(let n=0;nnt.acquireLock("auth0.lock.getTokenSilently",5e3)),10))throw new x;try{if(window.addEventListener("pagehide",this._releaseLockOnPageHide),"off"!==e){const t=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(t)return t}const t=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(n):await this._getTokenFromIFrame(n),{id_token:r,access_token:o,oauthTokenScope:i,expires_in:s}=t;return Object.assign(Object.assign({id_token:r,access_token:o},i?{scope:i}:null),{expires_in:s})}finally{await nt.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}}async getTokenWithPopup(t={},e={}){var n;const r=Object.assign(Object.assign({},t),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),t.authorizationParams),{scope:j(this.scope,null===(n=t.authorizationParams)||void 0===n?void 0:n.scope)})});return e=Object.assign(Object.assign({},g),e),await this.loginWithPopup(r,e),(await this.cacheManager.get(new _({scope:r.authorizationParams.scope,audience:r.authorizationParams.audience||"default",clientId:this.options.clientId}))).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(t){null!==t.clientId?t.clientId=t.clientId||this.options.clientId:delete t.clientId;const e=t.logoutParams||{},{federated:n}=e,r=c(e,["federated"]),o=n?"&federated":"";return this._url(`/v2/logout?${O(Object.assign({clientId:t.clientId},r))}`)+o}async logout(t={}){const e=et(t),{openUrl:n}=e,r=c(e,["openUrl"]);null===t.clientId?await this.cacheManager.clear():await this.cacheManager.clear(t.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@");const o=this._buildLogoutUrl(r);n?await n(o):!1!==n&&window.location.assign(o)}async _getTokenFromIFrame(t){const e=Object.assign(Object.assign({},t.authorizationParams),{prompt:"none"}),n=this.cookieStorage.get(this.orgHintCookieName);n&&!e.organization&&(e.organization=n);const{url:r,state:o,nonce:i,code_verifier:s,redirect_uri:a,scope:l,audience:c}=await this._prepareAuthorizeUrl(e,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new v("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const n=t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,u=await((t,e,n=60)=>new Promise(((r,o)=>{const i=window.document.createElement("iframe");i.setAttribute("width","0"),i.setAttribute("height","0"),i.style.display="none";const s=()=>{window.document.body.contains(i)&&(window.document.body.removeChild(i),window.removeEventListener("message",a,!1))};let a;const l=setTimeout((()=>{o(new x),s()}),1e3*n);a=function(t){if(t.origin!=e)return;if(!t.data||"authorization_response"!==t.data.type)return;const n=t.source;n&&n.close(),t.data.response.error?o(v.fromPayload(t.data.response)):r(t.data.response),clearTimeout(l),window.removeEventListener("message",a,!1),setTimeout(s,2e3)},window.addEventListener("message",a,!1),window.document.body.appendChild(i),i.setAttribute("src",t)})))(r,this.domainUrl,n);if(o!==u.state)throw new v("state_mismatch","Invalid state");const d=await this._requestToken(Object.assign(Object.assign({},t.authorizationParams),{code_verifier:s,code:u.code,grant_type:"authorization_code",redirect_uri:a,timeout:t.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:i,organization:e.organization});return Object.assign(Object.assign({},d),{scope:l,oauthTokenScope:d.scope,audience:c})}catch(t){throw"login_required"===t.error&&this.logout({openUrl:!1}),t}}async _getTokenUsingRefreshToken(t){const e=await this.cacheManager.get(new _({scope:t.authorizationParams.scope,audience:t.authorizationParams.audience||"default",clientId:this.options.clientId}));if(!(e&&e.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(t);throw new C(t.authorizationParams.audience||"default",t.authorizationParams.scope)}const n=t.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,r="number"==typeof t.timeoutInSeconds?1e3*t.timeoutInSeconds:null;try{const o=await this._requestToken(Object.assign(Object.assign(Object.assign({},t.authorizationParams),{grant_type:"refresh_token",refresh_token:e&&e.refresh_token,redirect_uri:n}),r&&{timeout:r}));return Object.assign(Object.assign({},o),{scope:t.authorizationParams.scope,oauthTokenScope:o.scope,audience:t.authorizationParams.audience||"default"})}catch(e){if((e.message.indexOf("Missing Refresh Token")>-1||e.message&&e.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(t);throw e}}async _saveEntryInCache(t){const{id_token:e,decodedToken:n}=t,r=c(t,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:e,decodedToken:n}),await this.cacheManager.setIdToken(this.options.clientId,t.id_token,t.decodedToken),await this.cacheManager.set(r)}async _getIdTokenFromCache(){const t=this.options.authorizationParams.audience||"default",e=await this.cacheManager.getIdToken(new _({clientId:this.options.clientId,audience:t,scope:this.scope})),n=this.userCache.get("@@user@@");return e&&e.id_token===(null==n?void 0:n.id_token)?n:(this.userCache.set("@@user@@",e),e)}async _getEntryFromCache({scope:t,audience:e,clientId:n}){const r=await this.cacheManager.get(new _({scope:t,audience:e,clientId:n}),60);if(r&&r.access_token){const{access_token:t,oauthTokenScope:e,expires_in:n}=r,o=await this._getIdTokenFromCache();return o&&Object.assign(Object.assign({id_token:o.id_token,access_token:t},e?{scope:e}:null),{expires_in:n})}}async _requestToken(t,e){const{nonceIn:n,organization:r}=e||{},o=await L(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},t),this.worker),i=await this._verifyIdToken(o.id_token,n,r);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},o),{decodedToken:i,scope:t.scope,audience:t.audience||"default"}),o.scope?{oauthTokenScope:o.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(r||i.claims.org_id),Object.assign(Object.assign({},o),{decodedToken:i})}}var ot={isAuthenticated:!1,isLoading:!0},it=function(){throw new Error("You forgot to wrap your component in .")},st=s(s({},ot),{buildAuthorizeUrl:it,buildLogoutUrl:it,getAccessTokenSilently:it,getAccessTokenWithPopup:it,getIdTokenClaims:it,loginWithRedirect:it,loginWithPopup:it,logout:it,handleRedirectCallback:it}),at=(0,r.createContext)(st),lt=function(t){function e(n,r){var o=t.call(this,r||n)||this;return o.error=n,o.error_description=r,Object.setPrototypeOf(o,e.prototype),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e}(Error),ct=/[?&]code=[^&]+/,ut=/[?&]state=[^&]+/,dt=/[?&]error=[^&]+/,ht=function(t){return function(e){return e instanceof Error?e:null!==e&&"object"==typeof e&&"error"in e&&"string"==typeof e.error?"error_description"in e&&"string"==typeof e.error_description?new lt(e.error,e.error_description):new lt(e.error):new Error(t)}},ft=ht("Login failed"),pt=ht("Get access token failed"),gt=function(t){var e;(null==t?void 0:t.redirectUri)&&(o.warn("Using `redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `redirectUri` will be no longer supported in a future version"),t.authorizationParams=t.authorizationParams||{},t.authorizationParams.redirect_uri=t.redirectUri,delete t.redirectUri),(null===(e=null==t?void 0:t.authorizationParams)||void 0===e?void 0:e.redirectUri)&&(o.warn("Using `authorizationParams.redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `authorizationParams.redirectUri` will be removed in a future version"),t.authorizationParams.redirect_uri=t.authorizationParams.redirectUri,delete t.authorizationParams.redirectUri)},mt=function(t,e){switch(e.type){case"LOGIN_POPUP_STARTED":return s(s({},t),{isLoading:!0});case"LOGIN_POPUP_COMPLETE":case"INITIALISED":return s(s({},t),{isAuthenticated:!!e.user,user:e.user,isLoading:!1,error:void 0});case"HANDLE_REDIRECT_COMPLETE":case"GET_ACCESS_TOKEN_COMPLETE":return t.user===e.user?t:s(s({},t),{isAuthenticated:!!e.user,user:e.user});case"LOGOUT":return s(s({},t),{isAuthenticated:!1,user:void 0});case"ERROR":return s(s({},t),{isLoading:!1,error:e.error})}},yt=function(t){window.history.replaceState({},document.title,(null==t?void 0:t.returnTo)||window.location.pathname)},vt=function(t){var e=t.children,n=t.skipRedirectCallback,o=t.onRedirectCallback,i=void 0===o?yt:o,c=t.context,u=void 0===c?at:c,d=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o{"use strict";n.d(e,{Ep:()=>h,J0:()=>l,LX:()=>T,RQ:()=>L,WK:()=>N,X3:()=>F,Zn:()=>O,Zq:()=>I,aU:()=>r,cP:()=>f,fp:()=>g,lX:()=>a,pC:()=>M});var r,o=n(5108);function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e=1;e{a.removeEventListener(s,v),g=null}},createHref:t=>e(a,t),createURL:b,encodeLocation(t){let e=b(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){p=r.Push;let o=d(x.location,t,e);n&&n(o,t),m=y()+1;let i=u(o,m),s=x.createHref(o);try{f.pushState(i,"",s)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;a.location.assign(s)}c&&g&&g({action:p,location:x.location,delta:1})},replace:function(t,e){p=r.Replace;let o=d(x.location,t,e);n&&n(o,t),m=y();let i=u(o,m),s=x.createHref(o);f.replaceState(i,"",s),c&&g&&g({action:p,location:x.location,delta:0})},go:t=>f.go(t)};return x}((function(t,e){let{pathname:n,search:r,hash:o}=t.location;return d("",{pathname:n,search:r,hash:o},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){return"string"==typeof e?e:h(e)}),null,t)}function l(t,e){if(!1===t||null==t)throw new Error(e)}function c(t,e){if(!t){void 0!==o&&o.warn(e);try{throw new Error(e)}catch(t){}}}function u(t,e){return{usr:t.state,key:t.key,idx:e}}function d(t,e,n,r){return void 0===n&&(n=null),i({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?f(e):e,{state:n,key:e&&e.key||r||Math.random().toString(36).substr(2,8)})}function h(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&"?"!==n&&(e+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function f(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}var p;function g(t,e,n){void 0===n&&(n="/");let r=O(("string"==typeof e?f(e):e).pathname||"/",n);if(null==r)return null;let o=m(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,n)=>t===e[n]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(o);let i=null;for(let t=0;null==i&&t{let s={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};s.relativePath.startsWith("/")&&(l(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(r.length));let a=L([r,s.relativePath]),c=n.concat(s);t.children&&t.children.length>0&&(l(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),m(t.children,e,c,a)),(null!=t.path||t.index)&&e.push({path:a,score:A(a,t.index),routesMeta:c})};return t.forEach(((t,e)=>{var n;if(""!==t.path&&null!=(n=t.path)&&n.includes("?"))for(let n of y(t.path))o(t,e,n);else o(t,e)})),e}function y(t){let e=t.split("/");if(0===e.length)return[];let[n,...r]=e,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let s=y(r.join("/")),a=[];return a.push(...s.map((t=>""===t?i:[i,t].join("/")))),o&&a.push(...s),a.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(p||(p={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const v=/^:\w+$/,b=3,x=2,w=1,k=10,S=-2,C=t=>"*"===t;function A(t,e){let n=t.split("/"),r=n.length;return n.some(C)&&(r+=S),e&&(r+=x),n.filter((t=>!C(t))).reduce(((t,e)=>t+(v.test(e)?b:""===e?w:k)),r)}function E(t,e){let{routesMeta:n}=t,r={},o="/",i=[];for(let t=0;t(r.push({paramName:e,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(r.push({paramName:"*"}),o+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==t&&"/"!==t&&(o+="(?:(?=\\/|$))"),[new RegExp(o,e?void 0:"i"),r]}(t.path,t.caseSensitive,t.end),o=e.match(n);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),a=o.slice(1);return{params:r.reduce(((t,e,n)=>{let{paramName:r,isOptional:o}=e;if("*"===r){let t=a[n]||"";s=i.slice(0,i.length-t.length).replace(/(.)\/+$/,"$1")}const l=a[n];return t[r]=o&&!l?void 0:function(t,e){try{return decodeURIComponent(t)}catch(n){return c(!1,'The value for the URL param "'+e+'" will not be decoded because the string "'+t+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),t}}(l||"",r),t}),{}),pathname:i,pathnameBase:s,pattern:t}}function P(t){try{return decodeURI(t)}catch(e){return c(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function O(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&"/"!==r?null:t.slice(n)||"/"}function R(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function I(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}function M(t,e,n,r){let o;void 0===r&&(r=!1),"string"==typeof t?o=f(t):(o=i({},t),l(!o.pathname||!o.pathname.includes("?"),R("?","pathname","search",o)),l(!o.pathname||!o.pathname.includes("#"),R("#","pathname","hash",o)),l(!o.search||!o.search.includes("#"),R("#","search","hash",o)));let s,a=""===t||""===o.pathname,c=a?"/":o.pathname;if(r||null==c)s=n;else{let t=e.length-1;if(c.startsWith("..")){let e=c.split("/");for(;".."===e[0];)e.shift(),t-=1;o.pathname=e.join("/")}s=t>=0?e[t]:"/"}let u=function(t,e){void 0===e&&(e="/");let{pathname:n,search:r="",hash:o=""}="string"==typeof t?f(t):t,i=n?n.startsWith("/")?n:function(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?n.length>1&&n.pop():"."!==t&&n.push(t)})),n.length>1?n.join("/"):"/"}(n,e):e;return{pathname:i,search:_(r),hash:D(o)}}(o,s),d=c&&"/"!==c&&c.endsWith("/"),h=(a||"."===c)&&n.endsWith("/");return u.pathname.endsWith("/")||!d&&!h||(u.pathname+="/"),u}const L=t=>t.join("/").replace(/\/\/+/g,"/"),j=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),_=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",D=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";class F extends Error{}function N(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}const B=["post","put","patch","delete"],z=(new Set(B),["get",...B]);new Set(z),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred")},5363:(t,e,n)=>{"use strict";n.d(e,{PR:()=>S,to:()=>A,$A:()=>C,_j:()=>E});var r=n(2343),o=n(1738),i=n(7513);const s=(t,e,n)=>{let r,o;return i=>{e.value>=0&&(i||n)&&(o=e.value-(r||0),(o||void 0===r)&&(r=e.value,e.delta=o,t(e)))}};var a=n(3821);const l=()=>a.WINDOW.__WEB_VITALS_POLYFILL__?a.WINDOW.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=a.WINDOW.performance.timing,e=a.WINDOW.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==e?"back_forward":1===e?"reload":"navigate"};for(const e in t)"navigationStart"!==e&&"toJSON"!==e&&(n[e]=Math.max(t[e]-t.navigationStart,0));return n})()):a.WINDOW.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],c=()=>{const t=l();return t&&t.activationStart||0},u=(t,e)=>{const n=l();let r="navigate";return n&&(r=a.WINDOW.document.prerendering||c()>0?"prerender":n.type.replace(/_/g,"-")),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},d=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver((t=>{e(t.getEntries())}));return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(t){}};var h=n(188);const f=t=>{const e=u("CLS",0);let n,r=0,o=[];const i=t=>{t.forEach((t=>{if(!t.hadRecentInput){const i=o[0],s=o[o.length-1];r&&0!==o.length&&t.startTime-s.startTime<1e3&&t.startTime-i.startTime<5e3?(r+=t.value,o.push(t)):(r=t.value,o=[t]),r>e.value&&(e.value=r,e.entries=o,n&&n())}}))},a=d("layout-shift",i);if(a){n=s(t,e);const r=()=>{i(a.takeRecords()),n(!0)};return(0,h.u)(r),r}};var p=n(5029);const g=t=>{const e=(0,p.Y)(),n=u("FID");let r;const o=t=>{t.startTime{t.forEach(o)},a=d("first-input",i);r=s(t,n),a&&(0,h.u)((()=>{i(a.takeRecords()),a.disconnect()}),!0)},m={},y=t=>{const e=(0,p.Y)(),n=u("LCP");let r;const o=t=>{const o=t[t.length-1];if(o){const t=Math.max(o.startTime-c(),0);t{m[n.id]||(o(i.takeRecords()),i.disconnect(),m[n.id]=!0,r(!0))};return["keydown","click"].forEach((t=>{addEventListener(t,e,{once:!0,capture:!0})})),(0,h.u)(e,!0),e}},v={},b={};let x,w,k;function S(t,e=!1){return I("cls",t,P,x,e)}function C(t,e=!1){return I("lcp",t,R,k,e)}function A(t){return I("fid",t,O,w)}function E(t,e){return M(t,e),b[t]||(function(t){const e={};"event"===t&&(e.durationThreshold=0),d(t,(e=>{T(t,{entries:e})}),e)}(t),b[t]=!0),L(t,e)}function T(t,e){const n=v[t];if(n&&n.length)for(const s of n)try{s(e)}catch(e){i.X&&r.kg.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${(0,o.$P)(s)}\nError:`,e)}}function P(){return f((t=>{T("cls",{metric:t}),x=t}))}function O(){return g((t=>{T("fid",{metric:t}),w=t}))}function R(){return y((t=>{T("lcp",{metric:t}),k=t}))}function I(t,e,n,r,o=!1){let i;return M(t,e),b[t]||(i=n(),b[t]=!0),r&&e({metric:r}),L(t,e,o?i:void 0)}function M(t,e){v[t]=v[t]||[],v[t].push(e)}function L(t,e,n){return()=>{n&&n();const r=v[t];if(!r)return;const o=r.indexOf(e);-1!==o&&r.splice(o,1)}}},3821:(t,e,n)=>{"use strict";n.d(e,{WINDOW:()=>r});const r=n(1235).GLOBAL_OBJ},5029:(t,e,n)=>{"use strict";n.d(e,{Y:()=>s});var r=n(3821),o=n(188);let i=-1;const s=()=>(i<0&&(i="hidden"!==r.WINDOW.document.visibilityState||r.WINDOW.document.prerendering?1/0:0,(0,o.u)((({timeStamp:t})=>{i=t}),!0)),{get firstHiddenTime(){return i}})},188:(t,e,n)=>{"use strict";n.d(e,{u:()=>o});var r=n(3821);const o=(t,e)=>{const n=o=>{"pagehide"!==o.type&&"hidden"!==r.WINDOW.document.visibilityState||(t(o),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)}},7513:(t,e,n)=>{"use strict";n.d(e,{X:()=>r});const r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},6891:(t,e,n)=>{"use strict";n.d(e,{Wz:()=>c,m9:()=>a,re:()=>u});var r=n(4487),o=n(1235),i=n(535),s=n(2844);const a=o.GLOBAL_OBJ;let l=0;function c(){return l>0}function u(t,e={},n){if("function"!=typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return e;if((0,i.HK)(t))return t}catch(e){return t}const o=function(){const o=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const r=o.map((t=>u(t,e)));return t.apply(this,r)}catch(t){throw l++,setTimeout((()=>{l--})),(0,r.$e)((n=>{n.addEventProcessor((t=>(e.mechanism&&((0,s.Db)(t,void 0,void 0),(0,s.EG)(t,e.mechanism)),t.extra={...t.extra,arguments:o},t))),(0,r.Tb)(t)})),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(o[e]=t[e])}catch(t){}(0,i.$Q)(o,t),(0,i.xp)(t,"__sentry_wrapped__",o);try{Object.getOwnPropertyDescriptor(o,"name").configurable&&Object.defineProperty(o,"name",{get:()=>t.name})}catch(t){}return o}},807:(t,e,n)=>{"use strict";n.d(e,{W:()=>b,Q:()=>k});var r=n(292),o=n(2343),i=n(2844),s=n(7597),a=n(6893),l=n(8725),c=n(409),u=n(535);var d=n(1703),h=n(4487),f=n(5659),p=n(2967);var g=n(9015),m=n(454),y=n(8942);const v="Not capturing exception because it's already been captured.";class b{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=(0,r.vK)(t.dsn):d.X&&o.kg.warn("No DSN provided, client will not send events."),this._dsn){const e=function(t,e={}){const n="string"==typeof e?e:e.tunnel,r="string"!=typeof e&&e._metadata?e._metadata.sdk:void 0;return n||`${function(t){return`${function(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}(t)}${t.projectId}/envelope/`}(t)}?${function(t,e){return(0,u._j)({sentry_key:t.publicKey,sentry_version:"7",...e&&{sentry_client:`${e.name}/${e.version}`}})}(t,r)}`}(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}}captureException(t,e,n){if((0,i.YO)(t))return void(d.X&&o.kg.log(v));let r=e&&e.event_id;return this._process(this.eventFromException(t,e).then((t=>this._captureEvent(t,e,n))).then((t=>{r=t}))),r}captureMessage(t,e,n,r){let o=n&&n.event_id;const i=(0,s.Le)(t)?t:String(t),a=(0,s.pt)(t)?this.eventFromMessage(i,e,n):this.eventFromException(t,n);return this._process(a.then((t=>this._captureEvent(t,n,r))).then((t=>{o=t}))),o}captureEvent(t,e,n){if(e&&e.originalException&&(0,i.YO)(e.originalException))return void(d.X&&o.kg.log(v));let r=e&&e.event_id;const s=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,e,s||n).then((t=>{r=t}))),r}captureSession(t){"string"!=typeof t.release?d.X&&o.kg.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),(0,g.CT)(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const e=this._transport;return e?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then((n=>e.flush(t).then((t=>n&&t))))):(0,a.WD)(!0)}close(t){return this.flush(t).then((t=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),t)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch(e){return d.X&&o.kg.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const e=this._integrations[t.name];(0,p.m7)(this,t,this._integrations),e||(0,p.uf)(this,[t])}sendEvent(t,e={}){this.emit("beforeSendEvent",t,e);let n=function(t,e,n,r){const o=(0,l.HY)(n),i=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,n&&n.sdk);const s=(0,l.Cd)(t,o,r,e);delete t.sdkProcessingMetadata;const a=[{type:i},t];return(0,l.Jd)(s,[a])}(t,this._dsn,this._options._metadata,this._options.tunnel);for(const t of e.attachments||[])n=(0,l.BO)(n,(0,l.zQ)(t,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then((e=>this.emit("afterSendEvent",t,e)),null)}sendSession(t){const e=function(t,e,n,o){const i=(0,l.HY)(n),s={sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!o&&e&&{dsn:(0,r.RA)(e)}},a="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return(0,l.Jd)(s,[a])}(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(e)}recordDroppedEvent(t,e,n){if(this._options.sendClientReports){const n=`${t}:${e}`;d.X&&o.kg.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}captureAggregateMetrics(t){d.X&&o.kg.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const e=function(t,e,n,o){const i={sent_at:(new Date).toISOString()};n&&n.sdk&&(i.sdk={name:n.sdk.name,version:n.sdk.version}),o&&e&&(i.dsn=(0,r.RA)(e));const s=function(t){const e=function(t){let e="";for(const n of t){const t=Object.entries(n.tags),r=t.length>0?`|#${t.map((([t,e])=>`${t}:${e}`)).join(",")}`:"";e+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}\n`}return e}(t);return[{type:"statsd",length:e.length},e]}(t);return(0,l.Jd)(i,[s])}(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(e)}on(t,e){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(e)}emit(t,...e){this._hooks[t]&&this._hooks[t].forEach((t=>t(...e)))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=(0,p.q4)(this,t),(0,p.uf)(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,e){let n=!1,r=!1;const o=e.exception&&e.exception.values;if(o){r=!0;for(const t of o){const e=t.mechanism;if(e&&!1===e.handled){n=!0;break}}}const i="ok"===t.status;(i&&0===t.errors||i&&n)&&((0,g.CT)(t,{...n&&{status:"crashed"},errors:t.errors||Number(r||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new a.cW((e=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(t,e,n,r=(0,f.aF)()){const o=this.getOptions(),i=Object.keys(this._integrations);return!e.integrations&&i.length>0&&(e.integrations=i),this.emit("preprocessEvent",t,e),(0,y.R)(o,t,e,n,this,r).then((t=>{if(null===t)return t;const e={...r.getPropagationContext(),...n?n.getPropagationContext():void 0};if((!t.contexts||!t.contexts.trace)&&e){const{traceId:r,spanId:o,parentSpanId:i,dsc:s}=e;t.contexts={trace:{trace_id:r,span_id:o,parent_span_id:i},...t.contexts};const a=s||(0,m._)(r,this,n);t.sdkProcessingMetadata={dynamicSamplingContext:a,...t.sdkProcessingMetadata}}return t}))}_captureEvent(t,e={},n){return this._processEvent(t,e,n).then((t=>t.event_id),(t=>{if(d.X){const e=t;"log"===e.logLevel?o.kg.log(e.message):o.kg.warn(e)}}))}_processEvent(t,e,n){const r=this.getOptions(),{sampleRate:o}=r,i=w(t),l=x(t),u=t.type||"error",d=`before send for type \`${u}\``;if(l&&"number"==typeof o&&Math.random()>o)return this.recordDroppedEvent("sample_rate","error",t),(0,a.$2)(new c.b(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const h="replay_event"===u?"replay":u,f=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,e,n,f).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",h,t),new c.b("An event processor returned `null`, will not send event.","log");if(e.data&&!0===e.data.__sentry__)return n;const o=function(t,e,n){const{beforeSend:r,beforeSendTransaction:o}=t;return x(e)&&r?r(e,n):w(e)&&o?o(e,n):e}(r,n,e);return function(t,e){const n=`${e} must return \`null\` or a valid event.`;if((0,s.J8)(t))return t.then((t=>{if(!(0,s.PO)(t)&&null!==t)throw new c.b(n);return t}),(t=>{throw new c.b(`${e} rejected with ${t}`)}));if(!(0,s.PO)(t)&&null!==t)throw new c.b(n);return t}(o,d)})).then((r=>{if(null===r)throw this.recordDroppedEvent("before_send",h,t),new c.b(`${d} returned \`null\`, will not send event.`,"log");const o=n&&n.getSession();!i&&o&&this._updateSessionFromEvent(o,r);const s=r.transaction_info;if(i&&s&&r.transaction!==t.transaction){const t="custom";r.transaction_info={...s,source:t}}return this.sendEvent(r,e),r})).then(null,(t=>{if(t instanceof c.b)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new c.b(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)}))}_process(t){this._numProcessing++,t.then((t=>(this._numProcessing--,t)),(t=>(this._numProcessing--,t)))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,(t=>{d.X&&o.kg.error("Error while sending event:",t)}));d.X&&o.kg.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map((e=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t[e]}}))}}function x(t){return void 0===t.type}function w(t){return"transaction"===t.type}function k(t){const e=(0,h.s3)();e&&e.addEventProcessor&&e.addEventProcessor(t)}},1131:(t,e,n)=>{"use strict";n.d(e,{J:()=>r});const r="production"},1703:(t,e,n)=>{"use strict";n.d(e,{X:()=>r});const r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},1195:(t,e,n)=>{"use strict";n.d(e,{RP:()=>u,cc:()=>c,fH:()=>l});var r=n(1235),o=n(6893),i=n(2343),s=n(7597),a=n(1703);function l(){return(0,r.Y)("globalEventProcessors",(()=>[]))}function c(t){l().push(t)}function u(t,e,n,r=0){return new o.cW(((o,l)=>{const c=t[r];if(null===e||"function"!=typeof c)o(e);else{const d=c({...e},n);a.X&&c.id&&null===d&&i.kg.log(`Event processor "${c.id}" dropped event`),(0,s.J8)(d)?d.then((e=>u(t,e,n,r+1).then(o))).then(null,l):u(t,d,n,r+1).then(o).then(null,l)}}))}},4487:(t,e,n)=>{"use strict";n.d(e,{$e:()=>h,Tb:()=>l,cg:()=>v,eN:()=>c,nZ:()=>p,n_:()=>u,s3:()=>f,v:()=>d,yj:()=>g});var r=n(1235),o=n(1131),i=n(5659),s=n(9015),a=n(8942);function l(t,e){return(0,i.Gd)().captureException(t,(0,a.U0)(e))}function c(t,e){return(0,i.Gd)().captureEvent(t,e)}function u(t,e){(0,i.Gd)().addBreadcrumb(t,e)}function d(t,e){(0,i.Gd)().setContext(t,e)}function h(...t){const e=(0,i.Gd)();if(2===t.length){const[n,r]=t;return n?e.withScope((()=>(e.getStackTop().scope=n,r(n)))):e.withScope(r)}return e.withScope(t[0])}function f(){return(0,i.Gd)().getClient()}function p(){return(0,i.Gd)().getScope()}function g(t){const e=f(),n=(0,i.aF)(),a=p(),{release:l,environment:c=o.J}=e&&e.getOptions()||{},{userAgent:u}=r.GLOBAL_OBJ.navigator||{},d=(0,s.Hv)({release:l,environment:c,user:a.getUser()||n.getUser(),...u&&{userAgent:u},...t}),h=n.getSession();return h&&"ok"===h.status&&(0,s.CT)(h,{status:"exited"}),m(),n.setSession(d),a.setSession(d),d}function m(){const t=(0,i.aF)(),e=p(),n=e.getSession()||t.getSession();n&&(0,s.RJ)(n),y(),t.setSession(),e.setSession()}function y(){const t=(0,i.aF)(),e=p(),n=f(),r=e.getSession()||t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function v(t=!1){t?m():y()}},5659:(t,e,n)=>{"use strict";n.d(e,{Gd:()=>v,aF:()=>b,cu:()=>m});var r=n(7597),o=n(2844),i=n(1170),s=n(2343),a=n(1235),l=n(1131),c=n(1703),u=n(350),d=n(9015),h=n(105);const f=parseFloat(h.J),p=100;class g{constructor(t,e,n,r=f){let o,i;this._version=r,e?o=e:(o=new u.sX,o.setClient(t)),n?i=n:(i=new u.sX,i.setClient(t)),this._stack=[{scope:o}],t&&this.bindClient(t),this._isolationScope=i}isOlderThan(t){return this._version(this.popScope(),t)),(t=>{throw this.popScope(),t})):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,e){const n=this._lastEventId=e&&e.event_id?e.event_id:(0,o.DM)(),r=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:r,...e,event_id:n}),n}captureMessage(t,e,n){const r=this._lastEventId=n&&n.event_id?n.event_id:(0,o.DM)(),i=new Error(t);return this.getScope().captureMessage(t,e,{originalException:t,syntheticException:i,...n,event_id:r}),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:(0,o.DM)();return t.type||(this._lastEventId=n),this.getScope().captureEvent(t,{...e,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:a=p}=r.getOptions&&r.getOptions()||{};if(a<=0)return;const l={timestamp:(0,i.yW)(),...t},c=o?(0,s.Cf)((()=>o(l,e))):l;null!==c&&(r.emit&&r.emit("beforeAddBreadcrumb",c,e),n.addBreadcrumb(c,a))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,e){this.getScope().setTag(t,e),this.getIsolationScope().setTag(t,e)}setExtra(t,e){this.getScope().setExtra(t,e),this.getIsolationScope().setExtra(t,e)}setContext(t,e){this.getScope().setContext(t,e),this.getIsolationScope().setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();n&&t(e)}run(t){const e=y(this);try{t(this)}finally{y(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return c.X&&s.kg.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,e){const n=this._callExtensionMethod("startTransaction",t,e);return c.X&&!n&&(this.getClient()?s.kg.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):s.kg.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const t=this.getStackTop().scope,e=t.getSession();e&&(0,d.RJ)(e),this._sendSessionUpdate(),t.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:r,environment:o=l.J}=n&&n.getOptions()||{},{userAgent:i}=a.GLOBAL_OBJ.navigator||{},s=(0,d.Hv)({release:r,environment:o,user:e.getUser(),...i&&{userAgent:i},...t}),c=e.getSession&&e.getSession();return c&&"ok"===c.status&&(0,d.CT)(c,{status:"exited"}),this.endSession(),e.setSession(s),s}shouldSendDefaultPii(){const t=this.getClient(),e=t&&t.getOptions();return Boolean(e&&e.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:e}=this.getStackTop(),n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}_callExtensionMethod(t,...e){const n=m().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);c.X&&s.kg.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function m(){return a.GLOBAL_OBJ.__SENTRY__=a.GLOBAL_OBJ.__SENTRY__||{extensions:{},hub:void 0},a.GLOBAL_OBJ}function y(t){const e=m(),n=x(e);return w(e,t),n}function v(){const t=m();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return function(t=m()){return e=t,!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)&&!x(t).isOlderThan(f)||w(t,new g),x(t);var e}(t)}function b(){return v().getIsolationScope()}function x(t){return(0,a.Y)("hub",(()=>new g),t)}function w(t,e){return!!t&&((t.__SENTRY__=t.__SENTRY__||{}).hub=e,!0)}},2967:(t,e,n)=>{"use strict";n.d(e,{RN:()=>f,_I:()=>p,m7:()=>h,m8:()=>c,q4:()=>u,uf:()=>d});var r=n(2844),o=n(2343),i=n(1703),s=n(1195),a=n(5659);const l=[];function c(t){const e=t.defaultIntegrations||[],n=t.integrations;let o;e.forEach((t=>{t.isDefaultInstance=!0})),o=Array.isArray(n)?[...e,...n]:"function"==typeof n?(0,r.lE)(n(e)):e;const i=function(t){const e={};return t.forEach((t=>{const{name:n}=t,r=e[n];r&&!r.isDefaultInstance&&t.isDefaultInstance||(e[n]=t)})),Object.keys(e).map((t=>e[t]))}(o),s=function(t){for(let e=0;e{e&&h(t,e,n)})),n}function d(t,e){for(const n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function h(t,e,n){if(n[e.name])i.X&&o.kg.log(`Integration skipped because it was already installed: ${e.name}`);else{if(n[e.name]=e,-1===l.indexOf(e.name)&&(e.setupOnce(s.cc,a.Gd),l.push(e.name)),e.setup&&"function"==typeof e.setup&&e.setup(t),t.on&&"function"==typeof e.preprocessEvent){const n=e.preprocessEvent.bind(e);t.on("preprocessEvent",((e,r)=>n(e,r,t)))}if(t.addEventProcessor&&"function"==typeof e.processEvent){const n=e.processEvent.bind(e),r=Object.assign(((e,r)=>n(e,r,t)),{id:e.name});t.addEventProcessor(r)}i.X&&o.kg.log(`Integration installed: ${e.name}`)}}function f(t,e){return Object.assign((function(...t){return e(...t)}),{id:t})}function p(t){return t}},350:(t,e,n)=>{"use strict";n.d(e,{lW:()=>h,sX:()=>d});var r=n(7597),o=n(1170),i=n(2844),s=n(2343),a=n(1195),l=n(9015),c=n(3379);let u;class d{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=f()}static clone(t){return t?t.clone():new d}clone(){const t=new d;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&(0,l.CT)(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,e){return this._tags={...this._tags,[t]:e},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if("function"==typeof t){const e=t(this);return e instanceof d?e:this}return t instanceof d?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession),t._propagationContext&&(this._propagationContext=t._propagationContext)):(0,r.PO)(t)&&(this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=f(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:(0,o.yW)(),...t},i=this._breadcrumbs;return i.push(r),this._breadcrumbs=i.length>n?i.slice(-n):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:e,_contexts:n,_tags:r,_extra:o,_user:i,_level:s,_fingerprint:a,_eventProcessors:l,_propagationContext:c,_sdkProcessingMetadata:u,_transactionName:d,_span:h}=this;return{breadcrumbs:t,attachments:e,contexts:n,tags:r,extra:o,user:i,level:s,fingerprint:a||[],eventProcessors:l,propagationContext:c,sdkProcessingMetadata:u,transactionName:d,span:h}}applyToEvent(t,e={},n=[]){(0,c.gi)(t,this.getScopeData());const r=[...n,...(0,a.fH)(),...this._eventProcessors];return(0,a.RP)(r,t,e)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,e){const n=e&&e.event_id?e.event_id:(0,i.DM)();if(!this._client)return s.kg.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},this),n}captureMessage(t,e,n){const r=n&&n.event_id?n.event_id:(0,i.DM)();if(!this._client)return s.kg.warn("No client configured on scope - will not capture message!"),r;const o=new Error(t);return this._client.captureMessage(t,e,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:(0,i.DM)();return this._client?(this._client.captureEvent(t,{...e,event_id:n},this),n):(s.kg.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((t=>{t(this)})),this._notifyingListeners=!1)}}function h(){return u||(u=new d),u}function f(){return{traceId:(0,i.DM)(),spanId:(0,i.DM)().substring(16)}}},6754:(t,e,n)=>{"use strict";n.d(e,{$J:()=>i,S3:()=>s,TE:()=>o,Zj:()=>r});const r="sentry.source",o="sentry.sample_rate",i="sentry.op",s="sentry.origin"},9015:(t,e,n)=>{"use strict";n.d(e,{CT:()=>a,Hv:()=>s,RJ:()=>l});var r=n(1170),o=n(2844),i=n(535);function s(t){const e=(0,r.ph)(),n={sid:(0,o.DM)(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return(0,i.Jr)({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&a(n,t),n}function a(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||(0,r.ph)(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:(0,o.DM)()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}function l(t,e){let n={};e?n={status:e}:"ok"===t.status&&(n={status:"exited"}),a(t,n)}},454:(t,e,n)=>{"use strict";n.d(e,{_:()=>l,j:()=>c});var r=n(535),o=n(1131),i=n(4487),s=n(5102),a=n(3371);function l(t,e,n){const i=e.getOptions(),{publicKey:s}=e.getDsn()||{},{segment:a}=n&&n.getUser()||{},l=(0,r.Jr)({environment:i.environment||o.J,release:i.release,user_segment:a,public_key:s,trace_id:t});return e.emit&&e.emit("createDsc",l),l}function c(t){const e=(0,i.s3)();if(!e)return{};const n=l((0,a.XU)(t).trace_id||"",e,(0,i.nZ)()),r=(0,s.G)(t);if(!r)return n;const o=r&&r._frozenDynamicSamplingContext;if(o)return o;const{sampleRate:c,source:u}=r.metadata;null!=c&&(n.sample_rate=`${c}`);const d=(0,a.XU)(r);return u&&"url"!==u&&(n.transaction=d.description),n.sampled=String((0,a.Tt)(r)),e.emit&&e.emit("createDsc",n),n}},3379:(t,e,n)=>{"use strict";n.d(e,{gi:()=>l,yo:()=>c});var r=n(535),o=n(2844),i=n(454),s=n(5102),a=n(3371);function l(t,e){const{fingerprint:n,span:l,breadcrumbs:c,sdkProcessingMetadata:u}=e;!function(t,e){const{extra:n,tags:o,user:i,contexts:s,level:a,transactionName:l}=e,c=(0,r.Jr)(n);c&&Object.keys(c).length&&(t.extra={...c,...t.extra});const u=(0,r.Jr)(o);u&&Object.keys(u).length&&(t.tags={...u,...t.tags});const d=(0,r.Jr)(i);d&&Object.keys(d).length&&(t.user={...d,...t.user});const h=(0,r.Jr)(s);h&&Object.keys(h).length&&(t.contexts={...h,...t.contexts}),a&&(t.level=a),l&&(t.transaction=l)}(t,e),l&&function(t,e){t.contexts={trace:(0,a.wy)(e),...t.contexts};const n=(0,s.G)(e);if(n){t.sdkProcessingMetadata={dynamicSamplingContext:(0,i.j)(e),...t.sdkProcessingMetadata};const r=(0,a.XU)(n).description;r&&(t.tags={transaction:r,...t.tags})}}(t,l),function(t,e){t.fingerprint=t.fingerprint?(0,o.lE)(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,n),function(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}(t,c),function(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}(t,u)}function c(t,e){const{extra:n,tags:r,user:o,contexts:i,level:s,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:c,eventProcessors:d,attachments:h,propagationContext:f,transactionName:p,span:g}=e;u(t,"extra",n),u(t,"tags",r),u(t,"user",o),u(t,"contexts",i),u(t,"sdkProcessingMetadata",a),s&&(t.level=s),p&&(t.transactionName=p),g&&(t.span=g),l.length&&(t.breadcrumbs=[...t.breadcrumbs,...l]),c.length&&(t.fingerprint=[...t.fingerprint,...c]),d.length&&(t.eventProcessors=[...t.eventProcessors,...d]),h.length&&(t.attachments=[...t.attachments,...h]),t.propagationContext={...t.propagationContext,...f}}function u(t,e,n){if(n&&Object.keys(n).length){t[e]={...t[e]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[e][r]=n[r])}}},5102:(t,e,n)=>{"use strict";function r(t){return t.transaction}n.d(e,{G:()=>r})},8942:(t,e,n)=>{"use strict";n.d(e,{R:()=>f,U0:()=>g});var r=n(2844),o=n(1170),i=n(7321),s=n(1235),a=n(8007),l=n(1131),c=n(1195),u=n(350),d=n(3379),h=n(3371);function f(t,e,n,f,g,m){const{normalizeDepth:y=3,normalizeMaxBreadth:v=1e3}=t,b={...e,event_id:e.event_id||n.event_id||(0,r.DM)(),timestamp:e.timestamp||(0,o.yW)()},x=n.integrations||t.integrations.map((t=>t.name));!function(t,e){const{environment:n,release:r,dist:o,maxValueLength:s=250}=e;"environment"in t||(t.environment="environment"in e?n:l.J),void 0===t.release&&void 0!==r&&(t.release=r),void 0===t.dist&&void 0!==o&&(t.dist=o),t.message&&(t.message=(0,i.$G)(t.message,s));const a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=(0,i.$G)(a.value,s));const c=t.request;c&&c.url&&(c.url=(0,i.$G)(c.url,s))}(b,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(b,x),void 0===e.type&&function(t,e){const n=s.GLOBAL_OBJ._sentryDebugIds;if(!n)return;let r;const o=p.get(e);o?r=o:(r=new Map,p.set(e,r));const i=Object.keys(n).reduce(((t,o)=>{let i;const s=r.get(o);s?i=s:(i=e(o),r.set(o,i));for(let e=i.length-1;e>=0;e--){const r=i[e];if(r.filename){t[r.filename]=n[o];break}}return t}),{});try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.filename&&(t.debug_id=i[t.filename])}))}))}catch(t){}}(b,t.stackParser);const w=function(t,e){if(!e)return t;const n=t?t.clone():new u.sX;return n.update(e),n}(f,n.captureContext);n.mechanism&&(0,r.EG)(b,n.mechanism);const k=g&&g.getEventProcessors?g.getEventProcessors():[],S=(0,u.lW)().getScopeData();if(m){const t=m.getScopeData();(0,d.yo)(S,t)}if(w){const t=w.getScopeData();(0,d.yo)(S,t)}const C=[...n.attachments||[],...S.attachments];C.length&&(n.attachments=C),(0,d.gi)(b,S);const A=[...k,...(0,c.fH)(),...S.eventProcessors];return(0,c.RP)(A,b,n).then((t=>(t&&function(t){const e={};try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.debug_id&&(t.abs_path?e[t.abs_path]=t.debug_id:t.filename&&(e[t.filename]=t.debug_id),delete t.debug_id)}))}))}catch(t){}if(0===Object.keys(e).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.keys(e).forEach((t=>{n.push({type:"sourcemap",code_file:t,debug_id:e[t]})}))}(t),"number"==typeof y&&y>0?function(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((t=>({...t,...t.data&&{data:(0,a.Fv)(t.data,e,n)}})))},...t.user&&{user:(0,a.Fv)(t.user,e,n)},...t.contexts&&{contexts:(0,a.Fv)(t.contexts,e,n)},...t.extra&&{extra:(0,a.Fv)(t.extra,e,n)}};return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=(0,a.Fv)(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map((t=>{const r=(0,h.XU)(t).data;return r&&(t.data=(0,a.Fv)(r,e,n)),t}))),r}(t,y,v):t)))}const p=new WeakMap;function g(t){if(t)return function(t){return t instanceof u.sX||"function"==typeof t}(t)||function(t){return Object.keys(t).some((t=>m.includes(t)))}(t)?{captureContext:t}:t}const m=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"]},3371:(t,e,n)=>{"use strict";n.d(e,{$k:()=>u,Hb:()=>c,Tt:()=>f,XU:()=>h,i0:()=>a,ve:()=>s,wy:()=>l});var r=n(535),o=n(7638),i=n(1170);const s=0,a=1;function l(t){const{spanId:e,traceId:n}=t.spanContext(),{data:o,op:i,parent_span_id:s,status:a,tags:l,origin:c}=h(t);return(0,r.Jr)({data:o,op:i,parent_span_id:s,span_id:e,status:a,tags:l,trace_id:n,origin:c})}function c(t){const{traceId:e,spanId:n}=t.spanContext(),r=f(t);return(0,o.$p)(e,n,r)}function u(t){return"number"==typeof t?d(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?d(t.getTime()):(0,i.ph)()}function d(t){return t>9999999999?t/1e3:t}function h(t){return function(t){return"function"==typeof t.getSpanJSON}(t)?t.getSpanJSON():"function"==typeof t.toJSON?t.toJSON():{}}function f(t){const{traceFlags:e}=t.spanContext();return Boolean(e&a)}},105:(t,e,n)=>{"use strict";n.d(e,{J:()=>r});const r="7.100.1"},223:(t,e,n)=>{"use strict";n.d(e,{g3:()=>It,H0:()=>jt});var r,o=n(2343),i=n(1170),s=n(1703),a=n(3371),l=n(2844),c=n(535),u=n(6754),d=n(5102);function h(t,e){t.setTag("http.status_code",String(e)),t.setData("http.response.status_code",e);const n=function(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(e);"unknown_error"!==n&&t.setStatus(n)}!function(t){t.Ok="ok",t.DeadlineExceeded="deadline_exceeded",t.Unauthenticated="unauthenticated",t.PermissionDenied="permission_denied",t.NotFound="not_found",t.ResourceExhausted="resource_exhausted",t.InvalidArgument="invalid_argument",t.Unimplemented="unimplemented",t.Unavailable="unavailable",t.InternalError="internal_error",t.UnknownError="unknown_error",t.Cancelled="cancelled",t.AlreadyExists="already_exists",t.FailedPrecondition="failed_precondition",t.Aborted="aborted",t.OutOfRange="out_of_range",t.DataLoss="data_loss"}(r||(r={}));class f{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class p{constructor(t={}){this._traceId=t.traceId||(0,l.DM)(),this._spanId=t.spanId||(0,l.DM)().substring(16),this._startTime=t.startTimestamp||(0,i.ph)(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this.instrumenter=t.instrumenter||"sentry",this._attributes={},this.setAttributes({[u.S3]:t.origin||"manual",[u.$J]:t.op,...t.attributes}),this._name=t.name||t.description,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.status&&(this._status=t.status),t.endTimestamp&&(this._endTime=t.endTimestamp)}get name(){return this._name||""}set name(t){this.updateName(t)}get description(){return this._name}set description(t){this._name=t}get traceId(){return this._traceId}set traceId(t){this._traceId=t}get spanId(){return this._spanId}set spanId(t){this._spanId=t}set parentSpanId(t){this._parentSpanId=t}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(t){this._sampled=t}get attributes(){return this._attributes}set attributes(t){this._attributes=t}get startTimestamp(){return this._startTime}set startTimestamp(t){this._startTime=t}get endTimestamp(){return this._endTime}set endTimestamp(t){this._endTime=t}get status(){return this._status}set status(t){this._status=t}get op(){return this._attributes[u.$J]}set op(t){this.setAttribute(u.$J,t)}get origin(){return this._attributes[u.S3]}set origin(t){this.setAttribute(u.S3,t)}spanContext(){const{_spanId:t,_traceId:e,_sampled:n}=this;return{spanId:t,traceId:e,traceFlags:n?a.i0:a.ve}}startChild(t){const e=new p({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});e.spanRecorder=this.spanRecorder,e.spanRecorder&&e.spanRecorder.add(e);const n=(0,d.G)(this);if(e.transaction=n,s.X&&n){const r=`[Tracing] Starting '${t&&t.op||"< unknown op >"}' span on transaction '${(0,a.XU)(e).description||"< unknown name >"}' (${n.spanContext().spanId}).`;o.kg.log(r),this._logMessage=r}return e}setTag(t,e){return this.tags={...this.tags,[t]:e},this}setData(t,e){return this.data={...this.data,[t]:e},this}setAttribute(t,e){void 0===e?delete this._attributes[t]:this._attributes[t]=e}setAttributes(t){Object.keys(t).forEach((e=>this.setAttribute(e,t[e])))}setStatus(t){return this._status=t,this}setHttpStatus(t){return h(this,t),this}setName(t){this.updateName(t)}updateName(t){return this._name=t,this}isSuccess(){return"ok"===this._status}finish(t){return this.end(t)}end(t){if(this._endTime)return;const e=(0,d.G)(this);if(s.X&&e&&e.spanContext().spanId!==this._spanId){const t=this._logMessage;t&&o.kg.log(t.replace("Starting","Finishing"))}this._endTime=(0,a.$k)(t)}toTraceparent(){return(0,a.Hb)(this)}toContext(){return(0,c.Jr)({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(t){return this.data=t.data||{},this._name=t.name||t.description,this._endTime=t.endTimestamp,this.op=t.op,this._parentSpanId=t.parentSpanId,this._sampled=t.sampled,this._spanId=t.spanId||this._spanId,this._startTime=t.startTimestamp||this._startTime,this._status=t.status,this.tags=t.tags||{},this._traceId=t.traceId||this._traceId,this}getTraceContext(){return(0,a.wy)(this)}getSpanJSON(){return(0,c.Jr)({data:this._getData(),description:this._name,op:this._attributes[u.$J],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[u.S3]})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){const{data:t,_attributes:e}=this,n=Object.keys(t).length>0,r=Object.keys(e).length>0;if(n||r)return n&&r?{...t,...e}:n?t:e}}var g=n(5659),m=n(454),y=n(4487);function v(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=(0,y.s3)(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function b(t){if(!v())return;const e=function(t){if(t.startTime){const e={...t};return e.startTimestamp=(0,a.$k)(t.startTime),delete e.startTime,e}return t}(t),n=(0,g.Gd)(),r=t.scope?t.scope.getSpan():x();if(t.onlyIfParent&&!r)return;const o=(0,g.aF)(),i=(0,y.nZ)();let s;if(r)s=r.startChild(e);else{const{traceId:t,dsc:r,parentSpanId:a,sampled:l}={...o.getPropagationContext(),...i.getPropagationContext()};s=n.startTransaction({traceId:t,parentSpanId:a,parentSampled:l,...e,metadata:{dynamicSamplingContext:r,...e.metadata}})}return function(t,e,n){t&&((0,c.xp)(t,k,n),(0,c.xp)(t,w,e))}(s,i,o),s}function x(){return(0,y.nZ)().getSpan()}const w="_sentryScope",k="_sentryIsolationScope";class S extends p{constructor(t,e){super(t),this._measurements={},this._contexts={},this._hub=e||(0,g.Gd)(),this._name=t.name||"",this._metadata={...t.metadata},this._trimEnd=t.trimEnd,this.transaction=this;const n=this._metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(t){this.setName(t)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[u.Zj]&&{source:this._attributes[u.Zj]},...this._attributes[u.TE]&&{sampleRate:this._attributes[u.TE]}}}set metadata(t){this._metadata=t}setName(t,e="custom"){this._name=t,this.setAttribute(u.Zj,e)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new f(t)),this.spanRecorder.add(this)}setContext(t,e){null===e?delete this._contexts[t]:this._contexts[t]=e}setMeasurement(t,e,n=""){this._measurements[t]={value:e,unit:n}}setMetadata(t){this._metadata={...this._metadata,...t}}end(t){const e=(0,a.$k)(t),n=this._finishTransaction(e);if(n)return this._hub.captureEvent(n)}toContext(){const t=super.toContext();return(0,c.Jr)({...t,name:this._name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return(0,m.j)(this)}setHub(t){this._hub=t}_finishTransaction(t){if(void 0!==this._endTime)return;this._name||(s.X&&o.kg.warn("Transaction has no name, falling back to ``."),this._name=""),super.end(t);const e=this._hub.getClient();if(e&&e.emit&&e.emit("finishTransaction",this),!0!==this._sampled)return s.X&&o.kg.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(e&&e.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter((t=>t!==this&&(0,a.XU)(t).timestamp)):[];if(this._trimEnd&&n.length>0){const t=n.map((t=>(0,a.XU)(t).timestamp)).filter(Boolean);this._endTime=t.reduce(((t,e)=>t>e?t:e))}const{scope:r,isolationScope:i}={scope:this[w],isolationScope:this[k]};const{metadata:l}=this,{source:c}=l,u={contexts:{...this._contexts,trace:(0,a.wy)(this)},spans:n,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...l,capturedSpanScope:r,capturedSpanIsolationScope:i,dynamicSamplingContext:(0,m.j)(this)},...c&&{transaction_info:{source:c}}};return Object.keys(this._measurements).length>0&&(s.X&&o.kg.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),u.measurements=this._measurements),s.X&&o.kg.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),u}}const C={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},A=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class E extends f{constructor(t,e,n,r){super(r),this._pushActivity=t,this._popActivity=e,this.transactionSpanId=n}add(t){if(t.spanContext().spanId!==this.transactionSpanId){const e=t.end;t.end=(...n)=>(this._popActivity(t.spanContext().spanId),e.apply(t,n)),void 0===(0,a.XU)(t).timestamp&&this._pushActivity(t.spanContext().spanId)}super.add(t)}}class T extends S{constructor(t,e,n=C.idleTimeout,r=C.finalTimeout,i=C.heartbeatInterval,a=!1,l=!1){super(t,e),this._idleHub=e,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=i,this._onScope=a,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=A[4],this._autoFinishAllowed=!l,a&&(s.X&&o.kg.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),e.getScope().setSpan(this)),l||this._restartIdleTimeout(),setTimeout((()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=A[3],this.end())}),this._finalTimeout)}end(t){const e=(0,a.$k)(t);if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setAttribute("finishReason",this._finishReason),this.spanRecorder){s.X&&o.kg.log("[Tracing] finishing IdleTransaction",new Date(1e3*e).toISOString(),this.op);for(const t of this._beforeFinishCallbacks)t(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter((t=>{if(t.spanContext().spanId===this.spanContext().spanId)return!0;(0,a.XU)(t).timestamp||(t.setStatus("cancelled"),t.end(e),s.X&&o.kg.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(t,void 0,2)));const{start_timestamp:n,timestamp:r}=(0,a.XU)(t),i=n&&n{this._finished||this._pushActivity(t)},n=t=>{this._finished||this._popActivity(t)};this.spanRecorder=new E(e,n,this.spanContext().spanId,t),s.X&&o.kg.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:e}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===e,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=A[5],this.end(t)))}setFinishReason(t){this._finishReason=t}sendAutoFinishSignal(){this._autoFinishAllowed||(s.X&&o.kg.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout((()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason=A[1],this.end(t))}),this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),s.X&&o.kg.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,s.X&&o.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(s.X&&o.kg.log(`[Tracing] popActivity ${t}`),delete this.activities[t],s.X&&o.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const t=(0,i.ph)();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=A[5],this.end(t)):this._restartIdleTimeout(t+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?this._autoFinishAllowed&&(s.X&&o.kg.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=A[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){s.X&&o.kg.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout((()=>{this._beat()}),this._heartbeatInterval)}}var P=n(1674),O=n(7373);function R(t){return(t||(0,g.Gd)()).getScope().getTransaction()}let I=!1;function M(){const t=R();if(t){const e="internal_error";s.X&&o.kg.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}M.tag="sentry_tracingErrorCallback";var L=n(7597);function j(t,e,n){if(!v(e))return t.sampled=!1,t;if(void 0!==t.sampled)return t.setAttribute(u.TE,Number(t.sampled)),t;let r;return"function"==typeof e.tracesSampler?(r=e.tracesSampler(n),t.setAttribute(u.TE,Number(r))):void 0!==n.parentSampled?r=n.parentSampled:void 0!==e.tracesSampleRate?(r=e.tracesSampleRate,t.setAttribute(u.TE,Number(r))):(r=1,t.setAttribute(u.TE,r)),i=r,((0,L.i2)(i)||"number"!=typeof i&&"boolean"!=typeof i?(s.X&&o.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),0):!(i<0||i>1)||(s.X&&o.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${i}.`),0))?r?(t.sampled=Math.random()e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...n})}function Y(t){return t/1e3}function Z(){return $.WINDOW&&$.WINDOW.addEventListener&&$.WINDOW.performance}let K,X,J=0,Q={};function tt(t,e,n,r,o,i){const s=i?e[i]:e[`${n}End`],a=e[`${n}Start`];a&&s&&G(t,{op:"browser",origin:"auto.browser.browser.metrics",description:o||n,startTimestamp:r+Y(a),endTimestamp:r+Y(s)})}function et(t,e,n,r){const o=e[n];null!=o&&o<2147483647&&(t[r]=o)}var nt=n(1394),rt=n(5322),ot=n(7321),it=n(9181);const st=["localhost",/^\/(?!\/)/],at={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:st,tracePropagationTargets:st};function lt(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:r,tracingOrigins:o,shouldCreateSpanForRequest:i,enableHTTPTimings:s}={traceFetch:at.traceFetch,traceXHR:at.traceXHR,...t},l="function"==typeof i?i:t=>!0,c=t=>function(t,e){return(0,ot.U0)(t,e||st)}(t,r||o),d={};e&&(0,nt.U)((t=>{const e=function(t,e,n,r,o="auto.http.browser"){if(!v()||!t.fetchData)return;const i=e(t.fetchData.url);if(t.endTimestamp&&i){const e=t.fetchData.__span;if(!e)return;const n=r[e];if(n){if(t.response){h(n,t.response.status);const e=t.response&&t.response.headers&&t.response.headers.get("content-length");if(e){const t=parseInt(e);t>0&&n.setAttribute("http.response_content_length",t)}}else t.error&&n.setStatus("internal_error");n.end(),delete r[e]}return}const s=(0,y.nZ)(),l=(0,y.s3)(),{method:c,url:d}=t.fetchData,f=i?b({name:`${c} ${d}`,onlyIfParent:!0,attributes:{url:d,type:"fetch","http.method":c,[u.S3]:o},op:"http.client"}):void 0;if(f&&(t.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f),n(t.fetchData.url)&&l){const e=t.args[0];t.args[1]=t.args[1]||{};const n=t.args[1];n.headers=function(t,e,n,r,o){const i=o||n.getSpan(),s=(0,g.aF)(),{traceId:l,spanId:c,sampled:u,dsc:d}={...s.getPropagationContext(),...n.getPropagationContext()},h=i?(0,a.Hb)(i):(0,N.$p)(l,c,u),f=(0,it.IQ)(d||(i?(0,m.j)(i):(0,m._)(l,e,n))),p=r.headers||("undefined"!=typeof Request&&(0,L.V9)(t,Request)?t.headers:void 0);if(p){if("undefined"!=typeof Headers&&(0,L.V9)(p,Headers)){const t=new Headers(p);return t.append("sentry-trace",h),f&&t.append(it.bU,f),t}if(Array.isArray(p)){const t=[...p,["sentry-trace",h]];return f&&t.push([it.bU,f]),t}{const t="baggage"in p?p.baggage:void 0,e=[];return Array.isArray(t)?e.push(...t):t&&e.push(t),f&&e.push(f),{...p,"sentry-trace":h,baggage:e.length>0?e.join(","):void 0}}}return{"sentry-trace":h,baggage:f}}(e,l,s,n,f)}return f}(t,l,c,d);s&&e&&ct(e)})),n&&(0,rt.UK)((t=>{const e=function(t,e,n,r){const o=t.xhr,i=o&&o[rt.xU];if(!v()||!o||o.__sentry_own_request__||!i)return;const s=e(i.url);if(t.endTimestamp&&s){const t=o.__sentry_xhr_span_id__;if(!t)return;const e=r[t];return void(e&&void 0!==i.status_code&&(h(e,i.status_code),e.end(),delete r[t]))}const l=(0,y.nZ)(),c=(0,g.aF)(),d=s?b({name:`${i.method} ${i.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":i.method,url:i.url,[u.S3]:"auto.http.browser"},op:"http.client"}):void 0;d&&(o.__sentry_xhr_span_id__=d.spanContext().spanId,r[o.__sentry_xhr_span_id__]=d);const f=(0,y.s3)();if(o.setRequestHeader&&n(i.url)&&f){const{traceId:t,spanId:e,sampled:n,dsc:r}={...c.getPropagationContext(),...l.getPropagationContext()};!function(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader(it.bU,n)}catch(t){}}(o,d?(0,a.Hb)(d):(0,N.$p)(t,e,n),(0,it.IQ)(r||(d?(0,m.j)(d):(0,m._)(t,f,l))))}return d}(t,l,c,d);s&&e&&ct(e)}))}function ct(t){const{url:e}=(0,a.XU)(t).data||{};if(!e||"string"!=typeof e)return;const n=(0,U._j)("resource",(({entries:r})=>{r.forEach((r=>{(function(t){return"resource"===t.entryType&&"initiatorType"in t&&"string"==typeof t.nextHopProtocol&&("fetch"===t.initiatorType||"xmlhttprequest"===t.initiatorType)})(r)&&r.name.endsWith(e)&&(function(t){const{name:e,version:n}=function(t){let e="unknown",n="unknown",r="";for(const o of t){if("/"===o){[e,n]=t.split("/");break}if(!isNaN(Number(o))){e="h"===r?"http":r,n=t.split(r)[1];break}r+=o}return r===t&&(e=r),{name:e,version:n}}(t.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",e]),i.Z1?[...r,["http.request.redirect_start",ut(t.redirectStart)],["http.request.fetch_start",ut(t.fetchStart)],["http.request.domain_lookup_start",ut(t.domainLookupStart)],["http.request.domain_lookup_end",ut(t.domainLookupEnd)],["http.request.connect_start",ut(t.connectStart)],["http.request.secure_connection_start",ut(t.secureConnectionStart)],["http.request.connection_end",ut(t.connectEnd)],["http.request.request_start",ut(t.requestStart)],["http.request.response_start",ut(t.responseStart)],["http.request.response_end",ut(t.responseEnd)]]:r}(r).forEach((e=>t.setAttribute(...e))),setTimeout(n))}))}))}function ut(t=0){return((i.Z1||performance.timeOrigin)+t)/1e3}const dt={...C,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,_experiments:{},...at},ht=(t={})=>{const e=!(!V.X||!t.tracePropagationTargets&&!t.tracingOrigins);(function(){const t=(0,g.cu)();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=D),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=_),I||(I=!0,(0,P.V)(M),(0,O.h)(M)))})(),!t.tracePropagationTargets&&t.tracingOrigins&&(t.tracePropagationTargets=t.tracingOrigins);const n={...dt,...t},r=function(){const t=Z();if(t&&i.Z1){t.mark&&$.WINDOW.performance.mark("sentry-tracing-init");const e=(0,U.to)((({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e)return;const n=Y(i.Z1),r=Y(e.startTime);V.X&&o.kg.log("[Measurements] Adding FID"),Q.fid={value:t.value,unit:"millisecond"},Q["mark.fid"]={value:n+r,unit:"second"}})),n=(0,U.PR)((({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(V.X&&o.kg.log("[Measurements] Adding CLS"),Q.cls={value:t.value,unit:""},X=e)}),!0),r=(0,U.$A)((({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(V.X&&o.kg.log("[Measurements] Adding LCP"),Q.lcp={value:t.value,unit:"millisecond"},K=e)}),!0);return()=>{e(),n(),r()}}return()=>{}}();let s,l;function c(t){const e=(0,g.Gd)(),{beforeStartSpan:c,idleTimeout:d,finalTimeout:h,heartbeatInterval:f}=n,p="pageload"===t.op;let m;if(p){const e=p?gt("sentry-trace"):"",n=p?gt("baggage"):void 0,{traceId:r,dsc:o,parentSpanId:i,sampled:s}=(0,N.pT)(e,n);m={traceId:r,parentSpanId:i,parentSampled:s,...t,metadata:{...t.metadata,dynamicSamplingContext:o},trimEnd:!0}}else m={trimEnd:!0,...t};const y=c?c(m):m;y.metadata=y.name!==m.name?{...y.metadata,source:"custom"}:y.metadata,s=y.name,l=function(t){const e=t.attributes&&t.attributes[u.Zj],n=t.data&&t.data[u.Zj],r=t.metadata&&t.metadata.source;return e||n||r}(y),!1===y.sampled&&V.X&&o.kg.log(`[Tracing] Will not send ${y.op} transaction because of beforeNavigate.`),V.X&&o.kg.log(`[Tracing] Starting ${y.op} transaction on scope`);const{location:v}=$.WINDOW,b=F(e,y,d,h,!0,{location:v},f,p);return p&&($.WINDOW.document.addEventListener("readystatechange",(()=>{["interactive","complete"].includes($.WINDOW.document.readyState)&&b.sendAutoFinishSignal()})),["interactive","complete"].includes($.WINDOW.document.readyState)&&b.sendAutoFinishSignal()),b.registerBeforeFinishCallback((t=>{r(),function(t){const e=Z();if(!e||!$.WINDOW.performance.getEntries||!i.Z1)return;V.X&&o.kg.log("[Tracing] Adding & adjusting spans using Performance API");const n=Y(i.Z1),r=e.getEntries();let s,l;const{op:c,start_timestamp:u}=(0,a.XU)(t);if(r.slice(J).forEach((e=>{const r=Y(e.startTime),i=Y(e.duration);if(!("navigation"===t.op&&u&&n+r{tt(t,e,r,n)})),tt(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),tt(t,e,"fetch",n,"cache","domainLookupStart"),tt(t,e,"domainLookup",n,"DNS"),function(t,e,n){e.responseEnd&&(G(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+Y(e.requestStart),endTimestamp:n+Y(e.responseEnd)}),G(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+Y(e.responseStart),endTimestamp:n+Y(e.responseEnd)}))}(t,e,n)}(t,e,n),s=n+Y(e.responseStart),l=n+Y(e.requestStart);break;case"mark":case"paint":case"measure":{!function(t,e,n,r,o){const i=o+n,s=i+r;G(t,{description:e.name,endTimestamp:s,op:e.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i})}(t,e,r,i,n);const s=(0,H.Y)(),a=e.startTime{if(!Q[t]||!u||n>=u)return;const e=Q[t].value,r=n+Y(e),i=Math.abs(1e3*(r-u)),s=i-e;V.X&&o.kg.log(`[Measurements] Normalized ${t} from ${e} to ${i} (${s})`),Q[t].value=i}));const e=Q["mark.fid"];e&&Q.fid&&(G(t,{description:"first input delay",endTimestamp:e.value+Y(Q.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:e.value}),delete Q["mark.fid"]),"fcp"in Q||delete Q.cls,Object.keys(Q).forEach((t=>{!function(t,e,n){const r=R();r&&r.setMeasurement(t,e,n)}(t,Q[t].value,Q[t].unit)})),function(t){K&&(V.X&&o.kg.log("[Measurements] Adding LCP Data"),K.element&&t.setTag("lcp.element",(0,z.Rt)(K.element)),K.id&&t.setTag("lcp.id",K.id),K.url&&t.setTag("lcp.url",K.url.trim().slice(0,200)),t.setTag("lcp.size",K.size)),X&&X.sources&&(V.X&&o.kg.log("[Measurements] Adding CLS Data"),X.sources.forEach(((e,n)=>t.setTag(`cls.source.${n+1}`,(0,z.Rt)(e.node)))))}(t)}K=void 0,X=void 0,Q={}}(t)})),b}return n.enableLongTask&&(0,U._j)("longtask",(({entries:t})=>{for(const e of t){const t=R();if(!t)return;const n=Y(i.Z1+e.startTime),r=Y(e.duration);t.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r})}})),n._experiments.enableInteractions&&(0,U._j)("event",(({entries:t})=>{for(const e of t){const t=R();if(!t)return;if("click"===e.name){const n=Y(i.Z1+e.startTime),r=Y(e.duration),o={description:(0,z.Rt)(e.target),op:`ui.interaction.${e.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r},s=(0,z.iY)(e.target);s&&(o.attributes={"ui.component_name":s}),t.startChild(o)}}})),{name:"BrowserTracing",setupOnce:()=>{},afterAllSetup(t){const r=t.getOptions(),{markBackgroundSpan:d,traceFetch:h,traceXHR:f,shouldCreateSpanForRequest:p,enableHTTPTimings:m,_experiments:y}=n,v=r&&r.tracePropagationTargets,b=v||n.tracePropagationTargets;let x;V.X&&e&&v&&o.kg.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.");let w=$.WINDOW.location.href;if(t.on&&(t.on("startNavigationSpan",(t=>{x&&(V.X&&o.kg.log(`[Tracing] Finishing current transaction with op: ${(0,a.XU)(x).op}`),x.end()),x=c(t)})),t.on("startPageLoadSpan",(t=>{x&&(V.X&&o.kg.log(`[Tracing] Finishing current transaction with op: ${(0,a.XU)(x).op}`),x.end()),x=c(t)}))),n.instrumentPageLoad&&t.emit){const e={name:$.WINDOW.location.pathname,startTimestamp:i.Z1?i.Z1/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",attributes:{[u.Zj]:"url"}};ft(t,e)}n.instrumentNavigation&&t.emit&&(0,B.a)((({to:e,from:n})=>{if(void 0===n&&w&&-1!==w.indexOf(e))w=void 0;else if(n!==e){w=void 0;const e={name:$.WINDOW.location.pathname,op:"navigation",origin:"auto.navigation.browser",attributes:{[u.Zj]:"url"}};pt(t,e)}})),d&&($.WINDOW&&$.WINDOW.document?$.WINDOW.document.addEventListener("visibilitychange",(()=>{const t=R();if($.WINDOW.document.hidden&&t){const e="cancelled",{op:n,status:r}=(0,a.XU)(t);V.X&&o.kg.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.end()}})):V.X&&o.kg.warn("[Tracing] Could not set up background tab detection due to lack of global document")),y.enableInteractions&&function(t,e,n){let r;const i=()=>{const{idleTimeout:i,finalTimeout:s,heartbeatInterval:a}=t,l="ui.action.click",c=R();if(c&&c.op&&["navigation","pageload"].includes(c.op))return void(V.X&&o.kg.warn(`[Tracing] Did not create ${l} transaction because a pageload or navigation transaction is in progress.`));if(r&&(r.setFinishReason("interactionInterrupted"),r.end(),r=void 0),!e)return void(V.X&&o.kg.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`));const{location:d}=$.WINDOW,h={name:e,op:l,trimEnd:!0,data:{[u.Zj]:n||"url"}};r=F((0,g.Gd)(),h,i,s,!0,{location:d},a)};["click"].forEach((t=>{addEventListener(t,i,{once:!1,capture:!0})}))}(n,s,l),lt({traceFetch:h,traceXHR:f,tracePropagationTargets:b,shouldCreateSpanForRequest:p,enableHTTPTimings:m})},options:n}};function ft(t,e){t.emit&&t.emit("startPageLoadSpan",e)}function pt(t,e){t.emit&&t.emit("startNavigationSpan",e)}function gt(t){const e=(0,z.qT)(`meta[name=${t}]`);return e?e.getAttribute("content"):void 0}var mt=n(6891),yt=n(8679),vt=n.n(yt),bt=n(7294);const xt="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,wt="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/reactrouterv6.tsx";let kt,St,Ct,At,Et,Tt,Pt,Ot,Rt=!1;function It(t){const e=ht({...t,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:n,useLocation:r,useNavigationType:o,createRoutesFromChildren:i,matchRoutes:s,stripBasename:a,instrumentPageLoad:l=!0,instrumentNavigation:c=!0}=t;return{...e,afterAllSetup(t){e.afterAllSetup(t);const d=mt.m9&&mt.m9.location&&mt.m9.location.pathname;l&&d&&ft(t,{name:d,attributes:{[u.Zj]:"url",[u.$J]:"pageload",[u.S3]:"auto.pageload.react.reactrouter_v6"}}),St=n,Ct=r,At=o,Tt=s,Et=i,Rt=a||!1,Pt=e=>{pt(t,e)},Ot=c}}}function Mt(t,e){if(!e||"/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return t;const n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&"/"!==r?t:t.slice(n)||"/"}function Lt(t,e,n,r=""){if(!t||0===t.length)return[Rt?Mt(e.pathname,r):e.pathname,"url"];let o="";if(n)for(let t=0;t{const r=Ct(),o=At();return St((()=>{const t=Et(n.children);e?(function(t,e,n,r,o){const i=Array.isArray(r)?r:Tt(n,e,o);if(t&&i){const[r,s]=Lt(n,e,i,o);t.updateName(r),t.setAttribute(u.Zj,s)}}(function(){if(kt)return kt;const t=x(),e=t?(0,d.G)(t):void 0;if(!e)return;const n=(0,a.XU)(e).op;return"navigation"===n||"pageload"===n?e:void 0}(),r,t),e=!1):function(t,e,n,r,o){const i=Array.isArray(r)?r:Tt(e,t,o);if(Ot&&("PUSH"===n||"POP"===n)&&i){kt&&kt.end();const[n,r]=Lt(e,t,i,o);kt=Pt({name:n,attributes:{[u.Zj]:r,[u.$J]:"navigation",[u.S3]:"auto.navigation.react.reactrouter_v6"}})}}(r,t,o)}),[r,o]),bt.createElement(t,{...n,__self:this,__source:{fileName:wt,lineNumber:329}})};return vt()(n,t),n}},5682:(t,e,n)=>{"use strict";n.d(e,{S:()=>Xt});var r=n(2343),o=n(2844),i=n(7321),s=n(1703),a=n(2967);const l=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],c=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],u="InboundFilters",d=(0,a._I)(((t={})=>({name:u,setupOnce(){},processEvent(e,n,a){const u=a.getOptions(),d=function(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:l],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:c],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(t,u);return function(t,e){return e.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(t){}return!1}(t)?(s.X&&r.kg.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${(0,o.jH)(t)}`),!0):function(t,e){return!(t.type||!e||!e.length)&&function(t){const e=[];let n;t.message&&e.push(t.message);try{n=t.exception.values[t.exception.values.length-1]}catch(t){}return n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`)),s.X&&0===e.length&&r.kg.error(`Could not extract message for event ${(0,o.jH)(t)}`),e}(t).some((t=>(0,i.U0)(t,e)))}(t,e.ignoreErrors)?(s.X&&r.kg.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${(0,o.jH)(t)}`),!0):function(t,e){if("transaction"!==t.type||!e||!e.length)return!1;const n=t.transaction;return!!n&&(0,i.U0)(n,e)}(t,e.ignoreTransactions)?(s.X&&r.kg.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${(0,o.jH)(t)}`),!0):function(t,e){if(!e||!e.length)return!1;const n=h(t);return!!n&&(0,i.U0)(n,e)}(t,e.denyUrls)?(s.X&&r.kg.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${(0,o.jH)(t)}.\nUrl: ${h(t)}`),!0):!function(t,e){if(!e||!e.length)return!0;const n=h(t);return!n||(0,i.U0)(n,e)}(t,e.allowUrls)&&(s.X&&r.kg.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${(0,o.jH)(t)}.\nUrl: ${h(t)}`),!0)}(e,d)?null:e}})));function h(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch(t){}return e?function(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(e):null}catch(e){return s.X&&r.kg.error(`Cannot extract url for event ${(0,o.jH)(t)}`),null}}(0,a.RN)(u,d);var f=n(535),p=n(4487);let g;const m="FunctionToString",y=new WeakMap,v=(0,a._I)((()=>({name:m,setupOnce(){g=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=(0,f.HK)(this),n=y.has((0,p.s3)())&&void 0!==e?e:this;return g.apply(n,t)}}catch(t){}},setup(t){y.set(t,!0)}})));(0,a.RN)(m,v);var b=n(5659),x=n(5108);var w=n(1738),k=n(8823),S=n(734),C=n(807),A=n(105);function E(t,e,n=[e],r="npm"){const o=t._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${e}`,packages:n.map((t=>({name:`${r}:@sentry/${t}`,version:A.J}))),version:A.J}),t._metadata=o}var T=n(8518),P=n(8725),O=n(1170),R=n(292);const I="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;var M=n(7597),L=n(8007),j=n(6893);function _(t,e){const n=F(t,e),r={type:e&&e.name,value:B(e)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function D(t,e){return{exception:{values:[_(t,e)]}}}function F(t,e){const n=e.stacktrace||e.stack||"",r=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(N.test(t.message))return 1}return 0}(e);try{return t(n,r)}catch(t){}return[]}const N=/Minified React error #\d+;/i;function B(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function z(t,e,n,r,i){let s;if((0,M.VW)(e)&&e.error)return D(t,e.error);if((0,M.TX)(e)||(0,M.fm)(e)){const i=e;if("stack"in e)s=D(t,e);else{const e=i.name||((0,M.TX)(i)?"DOMError":"DOMException"),a=i.message?`${e}: ${i.message}`:e;s=V(t,a,n,r),(0,o.Db)(s,a)}return"code"in i&&(s.tags={...s.tags,"DOMException.code":`${i.code}`}),s}return(0,M.VZ)(e)?D(t,e):(0,M.PO)(e)||(0,M.cO)(e)?(s=function(t,e,n,r){const o=(0,p.s3)(),i=o&&o.getOptions().normalizeDepth,s={exception:{values:[{type:(0,M.cO)(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:$(e,{isUnhandledRejection:r})}]},extra:{__serialized__:(0,L.Qy)(e,i)}};if(n){const e=F(t,n);e.length&&(s.exception.values[0].stacktrace={frames:e})}return s}(t,e,n,i),(0,o.EG)(s,{synthetic:!0}),s):(s=V(t,e,n,r),(0,o.Db)(s,`${e}`,void 0),(0,o.EG)(s,{synthetic:!0}),s)}function V(t,e,n,r){const o={};if(r&&n){const r=F(t,n);r.length&&(o.exception={values:[{value:e,stacktrace:{frames:r}}]})}if((0,M.Le)(e)){const{__sentry_template_string__:t,__sentry_template_values__:n}=e;return o.logentry={message:t,params:n},o}return o.message=e,o}function $(t,{isUnhandledRejection:e}){const n=(0,f.zf)(t),r=e?"promise rejection":"exception";return(0,M.VW)(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:(0,M.cO)(t)?`Event \`${function(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch(t){}}(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}var W=n(6891);class U extends C.W{constructor(t){E(t,"browser",["browser"],W.m9.SENTRY_SDK_SOURCE||(0,T.S)()),super(t),t.sendClientReports&&W.m9.document&&W.m9.document.addEventListener("visibilitychange",(()=>{"hidden"===W.m9.document.visibilityState&&this._flushOutcomes()}))}eventFromException(t,e){return function(t,e,n,r){const i=z(t,e,n&&n.syntheticException||void 0,r);return(0,o.EG)(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),(0,j.WD)(i)}(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return function(t,e,n="info",r,o){const i=V(t,e,r&&r.syntheticException||void 0,o);return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),(0,j.WD)(i)}(this._options.stackParser,t,e,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled())return void(I&&r.kg.warn("SDK not enabled, will not capture user feedback."));const e=function(t,{metadata:e,tunnel:n,dsn:r}){const o={event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:(0,R.RA)(r)}},i=function(t){return[{type:"user_report"},t]}(t);return(0,P.Jd)(o,[i])}(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(e)}_prepareEvent(t,e,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,e,n)}_flushOutcomes(){const t=this._clearOutcomes();if(0===t.length)return void(I&&r.kg.log("No outcomes to send"));if(!this._dsn)return void(I&&r.kg.log("No dsn provided, will not send outcomes"));I&&r.kg.log("Sending outcomes:",t);const e=function(t,e){const n=[{type:"client_report"},{timestamp:(0,O.yW)(),discarded_events:t}];return(0,P.Jd)(e?{dsn:e}:{},[n])}(t,this._options.tunnel&&(0,R.RA)(this._dsn));this._sendEnvelope(e)}}var H=n(1235),q=n(9729);function G(){"console"in H.GLOBAL_OBJ&&r.RU.forEach((function(t){t in H.GLOBAL_OBJ.console&&(0,f.hl)(H.GLOBAL_OBJ.console,t,(function(e){return r.LD[t]=e,function(...e){const n={args:e,level:t};(0,q.rK)("console",n);const o=r.LD[t];o&&o.apply(H.GLOBAL_OBJ.console,e)}}))}))}var Y=n(5316),Z=n(5322),K=n(1394),X=n(8464);const J=["fatal","error","warning","log","info","debug"];var Q=n(6956);const tt="Breadcrumbs",et=(0,a._I)(((t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:tt,setupOnce(){},setup(t){e.console&&function(t){const e="console";(0,q.Hj)(e,t),(0,q.D2)(e,G)}(function(t){return function(e){if((0,p.s3)()!==t)return;const n={category:"console",data:{arguments:e.args,logger:"console"},level:(r=e.level,"warn"===r?"warning":J.includes(r)?r:"log"),message:(0,i.nK)(e.args," ")};var r;if("assert"===e.level){if(!1!==e.args[0])return;n.message=`Assertion failed: ${(0,i.nK)(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1)}(0,p.n_)(n,{input:e.args,level:e.level})}}(t)),e.dom&&(0,Y.O)(function(t,e){return function(n){if((0,p.s3)()!==t)return;let o,i,s="object"==typeof e?e.serializeAttribute:void 0,a="object"==typeof e&&"number"==typeof e.maxStringLength?e.maxStringLength:void 0;a&&a>1024&&(I&&r.kg.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${a} was configured. Sentry will use 1024 instead.`),a=1024),"string"==typeof s&&(s=[s]);try{const t=n.event,e=function(t){return!!t&&!!t.target}(t)?t.target:t;o=(0,X.Rt)(e,{keyAttrs:s,maxStringLength:a}),i=(0,X.iY)(e)}catch(t){o=""}if(0===o.length)return;const l={category:`ui.${n.name}`,message:o};i&&(l.data={"ui.component_name":i}),(0,p.n_)(l,{event:n.event,name:n.name,global:n.global})}}(t,e.dom)),e.xhr&&(0,Z.UK)(function(t){return function(e){if((0,p.s3)()!==t)return;const{startTimestamp:n,endTimestamp:r}=e,o=e.xhr[Z.xU];if(!n||!r||!o)return;const{method:i,url:s,status_code:a,body:l}=o,c={method:i,url:s,status_code:a},u={xhr:e.xhr,input:l,startTimestamp:n,endTimestamp:r};(0,p.n_)({category:"xhr",data:c,type:"http"},u)}}(t)),e.fetch&&(0,K.U)(function(t){return function(e){if((0,p.s3)()!==t)return;const{startTimestamp:n,endTimestamp:r}=e;if(r&&(!e.fetchData.url.match(/sentry_key/)||"POST"!==e.fetchData.method))if(e.error){const t=e.fetchData,o={data:e.error,input:e.args,startTimestamp:n,endTimestamp:r};(0,p.n_)({category:"fetch",data:t,level:"error",type:"http"},o)}else{const t=e.response,o={...e.fetchData,status_code:t&&t.status},i={input:e.args,response:t,startTimestamp:n,endTimestamp:r};(0,p.n_)({category:"fetch",data:o,type:"http"},i)}}}(t)),e.history&&(0,S.a)(function(t){return function(e){if((0,p.s3)()!==t)return;let n=e.from,r=e.to;const o=(0,Q.en)(W.m9.location.href);let i=n?(0,Q.en)(n):void 0;const s=(0,Q.en)(r);i&&i.path||(i=o),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),(0,p.n_)({category:"navigation",data:{from:n,to:r}})}}(t)),e.sentry&&t.on&&t.on("beforeSendEvent",function(t){return function(e){(0,p.s3)()===t&&(0,p.n_)({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:(0,o.jH)(e)},{event:e})}}(t))}}}));(0,a.RN)(tt,et);const nt="Dedupe",rt=(0,a._I)((()=>{let t;return{name:nt,setupOnce(){},processEvent(e){if(e.type)return e;try{if(function(t,e){return!!e&&(!!function(t,e){const n=t.message,r=e.message;return!(!n&&!r)&&(!(n&&!r||!n&&r)&&(n===r&&(!!it(t,e)&&!!ot(t,e))))}(t,e)||!!function(t,e){const n=st(e),r=st(t);return!(!n||!r)&&(n.type===r.type&&n.value===r.value&&(!!it(t,e)&&!!ot(t,e)))}(t,e))}(e,t))return I&&r.kg.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(t){}return t=e}}}));function ot(t,e){let n=at(t),r=at(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let t=0;t{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:ut,setupOnce(){Error.stackTraceLimit=50},setup(t){e.onerror&&(function(t){(0,lt.V)((e=>{const{stackParser:n,attachStacktrace:r}=pt();if((0,p.s3)()!==t||(0,W.Wz)())return;const{msg:o,url:i,line:s,column:a,error:l}=e,c=void 0===l&&(0,M.HD)(o)?function(t,e,n,r){let o=(0,M.VW)(t)?t.message:t,i="Error";const s=o.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);s&&(i=s[1],o=s[2]);return ht({exception:{values:[{type:i,value:o}]}},e,n,r)}(o,i,s,a):ht(z(n,l||o,void 0,r,!1),i,s,a);c.level="error",(0,p.eN)(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})}))}(t),ft("onerror")),e.onunhandledrejection&&(function(t){(0,ct.h)((e=>{const{stackParser:n,attachStacktrace:r}=pt();if((0,p.s3)()!==t||(0,W.Wz)())return;const o=function(t){if((0,M.pt)(t))return t;const e=t;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(t){}return t}(e),i=(0,M.pt)(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:z(n,o,void 0,r,!0);i.level="error",(0,p.eN)(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}(t),ft("onunhandledrejection"))}}}));function ht(t,e,n,r){const o=t.exception=t.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[],c=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,d=(0,M.HD)(e)&&e.length>0?e:(0,X.l4)();return 0===l.length&&l.push({colno:c,filename:d,function:"?",in_app:!0,lineno:u}),t}function ft(t){I&&r.kg.log(`Global Handler attached: ${t}`)}function pt(){const t=(0,p.s3)();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}(0,a.RN)(ut,dt);const gt="HttpContext",mt=(0,a._I)((()=>({name:gt,setupOnce(){},preprocessEvent(t){if(!W.m9.navigator&&!W.m9.location&&!W.m9.document)return;const e=t.request&&t.request.url||W.m9.location&&W.m9.location.href,{referrer:n}=W.m9.document||{},{userAgent:r}=W.m9.navigator||{},o={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...t.request,...e&&{url:e},headers:o};t.request=i}})));function yt(t,e,n=250,r,o,s,a){if(!(s.exception&&s.exception.values&&a&&(0,M.V9)(a.originalException,Error)))return;const l=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;var c,u;l&&(s.exception.values=(c=vt(t,e,o,a.originalException,r,s.exception.values,l,0),u=n,c.map((t=>(t.value&&(t.value=(0,i.$G)(t.value,u)),t)))))}function vt(t,e,n,r,o,i,s,a){if(i.length>=n+1)return i;let l=[...i];if((0,M.V9)(r[o],Error)){bt(s,a);const i=t(e,r[o]),c=l.length;xt(i,o,c,a),l=vt(t,e,n,r[o],o,[i,...l],i,c)}return Array.isArray(r.errors)&&r.errors.forEach(((r,i)=>{if((0,M.V9)(r,Error)){bt(s,a);const c=t(e,r),u=l.length;xt(c,`errors[${i}]`,u,a),l=vt(t,e,n,r,o,[c,...l],c,u)}})),l}function bt(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,is_exception_group:!0,exception_id:e}}function xt(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}(0,a.RN)(gt,mt);const wt="LinkedErrors",kt=(0,a._I)(((t={})=>{const e=t.limit||5,n=t.key||"cause";return{name:wt,setupOnce(){},preprocessEvent(t,r,o){const i=o.getOptions();yt(_,i.stackParser,i.maxValueLength,n,e,t,r)}}})),St=((0,a.RN)(wt,kt),["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"]),Ct="TryCatch",At=(0,a._I)(((t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:Ct,setupOnce(){e.setTimeout&&(0,f.hl)(W.m9,"setTimeout",Et),e.setInterval&&(0,f.hl)(W.m9,"setInterval",Et),e.requestAnimationFrame&&(0,f.hl)(W.m9,"requestAnimationFrame",Tt),e.XMLHttpRequest&&"XMLHttpRequest"in W.m9&&(0,f.hl)(XMLHttpRequest.prototype,"send",Pt);const t=e.eventTarget;t&&(Array.isArray(t)?t:St).forEach(Ot)}}}));function Et(t){return function(...e){const n=e[0];return e[0]=(0,W.re)(n,{mechanism:{data:{function:(0,w.$P)(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function Tt(t){return function(e){return t.apply(this,[(0,W.re)(e,{mechanism:{data:{function:"requestAnimationFrame",handler:(0,w.$P)(t)},handled:!1,type:"instrument"}})])}}function Pt(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((t=>{t in n&&"function"==typeof n[t]&&(0,f.hl)(n,t,(function(e){const n={mechanism:{data:{function:t,handler:(0,w.$P)(e)},handled:!1,type:"instrument"}},r=(0,f.HK)(e);return r&&(n.mechanism.data.handler=(0,w.$P)(r)),(0,W.re)(e,n)}))})),t.apply(this,e)}}function Ot(t){const e=W.m9,n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&((0,f.hl)(n,"addEventListener",(function(e){return function(n,r,o){try{"function"==typeof r.handleEvent&&(r.handleEvent=(0,W.re)(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:(0,w.$P)(r),target:t},handled:!1,type:"instrument"}}))}catch(t){}return e.apply(this,[n,(0,W.re)(r,{mechanism:{data:{function:"addEventListener",handler:(0,w.$P)(r),target:t},handled:!1,type:"instrument"}}),o])}})),(0,f.hl)(n,"removeEventListener",(function(t){return function(e,n,r){const o=n;try{const n=o&&o.__sentry_wrapped__;n&&t.call(this,e,n,r)}catch(t){}return t.call(this,e,o,r)}})))}(0,a.RN)(Ct,At);const Rt="?";function It(t,e,n,r){const o={filename:t,function:e,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const Mt=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Lt=/\((\S*)(?::(\d+))(?::(\d+))\)/,jt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,_t=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Dt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Ft=[[30,t=>{const e=Mt.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=Lt.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=Bt(e[1]||Rt,e[2]);return It(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],[50,t=>{const e=jt.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=_t.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||Rt;return[n,t]=Bt(n,t),It(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],[40,t=>{const e=Dt.exec(t);return e?It(e[2],e[1]||Rt,+e[3],e[4]?+e[4]:void 0):void 0}]],Nt=(0,w.pE)(...Ft),Bt=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:Rt,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var zt=n(409);var Vt=n(228);const $t=30;function Wt(t,e,n=function(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(r){if(!(void 0===t||e.lengthn(o))).then(null,(()=>n(o).then(null,(()=>{})))),o},drain:function(t){return new j.cW(((n,r)=>{let o=e.length;if(!o)return n(!0);const i=setTimeout((()=>{t&&t>0&&n(!1)}),t);e.forEach((t=>{(0,j.WD)(t).then((()=>{--o||(clearTimeout(i),n(!0))}),r)}))}))}}}(t.bufferSize||$t)){let o={};function i(i){const a=[];if((0,P.gv)(i,((e,n)=>{const r=(0,P.mL)(n);if((0,Vt.Q)(o,r)){const o=Ut(e,n);t.recordDroppedEvent("ratelimit_backoff",r,o)}else a.push(e)})),0===a.length)return(0,j.WD)();const l=(0,P.Jd)(i[0],a),c=e=>{(0,P.gv)(l,((n,r)=>{const o=Ut(n,r);t.recordDroppedEvent(e,(0,P.mL)(r),o)}))};return n.add((()=>e({body:(0,P.V$)(l,t.textEncoder)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&s.X&&r.kg.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),o=(0,Vt.WG)(o,t),t)),(t=>{throw c("network_error"),t})))).then((t=>t),(t=>{if(t instanceof zt.b)return s.X&&r.kg.error("Skipped sending event because buffer is full."),c("queue_overflow"),(0,j.WD)();throw t}))}return i.__sentry__baseTransport__=!0,{send:i,flush:t=>n.drain(t)}}function Ut(t,e){if("event"===e||"transaction"===e)return Array.isArray(t)?t[1]:void 0}let Ht;function qt(t,e=function(){if(Ht)return Ht;if((0,k.Du)(W.m9.fetch))return Ht=W.m9.fetch.bind(W.m9);const t=W.m9.document;let e=W.m9.fetch;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(t){I&&r.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return Ht=e.bind(W.m9)}()){let n=0,o=0;return Wt(t,(function(r){const i=r.body.length;n+=i,o++;const s={body:r.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&o<15,...t.fetchOptions};try{return e(t.url,s).then((t=>(n-=i,o--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}})))}catch(t){return Ht=void 0,n-=i,o--,(0,j.$2)(t)}}))}const Gt=4;function Yt(t){return Wt(t,(function(e){return new j.cW(((n,r)=>{const o=new XMLHttpRequest;o.onerror=r,o.onreadystatechange=()=>{o.readyState===Gt&&n({statusCode:o.status,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")}})},o.open("POST",t.url);for(const e in t.headers)Object.prototype.hasOwnProperty.call(t.headers,e)&&o.setRequestHeader(e,t.headers[e]);o.send(e.body)}))}))}const Zt=[d(),v(),At(),et(),dt(),kt(),rt(),mt()];function Kt(t={}){void 0===t.defaultIntegrations&&(t.defaultIntegrations=[...Zt]),void 0===t.release&&("string"==typeof __SENTRY_RELEASE__&&(t.release=__SENTRY_RELEASE__),W.m9.SENTRY_RELEASE&&W.m9.SENTRY_RELEASE.id&&(t.release=W.m9.SENTRY_RELEASE.id)),void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0);const e={...t,stackParser:(0,w.Sq)(t.stackParser||Nt),integrations:(0,a.m8)(t),transport:t.transport||((0,k.Ak)()?qt:Yt)};(function(t,e){!0===e.debug&&(s.X?r.kg.enable():(0,r.Cf)((()=>{x.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}))),(0,p.nZ)().update(e.initialScope);const n=new t(e);!function(t){const e=(0,b.Gd)().getStackTop();e.client=t,e.scope.setClient(t)}(n),function(t){t.init?t.init():t.setupIntegrations&&t.setupIntegrations()}(n)})(U,e),t.autoSessionTracking&&(void 0!==W.m9.document?((0,p.yj)({ignoreDuration:!0}),(0,p.cg)(),(0,S.a)((({from:t,to:e})=>{void 0!==t&&t!==e&&((0,p.yj)({ignoreDuration:!0}),(0,p.cg)())}))):I&&r.kg.warn("Session tracking in non-browser environment with @sentry/browser is not supported."))}function Xt(t){const e={...t};E(e,"react"),Kt(e)}},1165:(t,e,n)=>{"use strict";function r(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}n.d(e,{G:()=>Zn});var o=n(4487);function i(t){return"/"===t[t.length-1]?t.slice(0,-1):t}var s=n(807),a=n(8942),l=n(5659),c=n(3371),u=n(6754),d=n(1235),h=n(8007),f=n(535),p=n(8464),g=n(1170),m=n(2343),y=n(2844),v=n(5322),b=n(7321),x=n(1394),w=n(5316),k=n(734),S=n(8725),C=n(228),A=n(1422);function E(){return"undefined"!=typeof window&&(!(0,A.KV)()||void 0!==d.GLOBAL_OBJ.process&&"renderer"===d.GLOBAL_OBJ.process.type)}var T=n(5363),P=n(5108);const O=d.GLOBAL_OBJ,R="sentryReplaySession",I="Unable to send Replay",M=15e4,L=5e3,j=2e7;function _(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}var D;function F(t){const e=_([t,"optionalAccess",t=>t.host]);return Boolean(_([e,"optionalAccess",t=>t.shadowRoot])===t)}function N(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function B(t){try{const n=t.rules||t.cssRules;return n?((e=Array.from(n,z).join("")).includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e):null}catch(t){return null}var e}function z(t){let e;if(function(t){return"styleSheet"in t}(t))try{e=B(t.styleSheet)||function(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import",`url(${JSON.stringify(t.href)})`];return""===t.layerName?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}(t)}catch(t){}else if(function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":"))return t.cssText.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2");return e||t.cssText}!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(D||(D={}));class V{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;return null!=(e=_([this,"access",t=>t.getMeta,"call",e=>e(t),"optionalAccess",t=>t.id]))?e:-1;var e}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t)))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){const n=e.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,e)}replace(t,e){const n=this.getNode(t);if(n){const t=this.nodeMetaMap.get(n);t&&this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function $({maskInputOptions:t,tagName:e,type:n}){return"OPTION"===e&&(e="SELECT"),Boolean(t[e.toLowerCase()]||n&&t[n]||"password"===n||"INPUT"===e&&!n&&t.text)}function W({isMasked:t,element:e,value:n,maskInputFn:r}){let o=n||"";return t?(r&&(o=r(o,e)),"*".repeat(o.length)):o}function U(t){return t.toLowerCase()}function H(t){return t.toUpperCase()}const q="__rrweb_original__";function G(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?U(e):null}function Y(t,e,n){return"INPUT"!==e||"radio"!==n&&"checkbox"!==n?t.value:t.getAttribute("value")||""}let Z=1;const K=new RegExp("[^a-z0-9-_:]");function X(){return Z++}let J,Q;const tt=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,et=/^(?:[a-z+]+:)?\/\//i,nt=/^www\..*/i,rt=/^(data:)([^,]*),(.*)/i;function ot(t,e){return(t||"").replace(tt,((t,n,r,o,i,s)=>{const a=r||i||s,l=n||o||"";if(!a)return t;if(et.test(a)||nt.test(a))return`url(${l}${a}${l})`;if(rt.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+a}${l})`;const c=e.split("/"),u=a.split("/");c.pop();for(const t of u)"."!==t&&(".."===t?c.pop():c.push(t));return`url(${l}${c.join("/")}${l})`}))}const it=/^[^ \t\n\r\u000c]+/,st=/^[, \t\n\r\u000c]+/;function at(t,e){if(!e||""===e.trim())return e;const n=t.createElement("a");return n.href=e,n.href}function lt(){const t=document.createElement("a");return t.href="",t.href}function ct(t,e,n,r,o,i){return r?"src"===n||"href"===n&&("use"!==e||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?at(t,r):"background"!==n||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===n?function(t,e){if(""===e.trim())return e;let n=0;function r(t){let r;const o=t.exec(e.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(st),!(n>=e.length);){let i=r(it);if(","===i.slice(-1))i=at(t,i.substring(0,i.length-1)),o.push(i);else{let r="";i=at(t,i);let s=!1;for(;;){const t=e.charAt(n);if(""===t){o.push((i+r).trim());break}if(s)")"===t&&(s=!1);else{if(","===t){n+=1,o.push((i+r).trim());break}"("===t&&(s=!0)}r+=t,n+=1}}}return o.join(", ")}(t,r):"style"===n?ot(r,lt()):"object"===e&&"data"===n?at(t,r):"function"==typeof i?i(n,r,o):r:at(t,r):r}function ut(t,e,n){return("video"===t||"audio"===t)&&"autoplay"===e}function dt(t,e,n=1/0,r=0){return t?t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:dt(t.parentNode,e,n,r+1):-1}function ht(t,e){return n=>{const r=n;if(null===r)return!1;try{if(t)if("string"==typeof t){if(r.matches(`.${t}`))return!0}else if(function(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}return!1}(r,t))return!0;return!(!e||!r.matches(e))}catch(t){return!1}}}function ft(t,e,n,r,o,i){try{const s=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(null===s)return!1;if("INPUT"===s.tagName){const t=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(t))return!0}let a=-1,l=-1;if(i){if(l=dt(s,ht(r,o)),l<0)return!0;a=dt(s,ht(e,n),l>=0?l:1/0)}else{if(a=dt(s,ht(e,n)),a<0)return!1;l=dt(s,ht(r,o),a>=0?a:1/0)}return a>=0?!(l>=0)||a<=l:!(l>=0||!i)}catch(t){}return!!i}function pt(t){return null==t?"":t.toLowerCase()}function gt(t,e){const{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:h=!1,inlineStylesheet:f=!0,maskInputOptions:p={},maskAttributeFn:g,maskTextFn:m,maskInputFn:y,slimDOMOptions:v,dataURLOptions:b={},inlineImages:x=!1,recordCanvas:w=!1,onSerialize:k,onIframeLoad:S,iframeLoadTimeout:C=5e3,onStylesheetLoad:A,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:T=()=>!1,newlyAddedElement:O=!1}=e;let{preserveWhiteSpace:R=!0}=e;const I=function(t,e){const{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskAttributeFn:l,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:h,inlineStylesheet:f,maskInputOptions:p={},maskTextFn:g,maskInputFn:m,dataURLOptions:y={},inlineImages:v,recordCanvas:b,keepIframeSrcFn:x,newlyAddedElement:w=!1}=e,k=function(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return 1===n?void 0:n}(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:D.Document,childNodes:[],compatMode:t.compatMode}:{type:D.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:D.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:k};case t.ELEMENT_NODE:return function(t,e){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:i,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:l,maskInputFn:c,dataURLOptions:u={},inlineImages:d,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:p=!1,rootId:g,maskAllText:m,maskTextClass:y,unmaskTextClass:v,maskTextSelector:b,unmaskTextSelector:x}=e,w=function(t,e,n,r){try{if(r&&t.matches(r))return!1;if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}if(n)return t.matches(n)}catch(t){}return!1}(t,r,o,i),k=function(t){if(t instanceof HTMLFormElement)return"form";const e=U(t.tagName);return K.test(e)?"div":e}(t);let S={};const C=t.attributes.length;for(let e=0;ee.href===t.href));let r=null;e&&(r=B(e)),r&&(delete S.rel,delete S.href,S._cssText=ot(r,e.href))}if("style"===k&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const e=B(t.sheet);e&&(S._cssText=ot(e,lt()))}if("input"===k||"textarea"===k||"select"===k||"option"===k){const e=t,n=G(e),r=Y(e,H(k),n),o=e.checked;if("submit"!==n&&"button"!==n&&r){const t=ft(e,y,b,v,x,$({type:n,tagName:H(k),maskInputOptions:a}));S.value=W({isMasked:t,element:e,value:r,maskInputFn:c})}o&&(S.checked=o)}if("option"===k&&(t.selected&&!a.select?S.selected=!0:delete S.selected),"canvas"===k&&h)if("2d"===t.__context)(function(t){const e=t.getContext("2d");if(!e)return!0;for(let n=0;n0!==t)))return!1}return!0})(t)||(S.rr_dataURL=t.toDataURL(u.type,u.quality));else if(!("__context"in t)){const e=t.toDataURL(u.type,u.quality),n=document.createElement("canvas");n.width=t.width,n.height=t.height,e!==n.toDataURL(u.type,u.quality)&&(S.rr_dataURL=e)}if("img"===k&&d){J||(J=n.createElement("canvas"),Q=J.getContext("2d"));const e=t,r=e.crossOrigin;e.crossOrigin="anonymous";const o=()=>{e.removeEventListener("load",o);try{J.width=e.naturalWidth,J.height=e.naturalHeight,Q.drawImage(e,0,0),S.rr_dataURL=J.toDataURL(u.type,u.quality)}catch(t){P.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}r?S.crossOrigin=r:e.removeAttribute("crossorigin")};e.complete&&0!==e.naturalWidth?o():e.addEventListener("load",o)}if("audio"!==k&&"video"!==k||(S.rr_mediaState=t.paused?"paused":"played",S.rr_mediaCurrentTime=t.currentTime),p||(t.scrollLeft&&(S.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(S.rr_scrollTop=t.scrollTop)),w){const{width:e,height:n}=t.getBoundingClientRect();S={class:S.class,rr_width:`${e}px`,rr_height:`${n}px`}}let A;"iframe"!==k||f(S.src)||(t.contentDocument||(S.rr_src=S.src),delete S.src);try{customElements.get(k)&&(A=!0)}catch(t){}return{type:D.Element,tagName:k,attributes:S,childNodes:[],isSVG:(E=t,Boolean("svg"===E.tagName||E.ownerSVGElement)||void 0),needBlock:w,rootId:g,isCustom:A};var E}(t,{doc:n,blockClass:o,blockSelector:i,unblockSelector:s,inlineStylesheet:f,maskAttributeFn:l,maskInputOptions:p,maskInputFn:m,dataURLOptions:y,inlineImages:v,recordCanvas:b,keepIframeSrcFn:x,newlyAddedElement:w,rootId:k,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:h});case t.TEXT_NODE:return function(t,e){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:i,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:l,maskInputFn:c,rootId:u}=e,d=t.parentNode&&t.parentNode.tagName;let h=t.textContent;const f="STYLE"===d||void 0,p="SCRIPT"===d||void 0,g="TEXTAREA"===d||void 0;if(f&&h){try{t.nextSibling||t.previousSibling||_([t,"access",t=>t.parentNode,"access",t=>t.sheet,"optionalAccess",t=>t.cssRules])&&(h=B(t.parentNode.sheet))}catch(e){P.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`,t)}h=ot(h,lt())}p&&(h="SCRIPT_PLACEHOLDER");const m=ft(t,r,i,o,s,n);return f||p||g||!h||!m||(h=a?a(h):h.replace(/[\S]/g,"*")),g&&h&&(l.textarea||m)&&(h=c?c(h,t.parentNode):h.replace(/[\S]/g,"*")),"OPTION"===d&&h&&(h=W({isMasked:ft(t,r,i,o,s,$({type:null,tagName:d,maskInputOptions:l})),element:t,value:h,maskInputFn:c})),{type:D.Text,textContent:h||"",isStyle:f,rootId:u}}(t,{maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:h,maskTextFn:g,maskInputOptions:p,maskInputFn:m,rootId:k});case t.CDATA_SECTION_NODE:return{type:D.CDATA,textContent:"",rootId:k};case t.COMMENT_NODE:return{type:D.Comment,textContent:t.textContent||"",rootId:k};default:return!1}}(t,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:f,maskInputOptions:p,maskAttributeFn:g,maskTextFn:m,maskInputFn:y,dataURLOptions:b,inlineImages:x,recordCanvas:w,keepIframeSrcFn:T,newlyAddedElement:O});if(!I)return P.warn(t,"not serialized"),null;let M;M=r.hasNode(t)?r.getId(t):!function(t,e){if(e.comment&&t.type===D.Comment)return!0;if(t.type===D.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(pt(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===pt(t.attributes.name)||"icon"===pt(t.attributes.rel)||"apple-touch-icon"===pt(t.attributes.rel)||"shortcut icon"===pt(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&pt(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(pt(t.attributes.property).match(/^(og|twitter|fb):/)||pt(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===pt(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===pt(t.attributes.name)||"googlebot"===pt(t.attributes.name)||"bingbot"===pt(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===pt(t.attributes.name)||"generator"===pt(t.attributes.name)||"framework"===pt(t.attributes.name)||"publisher"===pt(t.attributes.name)||"progid"===pt(t.attributes.name)||pt(t.attributes.property).match(/^article:/)||pt(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===pt(t.attributes.name)||"yandex-verification"===pt(t.attributes.name)||"csrf-token"===pt(t.attributes.name)||"p:domain_verify"===pt(t.attributes.name)||"verify-v1"===pt(t.attributes.name)||"verification"===pt(t.attributes.name)||"shopify-checkout-api-token"===pt(t.attributes.name)))return!0}}return!1}(I,v)&&(R||I.type!==D.Text||I.isStyle||I.textContent.replace(/^\s+|\s+$/gm,"").length)?X():-2;const L=Object.assign(I,{id:M});if(r.add(t,L),-2===M)return null;k&&k(t);let j=!h;if(L.type===D.Element){j=j&&!L.needBlock,delete L.needBlock;const e=t.shadowRoot;e&&N(e)&&(L.isShadowHost=!0)}if((L.type===D.Document||L.type===D.Element)&&j){v.headWhitespace&&L.type===D.Element&&"head"===L.tagName&&(R=!1);const e={doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:h,inlineStylesheet:f,maskInputOptions:p,maskAttributeFn:g,maskTextFn:m,maskInputFn:y,slimDOMOptions:v,dataURLOptions:b,inlineImages:x,recordCanvas:w,preserveWhiteSpace:R,onSerialize:k,onIframeLoad:S,iframeLoadTimeout:C,onStylesheetLoad:A,stylesheetLoadTimeout:E,keepIframeSrcFn:T};for(const n of Array.from(t.childNodes)){const t=gt(n,e);t&&L.childNodes.push(t)}if(function(t){return t.nodeType===t.ELEMENT_NODE}(t)&&t.shadowRoot)for(const n of Array.from(t.shadowRoot.childNodes)){const r=gt(n,e);r&&(N(t.shadowRoot)&&(r.isShadow=!0),L.childNodes.push(r))}}return t.parentNode&&F(t.parentNode)&&N(t.parentNode)&&(L.isShadow=!0),L.type===D.Element&&"iframe"===L.tagName&&function(t,e,n){const r=t.contentWindow;if(!r)return;let o,i=!1;try{o=r.document.readyState}catch(t){return}if("complete"!==o){const r=setTimeout((()=>{i||(e(),i=!0)}),n);return void t.addEventListener("load",(()=>{clearTimeout(r),i=!0,e()}))}const s="about:blank";if(r.location.href!==s||t.src===s||""===t.src)return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}(t,(()=>{const e=t.contentDocument;if(e&&S){const n=gt(e,{doc:e,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskAttributeFn:g,maskTextFn:m,maskInputFn:y,slimDOMOptions:v,dataURLOptions:b,inlineImages:x,recordCanvas:w,preserveWhiteSpace:R,onSerialize:k,onIframeLoad:S,iframeLoadTimeout:C,onStylesheetLoad:A,stylesheetLoadTimeout:E,keepIframeSrcFn:T});n&&S(t,n)}}),C),L.type===D.Element&&"link"===L.tagName&&"stylesheet"===L.attributes.rel&&function(t,e,n){let r,o=!1;try{r=t.sheet}catch(t){return}if(r)return;const i=setTimeout((()=>{o||(e(),o=!0)}),n);t.addEventListener("load",(()=>{clearTimeout(i),o=!0,e()}))}(t,(()=>{if(A){const e=gt(t,{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskAttributeFn:g,maskTextFn:m,maskInputFn:y,slimDOMOptions:v,dataURLOptions:b,inlineImages:x,recordCanvas:w,preserveWhiteSpace:R,onSerialize:k,onIframeLoad:S,iframeLoadTimeout:C,onStylesheetLoad:A,stylesheetLoadTimeout:E,keepIframeSrcFn:T});e&&A(t,e)}}),E),L}function mt(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}function yt(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const vt="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let bt={map:{},getId:()=>(P.error(vt),-1),getNode:()=>(P.error(vt),null),removeNodeFromMap(){P.error(vt)},has:()=>(P.error(vt),!1),reset(){P.error(vt)}};function xt(t,e,n={}){let r=null,o=0;return function(...i){const s=Date.now();o||!1!==n.leading||(o=s);const a=e-(s-o),l=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),o=s,t.apply(l,i)):r||!1===n.trailing||(r=setTimeout((()=>{o=!1===n.leading?0:Date.now(),r=null,t.apply(l,i)}),a))}}function wt(t,e,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(t,e);return o.Object.defineProperty(t,e,r?n:{set(t){setTimeout((()=>{n.set.call(this,t)}),0),i&&i.set&&i.set.call(this,t)}}),()=>wt(t,e,i||{},!0)}function kt(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=o,()=>{t[e]=r}}catch(t){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(bt=new Proxy(bt,{get:(t,e,n)=>("map"===e&&P.error(vt),Reflect.get(t,e,n))}));let St,Ct=Date.now;function At(t){const e=t.document;return{left:e.scrollingElement?e.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:mt([e,"optionalAccess",t=>t.documentElement,"access",t=>t.scrollLeft])||mt([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.parentElement,"optionalAccess",t=>t.scrollLeft])||mt([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.scrollLeft])||0,top:e.scrollingElement?e.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:mt([e,"optionalAccess",t=>t.documentElement,"access",t=>t.scrollTop])||mt([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.parentElement,"optionalAccess",t=>t.scrollTop])||mt([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.scrollTop])||0}}function Et(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Tt(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Pt(t,e,n,r,o){if(!t)return!1;const i=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(!i)return!1;const s=ht(e,n);if(!o){const t=r&&i.matches(r);return s(i)&&!t}const a=dt(i,s);let l=-1;return!(a<0)&&(r&&(l=dt(i,ht(null,r))),a>-1&&l<0||at.shadowRoot]))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ct=()=>(new Date).getTime());class _t{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return null!=(e=this.styleIDMap.get(t))?e:-1;var e}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let n;return n=void 0===e?this.id++:e,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Dt(t){let e=null;return mt([t,"access",t=>t.getRootNode,"optionalCall",t=>t(),"optionalAccess",t=>t.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(e=t.getRootNode().host),e}function Ft(t){const e=t.ownerDocument;return!!e&&(e.contains(t)||function(t){const e=t.ownerDocument;if(!e)return!1;const n=function(t){let e,n=t;for(;e=Dt(n);)n=e;return n}(t);return e.contains(n)}(t))}var Nt=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(Nt||{}),Bt=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(Bt||{}),zt=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(zt||{}),Vt=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Vt||{});function $t(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}function Wt(t){return"__ln"in t}class Ut{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let e=this.head;for(let n=0;nt.next])||null;return e}addNode(t){const e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&Wt(t.previousSibling)){const n=t.previousSibling.__ln.next;e.next=n,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,n&&(n.previous=e)}else if(t.nextSibling&&Wt(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;e.previous=n,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,n&&(n.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){const e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Ht=(t,e)=>`${t}@${e}`;class qt{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],e=new Set,n=new Ut,r=t=>{let e=t,n=-2;for(;-2===n;)e=e&&e.nextSibling,n=e&&this.mirror.getId(e);return n},o=o=>{if(!o.parentNode||!Ft(o))return;const i=F(o.parentNode)?this.mirror.getId(Dt(o)):this.mirror.getId(o.parentNode),s=r(o);if(-1===i||-1===s)return n.addNode(o);const a=gt(o,{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:t=>{Mt(t,this.mirror)&&this.iframeManager.addIframe(t),Lt(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),jt(o)&&this.shadowDomManager.addShadowRoot(o.shadowRoot,this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});a&&(t.push({parentId:i,nextId:s,node:a}),e.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const t of this.movedSet)Yt(this.removes,t,this.mirror)&&!this.movedSet.has(t.parentNode)||o(t);for(const t of this.addedSet)Kt(this.droppedSet,t)||Yt(this.removes,t,this.mirror)?Kt(this.movedSet,t)?o(t):this.droppedSet.add(t):o(t);let i=null;for(;n.length;){let t=null;if(i){const e=this.mirror.getId(i.value.parentNode),n=r(i.value);-1!==e&&-1!==n&&(t=i)}if(!t){let e=n.tail;for(;e;){const n=e;if(e=e.previous,n){const e=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==e){t=n;break}{const e=n.value;if(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=e.parentNode.host;if(-1!==this.mirror.getId(r)){t=n;break}}}}}}if(!t){for(;n.head;)n.removeNode(n.head.value);break}i=t.previous,n.removeNode(t.value),o(t.value)}const s={texts:this.texts.map((t=>({id:this.mirror.getId(t.node),value:t.value}))).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),attributes:this.attributes.map((t=>{const{attributes:e}=t;if("string"==typeof e.style){const n=JSON.stringify(t.styleDiff),r=JSON.stringify(t._unchangedStyles);n.length!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(s.texts.length||s.attributes.length||s.removes.length||s.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=t=>{if(Ot(t.target,this.mirror))return;let e;try{e=document.implementation.createHTMLDocument()}catch(t){e=this.doc}switch(t.type){case"characterData":{const e=t.target.textContent;Pt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||e===t.oldValue||this.texts.push({value:ft(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&e?this.maskTextFn?this.maskTextFn(e):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,o=t.target.getAttribute(r);if("value"===r){const e=G(n),r=n.tagName;o=Y(n,r,e);const i=$({maskInputOptions:this.maskInputOptions,tagName:r,type:e});o=W({isMasked:ft(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,i),element:n,value:o,maskInputFn:this.maskInputFn})}if(Pt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let i=this.attributes.find((e=>e.node===t.target));if("IFRAME"===n.tagName&&"src"===r&&!this.keepIframeSrcFn(o)){if(n.contentDocument)return;r="rr_src"}if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i)),"type"===r&&"INPUT"===n.tagName&&"password"===(t.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!ut(n.tagName,r)&&(i.attributes[r]=ct(this.doc,U(n.tagName),U(r),o,n,this.maskAttributeFn),"style"===r)){const r=e.createElement("span");t.oldValue&&r.setAttribute("style",t.oldValue);for(const t of Array.from(n.style)){const e=n.style.getPropertyValue(t),o=n.style.getPropertyPriority(t);e!==r.style.getPropertyValue(t)||o!==r.style.getPropertyPriority(t)?i.styleDiff[t]=""===o?e:[e,o]:i._unchangedStyles[t]=[e,o]}for(const t of Array.from(r.style))""===n.style.getPropertyValue(t)&&(i.styleDiff[t]=!1)}break}case"childList":if(Pt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach((e=>this.genAdds(e,t.target))),t.removedNodes.forEach((e=>{const n=this.mirror.getId(e),r=F(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Pt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Ot(e,this.mirror)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(Gt(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===n||Rt(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[Ht(n,r)]?Gt(this.movedSet,e):this.removes.push({parentId:r,id:n,isShadow:!(!F(t.target)||!N(t.target))||void 0})),this.mapRemoves.push(e))}))}},this.genAdds=(t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(Ot(t,this.mirror))return;this.movedSet.add(t);let n=null;e&&this.mirror.hasNode(e)&&(n=this.mirror.getId(e)),n&&-1!==n&&(this.movedMap[Ht(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Pt(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach((t=>this.genAdds(t))),jt(t)&&t.shadowRoot.childNodes.forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)})))}}}init(t){["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"].forEach((e=>{this[e]=t[e]}))}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 Gt(t,e){t.delete(e),e.childNodes.forEach((e=>Gt(t,e)))}function Yt(t,e,n){return 0!==t.length&&Zt(t,e,n)}function Zt(t,e,n){const{parentNode:r}=e;if(!r)return!1;const o=n.getId(r);return!!t.some((t=>t.id===o))||Zt(t,r,n)}function Kt(t,e){return 0!==t.size&&Xt(t,e)}function Xt(t,e){const{parentNode:n}=e;return!!n&&(!!t.has(n)||Xt(t,n))}let Jt;function Qt(t){Jt=t}function te(){Jt=void 0}const ee=t=>Jt?(...e)=>{try{return t(...e)}catch(t){if(Jt&&!0===Jt(t))return()=>{};throw t}}:t;function ne(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const re=[];function oe(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function ie(t,e){const n=new qt;re.push(n),n.init(t);let r=window.MutationObserver||window.__rrMutationObserver;const o=ne([window,"optionalAccess",t=>t.Zone,"optionalAccess",t=>t.__symbol__,"optionalCall",t=>t("MutationObserver")]);o&&window[o]&&(r=window[o]);const i=new r(ee((e=>{t.onMutation&&!1===t.onMutation(e)||n.processMutations.bind(n)(e)})));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function se({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:s}){return yt("scroll",ee(xt(ee((s=>{const a=oe(s);if(!a||Pt(a,r,o,i,!0))return;const l=n.getId(a);if(a===e&&e.defaultView){const n=At(e.defaultView);t({id:l,x:n.left,y:n.top})}else t({id:l,x:a.scrollLeft,y:a.scrollTop})})),s.scroll||100)),e)}const ae=["INPUT","TEXTAREA","SELECT"],le=new WeakMap;function ce({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,ignoreClass:s,ignoreSelector:a,maskInputOptions:l,maskInputFn:c,sampling:u,userTriggeredOnInput:d,maskTextClass:h,unmaskTextClass:f,maskTextSelector:p,unmaskTextSelector:g}){function m(t){let n=oe(t);const u=t.isTrusted,m=n&&H(n.tagName);if("OPTION"===m&&(n=n.parentElement),!n||!m||ae.indexOf(m)<0||Pt(n,r,o,i,!0))return;const v=n;if(v.classList.contains(s)||a&&v.matches(a))return;const b=G(n);let x=Y(v,m,b),w=!1;const k=$({maskInputOptions:l,tagName:m,type:b}),S=ft(n,h,p,f,g,k);"radio"!==b&&"checkbox"!==b||(w=n.checked),x=W({isMasked:S,element:n,value:x,maskInputFn:c}),y(n,d?{text:x,isChecked:w,userTriggered:u}:{text:x,isChecked:w});const C=n.name;"radio"===b&&C&&w&&e.querySelectorAll(`input[type="radio"][name="${C}"]`).forEach((t=>{if(t!==n){const e=W({isMasked:S,element:t,value:Y(t,m,b),maskInputFn:c});y(t,d?{text:e,isChecked:!w,userTriggered:!1}:{text:e,isChecked:!w})}}))}function y(e,r){const o=le.get(e);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){le.set(e,r);const o=n.getId(e);ee(t)({...r,id:o})}}const v=("last"===u.input?["change"]:["input","change"]).map((t=>yt(t,ee(m),e))),b=e.defaultView;if(!b)return()=>{v.forEach((t=>t()))};const x=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),w=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return x&&x.set&&v.push(...w.map((t=>wt(t[0],t[1],{set(){ee(m)({target:this,isTrusted:!1})}},!1,b)))),ee((()=>{v.forEach((t=>t()))}))}function ue(t){return function(t,e){if(pe("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||pe("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||pe("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||pe("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const n=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(n)}else if(t.parentStyleSheet){const n=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(n)}return e}(t,[])}function de(t,e,n){let r,o;return t?(t.ownerNode?r=e.getId(t.ownerNode):o=n.getId(t),{styleId:o,id:r}):{}}function he({mirror:t,stylesheetManager:e},n){let r=null;r="#document"===n.nodeName?t.getId(n):t.getId(n.host);const o="#document"===n.nodeName?ne([n,"access",t=>t.defaultView,"optionalAccess",t=>t.Document]):ne([n,"access",t=>t.ownerDocument,"optionalAccess",t=>t.defaultView,"optionalAccess",t=>t.ShadowRoot]),i=ne([o,"optionalAccess",t=>t.prototype])?Object.getOwnPropertyDescriptor(ne([o,"optionalAccess",t=>t.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&o&&i?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return ne([i,"access",t=>t.get,"optionalAccess",t=>t.call,"call",t=>t(this)])},set(t){const n=ne([i,"access",t=>t.set,"optionalAccess",t=>t.call,"call",e=>e(this,t)]);if(null!==r&&-1!==r)try{e.adoptStyleSheets(t,r)}catch(t){}return n}}),ee((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))):()=>{}}function fe(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};const r=ie(t,t.doc),o=function({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(!1===e.mousemove)return()=>{};const o="number"==typeof e.mousemove?e.mousemove:50,i="number"==typeof e.mousemoveCallback?e.mousemoveCallback:500;let s,a=[];const l=xt(ee((e=>{const n=Date.now()-s;t(a.map((t=>(t.timeOffset-=n,t))),e),a=[],s=null})),i),c=ee(xt(ee((t=>{const e=oe(t),{clientX:n,clientY:o}=It(t)?t.changedTouches[0]:t;s||(s=Ct()),a.push({x:n,y:o,id:r.getId(e),timeOffset:Ct()-s}),l("undefined"!=typeof DragEvent&&t instanceof DragEvent?Bt.Drag:t instanceof MouseEvent?Bt.MouseMove:Bt.TouchMove)})),o,{trailing:!1})),u=[yt("mousemove",c,n),yt("touchmove",c,n),yt("drag",c,n)];return ee((()=>{u.forEach((t=>t()))}))}(t),i=function({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:s}){if(!1===s.mouseInteraction)return()=>{};const a=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,l=[];let c=null;return Object.keys(zt).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==a[t])).forEach((s=>{let a=U(s);const u=(e=>s=>{const a=oe(s);if(Pt(a,r,o,i,!0))return;let l=null,u=e;if("pointerType"in s){switch(s.pointerType){case"mouse":l=Vt.Mouse;break;case"touch":l=Vt.Touch;break;case"pen":l=Vt.Pen}l===Vt.Touch?zt[e]===zt.MouseDown?u="TouchStart":zt[e]===zt.MouseUp&&(u="TouchEnd"):Vt.Pen}else It(s)&&(l=Vt.Touch);null!==l?(c=l,(u.startsWith("Touch")&&l===Vt.Touch||u.startsWith("Mouse")&&l===Vt.Mouse)&&(l=null)):zt[e]===zt.Click&&(l=c,c=null);const d=It(s)?s.changedTouches[0]:s;if(!d)return;const h=n.getId(a),{clientX:f,clientY:p}=d;ee(t)({type:zt[u],id:h,x:f,y:p,...null!==l&&{pointerType:l}})})(s);if(window.PointerEvent)switch(zt[s]){case zt.MouseDown:case zt.MouseUp:a=a.replace("mouse","pointer");break;case zt.TouchStart:case zt.TouchEnd:return}l.push(yt(a,u,e))})),ee((()=>{l.forEach((t=>t()))}))}(t),s=se(t),a=function({viewportResizeCb:t},{win:e}){let n=-1,r=-1;return yt("resize",ee(xt(ee((()=>{const e=Et(),o=Tt();n===e&&r===o||(t({width:Number(o),height:Number(e)}),n=e,r=o)})),200)),e)}(t,{win:n}),l=ce(t),c=function({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:o,sampling:i,doc:s}){const a=ee((s=>xt(ee((i=>{const a=oe(i);if(!a||Pt(a,e,n,r,!0))return;const{currentTime:l,volume:c,muted:u,playbackRate:d}=a;t({type:s,id:o.getId(a),currentTime:l,volume:c,muted:u,playbackRate:d})})),i.media||500))),l=[yt("play",a(0),s),yt("pause",a(1),s),yt("seeked",a(2),s),yt("volumechange",a(3),s),yt("ratechange",a(4),s)];return ee((()=>{l.forEach((t=>t()))}))}(t),u=function({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:ee(((r,o,i)=>{const[s,a]=i,{id:l,styleId:c}=de(o,e,n.styleMirror);return(l&&-1!==l||c&&-1!==c)&&t({id:l,styleId:c,adds:[{rule:s,index:a}]}),r.apply(o,i)}))});const i=r.CSSStyleSheet.prototype.deleteRule;let s,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:ee(((r,o,i)=>{const[s]=i,{id:a,styleId:l}=de(o,e,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&t({id:a,styleId:l,removes:[{index:s}]}),r.apply(o,i)}))}),r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:ee(((r,o,i)=>{const[s]=i,{id:a,styleId:l}=de(o,e,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&t({id:a,styleId:l,replace:s}),r.apply(o,i)}))})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ee(((r,o,i)=>{const[s]=i,{id:a,styleId:l}=de(o,e,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&t({id:a,styleId:l,replaceSync:s}),r.apply(o,i)}))}));const l={};ge("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(ge("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),ge("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),ge("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(l).forEach((([r,o])=>{c[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(c[r].insertRule,{apply:ee(((r,o,i)=>{const[s,a]=i,{id:l,styleId:c}=de(o.parentStyleSheet,e,n.styleMirror);return(l&&-1!==l||c&&-1!==c)&&t({id:l,styleId:c,adds:[{rule:s,index:[...ue(o),a||0]}]}),r.apply(o,i)}))}),o.prototype.deleteRule=new Proxy(c[r].deleteRule,{apply:ee(((r,o,i)=>{const[s]=i,{id:a,styleId:l}=de(o.parentStyleSheet,e,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&t({id:a,styleId:l,removes:[{index:[...ue(o),s]}]}),r.apply(o,i)}))})})),ee((()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach((([t,e])=>{e.prototype.insertRule=c[t].insertRule,e.prototype.deleteRule=c[t].deleteRule}))}))}(t,{win:n}),d=he(t,t.doc),h=function({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:ee(((o,s,a)=>{const[l,c,u]=a;if(n.has(l))return i.apply(s,[l,c,u]);const{id:d,styleId:h}=de(ne([s,"access",t=>t.parentRule,"optionalAccess",t=>t.parentStyleSheet]),e,r.styleMirror);return(d&&-1!==d||h&&-1!==h)&&t({id:d,styleId:h,set:{property:l,value:c,priority:u},index:ue(s.parentRule)}),o.apply(s,a)}))});const s=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:ee(((o,i,a)=>{const[l]=a;if(n.has(l))return s.apply(i,[l]);const{id:c,styleId:u}=de(ne([i,"access",t=>t.parentRule,"optionalAccess",t=>t.parentStyleSheet]),e,r.styleMirror);return(c&&-1!==c||u&&-1!==u)&&t({id:c,styleId:u,remove:{property:l},index:ue(i.parentRule)}),o.apply(i,a)}))}),ee((()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=s}))}(t,{win:n}),f=t.collectFonts?function({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(t,e,n){const r=new i(t,e,n);return o.set(r,{family:t,buffer:"string"!=typeof e,descriptors:n,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),r};const s=kt(e.fonts,"add",(function(e){return function(n){return setTimeout(ee((()=>{const e=o.get(n);e&&(t(e),o.delete(n))})),0),e.apply(this,[n])}}));return r.push((()=>{n.FontFace=i})),r.push(s),ee((()=>{r.forEach((t=>t()))}))}(t):()=>{},p=function(t){const{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,selectionCb:s}=t;let a=!0;const l=ee((()=>{const t=e.getSelection();if(!t||a&&ne([t,"optionalAccess",t=>t.isCollapsed]))return;a=t.isCollapsed||!1;const l=[],c=t.rangeCount||0;for(let e=0;e{}}(t),m=[];for(const e of t.plugins)m.push(e.observer(e.callback,n,e.options));return ee((()=>{re.forEach((t=>t.reset())),r.disconnect(),o(),i(),s(),a(),l(),c(),u(),d(),h(),f(),p(),g(),m.forEach((t=>t()))}))}function pe(t){return void 0!==window[t]}function ge(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class me{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,e,n,r){const o=n||this.getIdToRemoteIdMap(t),i=r||this.getRemoteIdToIdMap(t);let s=o.get(e);return s||(s=this.generateIdFn(),o.set(e,s),i.set(s,e)),s}getIds(t,e){const n=this.getIdToRemoteIdMap(t),r=this.getRemoteIdToIdMap(t);return e.map((e=>this.getId(t,e,n,r)))}getRemoteId(t,e,n){const r=n||this.getRemoteIdToIdMap(t);if("number"!=typeof e)return e;return r.get(e)||-1}getRemoteIds(t,e){const n=this.getRemoteIdToIdMap(t);return e.map((e=>this.getRemoteId(t,e,n)))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){let e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}function ye(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}class ve{constructor(){this.crossOriginIframeMirror=new me(X),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class be{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new me(X),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new me(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),ye([this,"access",t=>t.loadListener,"optionalCall",e=>e(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const e=t;if("rrweb"!==e.data.type||e.origin!==e.data.origin)return;if(!t.source)return;const n=this.crossOriginIframeMap.get(t.source);if(!n)return;const r=this.transformCrossOriginEvent(n,e.data.event);r&&this.wrappedEmit(r,e.data.isCheckout)}transformCrossOriginEvent(t,e){switch(e.type){case Nt.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);const n=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(e.data.node,n),{timestamp:e.timestamp,type:Nt.IncrementalSnapshot,data:{source:Bt.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Nt.Meta:case Nt.Load:case Nt.DomContentLoaded:return!1;case Nt.Plugin:return e;case Nt.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case Nt.IncrementalSnapshot:switch(e.data.source){case Bt.Mutation:return e.data.adds.forEach((e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);const n=this.crossOriginIframeRootIdMap.get(t);n&&this.patchRootIdOnNode(e.node,n)})),e.data.removes.forEach((e=>{this.replaceIds(e,t,["parentId","id"])})),e.data.attributes.forEach((e=>{this.replaceIds(e,t,["id"])})),e.data.texts.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case Bt.Drag:case Bt.TouchMove:case Bt.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case Bt.ViewportResize:return!1;case Bt.MediaInteraction:case Bt.MouseInteraction:case Bt.Scroll:case Bt.CanvasMutation:case Bt.Input:return this.replaceIds(e.data,t,["id"]),e;case Bt.StyleSheetRule:case Bt.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case Bt.Font:return e;case Bt.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case Bt.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),ye([e,"access",t=>t.data,"access",t=>t.styles,"optionalAccess",t=>t.forEach,"call",e=>e((e=>{this.replaceStyleIds(e,t,["styleId"])}))]),e}}return!1}replace(t,e,n,r){for(const o of r)(Array.isArray(e[o])||"number"==typeof e[o])&&(Array.isArray(e[o])?e[o]=t.getIds(n,e[o]):e[o]=t.getId(n,e[o]));return e}replaceIds(t,e,n){return this.replace(this.crossOriginIframeMirror,t,e,n)}replaceStyleIds(t,e,n){return this.replace(this.crossOriginIframeStyleMirror,t,e,n)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach((t=>{this.replaceIdOnNode(t,e)}))}patchRootIdOnNode(t,e){t.type===D.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}}class xe{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class we{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){if(!N(t))return;if(this.shadowDoms.has(t))return;this.shadowDoms.add(t);const n=ie({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(se({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout((()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(he({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))}),0)}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){const n=this;this.restoreHandlers.push(kt(t.prototype,"attachShadow",(function(t){return function(r){const o=t.call(this,r);return this.shadowRoot&&Ft(this)&&n.addShadowRoot(this.shadowRoot,e),o}})))}reset(){this.restoreHandlers.forEach((t=>{try{t()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class ke{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class Se{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new _t,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){if(0===t.length)return;const n={id:e,styleIds:[]},r=[];for(const e of t){let t;this.styleMirror.has(e)?t=this.styleMirror.getId(e):(t=this.styleMirror.add(e),r.push({styleId:t,rules:Array.from(e.rules||CSSRule,((t,e)=>({rule:z(t),index:e})))})),n.styleIds.push(t)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Ce{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){!function(...t){(function(){if(St)return St;const t=window.document;let e=window.requestAnimationFrame;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.requestAnimationFrame&&(e=r.requestAnimationFrame),t.head.removeChild(n)}catch(t){}return St=e.bind(window)})()(...t)}((()=>{this.clear(),this.loop&&this.periodicallyClear()}))}inOtherBuffer(t,e){const n=this.nodeMap.get(t);return n&&Array.from(n).some((t=>t!==e))}add(t,e){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}function Ae(t){const e=t;return e.timestamp=Ct(),e}let Ee;const Te=new V;function Pe(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:o,blockClass:i="rr-block",blockSelector:s=null,unblockSelector:a=null,ignoreClass:l="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:h=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:g=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:v,maskAttributeFn:b,maskInputFn:x,maskTextFn:w,packFn:k,sampling:S={},dataURLOptions:C={},mousemoveWait:A,recordCanvas:E=!1,recordCrossOriginIframes:T=!1,recordAfter:O=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:R=!1,collectFonts:I=!1,inlineImages:M=!1,plugins:L,keepIframeSrcFn:j=()=>!1,ignoreCSSAttributes:_=new Set([]),errorHandler:D,onMutation:F,getCanvasManager:N}=t;Qt(D);const B=!T||window.parent===window;let z=!1;if(!B)try{window.parent.document&&(z=!1)}catch(t){z=!0}if(B&&!e)throw new Error("emit function is required");void 0!==A&&void 0===S.mousemove&&(S.mousemove=A),Te.reset();const $=!0===m?{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}:void 0!==y?y:{},W=!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===v,headMetaDescKeywords:"all"===v}:v||{};let U;!function(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let e=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1})}();let H=0;const q=t=>{for(const e of L||[])e.eventProcessor&&(t=e.eventProcessor(t));return k&&!z&&(t=k(t)),t},G=(t,i)=>{if(!r([re,"access",t=>t[0],"optionalAccess",t=>t.isFrozen,"call",t=>t()])||t.type===Nt.FullSnapshot||t.type===Nt.IncrementalSnapshot&&t.data.source===Bt.Mutation||re.forEach((t=>t.unfreeze())),B)r([e,"optionalCall",e=>e(q(t),i)]);else if(z){const e={type:"rrweb",event:q(t),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,"*")}if(t.type===Nt.FullSnapshot)U=t,H=0;else if(t.type===Nt.IncrementalSnapshot){if(t.data.source===Bt.Mutation&&t.data.isAttachIframe)return;H++;const e=o&&H>=o,r=n&&t.timestamp-U.timestamp>n;(e||r)&&nt(!0)}},Y=t=>{G(Ae({type:Nt.IncrementalSnapshot,data:{source:Bt.Mutation,...t}}))},Z=t=>G(Ae({type:Nt.IncrementalSnapshot,data:{source:Bt.Scroll,...t}})),K=t=>G(Ae({type:Nt.IncrementalSnapshot,data:{source:Bt.CanvasMutation,...t}})),X=new Se({mutationCb:Y,adoptedStyleSheetCb:t=>G(Ae({type:Nt.IncrementalSnapshot,data:{source:Bt.AdoptedStyleSheet,...t}}))}),J="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new ve:new be({mirror:Te,mutationCb:Y,stylesheetManager:X,recordCrossOriginIframes:T,wrappedEmit:G});for(const t of L||[])t.getMirror&&t.getMirror({nodeMirror:Te,crossOriginIframeMirror:J.crossOriginIframeMirror,crossOriginIframeStyleMirror:J.crossOriginIframeStyleMirror});const Q=new Ce,tt=function(t,e){try{return t?t(e):new ke}catch(t){return P.warn("Unable to initialize CanvasManager"),new ke}}(N,{mirror:Te,win:window,mutationCb:t=>G(Ae({type:Nt.IncrementalSnapshot,data:{source:Bt.CanvasMutation,...t}})),recordCanvas:E,blockClass:i,blockSelector:s,unblockSelector:a,sampling:S.canvas,dataURLOptions:C,errorHandler:D}),et="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new xe:new we({mutationCb:Y,scrollCb:Z,bypassOptions:{onMutation:F,blockClass:i,blockSelector:s,unblockSelector:a,maskAllText:u,maskTextClass:d,unmaskTextClass:h,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:g,maskInputOptions:$,dataURLOptions:C,maskAttributeFn:b,maskTextFn:w,maskInputFn:x,recordCanvas:E,inlineImages:M,sampling:S,slimDOMOptions:W,iframeManager:J,stylesheetManager:X,canvasManager:tt,keepIframeSrcFn:j,processedNodeManager:Q},mirror:Te}),nt=(t=!1)=>{G(Ae({type:Nt.Meta,data:{href:window.location.href,width:Tt(),height:Et()}}),t),X.reset(),et.init(),re.forEach((t=>t.lock()));const e=function(t,e){const{mirror:n=new V,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:i=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:c=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:h=!1,recordCanvas:f=!1,maskAllInputs:p=!1,maskAttributeFn:g,maskTextFn:m,maskInputFn:y,slimDOM:v=!1,dataURLOptions:b,preserveWhiteSpace:x,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:C,stylesheetLoadTimeout:A,keepIframeSrcFn:E=()=>!1}=e||{};return gt(t,{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:a,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===p?{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}:!1===p?{}:p,maskAttributeFn:g,maskTextFn:m,maskInputFn:y,slimDOMOptions:!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===v,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===v?{}:v,dataURLOptions:b,inlineImages:h,recordCanvas:f,preserveWhiteSpace:x,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:C,stylesheetLoadTimeout:A,keepIframeSrcFn:E,newlyAddedElement:!1})}(document,{mirror:Te,blockClass:i,blockSelector:s,unblockSelector:a,maskAllText:u,maskTextClass:d,unmaskTextClass:h,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:g,maskAllInputs:$,maskAttributeFn:b,maskInputFn:x,maskTextFn:w,slimDOM:W,dataURLOptions:C,recordCanvas:E,inlineImages:M,onSerialize:t=>{Mt(t,Te)&&J.addIframe(t),Lt(t,Te)&&X.trackLinkElement(t),jt(t)&&et.addShadowRoot(t.shadowRoot,document)},onIframeLoad:(t,e)=>{J.attachIframe(t,e),et.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{X.attachLinkElement(t,e)},keepIframeSrcFn:j});if(!e)return P.warn("Failed to snapshot the document");G(Ae({type:Nt.FullSnapshot,data:{node:e,initialOffset:At(window)}})),re.forEach((t=>t.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&X.adoptStyleSheets(document.adoptedStyleSheets,Te.getId(document))};Ee=nt;try{const t=[],e=t=>ee(fe)({onMutation:F,mutationCb:Y,mousemoveCb:(t,e)=>G(Ae({type:Nt.IncrementalSnapshot,data:{source:e,positions:t}})),mouseInteractionCb:t=>G(Ae({type:Nt.IncrementalSnapshot,data:{source:Bt.MouseInteraction,...t}})),scrollCb:Z,viewportResizeCb:t=>G(Ae({type:Nt.IncrementalSnapshot,data:{source:Bt.ViewportResize,...t}})),inputCb:t=>G(Ae({type:Nt.IncrementalSnapshot,data:{source:Bt.Input,...t}})),mediaInteractionCb:t=>G(Ae({type:Nt.IncrementalSnapshot,data:{source:Bt.MediaInteraction,...t}})),styleSheetRuleCb:t=>G(Ae({type:Nt.IncrementalSnapshot,data:{source:Bt.StyleSheetRule,...t}})),styleDeclarationCb:t=>G(Ae({type:Nt.IncrementalSnapshot,data:{source:Bt.StyleDeclaration,...t}})),canvasMutationCb:K,fontCb:t=>G(Ae({type:Nt.IncrementalSnapshot,data:{source:Bt.Font,...t}})),selectionCb:t=>{G(Ae({type:Nt.IncrementalSnapshot,data:{source:Bt.Selection,...t}}))},customElementCb:t=>{G(Ae({type:Nt.IncrementalSnapshot,data:{source:Bt.CustomElement,...t}}))},blockClass:i,ignoreClass:l,ignoreSelector:c,maskAllText:u,maskTextClass:d,unmaskTextClass:h,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:$,inlineStylesheet:g,sampling:S,recordCanvas:E,inlineImages:M,userTriggeredOnInput:R,collectFonts:I,doc:t,maskAttributeFn:b,maskInputFn:x,maskTextFn:w,keepIframeSrcFn:j,blockSelector:s,unblockSelector:a,slimDOMOptions:W,dataURLOptions:C,mirror:Te,iframeManager:J,stylesheetManager:X,shadowDomManager:et,processedNodeManager:Q,canvasManager:tt,ignoreCSSAttributes:_,plugins:r([L,"optionalAccess",t=>t.filter,"call",t=>t((t=>t.observer)),"optionalAccess",t=>t.map,"call",t=>t((t=>({observer:t.observer,options:t.options,callback:e=>G(Ae({type:Nt.Plugin,data:{plugin:t.name,payload:e}}))})))])||[]},{});J.addLoadListener((n=>{try{t.push(e(n.contentDocument))}catch(t){P.warn(t)}}));const n=()=>{nt(),t.push(e(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(t.push(yt("DOMContentLoaded",(()=>{G(Ae({type:Nt.DomContentLoaded,data:{}})),"DOMContentLoaded"===O&&n()}))),t.push(yt("load",(()=>{G(Ae({type:Nt.Load,data:{}})),"load"===O&&n()}),window))),()=>{t.forEach((t=>t())),Q.destroy(),Ee=void 0,te()}}catch(t){P.warn(t)}}function Oe(t){return t>9999999999?t:1e3*t}function Re(t){return t>9999999999?t/1e3:t}function Ie(t,e){"sentry.transaction"!==e.category&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate((()=>(t.throttledAddEvent({type:Nt.Custom,timestamp:1e3*(e.timestamp||0),data:{tag:"breadcrumb",payload:(0,h.Fv)(e,10,1e3)}}),"console"===e.category))))}function Me(t){return t.closest("button,a")||t}function Le(t){const e=je(t);return e&&e instanceof Element?Me(e):e}function je(t){return function(t){return"object"==typeof t&&!!t&&"target"in t}(t)?t.target:t}let _e;Pe.mirror=Te,Pe.takeFullSnapshot=function(t){if(!Ee)throw new Error("please take full snapshot after start recording");Ee(t)};class De{constructor(t,e,n=Ie){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=e.timeout/1e3,this._threshold=e.threshold/1e3,this._scollTimeout=e.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=e.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const t=(e=()=>{this._lastMutation=Ne()},_e||(_e=[],(0,f.hl)(O,"open",(function(t){return function(...e){if(_e)try{_e.forEach((t=>t()))}catch(t){}return t.apply(O,e)}}))),_e.push(e),()=>{const t=_e?_e.indexOf(e):-1;t>-1&&_e.splice(t,1)});var e;this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,e){if(function(t,e){return!Fe.includes(t.tagName)||("INPUT"===t.tagName&&!["submit","button"].includes(t.getAttribute("type")||"")||(!("A"!==t.tagName||!(t.hasAttribute("download")||t.hasAttribute("target")&&"_self"!==t.getAttribute("target")))||!(!e||!t.matches(e))))}(e,this._ignoreSelector)||!function(t){return!(!t.data||"number"!=typeof t.data.nodeId||!t.timestamp)}(t))return;const n={timestamp:Re(t.timestamp),clickBreadcrumb:t,clickCount:0,node:e};this._clicks.some((t=>t.node===n.node&&Math.abs(t.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Re(t)}registerScroll(t=Date.now()){this._lastScroll=Re(t)}registerClick(t){const e=Me(t);this._handleMultiClick(e)}_handleMultiClick(t){this._getClicks(t).forEach((t=>{t.clickCount++}))}_getClicks(t){return this._clicks.filter((e=>e.node===t))}_checkClicks(){const t=[],e=Ne();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<=e&&t.push(n)}));for(const e of t){const t=this._clicks.indexOf(e);t>-1&&(this._generateBreadcrumbs(e),this._clicks.splice(t,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const e=this._replay,n=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,r=t.mutationAfter&&t.mutationAfter<=this._threshold,o=!n&&!r,{clickCount:i,clickBreadcrumb:s}=t;if(o){const n=1e3*Math.min(t.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",o={type:"default",message:s.message,timestamp:s.timestamp,category:"ui.slowClickDetected",data:{...s.data,url:O.location.href,route:e.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:i||1}};this._addBreadcrumbEvent(e,o)}else if(i>1){const t={type:"default",message:s.message,timestamp:s.timestamp,category:"ui.multiClick",data:{...s.data,url:O.location.href,route:e.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(e,t)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout((()=>this._checkClicks()),1e3)}}const Fe=["A","BUTTON","INPUT"];function Ne(){return Date.now()/1e3}function Be(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var ze;!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(ze||(ze={}));const Ve=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function $e(t){const e={};for(const n in t)if(Ve.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),e[r]=t[n]}return e}function We(t,e){const n=Pe.mirror.getId(t),r=n&&Pe.mirror.getNode(n),o=r&&Pe.mirror.getMeta(r),i=o&&function(t){return t.type===ze.Element}(o)?o:null;return{message:e,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map((t=>t.type===ze.Text&&t.textContent)).filter(Boolean).map((t=>t.trim())).join(""),attributes:$e(i.attributes)}}:{}}}const Ue={resource:function(t){const{entryType:e,initiatorType:n,name:r,responseEnd:o,startTime:i,decodedBodySize:s,encodedBodySize:a,responseStatus:l,transferSize:c}=t;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${e}.${n}`,start:qe(i),end:qe(o),name:r,data:{size:c,statusCode:l,decodedBodySize:s,encodedBodySize:a}}},paint:function(t){const{duration:e,entryType:n,name:r,startTime:o}=t,i=qe(o);return{type:n,name:r,start:i,end:i+e,data:void 0}},navigation:function(t){const{entryType:e,name:n,decodedBodySize:r,duration:o,domComplete:i,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:c,loadEventStart:u,loadEventEnd:d,redirectCount:h,startTime:f,transferSize:p,type:g}=t;return 0===o?null:{type:`${e}.${g}`,start:qe(f),end:qe(i),name:n,data:{size:p,decodedBodySize:r,encodedBodySize:s,duration:o,domInteractive:c,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:u,loadEventEnd:d,domComplete:i,redirectCount:h}}}};function He(t){return Ue[t.entryType]?Ue[t.entryType](t):null}function qe(t){return((g.Z1||O.performance.timeOrigin)+t)/1e3}const Ge="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function Ye(t,e){Ge&&(m.kg.info(t),e&&Ke(t))}function Ze(t,e){Ge&&(m.kg.info(t),e&&setTimeout((()=>{Ke(t)}),0))}function Ke(t){(0,o.n_)({category:"console",data:{logger:"replay"},level:"info",message:t},{level:"info"})}class Xe extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class Je{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const e=JSON.stringify(t).length;if(this._totalSize+=e,this._totalSize>j)throw new Xe;this.events.push(t)}finish(){return new Promise((t=>{const e=this.events;this.clear(),t(JSON.stringify(e))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map((t=>t.timestamp)).sort()[0];return t?Oe(t):null}}class Qe{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((t,e)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?t():e()}),{once:!0}),this._worker.addEventListener("error",(t=>{e(t)}),{once:!0})}))),this._ensureReadyPromise}destroy(){Ye("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,e){const n=this._getAndIncrementId();return new Promise(((r,o)=>{const i=({data:e})=>{const s=e;if(s.method===t&&s.id===n){if(this._worker.removeEventListener("message",i),!s.success)return Ge&&m.kg.error("[Replay]",s.response),void o(new Error("Error in compression worker"));r(s.response)}};this._worker.addEventListener("message",i),this._worker.postMessage({id:n,method:t,arg:e})}))}_getAndIncrementId(){return this._id++}}class tn{constructor(t){this._worker=new Qe(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const e=Oe(t.timestamp);(!this._earliestTimestamp||ej?Promise.reject(new Xe):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,(t=>{Ge&&m.kg.warn('[Replay] Sending "clear" message to worker failed',t)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class en{constructor(t){this._fallback=new Je,this._compression=new tn(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){return void Ye("[Replay] Failed to load the compression worker, falling back to simple buffer")}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:e}=this._fallback,n=[];for(const e of t)n.push(this._compression.addEvent(e));this._compression.hasCheckout=e,this._used=this._compression;try{await Promise.all(n)}catch(t){Ge&&m.kg.warn("[Replay] Failed to add events when switching buffers.",t)}}}function nn(){try{return"sessionStorage"in O&&!!O.sessionStorage}catch(t){return!1}}function rn(t){return void 0!==t&&Math.random()t.getContext().initialTimestamp+t.getOptions().maxReplayDuration&&(Ye(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,t.getOptions()._experiments.traceInternals),1))}function gn(t){return!t.type}function mn(t){return"transaction"===t.type}function yn(t){return"feedback"===t.type}function vn(t){const e=function(){const t=(0,o.s3)();if(!t)return!1;const e=t.getTransport();return e&&e.send.__sentry__baseTransport__||!1}();return(n,r)=>{if(!t.isEnabled()||!gn(n)&&!mn(n))return;const o=r&&r.statusCode;e&&(!o||o<200||o>=300)||(mn(n)?function(t,e){const n=t.getContext();e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(e.contexts.trace.trace_id)}(t,n):function(t,e){const n=t.getContext();if(e.event_id&&n.errorIds.size<100&&n.errorIds.add(e.event_id),"buffer"!==t.recordingMode||!e.tags||!e.tags.replayId)return;const{beforeErrorSampling:r}=t.getOptions();("function"!=typeof r||r(e))&&setTimeout((()=>{t.sendBufferedReplayOrFlush()}))}(t,n))}}function bn(t,e){return e.map((({type:e,start:n,end:r,name:o,data:i})=>{const s=t.throttledAddEvent({type:Nt.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:e,description:o,startTimestamp:n,endTimestamp:r,data:i}}});return"string"==typeof s?Promise.resolve(null):s}))}function xn(t,e){t.isEnabled()&&null!==e&&(function(t,e){return(!Ge||!t.getOptions()._experiments.traceInternals)&&function(t,e){const n=e&&function(t){return void 0!==t.getClient}(e)?e.getClient():e,r=n&&n.getDsn(),o=n&&n.getOptions().tunnel;return function(t,e){return!!e&&t.includes(e.host)}(t,r)||function(t,e){return!!e&&i(t)===i(e)}(t,o)}(e,(0,o.s3)())}(t,e.name)||t.addUpdate((()=>(bn(t,[e]),!0))))}function wn(t,e){if(t)try{if("string"==typeof t)return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=On(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch(t){}}function kn(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function Sn(t){try{if("string"==typeof t)return[t];if(t instanceof URLSearchParams)return[t.toString()];if(t instanceof FormData)return[On(t)];if(!t)return[void 0]}catch(e){return Ge&&m.kg.warn("[Replay] Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return Ge&&m.kg.info("[Replay] Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Cn(t,e){if(!t)return{headers:{},size:void 0,_meta:{warnings:[e]}};const n={...t._meta},r=n.warnings||[];return n.warnings=[...r,e],t._meta=n,t}function An(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:i,statusCode:s,request:a,response:l}=e;return{type:t,start:n/1e3,end:r/1e3,name:o,data:(0,f.Jr)({method:i,statusCode:s,request:a,response:l})}}function En(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function Tn(t,e,n){if(!e&&0===Object.keys(t).length)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const r={headers:t,size:e},{body:o,warnings:i}=function(t){if(!t||"string"!=typeof t)return{body:t};const e=t.length>M,n=function(t){const e=t[0],n=t[t.length-1];return"["===e&&"]"===n||"{"===e&&"}"===n}(t);if(e){const e=t.slice(0,M);return n?{body:e,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${e}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(t)}}catch(t){}return{body:t}}(n);return r.body=o,i&&i.length>0&&(r._meta={warnings:i}),r}function Pn(t,e){return Object.keys(t).reduce(((n,r)=>{const o=r.toLowerCase();return e.includes(o)&&t[r]&&(n[o]=t[r]),n}),{})}function On(t){return new URLSearchParams(t).toString()}function Rn(t,e){const n=function(t,e=O.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(O.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const r=n.href;return!t.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}(t);return(0,b.U0)(n,e)}function In(t=[]){if(2===t.length&&"object"==typeof t[1])return t[1].body}function Mn(t,e){const n={};return e.forEach((e=>{t.get(e)&&(n[e]=t.get(e))})),n}function Ln(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?Mn(n,e):Array.isArray(n)?{}:Pn(n,e):{}}function jn(t){const e=(0,o.s3)();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:o,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:a}=t.getOptions(),l={replay:t,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:o,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:a};e&&e.on?e.on("beforeAddBreadcrumb",((t,e)=>function(t,e,n){if(e.data)try{(function(t){return"xhr"===t.category})(e)&&function(t){return t&&t.xhr}(n)&&(function(t,e,n){const{xhr:r,input:o}=e;if(!r)return;const i=wn(o,n.textEncoder),s=r.getResponseHeader("content-length")?kn(r.getResponseHeader("content-length")):function(t,e,n){try{return wn("json"===e&&t&&"object"==typeof t?JSON.stringify(t):t,n)}catch(t){return}}(r.response,r.responseType,n.textEncoder);void 0!==i&&(t.data.request_body_size=i),void 0!==s&&(t.data.response_body_size=s)}(e,n,t),async function(t,e,n){try{const r=function(t,e,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r,input:s,xhr:a}=e,{url:l,method:c,status_code:u=0,request_body_size:d,response_body_size:h}=t.data;if(!l)return null;if(!a||!Rn(l,n.networkDetailAllowUrls)||Rn(l,n.networkDetailDenyUrls))return{startTimestamp:o,endTimestamp:i,url:l,method:c,statusCode:u,request:En(d),response:En(h)};const f=a[v.xU],p=f?Pn(f.request_headers,n.networkRequestHeaders):{},g=Pn(function(t){const e=t.getAllResponseHeaders();return e?e.split("\r\n").reduce(((t,e)=>{const[n,r]=e.split(": ");return t[n.toLowerCase()]=r,t}),{}):{}}(a),n.networkResponseHeaders),[y,b]=n.networkCaptureBodies?Sn(s):[void 0],[x,w]=n.networkCaptureBodies?function(t){const e=[];try{return[t.responseText]}catch(t){e.push(t)}try{return function(t,e){try{if("string"==typeof t)return[t];if(t instanceof Document)return[t.body.outerHTML];if("json"===e&&t&&"object"==typeof t)return[JSON.stringify(t)];if(!t)return[void 0]}catch(e){return Ge&&m.kg.warn("[Replay] Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return Ge&&m.kg.info("[Replay] Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}(t.response,t.responseType)}catch(t){e.push(t)}return Ge&&m.kg.warn("[Replay] Failed to get xhr response body",...e),[void 0]}(a):[void 0],k=Tn(p,d,y),S=Tn(g,h,x);return{startTimestamp:o,endTimestamp:i,url:l,method:c,statusCode:u,request:b?Cn(k,b):k,response:w?Cn(S,w):S}}(t,e,n),o=An("resource.xhr",r);xn(n.replay,o)}catch(t){Ge&&m.kg.error("[Replay] Failed to capture xhr breadcrumb",t)}}(e,n,t)),function(t){return"fetch"===t.category}(e)&&function(t){return t&&t.response}(n)&&(function(t,e,n){const{input:r,response:o}=e,i=wn(r?In(r):void 0,n.textEncoder),s=o?kn(o.headers.get("content-length")):void 0;void 0!==i&&(t.data.request_body_size=i),void 0!==s&&(t.data.response_body_size=s)}(e,n,t),async function(t,e,n){try{const r=await async function(t,e,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r}=e,{url:s,method:a,status_code:l=0,request_body_size:c,response_body_size:u}=t.data,d=Rn(s,n.networkDetailAllowUrls)&&!Rn(s,n.networkDetailDenyUrls),h=d?function({networkCaptureBodies:t,networkRequestHeaders:e},n,r){const o=n?(s=e,1===(i=n).length&&"string"!=typeof i[0]?Ln(i[0],s):2===i.length?Ln(i[1],s):{}):{};var i,s;if(!t)return Tn(o,r,void 0);const a=In(n),[l,c]=Sn(a),u=Tn(o,r,l);return c?Cn(u,c):u}(n,e.input,c):En(c),f=await async function(t,{networkCaptureBodies:e,textEncoder:n,networkResponseHeaders:r},o,i){if(!t&&void 0!==i)return En(i);const s=o?Mn(o.headers,r):{};if(!o||!e&&void 0!==i)return Tn(s,i,void 0);const[a,l]=await async function(t){const e=function(t){try{return t.clone()}catch(t){Ge&&m.kg.warn("[Replay] Failed to clone response body",t)}}(t);if(!e)return[void 0,"BODY_PARSE_ERROR"];try{const t=await function(t){return new Promise(((e,n)=>{const r=setTimeout((()=>n(new Error("Timeout while trying to read response body"))),500);(async function(t){return await t.text()})(t).then((t=>e(t)),(t=>n(t))).finally((()=>clearTimeout(r)))}))}(e);return[t]}catch(t){return Ge&&m.kg.warn("[Replay] Failed to get text body from response",t),[void 0,"BODY_PARSE_ERROR"]}}(o),c=function(t,{networkCaptureBodies:e,textEncoder:n,responseBodySize:r,captureDetails:o,headers:i}){try{const s=t&&t.length&&void 0===r?wn(t,n):r;return o?Tn(i,s,e?t:void 0):En(s)}catch(t){return Ge&&m.kg.warn("[Replay] Failed to serialize response body",t),Tn(i,r,void 0)}}(a,{networkCaptureBodies:e,textEncoder:n,responseBodySize:i,captureDetails:t,headers:s});return l?Cn(c,l):c}(d,n,e.response,u);return{startTimestamp:o,endTimestamp:i,url:s,method:a,statusCode:l,request:h,response:f}}(t,e,n),o=An("resource.fetch",r);xn(n.replay,o)}catch(t){Ge&&m.kg.error("[Replay] Failed to capture fetch breadcrumb",t)}}(e,n,t))}catch(t){Ge&&m.kg.warn("Error when enriching network breadcrumb")}}(l,t,e))):((0,x.U)(function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,fetchData:r,response:o}=t;if(!n)return null;const{method:i,url:s}=r;return{type:"resource.fetch",start:e/1e3,end:n/1e3,name:s,data:{method:i,statusCode:o?o.status:void 0}}}(e);xn(t,n)}}(t)),(0,v.UK)(function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,xhr:r}=t,o=r[v.xU];if(!e||!n||!o)return null;const{method:i,url:s,status_code:a}=o;return void 0===s?null:{type:"resource.xhr",name:s,start:e/1e3,end:n/1e3,data:{method:i,statusCode:a}}}(e);xn(t,n)}}(t)))}catch(t){}}let _n=null;function Dn(t){return!(!t||!t.on)}function Fn(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Nn(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession())return void(Ge&&m.kg.warn("[Replay] Received replay event after session expired."));const o=r||!e;e=!0,t.clickDetector&&function(t,e){try{if(!function(t){return 3===t.type}(e))return;const{source:n}=e.data;if(n===Bt.Mutation&&t.registerMutation(e.timestamp),n===Bt.Scroll&&t.registerScroll(e.timestamp),function(t){return t.data.source===Bt.MouseInteraction}(e)){const{type:n,id:r}=e.data,o=Pe.mirror.getNode(r);o instanceof HTMLElement&&n===zt.Click&&t.registerClick(o)}}catch(t){}}(t.clickDetector,n),t.addUpdate((()=>{if("buffer"===t.recordingMode&&o&&t.setInitialState(),!hn(t,n,o))return!0;if(!o)return!1;if(function(t,e){e&&t.session&&0===t.session.segmentId&&hn(t,function(t){const e=t.getOptions();return{type:Nt.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:t.isRecordingCanvas(),sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:!!t.eventBuffer&&"worker"===t.eventBuffer.type,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}(t),!1)}(t,o),t.session&&t.session.previousSessionId)return!0;if("buffer"===t.recordingMode&&t.session&&t.eventBuffer){const e=t.eventBuffer.getEarliestTimestamp();e&&(Ye(`[Replay] Updating session start time to earliest event in buffer to ${new Date(e)}`,t.getOptions()._experiments.traceInternals),t.session.started=e,t.getOptions().stickySession&&sn(t.session))}return"session"===t.recordingMode&&t.flush(),!0}))}}function Bn(t,e,n,r){return(0,S.Jd)((0,S.Cd)(t,(0,S.HY)(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:"string"==typeof e?(new TextEncoder).encode(e).length:e.length},e]])}class zn extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Vn extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function $n(t,e={count:0,interval:5e3}){const{recordingData:n,options:r}=t;if(n.length)try{return await async function({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:i,session:s}){const c=function({recordingData:t,headers:e}){let n;const r=`${JSON.stringify(e)}\n`;if("string"==typeof t)n=`${r}${t}`;else{const e=(new TextEncoder).encode(r);n=new Uint8Array(e.length+t.length),n.set(e),n.set(t,e.length)}return n}({recordingData:t,headers:{segment_id:n}}),{urls:u,errorIds:d,traceIds:h,initialTimestamp:f}=r,p=(0,o.s3)(),g=(0,o.nZ)(),m=p&&p.getTransport(),y=p&&p.getDsn();if(!(p&&m&&y&&s.sampled))return;const v={type:"replay_event",replay_start_timestamp:f/1e3,timestamp:i/1e3,error_ids:d,trace_ids:h,urls:u,replay_id:e,segment_id:n,replay_type:s.sampled},b=await async function({client:t,scope:e,replayId:n,event:r}){const o={event_id:n,integrations:"object"!=typeof t._integrations||null===t._integrations||Array.isArray(t._integrations)?void 0:Object.keys(t._integrations)};t.emit&&t.emit("preprocessEvent",r,o);const i=await(0,a.R)(t.getOptions(),r,o,e,t,(0,l.aF)());if(!i)return null;i.platform=i.platform||"javascript";const s=t.getSdkMetadata&&t.getSdkMetadata(),{name:c,version:u}=s&&s.sdk||{};return i.sdk={...i.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0"},i}({scope:g,client:p,replayId:e,event:v});if(!b)return p.recordDroppedEvent("event_processor","replay",v),void Ye("An event processor returned `null`, will not send event.");delete b.sdkProcessingMetadata;const x=Bn(b,c,y,p.getOptions().tunnel);let w;try{w=await m.send(x)}catch(t){const e=new Error(I);try{e.cause=t}catch(t){}throw e}if(!w)return w;if("number"==typeof w.statusCode&&(w.statusCode<200||w.statusCode>=300))throw new zn(w.statusCode);const k=(0,C.WG)({},w);if((0,C.Q)(k,"replay"))throw new Vn(k);return w}(t),!0}catch(n){if(n instanceof zn||n instanceof Vn)throw n;if((0,o.v)("Replays",{_retryCount:e.count}),Ge&&r._experiments&&r._experiments.captureExceptions&&(0,o.Tb)(n),e.count>=3){const t=new Error(`${I} - max retries exceeded`);try{t.cause=n}catch(t){}throw t}return e.interval*=++e.count,new Promise(((n,r)=>{setTimeout((async()=>{try{await $n(t,e),n(!0)}catch(t){r(t)}}),e.interval)}))}}const Wn="__THROTTLED";class Un{constructor({options:t,recordingOptions:e}){Un.prototype.__init.call(this),Un.prototype.__init2.call(this),Un.prototype.__init3.call(this),Un.prototype.__init4.call(this),Un.prototype.__init5.call(this),Un.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=e,this._options=t,this._debouncedFlush=function(t,e,n){let r,o,i;const s=n&&n.maxWait?Math.max(n.maxWait,e):0;function a(){return l(),r=t(),r}function l(){void 0!==o&&clearTimeout(o),void 0!==i&&clearTimeout(i),o=i=void 0}function c(){return o&&clearTimeout(o),o=setTimeout(a,e),s&&void 0===i&&(i=setTimeout(a,s)),r}return c.cancel=l,c.flush=function(){return void 0!==o||void 0!==i?a():r},c}((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=function(t,e,n){const r=new Map;let o=!1;return(...i)=>{const s=Math.floor(Date.now()/1e3);if((t=>{const e=t-n;r.forEach(((t,n)=>{nt+e),0)>=e){const t=o;return o=!0,t?"__SKIPPED":Wn}o=!1;const a=r.get(s)||0;return r.set(s,a+1),t(...i)}}(((t,e)=>function(t,e,n){return pn(t,e)?fn(t,e,n):Promise.resolve(null)}(this,t,e)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),o=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;o&&(this.clickDetector=new De(this,o))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}initializeSampling(t){const{errorSampleRate:e,sessionSampleRate:n}=this._options;e<=0&&n<=0||(this._initializeSessionForSampling(t),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",Ze(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording()):this._handleException(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)throw new Error("Replay recording is already in progress");if(this._isEnabled&&"buffer"===this.recordingMode)throw new Error("Replay buffering is in progress, call `flush()` to save the replay");Ze("[Replay] Starting replay in session mode",this._options._experiments.traceInternals);const t=dn({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");Ze("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const t=dn({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=Pe({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:Nn(this),onMutation:this._onMutationHandler,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this._handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this._handleException(t),!1}}async stop({forceFlush:t=!1,reason:e}={}){if(this._isEnabled){this._isEnabled=!1;try{Ye("[Replay] Stopping Replay"+(e?` triggered by ${e}`:""),this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,n=this,function(){if(nn())try{O.sessionStorage.removeItem(R)}catch(t){}}(),n.session=void 0}catch(t){this._handleException(t)}}var n}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Ye("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),Ye("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const e=Date.now();Ye("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const n=this.stopRecording();t&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(e),this._updateSessionActivity(e),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const e=t();"buffer"!==this.recordingMode&&!0!==e&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&ln(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const t=`${O.location.pathname}${O.location.hash}${O.location.search}`,e=`${O.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=e,this._context.initialTimestamp=Date.now(),this._context.urls.push(e)}throttledAddEvent(t,e){const n=this._throttledAddEvent(t,e);if(n===Wn){const t=Be({category:"replay.throttled"});this.addUpdate((()=>!hn(this,{type:5,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t,metric:!0}})))}return n}getCurrentRoute(){const t=this.lastTransaction||(0,o.nZ)().getTransaction(),e=(t&&(0,c.XU)(t).data||{})[u.Zj];if(t&&e&&["route","custom"].includes(e))return(0,c.XU)(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function({useCompression:t,workerUrl:e}){if(t&&window.Worker){const t=function(t){try{const e=t||("undefined"!=typeof __SENTRY_EXCLUDE_REPLAY_WORKER__&&__SENTRY_EXCLUDE_REPLAY_WORKER__?"":function(){const t=new Blob(['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]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<>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,a=0,s=new n(r);a>h]=l}else for(o=new n(i),a=0;a>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(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},A=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},_=function(r,e){for(var i=[],a=0;ad&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<e))break;p+=m-(1<>=y;p>0;){var M=o[a].s;g[M]=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(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,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+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+(X15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B255){A(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;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=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,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s>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(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),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(a[j+Q]==a[j+Q-W]){for(var $=0;$Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;Pnt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,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 a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),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(a),32768),this.s.z=n.length-a+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}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.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)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}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}(),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(r){for(var e=new t(n.length),i=0;i>1)),o=0,f=function(t){s[o++]=t};for(i=0;is.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}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(let r=0,e=t.length;r{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});']);return URL.createObjectURL(t)}());if(!e)return;Ye("[Replay] Using compression worker"+(t?` from ${t}`:""));const n=new Worker(e);return new en(n)}catch(t){Ye("[Replay] Failed to create compression worker")}}(e);if(t)return t}return Ye("[Replay] Using simple buffer"),new Je}({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(t){Ge&&m.kg.error("[Replay]",t),Ge&&this._options._experiments&&this._options._experiments.captureExceptions&&(0,o.Tb)(t)}_initializeSessionForSampling(t){const e=this._options.errorSampleRate>0,n=dn({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:e});this.session=n}_checkSession(){if(!this.session)return!1;const t=this.session;return!un(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(t),!1)}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{O.document.addEventListener("visibilitychange",this._handleVisibilityChange),O.addEventListener("blur",this._handleWindowBlur),O.addEventListener("focus",this._handleWindowFocus),O.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(function(t){const e=(0,o.nZ)(),n=(0,o.s3)();e.addScopeListener((t=>e=>{if(!t.isEnabled())return;const n=function(t){const e=t.getLastBreadcrumb&&t.getLastBreadcrumb();return _n!==e&&e?(_n=e,!e.category||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:"console"===e.category?function(t){const e=t.data&&t.data.arguments;if(!Array.isArray(e)||0===e.length)return Be(t);let n=!1;const r=e.map((t=>{if(!t)return t;if("string"==typeof t)return t.length>L?(n=!0,`${t.slice(0,L)}…`):t;if("object"==typeof t)try{const e=(0,h.Fv)(t,7);return JSON.stringify(e).length>L?(n=!0,`${JSON.stringify(e,null,2).slice(0,L)}…`):e}catch(t){}return t}));return Be({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e):Be(e)):null}(e);n&&Ie(t,n)})(t)),(0,w.O)((t=>e=>{if(!t.isEnabled())return;const n=function(t){const{target:e,message:n}=function(t){const e="click"===t.name;let n,r=null;try{r=e?Le(t.event):je(t.event),n=(0,p.Rt)(r,{maxStringLength:200})||""}catch(t){n=""}return{target:r,message:n}}(t);return Be({category:`ui.${t.name}`,...We(e,n)})}(e);if(!n)return;const r="click"===e.name,o=r?e.event:void 0;!(r&&t.clickDetector&&o&&o.target)||o.altKey||o.metaKey||o.ctrlKey||o.shiftKey||function(t,e,n){t.handleClick(e,n)}(t.clickDetector,n,Le(e.event)),Ie(t,n)})(t)),(0,k.a)(function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{from:e,to:n}=t,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}(e);null!==n&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate((()=>(bn(t,[n]),!1))))}}(t)),jn(t);const r=function(t,e=!1){const n=e?vn(t):void 0;return Object.assign(((e,r)=>{if(!t.isEnabled())return e;if(function(t){return"replay_event"===t.type}(e))return delete e.breadcrumbs,e;if(!gn(e)&&!mn(e)&&!yn(e))return e;if(!t.checkAndHandleExpiredSession())return e;if(yn(e))return t.flush(),e.contexts.feedback.replay_id=t.getSessionId(),function(t,e){t.triggerUserActivity(),t.addUpdate((()=>!e.timestamp||(t.throttledAddEvent({type:Nt.Custom,timestamp:1e3*e.timestamp,data:{tag:"breadcrumb",payload:{timestamp:e.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:e.event_id}}}}),!1)))}(t,e),e;if(function(t,e){return!(t.type||!t.exception||!t.exception.values||!t.exception.values.length||!e.originalException||!e.originalException.__rrweb__)}(e,r)&&!t.getOptions()._experiments.captureExceptions)return Ge&&m.kg.log("[Replay] Ignoring error from rrweb internals",e),null;const o=function(t,e){return"buffer"===t.recordingMode&&e.message!==I&&!(!e.exception||e.type)&&rn(t.getOptions().errorSampleRate)}(t,e);return(o||"session"===t.recordingMode)&&(e.tags={...e.tags,replayId:t.getSessionId()}),n&&n(e,{statusCode:200}),e}),{id:"Replay"})}(t,!Dn(n));n&&n.addEventProcessor?n.addEventProcessor(r):(0,s.Q)(r),Dn(n)&&(n.on("beforeSendEvent",function(t){return e=>{t.isEnabled()&&gn(e)&&function(t,e){const n=e.exception&&e.exception.values&&e.exception.values[0].value;"string"==typeof n&&(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&Ie(t,Be({category:"replay.hydrate-error"}))}(t,e)}}(t)),n.on("afterSendEvent",vn(t)),n.on("createDsc",(e=>{const n=t.getSessionId();n&&t.isEnabled()&&"session"===t.recordingMode&&t.checkAndHandleExpiredSession()&&(e.replay_id=n)})),n.on("startTransaction",(e=>{t.lastTransaction=e})),n.on("finishTransaction",(e=>{t.lastTransaction=e})),n.on("beforeSendFeedback",((e,n)=>{const r=t.getSessionId();n&&n.includeReplay&&t.isEnabled()&&r&&(t.flush(),e.contexts&&e.contexts.feedback&&(e.contexts.feedback.replay_id=r))})))}(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}this._performanceCleanupCallback=function(t){function e(e){t.performanceEntries.includes(e)||t.performanceEntries.push(e)}function n({entries:t}){t.forEach(e)}const r=[];return["navigation","paint","resource"].forEach((t=>{r.push((0,T._j)(t,n))})),r.push((0,T.$A)((({metric:e})=>{t.replayPerformanceEntries.push(function(t){const e=t.entries,n=e[e.length-1],r=n?n.element:void 0,o=t.value,i=qe(o);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:i,end:i,data:{value:o,size:o,nodeId:r?Pe.mirror.getId(r):void 0}}}(e))}))),()=>{r.forEach((t=>t()))}}(this)}_removeListeners(){try{O.document.removeEventListener("visibilitychange",this._handleVisibilityChange),O.removeEventListener("blur",this._handleWindowBlur),O.removeEventListener("focus",this._handleWindowFocus),O.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this._handleException(t)}}__init(){this._handleVisibilityChange=()=>{"visible"===O.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=Be({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=Be({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{!function(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=function(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:o,key:i,target:s}=t;if(!s||function(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable}(s)||!i)return null;const a=e||r||o,l=1===i.length;if(!a&&l)return null;const c=(0,p.Rt)(s,{maxStringLength:200})||"";return Be({category:"ui.keyDown",message:c,data:{...We(s,c).data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:o,key:i}})}(e);n&&Ie(t,n)}(this,t)}}_doChangeToBackgroundTasks(t){this.session&&(cn(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush()))}_doChangeToForegroundTasks(t){this.session&&(this.checkAndHandleExpiredSession()?t&&this._createCustomBreadcrumb(t):Ye("[Replay] Document has become active, but session has expired"))}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate((()=>{this.throttledAddEvent({type:Nt.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})}))}_addPerformanceEntries(){const t=(e=this.performanceEntries,e.map(He).filter(Boolean)).concat(this.replayPerformanceEntries);var e;return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(bn(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:e}=this;if(!t||!e)return;if(t.segmentId)return;const n=e.getEarliestTimestamp();n&&nthis._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await $n({replayId:t,recordingData:o,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:e})}catch(t){this._handleException(t),this.stop({reason:"sendReplay"});const e=(0,o.s3)();e&&e.recordDroppedEvent("send_error","replay")}}else Ge&&m.kg.error("[Replay] No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession())return void(Ge&&m.kg.error("[Replay] Attempting to finish replay event after session expired."));if(!this.session)return;const e=this.session.started,n=Date.now()-e;this._debouncedFlush.cancel();const r=nthis._options.maxReplayDuration+5e3;if(r||o)return Ye(`[Replay] Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),void(r&&this._debouncedFlush());const i=this.eventBuffer;if(i&&0===this.session.segmentId&&!i.hasCheckout&&Ye("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock)return this._flushLock=this._runFlush(),await this._flushLock,void(this._flushLock=void 0);try{await this._flushLock}catch(t){Ge&&m.kg.error(t)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&sn(this.session)}__init6(){this._onMutationHandler=t=>{const e=t.length,n=this._options.mutationLimit,r=n&&e>n;if(e>this._options.mutationBreadcrumbLimit||r){const t=Be({category:"replay.mutations",data:{count:e,limit:r}});this._createCustomBreadcrumb(t)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function Hn(t,e,n,r){const o=[...t,..."string"==typeof r?r.split(","):[],...e];return void 0!==n&&("string"==typeof n&&o.push(`.${n}`),(0,m.Cf)((()=>{P.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")}))),o.join(",")}const qn='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Gn=["content-length","content-type","accept"];let Yn=!1;const Zn=t=>new Kn(t);class Kn{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=5e3,flushMaxDelay:e=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:o=!0,useCompression:i=!0,workerUrl:s,_experiments:a={},sessionSampleRate:l,errorSampleRate:c,maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:h=!0,mutationBreadcrumbLimit:f=750,mutationLimit:p=1e4,slowClickTimeout:g=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:v=[],networkCaptureBodies:b=!0,networkRequestHeaders:x=[],networkResponseHeaders:w=[],mask:k=[],maskAttributes:S=["title","placeholder"],unmask:C=[],block:A=[],unblock:T=[],ignore:O=[],maskFn:R,beforeAddRecordingEvent:I,beforeErrorSampling:M,blockClass:L,blockSelector:j,maskInputOptions:_,maskTextClass:D,maskTextSelector:F,ignoreClass:N}={}){this.name=Kn.id;const B=function({mask:t,unmask:e,block:n,unblock:r,ignore:o,blockClass:i,blockSelector:s,maskTextClass:a,maskTextSelector:l,ignoreClass:c}){const u={maskTextSelector:Hn(t,[".sentry-mask","[data-sentry-mask]"],a,l),unmaskTextSelector:Hn(e,[".sentry-unmask","[data-sentry-unmask]"]),blockSelector:Hn(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],i,s),unblockSelector:Hn(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:Hn(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],c)};return i instanceof RegExp&&(u.blockClass=i),a instanceof RegExp&&(u.maskTextClass=a),u}({mask:k,unmask:C,block:A,unblock:T,ignore:O,blockClass:L,blockSelector:j,maskTextClass:D,maskTextSelector:F,ignoreClass:N});if(this._recordingOptions={maskAllInputs:d,maskAllText:u,maskInputOptions:{..._||{},password:!0},maskTextFn:R,maskInputFn:R,maskAttributeFn:(t,e,n)=>function({el:t,key:e,maskAttributes:n,maskAllText:r,privacyOptions:o,value:i}){return r?o.unmaskTextSelector&&t.matches(o.unmaskTextSelector)?i:n.includes(e)||"value"===e&&"INPUT"===t.tagName&&["submit","button"].includes(t.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i:i}({maskAttributes:S,maskAllText:u,privacyOptions:B,key:t,value:e,el:n}),...B,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:t=>{try{t.__rrweb__=!0}catch(t){}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:e,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,36e5),stickySession:o,sessionSampleRate:l,errorSampleRate:c,useCompression:i,workerUrl:s,blockAllMedia:h,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:p,slowClickTimeout:g,slowClickIgnoreSelectors:m,networkDetailAllowUrls:y,networkDetailDenyUrls:v,networkCaptureBodies:b,networkRequestHeaders:Xn(x),networkResponseHeaders:Xn(w),beforeAddRecordingEvent:I,beforeErrorSampling:M,_experiments:a},"number"==typeof l&&(P.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ${l} })`),this._initialOptions.sessionSampleRate=l),"number"==typeof c&&(P.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ${c} })`),this._initialOptions.errorSampleRate=c),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${qn}`:qn),this._isInitialized&&E())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Yn}set _isInitialized(t){Yn=t}setupOnce(){E()&&(this._setup(),setTimeout((()=>this._initialize())))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(t){return this._replay&&this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){const t=function(t){const e=(0,o.s3)(),n=e&&e.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...(0,f.Jr)(t)};return n?(null==t.sessionSampleRate&&null==t.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&(0,m.Cf)((()=>{P.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")})),"number"==typeof n.replaysSessionSampleRate&&(r.sessionSampleRate=n.replaysSessionSampleRate),"number"==typeof n.replaysOnErrorSampleRate&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):((0,m.Cf)((()=>{P.warn("SDK client is not available.")})),r)}(this._initialOptions);this._replay=new Un({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{const t=(0,o.s3)().getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch(t){}}}function Xn(t){return[...Gn,...t.map((t=>t.toLowerCase()))]}Kn.__initStatic()},9181:(t,e,n)=>{"use strict";n.d(e,{EN:()=>u,IQ:()=>d,bU:()=>s});var r=n(3897),o=n(7597),i=n(2343);const s="baggage",a="sentry-",l=/^sentry-/,c=8192;function u(t){if(!(0,o.HD)(t)&&!Array.isArray(t))return;let e={};if(Array.isArray(t))e=t.reduce(((t,e)=>{const n=h(e);for(const e of Object.keys(n))t[e]=n[e];return t}),{});else{if(!t)return;e=h(t)}const n=Object.entries(e).reduce(((t,[e,n])=>(e.match(l)&&(t[e.slice(a.length)]=n),t)),{});return Object.keys(n).length>0?n:void 0}function d(t){if(t)return function(t){if(0!==Object.keys(t).length)return Object.entries(t).reduce(((t,[e,n],o)=>{const s=`${encodeURIComponent(e)}=${encodeURIComponent(n)}`,a=0===o?s:`${t},${s}`;return a.length>c?(r.X&&i.kg.warn(`Not adding key: ${e} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):a}),"")}(Object.entries(t).reduce(((t,[e,n])=>(n&&(t[`${a}${e}`]=n),t)),{}))}function h(t){return t.split(",").map((t=>t.split("=").map((t=>decodeURIComponent(t.trim()))))).reduce(((t,[e,n])=>(t[e]=n,t)),{})}},8464:(t,e,n)=>{"use strict";n.d(e,{Rt:()=>s,iY:()=>u,l4:()=>l,qT:()=>c});var r=n(7597);const o=(0,n(1235).R)(),i=80;function s(t,e={}){if(!t)return"";try{let n=t;const r=5,o=[];let s=0,l=0;const c=" > ",u=c.length;let d;const h=Array.isArray(e)?e:e.keyAttrs,f=!Array.isArray(e)&&e.maxStringLength||i;for(;n&&s++1&&l+o.length*u+d.length>=f));)o.push(d),l+=d.length,n=n.parentNode;return o.reverse().join(c)}catch(t){return""}}function a(t,e){const n=t,i=[];let s,a,l,c,u;if(!n||!n.tagName)return"";if(o.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;i.push(n.tagName.toLowerCase());const d=e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(d&&d.length)d.forEach((t=>{i.push(`[${t[0]}="${t[1]}"]`)}));else if(n.id&&i.push(`#${n.id}`),s=n.className,s&&(0,r.HD)(s))for(a=s.split(/\s+/),u=0;u{"use strict";n.d(e,{X:()=>r});const r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},292:(t,e,n)=>{"use strict";n.d(e,{RA:()=>a,vK:()=>c});var r=n(3897),o=n(2343),i=n(5108);const s=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function a(t,e=!1){const{host:n,path:r,pass:o,port:i,projectId:s,protocol:a,publicKey:l}=t;return`${a}://${l}${e&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${s}`}function l(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function c(t){const e="string"==typeof t?function(t){const e=s.exec(t);if(!e)return void(0,o.Cf)((()=>{i.error(`Invalid Sentry Dsn: ${t}`)}));const[n,r,a="",c,u="",d]=e.slice(1);let h="",f=d;const p=f.split("/");if(p.length>1&&(h=p.slice(0,-1).join("/"),f=p.pop()),f){const t=f.match(/^\d+/);t&&(f=t[0])}return l({host:c,pass:a,path:h,projectId:f,port:u,protocol:n,publicKey:r})}(t):l(t);if(e&&function(t){if(!r.X)return!0;const{port:e,projectId:n,protocol:i}=t;return!(["protocol","publicKey","host","projectId"].find((e=>!t[e]&&(o.kg.error(`Invalid Sentry Dsn: ${e} missing`),!0)))||(n.match(/^\d+$/)?function(t){return"http"===t||"https"===t}(i)?e&&isNaN(parseInt(e,10))&&(o.kg.error(`Invalid Sentry Dsn: Invalid port ${e}`),1):(o.kg.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),1):(o.kg.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(e))return e}},8518:(t,e,n)=>{"use strict";function r(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}function o(){return"npm"}n.d(e,{S:()=>o,n:()=>r})},8725:(t,e,n)=>{"use strict";n.d(e,{BO:()=>a,Cd:()=>g,HY:()=>p,Jd:()=>s,V$:()=>u,gv:()=>l,mL:()=>f,zQ:()=>d});var r=n(292),o=n(8007),i=n(535);function s(t,e=[]){return[t,e]}function a(t,e){const[n,r]=t;return[n,[...r,e]]}function l(t,e){const n=t[1];for(const t of n)if(e(t,t[0].type))return!0;return!1}function c(t,e){return(e||new TextEncoder).encode(t)}function u(t,e){const[n,r]=t;let i=JSON.stringify(n);function s(t){"string"==typeof i?i="string"==typeof t?i+t:[c(i,e),t]:i.push("string"==typeof t?c(t,e):t)}for(const t of r){const[e,n]=t;if(s(`\n${JSON.stringify(e)}\n`),"string"==typeof n||n instanceof Uint8Array)s(n);else{let t;try{t=JSON.stringify(n)}catch(e){t=JSON.stringify((0,o.Fv)(n))}s(t)}}return"string"==typeof i?i:function(t){const e=t.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(i)}function d(t,e){const n="string"==typeof t.data?c(t.data,e):t.data;return[(0,i.Jr)({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const h={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",statsd:"unknown"};function f(t){return h[t]}function p(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function g(t,e,n,o){const s=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&o&&{dsn:(0,r.RA)(o)},...s&&{trace:(0,i.Jr)({...s})}}}},409:(t,e,n)=>{"use strict";n.d(e,{b:()=>r});class r extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}}},9729:(t,e,n)=>{"use strict";n.d(e,{D2:()=>c,Hj:()=>l,rK:()=>u});var r=n(3897),o=n(2343),i=n(1738);const s={},a={};function l(t,e){s[t]=s[t]||[],s[t].push(e)}function c(t,e){a[t]||(e(),a[t]=!0)}function u(t,e){const n=t&&s[t];if(n)for(const s of n)try{s(e)}catch(e){r.X&&o.kg.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${(0,i.$P)(s)}\nError:`,e)}}},5316:(t,e,n)=>{"use strict";n.d(e,{O:()=>h});var r=n(2844),o=n(535),i=n(1235),s=n(9729);const a=i.GLOBAL_OBJ,l=1e3;let c,u,d;function h(t){(0,s.Hj)("dom",t),(0,s.D2)("dom",f)}function f(){if(!a.document)return;const t=s.rK.bind(null,"dom"),e=p(t,!0);a.document.addEventListener("click",e,!1),a.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach((e=>{const n=a[e]&&a[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&((0,o.hl)(n,"addEventListener",(function(e){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this,i=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},s=i[n]=i[n]||{refCount:0};if(!s.handler){const r=p(t);s.handler=r,e.call(this,n,r,o)}s.refCount++}catch(t){}return e.call(this,n,r,o)}})),(0,o.hl)(n,"removeEventListener",(function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this,o=n.__sentry_instrumentation_handlers__||{},i=o[e];i&&(i.refCount--,i.refCount<=0&&(t.call(this,e,i.handler,r),i.handler=void 0,delete o[e]),0===Object.keys(o).length&&delete n.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,e,n,r)}})))}))}function p(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const i=function(t){try{return t.target}catch(t){return null}}(n);if(function(t,e){return"keypress"===t&&(!e||!e.tagName||"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName&&!e.isContentEditable)}(n.type,i))return;(0,o.xp)(n,"_sentryCaptured",!0),i&&!i._sentryId&&(0,o.xp)(i,"_sentryId",(0,r.DM)());const s="keypress"===n.type?"input":n.type;(function(t){if(t.type!==u)return!1;try{if(!t.target||t.target._sentryId!==d)return!1}catch(t){}return!0})(n)||(t({event:n,name:s,global:e}),u=n.type,d=i?i._sentryId:void 0),clearTimeout(c),c=a.setTimeout((()=>{d=void 0,u=void 0}),l)}}},1394:(t,e,n)=>{"use strict";n.d(e,{U:()=>a});var r=n(535),o=n(8823),i=n(1235),s=n(9729);function a(t){const e="fetch";(0,s.Hj)(e,t),(0,s.D2)(e,l)}function l(){(0,o.t$)()&&(0,r.hl)(i.GLOBAL_OBJ,"fetch",(function(t){return function(...e){const{method:n,url:r}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:u(e),method:c(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:u(e),method:c(e,"method")?String(e.method).toUpperCase():"GET"}}(e),o={args:e,fetchData:{method:n,url:r},startTimestamp:Date.now()};return(0,s.rK)("fetch",{...o}),t.apply(i.GLOBAL_OBJ,e).then((t=>{const e={...o,endTimestamp:Date.now(),response:t};return(0,s.rK)("fetch",e),t}),(t=>{const e={...o,endTimestamp:Date.now(),error:t};throw(0,s.rK)("fetch",e),t}))}}))}function c(t,e){return!!t&&"object"==typeof t&&!!t[e]}function u(t){return"string"==typeof t?t:t?c(t,"url")?t.url:t.toString?t.toString():"":""}},1674:(t,e,n)=>{"use strict";n.d(e,{V:()=>s});var r=n(1235),o=n(9729);let i=null;function s(t){const e="error";(0,o.Hj)(e,t),(0,o.D2)(e,a)}function a(){i=r.GLOBAL_OBJ.onerror,r.GLOBAL_OBJ.onerror=function(t,e,n,r,s){const a={column:r,error:s,line:n,msg:t,url:e};return(0,o.rK)("error",a),!(!i||i.__SENTRY_LOADER__)&&i.apply(this,arguments)},r.GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__=!0}},7373:(t,e,n)=>{"use strict";n.d(e,{h:()=>s});var r=n(1235),o=n(9729);let i=null;function s(t){const e="unhandledrejection";(0,o.Hj)(e,t),(0,o.D2)(e,a)}function a(){i=r.GLOBAL_OBJ.onunhandledrejection,r.GLOBAL_OBJ.onunhandledrejection=function(t){const e=t;return(0,o.rK)("unhandledrejection",e),!(i&&!i.__SENTRY_LOADER__)||i.apply(this,arguments)},r.GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}},734:(t,e,n)=>{"use strict";n.d(e,{a:()=>c});var r=n(535),o=n(1235);const i=(0,o.R)();var s=n(9729);const a=o.GLOBAL_OBJ;let l;function c(t){const e="history";(0,s.Hj)(e,t),(0,s.D2)(e,u)}function u(){if(!function(){const t=i.chrome,e=t&&t.app&&t.app.runtime,n="history"in i&&!!i.history.pushState&&!!i.history.replaceState;return!e&&n}())return;const t=a.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=l,e=String(n);l=e;const r={from:t,to:e};(0,s.rK)("history",r)}return t.apply(this,e)}}a.onpopstate=function(...e){const n=a.location.href,r=l;l=n;const o={from:r,to:n};if((0,s.rK)("history",o),t)try{return t.apply(this,e)}catch(t){}},(0,r.hl)(a.history,"pushState",e),(0,r.hl)(a.history,"replaceState",e)}},5322:(t,e,n)=>{"use strict";n.d(e,{UK:()=>c,xU:()=>l});var r=n(7597),o=n(535),i=n(1235),s=n(9729);const a=i.GLOBAL_OBJ,l="__sentry_xhr_v3__";function c(t){(0,s.Hj)("xhr",t),(0,s.D2)("xhr",u)}function u(){if(!a.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;(0,o.hl)(t,"open",(function(t){return function(...e){const n=Date.now(),i=(0,r.HD)(e[0])?e[0].toUpperCase():void 0,a=function(t){if((0,r.HD)(t))return t;try{return t.toString()}catch(t){}}(e[1]);if(!i||!a)return t.apply(this,e);this[l]={method:i,url:a,request_headers:{}},"POST"===i&&a.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const c=()=>{const t=this[l];if(t&&4===this.readyState){try{t.status_code=this.status}catch(t){}const e={args:[i,a],endTimestamp:Date.now(),startTimestamp:n,xhr:this};(0,s.rK)("xhr",e)}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?(0,o.hl)(this,"onreadystatechange",(function(t){return function(...e){return c(),t.apply(this,e)}})):this.addEventListener("readystatechange",c),(0,o.hl)(this,"setRequestHeader",(function(t){return function(...e){const[n,o]=e,i=this[l];return i&&(0,r.HD)(n)&&(0,r.HD)(o)&&(i.request_headers[n.toLowerCase()]=o),t.apply(this,e)}})),t.apply(this,e)}})),(0,o.hl)(t,"send",(function(t){return function(...e){const n=this[l];if(!n)return t.apply(this,e);void 0!==e[0]&&(n.body=e[0]);const r={args:[n.method,n.url],startTimestamp:Date.now(),xhr:this};return(0,s.rK)("xhr",r),t.apply(this,e)}}))}},7597:(t,e,n)=>{"use strict";n.d(e,{Cy:()=>y,HD:()=>c,J8:()=>m,Kj:()=>g,Le:()=>u,PO:()=>h,TX:()=>a,V9:()=>b,VW:()=>s,VZ:()=>o,cO:()=>f,fm:()=>l,i2:()=>v,kK:()=>p,pt:()=>d,y1:()=>x});const r=Object.prototype.toString;function o(t){switch(r.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return b(t,Error)}}function i(t,e){return r.call(t)===`[object ${e}]`}function s(t){return i(t,"ErrorEvent")}function a(t){return i(t,"DOMError")}function l(t){return i(t,"DOMException")}function c(t){return i(t,"String")}function u(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function d(t){return null===t||u(t)||"object"!=typeof t&&"function"!=typeof t}function h(t){return i(t,"Object")}function f(t){return"undefined"!=typeof Event&&b(t,Event)}function p(t){return"undefined"!=typeof Element&&b(t,Element)}function g(t){return i(t,"RegExp")}function m(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function y(t){return h(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function v(t){return"number"==typeof t&&t!=t}function b(t,e){try{return t instanceof e}catch(t){return!1}}function x(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t._isVue)}},2343:(t,e,n)=>{"use strict";n.d(e,{Cf:()=>a,LD:()=>s,RU:()=>i,kg:()=>l});var r=n(3897),o=n(1235);const i=["debug","info","warn","error","log","assert","trace"],s={};function a(t){if(!("console"in o.GLOBAL_OBJ))return t();const e=o.GLOBAL_OBJ.console,n={},r=Object.keys(s);r.forEach((t=>{const r=s[t];n[t]=e[t],e[t]=r}));try{return t()}finally{r.forEach((t=>{e[t]=n[t]}))}}const l=function(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return r.X?i.forEach((n=>{e[n]=(...e)=>{t&&a((()=>{o.GLOBAL_OBJ.console[n](`Sentry Logger [${n}]:`,...e)}))}})):i.forEach((t=>{e[t]=()=>{}})),e}()},2844:(t,e,n)=>{"use strict";n.d(e,{DM:()=>i,Db:()=>l,EG:()=>c,YO:()=>u,jH:()=>a,lE:()=>d});var r=n(535),o=n(1235);function i(){const t=o.GLOBAL_OBJ,e=t.crypto||t.msCrypto;let n=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{const t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch(t){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(15&n())>>t/4).toString(16)))}function s(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function a(t){const{message:e,event_id:n}=t;if(e)return e;const r=s(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function l(t,e,n){const r=t.exception=t.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=e||""),i.type||(i.type=n||"Error")}function c(t,e){const n=s(t);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){const t={...r&&r.data,...e.data};n.mechanism.data=t}}function u(t){if(t&&t.__sentry_captured__)return!0;try{(0,r.xp)(t,"__sentry_captured__",!0)}catch(t){}return!1}function d(t){return Array.isArray(t)?t:[t]}},1422:(t,e,n)=>{"use strict";n.d(e,{KV:()=>i});var r=n(8518);t=n.hmd(t);var o=n(4155);function i(){return!(0,r.n)()&&"[object process]"===Object.prototype.toString.call(void 0!==o?o:0)}},8007:(t,e,n)=>{"use strict";n.d(e,{Fv:()=>s,Qy:()=>a});var r=n(7597),o=n(535),i=n(1738);function s(t,e=100,n=1/0){try{return l("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function a(t,e=3,n=102400){const r=s(t,e);return o=r,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(o))>n?a(t,e-1,n):r;var o}function l(t,e,s=1/0,a=1/0,c=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t=a){g[t]="[MaxProperties ~]";break}const e=y[t];g[t]=l(t,e,f-1,a,c),m++}return d(e),g}},535:(t,e,n)=>{"use strict";n.d(e,{$Q:()=>u,HK:()=>d,Jr:()=>y,Sh:()=>f,_j:()=>h,hl:()=>l,xp:()=>c,zf:()=>m});var r=n(8464),o=n(3897),i=n(7597),s=n(2343),a=n(7321);function l(t,e,n){if(!(e in t))return;const r=t[e],o=n(r);"function"==typeof o&&u(o,r),t[e]=o}function c(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch(n){o.X&&s.kg.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function u(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,c(t,"__sentry_original__",e)}catch(t){}}function d(t){return t.__sentry_original__}function h(t){return Object.keys(t).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`)).join("&")}function f(t){if((0,i.VZ)(t))return{message:t.message,name:t.name,stack:t.stack,...g(t)};if((0,i.cO)(t)){const e={type:t.type,target:p(t.target),currentTarget:p(t.currentTarget),...g(t)};return"undefined"!=typeof CustomEvent&&(0,i.V9)(t,CustomEvent)&&(e.detail=t.detail),e}return t}function p(t){try{return(0,i.kK)(t)?(0,r.Rt)(t):Object.prototype.toString.call(t)}catch(t){return""}}function g(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function m(t,e=40){const n=Object.keys(f(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return(0,a.$G)(n[0],e);for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(!(r.length>e))return t===n.length?r:(0,a.$G)(r,e)}return""}function y(t){return v(t,new Map)}function v(t,e){if(function(t){if(!(0,i.PO)(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||"Object"===e}catch(t){return!0}}(t)){const n=e.get(t);if(void 0!==n)return n;const r={};e.set(t,r);for(const n of Object.keys(t))void 0!==t[n]&&(r[n]=v(t[n],e));return r}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const r=[];return e.set(t,r),t.forEach((t=>{r.push(v(t,e))})),r}return t}},228:(t,e,n)=>{"use strict";n.d(e,{Q:()=>o,WG:()=>i});const r=6e4;function o(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}function i(t,{statusCode:e,headers:n},o=Date.now()){const i={...t},s=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(s)for(const t of s.trim().split(",")){const[e,n]=t.split(":",2),r=parseInt(e,10),s=1e3*(isNaN(r)?60:r);if(n)for(const t of n.split(";"))i[t]=o+s;else i.all=o+s}else a?i.all=o+function(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const o=Date.parse(`${t}`);return isNaN(o)?r:o-e}(a,o):429===e&&(i.all=o+6e4);return i}},1738:(t,e,n)=>{"use strict";n.d(e,{$P:()=>c,Sq:()=>a,pE:()=>s});const r=50,o=/\(error: (.*)\)/,i=/captureMessage|captureException/;function s(...t){const e=t.sort(((t,e)=>t[0]-e[0])).map((t=>t[1]));return(t,n=0)=>{const s=[],a=t.split("\n");for(let t=n;t1024)continue;const i=o.test(n)?n.replace(o,"$1"):n;if(!i.match(/\S*Error: /)){for(const t of e){const e=t(i);if(e){s.push(e);break}}if(s.length>=r)break}}return function(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(e[e.length-1].function||"")&&e.pop(),e.reverse(),i.test(e[e.length-1].function||"")&&(e.pop(),i.test(e[e.length-1].function||"")&&e.pop()),e.slice(0,r).map((t=>({...t,filename:t.filename||e[e.length-1].filename,function:t.function||"?"})))}(s)}}function a(t){return Array.isArray(t)?s(...t):t}const l="";function c(t){try{return t&&"function"==typeof t&&t.name||l}catch(t){return l}}},7321:(t,e,n)=>{"use strict";n.d(e,{$G:()=>o,U0:()=>s,nK:()=>i});var r=n(7597);function o(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function i(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;efunction(t,e,n=!1){return!!(0,r.HD)(t)&&((0,r.Kj)(e)?e.test(t):!!(0,r.HD)(e)&&(n?t===e:t.includes(e)))}(t,e,n)))}},8823:(t,e,n)=>{"use strict";n.d(e,{Ak:()=>s,Du:()=>a,t$:()=>l});var r=n(3897),o=n(2343);const i=(0,n(1235).R)();function s(){if(!("fetch"in i))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}function a(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function l(){if("string"==typeof EdgeRuntime)return!0;if(!s())return!1;if(a(i.fetch))return!0;let t=!1;const e=i.document;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=a(n.contentWindow.fetch)),e.head.removeChild(n)}catch(t){r.X&&o.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return t}},6893:(t,e,n)=>{"use strict";n.d(e,{$2:()=>s,WD:()=>i,cW:()=>a});var r,o=n(7597);function i(t){return new a((e=>{e(t)}))}function s(t){return new a(((e,n)=>{n(t)}))}!function(t){t[t.PENDING=0]="PENDING",t[t.RESOLVED=1]="RESOLVED",t[t.REJECTED=2]="REJECTED"}(r||(r={}));class a{constructor(t){a.prototype.__init.call(this),a.prototype.__init2.call(this),a.prototype.__init3.call(this),a.prototype.__init4.call(this),this._state=r.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}then(t,e){return new a(((n,r)=>{this._handlers.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this._executeHandlers()}))}catch(t){return this.then((t=>t),t)}finally(t){return new a(((e,n)=>{let r,o;return this.then((e=>{o=!1,r=e,t&&t()}),(e=>{o=!0,r=e,t&&t()})).then((()=>{o?n(r):e(r)}))}))}__init(){this._resolve=t=>{this._setResult(r.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(r.REJECTED,t)}}__init3(){this._setResult=(t,e)=>{this._state===r.PENDING&&((0,o.J8)(e)?e.then(this._resolve,this._reject):(this._state=t,this._value=e,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===r.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach((t=>{t[0]||(this._state===r.RESOLVED&&t[1](this._value),this._state===r.REJECTED&&t[2](this._value),t[0]=!0)}))}}}},1170:(t,e,n)=>{"use strict";n.d(e,{Z1:()=>l,ph:()=>s,yW:()=>i});var r=n(1235);const o=1e3;function i(){return Date.now()/o}const s=function(){const{performance:t}=r.GLOBAL_OBJ;if(!t||!t.now)return i;const e=Date.now()-t.now(),n=null==t.timeOrigin?e:t.timeOrigin;return()=>(n+t.now())/o}();let a;const l=(()=>{const{performance:t}=r.GLOBAL_OBJ;if(!t||!t.now)return void(a="none");const e=36e5,n=t.now(),o=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-o):e,s=i{"use strict";n.d(e,{$p:()=>a,pT:()=>s});var r=n(9181),o=n(2844);const i=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function s(t,e){const n=function(t){if(!t)return;const e=t.match(i);if(!e)return;let n;return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}(t),s=(0,r.EN)(e),{traceId:a,parentSpanId:l,parentSampled:c}=n||{};return n?{traceId:a||(0,o.DM)(),parentSpanId:l||(0,o.DM)().substring(16),spanId:(0,o.DM)().substring(16),sampled:c,dsc:s||{}}:{traceId:a||(0,o.DM)(),spanId:(0,o.DM)().substring(16)}}function a(t=(0,o.DM)(),e=(0,o.DM)().substring(16),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${t}-${e}${r}`}},6956:(t,e,n)=>{"use strict";function r(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function o(t){return t.split(/\\?\//).filter((t=>t.length>0&&","!==t)).length}n.d(e,{$A:()=>o,en:()=>r})},1235:(t,e,n)=>{"use strict";function r(t){return t&&t.Math==Math?t:void 0}n.d(e,{GLOBAL_OBJ:()=>o,R:()=>i,Y:()=>s});const o="object"==typeof globalThis&&r(globalThis)||"object"==typeof window&&r(window)||"object"==typeof self&&r(self)||"object"==typeof n.g&&r(n.g)||function(){return this}()||{};function i(){return o}function s(t,e,n){const r=n||o,i=r.__SENTRY__=r.__SENTRY__||{};return i[t]||(i[t]=e())}},9282:(t,e,n)=>{"use strict";var r=n(4155),o=n(5108);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function s(t,e){for(var n=0;n1?n-1:0),o=1;o1?n-1:0),o=1;o1?n-1:0),o=1;o1?n-1:0),o=1;o{"use strict";var r=n(4155);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t){for(var e=1;et.length)&&(n=t.length),t.substring(n-e.length,n)===e}var b="",x="",w="",k="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function C(t){var e=Object.keys(t),n=Object.create(Object.getPrototypeOf(t));return e.forEach((function(e){n[e]=t[e]})),Object.defineProperty(n,"message",{value:t.message}),n}function A(t){return m(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var E=function(t,e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(E,t);var n,o,a,u,d=(n=E,o=h(),function(){var t,e=p(n);if(o){var r=p(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return l(this,t)});function E(t){var e;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,E),"object"!==g(t)||null===t)throw new y("options","Object",t);var n=t.message,o=t.operator,i=t.stackStartFn,s=t.actual,a=t.expected,u=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=n)e=d.call(this,String(n));else if(r.stderr&&r.stderr.isTTY&&(r.stderr&&r.stderr.getColorDepth&&1!==r.stderr.getColorDepth()?(b="",x="",k="",w=""):(b="",x="",k="",w="")),"object"===g(s)&&null!==s&&"object"===g(a)&&null!==a&&"stack"in s&&s instanceof Error&&"stack"in a&&a instanceof Error&&(s=C(s),a=C(a)),"deepStrictEqual"===o||"strictEqual"===o)e=d.call(this,function(t,e,n){var o="",i="",s=0,a="",l=!1,c=A(t),u=c.split("\n"),d=A(e).split("\n"),h=0,f="";if("strictEqual"===n&&"object"===g(t)&&"object"===g(e)&&null!==t&&null!==e&&(n="strictEqualObject"),1===u.length&&1===d.length&&u[0]!==d[0]){var p=u[0].length+d[0].length;if(p<=10){if(!("object"===g(t)&&null!==t||"object"===g(e)&&null!==e||0===t&&0===e))return"".concat(S[n],"\n\n")+"".concat(u[0]," !== ").concat(d[0],"\n")}else if("strictEqualObject"!==n&&p<(r.stderr&&r.stderr.isTTY?r.stderr.columns:80)){for(;u[0][h]===d[0][h];)h++;h>2&&(f="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var n=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+t.substring(0,n-t.length)}(" ",h),"^"),h=0)}}for(var m=u[u.length-1],y=d[d.length-1];m===y&&(h++<2?a="\n ".concat(m).concat(a):o=m,u.pop(),d.pop(),0!==u.length&&0!==d.length);)m=u[u.length-1],y=d[d.length-1];var C=Math.max(u.length,d.length);if(0===C){var E=c.split("\n");if(E.length>30)for(E[26]="".concat(b,"...").concat(k);E.length>27;)E.pop();return"".concat(S.notIdentical,"\n\n").concat(E.join("\n"),"\n")}h>3&&(a="\n".concat(b,"...").concat(k).concat(a),l=!0),""!==o&&(a="\n ".concat(o).concat(a),o="");var T=0,P=S[n]+"\n".concat(x,"+ actual").concat(k," ").concat(w,"- expected").concat(k),O=" ".concat(b,"...").concat(k," Lines skipped");for(h=0;h1&&h>2&&(R>4?(i+="\n".concat(b,"...").concat(k),l=!0):R>3&&(i+="\n ".concat(d[h-2]),T++),i+="\n ".concat(d[h-1]),T++),s=h,o+="\n".concat(w,"-").concat(k," ").concat(d[h]),T++;else if(d.length1&&h>2&&(R>4?(i+="\n".concat(b,"...").concat(k),l=!0):R>3&&(i+="\n ".concat(u[h-2]),T++),i+="\n ".concat(u[h-1]),T++),s=h,i+="\n".concat(x,"+").concat(k," ").concat(u[h]),T++;else{var I=d[h],M=u[h],L=M!==I&&(!v(M,",")||M.slice(0,-1)!==I);L&&v(I,",")&&I.slice(0,-1)===M&&(L=!1,M+=","),L?(R>1&&h>2&&(R>4?(i+="\n".concat(b,"...").concat(k),l=!0):R>3&&(i+="\n ".concat(u[h-2]),T++),i+="\n ".concat(u[h-1]),T++),s=h,i+="\n".concat(x,"+").concat(k," ").concat(M),o+="\n".concat(w,"-").concat(k," ").concat(I),T+=2):(i+=o,o="",1!==R&&0!==h||(i+="\n ".concat(M),T++))}if(T>20&&h30)for(f[26]="".concat(b,"...").concat(k);f.length>27;)f.pop();e=1===f.length?d.call(this,"".concat(h," ").concat(f[0])):d.call(this,"".concat(h,"\n\n").concat(f.join("\n"),"\n"))}else{var p=A(s),m="",T=S[o];"notDeepEqual"===o||"notEqual"===o?(p="".concat(S[o],"\n\n").concat(p)).length>1024&&(p="".concat(p.slice(0,1021),"...")):(m="".concat(A(a)),p.length>512&&(p="".concat(p.slice(0,509),"...")),m.length>512&&(m="".concat(m.slice(0,509),"...")),"deepEqual"===o||"equal"===o?p="".concat(T,"\n\n").concat(p,"\n\nshould equal\n\n"):m=" ".concat(o," ").concat(m)),e=d.call(this,"".concat(p).concat(m))}return Error.stackTraceLimit=u,e.generatedMessage=!n,Object.defineProperty(c(e),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),e.code="ERR_ASSERTION",e.actual=s,e.expected=a,e.operator=o,Error.captureStackTrace&&Error.captureStackTrace(c(e),i),e.stack,e.name="AssertionError",l(e)}return a=E,(u=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:e,value:function(t,e){return m(this,i(i({},e),{},{customInspect:!1,depth:0}))}}])&&s(a.prototype,u),Object.defineProperty(a,"prototype",{writable:!1}),E}(u(Error),m.custom);t.exports=E},2136:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}var s,a,l={};function c(t,e,n){n||(n=Error);var s=function(n){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(u,n);var s,a,l,c=(a=u,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=i(a);if(l){var n=i(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(n,r,o){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),i=c.call(this,function(t,n,r){return"string"==typeof e?e:e(t,n,r)}(n,r,o)),i.code=t,i}return s=u,Object.defineProperty(s,"prototype",{writable:!1}),s}(n);l[t]=s}function u(t,e){if(Array.isArray(t)){var n=t.length;return t=t.map((function(t){return String(t)})),n>2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",(function(t,e,o){var i,a,l,c,d;if(void 0===s&&(s=n(9282)),s("string"==typeof t,"'name' must be a string"),"string"==typeof e&&(a="not ",e.substr(0,4)===a)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-9,n)===e}(t," argument"))l="The ".concat(t," ").concat(i," ").concat(u(e,"type"));else{var h=("number"!=typeof d&&(d=0),d+1>(c=t).length||-1===c.indexOf(".",d)?"argument":"property");l='The "'.concat(t,'" ').concat(h," ").concat(i," ").concat(u(e,"type"))}return l+". Received type ".concat(r(o))}),TypeError),c("ERR_INVALID_ARG_VALUE",(function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===a&&(a=n(9539));var o=a.inspect(e);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(r,". Received ").concat(o)}),TypeError,RangeError),c("ERR_INVALID_RETURN_VALUE",(function(t,e,n){var o;return o=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(r(n)),"Expected ".concat(t,' to be returned from the "').concat(e,'"')+" function but got ".concat(o,".")}),TypeError),c("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),r=0;r0,"At least one arg needs to be specified");var o="The ",i=e.length;switch(e=e.map((function(t){return'"'.concat(t,'"')})),i){case 1:o+="".concat(e[0]," argument");break;case 2:o+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:o+=e.slice(0,i-1).join(", "),o+=", and ".concat(e[i-1]," arguments")}return"".concat(o," must be specified")}),TypeError),t.exports.codes=l},9158:(t,e,n)=>{"use strict";function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n10)return!0;for(var e=0;e57)return!0}return 10===t.length&&t>=Math.pow(2,32)}function L(t){return Object.keys(t).filter(M).concat(u(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}function j(t,e){if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);o{"use strict";e.byteLength=function(t){var e=a(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,i=a(t),s=i[0],l=i[1],c=new o(function(t,e,n){return 3*(e+n)/4-n}(0,s,l)),u=0,d=l>0?s-4:s;for(n=0;n>16&255,c[u++]=e>>8&255,c[u++]=255&e;return 2===l&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,c[u++]=255&e),1===l&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,c[u++]=e>>8&255,c[u++]=255&e),c},e.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i=[],s=16383,a=0,c=r-o;ac?c:a+s));return 1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=i[s],r[i.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,r){for(var o,i,s=[],a=e;a>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},8764:(t,e,n)=>{"use strict";var r=n(5108);const o=n(9742),i=n(645),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.lW=c,e.h2=50;const a=2147483647;function l(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return u(t,e,n)}function u(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|m(t,e);let r=l(n);const o=r.write(t,e);return o!==n&&(r=r.slice(0,o)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(K(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(K(t,ArrayBuffer)||t&&K(t.buffer,ArrayBuffer))return p(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(K(t,SharedArrayBuffer)||t&&K(t.buffer,SharedArrayBuffer)))return p(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return c.from(r,e,n);const o=function(t){if(c.isBuffer(t)){const e=0|g(t.length),n=l(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||X(t.length)?l(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function d(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return d(t),l(t<0?0:0|g(t))}function f(t){const e=t.length<0?0:0|g(t.length),n=l(e);for(let r=0;r=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function m(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||K(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(t).length;default:if(o)return r?-1:G(t).length;e=(""+e).toLowerCase(),o=!0}}function y(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,n);case"utf8":case"utf-8":return T(this,e,n);case"ascii":return O(this,e,n);case"latin1":case"binary":return R(this,e,n);case"base64":return E(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function v(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,o){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=c.from(e,r)),c.isBuffer(e))return 0===e.length?-1:x(t,e,n,r,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):x(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function x(t,e,n,r,o){let i,s=1,a=t.length,l=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,l/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){let r=-1;for(i=n;ia&&(n=a-l),i=n;i>=0;i--){let n=!0;for(let r=0;ro&&(r=o):r=o;const i=e.length;let s;for(r>i/2&&(r=i/2),s=0;s>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function E(t,e,n){return 0===e&&n===t.length?o.fromByteArray(t):o.fromByteArray(t.slice(e,n))}function T(t,e,n){n=Math.min(t.length,n);const r=[];let o=e;for(;o239?4:e>223?3:e>191?2:1;if(o+s<=n){let n,r,a,l;switch(s){case 1:e<128&&(i=e);break;case 2:n=t[o+1],128==(192&n)&&(l=(31&e)<<6|63&n,l>127&&(i=l));break;case 3:n=t[o+1],r=t[o+2],128==(192&n)&&128==(192&r)&&(l=(15&e)<<12|(63&n)<<6|63&r,l>2047&&(l<55296||l>57343)&&(i=l));break;case 4:n=t[o+1],r=t[o+2],a=t[o+3],128==(192&n)&&128==(192&r)&&128==(192&a)&&(l=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&a,l>65535&&l<1114112&&(i=l))}}null===i?(i=65533,s=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=s}return function(t){const e=t.length;if(e<=P)return String.fromCharCode.apply(String,t);let n="",r=0;for(;rr.length?(c.isBuffer(e)||(e=c.from(e)),e.copy(r,o)):Uint8Array.prototype.set.call(r,e,o);else{if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,o)}o+=e.length}return r},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;en&&(t+=" ... "),""},s&&(c.prototype[s]=c.prototype.inspect),c.prototype.compare=function(t,e,n,r,o){if(K(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;let i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0);const a=Math.min(i,s),l=this.slice(r,o),u=t.slice(e,n);for(let t=0;t>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return k(this,t,e,n);case"ascii":case"latin1":case"binary":return S(this,t,e,n);case"base64":return C(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const P=4096;function O(t,e,n){let r="";n=Math.min(t.length,n);for(let o=e;or)&&(n=r);let o="";for(let r=e;rn)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,n,r,o,i){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function _(t,e,n,r,o){W(e,r,o,t,n,7);let i=Number(e&BigInt(4294967295));t[n++]=i,i>>=8,t[n++]=i,i>>=8,t[n++]=i,i>>=8,t[n++]=i;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,n}function D(t,e,n,r,o){W(e,r,o,t,n,7);let i=Number(e&BigInt(4294967295));t[n+7]=i,i>>=8,t[n+6]=i,i>>=8,t[n+5]=i,i>>=8,t[n+4]=i;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=s,s>>=8,t[n+2]=s,s>>=8,t[n+1]=s,s>>=8,t[n]=s,n+8}function F(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(t,e,n,r,o){return e=+e,n>>>=0,o||F(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function B(t,e,n,r,o){return e=+e,n>>>=0,o||F(t,0,n,8),i.write(t,e,n,r,52,8),n+8}c.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e>>=0,e>>>=0,n||L(t,e,this.length);let r=this[t],o=1,i=0;for(;++i>>=0,e>>>=0,n||L(t,e,this.length);let r=this[t+--e],o=1;for(;e>0&&(o*=256);)r+=this[t+--e]*o;return r},c.prototype.readUint8=c.prototype.readUInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readBigUInt64LE=Q((function(t){U(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(o)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<>>=0,e>>>=0,n||L(t,e,this.length);let r=this[t],o=1,i=0;for(;++i=o&&(r-=Math.pow(2,8*e)),r},c.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||L(t,e,this.length);let r=e,o=1,i=this[t+--r];for(;r>0&&(o*=256);)i+=this[t+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},c.prototype.readInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||L(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(t,e){t>>>=0,e||L(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readBigInt64LE=Q((function(t){U(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<>>=0,e||L(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||L(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||L(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||L(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||j(this,t,e,n,Math.pow(2,8*n)-1,0);let o=1,i=0;for(this[e]=255&t;++i>>=0,n>>>=0,r||j(this,t,e,n,Math.pow(2,8*n)-1,0);let o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||j(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||j(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||j(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||j(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||j(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigUInt64LE=Q((function(t,e=0){return _(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Q((function(t,e=0){return D(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);j(this,t,e,n,r-1,-r)}let o=0,i=1,s=0;for(this[e]=255&t;++o>>=0,!r){const r=Math.pow(2,8*n-1);j(this,t,e,n,r-1,-r)}let o=n-1,i=1,s=0;for(this[e+o]=255&t;--o>=0&&(i*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/i|0)-s&255;return e+n},c.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||j(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||j(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||j(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||j(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigInt64LE=Q((function(t,e=0){return _(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Q((function(t,e=0){return D(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(t,e,n){return N(this,t,e,!0,n)},c.prototype.writeFloatBE=function(t,e,n){return N(this,t,e,!1,n)},c.prototype.writeDoubleLE=function(t,e,n){return B(this,t,e,!0,n)},c.prototype.writeDoubleBE=function(t,e,n){return B(this,t,e,!1,n)},c.prototype.copy=function(t,e,n,r){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function W(t,e,n,r,o,i){if(t>n||t3?0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${e}${r} and <= ${n}${r}`,new z.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,n){U(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||H(e,t.length-(n+1))}(r,o,i)}function U(t,e){if("number"!=typeof t)throw new z.ERR_INVALID_ARG_TYPE(e,"number",t)}function H(t,e,n){if(Math.floor(t)!==t)throw U(t,n),new z.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new z.ERR_BUFFER_OUT_OF_BOUNDS;throw new z.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}V("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),V("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),V("ERR_OUT_OF_RANGE",(function(t,e,n){let r=`The value of "${t}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=$(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=$(o)),o+="n"),r+=` It must be ${e}. Received ${o}`,r}),RangeError);const q=/[^+/0-9A-Za-z-_]/g;function G(t,e){let n;e=e||1/0;const r=t.length;let o=null;const i=[];for(let s=0;s55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Y(t){return o.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Z(t,e,n,r){let o;for(o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function K(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function X(t){return t!=t}const J=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)e[r+o]=t[n]+t[o]}return e}();function Q(t){return"undefined"==typeof BigInt?tt:t}function tt(){throw new Error("BigInt not supported")}},5116:(t,e,n)=>{"use strict";var r=n(8612),o=n(1768),i=n(8928),s=n(9770);t.exports=s||r.call(i,o)},3192:(t,e,n)=>{"use strict";var r=n(8612),o=n(1768),i=n(5116);t.exports=function(){return i(r,o,arguments)}},1768:t=>{"use strict";t.exports=Function.prototype.apply},8928:t=>{"use strict";t.exports=Function.prototype.call},319:(t,e,n)=>{"use strict";var r=n(8612),o=n(4453),i=n(8928),s=n(5116);t.exports=function(t){if(t.length<1||"function"!=typeof t[0])throw new o("a function is required");return s(r,i,t)}},9770:t=>{"use strict";t.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},1924:(t,e,n)=>{"use strict";var r=n(210),o=n(5559),i=o(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&i(t,".prototype.")>-1?o(n):n}},5559:(t,e,n)=>{"use strict";var r=n(7771),o=n(4429),i=n(319),s=n(3192);t.exports=function(t){var e=i(arguments),n=t.length-(arguments.length-1);return r(e,1+(n>0?n:0),!0)},o?o(t.exports,"apply",{value:s}):t.exports.apply=s},7379:(t,e,n)=>{"use strict";var r=n(210),o=n(319),i=o([r("%String.prototype.indexOf%")]);t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&i(t,".prototype.")>-1?o([n]):n}},5108:(t,e,n)=>{var r=n(9539),o=n(9282);function i(){return(new Date).getTime()}var s,a=Array.prototype.slice,l={};s=void 0!==n.g&&n.g.console?n.g.console:"undefined"!=typeof window&&window.console?window.console:{};for(var c=[[function(){},"log"],[function(){s.log.apply(s,arguments)},"info"],[function(){s.log.apply(s,arguments)},"warn"],[function(){s.warn.apply(s,arguments)},"error"],[function(t){l[t]=i()},"time"],[function(t){var e=l[t];if(!e)throw new Error("No such label: "+t);delete l[t];var n=i()-e;s.log(t+": "+n+"ms")},"timeEnd"],[function(){var t=new Error;t.name="Trace",t.message=r.format.apply(null,arguments),s.error(t.stack)},"trace"],[function(t){s.log(r.inspect(t)+"\n")},"dir"],[function(t){if(!t){var e=a.call(arguments,1);o.ok(!1,r.format.apply(null,e))}},"assert"]],u=0;u=e?t:""+Array(e+1-r.length).join(n)+t},y={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(o,2,"0")},m:function t(e,n){if(e.date()1)return t(s[0])}else{var a=e.name;b[a]=e,o=a}return!r&&o&&(v=o),o||!r&&v},S=function(t,e){if(w(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new A(n)},C=y;C.l=k,C.i=w,C.w=function(t,e){return S(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var A=function(){function g(t){this.$L=k(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[x]=!0}var m=g.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(C.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(f);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return C},m.isValid=function(){return!(this.$d.toString()===h)},m.isSame=function(t,e){var n=S(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return S(t){"use strict";var r=n(4429),o=n(3464),i=n(4453),s=n(7296);t.exports=function(t,e,n){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!s&&s(t,e);if(r)r(t,e,{configurable:null===c&&d?d.configurable:!c,enumerable:null===a&&d?d.enumerable:!a,value:n,writable:null===l&&d?d.writable:!l});else{if(!u&&(a||l||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=n}}},4289:(t,e,n)=>{"use strict";var r=n(2215),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,s=Array.prototype.concat,a=n(2296),l=n(1044)(),c=function(t,e,n,r){if(e in t)if(!0===r){if(t[e]===n)return}else if("function"!=typeof(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;l?a(t,e,n,!0):a(t,e,n)},u=function(t,e){var n=arguments.length>2?arguments[2]:{},i=r(e);o&&(i=s.call(i,Object.getOwnPropertySymbols(e)));for(var a=0;a{"use strict";var e={single_source_shortest_paths:function(t,n,r){var o={},i={};i[n]=0;var s,a,l,c,u,d,h,f=e.PriorityQueue.make();for(f.push(n,0);!f.empty();)for(l in a=(s=f.pop()).value,c=s.cost,u=t[a]||{})u.hasOwnProperty(l)&&(d=c+u[l],h=i[l],(void 0===i[l]||h>d)&&(i[l]=d,f.push(l,d),o[l]=a));if(void 0!==r&&void 0===i[r]){var p=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(p)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,n,r){var o=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,o={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e},6504:(t,e,n)=>{"use strict";var r,o=n(319),i=n(7296);try{r=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var s=!!r&&i&&i(Object.prototype,"__proto__"),a=Object,l=a.getPrototypeOf;t.exports=s&&"function"==typeof s.get?o([s.get]):"function"==typeof l&&function(t){return l(null==t?t:a(t))}},2378:t=>{"use strict";t.exports=function(t){for(var e=[],n=t.length,r=0;r=55296&&o<=56319&&n>r+1){var i=t.charCodeAt(r+1);i>=56320&&i<=57343&&(o=1024*(o-55296)+i-56320+65536,r+=1)}o<128?e.push(o):o<2048?(e.push(o>>6|192),e.push(63&o|128)):o<55296||o>=57344&&o<65536?(e.push(o>>12|224),e.push(o>>6&63|128),e.push(63&o|128)):o>=65536&&o<=1114111?(e.push(o>>18|240),e.push(o>>12&63|128),e.push(o>>6&63|128),e.push(63&o|128)):e.push(239,191,189)}return new Uint8Array(e).buffer}},4429:t=>{"use strict";var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}t.exports=e},3981:t=>{"use strict";t.exports=EvalError},1648:t=>{"use strict";t.exports=Error},4726:t=>{"use strict";t.exports=RangeError},6712:t=>{"use strict";t.exports=ReferenceError},3464:t=>{"use strict";t.exports=SyntaxError},4453:t=>{"use strict";t.exports=TypeError},3915:t=>{"use strict";t.exports=URIError},8892:t=>{"use strict";t.exports=Object},4029:(t,e,n)=>{"use strict";var r=n(5320),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){if(!r(e))throw new TypeError("iterator must be a function");var s,a;arguments.length>=3&&(s=n),a=t,"[object Array]"===o.call(a)?function(t,e,n){for(var r=0,o=t.length;r{(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>kt});const o=n(5697);var i=e.n(o);const s=n(7294);var a=e.n(s),l="fslightbox-",c="".concat(l,"styles"),u="".concat(l,"cursor-grabbing"),d="".concat(l,"full-dimension"),h="".concat(l,"flex-centered"),f="".concat(l,"transform-transition"),p="".concat(l,"absoluted"),g="".concat(l,"fade-in"),m="".concat(l,"fade-out"),y=g+"-strong",v=m+"-strong",b="".concat(l,"opacity-1");"".concat(l,"source");const x=function(t){var e=t.size,n=t.viewBox,r=t.d;return a().createElement("svg",{width:e,height:e,viewBox:n,xmlns:"http://www.w3.org/2000/svg"},a().createElement("path",{className:"".concat(l,"svg-path"),d:r}))},w=function(t){var e=t.onClick,n=t.viewBox,r=t.size,o=t.d,i=t.title;return a().createElement("div",{onClick:e,className:"".concat(l,"toolbar-button ").concat(h),title:i},a().createElement(x,{viewBox:n,size:r,d:o}))};function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n55&&(h.current.style.justifyContent="flex-start")}),[]),a().createElement("div",{ref:h,className:"".concat(l,"slide-number-container")},a().createElement("div",{ref:f,className:"fslightbox-flex-centered"},a().createElement("span",null,u),a().createElement("span",{className:"".concat(l,"slash")}),a().createElement("span",null,o.length)))},P=function(t){var e=t.fsLightbox;return a().createElement("div",{className:"".concat(l,"nav")},a().createElement(A,{fsLightbox:e}),e.props.sources.length>1&&a().createElement(T,{fsLightbox:e}))};function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0?c(a,"ne"):void 0!==l&&o.swipedX<0&&c(l,"p")}(t,e)}}function lt(t){var e=t.core.slideIndexChanger,n=t.smwm,r=t.stageIndexes,o=t.sws;function i(t){var e=n[r.current];e.a(),e[t]()}function s(t,e){void 0!==t&&(n[t].s(),n[t][e]())}this.p=function(){var t=r.previous;if(void 0===t)i("z");else{i("p");var n=r.next;e.changeTo(t);var a=r.previous;o.d(a),o.b(n),i("z"),s(a,"ne")}},this.n=function(){var t=r.next;if(void 0===t)i("z");else{i("ne");var n=r.previous;e.changeTo(t);var a=r.next;o.d(a),o.b(n),i("z"),s(a,"p")}}}function ct(t){var e=t.componentsServices,n=t.core.lightboxCloser,r=t.dss,o=t.elements.container,i=t.p,s=t.props.disableBackgroundClose,a=(0,t.r)(lt);this.n=function(){e.hideSlideSwipingHovererIfShown(),i.isSourceDownEventTarget||s||n.closeLightbox(),i.isSwiping=!1},this.s=function(){r||(i.swipedX>0?a.p():a.n()),e.hideSlideSwipingHovererIfShown(),o.current.classList.remove(u),i.isSwiping=!1}}function ut(t,e,n,r){var o=t.data,i=t.elements.sources,s=n/r,a=0;this.adjustSize=function(){if((a=o.maxSourceWidth/s)o.maxSourceHeight?o.maxSourceHeight:r,l()};var l=function(){var t=i[e].current.style;t.width=a*s+"px",t.height=a+"px"}}function dt(t,e){var n=this,r=t.collections.sourceSizers,o=t.elements.sources,i=t.isl,s=t.resolve,a=t.saw,l=t.sawu;function c(t,n){r[e]=s(ut,[e,t,n]),r[e].adjustSize()}this.runActions=function(t,r){i[e]=!0,l[e](),o[e].current.classList.add(b),a[e].current.classList.add(y),c(t,r),n.runActions=c}}function ht(t,e){var n,r=this,o=t.elements.sources,i=t.props,s=(0,t.resolve)(dt,[e]);this.handleImageLoad=function(t){var e=t.target,n=e.naturalWidth,r=e.naturalHeight;s.runActions(n,r)},this.handleVideoLoad=function(t){var e=t.target,r=e.videoWidth,o=e.videoHeight;n=!0,s.runActions(r,o)},this.handleNotMetaDatedVideoLoad=function(){n||r.handleYoutubeLoad()},this.handleYoutubeLoad=function(){var t=1920,e=1080;i.maxYoutubeVideoDimensions&&(t=i.maxYoutubeVideoDimensions.width,e=i.maxYoutubeVideoDimensions.height),s.runActions(t,e)},this.handleCustomLoad=function(){var t=o[e].current;if(t){var n=t.offsetWidth,i=t.offsetHeight;n&&i?s.runActions(n,i):setTimeout(r.handleCustomLoad)}}}function ft(t){return ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ft(t)}function pt(t){return pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pt(t)}function gt(t,e,n){return gt=bt()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&yt(o,n.prototype),o},gt.apply(null,arguments)}function mt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nwindow.innerHeight&&(document.body.style.marginRight=e.scrollbarWidth+"px")};n.removeRecompense=function(){document.body.style.removeProperty("margin-right")}}(t),function(t){var e=t.core.slideIndexChanger,n=t.sl,r=t.st;n>1?(t.pr=function(){e.jumpTo(r.p())},t.n=function(){e.jumpTo(r.n())}):(t.pr=function(){},t.n=function(){})}(t),function(t){var e=t.componentsServices,n=t.core.slideIndexChanger,r=t.isl,o=t.saw,i=t.smwm,s=t.st,a=t.stageIndexes,l=t.sws;n.changeTo=function(n){a.current=n,s.u(),e.setSlideNumber(n+1),it(t)},n.jumpTo=function(t){var e=a.previous,c=a.current,u=a.next,d=r[c],h=r[t];n.changeTo(t);for(var f=0;f1&&void 0!==arguments[1]?arguments[1]:[];return n.unshift(this),gt(t,function(t){if(Array.isArray(t))return mt(t)}(e=n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return mt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mt(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}},{key:"e",value:function(t){var e=this.props[t];e&&e(this)}},{key:"componentDidUpdate",value:function(t,e,n){this.core.lightboxUpdater.handleUpdate(t)}},{key:"componentDidMount",value:function(){var t,e,n;t=this.data,e=this.i,n=this.props.openOnMount,document.getElementsByClassName(c).length||F(),t.scrollbarWidth=function(){var t=document.createElement("div"),e=t.style,n=document.createElement("div");e.visibility="hidden",e.width="100px",e.msOverflowStyle="scrollbar",e.overflow="scroll",n.style.width="100%",document.body.appendChild(t);var r=t.offsetWidth;t.appendChild(n);var o=n.offsetWidth;return document.body.removeChild(t),r-o}(),n&&e()}},{key:"componentWillUnmount",value:function(){!function(t){for(var e=t.collections.xhrs,n=t.componentsServices.isLightboxOpenManager,r=t.core.globalEventsController,o=0;o1?a().createElement(a().Fragment,null,a().createElement(I,{onClick:this.pr,name:"previous",d:"M18.271,9.212H3.615l4.184-4.184c0.306-0.306,0.306-0.801,0-1.107c-0.306-0.306-0.801-0.306-1.107,0L1.21,9.403C1.194,9.417,1.174,9.421,1.158,9.437c-0.181,0.181-0.242,0.425-0.209,0.66c0.005,0.038,0.012,0.071,0.022,0.109c0.028,0.098,0.075,0.188,0.142,0.271c0.021,0.026,0.021,0.061,0.045,0.085c0.015,0.016,0.034,0.02,0.05,0.033l5.484,5.483c0.306,0.307,0.801,0.307,1.107,0c0.306-0.305,0.306-0.801,0-1.105l-4.184-4.185h14.656c0.436,0,0.788-0.353,0.788-0.788S18.707,9.212,18.271,9.212z"}),a().createElement(I,{onClick:this.n,name:"next",d:"M1.729,9.212h14.656l-4.184-4.184c-0.307-0.306-0.307-0.801,0-1.107c0.305-0.306,0.801-0.306,1.106,0l5.481,5.482c0.018,0.014,0.037,0.019,0.053,0.034c0.181,0.181,0.242,0.425,0.209,0.66c-0.004,0.038-0.012,0.071-0.021,0.109c-0.028,0.098-0.075,0.188-0.143,0.271c-0.021,0.026-0.021,0.061-0.045,0.085c-0.015,0.016-0.034,0.02-0.051,0.033l-5.483,5.483c-0.306,0.307-0.802,0.307-1.106,0c-0.307-0.305-0.307-0.801,0-1.105l4.184-4.185H1.729c-0.436,0-0.788-0.353-0.788-0.788S1.293,9.212,1.729,9.212z"})):null,a().createElement(D,{o:this})):null}}],n&&function(t,e){for(var n=0;n{"use strict";var e=Object.prototype.toString,n=Math.max,r=function(t,e){for(var n=[],r=0;r{"use strict";var r=n(7648);t.exports=Function.prototype.bind||r},210:(t,e,n)=>{"use strict";var r,o=n(8892),i=n(1648),s=n(3981),a=n(4726),l=n(6712),c=n(3464),u=n(4453),d=n(3915),h=n(9738),f=n(6329),p=n(2264),g=n(5730),m=n(707),y=n(3862),v=n(9550),b=Function,x=function(t){try{return b('"use strict"; return ('+t+").constructor;")()}catch(t){}},w=n(7296),k=n(4429),S=function(){throw new u},C=w?function(){try{return S}catch(t){try{return w(arguments,"callee").get}catch(t){return S}}}():S,A=n(1405)(),E=n(1618),T=n(8899),P=n(443),O=n(1768),R=n(8928),I={},M="undefined"!=typeof Uint8Array&&E?E(Uint8Array):r,L={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":A&&E?E([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":I,"%AsyncGenerator%":I,"%AsyncGeneratorFunction%":I,"%AsyncIteratorPrototype%":I,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"undefined"==typeof Float16Array?r:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":I,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":A&&E?E(E([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&A&&E?E((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":w,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":a,"%ReferenceError%":l,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&A&&E?E((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&E?E(""[Symbol.iterator]()):r,"%Symbol%":A?Symbol:r,"%SyntaxError%":c,"%ThrowTypeError%":C,"%TypedArray%":M,"%TypeError%":u,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":d,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet,"%Function.prototype.call%":R,"%Function.prototype.apply%":O,"%Object.defineProperty%":k,"%Object.getPrototypeOf%":T,"%Math.abs%":h,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":g,"%Math.pow%":m,"%Math.round%":y,"%Math.sign%":v,"%Reflect.getPrototypeOf%":P};if(E)try{null.error}catch(t){var j=E(E(t));L["%Error.prototype%"]=j}var _=function t(e){var n;if("%AsyncFunction%"===e)n=x("async function () {}");else if("%GeneratorFunction%"===e)n=x("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=x("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&E&&(n=E(o.prototype))}return L[e]=n,n},D={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},F=n(8612),N=n(8824),B=F.call(R,Array.prototype.concat),z=F.call(O,Array.prototype.splice),V=F.call(R,String.prototype.replace),$=F.call(R,String.prototype.slice),W=F.call(R,RegExp.prototype.exec),U=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,q=function(t,e){var n,r=t;if(N(D,r)&&(r="%"+(n=D[r])[0]+"%"),N(L,r)){var o=L[r];if(o===I&&(o=_(r)),void 0===o&&!e)throw new u("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new c("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new u('"allowMissing" argument must be a boolean');if(null===W(/^%?[^%]*%?$/,t))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(t){var e=$(t,0,1),n=$(t,-1);if("%"===e&&"%"!==n)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return V(t,U,(function(t,e,n,o){r[r.length]=n?V(o,H,"$1"):e||t})),r}(t),r=n.length>0?n[0]:"",o=q("%"+r+"%",e),i=o.name,s=o.value,a=!1,l=o.alias;l&&(r=l[0],z(n,B([0,1],l)));for(var d=1,h=!0;d=n.length){var m=w(s,f);s=(h=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:s[f]}else h=N(s,f),s=s[f];h&&!a&&(L[i]=s)}}return s}},8899:(t,e,n)=>{"use strict";var r=n(8892);t.exports=r.getPrototypeOf||null},443:t=>{"use strict";t.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},1618:(t,e,n)=>{"use strict";var r=n(443),o=n(8899),i=n(6504);t.exports=r?function(t){return r(t)}:o?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return o(t)}:i?function(t){return i(t)}:null},690:t=>{"use strict";t.exports=Object.getOwnPropertyDescriptor},7296:(t,e,n)=>{"use strict";var r=n(690);if(r)try{r([],"length")}catch(t){r=null}t.exports=r},1044:(t,e,n)=>{"use strict";var r=n(4429),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},1405:(t,e,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(5419);t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}},5419:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var r in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},6410:(t,e,n)=>{"use strict";var r=n(5419);t.exports=function(){return r()&&!!Symbol.toStringTag}},8824:(t,e,n)=>{"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=n(8612);t.exports=i.call(r,o)},8679:(t,e,n)=>{"use strict";var r=n(1296),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(t){return r.isMemo(t)?s:a[t.$$typeof]||o}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(p){var o=f(n);o&&o!==p&&t(e,o,r)}var s=u(n);d&&(s=s.concat(d(n)));for(var a=l(e),g=l(n),m=0;m{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function w(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case u:case d:case i:case a:case s:case f:return t;default:switch(t=t&&t.$$typeof){case c:case h:case m:case g:case l:return t;default:return e}}case o:return e}}}function k(t){return w(t)===d}e.AsyncMode=u,e.ConcurrentMode=d,e.ContextConsumer=c,e.ContextProvider=l,e.Element=r,e.ForwardRef=h,e.Fragment=i,e.Lazy=m,e.Memo=g,e.Portal=o,e.Profiler=a,e.StrictMode=s,e.Suspense=f,e.isAsyncMode=function(t){return k(t)||w(t)===u},e.isConcurrentMode=k,e.isContextConsumer=function(t){return w(t)===c},e.isContextProvider=function(t){return w(t)===l},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===r},e.isForwardRef=function(t){return w(t)===h},e.isFragment=function(t){return w(t)===i},e.isLazy=function(t){return w(t)===m},e.isMemo=function(t){return w(t)===g},e.isPortal=function(t){return w(t)===o},e.isProfiler=function(t){return w(t)===a},e.isStrictMode=function(t){return w(t)===s},e.isSuspense=function(t){return w(t)===f},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===d||t===a||t===s||t===f||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===m||t.$$typeof===g||t.$$typeof===l||t.$$typeof===c||t.$$typeof===h||t.$$typeof===v||t.$$typeof===b||t.$$typeof===x||t.$$typeof===y)},e.typeOf=w},1296:(t,e,n)=>{"use strict";t.exports=n(6103)},645:(t,e)=>{e.read=function(t,e,n,r,o){var i,s,a=8*o-r-1,l=(1<>1,u=-7,d=n?o-1:0,h=n?-1:1,f=t[e+d];for(d+=h,i=f&(1<<-u)-1,f>>=-u,u+=a;u>0;i=256*i+t[e+d],d+=h,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=r;u>0;s=256*s+t[e+d],d+=h,u-=8);if(0===i)i=1-c;else{if(i===l)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,r),i-=c}return(f?-1:1)*s*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var s,a,l,c=8*i-o-1,u=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:i-1,p=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),(e+=s+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(e*l-1)*Math.pow(2,o),s+=d):(a=e*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;t[n+f]=255&a,f+=p,a/=256,o-=8);for(s=s<0;t[n+f]=255&s,f+=p,s/=256,c-=8);t[n+f-p]|=128*g}},5717:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},1143:t=>{"use strict";t.exports=function(t,e,n,r,o,i,s,a){if(!t){var l;if(void 0===e)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,s,a],u=0;(l=new Error(e.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},2584:(t,e,n)=>{"use strict";var r=n(6410)(),o=n(7379)("Object.prototype.toString"),i=function(t){return!(r&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===o(t)},s=function(t){return!!i(t)||null!==t&&"object"==typeof t&&"length"in t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==o(t)&&"callee"in t&&"[object Function]"===o(t.callee)},a=function(){return i(arguments)}();i.isLegacyArguments=s,t.exports=a?i:s},5320:t=>{"use strict";var e,n,r=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o((function(){throw 42}),null,e)}catch(t){t!==n&&(o=null)}else o=null;var i=/^\s*class\b/,s=function(t){try{var e=r.call(t);return i.test(e)}catch(t){return!1}},a=function(t){try{return!s(t)&&(r.call(t),!0)}catch(t){return!1}},l=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),d=function(){return!1};if("object"==typeof document){var h=document.all;l.call(h)===l.call(document.all)&&(d=function(t){if((u||!t)&&(void 0===t||"object"==typeof t))try{var e=l.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(d(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==n)return!1}return!s(t)&&a(t)}:function(t){if(d(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return a(t);if(s(t))return!1;var e=l.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&a(t)}},8662:(t,e,n)=>{"use strict";var r,o=n(7379),i=n(9246)(/^\s*(?:function)?\*/),s=n(6410)(),a=n(1618),l=o("Object.prototype.toString"),c=o("Function.prototype.toString");t.exports=function(t){if("function"!=typeof t)return!1;if(i(c(t)))return!0;if(!s)return"[object GeneratorFunction]"===l(t);if(!a)return!1;if(void 0===r){var e=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(t){}}();r=!!e&&a(e)}return a(t)===r}},8611:t=>{"use strict";t.exports=function(t){return t!=t}},360:(t,e,n)=>{"use strict";var r=n(5559),o=n(4289),i=n(8611),s=n(9415),a=n(3194),l=r(s(),Number);o(l,{getPolyfill:s,implementation:i,shim:a}),t.exports=l},9415:(t,e,n)=>{"use strict";var r=n(8611);t.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:r}},3194:(t,e,n)=>{"use strict";var r=n(4289),o=n(9415);t.exports=function(){var t=o();return r(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},8420:(t,e,n)=>{"use strict";var r,o=n(7379),i=n(6410)(),s=n(8824),a=n(7296);if(i){var l=o("RegExp.prototype.exec"),c={},u=function(){throw c},d={toString:u,valueOf:u};"symbol"==typeof Symbol.toPrimitive&&(d[Symbol.toPrimitive]=u),r=function(t){if(!t||"object"!=typeof t)return!1;var e=a(t,"lastIndex");if(!e||!s(e,"value"))return!1;try{l(t,d)}catch(t){return t===c}}}else{var h=o("Object.prototype.toString");r=function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===h(t)}}t.exports=r},5692:(t,e,n)=>{"use strict";var r=n(6430);t.exports=function(t){return!!r(t)}},6245:(t,e,n)=>{"use strict";function r(t){this.message=t}n.d(e,{Z:()=>a}),r.prototype=new Error,r.prototype.name="InvalidCharacterError";var o="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,i=0,s=0,a="";o=e.charAt(s++);~o&&(n=i%4?64*n+o:o,i++%4)?a+=String.fromCharCode(255&n>>(-2*i&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return a};function i(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(o(t).replace(/(.)/g,(function(t,e){var n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(e)}catch(t){return o(e)}}function s(t){this.message=t}s.prototype=new Error,s.prototype.name="InvalidTokenError";const a=function(t,e){if("string"!=typeof t)throw new s("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(i(t.split(".")[n]))}catch(t){throw new s("Invalid token specified: "+t.message)}}},6119:(t,e,n)=>{"use strict";n.d(e,{sC:()=>Qe,Rt:()=>Ee,Vb:()=>tn,mC:()=>en});var r=n(7294),o=n(5108);function i(t){function e(t,e){Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.message=t,this.code=e}return e.prototype=new Error,e.prototype.name=t,e.prototype.constructor=e,e}const s=i("LaunchDarklyUnexpectedResponseError"),a=i("LaunchDarklyInvalidEnvironmentIdError"),l=i("LaunchDarklyInvalidUserError"),c=i("LaunchDarklyInvalidEventKeyError"),u=i("LaunchDarklyInvalidArgumentError"),d=i("LaunchDarklyFlagFetchError");for(var h={LDUnexpectedResponseError:s,LDInvalidEnvironmentIdError:a,LDInvalidUserError:l,LDInvalidEventKeyError:c,LDInvalidArgumentError:u,LDInvalidDataError:i("LaunchDarklyInvalidDataError"),LDFlagFetchError:d,LDTimeoutError:i("LaunchDarklyTimeoutError"),isHttpErrorRecoverable:function(t){return!(t>=400&&t<500)||400===t||408===t||429===t}},f=[],p=[],g=("undefined"!=typeof Uint8Array&&Uint8Array,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),m=0;m<64;++m)f[m]=g[m],p[g.charCodeAt(m)]=m;function y(t,e,n){for(var r,o,i=[],s=e;s>18&63]+f[o>>12&63]+f[o>>6&63]+f[63&o]);return i.join("")}p["-".charCodeAt(0)]=62,p["_".charCodeAt(0)]=63;var v=Array.isArray,b=Object.keys,x=Object.prototype.hasOwnProperty,w=function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){var r,o,i,s=v(e),a=v(n);if(s&&a){if((o=e.length)!=n.length)return!1;for(r=o;0!=r--;)if(!t(e[r],n[r]))return!1;return!0}if(s!=a)return!1;var l=e instanceof Date,c=n instanceof Date;if(l!=c)return!1;if(l&&c)return e.getTime()==n.getTime();var u=e instanceof RegExp,d=n instanceof RegExp;if(u!=d)return!1;if(u&&d)return e.toString()==n.toString();var h=b(e);if((o=h.length)!==b(n).length)return!1;for(r=o;0!=r--;)if(!x.call(n,h[r]))return!1;for(r=o;0!=r--;)if(!t(e[i=h[r]],n[i]))return!1;return!0}return e!=e&&n!=n};const k=["key","ip","country","email","firstName","lastName","avatar","name"];function S(t){return function(t){for(var e,n=t.length,r=n%3,o=[],i=16383,s=0,a=n-r;sa?a:s+i));return 1===r?(e=t[n-1],o.push(f[e>>2]+f[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],o.push(f[e>>10]+f[e>>4&63]+f[e<<2&63]+"=")),o.join("")}(function(t){const e=[];for(let n=0;n({...t,...e})),{})},getLDUserAgentString:function(t){const e=t.version||"?";return t.userAgent+"/"+e},objectHasOwnProperty:C,onNextTick:function(t){setTimeout(t,0)},sanitizeContext:function(t){if(!t)return t;let e;return null!==t.kind&&void 0!==t.kind||k.forEach((n=>{const r=t[n];void 0!==r&&"string"!=typeof r&&(e=e||{...t},e[n]=String(r))})),e||t},transformValuesToVersionedValues:function(t){const e={};for(const n in t)C(t,n)&&(e[n]={value:t[n],version:0});return e},transformVersionedValuesToValues:function(t){const e={};for(const n in t)C(t,n)&&(e[n]=t[n].value);return e},wrapPromiseCallback:function(t,e){const n=t.then((t=>(e&&setTimeout((()=>{e(null,t)}),0),t)),(t=>{if(!e)return Promise.reject(t);setTimeout((()=>{e(t,null)}),0)}));return e?void 0:n},once:function(t){let e,n=!1;return function(...r){return n||(n=!0,e=t.apply(this,r)),e}}},T=new Uint8Array(16);function P(){if(!A&&!(A="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return A(T)}var O=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function R(t){return"string"==typeof t&&O.test(t)}for(var I,M,L=[],j=0;j<256;++j)L.push((j+256).toString(16).substr(1));function _(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(L[t[e+0]]+L[t[e+1]]+L[t[e+2]]+L[t[e+3]]+"-"+L[t[e+4]]+L[t[e+5]]+"-"+L[t[e+6]]+L[t[e+7]]+"-"+L[t[e+8]]+L[t[e+9]]+"-"+L[t[e+10]]+L[t[e+11]]+L[t[e+12]]+L[t[e+13]]+L[t[e+14]]+L[t[e+15]]).toLowerCase();if(!R(n))throw TypeError("Stringified UUID is invalid");return n}var D=0,F=0;function N(t){if(!R(t))throw TypeError("Invalid UUID");var e,n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n}function B(t,e,n){function r(t,r,o,i){if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));for(var e=[],n=0;n>>9<<4)+1}function V(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function $(t,e,n,r,o,i){return V((s=V(V(e,t),V(r,i)))<<(a=o)|s>>>32-a,n);var s,a}function W(t,e,n,r,o,i,s){return $(e&n|~e&r,t,e,o,i,s)}function U(t,e,n,r,o,i,s){return $(e&r|n&~r,t,e,o,i,s)}function H(t,e,n,r,o,i,s){return $(e^n^r,t,e,o,i,s)}function q(t,e,n,r,o,i,s){return $(n^(e|~r),t,e,o,i,s)}var G=B("v3",48,(function(t){if("string"==typeof t){var e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(var n=0;n>5]>>>o%32&255,s=parseInt(r.charAt(i>>>4&15)+r.charAt(15&i),16);e.push(s)}return e}(function(t,e){t[e>>5]|=128<>5]|=(255&t[r/8])<>>32-e}var X=B("v5",80,(function(t){var e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){var r=unescape(encodeURIComponent(t));t=[];for(var o=0;o>>0;b=v,v=y,y=K(m,30)>>>0,m=g,g=k}n[0]=n[0]+g>>>0,n[1]=n[1]+m>>>0,n[2]=n[2]+y>>>0,n[3]=n[3]+v>>>0,n[4]=n[4]+b>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),J=X,Q=Object.freeze({__proto__:null,v1:function(t,e,n){var r=e&&n||0,o=e||new Array(16),i=(t=t||{}).node||I,s=void 0!==t.clockseq?t.clockseq:M;if(null==i||null==s){var a=t.random||(t.rng||P)();null==i&&(i=I=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==s&&(s=M=16383&(a[6]<<8|a[7]))}var l=void 0!==t.msecs?t.msecs:Date.now(),c=void 0!==t.nsecs?t.nsecs:F+1,u=l-D+(c-F)/1e4;if(u<0&&void 0===t.clockseq&&(s=s+1&16383),(u<0||l>D)&&void 0===t.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");D=l,F=c,M=s;var d=(1e4*(268435455&(l+=122192928e5))+c)%4294967296;o[r++]=d>>>24&255,o[r++]=d>>>16&255,o[r++]=d>>>8&255,o[r++]=255&d;var h=l/4294967296*1e4&268435455;o[r++]=h>>>8&255,o[r++]=255&h,o[r++]=h>>>24&15|16,o[r++]=h>>>16&255,o[r++]=s>>>8|128,o[r++]=255&s;for(var f=0;f<6;++f)o[r+f]=i[f];return e||_(o)},v3:Y,v4:function(t,e,n){var r=(t=t||{}).random||(t.rng||P)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return _(r)},v5:J,NIL:"00000000-0000-0000-0000-000000000000",version:function(t){if(!R(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)},validate:R,stringify:_,parse:N});const tt=["debug","info","warn","error","none"];var et={commonBasicLogger:function(t,e){if(t&&t.destination&&"function"!=typeof t.destination)throw new Error("destination for basicLogger was set to a non-function");function n(t){return function(e){o&&o[t]&&o[t].call(o,e)}}const r=t&&t.destination?[t.destination,t.destination,t.destination,t.destination]:[n("log"),n("info"),n("warn"),n("error")],i=!(!t||!t.destination),s=t&&void 0!==t.prefix&&null!==t.prefix?t.prefix:"[LaunchDarkly] ";let a=1;if(t&&t.level)for(let e=0;e{};else{const n=t;c[e]=function(){l(n,e,arguments)}}}return c},validateLogger:function(t){tt.forEach((e=>{if("none"!==e&&(!t[e]||"function"!=typeof t[e]))throw new Error("Provided logger instance must support logger."+e+"(...) method")}))}};function nt(t){return t&&t.message?t.message:"string"==typeof t||t instanceof String?t:JSON.stringify(t)}const rt=" Please see https://docs.launchdarkly.com/sdk/client-side/javascript#initialize-the-client for instructions on SDK initialization.";var ot={bootstrapInvalid:function(){return"LaunchDarkly bootstrap data is not available because the back end could not read the flags."},bootstrapOldFormat:function(){return"LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly."+rt},clientInitialized:function(){return"LaunchDarkly client initialized"},clientNotReady:function(){return"LaunchDarkly client is not ready"},debugEnqueueingEvent:function(t){return'enqueueing "'+t+'" event'},debugPostingDiagnosticEvent:function(t){return"sending diagnostic event ("+t.kind+")"},debugPostingEvents:function(t){return"sending "+t+" events"},debugStreamDelete:function(t){return'received streaming deletion for flag "'+t+'"'},debugStreamDeleteIgnored:function(t){return'received streaming deletion for flag "'+t+'" but ignored due to version check'},debugStreamPatch:function(t){return'received streaming update for flag "'+t+'"'},debugStreamPatchIgnored:function(t){return'received streaming update for flag "'+t+'" but ignored due to version check'},debugStreamPing:function(){return"received ping message from stream"},debugPolling:function(t){return"polling for feature flags at "+t},debugStreamPut:function(){return"received streaming update for all flags"},deprecated:function(t,e){return e?'"'+t+'" is deprecated, please use "'+e+'"':'"'+t+'" is deprecated'},environmentNotFound:function(){return"Environment not found. Double check that you specified a valid environment/client-side ID."+rt},environmentNotSpecified:function(){return"No environment/client-side ID was specified."+rt},errorFetchingFlags:function(t){return"Error fetching flag settings: "+nt(t)},eventCapacityExceeded:function(){return"Exceeded event queue capacity. Increase capacity to avoid dropping events."},eventWithoutContext:function(){return"Be sure to call `identify` in the LaunchDarkly client: https://docs.launchdarkly.com/sdk/features/identify#javascript"},httpErrorMessage:function(t,e,n){return"Received error "+t+(401===t?" (invalid SDK key)":"")+" for "+e+" - "+(h.isHttpErrorRecoverable(t)?n:"giving up permanently")},httpUnavailable:function(){return"Cannot make HTTP requests in this environment."+rt},identifyDisabled:function(){return"identify() has no effect here; it must be called on the main client instance"},inspectorMethodError:(t,e)=>`an inspector: "${e}" of type: "${t}" generated an exception`,invalidContentType:function(t){return'Expected application/json content type but got "'+t+'"'},invalidData:function(){return"Invalid data received from LaunchDarkly; connection may have been interrupted"},invalidInspector:(t,e)=>`an inspector: "${e}" of an invalid type (${t}) was configured`,invalidKey:function(){return"Event key must be a string"},invalidMetricValue:t=>`The track function was called with a non-numeric "metricValue" (${t}), only numeric metric values are supported.`,invalidContext:function(){return"Invalid context specified."+rt},invalidTagValue:t=>`Config option "${t}" must only contain letters, numbers, ., _ or -.`,localStorageUnavailable:function(t){return"local storage is unavailable: "+nt(t)},networkError:t=>"network error"+(t?" ("+t+")":""),optionBelowMinimum:(t,e,n)=>'Config option "'+t+'" was set to '+e+", changing to minimum value of "+n,streamClosing:function(){return"Closing stream connection"},streamConnecting:function(t){return"Opening stream connection to "+t},streamError:function(t,e){return"Error on stream connection: "+nt(t)+", will continue retrying after "+e+" milliseconds."},tagValueTooLong:t=>`Value of "${t}" was longer than 64 characters and was discarded.`,unknownCustomEventKey:function(t){return'Custom event "'+t+'" does not exist'},unknownOption:t=>'Ignoring unknown config option "'+t+'"',contextNotSpecified:function(){return"No context specified."+rt},unrecoverableStreamError:t=>`Error on stream connection ${nt(t)}, giving up permanently`,wrongOptionType:(t,e,n)=>'Config option "'+t+'" should be of type '+e+", got "+n+", using default value",wrongOptionTypeBoolean:(t,e)=>'Config option "'+t+'" should be a boolean, got '+e+", converting to boolean"};const{validateLogger:it}=et,st={baseUrl:{default:"https://app.launchdarkly.com"},streamUrl:{default:"https://clientstream.launchdarkly.com"},eventsUrl:{default:"https://events.launchdarkly.com"},sendEvents:{default:!0},streaming:{type:"boolean"},sendLDHeaders:{default:!0},requestHeaderTransform:{type:"function"},sendEventsOnlyForVariation:{default:!1},useReport:{default:!1},evaluationReasons:{default:!1},eventCapacity:{default:100,minimum:1},flushInterval:{default:2e3,minimum:2e3},samplingInterval:{default:0,minimum:0},streamReconnectDelay:{default:1e3,minimum:0},allAttributesPrivate:{default:!1},privateAttributes:{default:[]},bootstrap:{type:"string|object"},diagnosticRecordingInterval:{default:9e5,minimum:2e3},diagnosticOptOut:{default:!1},wrapperName:{type:"string"},wrapperVersion:{type:"string"},stateProvider:{type:"object"},application:{validator:function(t,e,n){const r={};return e.id&&(r.id=ct(`${t}.id`,e.id,n)),e.version&&(r.version=ct(`${t}.version`,e.version,n)),r}},inspectors:{default:[]},hooks:{default:[]},plugins:{default:[]}},at=/^(\w|\.|-)+$/;function lt(t){return t&&t.replace(/\/+$/,"")}function ct(t,e,n){if("string"==typeof e&&e.match(at)){if(!(e.length>64))return e;n.warn(ot.tagValueTooLong(t))}else n.warn(ot.invalidTagValue(t))}var ut={baseOptionDefs:st,validate:function(t,e,n,r){const o=E.extend({logger:{default:r}},st,n),i={};function s(t){E.onNextTick((()=>{e&&e.maybeReportError(new h.LDInvalidArgumentError(t))}))}let a=E.extend({},t||{});return function(t){const e=t;Object.keys(i).forEach((t=>{if(void 0!==e[t]){const n=i[t];r&&r.warn(ot.deprecated(t,n)),n&&(void 0===e[n]&&(e[n]=e[t]),delete e[t])}}))}(a),a=function(t){const e=E.extend({},t);return Object.keys(o).forEach((t=>{void 0!==e[t]&&null!==e[t]||(e[t]=o[t]&&o[t].default)})),e}(a),a=function(t){const e=E.extend({},t),n=t=>{if(null===t)return"any";if(void 0===t)return;if(Array.isArray(t))return"array";const e=typeof t;return"boolean"===e||"string"===e||"number"===e||"function"===e?e:"object"};return Object.keys(t).forEach((i=>{const a=t[i];if(null!=a){const l=o[i];if(void 0===l)s(ot.unknownOption(i));else{const o=l.type||n(l.default),c=l.validator;if(c){const n=c(i,t[i],r);void 0!==n?e[i]=n:delete e[i]}else if("any"!==o){const t=o.split("|"),r=n(a);t.indexOf(r)<0?"boolean"===o?(e[i]=!!a,s(ot.wrongOptionTypeBoolean(i,r))):(s(ot.wrongOptionType(i,o,r)),e[i]=l.default):"number"===r&&void 0!==l.minimum&&aArray.isArray(r[t])?r[t].sort().map((e=>`${t}/${e}`)):[`${t}/${r[t]}`])).reduce(((t,e)=>t.concat(e)),[]).join(" ")),n},transformHeaders:function(t,e){return e&&e.requestHeaderTransform?e.requestHeaderTransform({...t}):t}};const{v1:ft}=Q,{getLDHeaders:pt,transformHeaders:gt}=ht;var mt=function(t,e,n){const r=E.extend({"Content-Type":"application/json"},pt(t,n)),o={sendEvents:(e,o,i)=>{if(!t.httpRequest)return Promise.resolve();const s=JSON.stringify(e),a=i?null:ft();return function e(l){const c=i?r:E.extend({},r,{"X-LaunchDarkly-Event-Schema":"4","X-LaunchDarkly-Payload-ID":a});return t.httpRequest("POST",o,gt(c,n),s).promise.then((t=>{if(t)return t.status>=400&&h.isHttpErrorRecoverable(t.status)&&l?e(!1):function(t){const e={status:t.status},n=t.header("date");if(n){const t=Date.parse(n);t&&(e.serverTime=t)}return e}(t)})).catch((()=>l?e(!1):Promise.reject()))}(!0).catch((()=>{}))}};return o};const{commonBasicLogger:yt}=et;function vt(t){return"string"==typeof t&&"kind"!==t&&t.match(/^(\w|\.|-)+$/)}function bt(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}var xt={checkContext:function(t,e){if(t){if(e&&(void 0===t.kind||null===t.kind))return void 0!==t.key&&null!==t.key;const n=t.key,r=void 0===t.kind?"user":t.kind,o=vt(r),i="multi"===r||null!=n&&""!==n;if("multi"===r){const e=Object.keys(t).filter((t=>"kind"!==t));return i&&e.every((t=>vt(t)))&&e.every((e=>{const n=t[e].key;return null!=n&&""!==n}))}return i&&o}return!1},getContextKeys:function(t,e=yt()){if(!t)return;const n={},{kind:r,key:o}=t;switch(r){case void 0:n.user=`${o}`;break;case"multi":Object.entries(t).filter((([t])=>"kind"!==t)).forEach((([t,e])=>{e&&e.key&&(n[t]=e.key)}));break;case null:e.warn(`null is not a valid context kind: ${t}`);break;case"":e.warn(`'' is not a valid context kind: ${t}`);break;default:n[r]=`${o}`}return n},getContextKinds:function(t){return t?null===t.kind||void 0===t.kind?["user"]:"multi"!==t.kind?[t.kind]:Object.keys(t).filter((t=>"kind"!==t)):[]},getCanonicalKey:function(t){if(t){if((void 0===t.kind||null===t.kind||"user"===t.kind)&&t.key)return t.key;if("multi"!==t.kind&&t.key)return`${t.kind}:${bt(t.key)}`;if("multi"===t.kind)return Object.keys(t).sort().filter((t=>"kind"!==t)).map((e=>`${e}:${bt(t[e].key)}`)).join(":")}}};const{getContextKinds:wt}=xt;function kt(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function St(t){return(t.startsWith("/")?t.substring(1):t).split("/").map((t=>t.indexOf("~")>=0?t.replace(/~1/g,"/").replace(/~0/g,"~"):t))}function Ct(t){return!t.startsWith("/")}function At(t,e){const n=Ct(t),r=Ct(e);if(n&&r)return t===e;if(n){const n=St(e);return 1===n.length&&t===n[0]}if(r){const n=St(t);return 1===n.length&&e===n[0]}return t===e}function Et(t){return`/${kt(t)}`}var Tt={cloneExcluding:function(t,e){const n=[],r={},o=[];for(n.push(...Object.keys(t).map((e=>({key:e,ptr:Et(e),source:t,parent:r,visited:[t]}))));n.length;){const t=n.pop();if(e.some((e=>At(e,t.ptr))))o.push(t.ptr);else{const e=t.source[t.key];if(null===e)t.parent[t.key]=e;else if(Array.isArray(e))t.parent[t.key]=[...e];else if("object"==typeof e){if(t.visited.includes(e))continue;t.parent[t.key]={},n.push(...Object.keys(e).map((n=>{return{key:n,ptr:(r=t.ptr,o=kt(n),`${r}/${o}`),source:e,parent:t.parent[t.key],visited:[...t.visited,e]};var r,o})))}else t.parent[t.key]=e}}return{cloned:r,excluded:o.sort()}},compare:At,literalToReference:Et};const{getContextKeys:Pt}=xt;const Ot="ready",Rt="initialized",It="failed",{appendUrlPath:Mt,base64URLEncode:Lt,objectHasOwnProperty:jt}=E,{getLDHeaders:_t,transformHeaders:Dt}=ht,{isHttpErrorRecoverable:Ft}=h;const{transformHeaders:Nt,getLDHeaders:Bt}=ht,zt="application/json";const{v1:Vt}=Q,{getContextKinds:$t}=xt;var Wt=function(t){function e(t){return null==t||"user"===t?"ld:$anonUserId":`ld:$contextKey:${t}`}function n(n,r){return null!==r.key&&void 0!==r.key?(r.key=r.key.toString(),Promise.resolve(r)):r.anonymous?function(n){return t.get(e(n))}(n).then((o=>{if(o)return r.key=o,r;{const o=Vt();return r.key=o,function(n,r){return t.set(e(r),n)}(o,n).then((()=>r))}})):Promise.reject(new h.LDInvalidUserError(ot.invalidContext()))}this.processContext=t=>{if(!t)return Promise.reject(new h.LDInvalidUserError(ot.contextNotSpecified()));const e=E.clone(t);if("multi"===t.kind){const t=$t(e);return Promise.all(t.map((t=>n(t,e[t])))).then((()=>e))}return n(t.kind,e)}};const{v1:Ut}=Q,{baseOptionDefs:Ht}=ut,{appendUrlPath:qt}=E;const{onNextTick:Gt}=E,Yt={flagUsed:"flag-used",flagDetailsChanged:"flag-details-changed",flagDetailChanged:"flag-detail-changed",clientIdentityChanged:"client-identity-changed"};Object.freeze(Yt);var Zt={InspectorTypes:Yt,InspectorManager:function(t,e){const n={},r={[Yt.flagUsed]:[],[Yt.flagDetailsChanged]:[],[Yt.flagDetailChanged]:[],[Yt.clientIdentityChanged]:[]},o={[Yt.flagUsed]:[],[Yt.flagDetailsChanged]:[],[Yt.flagDetailChanged]:[],[Yt.clientIdentityChanged]:[]},i=t&&t.map((t=>function(t,e){let n=!1;const r={type:t.type,name:t.name,synchronous:t.synchronous,method:(...o)=>{try{t.method(...o)}catch{n||(n=!0,e.warn(ot.inspectorMethodError(r.type,r.name)))}}};return r}(t,e)));return i&&i.forEach((t=>{Object.prototype.hasOwnProperty.call(r,t.type)&&!t.synchronous?r[t.type].push(t):Object.prototype.hasOwnProperty.call(o,t.type)&&t.synchronous?o[t.type].push(t):e.warn(ot.invalidInspector(t.type,t.name))})),n.hasListeners=t=>r[t]&&r[t].length||o[t]&&o[t].length,n.onFlagUsed=(t,e,n)=>{const i=Yt.flagUsed;o[i].length&&o[i].forEach((r=>r.method(t,e,n))),r[i].length&&Gt((()=>{r[i].forEach((r=>r.method(t,e,n)))}))},n.onFlags=t=>{const e=Yt.flagDetailsChanged;o[e].length&&o[e].forEach((e=>e.method(t))),r[e].length&&Gt((()=>{r[e].forEach((e=>e.method(t)))}))},n.onFlagChanged=(t,e)=>{const n=Yt.flagDetailChanged;o[n].length&&o[n].forEach((n=>n.method(t,e))),r[n].length&&Gt((()=>{r[n].forEach((n=>n.method(t,e)))}))},n.onIdentityChanged=t=>{const e=Yt.clientIdentityChanged;o[e].length&&o[e].forEach((e=>e.method(t))),r[e].length&&Gt((()=>{r[e].forEach((e=>e.method(t)))}))},n}};const{LDTimeoutError:Kt}=h,Xt="unknown hook";function Jt(t,e,n,r,o){try{return r()}catch(r){return t?.error(`An error was encountered in "${e}" of the "${n}" hook: ${r}`),o}}function Qt(t,e){try{return e.getMetadata().name||Xt}catch{return t.error("Exception thrown getting metadata for hook. Unable to get hook name."),Xt}}const te="unknown plugin";function ee(t,e){try{return e.getMetadata().name||te}catch(e){return t.error("Exception thrown getting metadata for plugin. Unable to get plugin name."),te}}var ne={getPluginHooks:function(t,e,n){const r=[];return n.forEach((n=>{try{const o=n.getHooks?.(e);void 0===o?t.error(`Plugin ${ee(t,n)} returned undefined from getHooks.`):o&&o.length>0&&r.push(...o)}catch(e){t.error(`Exception thrown getting hooks for plugin ${ee(t,n)}. Unable to get hooks.`)}})),r},registerPlugins:function(t,e,n,r){r.forEach((r=>{try{r.register(n,e)}catch(e){t.error(`Exception thrown registering plugin ${ee(t,r)}.`)}}))},createPluginEnvironment:function(t,e,n){const r={};t.userAgent&&(r.name=t.userAgent),t.version&&(r.version=t.version),n.wrapperName&&(r.wrapperName=n.wrapperName),n.wrapperVersion&&(r.wrapperVersion=n.wrapperVersion);const o={};n.application&&(n.application.name&&(o.name=n.application.name),n.application.version&&(o.version=n.application.version));const i={sdk:r,clientSideId:e};return Object.keys(o).length>0&&(i.application=o),i}};const{commonBasicLogger:re}=et,{checkContext:oe,getContextKeys:ie}=xt,{InspectorTypes:se,InspectorManager:ae}=Zt,{getPluginHooks:le,registerPlugins:ce,createPluginEnvironment:ue}=ne,de="change",he="internal-change";var fe={initialize:function(t,e,n,r,i){const s=n&&n.logger?n.logger:i&&i.logger&&i.logger.default||re("warn"),a=function(t){const e={},n={};return e.on=function(t,e,r){n[t]=n[t]||[],n[t]=n[t].concat({handler:e,context:r})},e.off=function(t,e,r){if(n[t])for(let o=0;o{const n=()=>{t.off(Ot,n),e()};t.on(Ot,n)})).catch((()=>{}));return{getInitializationPromise:()=>o||(e?Promise.resolve():n?Promise.reject(r):(o=new Promise(((e,n)=>{const r=()=>{t.off(Rt,r),e()},o=e=>{t.off(It,o),n(e)};t.on(Rt,r),t.on(It,o)})),o)),getReadyPromise:()=>i,signalSuccess:()=>{e||n||(e=!0,t.emit(Rt),t.emit(Ot))},signalFailure:o=>{e||n||(n=!0,r=o,t.emit(It,o),t.emit(Ot)),t.maybeReportError(o)}}}(a),c=ut.validate(n,a,i,s),u=ae(c.inspectors,s),d=c.sendEvents;let f=t,p=c.hash;const g=[...c.plugins],m=ue(r,t,c),y=le(s,m,g),v=function(t,e){const n=e?[...e]:[];return{withEvaluation:function(e,r,o,i){if(0===n.length)return i();const s=[...n],a={flagKey:e,context:r,defaultValue:o},l=function(t,e,n){return e.map((e=>Jt(t,"beforeEvaluation",Qt(t,e),(()=>e?.beforeEvaluation?.(n,{})??{}),{})))}(t,s,a),c=i();return function(t,e,n,r,o){for(let i=e.length-1;i>=0;i-=1){const s=e[i],a=r[i];Jt(t,"afterEvaluation",Qt(t,s),(()=>s?.afterEvaluation?.(n,a,o)??{}),{})}}(t,s,a,l,c),c},identify:function(e,r){const o=[...n],i={context:e,timeout:r},s=function(t,e,n){return e.map((e=>Jt(t,"beforeIdentify",Qt(t,e),(()=>e?.beforeIdentify?.(n,{})??{}),{})))}(t,o,i);return e=>{!function(t,e,n,r,o){for(let i=e.length-1;i>=0;i-=1){const s=e[i],a=r[i];Jt(t,"afterIdentify",Qt(t,s),(()=>s?.afterIdentify?.(n,a,o)??{}),{})}}(t,o,i,s,e)}},addHook:function(t){n.push(t)},afterTrack:function(e){if(0===n.length)return;const r=[...n];!function(t,e,n){for(let r=e.length-1;r>=0;r-=1){const o=e[r];Jt(t,"afterTrack",Qt(t,o),(()=>o?.afterTrack?.(n)),void 0)}}(t,r,e)}}}(s,[...c.hooks,...y]),b=function(t,e){const n={};let r=!1;const o=t=>{r||(r=!0,e.warn(ot.localStorageUnavailable(t)))};return n.isEnabled=()=>!!t,n.get=e=>new Promise((n=>{t?t.get(e).then(n).catch((t=>{o(t),n(void 0)})):n(void 0)})),n.set=(e,n)=>new Promise((r=>{t?t.set(e,n).then((()=>r(!0))).catch((t=>{o(t),r(!1)})):r(!1)})),n.clear=e=>new Promise((n=>{t?t.clear(e).then((()=>n(!0))).catch((t=>{o(t),n(!1)})):n(!1)})),n}(r.localStorage,s),x=mt(r,0,c),w=c.sendEvents&&!c.diagnosticOptOut,k=w?function(t){const e={diagnosticId:Ut()};return t&&(e.sdkKeySuffix=t.length>6?t.substring(t.length-6):t),e}(f):null,S=w?function(t){let e,n,r,o;function i(t){e=t,n=0,r=0,o=[]}return i(t),{getProps:()=>({dataSinceDate:e,droppedEvents:n,eventsInLastBatch:r,streamInits:o}),setProps:t=>{e=t.dataSinceDate,n=t.droppedEvents||0,r=t.eventsInLastBatch||0,o=t.streamInits||[]},incrementDroppedEvents:()=>{n++},setEventsInLastBatch:t=>{r=t},recordStreamInit:(t,e,n)=>{const r={timestamp:t,failed:e,durationMillis:n};o.push(r)},reset:i}}((new Date).getTime()):null,C=w?function(t,e,n,r,o,i,s){const a=!!t.diagnosticUseCombinedEvent,l="ld:"+o+":$diagnostics",c=qt(i.eventsUrl,"/events/diagnostic/"+o),u=i.diagnosticRecordingInterval,d=n;let h,f,p=!!i.streaming;const g={};function m(){return{sdk:b(),configuration:{customBaseURI:i.baseUrl!==Ht.baseUrl.default,customStreamURI:i.streamUrl!==Ht.streamUrl.default,customEventsURI:i.eventsUrl!==Ht.eventsUrl.default,eventsCapacity:i.eventCapacity,eventsFlushIntervalMillis:i.flushInterval,reconnectTimeMillis:i.streamReconnectDelay,streamingDisabled:!p,allAttributesPrivate:!!i.allAttributesPrivate,diagnosticRecordingIntervalMillis:i.diagnosticRecordingInterval,usingSecureMode:!!i.hash,bootstrapMode:!!i.bootstrap,fetchGoalsDisabled:!i.fetchGoals,sendEventsOnlyForVariation:!!i.sendEventsOnlyForVariation},platform:t.diagnosticPlatformData}}function y(t){i.logger&&i.logger.debug(ot.debugPostingDiagnosticEvent(t)),r.sendEvents(t,c,!0).then((()=>{})).catch((()=>{}))}function v(){y(function(){const t=(new Date).getTime();let e={kind:a?"diagnostic-combined":"diagnostic",id:s,creationDate:t,...d.getProps()};return a&&(e={...e,...m()}),d.reset(t),e}()),f=setTimeout(v,u),h=(new Date).getTime(),a&&function(){if(e.isEnabled()){const t={...d.getProps()};e.set(l,JSON.stringify(t))}}()}function b(){const e={...t.diagnosticSdkData};return i.wrapperName&&(e.wrapperName=i.wrapperName),i.wrapperVersion&&(e.wrapperVersion=i.wrapperVersion),e}return g.start=()=>{a?function(t){if(!e.isEnabled())return t(!1);e.get(l).then((e=>{if(e)try{const t=JSON.parse(e);d.setProps(t),h=t.dataSinceDate}catch(t){}t(!0)})).catch((()=>{t(!1)}))}((t=>{if(t){const t=(h||0)+u,e=(new Date).getTime();e>=t?v():f=setTimeout(v,t-e)}else 0===Math.floor(4*Math.random())?v():f=setTimeout(v,u)})):(y({kind:"diagnostic-init",id:s,creationDate:d.getProps().dataSinceDate,...m()}),f=setTimeout(v,u))},g.stop=()=>{f&&clearTimeout(f)},g.setStreaming=t=>{p=t},g}(r,b,S,x,f,c,k):null,A=function(t,e,n,r){const o=e.streamUrl,i=e.logger,s={},a=Mt(o,"/eval/"+n),l=e.useReport,c=e.evaluationReasons,u=e.streamReconnectDelay,d=_t(t,e);let h,f=!1,p=null,g=null,m=null,y=null,v=null,b=0;function x(t){if(t.status&&"number"==typeof t.status&&!Ft(t.status))return S(),i.error(ot.unrecoverableStreamError(t)),void(g&&(clearTimeout(g),g=null));const e=function(){const t=(e=function(){const t=u*Math.pow(2,b);return t>3e4?3e4:t}(),e-Math.trunc(.5*Math.random()*e));var e;return b+=1,t}();f||(i.warn(ot.streamError(t,e)),f=!0),C(!1),S(),w(e)}function w(t){g||(t?g=setTimeout(k,t):k())}function k(){let r;g=null;let s="";const u={headers:d,readTimeoutMillis:3e5};if(t.eventSourceFactory){null!=y&&(s="h="+y),l?t.eventSourceAllowsReport?(r=a,u.method="REPORT",u.headers["Content-Type"]="application/json",u.body=JSON.stringify(m)):(r=Mt(o,"/ping/"+n),s=""):r=a+"/"+Lt(JSON.stringify(m)),u.headers=Dt(u.headers,e),c&&(s=s+(s?"&":"")+"withReasons=true"),r=r+(s?"?":"")+s,S(),i.info(ot.streamConnecting(r)),h=(new Date).getTime(),p=t.eventSourceFactory(r,u);for(const t in v)jt(v,t)&&p.addEventListener(t,v[t]);p.onerror=x,p.onopen=()=>{b=0}}}function S(){p&&(i.info(ot.streamClosing()),p.close(),p=null)}function C(t){h&&r&&r.recordStreamInit(h,!t,(new Date).getTime()-h),h=null}return s.connect=function(t,e,n){m=t,y=e,v={};for(const t in n||{})v[t]=function(e){f=!1,C(!0),n[t]&&n[t](e)};w()},s.disconnect=function(){clearTimeout(g),g=null,S()},s.isConnected=function(){return!!(p&&t.eventSourceIsActive&&t.eventSourceIsActive(p))},s}(r,c,f,S),T=c.eventProcessor||function(t,e,n,r=null,o=null,i=null){const s={},a=i||mt(t,0,e),l=E.appendUrlPath(e.eventsUrl,"/events/bulk/"+n),c=function(){const t={};let e=0,n=0,r={},o={};return t.summarizeEvent=t=>{if("feature"===t.kind){const i=t.key+":"+(null!==t.variation&&void 0!==t.variation?t.variation:"")+":"+(null!==t.version&&void 0!==t.version?t.version:""),s=r[i];let a=o[t.key];a||(a=new Set,o[t.key]=a),function(t){return t.context?wt(t.context):t.contextKeys?Object.keys(t.contextKeys):[]}(t).forEach((t=>a.add(t))),s?s.count=s.count+1:r[i]={count:1,key:t.key,version:t.version,variation:t.variation,value:t.value,default:t.default},(0===e||t.creationDaten&&(n=t.creationDate)}},t.getSummary=()=>{const t={};let i=!0;for(const e of Object.values(r)){let n=t[e.key];n||(n={default:e.default,counters:[],contextKinds:[...o[e.key]]},t[e.key]=n);const r={value:e.value,count:e.count};void 0!==e.variation&&null!==e.variation&&(r.variation=e.variation),void 0!==e.version&&null!==e.version?r.version=e.version:r.unknown=!0,n.counters.push(r),i=!1}return i?null:{startDate:e,endDate:n,features:t}},t.clearSummary=()=>{e=0,n=0,r={},o={}},t}(),u=function(t){const e={},n=t.allAttributesPrivate,r=t.privateAttributes||[],o=["key","kind","_meta","anonymous"],i=["name","ip","firstName","lastName","email","avatar","country"],s=(t,e)=>{if("object"!=typeof t||null===t||Array.isArray(t))return;const{cloned:i,excluded:s}=Tt.cloneExcluding(t,((t,e)=>(n||e&&t.anonymous?Object.keys(t):[...r,...t._meta&&t._meta.privateAttributes||[]]).filter((t=>!o.some((e=>Tt.compare(t,e))))))(t,e));return i.key=String(i.key),s.length&&(i._meta||(i._meta={}),i._meta.redactedAttributes=s),i._meta&&(delete i._meta.privateAttributes,0===Object.keys(i._meta).length&&delete i._meta),void 0!==i.anonymous&&(i.anonymous=!!i.anonymous),i};return e.filter=(t,e=!1)=>void 0===t.kind||null===t.kind?s((t=>{const e={...t.custom||{},kind:"user",key:t.key};void 0!==t.anonymous&&(e.anonymous=!!t.anonymous);for(const n of i)delete e[n],void 0!==t[n]&&null!==t[n]&&(e[n]=String(t[n]));return void 0!==t.privateAttributeNames&&null!==t.privateAttributeNames&&(e._meta=e._meta||{},e._meta.privateAttributes=t.privateAttributeNames.map((t=>t.startsWith("/")?Tt.literalToReference(t):t))),e})(t),e):"multi"===t.kind?((t,e)=>{const n={kind:t.kind},r=Object.keys(t);for(const o of r)if("kind"!==o){const r=s(t[o],e);r&&(n[o]=r)}return n})(t,e):s(t,e),e}(e),d=e.samplingInterval,f=e.eventCapacity,p=e.flushInterval,g=e.logger;let m,y=[],v=0,b=!1,x=!1;function w(){return 0===d||0===Math.floor(Math.random()*d)}function k(t){y.lengthv&&r.debugEventsUntilDate>(new Date).getTime()):e=w(),e&&k(function(t){const e=E.extend({},t);return"identify"===t.kind||"feature"===t.kind||"custom"===t.kind?e.context=u.filter(t.context):(e.contextKeys=Pt(t.context,g),delete e.context),"feature"===t.kind&&(delete e.trackEvents,delete e.debugEventsUntilDate),e}(t)),n){const e=E.extend({},t,{kind:"debug"});e.context=u.filter(e.context),delete e.trackEvents,delete e.debugEventsUntilDate,k(e)}},s.flush=function(){if(b)return Promise.resolve();const t=y,e=c.getSummary();return c.clearSummary(),e&&(e.kind="summary",t.push(e)),r&&r.setEventsInLastBatch(t.length),0===t.length?Promise.resolve():(y=[],g.debug(ot.debugPostingEvents(t.length)),a.sendEvents(t,l).then((t=>{t&&(t.serverTime&&(v=t.serverTime),h.isHttpErrorRecoverable(t.status)||(b=!0),t.status>=400&&E.onNextTick((()=>{o.maybeReportError(new h.LDUnexpectedResponseError(ot.httpErrorMessage(t.status,"event posting","some events were dropped")))})))})))},s.start=function(){const t=()=>{s.flush(),m=setTimeout(t,p)};m=setTimeout(t,p)},s.stop=function(){clearTimeout(m)},s}(r,c,f,S,a,x),P=function(t,e,n){const r=e.baseUrl,o=e.useReport,i=e.evaluationReasons,s=e.logger,a={},l={};function c(n,r){if(!t.httpRequest)return new Promise(((t,e)=>{e(new h.LDFlagFetchError(ot.httpUnavailable()))}));const o=r?"REPORT":"GET",i=Bt(t,e);r&&(i["Content-Type"]=zt);let s=l[n];s||(s=function(t){let e,n,r,o;const i={addPromise:(i,s)=>{e=i,n&&n(),n=s,i.then((n=>{e===i&&(r(n),t&&t())}),(n=>{e===i&&(o(n),t&&t())}))}};return i.resultPromise=new Promise(((t,e)=>{r=t,o=e})),i}((()=>{delete l[n]})),l[n]=s);const a=t.httpRequest(o,n,Nt(i,e),r),c=a.promise.then((t=>{if(200===t.status){if(t.header("content-type")&&t.header("content-type").substring(0,16)===zt)return JSON.parse(t.body);{const e=ot.invalidContentType(t.header("content-type")||"");return Promise.reject(new h.LDFlagFetchError(e))}}return Promise.reject(function(t){return 404===t.status?new h.LDInvalidEnvironmentIdError(ot.environmentNotFound()):new h.LDFlagFetchError(ot.errorFetchingFlags(t.statusText||String(t.status)))}(t))}),(t=>Promise.reject(new h.LDFlagFetchError(ot.networkError(t)))));return s.addPromise(c,(()=>{a.cancel&&a.cancel()})),s.resultPromise}return a.fetchJSON=function(t){return c(E.appendUrlPath(r,t),null)},a.fetchFlagSettings=function(t,e){let a,l,u,d="";return o?(l=[r,"/sdk/evalx/",n,"/context"].join(""),u=JSON.stringify(t)):(a=E.base64URLEncode(JSON.stringify(t)),l=[r,"/sdk/evalx/",n,"/contexts/",a].join("")),e&&(d="h="+e),i&&(d=d+(d?"&":"")+"withReasons=true"),l=l+(d?"?":"")+d,s.debug(ot.debugPolling(l)),c(l,u)},a}(r,c,f);let O,R,I,M={},L=c.streaming,j=!1,_=!1,D=!0;const F=c.stateProvider,N=function(t,e){const n={};let r;return n.setContext=function(t){r=E.sanitizeContext(t),r&&e&&e(E.clone(r))},n.getContext=function(){return r?E.clone(r):null},n}(0,(function(t){(function(t){F||t&&V({kind:"identify",context:t,creationDate:(new Date).getTime()})})(t),u.hasListeners(se.clientIdentityChanged)&&u.onIdentityChanged(N.getContext())})),B=new Wt(b),z=b.isEnabled()?function(t,e,n,r){const o={};function i(){let t="";const o=r.getContext();return o&&(t=n||E.btoa(JSON.stringify(o))),"ld:"+e+":"+t}return o.loadFlags=()=>t.get(i()).then((t=>{if(null==t)return null;try{let e=JSON.parse(t);if(e){const t=e.$schema;void 0===t||t<1?e=E.transformValuesToVersionedValues(e):delete e.$schema}return e}catch(t){return o.clearFlags().then((()=>null))}})),o.saveFlags=e=>{const n=E.extend({},e,{$schema:1});return t.set(i(),JSON.stringify(n))},o.clearFlags=()=>t.clear(i()),o}(b,f,p,N):null;function V(t){f&&(F&&F.enqueueEvent&&F.enqueueEvent(t)||(t.context?(D=!1,!d||_||r.isDoNotTrack()||(s.debug(ot.debugEnqueueingEvent(t.kind)),T.enqueue(t))):D&&(s.warn(ot.eventWithoutContext()),D=!1)))}function $(t,e){u.hasListeners(se.flagDetailChanged)&&u.onFlagChanged(t.key,G(e))}function W(){u.hasListeners(se.flagDetailsChanged)&&u.onFlags(Object.entries(M).map((([t,e])=>({key:t,detail:G(e)}))).reduce(((t,e)=>(t[e.key]=e.detail,t)),{}))}function U(t,e,n,r){const o=N.getContext(),i=new Date,s={kind:"feature",key:t,context:o,value:e?e.value:null,variation:e?e.variationIndex:null,default:n,creationDate:i.getTime()},a=M[t];a&&(s.version=a.flagVersion?a.flagVersion:a.version,s.trackEvents=a.trackEvents,s.debugEventsUntilDate=a.debugEventsUntilDate),(r||a&&a.trackReason)&&e&&(s.reason=e.reason),V(s)}function H(t){return oe(t,!1)?Promise.resolve(t):Promise.reject(new h.LDInvalidUserError(ot.invalidContext()))}function q(t,e,n,r,o,i){let s,a;return M&&E.objectHasOwnProperty(M,t)&&M[t]&&!M[t].deleted?(a=M[t],s=G(a),null!==a.value&&void 0!==a.value||(s.value=e)):s={value:e,variationIndex:null,reason:{kind:"ERROR",errorKind:"FLAG_NOT_FOUND"}},n&&(o||a?.prerequisites?.forEach((t=>{q(t,void 0,n,!1,!1,!1)})),U(t,s,e,r)),!o&&i&&function(t,e){u.hasListeners(se.flagUsed)&&u.onFlagUsed(t,e,N.getContext())}(t,s),s}function G(t){return{value:t.value,variationIndex:void 0===t.variation?null:t.variation,reason:t.reason||null}}function Y(){if(R=!0,!N.getContext())return;const t=t=>{try{return JSON.parse(t)}catch(t){return void a.maybeReportError(new h.LDInvalidDataError(ot.invalidData()))}};A.connect(N.getContext(),p,{ping:function(){s.debug(ot.debugStreamPing());const t=N.getContext();P.fetchFlagSettings(t,p).then((e=>{E.deepEquals(t,N.getContext())&&K(e||{})})).catch((t=>{a.maybeReportError(new h.LDFlagFetchError(ot.errorFetchingFlags(t)))}))},put:function(e){const n=t(e.data);n&&(s.debug(ot.debugStreamPut()),K(n))},patch:function(e){const n=t(e.data);if(!n)return;const r=M[n.key];if(!r||!r.version||!n.version||r.version{}))}function X(t){const e=Object.keys(t);if(e.length>0){const n={};e.forEach((e=>{const r=t[e].current,o=r?r.value:void 0,i=t[e].previous;a.emit(de+":"+e,o,i),n[e]=r?{current:o,previous:i}:{previous:i}})),a.emit(de,n),a.emit(he,M),c.sendEventsOnlyForVariation||F||e.forEach((e=>{U(e,t[e].current)}))}return O&&z?z.saveFlags(M):Promise.resolve()}function J(){const t=L||I&&void 0===L;t&&!R?Y():!t&&R&&Z(),C&&C.setStreaming(t)}function Q(t){return t===de||t.substr(0,7)===de+":"}if("string"==typeof c.bootstrap&&"LOCALSTORAGE"===c.bootstrap.toUpperCase()&&(z?O=!0:s.warn(ot.localStorageUnavailable())),"object"==typeof c.bootstrap&&(M=function(t){const e=Object.keys(t),n="$flagsState",r="$valid",o=t[n];!o&&e.length&&s.warn(ot.bootstrapOldFormat()),!1===t[r]&&s.warn(ot.bootstrapInvalid());const i={};return e.forEach((e=>{if(e!==n&&e!==r){let n={value:t[e]};o&&o[e]?n=E.extend(n,o[e]):n.version=0,i[e]=n}})),i}(c.bootstrap)),F){const t=F.getInitialState();t?tt(t):F.on("init",tt),F.on("update",(function(t){t.context&&N.setContext(t.context),t.flags&&K(t.flags)}))}else(function(){if(!t)return Promise.reject(new h.LDInvalidEnvironmentIdError(ot.environmentNotSpecified()));let n;return B.processContext(e).then(H).then((t=>(n=E.once(v.identify(t,void 0)),t))).then((t=>(n?.({status:"completed"}),N.setContext(t),"object"==typeof c.bootstrap?et():O?z.loadFlags().then((t=>null==t?(M={},P.fetchFlagSettings(N.getContext(),p).then((t=>K(t||{}))).then(et).catch((t=>{nt(new h.LDFlagFetchError(ot.errorFetchingFlags(t)))}))):(M=t,E.onNextTick(et),P.fetchFlagSettings(N.getContext(),p).then((t=>K(t))).catch((t=>a.maybeReportError(t)))))):P.fetchFlagSettings(N.getContext(),p).then((t=>{M=t||{},W(),et()})).catch((t=>{M={},nt(t)}))))).catch((t=>{throw n?.({status:"error"}),t}))})().catch(nt);function tt(t){f=t.environment,N.setContext(t.context),M={...t.flags},E.onNextTick(et)}function et(){s.info(ot.clientInitialized()),j=!0,J(),l.signalSuccess()}function nt(t){l.signalFailure(t)}const rt={waitForInitialization:function(t=void 0){if(null!=t){if("number"==typeof t)return function(t){t>5&&s.warn("The waitForInitialization function was called with a timeout greater than 5 seconds. We recommend a timeout of 5 seconds or less.");const e=l.getInitializationPromise(),n=function(t){return new Promise(((e,n)=>{setTimeout((()=>{n(new Kt(`waitForInitialization timed out after ${t} seconds.`))}),1e3*t)}))}(t);return Promise.race([n,e]).catch((t=>{throw t instanceof h.LDTimeoutError&&s.error(`waitForInitialization error: ${t}`),t}))}(t);s.warn("The waitForInitialization method was provided with a non-numeric timeout.")}return s.warn("The waitForInitialization function was called without a timeout specified. In a future version a default timeout will be applied."),l.getInitializationPromise()},waitUntilReady:()=>l.getReadyPromise(),identify:function(t,e,n){if(_)return E.wrapPromiseCallback(Promise.resolve({}),n);if(F)return s.warn(ot.identifyDisabled()),E.wrapPromiseCallback(Promise.resolve(E.transformVersionedValuesToValues(M)),n);let r;const o=O&&z?z.clearFlags():Promise.resolve();return E.wrapPromiseCallback(o.then((()=>B.processContext(t))).then(H).then((t=>(r=E.once(v.identify(t,void 0)),t))).then((t=>P.fetchFlagSettings(t,e).then((n=>{const r=E.transformVersionedValuesToValues(n);return N.setContext(t),p=e,n?K(n).then((()=>r)):r})))).then((t=>(r?.({status:"completed"}),R&&Y(),t))).catch((t=>(r?.({status:"error"}),a.maybeReportError(t),Promise.reject(t)))),n)},getContext:function(){return N.getContext()},variation:function(t,e){const{value:n}=v.withEvaluation(t,N.getContext(),e,(()=>q(t,e,!0,!1,!1,!0)));return n},variationDetail:function(t,e){return v.withEvaluation(t,N.getContext(),e,(()=>q(t,e,!0,!0,!1,!0)))},track:function(t,e,n){if("string"!=typeof t)return void a.maybeReportError(new h.LDInvalidEventKeyError(ot.unknownCustomEventKey(t)));void 0!==n&&"number"!=typeof n&&s.warn(ot.invalidMetricValue(typeof n)),r.customEventFilter&&!r.customEventFilter(t)&&s.warn(ot.unknownCustomEventKey(t));const o=N.getContext(),i={kind:"custom",key:t,context:o,url:r.getCurrentUrl(),creationDate:(new Date).getTime()};o&&o.anonymous&&(i.contextKind=o.anonymous?"anonymousUser":"user"),null!=e&&(i.data=e),null!=n&&(i.metricValue=n),V(i),v.afterTrack({context:o,key:t,data:e,metricValue:n})},on:function(t,e,n){Q(t)?(I=!0,j&&J(),a.on(t,e,n)):a.on(...arguments)},off:function(t){if(a.off(...arguments),Q(t)){let t=!1;a.getEvents().forEach((e=>{Q(e)&&a.getEventListenerCount(e)>0&&(t=!0)})),t||(I=!1,R&&void 0===L&&Z())}},setStreaming:function(t){const e=null===t?void 0:t;e!==L&&(L=e,J())},flush:function(t){return E.wrapPromiseCallback(d?T.flush():Promise.resolve(),t)},allFlags:function(){const t={};if(!M)return t;for(const e in M)E.objectHasOwnProperty(M,e)&&!M[e].deleted&&(t[e]=q(e,null,!c.sendEventsOnlyForVariation,!1,!0,!1).value);return t},close:function(t){if(_)return E.wrapPromiseCallback(Promise.resolve(),t);const e=()=>{_=!0,M={}},n=Promise.resolve().then((()=>{if(Z(),C&&C.stop(),d)return T.stop(),T.flush()})).then(e).catch(e);return E.wrapPromiseCallback(n,t)},addHook:function(t){v.addHook(t)}};return ce(s,m,rt,g),{client:rt,options:c,emitter:a,ident:N,logger:s,requestor:P,start:function(){d&&(C&&C.start(),T.start())},enqueueEvent:V,getFlagsInternal:function(){return M},getEnvironmentId:()=>f,internalChangeEventName:he}},commonBasicLogger:re,errors:h,messages:ot,utils:E,getContextKeys:ie},pe=fe.initialize,ge=fe.errors;function me(t,e,n){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ye(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ve(t){for(var e=1;e{if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};function ke(t,e,n,r){var o,i,s=("substring"!==t.kind&&"regex"!==t.kind||!r.includes("/")?e.replace(r,""):e).replace(n,"");switch(t.kind){case"exact":i=e,o=new RegExp("^"+we(t.url)+"/?$");break;case"canonical":i=s,o=new RegExp("^"+we(t.url)+"/?$");break;case"substring":i=s,o=new RegExp(".*"+we(t.substring)+".*$");break;case"regex":i=s,o=new RegExp(t.pattern);break;default:return!1}return o.test(i)}function Se(t,e){for(var n={},r=null,o=[],i=0;i0&&(r=function(t){for(var n=function(t,e){for(var n=[],r=0;r0;){for(var l=0;l{var e;return null!=(e=t.context)?e:t.user},je=t=>{const e={};for(const n in t)0!==n.indexOf("$")&&(e[Pe()(n)]=t[n]);return e},_e=(t,e)=>{const n={};for(const r in t)e&&void 0===e[r]||(n[r]=t[r].current);return n};je.camelCaseKeys=je;var De=Object.defineProperty,Fe=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,ze=(t,e,n)=>e in t?De(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ve=(t,e)=>{for(var n in e||(e={}))Ne.call(e,n)&&ze(t,n,e[n]);if(Fe)for(var n of Fe(e))Be.call(e,n)&&ze(t,n,e[n]);return t};const $e={wrapperName:"react-client-sdk",wrapperVersion:"3.1.0",sendEventsOnlyForVariation:!0},We=(t,...e)=>{return n=[t,...e],r=function*(t,e={anonymous:!0,kind:"user"},n,r){const o=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=function(t){var e,n={userAgentHeaderName:"X-LaunchDarkly-User-Agent",synchronousFlush:!1};if(window.XMLHttpRequest){var r=t&&t.disableSyncEventPost;n.httpRequest=function(t,e,o,i){var s=n.synchronousFlush&!r;return n.synchronousFlush=!1,function(t,e,n,r,o){if(o&&!function(){var t=window.navigator&&window.navigator.userAgent;if(t){var e=t.match(/Chrom(e|ium)\/([0-9]+)\./);if(e)return parseInt(e[2],10)<73}return!0}())return xe;var i=new window.XMLHttpRequest;for(var s in i.open(t,e,!o),n||{})Object.prototype.hasOwnProperty.call(n,s)&&i.setRequestHeader(s,n[s]);if(o){try{i.send(r)}catch(t){}return xe}var a,l=new Promise((function(t,e){i.addEventListener("load",(function(){a||t({status:i.status,header:function(t){return i.getResponseHeader(t)},body:i.responseText})})),i.addEventListener("error",(function(){a||e(new Error)})),i.send(r)}));return{promise:l,cancel:function(){a=!0,i.abort()}}}(t,e,o,i,s)}}n.httpAllowsPost=function(){return void 0===e&&(e=!!window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest),e},n.httpFallbackPing=function(t){(new window.Image).src=t};var o,i=t&&t.eventUrlTransformer;n.getCurrentUrl=function(){return i?i(window.location.href):window.location.href},n.isDoNotTrack=function(){var t;return 1===(t=window.navigator&&void 0!==window.navigator.doNotTrack?window.navigator.doNotTrack:window.navigator&&void 0!==window.navigator.msDoNotTrack?window.navigator.msDoNotTrack:window.doNotTrack)||!0===t||"1"===t||"yes"===t};try{window.localStorage&&(n.localStorage={get:function(t){return new Promise((function(e){e(window.localStorage.getItem(t))}))},set:function(t,e){return new Promise((function(n){window.localStorage.setItem(t,e),n()}))},clear:function(t){return new Promise((function(e){window.localStorage.removeItem(t),e()}))}})}catch(t){n.localStorage=null}if(t&&t.useReport&&"function"==typeof window.EventSourcePolyfill&&window.EventSourcePolyfill.supportedOptions&&window.EventSourcePolyfill.supportedOptions.method?(n.eventSourceAllowsReport=!0,o=window.EventSourcePolyfill):(n.eventSourceAllowsReport=!1,o=window.EventSource),window.EventSource){var s=3e5;n.eventSourceFactory=function(t,e){var n=ve(ve({},{heartbeatTimeout:s,silentTimeout:s,skipDefaultHeaders:!0}),e);return new o(t,n)},n.eventSourceIsActive=function(t){return t.readyState===window.EventSource.OPEN||t.readyState===window.EventSource.CONNECTING}}return n.userAgent="JSClient",n.version="3.7.0",n.diagnosticSdkData={name:"js-client-sdk",version:"3.7.0"},n.diagnosticPlatformData={name:"JS"},n.diagnosticUseCombinedEvent=!0,n}(n),o=pe(t,e,n,r,Ae),i=o.client,s=o.options,a=o.emitter,l=new Promise((function(t){var e=a.on(Ce,(function(){a.off(Ce,e),t()}))}));i.waitUntilGoalsReady=function(){return l},s.fetchGoals?function(t,e){var n,r;function o(){r&&r.dispose(),n&&n.length&&(r=Se(n,i))}function i(e,n){var r=t.ident.getContext(),o={kind:e,key:n.key,data:null,url:window.location.href,creationDate:(new Date).getTime(),context:r};return"click"===e&&(o.selector=n.selector),t.enqueueEvent(o)}t.requestor.fetchJSON("/sdk/goals/"+t.getEnvironmentId()).then((function(t){t&&t.length>0&&(r=Se(n=t,i),function(t,e){var n,r=window.location.href;function o(){(n=window.location.href)!==r&&(r=n,e())}!function t(e,n){e(),setTimeout((function(){t(e,n)}),n)}(o,300),window.history&&window.history.pushState?window.addEventListener("popstate",o):window.addEventListener("hashchange",o)}(0,o)),e()})).catch((function(n){t.emitter.maybeReportError(new ge.LDUnexpectedResponseError((n&&n.message,n.message))),e()}))}(o,(function(){return a.emit(Ce)})):a.emit(Ce),"complete"!==document.readyState?window.addEventListener("load",o.start):o.start();var c=function(){r.synchronousFlush=!0,i.flush().catch((function(){})),r.synchronousFlush=!1};return document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&c()})),window.addEventListener("pagehide",c),i}(t,e,Ve(Ve({},$e),n));return new Promise((t=>{function e(){o.off("ready",i),o.off("failed",n)}function n(n){e(),t({flags:{},ldClient:o,error:n})}function i(){e();const n=((t,e)=>{const n=t.allFlags();return e?Object.keys(e).reduce(((t,r)=>(t[r]=Object.prototype.hasOwnProperty.call(n,r)?n[r]:e[r],t)),{}):n})(o,r);t({flags:n,ldClient:o})}o.on("failed",n),o.on("ready",i)}))},new Promise(((t,e)=>{var o=t=>{try{s(r.next(t))}catch(t){e(t)}},i=t=>{try{s(r.throw(t))}catch(t){e(t)}},s=e=>e.done?t(e.value):Promise.resolve(e.value).then(o,i);s((r=r.apply(void 0,n)).next())}));var n,r};function Ue(t,e,n=Oe,r){const o=function(t,e){return void 0===e?t:Object.keys(e).reduce(((e,n)=>(He(t,n)&&(e[n]=t[n]),e)),{})}(e,r),{useCamelCaseFlagKeys:i=!0}=n,[s,a={}]=i?function(t){const e={},n={};for(const r in t){if(0===r.indexOf("$"))continue;const o=Pe()(r);e[o]=t[r],n[o]=r}return[e,n]}(o):[o];return{flags:n.sendEventsOnFlagRead?qe(t,s,a,i):s,flagKeyMap:a}}function He(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function qe(t,e,n,r){return new Proxy(e,{get(e,o,i){const s=Reflect.get(e,o,i),a=r&&He(n,o)||He(e,o);if("symbol"==typeof o||!a)return s;if(void 0===s)return;const l=r?n[o]:o;return t.variation(l,s)}})}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var Ge=Object.defineProperty,Ye=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable,Xe=(t,e,n)=>e in t?Ge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Je=(t,e)=>{for(var n in e||(e={}))Ze.call(e,n)&&Xe(t,n,e[n]);if(Ye)for(var n of Ye(e))Ke.call(e,n)&&Xe(t,n,e[n]);return t};function Qe(t){return e=this,n=function*(){const{clientSideID:e,flags:n,options:o,reactOptions:i}=t,s=Je(Je({},Oe),i),{ldClient:a,flags:l,error:c}=yield We(e,Le(t),o,n),u=(null==o?void 0:o.bootstrap)&&"localStorage"!==o.bootstrap?o.bootstrap:l;return({children:t})=>{const[e,o]=(0,r.useState)((()=>Je({unproxiedFlags:u},Ue(a,u,s,n))));(0,r.useEffect)((()=>{function t(t){const e=_e(t,n);Object.keys(e).length>0&&o((({unproxiedFlags:t})=>{const r=Je(Je({},t),e);return Je({unproxiedFlags:r},Ue(a,r,s,n))}))}return a.on("change",t),function(){a.off("change",t)}}),[]);const{flags:i,flagKeyMap:l}=e;return r.createElement(Ie,{value:{flags:i,flagKeyMap:l,ldClient:a,error:c}},t)}},new Promise(((t,r)=>{var o=t=>{try{s(n.next(t))}catch(t){r(t)}},i=t=>{try{s(n.throw(t))}catch(t){r(t)}},s=e=>e.done?t(e.value):Promise.resolve(e.value).then(o,i);s((n=n.apply(e,null)).next())}));var e,n}Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;const tn=()=>{const{flags:t}=(0,r.useContext)(Re);return t},en=()=>{const{ldClient:t}=(0,r.useContext)(Re);return t}},6884:(t,e,n)=>{var r,o=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,i=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,s="\\ud800-\\udfff",a="\\u0300-\\u036f\\ufe20-\\ufe23",l="\\u20d0-\\u20f0",c="\\u2700-\\u27bf",u="a-z\\xdf-\\xf6\\xf8-\\xff",d="A-Z\\xc0-\\xd6\\xd8-\\xde",h="\\ufe0e\\ufe0f",f="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",p="["+s+"]",g="["+f+"]",m="["+a+l+"]",y="\\d+",v="["+c+"]",b="["+u+"]",x="[^"+s+f+y+c+u+d+"]",w="\\ud83c[\\udffb-\\udfff]",k="[^"+s+"]",S="(?:\\ud83c[\\udde6-\\uddff]){2}",C="[\\ud800-\\udbff][\\udc00-\\udfff]",A="["+d+"]",E="\\u200d",T="(?:"+b+"|"+x+")",P="(?:"+A+"|"+x+")",O="(?:['’](?:d|ll|m|re|s|t|ve))?",R="(?:['’](?:D|LL|M|RE|S|T|VE))?",I="(?:"+m+"|"+w+")?",M="["+h+"]?",L=M+I+"(?:"+E+"(?:"+[k,S,C].join("|")+")"+M+I+")*",j="(?:"+[v,S,C].join("|")+")"+L,_="(?:"+[k+m+"?",m,S,C,p].join("|")+")",D=RegExp("['’]","g"),F=RegExp(m,"g"),N=RegExp(w+"(?="+w+")|"+_+L,"g"),B=RegExp([A+"?"+b+"+"+O+"(?="+[g,A,"$"].join("|")+")",P+"+"+R+"(?="+[g,A+T,"$"].join("|")+")",A+"?"+T+"+"+O,A+"+"+R,y,j].join("|"),"g"),z=RegExp("["+E+s+a+l+h+"]"),V=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,W="object"==typeof self&&self&&self.Object===Object&&self,U=$||W||Function("return this")(),H=(r={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"ss"},function(t){return null==r?void 0:r[t]});function q(t){return z.test(t)}var G=Object.prototype.toString,Y=U.Symbol,Z=Y?Y.prototype:void 0,K=Z?Z.toString:void 0;function X(t){return null==t?"":function(t){if("string"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==G.call(t)}(t))return K?K.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(t)}var J,Q=(J=function(t,e,n){return e=e.toLowerCase(),t+(n?tt(X(e).toLowerCase()):e)},function(t){return function(t,e,n){for(var r=-1,o=t?t.length:0;++r=o?e:function(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(o);++r{t=n.nmd(t);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object Function]",a="[object Object]",l=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[i]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[s]=u["[object Map]"]=u["[object Number]"]=u[a]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var d,h,f,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,m=p||g||Function("return this")(),y=e&&!e.nodeType&&e,v=y&&t&&!t.nodeType&&t,b=v&&v.exports===y,x=b&&p.process,w=function(){try{return v&&v.require&&v.require("util").types||x&&x.binding&&x.binding("util")}catch(t){}}(),k=w&&w.isTypedArray,S=Array.prototype,C=Function.prototype,A=Object.prototype,E=m["__core-js_shared__"],T=C.toString,P=A.hasOwnProperty,O=(d=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",R=A.toString,I=T.call(Object),M=RegExp("^"+T.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),L=b?m.Buffer:void 0,j=m.Symbol,_=m.Uint8Array,D=(L&&L.allocUnsafe,h=Object.getPrototypeOf,f=Object,function(t){return h(f(t))}),F=Object.create,N=A.propertyIsEnumerable,B=S.splice,z=j?j.toStringTag:void 0,V=function(){try{var t=at(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),$=L?L.isBuffer:void 0,W=Math.max,U=Date.now,H=at(m,"Map"),q=at(Object,"create"),G=function(){function t(){}return function(e){if(!bt(e))return{};if(F)return F(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Y(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1},Z.prototype.set=function(t,e){var n=this.__data__,r=tt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},K.prototype.clear=function(){this.size=0,this.__data__={hash:new Y,map:new(H||Z),string:new Y}},K.prototype.delete=function(t){var e=st(this,t).delete(t);return this.size-=e?1:0,e},K.prototype.get=function(t){return st(this,t).get(t)},K.prototype.has=function(t){return st(this,t).has(t)},K.prototype.set=function(t,e){var n=st(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},X.prototype.clear=function(){this.__data__=new Z,this.size=0},X.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},X.prototype.get=function(t){return this.__data__.get(t)},X.prototype.has=function(t){return this.__data__.has(t)},X.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Z){var r=n.__data__;if(!H||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new K(r)}return n.set(t,e),this.size=n.size,this};function nt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":z&&z in Object(t)?function(t){var e=P.call(t,z),n=t[z];try{t[z]=void 0;var r=!0}catch(t){}var o=R.call(t);return r&&(e?t[z]=n:delete t[z]),o}(t):function(t){return R.call(t)}(t)}function rt(t){return xt(t)&&nt(t)==i}function ot(t,e,n,r,o){t!==e&&function(t,e,n){for(var r=-1,o=Object(t),i=n(t),s=i.length;s--;){var a=i[++r];if(!1===e(o[a],a,o))break}}(e,(function(i,s){if(o||(o=new X),bt(i))!function(t,e,n,r,o,i,s){var l=ut(t,n),c=ut(e,n),u=s.get(c);if(u)J(t,n,u);else{var d,h,f,p,g,m=i?i(l,c,n+"",t,e,s):void 0,y=void 0===m;if(y){var v=pt(c),b=!v&&mt(c),x=!v&&!b&&wt(c);m=c,v||b||x?pt(l)?m=l:xt(g=l)&>(g)?m=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n-1&&t%1==0&&t0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(it);function ht(t,e){return t===e||t!=t&&e!=e}var ft=rt(function(){return arguments}())?rt:function(t){return xt(t)&&P.call(t,"callee")&&!N.call(t,"callee")},pt=Array.isArray;function gt(t){return null!=t&&vt(t.length)&&!yt(t)}var mt=$||function(){return!1};function yt(t){if(!bt(t))return!1;var e=nt(t);return e==s||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function vt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}function bt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function xt(t){return null!=t&&"object"==typeof t}var wt=k?function(t){return function(e){return t(e)}}(k):function(t){return xt(t)&&vt(t.length)&&!!u[nt(t)]};function kt(t){return gt(t)?function(t,e){var n=pt(t),r=!n&&ft(t),o=!n&&!r&&mt(t),i=!n&&!r&&!o&&wt(t),s=n||r||o||i,a=s?function(t,e){for(var n=-1,r=Array(t);++n1?e[r-1]:void 0,i=r>2?e[2]:void 0;for(o=St.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(t,e,n){if(!bt(n))return!1;var r=typeof e;return!!("number"==r?gt(n)&<(e,n.length):"string"==r&&e in n)&&ht(n[e],t)}(e[0],e[1],i)&&(o=r<3?void 0:o,r=1),t=Object(t);++n{"use strict";t.exports=Math.abs},6329:t=>{"use strict";t.exports=Math.floor},3678:t=>{"use strict";t.exports=Number.isNaN||function(t){return t!=t}},2264:t=>{"use strict";t.exports=Math.max},5730:t=>{"use strict";t.exports=Math.min},707:t=>{"use strict";t.exports=Math.pow},3862:t=>{"use strict";t.exports=Math.round},9550:(t,e,n)=>{"use strict";var r=n(3678);t.exports=function(t){return r(t)||0===t?t:t<0?-1:1}},4244:t=>{"use strict";var e=function(t){return t!=t};t.exports=function(t,n){return 0===t&&0===n?1/t==1/n:t===n||!(!e(t)||!e(n))}},609:(t,e,n)=>{"use strict";var r=n(4289),o=n(5559),i=n(4244),s=n(5624),a=n(2281),l=o(s(),Object);r(l,{getPolyfill:s,implementation:i,shim:a}),t.exports=l},5624:(t,e,n)=>{"use strict";var r=n(4244);t.exports=function(){return"function"==typeof Object.is?Object.is:r}},2281:(t,e,n)=>{"use strict";var r=n(5624),o=n(4289);t.exports=function(){var t=r();return o(Object,{is:t},{is:function(){return Object.is!==t}}),t}},8987:(t,e,n)=>{"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,s=n(1414),a=Object.prototype.propertyIsEnumerable,l=!a.call({toString:null},"toString"),c=a.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(t){var e=t.constructor;return e&&e.prototype===t},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!h["$"+t]&&o.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{d(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();r=function(t){var e=null!==t&&"object"==typeof t,n="[object Function]"===i.call(t),r=s(t),a=e&&"[object String]"===i.call(t),h=[];if(!e&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var p=c&&n;if(a&&t.length>0&&!o.call(t,0))for(var g=0;g0)for(var m=0;m{"use strict";var r=Array.prototype.slice,o=n(1414),i=Object.keys,s=i?function(t){return i(t)}:n(8987),a=Object.keys;s.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return o(t)?a(r.call(t)):a(t)})}else Object.keys=s;return Object.keys||s},t.exports=s},1414:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var n=e.call(t),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),r}},2837:(t,e,n)=>{"use strict";var r=n(2215),o=n(5419)(),i=n(7379),s=n(8892),a=i("Array.prototype.push"),l=i("Object.prototype.propertyIsEnumerable"),c=o?s.getOwnPropertySymbols:null;t.exports=function(t,e){if(null==t)throw new TypeError("target must be an object");var n=s(t);if(1===arguments.length)return n;for(var i=1;i{"use strict";var r=n(2837);t.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),n={},r=0;r{"use strict";t.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},4155:t=>{var e,n,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(t){n=i}}();var a,l=[],c=!1,u=-1;function d(){c&&a&&(c=!1,a.length?l=a.concat(l):u=-1,l.length&&h())}function h(){if(!c){var t=s(d);c=!0;for(var e=l.length;e;){for(a=l,l=[];++u1)for(var n=1;n{"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5697:(t,e,n)=>{t.exports=n(2703)()},414:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5760:t=>{"use strict";function e(t){this._maxSize=t,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(t){return this._values[t]},e.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var n=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,o=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,s=/^\s*(['"]?)(.*?)(\1)\s*$/,a=new e(512),l=new e(512),c=new e(512);function u(t){return a.get(t)||a.set(t,d(t).map((function(t){return t.replace(s,"$2")})))}function d(t){return t.match(n)||[""]}function h(t){return"string"==typeof t&&t&&-1!==["'",'"'].indexOf(t.charAt(0))}function f(t){return!h(t)&&(function(t){return t.match(o)&&!t.match(r)}(t)||function(t){return i.test(t)}(t))}t.exports={Cache:e,split:d,normalizePath:u,setter:function(t){var e=u(t);return l.get(t)||l.set(t,(function(t,n){for(var r=0,o=e.length,i=t;r{var e;window,e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=256,s=function(){function t(t){void 0===t&&(t="="),this._paddingCharacter=t}return t.prototype.encodedLength=function(t){return this._paddingCharacter?(t+2)/3*4|0:(8*t+5)/6|0},t.prototype.encode=function(t){for(var e="",n=0;n>>18&63),e+=this._encodeByte(r>>>12&63),e+=this._encodeByte(r>>>6&63),e+=this._encodeByte(r>>>0&63)}var o=t.length-n;return o>0&&(r=t[n]<<16|(2===o?t[n+1]<<8:0),e+=this._encodeByte(r>>>18&63),e+=this._encodeByte(r>>>12&63),e+=2===o?this._encodeByte(r>>>6&63):this._paddingCharacter||"",e+=this._paddingCharacter||""),e},t.prototype.maxDecodedLength=function(t){return this._paddingCharacter?t/4*3|0:(6*t+7)/8|0},t.prototype.decodedLength=function(t){return this.maxDecodedLength(t.length-this._getPaddingLength(t))},t.prototype.decode=function(t){if(0===t.length)return new Uint8Array(0);for(var e=this._getPaddingLength(t),n=t.length-e,r=new Uint8Array(this.maxDecodedLength(n)),o=0,s=0,a=0,l=0,c=0,u=0,d=0;s>>4,r[o++]=c<<4|u>>>2,r[o++]=u<<6|d,a|=l&i,a|=c&i,a|=u&i,a|=d&i;if(s>>4,a|=l&i,a|=c&i),s>>2,a|=u&i),s>>8&6,e+=51-t>>>8&-75,e+=61-t>>>8&-15,e+=62-t>>>8&3,String.fromCharCode(e)},t.prototype._decodeChar=function(t){var e=i;return e+=(42-t&t-44)>>>8&-256+t-43+62,e+=(46-t&t-48)>>>8&-256+t-47+63,e+=(47-t&t-58)>>>8&-256+t-48+52,(e+=(64-t&t-91)>>>8&-256+t-65+0)+((96-t&t-123)>>>8&-256+t-97+26)},t.prototype._getPaddingLength=function(t){var e=0;if(this._paddingCharacter){for(var n=t.length-1;n>=0&&t[n]===this._paddingCharacter;n--)e++;if(t.length<4||e>2)throw new Error("Base64Coder: incorrect padding")}return e},t}();e.Coder=s;var a=new s;e.encode=function(t){return a.encode(t)},e.decode=function(t){return a.decode(t)};var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype._encodeByte=function(t){var e=t;return e+=65,e+=25-t>>>8&6,e+=51-t>>>8&-75,e+=61-t>>>8&-13,e+=62-t>>>8&49,String.fromCharCode(e)},e.prototype._decodeChar=function(t){var e=i;return e+=(44-t&t-46)>>>8&-256+t-45+62,e+=(94-t&t-96)>>>8&-256+t-95+63,e+=(47-t&t-58)>>>8&-256+t-48+52,(e+=(64-t&t-91)>>>8&-256+t-65+0)+((96-t&t-123)>>>8&-256+t-97+26)},e}(s);e.URLSafeCoder=l;var c=new l;e.encodeURLSafe=function(t){return c.encode(t)},e.decodeURLSafe=function(t){return c.decode(t)},e.encodedLength=function(t){return a.encodedLength(t)},e.maxDecodedLength=function(t){return a.maxDecodedLength(t)},e.decodedLength=function(t){return a.decodedLength(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="utf8: invalid string",o="utf8: invalid source encoding";function i(t){for(var e=0,n=0;n=t.length-1)throw new Error(r);n++,e+=4}}return e}e.encode=function(t){for(var e=new Uint8Array(i(t)),n=0,r=0;r>6,e[n++]=128|63&o):o<55296?(e[n++]=224|o>>12,e[n++]=128|o>>6&63,e[n++]=128|63&o):(r++,o=(1023&o)<<10,o|=1023&t.charCodeAt(r),o+=65536,e[n++]=240|o>>18,e[n++]=128|o>>12&63,e[n++]=128|o>>6&63,e[n++]=128|63&o)}return e},e.encodedLength=i,e.decode=function(t){for(var e=[],n=0;n=t.length)throw new Error(o);if(128!=(192&(s=t[++n])))throw new Error(o);r=(31&r)<<6|63&s,i=128}else if(r<240){if(n>=t.length-1)throw new Error(o);var s=t[++n],a=t[++n];if(128!=(192&s)||128!=(192&a))throw new Error(o);r=(15&r)<<12|(63&s)<<6|63&a,i=2048}else{if(!(r<248))throw new Error(o);if(n>=t.length-2)throw new Error(o);s=t[++n],a=t[++n];var l=t[++n];if(128!=(192&s)||128!=(192&a)||128!=(192&l))throw new Error(o);r=(15&r)<<18|(63&s)<<12|(63&a)<<6|63&l,i=65536}if(r=55296&&r<=57343)throw new Error(o);if(r>=65536){if(r>1114111)throw new Error(o);r-=65536,e.push(String.fromCharCode(55296|r>>10)),r=56320|1023&r}}e.push(String.fromCharCode(r))}return e.join("")}},function(t,e,n){t.exports=n(3).default},function(t,e,n){"use strict";n.r(e);class r{constructor(t,e){this.lastId=0,this.prefix=t,this.name=e}create(t){this.lastId++;var e=this.lastId,n=this.prefix+e,r=this.name+"["+e+"]",o=!1,i=function(){o||(t.apply(null,arguments),o=!0)};return this[e]=i,{number:e,id:n,name:r,callback:i}}remove(t){delete this[t.number]}}var o=new r("_pusher_script_","Pusher.ScriptReceivers"),i="8.4.0",s=7,a=80,l=443,c="",u="sockjs.pusher.com",d=80,h=443,f="/pusher",p="stats.pusher.com",g="/pusher/auth",m="ajax",y=12e4,v=3e4,b=1e4,x={endpoint:"/pusher/user-auth",transport:"ajax"},w={endpoint:"/pusher/auth",transport:"ajax"},k="http://js.pusher.com",S="https://js.pusher.com",C="",A=new r("_pusher_dependencies","Pusher.DependenciesReceivers"),E=new class{constructor(t){this.options=t,this.receivers=t.receivers||o,this.loading={}}load(t,e,n){var r=this;if(r.loading[t]&&r.loading[t].length>0)r.loading[t].push(n);else{r.loading[t]=[n];var o=Ce.createScriptRequest(r.getPath(t,e)),i=r.receivers.create((function(e){if(r.receivers.remove(i),r.loading[t]){var n=r.loading[t];delete r.loading[t];for(var s=function(t){t||o.cleanup()},a=0;a>>6)+z(128|63&e):z(224|e>>>12&15)+z(128|e>>>6&63)+z(128|63&e)},H=function(t){var e=[0,2,1][t.length%3],n=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0);return[V.charAt(n>>>18),V.charAt(n>>>12&63),e>=2?"=":V.charAt(n>>>6&63),e>=1?"=":V.charAt(63&n)].join("")},q=window.btoa||function(t){return t.replace(/[\s\S]{1,3}/g,H)},G=class{constructor(t,e,n,r){this.clear=e,this.timer=t((()=>{this.timer&&(this.timer=r(this.timer))}),n)}isRunning(){return null!==this.timer}ensureAborted(){this.timer&&(this.clear(this.timer),this.timer=null)}};function Y(t){window.clearTimeout(t)}function Z(t){window.clearInterval(t)}class K extends G{constructor(t,e){super(setTimeout,Y,t,(function(t){return e(),null}))}}class X extends G{constructor(t,e){super(setInterval,Z,t,(function(t){return e(),t}))}}var J={now:()=>Date.now?Date.now():(new Date).valueOf(),defer:t=>new K(0,t),method(t,...e){var n=Array.prototype.slice.call(arguments,1);return function(e){return e[t].apply(e,n.concat(arguments))}}},Q=J;function tt(t,...e){for(var n=0;n{window.console&&window.console.log&&window.console.log(t)}}debug(...t){this.log(this.globalLog,t)}warn(...t){this.log(this.globalLogWarn,t)}error(...t){this.log(this.globalLogError,t)}globalLogWarn(t){window.console&&window.console.warn?window.console.warn(t):this.globalLog(t)}globalLogError(t){window.console&&window.console.error?window.console.error(t):this.globalLogWarn(t)}log(t,...e){var n=et.apply(this,arguments);Ve.log?Ve.log(n):Ve.logToConsole&&t.bind(this)(n)}},ft=function(t,e,n,r,o){void 0===n.headers&&null==n.headersProvider||ht.warn(`To send headers with the ${r.toString()} request, you must use AJAX, rather than JSONP.`);var i=t.nextAuthCallbackID.toString();t.nextAuthCallbackID++;var s=t.getDocument(),a=s.createElement("script");t.auth_callbacks[i]=function(t){o(null,t)};var l="Pusher.auth_callbacks['"+i+"']";a.src=n.endpoint+"?callback="+encodeURIComponent(l)+"&"+e;var c=s.getElementsByTagName("head")[0]||s.documentElement;c.insertBefore(a,c.firstChild)};class pt{constructor(t){this.src=t}send(t){var e=this,n="Error loading "+e.src;e.script=document.createElement("script"),e.script.id=t.id,e.script.src=e.src,e.script.type="text/javascript",e.script.charset="UTF-8",e.script.addEventListener?(e.script.onerror=function(){t.callback(n)},e.script.onload=function(){t.callback(null)}):e.script.onreadystatechange=function(){"loaded"!==e.script.readyState&&"complete"!==e.script.readyState||t.callback(null)},void 0===e.script.async&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(e.errorScript=document.createElement("script"),e.errorScript.id=t.id+"_error",e.errorScript.text=t.name+"('"+n+"');",e.script.async=e.errorScript.async=!1):e.script.async=!0;var r=document.getElementsByTagName("head")[0];r.insertBefore(e.script,r.firstChild),e.errorScript&&r.insertBefore(e.errorScript,e.script.nextSibling)}cleanup(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null}}class gt{constructor(t,e){this.url=t,this.data=e}send(t){if(!this.request){var e=(r=this.data,st((o=ut(lt(r,(function(t){return void 0!==t}))),i=[],rt(o,(function(t,e){i.push([e,t])})),i),Q.method("join","=")).join("&")),n=this.url+"/"+t.number+"?"+e;this.request=Ce.createScriptRequest(n),this.request.send(t)}var r,o,i}cleanup(){this.request&&this.request.cleanup()}}var mt={name:"jsonp",getAgent:function(t,e){return function(n,r){var i="http"+(e?"s":"")+"://"+(t.host||t.options.host)+t.options.path,s=Ce.createJSONPRequest(i,n),a=Ce.ScriptReceivers.create((function(e,n){o.remove(a),s.cleanup(),n&&n.host&&(t.host=n.host),r&&r(e,n)}));s.send(a)}}};function yt(t,e,n){return t+(e.useTLS?"s":"")+"://"+(e.useTLS?e.hostTLS:e.hostNonTLS)+n}function vt(t,e){return"/app/"+t+"?protocol="+s+"&client=js&version="+i+(e?"&"+e:"")}var bt={getInitial:function(t,e){return yt("ws",e,(e.httpPath||"")+vt(t,"flash=false"))}},xt={getInitial:function(t,e){return yt("http",e,(e.httpPath||"/pusher")+vt(t))}},wt={getInitial:function(t,e){return yt("http",e,e.httpPath||"/pusher")},getPath:function(t,e){return vt(t)}};class kt{constructor(){this._callbacks={}}get(t){return this._callbacks[St(t)]}add(t,e,n){var r=St(t);this._callbacks[r]=this._callbacks[r]||[],this._callbacks[r].push({fn:e,context:n})}remove(t,e,n){if(t||e||n){var r=t?[St(t)]:ot(this._callbacks);e||n?this.removeCallback(r,e,n):this.removeAllCallbacks(r)}else this._callbacks={}}removeCallback(t,e,n){it(t,(function(t){this._callbacks[t]=at(this._callbacks[t]||[],(function(t){return e&&e!==t.fn||n&&n!==t.context})),0===this._callbacks[t].length&&delete this._callbacks[t]}),this)}removeAllCallbacks(t){it(t,(function(t){delete this._callbacks[t]}),this)}}function St(t){return"_"+t}class Ct{constructor(t){this.callbacks=new kt,this.global_callbacks=[],this.failThrough=t}bind(t,e,n){return this.callbacks.add(t,e,n),this}bind_global(t){return this.global_callbacks.push(t),this}unbind(t,e,n){return this.callbacks.remove(t,e,n),this}unbind_global(t){return t?(this.global_callbacks=at(this.global_callbacks||[],(e=>e!==t)),this):(this.global_callbacks=[],this)}unbind_all(){return this.unbind(),this.unbind_global(),this}emit(t,e,n){for(var r=0;r0)for(r=0;r{this.onError(t),this.changeState("closed")})),!1}return this.bindListeners(),ht.debug("Connecting",{transport:this.name,url:t}),this.changeState("connecting"),!0}close(){return!!this.socket&&(this.socket.close(),!0)}send(t){return"open"===this.state&&(Q.defer((()=>{this.socket&&this.socket.send(t)})),!0)}ping(){"open"===this.state&&this.supportsPing()&&this.socket.ping()}onOpen(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0}onError(t){this.emit("error",{type:"WebSocketError",error:t}),this.timeline.error(this.buildTimelineMessage({error:t.toString()}))}onClose(t){t?this.changeState("closed",{code:t.code,reason:t.reason,wasClean:t.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0}onMessage(t){this.emit("message",t)}onActivity(){this.emit("activity")}bindListeners(){this.socket.onopen=()=>{this.onOpen()},this.socket.onerror=t=>{this.onError(t)},this.socket.onclose=t=>{this.onClose(t)},this.socket.onmessage=t=>{this.onMessage(t)},this.supportsPing()&&(this.socket.onactivity=()=>{this.onActivity()})}unbindListeners(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))}changeState(t,e){this.state=t,this.timeline.info(this.buildTimelineMessage({state:t,params:e})),this.emit(t,e)}buildTimelineMessage(t){return tt({cid:this.id},t)}}class Et{constructor(t){this.hooks=t}isSupported(t){return this.hooks.isSupported(t)}createConnection(t,e,n,r){return new At(this.hooks,t,e,n,r)}}var Tt=new Et({urls:bt,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return Boolean(Ce.getWebSocketAPI())},isSupported:function(){return Boolean(Ce.getWebSocketAPI())},getSocket:function(t){return Ce.createWebSocket(t)}}),Pt={urls:xt,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},Ot=tt({getSocket:function(t){return Ce.HTTPFactory.createStreamingSocket(t)}},Pt),Rt=tt({getSocket:function(t){return Ce.HTTPFactory.createPollingSocket(t)}},Pt),It={isSupported:function(){return Ce.isXHRSupported()}},Mt={ws:Tt,xhr_streaming:new Et(tt({},Ot,It)),xhr_polling:new Et(tt({},Rt,It))},Lt=new Et({file:"sockjs",urls:wt,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return void 0!==window.SockJS},getSocket:function(t,e){return new window.SockJS(t,null,{js_path:E.getPath("sockjs",{useTLS:e.useTLS}),ignore_null_origin:e.ignoreNullOrigin})},beforeOpen:function(t,e){t.send(JSON.stringify({path:e}))}}),jt={isSupported:function(t){return Ce.isXDRSupported(t.useTLS)}},_t=new Et(tt({},Ot,jt)),Dt=new Et(tt({},Rt,jt));Mt.xdr_streaming=_t,Mt.xdr_polling=Dt,Mt.sockjs=Lt;var Ft=Mt,Nt=new class extends Ct{constructor(){super();var t=this;void 0!==window.addEventListener&&(window.addEventListener("online",(function(){t.emit("online")}),!1),window.addEventListener("offline",(function(){t.emit("offline")}),!1))}isOnline(){return void 0===window.navigator.onLine||window.navigator.onLine}};class Bt{constructor(t,e,n){this.manager=t,this.transport=e,this.minPingDelay=n.minPingDelay,this.maxPingDelay=n.maxPingDelay,this.pingDelay=void 0}createConnection(t,e,n,r){r=tt({},r,{activityTimeout:this.pingDelay});var o=this.transport.createConnection(t,e,n,r),i=null,s=function(){o.unbind("open",s),o.bind("closed",a),i=Q.now()},a=t=>{if(o.unbind("closed",a),1002===t.code||1003===t.code)this.manager.reportDeath();else if(!t.wasClean&&i){var e=Q.now()-i;e<2*this.maxPingDelay&&(this.manager.reportDeath(),this.pingDelay=Math.max(e/2,this.minPingDelay))}};return o.bind("open",s),o}isSupported(t){return this.manager.isAlive()&&this.transport.isSupported(t)}}const zt={decodeMessage:function(t){try{var e=JSON.parse(t.data),n=e.data;if("string"==typeof n)try{n=JSON.parse(e.data)}catch(t){}var r={event:e.event,channel:e.channel,data:n};return e.user_id&&(r.user_id=e.user_id),r}catch(e){throw{type:"MessageParseError",error:e,data:t.data}}},encodeMessage:function(t){return JSON.stringify(t)},processHandshake:function(t){var e=zt.decodeMessage(t);if("pusher:connection_established"===e.event){if(!e.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:e.data.socket_id,activityTimeout:1e3*e.data.activity_timeout}}if("pusher:error"===e.event)return{action:this.getCloseAction(e.data),error:this.getCloseError(e.data)};throw"Invalid handshake"},getCloseAction:function(t){return t.code<4e3?t.code>=1002&&t.code<=1004?"backoff":null:4e3===t.code?"tls_only":t.code<4100?"refused":t.code<4200?"backoff":t.code<4300?"retry":"refused"},getCloseError:function(t){return 1e3!==t.code&&1001!==t.code?{type:"PusherError",data:{code:t.code,message:t.reason||t.message}}:null}};var Vt=zt;class $t extends Ct{constructor(t,e){super(),this.id=t,this.transport=e,this.activityTimeout=e.activityTimeout,this.bindListeners()}handlesActivityChecks(){return this.transport.handlesActivityChecks()}send(t){return this.transport.send(t)}send_event(t,e,n){var r={event:t,data:e};return n&&(r.channel=n),ht.debug("Event sent",r),this.send(Vt.encodeMessage(r))}ping(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})}close(){this.transport.close()}bindListeners(){var t={message:t=>{var e;try{e=Vt.decodeMessage(t)}catch(e){this.emit("error",{type:"MessageParseError",error:e,data:t.data})}if(void 0!==e){switch(ht.debug("Event recd",e),e.event){case"pusher:error":this.emit("error",{type:"PusherError",data:e.data});break;case"pusher:ping":this.emit("ping");break;case"pusher:pong":this.emit("pong")}this.emit("message",e)}},activity:()=>{this.emit("activity")},error:t=>{this.emit("error",t)},closed:t=>{e(),t&&t.code&&this.handleCloseEvent(t),this.transport=null,this.emit("closed")}},e=()=>{rt(t,((t,e)=>{this.transport.unbind(e,t)}))};rt(t,((t,e)=>{this.transport.bind(e,t)}))}handleCloseEvent(t){var e=Vt.getCloseAction(t),n=Vt.getCloseError(t);n&&this.emit("error",n),e&&this.emit(e,{action:e,error:n})}}class Wt{constructor(t,e){this.transport=t,this.callback=e,this.bindListeners()}close(){this.unbindListeners(),this.transport.close()}bindListeners(){this.onMessage=t=>{var e;this.unbindListeners();try{e=Vt.processHandshake(t)}catch(t){return this.finish("error",{error:t}),void this.transport.close()}"connected"===e.action?this.finish("connected",{connection:new $t(e.id,this.transport),activityTimeout:e.activityTimeout}):(this.finish(e.action,{error:e.error}),this.transport.close())},this.onClosed=t=>{this.unbindListeners();var e=Vt.getCloseAction(t)||"backoff",n=Vt.getCloseError(t);this.finish(e,{error:n})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)}unbindListeners(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)}finish(t,e){this.callback(tt({transport:this.transport,action:t},e))}}class Ut{constructor(t,e){this.timeline=t,this.options=e||{}}send(t,e){this.timeline.isEmpty()||this.timeline.send(Ce.TimelineTransport.getAgent(this,t),e)}}class Ht extends Ct{constructor(t,e){super((function(e,n){ht.debug("No callbacks on "+t+" for "+e)})),this.name=t,this.pusher=e,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}authorize(t,e){return e(null,{auth:""})}trigger(t,e){if(0!==t.indexOf("client-"))throw new R("Event '"+t+"' does not start with 'client-'");if(!this.subscribed){var n=O("triggeringClientEvents");ht.warn(`Client event triggered before channel 'subscription_succeeded' event . ${n}`)}return this.pusher.send_event(t,e,this.name)}disconnect(){this.subscribed=!1,this.subscriptionPending=!1}handleEvent(t){var e=t.event,n=t.data;"pusher_internal:subscription_succeeded"===e?this.handleSubscriptionSucceededEvent(t):"pusher_internal:subscription_count"===e?this.handleSubscriptionCountEvent(t):0!==e.indexOf("pusher_internal:")&&this.emit(e,n,{})}handleSubscriptionSucceededEvent(t){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",t.data)}handleSubscriptionCountEvent(t){t.data.subscription_count&&(this.subscriptionCount=t.data.subscription_count),this.emit("pusher:subscription_count",t.data)}subscribe(){this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,((t,e)=>{t?(this.subscriptionPending=!1,ht.error(t.toString()),this.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:t.message},t instanceof N?{status:t.status}:{}))):this.pusher.send_event("pusher:subscribe",{auth:e.auth,channel_data:e.channel_data,channel:this.name})})))}unsubscribe(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})}cancelSubscription(){this.subscriptionCancelled=!0}reinstateSubscription(){this.subscriptionCancelled=!1}}class qt extends Ht{authorize(t,e){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:t},e)}}class Gt{constructor(){this.reset()}get(t){return Object.prototype.hasOwnProperty.call(this.members,t)?{id:t,info:this.members[t]}:null}each(t){rt(this.members,((e,n)=>{t(this.get(n))}))}setMyID(t){this.myID=t}onSubscription(t){this.members=t.presence.hash,this.count=t.presence.count,this.me=this.get(this.myID)}addMember(t){return null===this.get(t.user_id)&&this.count++,this.members[t.user_id]=t.user_info,this.get(t.user_id)}removeMember(t){var e=this.get(t.user_id);return e&&(delete this.members[t.user_id],this.count--),e}reset(){this.members={},this.count=0,this.myID=null,this.me=null}}class Yt extends qt{constructor(t,e){super(t,e),this.members=new Gt}authorize(t,e){super.authorize(t,((t,n)=>{return r=this,o=void 0,s=function*(){if(!t)if(null!=n.channel_data){var r=JSON.parse(n.channel_data);this.members.setMyID(r.user_id)}else{if(yield this.pusher.user.signinDonePromise,null==this.pusher.user.user_data){let t=O("authorizationEndpoint");return ht.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${t}, or the user should be signed in.`),void e("Invalid auth response")}this.members.setMyID(this.pusher.user.user_data.id)}e(t,n)},new((i=void 0)||(i=Promise))((function(t,e){function n(t){try{l(s.next(t))}catch(t){e(t)}}function a(t){try{l(s.throw(t))}catch(t){e(t)}}function l(e){var r;e.done?t(e.value):(r=e.value,r instanceof i?r:new i((function(t){t(r)}))).then(n,a)}l((s=s.apply(r,o||[])).next())}));var r,o,i,s}))}handleEvent(t){var e=t.event;if(0===e.indexOf("pusher_internal:"))this.handleInternalEvent(t);else{var n=t.data,r={};t.user_id&&(r.user_id=t.user_id),this.emit(e,n,r)}}handleInternalEvent(t){var e=t.event,n=t.data;switch(e){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(t);break;case"pusher_internal:subscription_count":this.handleSubscriptionCountEvent(t);break;case"pusher_internal:member_added":var r=this.members.addMember(n);this.emit("pusher:member_added",r);break;case"pusher_internal:member_removed":var o=this.members.removeMember(n);o&&this.emit("pusher:member_removed",o)}}handleSubscriptionSucceededEvent(t){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(t.data),this.emit("pusher:subscription_succeeded",this.members))}disconnect(){this.members.reset(),super.disconnect()}}var Zt=n(1),Kt=n(0);class Xt extends qt{constructor(t,e,n){super(t,e),this.key=null,this.nacl=n}authorize(t,e){super.authorize(t,((t,n)=>{if(t)return void e(t,n);let r=n.shared_secret;r?(this.key=Object(Kt.decode)(r),delete n.shared_secret,e(null,n)):e(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`),null)}))}trigger(t,e){throw new _("Client events are not currently supported for encrypted channels")}handleEvent(t){var e=t.event,n=t.data;0!==e.indexOf("pusher_internal:")&&0!==e.indexOf("pusher:")?this.handleEncryptedEvent(e,n):super.handleEvent(t)}handleEncryptedEvent(t,e){if(!this.key)return void ht.debug("Received encrypted event before key has been retrieved from the authEndpoint");if(!e.ciphertext||!e.nonce)return void ht.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+e);let n=Object(Kt.decode)(e.ciphertext);if(n.length{e?ht.error(`Failed to make a request to the authEndpoint: ${i}. Unable to fetch new key, so dropping encrypted event`):(o=this.nacl.secretbox.open(n,r,this.key),null!==o?this.emit(t,this.getDataToEmit(o)):ht.error("Failed to decrypt event with new key. Dropping encrypted event"))}));this.emit(t,this.getDataToEmit(o))}getDataToEmit(t){let e=Object(Zt.decode)(t);try{return JSON.parse(e)}catch(t){return e}}}class Jt extends Ct{constructor(t,e){super(),this.state="initialized",this.connection=null,this.key=t,this.options=e,this.timeline=this.options.timeline,this.usingTLS=this.options.useTLS,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var n=Ce.getNetwork();n.bind("online",(()=>{this.timeline.info({netinfo:"online"}),"connecting"!==this.state&&"unavailable"!==this.state||this.retryIn(0)})),n.bind("offline",(()=>{this.timeline.info({netinfo:"offline"}),this.connection&&this.sendActivityCheck()})),this.updateStrategy()}connect(){this.connection||this.runner||(this.strategy.isSupported()?(this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()):this.updateState("failed"))}send(t){return!!this.connection&&this.connection.send(t)}send_event(t,e,n){return!!this.connection&&this.connection.send_event(t,e,n)}disconnect(){this.disconnectInternally(),this.updateState("disconnected")}isUsingTLS(){return this.usingTLS}startConnecting(){var t=(e,n)=>{e?this.runner=this.strategy.connect(0,t):"error"===n.action?(this.emit("error",{type:"HandshakeError",error:n.error}),this.timeline.error({handshakeError:n.error})):(this.abortConnecting(),this.handshakeCallbacks[n.action](n))};this.runner=this.strategy.connect(0,t)}abortConnecting(){this.runner&&(this.runner.abort(),this.runner=null)}disconnectInternally(){this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection&&this.abandonConnection().close()}updateStrategy(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})}retryIn(t){this.timeline.info({action:"retry",delay:t}),t>0&&this.emit("connecting_in",Math.round(t/1e3)),this.retryTimer=new K(t||0,(()=>{this.disconnectInternally(),this.connect()}))}clearRetryTimer(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)}setUnavailableTimer(){this.unavailableTimer=new K(this.options.unavailableTimeout,(()=>{this.updateState("unavailable")}))}clearUnavailableTimer(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()}sendActivityCheck(){this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new K(this.options.pongTimeout,(()=>{this.timeline.error({pong_timed_out:this.options.pongTimeout}),this.retryIn(0)}))}resetActivityCheck(){this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new K(this.activityTimeout,(()=>{this.sendActivityCheck()})))}stopActivityCheck(){this.activityTimer&&this.activityTimer.ensureAborted()}buildConnectionCallbacks(t){return tt({},t,{message:t=>{this.resetActivityCheck(),this.emit("message",t)},ping:()=>{this.send_event("pusher:pong",{})},activity:()=>{this.resetActivityCheck()},error:t=>{this.emit("error",t)},closed:()=>{this.abandonConnection(),this.shouldRetry()&&this.retryIn(1e3)}})}buildHandshakeCallbacks(t){return tt({},t,{connected:t=>{this.activityTimeout=Math.min(this.options.activityTimeout,t.activityTimeout,t.connection.activityTimeout||1/0),this.clearUnavailableTimer(),this.setConnection(t.connection),this.socket_id=this.connection.id,this.updateState("connected",{socket_id:this.socket_id})}})}buildErrorCallbacks(){let t=t=>e=>{e.error&&this.emit("error",{type:"WebSocketError",error:e.error}),t(e)};return{tls_only:t((()=>{this.usingTLS=!0,this.updateStrategy(),this.retryIn(0)})),refused:t((()=>{this.disconnect()})),backoff:t((()=>{this.retryIn(1e3)})),retry:t((()=>{this.retryIn(0)}))}}setConnection(t){for(var e in this.connection=t,this.connectionCallbacks)this.connection.bind(e,this.connectionCallbacks[e]);this.resetActivityCheck()}abandonConnection(){if(this.connection){for(var t in this.stopActivityCheck(),this.connectionCallbacks)this.connection.unbind(t,this.connectionCallbacks[t]);var e=this.connection;return this.connection=null,e}}updateState(t,e){var n=this.state;if(this.state=t,n!==t){var r=t;"connected"===r&&(r+=" with new socket ID "+e.socket_id),ht.debug("State changed",n+" -> "+r),this.timeline.info({state:t,params:e}),this.emit("state_change",{previous:n,current:t}),this.emit(t,e)}}shouldRetry(){return"connecting"===this.state||"connected"===this.state}}class Qt{constructor(){this.channels={}}add(t,e){return this.channels[t]||(this.channels[t]=function(t,e){if(0===t.indexOf("private-encrypted-")){if(e.config.nacl)return te.createEncryptedChannel(t,e,e.config.nacl);let n="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",r=O("encryptedChannelSupport");throw new _(`${n}. ${r}`)}if(0===t.indexOf("private-"))return te.createPrivateChannel(t,e);if(0===t.indexOf("presence-"))return te.createPresenceChannel(t,e);if(0===t.indexOf("#"))throw new I('Cannot create a channel with name "'+t+'".');return te.createChannel(t,e)}(t,e)),this.channels[t]}all(){return t=this.channels,e=[],rt(t,(function(t){e.push(t)})),e;var t,e}find(t){return this.channels[t]}remove(t){var e=this.channels[t];return delete this.channels[t],e}disconnect(){rt(this.channels,(function(t){t.disconnect()}))}}var te={createChannels:()=>new Qt,createConnectionManager:(t,e)=>new Jt(t,e),createChannel:(t,e)=>new Ht(t,e),createPrivateChannel:(t,e)=>new qt(t,e),createPresenceChannel:(t,e)=>new Yt(t,e),createEncryptedChannel:(t,e,n)=>new Xt(t,e,n),createTimelineSender:(t,e)=>new Ut(t,e),createHandshake:(t,e)=>new Wt(t,e),createAssistantToTheTransportManager:(t,e,n)=>new Bt(t,e,n)};class ee{constructor(t){this.options=t||{},this.livesLeft=this.options.lives||1/0}getAssistant(t){return te.createAssistantToTheTransportManager(this,t,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})}isAlive(){return this.livesLeft>0}reportDeath(){this.livesLeft-=1}}class ne{constructor(t,e){this.strategies=t,this.loop=Boolean(e.loop),this.failFast=Boolean(e.failFast),this.timeout=e.timeout,this.timeoutLimit=e.timeoutLimit}isSupported(){return ct(this.strategies,Q.method("isSupported"))}connect(t,e){var n=this.strategies,r=0,o=this.timeout,i=null,s=(a,l)=>{l?e(null,l):(r+=1,this.loop&&(r%=n.length),r0&&(o=new K(n.timeout,(function(){i.abort(),r(!0)}))),i=t.connect(e,(function(t,e){t&&o&&o.isRunning()&&!n.failFast||(o&&o.ensureAborted(),r(t,e))})),{abort:function(){o&&o.ensureAborted(),i.abort()},forceMinPriority:function(t){i.forceMinPriority(t)}}}}class re{constructor(t){this.strategies=t}isSupported(){return ct(this.strategies,Q.method("isSupported"))}connect(t,e){return function(t,n){var r=st(t,(function(t,r,o,i){return t.connect(n,function(t,n){return function(r,o){n[t].error=r,r?function(t){return function(t,e){for(var n=0;n=Q.now()){var s=this.transports[r.transport];s&&(["ws","wss"].includes(r.transport)||o>3?(this.timeline.info({cached:!0,transport:r.transport,latency:r.latency}),i.push(new ne([s],{timeout:2*r.latency+1e3,failFast:!0}))):o++)}var a=Q.now(),l=i.pop().connect(t,(function r(s,c){s?(ae(n),i.length>0?(a=Q.now(),l=i.pop().connect(t,r)):e(s)):(function(t,e,n,r){var o=Ce.getLocalStorage();if(o)try{o[se(t)]=dt({timestamp:Q.now(),transport:e,latency:n,cacheSkipCount:r})}catch(t){}}(n,c.transport.name,Q.now()-a,o),e(null,c))}));return{abort:function(){l.abort()},forceMinPriority:function(e){t=e,l&&l.forceMinPriority(e)}}}}function se(t){return"pusherTransport"+(t?"TLS":"NonTLS")}function ae(t){var e=Ce.getLocalStorage();if(e)try{delete e[se(t)]}catch(t){}}class le{constructor(t,{delay:e}){this.strategy=t,this.options={delay:e}}isSupported(){return this.strategy.isSupported()}connect(t,e){var n,r=this.strategy,o=new K(this.options.delay,(function(){n=r.connect(t,e)}));return{abort:function(){o.ensureAborted(),n&&n.abort()},forceMinPriority:function(e){t=e,n&&n.forceMinPriority(e)}}}}class ce{constructor(t,e,n){this.test=t,this.trueBranch=e,this.falseBranch=n}isSupported(){return(this.test()?this.trueBranch:this.falseBranch).isSupported()}connect(t,e){return(this.test()?this.trueBranch:this.falseBranch).connect(t,e)}}class ue{constructor(t){this.strategy=t}isSupported(){return this.strategy.isSupported()}connect(t,e){var n=this.strategy.connect(t,(function(t,r){r&&n.abort(),e(t,r)}));return n}}function de(t){return function(){return t.isSupported()}}var he,fe={getRequest:function(t){var e=new window.XDomainRequest;return e.ontimeout=function(){t.emit("error",new M),t.close()},e.onerror=function(e){t.emit("error",e),t.close()},e.onprogress=function(){e.responseText&&e.responseText.length>0&&t.onChunk(200,e.responseText)},e.onload=function(){e.responseText&&e.responseText.length>0&&t.onChunk(200,e.responseText),t.emit("finished",200),t.close()},e},abortRequest:function(t){t.ontimeout=t.onerror=t.onprogress=t.onload=null,t.abort()}};class pe extends Ct{constructor(t,e,n){super(),this.hooks=t,this.method=e,this.url=n}start(t){this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=()=>{this.close()},Ce.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(t)}close(){this.unloader&&(Ce.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)}onChunk(t,e){for(;;){var n=this.advanceBuffer(e);if(!n)break;this.emit("chunk",{status:t,data:n})}this.isBufferTooLong(e)&&this.emit("buffer_too_long")}advanceBuffer(t){var e=t.slice(this.position),n=e.indexOf("\n");return-1!==n?(this.position+=n+1,e.slice(0,n)):null}isBufferTooLong(t){return this.position===t.length&&t.length>262144}}!function(t){t[t.CONNECTING=0]="CONNECTING",t[t.OPEN=1]="OPEN",t[t.CLOSED=3]="CLOSED"}(he||(he={}));var ge=he,me=1;function ye(t){var e=-1===t.indexOf("?")?"?":"&";return t+e+"t="+ +new Date+"&n="+me++}function ve(t){return Ce.randomInt(t)}var be,xe=class{constructor(t,e){this.hooks=t,this.session=ve(1e3)+"/"+function(){for(var t=[],e=0;e<8;e++)t.push(ve(32).toString(32));return t.join("")}(),this.location=function(t){var e=/([^\?]*)\/*(\??.*)/.exec(t);return{base:e[1],queryString:e[2]}}(e),this.readyState=ge.CONNECTING,this.openStream()}send(t){return this.sendRaw(JSON.stringify([t]))}ping(){this.hooks.sendHeartbeat(this)}close(t,e){this.onClose(t,e,!0)}sendRaw(t){if(this.readyState!==ge.OPEN)return!1;try{return Ce.createSocketRequest("POST",ye((e=this.location,n=this.session,e.base+"/"+n+"/xhr_send"))).start(t),!0}catch(t){return!1}var e,n}reconnect(){this.closeStream(),this.openStream()}onClose(t,e,n){this.closeStream(),this.readyState=ge.CLOSED,this.onclose&&this.onclose({code:t,reason:e,wasClean:n})}onChunk(t){var e;if(200===t.status)switch(this.readyState===ge.OPEN&&this.onActivity(),t.data.slice(0,1)){case"o":e=JSON.parse(t.data.slice(1)||"{}"),this.onOpen(e);break;case"a":e=JSON.parse(t.data.slice(1)||"[]");for(var n=0;n{this.onChunk(t)})),this.stream.bind("finished",(t=>{this.hooks.onFinished(this,t)})),this.stream.bind("buffer_too_long",(()=>{this.reconnect()}));try{this.stream.start()}catch(t){Q.defer((()=>{this.onError(t),this.onClose(1006,"Could not start streaming",!1)}))}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}},we={getReceiveURL:function(t,e){return t.base+"/"+e+"/xhr_streaming"+t.queryString},onHeartbeat:function(t){t.sendRaw("[]")},sendHeartbeat:function(t){t.sendRaw("[]")},onFinished:function(t,e){t.onClose(1006,"Connection interrupted ("+e+")",!1)}},ke={getReceiveURL:function(t,e){return t.base+"/"+e+"/xhr"+t.queryString},onHeartbeat:function(){},sendHeartbeat:function(t){t.sendRaw("[]")},onFinished:function(t,e){200===e?t.reconnect():t.onClose(1006,"Connection interrupted ("+e+")",!1)}},Se={getRequest:function(t){var e=new(Ce.getXHRAPI());return e.onreadystatechange=e.onprogress=function(){switch(e.readyState){case 3:e.responseText&&e.responseText.length>0&&t.onChunk(e.status,e.responseText);break;case 4:e.responseText&&e.responseText.length>0&&t.onChunk(e.status,e.responseText),t.emit("finished",e.status),t.close()}},e},abortRequest:function(t){t.onreadystatechange=null,t.abort()}},Ce={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:o,DependenciesReceivers:A,getDefaultStrategy:function(t,e,n){var r={};function o(e,o,i,s,a){var l=n(t,e,o,i,s,a);return r[e]=l,l}var i,s=Object.assign({},e,{hostNonTLS:t.wsHost+":"+t.wsPort,hostTLS:t.wsHost+":"+t.wssPort,httpPath:t.wsPath}),a=Object.assign({},s,{useTLS:!0}),l=Object.assign({},e,{hostNonTLS:t.httpHost+":"+t.httpPort,hostTLS:t.httpHost+":"+t.httpsPort,httpPath:t.httpPath}),c={loop:!0,timeout:15e3,timeoutLimit:6e4},u=new ee({minPingDelay:1e4,maxPingDelay:t.activityTimeout}),d=new ee({lives:2,minPingDelay:1e4,maxPingDelay:t.activityTimeout}),h=o("ws","ws",3,s,u),f=o("wss","ws",3,a,u),p=o("sockjs","sockjs",1,l),g=o("xhr_streaming","xhr_streaming",1,l,d),m=o("xdr_streaming","xdr_streaming",1,l,d),y=o("xhr_polling","xhr_polling",1,l),v=o("xdr_polling","xdr_polling",1,l),b=new ne([h],c),x=new ne([f],c),w=new ne([p],c),k=new ne([new ce(de(g),g,m)],c),S=new ne([new ce(de(y),y,v)],c),C=new ne([new ce(de(k),new re([k,new le(S,{delay:4e3})]),S)],c),A=new ce(de(C),C,w);return i=e.useTLS?new re([b,new le(A,{delay:2e3})]):new re([b,new le(x,{delay:2e3}),new le(A,{delay:5e3})]),new ie(new ue(new ce(de(h),i,A)),r,{ttl:18e5,timeline:e.timeline,useTLS:e.useTLS})},Transports:Ft,transportConnectionInitializer:function(){var t=this;t.timeline.info(t.buildTimelineMessage({transport:t.name+(t.options.useTLS?"s":"")})),t.hooks.isInitialized()?t.changeState("initialized"):t.hooks.file?(t.changeState("initializing"),E.load(t.hooks.file,{useTLS:t.options.useTLS},(function(e,n){t.hooks.isInitialized()?(t.changeState("initialized"),n(!0)):(e&&t.onError(e),t.onClose(),n(!1))}))):t.onClose()},HTTPFactory:{createStreamingSocket(t){return this.createSocket(we,t)},createPollingSocket(t){return this.createSocket(ke,t)},createSocket:(t,e)=>new xe(t,e),createXHR(t,e){return this.createRequest(Se,t,e)},createRequest:(t,e,n)=>new pe(t,e,n),createXDR:function(t,e){return this.createRequest(fe,t,e)}},TimelineTransport:mt,getXHRAPI:()=>window.XMLHttpRequest,getWebSocketAPI:()=>window.WebSocket||window.MozWebSocket,setup(t){window.Pusher=t;var e=()=>{this.onDocumentBody(t.ready)};window.JSON?e():E.load("json2",{},e)},getDocument:()=>document,getProtocol(){return this.getDocument().location.protocol},getAuthorizers:()=>({ajax:B,jsonp:ft}),onDocumentBody(t){document.body?t():setTimeout((()=>{this.onDocumentBody(t)}),0)},createJSONPRequest:(t,e)=>new gt(t,e),createScriptRequest:t=>new pt(t),getLocalStorage(){try{return window.localStorage}catch(t){return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){return new(this.getXHRAPI())},createMicrosoftXHR:()=>new ActiveXObject("Microsoft.XMLHTTP"),getNetwork:()=>Nt,createWebSocket(t){return new(this.getWebSocketAPI())(t)},createSocketRequest(t,e){if(this.isXHRSupported())return this.HTTPFactory.createXHR(t,e);if(this.isXDRSupported(0===e.indexOf("https:")))return this.HTTPFactory.createXDR(t,e);throw"Cross-origin HTTP requests are not supported"},isXHRSupported(){var t=this.getXHRAPI();return Boolean(t)&&void 0!==(new t).withCredentials},isXDRSupported(t){var e=t?"https:":"http:",n=this.getProtocol();return Boolean(window.XDomainRequest)&&n===e},addUnloadListener(t){void 0!==window.addEventListener?window.addEventListener("unload",t,!1):void 0!==window.attachEvent&&window.attachEvent("onunload",t)},removeUnloadListener(t){void 0!==window.addEventListener?window.removeEventListener("unload",t,!1):void 0!==window.detachEvent&&window.detachEvent("onunload",t)},randomInt:t=>Math.floor((window.crypto||window.msCrypto).getRandomValues(new Uint32Array(1))[0]/Math.pow(2,32)*t)};!function(t){t[t.ERROR=3]="ERROR",t[t.INFO=6]="INFO",t[t.DEBUG=7]="DEBUG"}(be||(be={}));var Ae=be;class Ee{constructor(t,e,n){this.key=t,this.session=e,this.events=[],this.options=n||{},this.sent=0,this.uniqueID=0}log(t,e){t<=this.options.level&&(this.events.push(tt({},e,{timestamp:Q.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())}error(t){this.log(Ae.ERROR,t)}info(t){this.log(Ae.INFO,t)}debug(t){this.log(Ae.DEBUG,t)}isEmpty(){return 0===this.events.length}send(t,e){var n=tt({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],t(n,((t,n)=>{t||this.sent++,e&&e(t,n)})),!0}generateUniqueID(){return this.uniqueID++,this.uniqueID}}class Te{constructor(t,e,n,r){this.name=t,this.priority=e,this.transport=n,this.options=r||{}}isSupported(){return this.transport.isSupported({useTLS:this.options.useTLS})}connect(t,e){if(!this.isSupported())return Pe(new F,e);if(this.priority{n||(c(),o?o.close():r.close())},forceMinPriority:t=>{n||this.priority{if(void 0===Ce.getAuthorizers()[t.transport])throw`'${t.transport}' is not a recognized auth transport`;return(e,n)=>{const r=((t,e)=>{var n="socket_id="+encodeURIComponent(t.socketId);for(var r in e.params)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(e.params[r]);if(null!=e.paramsProvider){let t=e.paramsProvider();for(var r in t)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t[r])}return n})(e,t);Ce.getAuthorizers()[t.transport](Ce,r,t,P.UserAuthentication,n)}})(e)}function Fe(t,e){const n=function(t,e){let n;return"channelAuthorization"in t?n=Object.assign(Object.assign({},w),t.channelAuthorization):(n={transport:t.authTransport||m,endpoint:t.authEndpoint||g},"auth"in t&&("params"in t.auth&&(n.params=t.auth.params),"headers"in t.auth&&(n.headers=t.auth.headers)),"authorizer"in t&&(n.customHandler=((t,e,n)=>{const r={authTransport:e.transport,authEndpoint:e.endpoint,auth:{params:e.params,headers:e.headers}};return(e,o)=>{const i=t.channel(e.channelName);n(i,r).authorize(e.socketId,o)}})(e,n,t.authorizer))),n}(t,e);return"customHandler"in n&&null!=n.customHandler?n.customHandler:(t=>{if(void 0===Ce.getAuthorizers()[t.transport])throw`'${t.transport}' is not a recognized auth transport`;return(e,n)=>{const r=((t,e)=>{var n="socket_id="+encodeURIComponent(t.socketId);for(var r in n+="&channel_name="+encodeURIComponent(t.channelName),e.params)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(e.params[r]);if(null!=e.paramsProvider){let t=e.paramsProvider();for(var r in t)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t[r])}return n})(e,t);Ce.getAuthorizers()[t.transport](Ce,r,t,P.ChannelAuthorization,n)}})(n)}class Ne extends Ct{constructor(t){super((function(t,e){ht.debug(`No callbacks on watchlist events for ${t}`)})),this.pusher=t,this.bindWatchlistInternalEvent()}handleEvent(t){t.data.events.forEach((t=>{this.emit(t.name,t)}))}bindWatchlistInternalEvent(){this.pusher.connection.bind("message",(t=>{"pusher_internal:watchlist_events"===t.event&&this.handleEvent(t)}))}}class Be extends Ct{constructor(t){super((function(t,e){ht.debug("No callbacks on user for "+t)})),this.signin_requested=!1,this.user_data=null,this.serverToUserChannel=null,this.signinDonePromise=null,this._signinDoneResolve=null,this._onAuthorize=(t,e)=>{if(t)return ht.warn(`Error during signin: ${t}`),void this._cleanup();this.pusher.send_event("pusher:signin",{auth:e.auth,user_data:e.user_data})},this.pusher=t,this.pusher.connection.bind("state_change",(({previous:t,current:e})=>{"connected"!==t&&"connected"===e&&this._signin(),"connected"===t&&"connected"!==e&&(this._cleanup(),this._newSigninPromiseIfNeeded())})),this.watchlist=new Ne(t),this.pusher.connection.bind("message",(t=>{"pusher:signin_success"===t.event&&this._onSigninSuccess(t.data),this.serverToUserChannel&&this.serverToUserChannel.name===t.channel&&this.serverToUserChannel.handleEvent(t)}))}signin(){this.signin_requested||(this.signin_requested=!0,this._signin())}_signin(){this.signin_requested&&(this._newSigninPromiseIfNeeded(),"connected"===this.pusher.connection.state&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))}_onSigninSuccess(t){try{this.user_data=JSON.parse(t.user_data)}catch(e){return ht.error(`Failed parsing user data after signin: ${t.user_data}`),void this._cleanup()}if("string"!=typeof this.user_data.id||""===this.user_data.id)return ht.error(`user_data doesn't contain an id. user_data: ${this.user_data}`),void this._cleanup();this._signinDoneResolve(),this._subscribeChannels()}_subscribeChannels(){this.serverToUserChannel=new Ht(`#server-to-user-${this.user_data.id}`,this.pusher),this.serverToUserChannel.bind_global(((t,e)=>{0!==t.indexOf("pusher_internal:")&&0!==t.indexOf("pusher:")&&this.emit(t,e)})),(t=>{t.subscriptionPending&&t.subscriptionCancelled?t.reinstateSubscription():t.subscriptionPending||"connected"!==this.pusher.connection.state||t.subscribe()})(this.serverToUserChannel)}_cleanup(){this.user_data=null,this.serverToUserChannel&&(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),this.serverToUserChannel=null),this.signin_requested&&this._signinDoneResolve()}_newSigninPromiseIfNeeded(){if(!this.signin_requested)return;if(this.signinDonePromise&&!this.signinDonePromise.done)return;const{promise:t,resolve:e,reject:n}=function(){let t,e;return{promise:new Promise(((n,r)=>{t=n,e=r})),resolve:t,reject:e}}();t.done=!1;const r=()=>{t.done=!0};t.then(r).catch(r),this.signinDonePromise=t,this._signinDoneResolve=e}}class ze{static ready(){ze.isReady=!0;for(var t=0,e=ze.instances.length;tCe.getDefaultStrategy(this.config,t,Re),timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:Boolean(this.config.useTLS)}),this.connection.bind("connected",(()=>{this.subscribeAll(),this.timelineSender&&this.timelineSender.send(this.connection.isUsingTLS())})),this.connection.bind("message",(t=>{var e=0===t.event.indexOf("pusher_internal:");if(t.channel){var n=this.channel(t.channel);n&&n.handleEvent(t)}e||this.global_emitter.emit(t.event,t.data)})),this.connection.bind("connecting",(()=>{this.channels.disconnect()})),this.connection.bind("disconnected",(()=>{this.channels.disconnect()})),this.connection.bind("error",(t=>{ht.warn(t)})),ze.instances.push(this),this.timeline.info({instances:ze.instances.length}),this.user=new Be(this),ze.isReady&&this.connect()}channel(t){return this.channels.find(t)}allChannels(){return this.channels.all()}connect(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var t=this.connection.isUsingTLS(),e=this.timelineSender;this.timelineSenderTimer=new X(6e4,(function(){e.send(t)}))}}disconnect(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)}bind(t,e,n){return this.global_emitter.bind(t,e,n),this}unbind(t,e,n){return this.global_emitter.unbind(t,e,n),this}bind_global(t){return this.global_emitter.bind_global(t),this}unbind_global(t){return this.global_emitter.unbind_global(t),this}unbind_all(t){return this.global_emitter.unbind_all(),this}subscribeAll(){var t;for(t in this.channels.channels)this.channels.channels.hasOwnProperty(t)&&this.subscribe(t)}subscribe(t){var e=this.channels.add(t,this);return e.subscriptionPending&&e.subscriptionCancelled?e.reinstateSubscription():e.subscriptionPending||"connected"!==this.connection.state||e.subscribe(),e}unsubscribe(t){var e=this.channels.find(t);e&&e.subscriptionPending?e.cancelSubscription():(e=this.channels.remove(t))&&e.subscribed&&e.unsubscribe()}send_event(t,e,n){return this.connection.send_event(t,e,n)}shouldUseTLS(){return this.config.useTLS}signin(){this.user.signin()}}ze.instances=[],ze.isReady=!1,ze.logToConsole=!1,ze.Runtime=Ce,ze.ScriptReceivers=Ce.ScriptReceivers,ze.DependenciesReceivers=Ce.DependenciesReceivers,ze.auth_callbacks=Ce.auth_callbacks;var Ve=e.default=ze;Ce.setup(ze)}])},t.exports=e()},2592:(t,e,n)=>{const r=n(7138),o=n(5115),i=n(6907),s=n(3776);function a(t,e,n,i,s){const a=[].slice.call(arguments,1),l=a.length,c="function"==typeof a[l-1];if(!c&&!r())throw new Error("Callback required as last argument");if(!c){if(l<1)throw new Error("Too few arguments provided");return 1===l?(n=e,e=i=void 0):2!==l||e.getContext||(i=n,n=e,e=void 0),new Promise((function(r,s){try{const s=o.create(n,i);r(t(s,e,i))}catch(t){s(t)}}))}if(l<2)throw new Error("Too few arguments provided");2===l?(s=n,n=e,e=i=void 0):3===l&&(e.getContext&&void 0===s?(s=i,i=void 0):(s=i,i=n,n=e,e=void 0));try{const r=o.create(n,i);s(null,t(r,e,i))}catch(t){s(t)}}o.create,e.rT=a.bind(null,i.render),a.bind(null,i.renderToDataURL),a.bind(null,(function(t,e,n){return s.render(t,n)}))},7138:t=>{t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},1845:(t,e,n)=>{const r=n(242).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];const e=Math.floor(t/7)+2,n=r(t),o=145===n?26:2*Math.ceil((n-13)/(2*e-2)),i=[n-7];for(let t=1;t{const r=n(6910),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(t){this.mode=r.ALPHANUMERIC,this.data=t}i.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let n=45*o.indexOf(this.data[e]);n+=o.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},t.exports=i},7245:t=>{function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=e},3280:t=>{function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}e.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,e){return this.data[t*this.size+e]},e.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},e.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=e},3424:(t,e,n)=>{const r=n(2378),o=n(6910);function i(t){this.mode=o.BYTE,"string"==typeof t&&(t=r(t)),this.data=new Uint8Array(t)}i.getBitsLength=function(t){return 8*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){for(let e=0,n=this.data.length;e{const r=n(4908),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(t,e){switch(e){case r.L:return o[4*(t-1)+0];case r.M:return o[4*(t-1)+1];case r.Q:return o[4*(t-1)+2];case r.H:return o[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}}},4908:(t,e)=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return n}}},6526:(t,e,n)=>{const r=n(242).getSymbolSize;e.getPositions=function(t){const e=r(t);return[[0,0],[e-7,0],[0,e-7]]}},1642:(t,e,n)=>{const r=n(242),o=r.getBCHDigit(1335);e.getEncodedBits=function(t,e){const n=t.bit<<3|e;let i=n<<10;for(;r.getBCHDigit(i)-o>=0;)i^=1335<{const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let t=1;for(let e=0;e<255;e++)n[e]=t,r[t]=e,t<<=1,256&t&&(t^=285);for(let t=255;t<512;t++)n[t]=n[t-255]}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return r[t]},e.exp=function(t){return n[t]},e.mul=function(t,e){return 0===t||0===e?0:n[r[t]+r[e]]}},5442:(t,e,n)=>{const r=n(6910),o=n(242);function i(t){this.mode=r.KANJI,this.data=t}i.getBitsLength=function(t){return 13*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},t.exports=i},7126:(t,e)=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const e=t.size;let n=0,r=0,o=0,i=null,s=null;for(let a=0;a=5&&(n+=r-5+3),i=e,r=1),e=t.get(l,a),e===s?o++:(o>=5&&(n+=o-5+3),s=e,o=1)}r>=5&&(n+=r-5+3),o>=5&&(n+=o-5+3)}return n},e.getPenaltyN2=function(t){const e=t.size;let n=0;for(let r=0;r=10&&(1488===r||93===r)&&n++,o=o<<1&2047|t.get(s,i),s>=10&&(1488===o||93===o)&&n++}return 40*n},e.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r{const r=n(3114),o=n(7007);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return o.testNumeric(t)?e.NUMERIC:o.testAlphanumeric(t)?e.ALPHANUMERIC:o.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return n}}},1085:(t,e,n)=>{const r=n(6910);function o(t){this.mode=r.NUMERIC,this.data=t.toString()}o.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){let e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))},t.exports=o},6143:(t,e,n)=>{const r=n(2577);e.mul=function(t,e){const n=new Uint8Array(t.length+e.length-1);for(let o=0;o=0;){const t=n[0];for(let o=0;o{const r=n(242),o=n(4908),i=n(7245),s=n(3280),a=n(1845),l=n(6526),c=n(7126),u=n(5393),d=n(2882),h=n(3103),f=n(1642),p=n(6910),g=n(6130);function m(t,e,n){const r=t.size,o=f.getEncodedBits(e,n);let i,s;for(i=0;i<15;i++)s=1==(o>>i&1),i<6?t.set(i,8,s,!0):i<8?t.set(i+1,8,s,!0):t.set(r-15+i,8,s,!0),i<8?t.set(8,r-i-1,s,!0):i<9?t.set(8,15-i-1+1,s,!0):t.set(8,15-i-1,s,!0);t.set(r-8,8,1,!0)}function y(t,e,n,o){let f;if(Array.isArray(t))f=g.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let r=e;if(!r){const e=g.rawSplit(t);r=h.getBestVersionForData(e,n)}f=g.fromString(t,r||40)}}const y=h.getBestVersionForData(f,n);if(!y)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e=0&&e<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===e||6===e)||e>=2&&e<=4&&r>=2&&r<=4?t.set(o+e,i+r,!0,!0):t.set(o+e,i+r,!1,!0))}}(x,e),function(t){const e=t.size;for(let n=8;n=7&&function(t,e){const n=t.size,r=h.getEncodedBits(e);let o,i,s;for(let e=0;e<18;e++)o=Math.floor(e/3),i=e%3+n-8-3,s=1==(r>>e&1),t.set(o,i,s,!0),t.set(i,o,s,!0)}(x,e),function(t,e){const n=t.size;let r=-1,o=n-1,i=7,s=0;for(let a=n-1;a>0;a-=2)for(6===a&&a--;;){for(let n=0;n<2;n++)if(!t.isReserved(o,a-n)){let r=!1;s>>i&1)),t.set(o,a-n,r),i--,-1===i&&(s++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(x,v),isNaN(o)&&(o=c.getBestMask(x,m.bind(null,x,n))),c.applyMask(o,x),m(x,n,o),{modules:x,version:e,errorCorrectionLevel:n,maskPattern:o,segments:f}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");let n,i,s=o.M;return void 0!==e&&(s=o.from(e.errorCorrectionLevel,o.M),n=h.from(e.version),i=c.from(e.maskPattern),e.toSJISFunc&&r.setToSJISFunction(e.toSJISFunc)),y(t,n,s,i)}},2882:(t,e,n)=>{const r=n(6143);function o(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(t){this.degree=t,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(t.length+this.degree);e.set(t);const n=r.mod(e,this.genPoly),o=this.degree-n.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(n,o),t}return n},t.exports=o},7007:(t,e)=>{const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";e.KANJI=new RegExp(r,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(o,"g"),e.NUMERIC=new RegExp(n,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+r+"$"),s=new RegExp("^"+n+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return i.test(t)},e.testNumeric=function(t){return s.test(t)},e.testAlphanumeric=function(t){return a.test(t)}},6130:(t,e,n)=>{const r=n(6910),o=n(1085),i=n(8260),s=n(3424),a=n(5442),l=n(7007),c=n(242),u=n(8993);function d(t){return unescape(encodeURIComponent(t)).length}function h(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function f(t){const e=h(l.NUMERIC,r.NUMERIC,t),n=h(l.ALPHANUMERIC,r.ALPHANUMERIC,t);let o,i;return c.isKanjiModeEnabled()?(o=h(l.BYTE,r.BYTE,t),i=h(l.KANJI,r.KANJI,t)):(o=h(l.BYTE_KANJI,r.BYTE,t),i=[]),e.concat(n,o,i).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function p(t,e){switch(e){case r.NUMERIC:return o.getBitsLength(t);case r.ALPHANUMERIC:return i.getBitsLength(t);case r.KANJI:return a.getBitsLength(t);case r.BYTE:return s.getBitsLength(t)}}function g(t,e){let n;const l=r.getBestModeForData(t);if(n=r.from(e,l),n!==r.BYTE&&n.bit=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[]))},e.rawSplit=function(t){return e.fromArray(f(t,c.isKanjiModeEnabled()))}},242:(t,e)=>{let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return r[t]},e.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},e.isKanjiModeEnabled=function(){return void 0!==n},e.toSJIS=function(t){return n(t)}},3114:(t,e)=>{e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},3103:(t,e,n)=>{const r=n(242),o=n(5393),i=n(4908),s=n(6910),a=n(3114),l=r.getBCHDigit(7973);function c(t,e){return s.getCharCountIndicator(t,e)+4}function u(t,e){let n=0;return t.forEach((function(t){const r=c(t.mode,e);n+=r+t.getBitsLength()})),n}e.from=function(t,e){return a.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,n){if(!a.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=s.BYTE);const i=8*(r.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,e));if(n===s.MIXED)return i;const l=i-c(n,t);switch(n){case s.NUMERIC:return Math.floor(l/10*3);case s.ALPHANUMERIC:return Math.floor(l/11*2);case s.KANJI:return Math.floor(l/13);case s.BYTE:default:return Math.floor(l/8)}},e.getBestVersionForData=function(t,n){let r;const o=i.from(n,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,s.MIXED))return r}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,r){for(let o=1;o<=40;o++)if(n<=e.getCapacity(o,r,t))return o}(r.mode,r.getLength(),o)},e.getEncodedBits=function(t){if(!a.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;r.getBCHDigit(e)-l>=0;)e^=7973<{const r=n(9653);e.render=function(t,e,n){let o=n,i=e;void 0!==o||e&&e.getContext||(o=e,e=void 0),e||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=r.getOptions(o);const s=r.getImageWidth(t.modules.size,o),a=i.getContext("2d"),l=a.createImageData(s,s);return r.qrToImageData(l.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(a,i,s),a.putImageData(l,0,0),i},e.renderToDataURL=function(t,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=e.render(t,n,o),s=o.type||"image/png",a=o.rendererOpts||{};return i.toDataURL(s,a.quality)}},3776:(t,e,n)=>{const r=n(9653);function o(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}e.render=function(t,e,n){const s=r.getOptions(e),a=t.modules.size,l=t.modules.data,c=a+2*s.margin,u=s.color.light.a?"':"",d="0&&c>0&&t[l-1]||(r+=s?i("M",c+n,.5+u+n):i("m",o,0),o=0,s=!1),c+1',h='viewBox="0 0 '+c+" "+c+'"',f=''+u+d+"\n";return"function"==typeof n&&n(null,f),f}},9653:(t,e)=>{function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});const e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){const r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){const o=n.modules.size,i=n.modules.data,s=e.getScale(o,r),a=Math.floor((o+2*r.margin)*s),l=r.margin*s,c=[r.color.light,r.color.dark];for(let e=0;e=l&&n>=l&&e{"use strict";var r=n(5108),o=n(7294),i=n(3840);function s(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n