@wix/create-app 0.0.44 → 0.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,327 @@
1
+ import { createRequire as _createRequire } from 'node:module';
2
+ const require = _createRequire(import.meta.url);
3
+ import{$ as Fs,A as xs,Aa as Ra,Ab as Js,B as Me,Ba as Vt,Bb as Zs,Ca as Ma,Cb as dc,D as Ts,Da as ue,Db as Q,E as He,Ea as Kn,Eb as Qs,F as Rs,Fa as Aa,Fb as Zn,G as ct,Ga as Oa,H as Ue,Ha as La,Hb as eo,Ia as Da,Ib as fc,Ja as Na,Jb as pt,K as Wt,Ka as ft,Kb as to,L as Ms,La as Pa,Lb as pc,M as As,Ma as Fa,Mb as no,N as zt,Na as Ba,Nb as hc,O as Os,Oa as Ha,Ob as ro,P as Ls,Pa as Ua,Pb as mc,Q as We,Qa as Wa,Qb as gc,R as lt,Ra as P,S as $t,Sa as za,T as Ds,Ta as ge,Tb as Qn,Ua as Yt,Ub as yc,V as ut,Va as $a,Vb as er,W as Vn,Wa as Kt,Wb as _c,X as Ns,Yb as Sc,Z as Yn,Zb as so,_ as Ps,_a as ja,a as gs,aa as jt,ab as qa,b as it,bb as Ga,c as zn,ca as Bs,d as ys,da as Hs,db as Va,e as $n,ea as dt,eb as Xn,f as _s,fb as Xt,fc as oo,g as jn,gb as Ya,gc as io,h as Ss,ha as qt,hb as Ka,hc as bc,i as Pt,ia as Us,ib as Xa,ic as vc,j as qn,ja as Ws,jb as Ja,jc as Ec,k as bs,ka as zs,kb as Za,kc as wc,l as vs,la as $s,lb as Qa,lc as Ic,m as be,ma as js,mc as kc,n as at,na as qs,nb as ec,nc as Cc,o as Ft,oa as Gs,ob as tc,oc as xc,p as Es,pa as Vs,pb as nc,pc as Tc,q as Bt,qb as rc,qc as Rc,r as y,ra as Ys,rb as sc,rc as Mc,s as Ht,sa as ze,sb as oc,sc as Ac,t as pe,tb as Jn,tc as Oc,u as ws,ua as Ks,ub as ic,uc as Lc,v as Is,va as Ta,vb as ac,vc as Dc,w as Ut,wb as cc,x as ks,xa as ve,xb as lc,y as Gn,ya as Gt,yb as uc,z as Cs,za as $e,zb as Xs}from"./chunk-GSZNYAIJ.js";import{d as xa,h as k}from"./chunk-HFDLXX7R.js";k();k();var E=be,tr=0;function nr(){return tr>0}function Nc(){tr++,setTimeout(()=>{tr--})}function ye(e,t={},n){if(typeof e!="function")return e;try{let s=e.__sentry_wrapped__;if(s)return s;if(Ut(e))return e}catch{return e}let r=function(){let s=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let o=s.map(i=>ye(i,t));return e.apply(this,o)}catch(o){throw Nc(),ft(i=>{i.addEventProcessor(c=>(t.mechanism&&(ct(c,void 0,void 0),Ue(c,t.mechanism)),c.extra={...c.extra,arguments:s},c)),$e(o)}),o}};try{for(let s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}Is(r,e),ws(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}k();k();var T=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;k();function Jt(e,t){let n=or(e,t),r={type:t&&t.name,value:Hc(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Pc(e,t,n,r){let s=P(),o=s&&s.getOptions().normalizeDepth,i={exception:{values:[{type:Pt(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Uc(t,{isUnhandledRejection:r})}]},extra:{__serialized__:Ns(t,o)}};if(n){let c=or(e,n);c.length&&(i.exception.values[0].stacktrace={frames:c})}return i}function rr(e,t){return{exception:{values:[Jt(e,t)]}}}function or(e,t){let n=t.stacktrace||t.stack||"",r=Bc(t);try{return e(n,r)}catch{}return[]}var Fc=/Minified React error #\d+;/i;function Bc(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(Fc.test(e.message))return 1}return 0}function Hc(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function ir(e,t,n,r){let s=n&&n.syntheticException||void 0,o=Zt(e,t,s,r);return Ue(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),Yn(o)}function ar(e,t,n="info",r,s){let o=r&&r.syntheticException||void 0,i=sr(e,t,o,s);return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),Yn(i)}function Zt(e,t,n,r,s){let o;if(it(t)&&t.error)return rr(e,t.error);if(zn(t)||ys(t)){let i=t;if("stack"in t)o=rr(e,t);else{let c=i.name||(zn(i)?"DOMError":"DOMException"),a=i.message?`${c}: ${i.message}`:c;o=sr(e,a,n,r),ct(o,a)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return gs(t)?rr(e,t):Ss(t)||Pt(t)?(o=Pc(e,t,n,s),Ue(o,{synthetic:!0}),o):(o=sr(e,t,n,r),ct(o,`${t}`,void 0),Ue(o,{synthetic:!0}),o)}function sr(e,t,n,r){let s={};if(r&&n){let o=or(e,n);o.length&&(s.exception={values:[{value:t,stacktrace:{frames:o}}]})}if(_s(t)){let{__sentry_template_string__:o,__sentry_template_values__:i}=t;return s.logentry={message:o,params:i},s}return s.message=t,s}function Uc(e,{isUnhandledRejection:t}){let n=ks(e),r=t?"promise rejection":"exception";return it(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Pt(e)?`Event \`${Wc(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Wc(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}k();function cr(e,{metadata:t,tunnel:n,dsn:r}){let s={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Ht(r)}},o=zc(e);return qt(s,[o])}function zc(e){return[{type:"user_report"},e]}var ht=class extends Qs{constructor(t){let n=E.SENTRY_SDK_SOURCE||Ds();ro(t,"browser",["browser"],n),super(t),t.sendClientReports&&E.document&&E.document.addEventListener("visibilitychange",()=>{E.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return ir(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return ar(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){T&&y.warn("SDK not enabled, will not capture user feedback.");return}let n=cr(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}_flushOutcomes(){let t=this._clearOutcomes();if(t.length===0){T&&y.log("No outcomes to send");return}if(!this._dsn){T&&y.log("No dsn provided, will not send outcomes");return}T&&y.log("Sending outcomes:",t);let n=qs(t,this._options.tunnel&&Ht(this._dsn));this._sendEnvelope(n)}};k();k();var mt;function ao(){if(mt)return mt;if(As(E.fetch))return mt=E.fetch.bind(E);let e=E.document,t=E.fetch;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){T&&y.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return mt=t.bind(E)}function co(){mt=void 0}function lr(e,t=ao()){let n=0,r=0;function s(o){let i=o.body.length;n+=i,r++;let c={body:o.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,c).then(a=>(n-=i,r--,{statusCode:a.status,headers:{"x-sentry-rate-limits":a.headers.get("X-Sentry-Rate-Limits"),"retry-after":a.headers.get("Retry-After")}}))}catch(a){return co(),n-=i,r--,Ps(a)}}return pt(e,s)}k();var $c=4;function ur(e){function t(n){return new Fs((r,s)=>{let o=new XMLHttpRequest;o.onerror=s,o.onreadystatechange=()=>{o.readyState===$c&&r({statusCode:o.status,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")}})},o.open("POST",e.url);for(let i in e.headers)Object.prototype.hasOwnProperty.call(e.headers,i)&&o.setRequestHeader(i,e.headers[i]);o.send(n.body)})}return pt(e,t)}k();var je="?",jc=10,qc=20,Gc=30,Vc=40,Yc=50;function gt(e,t,n,r){let s={filename:e,function:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}var Kc=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Xc=/\((\S*)(?::(\d+))(?::(\d+))\)/,Jc=e=>{let t=Kc.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){let o=Xc.exec(t[2]);o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3])}let[r,s]=ho(t[1]||je,t[2]);return gt(s,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},lo=[Gc,Jc],Zc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Qc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,el=e=>{let t=Zc.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let o=Qc.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],s=t[1]||je;return[s,r]=ho(s,r),gt(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},uo=[Yc,el],tl=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,nl=e=>{let t=tl.exec(e);return t?gt(t[2],t[1]||je,+t[3],t[4]?+t[4]:void 0):void 0},fo=[Vc,nl],rl=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,sl=e=>{let t=rl.exec(e);return t?gt(t[2],t[3]||je,+t[1]):void 0},ol=[jc,sl],il=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,al=e=>{let t=il.exec(e);return t?gt(t[5],t[3]||t[4]||je,+t[1],+t[2]):void 0},cl=[qc,al],po=[lo,uo,fo],dr=Cs(...po),ho=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:je,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};k();k();var Qt=1024,mo="Breadcrumbs",ll=(e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:mo,setupOnce(){},setup(n){t.console&&Ts(fl(n)),t.dom&&Wt(dl(n,t.dom)),t.xhr&&$t(pl(n)),t.fetch&&zt(hl(n)),t.history&&We(ml(n)),t.sentry&&n.on&&n.on("beforeSendEvent",ul(n))}}},en=ll,fr=Q(mo,en);function ul(e){return function(n){P()===e&&ue({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Rs(n)},{event:n})}}function dl(e,t){return function(r){if(P()!==e)return;let s,o,i=typeof t=="object"?t.serializeAttribute:void 0,c=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;c&&c>Qt&&(T&&y.warn(`\`dom.maxStringLength\` cannot exceed ${Qt}, but a value of ${c} was configured. Sentry will use ${Qt} instead.`),c=Qt),typeof i=="string"&&(i=[i]);try{let l=r.event,u=gl(l)?l.target:l;s=at(u,{keyAttrs:i,maxStringLength:c}),o=Es(u)}catch{s="<unknown>"}if(s.length===0)return;let a={category:`ui.${r.name}`,message:s};o&&(a.data={"ui.component_name":o}),ue(a,{event:r.event,name:r.name,global:r.global})}}function fl(e){return function(n){if(P()!==e)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:Bs(n.level),message:qn(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${qn(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;ue(r,{input:n.args,level:n.level})}}function pl(e){return function(n){if(P()!==e)return;let{startTimestamp:r,endTimestamp:s}=n,o=n.xhr[lt];if(!r||!s||!o)return;let{method:i,url:c,status_code:a,body:l}=o,u={method:i,url:c,status_code:a},d={xhr:n.xhr,input:l,startTimestamp:r,endTimestamp:s};ue({category:"xhr",data:u,type:"http"},d)}}function hl(e){return function(n){if(P()!==e)return;let{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){let o=n.fetchData,i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};ue({category:"fetch",data:o,level:"error",type:"http"},i)}else{let o=n.response,i={...n.fetchData,status_code:o&&o.status},c={input:n.args,response:o,startTimestamp:r,endTimestamp:s};ue({category:"fetch",data:i,type:"http"},c)}}}function ml(e){return function(n){if(P()!==e)return;let r=n.from,s=n.to,o=jt(E.location.href),i=r?jt(r):void 0,c=jt(s);(!i||!i.path)&&(i=o),o.protocol===c.protocol&&o.host===c.host&&(s=c.relative),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),ue({category:"navigation",data:{from:r,to:s}})}}function gl(e){return!!e&&!!e.target}k();var _o="Dedupe",yl=()=>{let e;return{name:_o,setupOnce(){},processEvent(t){if(t.type)return t;try{if(_l(t,e))return T&&y.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},pr=yl,hr=Q(_o,pr);function _l(e,t){return t?!!(Sl(e,t)||bl(e,t)):!1}function Sl(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!bo(e,t)||!So(e,t))}function bl(e,t){let n=go(t),r=go(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!bo(e,t)||!So(e,t))}function So(e,t){let n=yo(e),r=yo(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){let o=r[s],i=n[s];if(o.filename!==i.filename||o.lineno!==i.lineno||o.colno!==i.colno||o.function!==i.function)return!1}return!0}function bo(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function go(e){return e.exception&&e.exception.values&&e.exception.values[0]}function yo(e){let t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}k();var Eo="GlobalHandlers",vl=(e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:Eo,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(El(n),vo("onerror")),t.onunhandledrejection&&(wl(n),vo("onunhandledrejection"))}}},tn=vl,mr=Q(Eo,tn);function El(e){Os(t=>{let{stackParser:n,attachStacktrace:r}=Io();if(P()!==e||nr())return;let{msg:s,url:o,line:i,column:c,error:a}=t,l=a===void 0&&$n(s)?Cl(s,o,i,c):wo(Zt(n,a||s,void 0,r,!1),o,i,c);l.level="error",Vt(l,{originalException:a,mechanism:{handled:!1,type:"onerror"}})})}function wl(e){Ls(t=>{let{stackParser:n,attachStacktrace:r}=Io();if(P()!==e||nr())return;let s=Il(t),o=jn(s)?kl(s):Zt(n,s,void 0,r,!0);o.level="error",Vt(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Il(e){if(jn(e))return e;let t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}function kl(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Cl(e,t,n,r){let s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,o=it(e)?e.message:e,i="Error",c=o.match(s);return c&&(i=c[1],o=c[2]),wo({exception:{values:[{type:i,value:o}]}},t,n,r)}function wo(e,t,n,r){let s=e.exception=e.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},c=i.stacktrace=i.stacktrace||{},a=c.frames=c.frames||[],l=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,d=$n(t)&&t.length>0?t:Ft();return a.length===0&&a.push({colno:l,filename:d,function:"?",in_app:!0,lineno:u}),e}function vo(e){T&&y.log(`Global Handler attached: ${e}`)}function Io(){let e=P();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}k();var ko="HttpContext",xl=()=>({name:ko,setupOnce(){},preprocessEvent(e){if(!E.navigator&&!E.location&&!E.document)return;let t=e.request&&e.request.url||E.location&&E.location.href,{referrer:n}=E.document||{},{userAgent:r}=E.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:s};e.request=o}}),nn=xl,gr=Q(ko,nn);k();var Tl="cause",Rl=5,Co="LinkedErrors",Ml=(e={})=>{let t=e.limit||Rl,n=e.key||Tl;return{name:Co,setupOnce(){},preprocessEvent(r,s,o){let i=o.getOptions();vs(Jt,i.stackParser,i.maxValueLength,n,t,r,s)}}},rn=Ml,yr=Q(Co,rn);k();var Al=["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"],To="TryCatch",Ol=(e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:To,setupOnce(){t.setTimeout&&pe(E,"setTimeout",xo),t.setInterval&&pe(E,"setInterval",xo),t.requestAnimationFrame&&pe(E,"requestAnimationFrame",Ll),t.XMLHttpRequest&&"XMLHttpRequest"in E&&pe(XMLHttpRequest.prototype,"send",Dl);let n=t.eventTarget;n&&(Array.isArray(n)?n:Al).forEach(Nl)}}},sn=Ol,_r=Q(To,sn);function xo(e){return function(...t){let n=t[0];return t[0]=ye(n,{mechanism:{data:{function:Me(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Ll(e){return function(t){return e.apply(this,[ye(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Me(e)},handled:!1,type:"instrument"}})])}}function Dl(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&pe(n,s,function(o){let i={mechanism:{data:{function:s,handler:Me(o)},handled:!1,type:"instrument"}},c=Ut(o);return c&&(i.mechanism.data.handler=Me(c)),ye(o,i)})}),e.apply(this,t)}}function Nl(e){let t=E,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(pe(n,"addEventListener",function(r){return function(s,o,i){try{typeof o.handleEvent=="function"&&(o.handleEvent=ye(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Me(o),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,ye(o,{mechanism:{data:{function:"addEventListener",handler:Me(o),target:e},handled:!1,type:"instrument"}}),i])}}),pe(n,"removeEventListener",function(r){return function(s,o,i){let c=o;try{let a=c&&c.__sentry_wrapped__;a&&r.call(this,s,a,i)}catch{}return r.call(this,s,c,i)}}))}var Ro=[Qn(),er(),sn(),en(),tn(),rn(),pr(),nn()];function Mo(e){return[...Ro]}function Pl(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=Mo()),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),E.SENTRY_RELEASE&&E.SENTRY_RELEASE.id&&(e.release=E.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);let t={...e,stackParser:xs(e.stackParser||dr),integrations:Zs(e),transport:e.transport||(Ms()?lr:ur)};eo(ht,t),e.autoSessionTracking&&Wl()}var Fl=(e={},t=Xn())=>{if(!E.document){T&&y.error("Global document not defined in showReportDialog call");return}let{client:n,scope:r}=t.getStackTop(),s=e.dsn||n&&n.getDsn();if(!s){T&&y.error("DSN not configured for showReportDialog call");return}r&&(e.user={...r.getUser(),...e.user}),e.eventId||(e.eventId=t.lastEventId());let o=E.document.createElement("script");o.async=!0,o.crossOrigin="anonymous",o.src=Js(s,e),e.onLoad&&(o.onload=e.onLoad);let{onClose:i}=e;if(i){let a=l=>{if(l.data==="__sentry_reportdialog_closed__")try{i()}finally{E.removeEventListener("message",a)}};E.addEventListener("message",a)}let c=E.document.head||E.document.body;c?c.appendChild(o):T&&y.error("Not injecting report dialog. No injection point found in HTML")};function Bl(){}function Hl(e){e()}function Ul(e){return ye(e)()}function Wl(){if(typeof E.document>"u"){T&&y.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}Yt({ignoreDuration:!0}),Kt(),We(({from:e,to:t})=>{e!==void 0&&e!==t&&(Yt({ignoreDuration:!0}),Kt())})}function zl(e){let t=P();t&&t.captureUserFeedback(e)}var Sr={};xa(Sr,{Breadcrumbs:()=>fr,Dedupe:()=>hr,GlobalHandlers:()=>mr,HttpContext:()=>gr,LinkedErrors:()=>yr,TryCatch:()=>_r});k();k();var z=be,qr="sentryReplaySession",$l="replay_event",Gr="Unable to send Replay",jl=3e5,ql=9e5,Gl=5e3,Vl=5500,Yl=6e4,Kl=5e3,Xl=3,Ao=15e4,on=5e3,Jl=3e3,Zl=300,Vr=2e7,Ql=4999,eu=15e3,Oo=36e5;function tu(e,t){return e??t()}function ln(e){let t,n=e[0],r=1;for(;r<e.length;){let s=e[r],o=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=o(n)):(s==="call"||s==="optionalCall")&&(n=o((...i)=>n.call(t,...i)),t=void 0)}return n}var Z;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(Z||(Z={}));function nu(e){return e.nodeType===e.ELEMENT_NODE}function _t(e){let t=ln([e,"optionalAccess",n=>n.host]);return ln([t,"optionalAccess",n=>n.shadowRoot])===e}function St(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function ru(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function su(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function un(e){try{let t=e.rules||e.cssRules;return t?ru(Array.from(t,Zo).join("")):null}catch{return null}}function Zo(e){let t;if(iu(e))try{t=un(e.styleSheet)||su(e)}catch{}else if(au(e)&&e.selectorText.includes(":"))return ou(e.cssText);return t||e.cssText}function ou(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function iu(e){return"styleSheet"in e}function au(e){return"selectorText"in e}var dn=class{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;let n=ln([this,"access",r=>r.getMeta,"call",r=>r(t),"optionalAccess",r=>r.id]);return tu(n,()=>-1)}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){let n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){let r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){let r=this.getNode(t);if(r){let s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function cu(){return new dn}function In({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function vt({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function Ze(e){return e.toLowerCase()}function Ir(e){return e.toUpperCase()}var Lo="__rrweb_original__";function lu(e){let t=e.getContext("2d");if(!t)return!0;let n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){let o=t.getImageData,i=Lo in o?o[Lo]:o;if(new Uint32Array(i.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(a=>a!==0))return!1}return!0}function Yr(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ze(t):null}function fn(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}var uu=1,du=new RegExp("[^a-z0-9-_:]"),Et=-2;function Kr(){return uu++}function fu(e){if(e instanceof HTMLFormElement)return"form";let t=Ze(e.tagName);return du.test(t)?"div":t}function pu(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var qe,Do,hu=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,mu=/^(?:[a-z+]+:)?\/\//i,gu=/^www\..*/i,yu=/^(data:)([^,]*),(.*)/i;function pn(e,t){return(e||"").replace(hu,(n,r,s,o,i,c)=>{let a=s||i||c,l=r||o||"";if(!a)return n;if(mu.test(a)||gu.test(a))return`url(${l}${a}${l})`;if(yu.test(a))return`url(${l}${a}${l})`;if(a[0]==="/")return`url(${l}${pu(t)+a}${l})`;let u=t.split("/"),d=a.split("/");u.pop();for(let f of d)f!=="."&&(f===".."?u.pop():u.push(f));return`url(${l}${u.join("/")}${l})`})}var _u=/^[^ \t\n\r\u000c]+/,Su=/^[, \t\n\r\u000c]+/;function bu(e,t){if(t.trim()==="")return t;let n=0;function r(o){let i,c=o.exec(t.substring(n));return c?(i=c[0],n+=i.length,i):""}let s=[];for(;r(Su),!(n>=t.length);){let o=r(_u);if(o.slice(-1)===",")o=Ve(e,o.substring(0,o.length-1)),s.push(o);else{let i="";o=Ve(e,o);let c=!1;for(;;){let a=t.charAt(n);if(a===""){s.push((o+i).trim());break}else if(c)a===")"&&(c=!1);else if(a===","){n+=1,s.push((o+i).trim());break}else a==="("&&(c=!0);i+=a,n+=1}}}return s.join(", ")}function Ve(e,t){if(!t||t.trim()==="")return t;let n=e.createElement("a");return n.href=t,n.href}function vu(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Xr(){let e=document.createElement("a");return e.href="",e.href}function Qo(e,t,n,r,s,o){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Ve(e,r):n==="srcset"?bu(e,r):n==="style"?pn(r,Xr()):t==="object"&&n==="data"?Ve(e,r):typeof o=="function"?o(n,r,s):r)}function ei(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function Eu(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){let o=e.classList[s];if(t.test(o))return!0}if(n)return e.matches(n)}catch{}return!1}function wu(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function Oe(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Oe(e.parentNode,t,n,r+1)}function Ye(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(wu(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Qe(e,t,n,r,s,o){try{let i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(i===null)return!1;if(i.tagName==="INPUT"){let l=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(l))return!0}let c=-1,a=-1;if(o){if(a=Oe(i,Ye(r,s)),a<0)return!0;c=Oe(i,Ye(t,n),a>=0?a:1/0)}else{if(c=Oe(i,Ye(t,n)),c<0)return!1;a=Oe(i,Ye(r,s),c>=0?c:1/0)}return c>=0?a>=0?c<=a:!0:a>=0?!1:!!o}catch{}return!!o}function Iu(e,t,n){let r=e.contentWindow;if(!r)return;let s=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){let c=setTimeout(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{clearTimeout(c),s=!0,t()});return}let i="about:blank";if(r.location.href!==i||e.src===i||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function ku(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;let o=setTimeout(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{clearTimeout(o),r=!0,t()})}function Cu(e,t){let{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:c,maskAttributeFn:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:g,maskInputFn:b,dataURLOptions:m={},inlineImages:_,recordCanvas:w,keepIframeSrcFn:C,newlyAddedElement:L=!1}=t,I=xu(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Z.Document,childNodes:[],compatMode:e.compatMode}:{type:Z.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Z.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:I};case e.ELEMENT_NODE:return Ru(e,{doc:n,blockClass:s,blockSelector:o,unblockSelector:i,inlineStylesheet:p,maskAttributeFn:a,maskInputOptions:h,maskInputFn:b,dataURLOptions:m,inlineImages:_,recordCanvas:w,keepIframeSrcFn:C,newlyAddedElement:L,rootId:I,maskAllText:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return Tu(e,{maskAllText:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:g,maskInputOptions:h,maskInputFn:b,rootId:I});case e.CDATA_SECTION_NODE:return{type:Z.CDATA,textContent:"",rootId:I};case e.COMMENT_NODE:return{type:Z.Comment,textContent:e.textContent||"",rootId:I};default:return!1}}function xu(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function Tu(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:o,unmaskTextSelector:i,maskTextFn:c,maskInputOptions:a,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName,f=e.textContent,p=d==="STYLE"?!0:void 0,h=d==="SCRIPT"?!0:void 0,g=d==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||ln([e,"access",m=>m.parentNode,"access",m=>m.sheet,"optionalAccess",m=>m.cssRules])&&(f=un(e.parentNode.sheet))}catch(m){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${m}`,e)}f=pn(f,Xr())}h&&(f="SCRIPT_PLACEHOLDER");let b=Qe(e,r,o,s,i,n);if(!p&&!h&&!g&&f&&b&&(f=c?c(f):f.replace(/[\S]/g,"*")),g&&f&&(a.textarea||b)&&(f=l?l(f,e.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){let m=In({type:null,tagName:d,maskInputOptions:a});f=vt({isMasked:Qe(e,r,o,s,i,m),element:e,value:f,maskInputFn:l})}return{type:Z.Text,textContent:f||"",isStyle:p,rootId:u}}function Ru(e,t){let{doc:n,blockClass:r,blockSelector:s,unblockSelector:o,inlineStylesheet:i,maskInputOptions:c={},maskAttributeFn:a,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:g,maskAllText:b,maskTextClass:m,unmaskTextClass:_,maskTextSelector:w,unmaskTextSelector:C}=t,L=Eu(e,r,s,o),I=fu(e),S={},M=e.attributes.length;for(let v=0;v<M;v++){let x=e.attributes[v];x.name&&!ei(I,x.name,x.value)&&(S[x.name]=Qo(n,I,Ze(x.name),x.value,e,a))}if(I==="link"&&i){let v=Array.from(n.styleSheets).find(F=>F.href===e.href),x=null;v&&(x=un(v)),x&&(delete S.rel,delete S.href,S._cssText=pn(x,v.href))}if(I==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let v=un(e.sheet);v&&(S._cssText=pn(v,Xr()))}if(I==="input"||I==="textarea"||I==="select"||I==="option"){let v=e,x=Yr(v),F=fn(v,Ir(I),x),V=v.checked;if(x!=="submit"&&x!=="button"&&F){let J=Qe(v,m,w,_,C,In({type:x,tagName:Ir(I),maskInputOptions:c}));S.value=vt({isMasked:J,element:v,value:F,maskInputFn:l})}V&&(S.checked=V)}if(I==="option"&&(e.selected&&!c.select?S.selected=!0:delete S.selected),I==="canvas"&&f){if(e.__context==="2d")lu(e)||(S.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){let v=e.toDataURL(u.type,u.quality),x=document.createElement("canvas");x.width=e.width,x.height=e.height;let F=x.toDataURL(u.type,u.quality);v!==F&&(S.rr_dataURL=v)}}if(I==="img"&&d){qe||(qe=n.createElement("canvas"),Do=qe.getContext("2d"));let v=e,x=v.crossOrigin;v.crossOrigin="anonymous";let F=()=>{v.removeEventListener("load",F);try{qe.width=v.naturalWidth,qe.height=v.naturalHeight,Do.drawImage(v,0,0),S.rr_dataURL=qe.toDataURL(u.type,u.quality)}catch(V){console.warn(`Cannot inline img src=${v.currentSrc}! Error: ${V}`)}x?S.crossOrigin=x:v.removeAttribute("crossorigin")};v.complete&&v.naturalWidth!==0?F():v.addEventListener("load",F)}if((I==="audio"||I==="video")&&(S.rr_mediaState=e.paused?"paused":"played",S.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop)),L){let{width:v,height:x}=e.getBoundingClientRect();S={class:S.class,rr_width:`${v}px`,rr_height:`${x}px`}}I==="iframe"&&!p(S.src)&&(e.contentDocument||(S.rr_src=S.src),delete S.src);let $;try{customElements.get(I)&&($=!0)}catch{}return{type:Z.Element,tagName:I,attributes:S,childNodes:[],isSVG:vu(e)||void 0,needBlock:L,rootId:g,isCustom:$}}function W(e){return e==null?"":e.toLowerCase()}function Mu(e,t){if(t.comment&&e.type===Z.Comment)return!0;if(e.type===Z.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(W(e.attributes.name).match(/^msapplication-tile(image|color)$/)||W(e.attributes.name)==="application-name"||W(e.attributes.rel)==="icon"||W(e.attributes.rel)==="apple-touch-icon"||W(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&W(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(W(e.attributes.property).match(/^(og|twitter|fb):/)||W(e.attributes.name).match(/^(og|twitter):/)||W(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(W(e.attributes.name)==="robots"||W(e.attributes.name)==="googlebot"||W(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(W(e.attributes.name)==="author"||W(e.attributes.name)==="generator"||W(e.attributes.name)==="framework"||W(e.attributes.name)==="publisher"||W(e.attributes.name)==="progid"||W(e.attributes.property).match(/^article:/)||W(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(W(e.attributes.name)==="google-site-verification"||W(e.attributes.name)==="yandex-verification"||W(e.attributes.name)==="csrf-token"||W(e.attributes.name)==="p:domain_verify"||W(e.attributes.name)==="verify-v1"||W(e.attributes.name)==="verification"||W(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ke(e,t){let{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:c,maskTextClass:a,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:g,maskTextFn:b,maskInputFn:m,slimDOMOptions:_,dataURLOptions:w={},inlineImages:C=!1,recordCanvas:L=!1,onSerialize:I,onIframeLoad:S,iframeLoadTimeout:M=5e3,onStylesheetLoad:$,stylesheetLoadTimeout:v=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:F=!1}=t,{preserveWhiteSpace:V=!0}=t,J=Cu(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:c,unblockSelector:i,maskTextClass:a,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:b,maskInputFn:m,dataURLOptions:w,inlineImages:C,recordCanvas:L,keepIframeSrcFn:x,newlyAddedElement:F});if(!J)return console.warn(e,"not serialized"),null;let se;r.hasNode(e)?se=r.getId(e):Mu(J,_)||!V&&J.type===Z.Text&&!J.isStyle&&!J.textContent.replace(/^\s+|\s+$/gm,"").length?se=Et:se=Kr();let H=Object.assign(J,{id:se});if(r.add(e,H),se===Et)return null;I&&I(e);let ie=!f;if(H.type===Z.Element){ie=ie&&!H.needBlock,delete H.needBlock;let Y=e.shadowRoot;Y&&St(Y)&&(H.isShadowHost=!0)}if((H.type===Z.Document||H.type===Z.Element)&&ie){_.headWhitespace&&H.type===Z.Element&&H.tagName==="head"&&(V=!1);let Y={doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:c,unblockSelector:i,maskTextClass:a,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:b,maskInputFn:m,slimDOMOptions:_,dataURLOptions:w,inlineImages:C,recordCanvas:L,preserveWhiteSpace:V,onSerialize:I,onIframeLoad:S,iframeLoadTimeout:M,onStylesheetLoad:$,stylesheetLoadTimeout:v,keepIframeSrcFn:x};for(let re of Array.from(e.childNodes)){let ae=Ke(re,Y);ae&&H.childNodes.push(ae)}if(nu(e)&&e.shadowRoot)for(let re of Array.from(e.shadowRoot.childNodes)){let ae=Ke(re,Y);ae&&(St(e.shadowRoot)&&(ae.isShadow=!0),H.childNodes.push(ae))}}return e.parentNode&&_t(e.parentNode)&&St(e.parentNode)&&(H.isShadow=!0),H.type===Z.Element&&H.tagName==="iframe"&&Iu(e,()=>{let Y=e.contentDocument;if(Y&&S){let re=Ke(Y,{doc:Y,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:c,maskTextClass:a,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:b,maskInputFn:m,slimDOMOptions:_,dataURLOptions:w,inlineImages:C,recordCanvas:L,preserveWhiteSpace:V,onSerialize:I,onIframeLoad:S,iframeLoadTimeout:M,onStylesheetLoad:$,stylesheetLoadTimeout:v,keepIframeSrcFn:x});re&&S(e,re)}},M),H.type===Z.Element&&H.tagName==="link"&&H.attributes.rel==="stylesheet"&&ku(e,()=>{if($){let Y=Ke(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:c,maskTextClass:a,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:b,maskInputFn:m,slimDOMOptions:_,dataURLOptions:w,inlineImages:C,recordCanvas:L,preserveWhiteSpace:V,onSerialize:I,onIframeLoad:S,iframeLoadTimeout:M,onStylesheetLoad:$,stylesheetLoadTimeout:v,keepIframeSrcFn:x});Y&&$(e,Y)}},v),H}function Au(e,t){let{mirror:n=new dn,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:o=null,maskAllText:i=!1,maskTextClass:c="rr-mask",unmaskTextClass:a=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:g,maskTextFn:b,maskInputFn:m,slimDOM:_=!1,dataURLOptions:w,preserveWhiteSpace:C,onSerialize:L,onIframeLoad:I,iframeLoadTimeout:S,onStylesheetLoad:M,stylesheetLoadTimeout:$,keepIframeSrcFn:v=()=>!1}=t||{};return Ke(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,maskAllText:i,maskTextClass:c,unmaskTextClass:a,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:h===!1?{}:h,maskAttributeFn:g,maskTextFn:b,maskInputFn:m,slimDOMOptions:_===!0||_==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:_==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:_===!1?{}:_,dataURLOptions:w,inlineImages:f,recordCanvas:p,preserveWhiteSpace:C,onSerialize:L,onIframeLoad:I,iframeLoadTimeout:S,onStylesheetLoad:M,stylesheetLoadTimeout:$,keepIframeSrcFn:v,newlyAddedElement:!1})}function Ee(e){let t,n=e[0],r=1;for(;r<e.length;){let s=e[r],o=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=o(n)):(s==="call"||s==="optionalCall")&&(n=o((...i)=>n.call(t,...i)),t=void 0)}return n}function ne(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var Ge=`Please stop import mirror directly. Instead of that,\r
4
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
5
+ or you can use record.mirror to access the mirror instance during recording.`,No={map:{},getId(){return console.error(Ge),-1},getNode(){return console.error(Ge),null},removeNodeFromMap(){console.error(Ge)},has(){return console.error(Ge),!1},reset(){console.error(Ge)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(No=new Proxy(No,{get(e,t,n){return t==="map"&&console.error(Ge),Reflect.get(e,t,n)}}));function wt(e,t,n={}){let r=null,s=0;return function(...o){let i=Date.now();!s&&n.leading===!1&&(s=i);let c=t-(i-s),a=this;c<=0||c>t?(r&&(clearTimeout(r),r=null),s=i,e.apply(a,o)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(a,o)},c))}}function ti(e,t,n,r,s=window){let o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(i){setTimeout(()=>{n.set.call(this,i)},0),o&&o.set&&o.set.call(this,i)}}),()=>ti(e,t,o||{},!0)}function Jr(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}var hn=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(hn=()=>new Date().getTime());function ni(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:Ee([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||Ee([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||Ee([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:Ee([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||Ee([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||Ee([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function ri(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function si(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function fe(e,t,n,r,s){if(!e)return!1;let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!o)return!1;let i=Ye(t,n);if(!s){let l=r&&o.matches(r);return i(o)&&!l}let c=Oe(o,i),a=-1;return c<0?!1:(r&&(a=Oe(o,Ye(null,r))),c>-1&&a<0?!0:c<a)}function Ou(e,t){return t.getId(e)!==-1}function br(e,t){return t.getId(e)===Et}function oi(e,t){if(_t(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?oi(e.parentNode,t):!0:!0}function kr(e){return!!e.changedTouches}function Lu(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function ii(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function ai(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Cr(e){return!!Ee([e,"optionalAccess",t=>t.shadowRoot])}var xr=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return Ys(this.styleIDMap.get(t),()=>-1)}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}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 ci(e){let t=null;return Ee([e,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Du(e){let t=e,n;for(;n=ci(t);)t=n;return t}function Nu(e){let t=e.ownerDocument;if(!t)return!1;let n=Du(e);return t.contains(n)}function li(e){let t=e.ownerDocument;return t?t.contains(e)||Nu(e):!1}var vr;function Pu(){if(vr)return vr;let e=window.document,t=window.requestAnimationFrame;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.requestAnimationFrame&&(t=r.requestAnimationFrame),e.head.removeChild(n)}catch{}return vr=t.bind(window)}function Fu(...e){return Pu()(...e)}var A=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(A||{}),O=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(O||{}),ee=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ee||{}),_e=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(_e||{});function Bu(e){let t,n=e[0],r=1;for(;r<e.length;){let s=e[r],o=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=o(n)):(s==="call"||s==="optionalCall")&&(n=o((...i)=>n.call(t,...i)),t=void 0)}return n}function Po(e){return"__ln"in e}var Tr=class{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 n=this.head;for(let r=0;r<t;r++)n=Bu([n,"optionalAccess",s=>s.next])||null;return n}addNode(t){let n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Po(t.previousSibling)){let r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Po(t.nextSibling)&&t.nextSibling.__ln.previous){let r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){let n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}},Fo=(e,t)=>`${e}@${t}`,Rr=class{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;let t=[],n=new Set,r=new Tr,s=a=>{let l=a,u=Et;for(;u===Et;)l=l&&l.nextSibling,u=l&&this.mirror.getId(l);return u},o=a=>{if(!a.parentNode||!li(a))return;let l=_t(a.parentNode)?this.mirror.getId(ci(a)):this.mirror.getId(a.parentNode),u=s(a);if(l===-1||u===-1)return r.addNode(a);let d=Ke(a,{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:f=>{ii(f,this.mirror)&&this.iframeManager.addIframe(f),ai(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),Cr(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{this.iframeManager.attachIframe(f,p),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)}});d&&(t.push({parentId:l,nextId:u,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of this.movedSet)Bo(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||o(a);for(let a of this.addedSet)!Ho(this.droppedSet,a)&&!Bo(this.removes,a,this.mirror)||Ho(this.movedSet,a)?o(a):this.droppedSet.add(a);let i=null;for(;r.length;){let a=null;if(i){let l=this.mirror.getId(i.value.parentNode),u=s(i.value);l!==-1&&u!==-1&&(a=i)}if(!a){let l=r.tail;for(;l;){let u=l;if(l=l.previous,u){let d=this.mirror.getId(u.value.parentNode);if(s(u.value)===-1)continue;if(d!==-1){a=u;break}else{let p=u.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let h=p.parentNode.host;if(this.mirror.getId(h)!==-1){a=u;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}i=a.previous,r.removeNode(a.value),o(a.value)}let c={texts:this.texts.map(a=>({id:this.mirror.getId(a.node),value:a.value})).filter(a=>!n.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{let{attributes:l}=a;if(typeof l.style=="string"){let u=JSON.stringify(a.styleDiff),d=JSON.stringify(a._unchangedStyles);u.length<l.style.length&&(u+d).split("var(").length===l.style.split("var(").length&&(l.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:l}}).filter(a=>!n.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(c))},this.processMutation=t=>{if(br(t.target,this.mirror))return;let n;try{n=document.implementation.createHTMLDocument()}catch{n=this.doc}switch(t.type){case"characterData":{let r=t.target.textContent;!fe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:Qe(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&r?this.maskTextFn?this.maskTextFn(r):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{let r=t.target,s=t.attributeName,o=t.target.getAttribute(s);if(s==="value"){let c=Yr(r),a=r.tagName;o=fn(r,a,c);let l=In({maskInputOptions:this.maskInputOptions,tagName:a,type:c}),u=Qe(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);o=vt({isMasked:u,element:r,value:o,maskInputFn:this.maskInputFn})}if(fe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let i=this.attributes.find(c=>c.node===t.target);if(r.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(o))if(!r.contentDocument)s="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i)),s==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!ei(r.tagName,s)&&(i.attributes[s]=Qo(this.doc,Ze(r.tagName),Ze(s),o,r,this.maskAttributeFn),s==="style")){let c=n.createElement("span");t.oldValue&&c.setAttribute("style",t.oldValue);for(let a of Array.from(r.style)){let l=r.style.getPropertyValue(a),u=r.style.getPropertyPriority(a);l!==c.style.getPropertyValue(a)||u!==c.style.getPropertyPriority(a)?u===""?i.styleDiff[a]=l:i.styleDiff[a]=[l,u]:i._unchangedStyles[a]=[l,u]}for(let a of Array.from(c.style))r.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(fe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{let s=this.mirror.getId(r),o=_t(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);fe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||br(r,this.mirror)||!Ou(r,this.mirror)||(this.addedSet.has(r)?(Mr(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&s===-1||oi(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Fo(s,o)]?Mr(this.movedSet,r):this.removes.push({parentId:o,id:s,isShadow:_t(t.target)&&St(t.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(br(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Fo(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);fe(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),Cr(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,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(n=>{this[n]=t[n]})}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 Mr(e,t){e.delete(t),t.childNodes.forEach(n=>Mr(e,n))}function Bo(e,t,n){return e.length===0?!1:ui(e,t,n)}function ui(e,t,n){let{parentNode:r}=t;if(!r)return!1;let s=n.getId(r);return e.some(o=>o.id===s)?!0:ui(e,r,n)}function Ho(e,t){return e.size===0?!1:di(e,t)}function di(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:di(e,n):!1}var bt;function Hu(e){bt=e}function Uu(){bt=void 0}var D=e=>bt?(...n)=>{try{return e(...n)}catch(r){if(bt&&bt(r)===!0)return()=>{};throw r}}:e;function he(e){let t,n=e[0],r=1;for(;r<e.length;){let s=e[r],o=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=o(n)):(s==="call"||s==="optionalCall")&&(n=o((...i)=>n.call(t,...i)),t=void 0)}return n}var Xe=[];function Tt(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function fi(e,t){let n=new Rr;Xe.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver,s=he([window,"optionalAccess",i=>i.Zone,"optionalAccess",i=>i.__symbol__,"optionalCall",i=>i("MutationObserver")]);s&&window[s]&&(r=window[s]);let o=new r(D(i=>{e.onMutation&&e.onMutation(i)===!1||n.processMutations.bind(n)(i)}));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Wu({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let s=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,i=[],c,a=wt(D(d=>{let f=Date.now()-c;e(i.map(p=>(p.timeOffset-=f,p)),d),i=[],c=null}),o),l=D(wt(D(d=>{let f=Tt(d),{clientX:p,clientY:h}=kr(d)?d.changedTouches[0]:d;c||(c=hn()),i.push({x:p,y:h,id:r.getId(f),timeOffset:hn()-c}),a(typeof DragEvent<"u"&&d instanceof DragEvent?O.Drag:d instanceof MouseEvent?O.MouseMove:O.TouchMove)}),s,{trailing:!1})),u=[ne("mousemove",l,n),ne("touchmove",l,n),ne("drag",l,n)];return D(()=>{u.forEach(d=>d())})}function zu({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){if(i.mouseInteraction===!1)return()=>{};let c=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,a=[],l=null,u=d=>f=>{let p=Tt(f);if(fe(p,r,s,o,!0))return;let h=null,g=d;if("pointerType"in f){switch(f.pointerType){case"mouse":h=_e.Mouse;break;case"touch":h=_e.Touch;break;case"pen":h=_e.Pen;break}h===_e.Touch?ee[d]===ee.MouseDown?g="TouchStart":ee[d]===ee.MouseUp&&(g="TouchEnd"):_e.Pen}else kr(f)&&(h=_e.Touch);h!==null?(l=h,(g.startsWith("Touch")&&h===_e.Touch||g.startsWith("Mouse")&&h===_e.Mouse)&&(h=null)):ee[d]===ee.Click&&(h=l,l=null);let b=kr(f)?f.changedTouches[0]:f;if(!b)return;let m=n.getId(p),{clientX:_,clientY:w}=b;D(e)({type:ee[g],id:m,x:_,y:w,...h!==null&&{pointerType:h}})};return Object.keys(ee).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&c[d]!==!1).forEach(d=>{let f=Ze(d),p=u(d);if(window.PointerEvent)switch(ee[d]){case ee.MouseDown:case ee.MouseUp:f=f.replace("mouse","pointer");break;case ee.TouchStart:case ee.TouchEnd:return}a.push(ne(f,p,t))}),D(()=>{a.forEach(d=>d())})}function pi({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){let c=D(wt(D(a=>{let l=Tt(a);if(!l||fe(l,r,s,o,!0))return;let u=n.getId(l);if(l===t&&t.defaultView){let d=ni(t.defaultView);e({id:u,x:d.left,y:d.top})}else e({id:u,x:l.scrollLeft,y:l.scrollTop})}),i.scroll||100));return ne("scroll",c,t)}function $u({viewportResizeCb:e},{win:t}){let n=-1,r=-1,s=D(wt(D(()=>{let o=ri(),i=si();(n!==o||r!==i)&&(e({width:Number(i),height:Number(o)}),n=o,r=i)}),200));return ne("resize",s,t)}var ju=["INPUT","TEXTAREA","SELECT"],Uo=new WeakMap;function qu({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,ignoreClass:i,ignoreSelector:c,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:g}){function b(S){let M=Tt(S),$=S.isTrusted,v=M&&Ir(M.tagName);if(v==="OPTION"&&(M=M.parentElement),!M||!v||ju.indexOf(v)<0||fe(M,r,s,o,!0))return;let x=M;if(x.classList.contains(i)||c&&x.matches(c))return;let F=Yr(M),V=fn(x,v,F),J=!1,se=In({maskInputOptions:a,tagName:v,type:F}),H=Qe(M,f,h,p,g,se);(F==="radio"||F==="checkbox")&&(J=M.checked),V=vt({isMasked:H,element:M,value:V,maskInputFn:l}),m(M,d?{text:V,isChecked:J,userTriggered:$}:{text:V,isChecked:J});let ie=M.name;F==="radio"&&ie&&J&&t.querySelectorAll(`input[type="radio"][name="${ie}"]`).forEach(Y=>{if(Y!==M){let re=vt({isMasked:H,element:Y,value:fn(Y,v,F),maskInputFn:l});m(Y,d?{text:re,isChecked:!J,userTriggered:!1}:{text:re,isChecked:!J})}})}function m(S,M){let $=Uo.get(S);if(!$||$.text!==M.text||$.isChecked!==M.isChecked){Uo.set(S,M);let v=n.getId(S);D(e)({...M,id:v})}}let w=(u.input==="last"?["change"]:["input","change"]).map(S=>ne(S,D(b),t)),C=t.defaultView;if(!C)return()=>{w.forEach(S=>S())};let L=C.Object.getOwnPropertyDescriptor(C.HTMLInputElement.prototype,"value"),I=[[C.HTMLInputElement.prototype,"value"],[C.HTMLInputElement.prototype,"checked"],[C.HTMLSelectElement.prototype,"value"],[C.HTMLTextAreaElement.prototype,"value"],[C.HTMLSelectElement.prototype,"selectedIndex"],[C.HTMLOptionElement.prototype,"selected"]];return L&&L.set&&w.push(...I.map(S=>ti(S[0],S[1],{set(){D(b)({target:this,isTrusted:!1})}},!1,C))),D(()=>{w.forEach(S=>S())})}function mn(e){let t=[];function n(r,s){if(an("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||an("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||an("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||an("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let i=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(i)}else if(r.parentStyleSheet){let i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(i)}return s}return n(e,t)}function we(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function Gu({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:D((u,d,f)=>{let[p,h]=f,{id:g,styleId:b}=we(d,t,n.styleMirror);return(g&&g!==-1||b&&b!==-1)&&e({id:g,styleId:b,adds:[{rule:p,index:h}]}),u.apply(d,f)})});let o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:D((u,d,f)=>{let[p]=f,{id:h,styleId:g}=we(d,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,removes:[{index:p}]}),u.apply(d,f)})});let i;r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:D((u,d,f)=>{let[p]=f,{id:h,styleId:g}=we(d,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,replace:p}),u.apply(d,f)})}));let c;r.CSSStyleSheet.prototype.replaceSync&&(c=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:D((u,d,f)=>{let[p]=f,{id:h,styleId:g}=we(d,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,replaceSync:p}),u.apply(d,f)})}));let a={};cn("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(cn("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),cn("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),cn("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(a).forEach(([u,d])=>{l[u]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(l[u].insertRule,{apply:D((f,p,h)=>{let[g,b]=h,{id:m,styleId:_}=we(p.parentStyleSheet,t,n.styleMirror);return(m&&m!==-1||_&&_!==-1)&&e({id:m,styleId:_,adds:[{rule:g,index:[...mn(p),b||0]}]}),f.apply(p,h)})}),d.prototype.deleteRule=new Proxy(l[u].deleteRule,{apply:D((f,p,h)=>{let[g]=h,{id:b,styleId:m}=we(p.parentStyleSheet,t,n.styleMirror);return(b&&b!==-1||m&&m!==-1)&&e({id:b,styleId:m,removes:[{index:[...mn(p),g]}]}),f.apply(p,h)})})}),D(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,i&&(r.CSSStyleSheet.prototype.replace=i),c&&(r.CSSStyleSheet.prototype.replaceSync=c),Object.entries(a).forEach(([u,d])=>{d.prototype.insertRule=l[u].insertRule,d.prototype.deleteRule=l[u].deleteRule})})}function hi({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);let s=n.nodeName==="#document"?he([n,"access",i=>i.defaultView,"optionalAccess",i=>i.Document]):he([n,"access",i=>i.ownerDocument,"optionalAccess",i=>i.defaultView,"optionalAccess",i=>i.ShadowRoot]),o=he([s,"optionalAccess",i=>i.prototype])?Object.getOwnPropertyDescriptor(he([s,"optionalAccess",i=>i.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!o?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return he([o,"access",i=>i.get,"optionalAccess",i=>i.call,"call",i=>i(this)])},set(i){let c=he([o,"access",a=>a.set,"optionalAccess",a=>a.call,"call",a=>a(this,i)]);if(r!==null&&r!==-1)try{t.adoptStyleSheets(i,r)}catch{}return c}}),D(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function Vu({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){let o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:D((c,a,l)=>{let[u,d,f]=l;if(n.has(u))return o.apply(a,[u,d,f]);let{id:p,styleId:h}=we(he([a,"access",g=>g.parentRule,"optionalAccess",g=>g.parentStyleSheet]),t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,set:{property:u,value:d,priority:f},index:mn(a.parentRule)}),c.apply(a,l)})});let i=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:D((c,a,l)=>{let[u]=l;if(n.has(u))return i.apply(a,[u]);let{id:d,styleId:f}=we(he([a,"access",p=>p.parentRule,"optionalAccess",p=>p.parentStyleSheet]),t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:u},index:mn(a.parentRule)}),c.apply(a,l)})}),D(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=i})}function Yu({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:o,doc:i}){let c=D(l=>wt(D(u=>{let d=Tt(u);if(!d||fe(d,t,n,r,!0))return;let{currentTime:f,volume:p,muted:h,playbackRate:g}=d;e({type:l,id:s.getId(d),currentTime:f,volume:p,muted:h,playbackRate:g})}),o.media||500)),a=[ne("play",c(0),i),ne("pause",c(1),i),ne("seeked",c(2),i),ne("volumechange",c(3),i),ne("ratechange",c(4),i)];return D(()=>{a.forEach(l=>l())})}function Ku({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(a,l,u){let d=new o(a,l,u);return s.set(d,{family:a,buffer:typeof l!="string",descriptors:u,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),d};let i=Jr(t.fonts,"add",function(c){return function(a){return setTimeout(D(()=>{let l=s.get(a);l&&(e(l),s.delete(a))}),0),c.apply(this,[a])}});return r.push(()=>{n.FontFace=o}),r.push(i),D(()=>{r.forEach(c=>c())})}function Xu(e){let{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,selectionCb:i}=e,c=!0,a=D(()=>{let l=t.getSelection();if(!l||c&&he([l,"optionalAccess",f=>f.isCollapsed]))return;c=l.isCollapsed||!1;let u=[],d=l.rangeCount||0;for(let f=0;f<d;f++){let p=l.getRangeAt(f),{startContainer:h,startOffset:g,endContainer:b,endOffset:m}=p;fe(h,r,s,o,!0)||fe(b,r,s,o,!0)||u.push({start:n.getId(h),startOffset:g,end:n.getId(b),endOffset:m})}i({ranges:u})});return a(),ne("selectionchange",a)}function Ju({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:Jr(n.customElements,"define",function(s){return function(o,i,c){try{t({define:{name:o}})}catch{}return s.apply(this,[o,i,c])}})}function Zu(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r=fi(e,e.doc),s=Wu(e),o=zu(e),i=pi(e),c=$u(e,{win:n}),a=qu(e),l=Yu(e),u=Gu(e,{win:n}),d=hi(e,e.doc),f=Vu(e,{win:n}),p=e.collectFonts?Ku(e):()=>{},h=Xu(e),g=Ju(e),b=[];for(let m of e.plugins)b.push(m.observer(m.callback,n,m.options));return D(()=>{Xe.forEach(m=>m.reset()),r.disconnect(),s(),o(),i(),c(),a(),l(),u(),d(),f(),p(),h(),g(),b.forEach(m=>m())})}function an(e){return typeof window[e]<"u"}function cn(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var It=class{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){let o=r||this.getIdToRemoteIdMap(t),i=s||this.getRemoteIdToIdMap(t),c=o.get(n);return c||(c=this.generateIdFn(),o.set(n,c),i.set(c,n)),c}getIds(t,n){let r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(o=>this.getId(t,o,r,s))}getRemoteId(t,n,r){let s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;let o=s.get(n);return o||-1}getRemoteIds(t,n){let r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}};function Wo(e){let t,n=e[0],r=1;for(;r<e.length;){let s=e[r],o=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=o(n)):(s==="call"||s==="optionalCall")&&(n=o((...i)=>n.call(t,...i)),t=void 0)}return n}var Ar=class{constructor(){this.crossOriginIframeMirror=new It(Kr),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},Or=class{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new It(Kr),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new It(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,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),Wo([this,"access",r=>r.loadListener,"optionalCall",r=>r(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){let n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;let s=this.crossOriginIframeMap.get(t.source);if(!s)return;let o=this.transformCrossOriginEvent(s,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case A.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);let r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:A.IncrementalSnapshot,data:{source:O.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case A.Meta:case A.Load:case A.DomContentLoaded:return!1;case A.Plugin:return n;case A.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case A.IncrementalSnapshot:switch(n.data.source){case O.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);let s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(r.node,s)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case O.Drag:case O.TouchMove:case O.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case O.ViewportResize:return!1;case O.MediaInteraction:case O.MouseInteraction:case O.Scroll:case O.CanvasMutation:case O.Input:return this.replaceIds(n.data,t,["id"]),n;case O.StyleSheetRule:case O.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case O.Font:return n;case O.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case O.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),Wo([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(s=>{this.replaceStyleIds(s,t,["styleId"])})]),n}}return!1}replace(t,n,r,s){for(let o of s)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=t.getIds(r,n[o]):n[o]=t.getId(r,n[o]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==Z.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}},Lr=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},Dr=class{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,n){if(!St(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);let r=fi({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(pi({...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(hi({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){let r=this;this.restoreHandlers.push(Jr(t.prototype,"attachShadow",function(s){return function(o){let i=s.call(this,o);return this.shadowRoot&&li(this)&&r.addShadowRoot(this.shadowRoot,n),i}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},gn=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}},Nr=class{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new xr,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;let r={id:n,styleIds:[]},s=[];for(let o of t){let i;this.styleMirror.has(o)?i=this.styleMirror.getId(o):(i=this.styleMirror.add(o),s.push({styleId:i,rules:Array.from(o.rules||CSSRule,(c,a)=>({rule:Zo(c),index:a}))})),r.styleIds.push(i)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},Pr=class{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){Fu(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,n){let r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}};function X(e){let t=e;return t.timestamp=hn(),t}var yn,de=cu();function ke(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:o=null,unblockSelector:i=null,ignoreClass:c="rr-ignore",ignoreSelector:a=null,maskAllText:l=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:g,maskInputOptions:b,slimDOMOptions:m,maskAttributeFn:_,maskInputFn:w,maskTextFn:C,maxCanvasSize:L=null,packFn:I,sampling:S={},dataURLOptions:M={},mousemoveWait:$,recordCanvas:v=!1,recordCrossOriginIframes:x=!1,recordAfter:F=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:J=!1,inlineImages:se=!1,plugins:H,keepIframeSrcFn:ie=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:re,onMutation:ae,getCanvasManager:Fn}=e;Hu(re);let Fe=x?window.parent===window:!0,Se=!1;if(!Fe)try{window.parent.document&&(Se=!1)}catch{Se=!0}if(Fe&&!t)throw new Error("emit function is required");$!==void 0&&S.mousemove===void 0&&(S.mousemove=$),de.reset();let Be=g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:b!==void 0?b:{},ot=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all"}:m||{};Lu();let Bn,Hn=0,ps=R=>{for(let ce of H||[])ce.eventProcessor&&(R=ce.eventProcessor(R));return I&&!Se&&(R=I(R)),R},K=(R,ce)=>{if(ze([Xe,"access",N=>N[0],"optionalAccess",N=>N.isFrozen,"call",N=>N()])&&R.type!==A.FullSnapshot&&!(R.type===A.IncrementalSnapshot&&R.data.source===O.Mutation)&&Xe.forEach(N=>N.unfreeze()),Fe)ze([t,"optionalCall",N=>N(ps(R),ce)]);else if(Se){let N={type:"rrweb",event:ps(R),origin:window.location.origin,isCheckout:ce};window.parent.postMessage(N,"*")}if(R.type===A.FullSnapshot)Bn=R,Hn=0;else if(R.type===A.IncrementalSnapshot){if(R.data.source===O.Mutation&&R.data.isAttachIframe)return;Hn++;let N=r&&Hn>=r,le=n&&Bn&&R.timestamp-Bn.timestamp>n;(N||le)&&Wn(!0)}},Dt=R=>{K(X({type:A.IncrementalSnapshot,data:{source:O.Mutation,...R}}))},hs=R=>K(X({type:A.IncrementalSnapshot,data:{source:O.Scroll,...R}})),Ia=R=>K(X({type:A.IncrementalSnapshot,data:{source:O.CanvasMutation,...R}})),ka=R=>K(X({type:A.IncrementalSnapshot,data:{source:O.AdoptedStyleSheet,...R}})),xe=new Nr({mutationCb:Dt,adoptedStyleSheetCb:ka}),Te=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Ar:new Or({mirror:de,mutationCb:Dt,stylesheetManager:xe,recordCrossOriginIframes:x,wrappedEmit:K});for(let R of H||[])R.getMirror&&R.getMirror({nodeMirror:de,crossOriginIframeMirror:Te.crossOriginIframeMirror,crossOriginIframeStyleMirror:Te.crossOriginIframeStyleMirror});let Un=new Pr,ms=ed(Fn,{mirror:de,win:window,mutationCb:R=>K(X({type:A.IncrementalSnapshot,data:{source:O.CanvasMutation,...R}})),recordCanvas:v,blockClass:s,blockSelector:o,unblockSelector:i,maxCanvasSize:L,sampling:S.canvas,dataURLOptions:M,errorHandler:re}),Nt=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Lr:new Dr({mutationCb:Dt,scrollCb:hs,bypassOptions:{onMutation:ae,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:Be,dataURLOptions:M,maskAttributeFn:_,maskTextFn:C,maskInputFn:w,recordCanvas:v,inlineImages:se,sampling:S,slimDOMOptions:ot,iframeManager:Te,stylesheetManager:xe,canvasManager:ms,keepIframeSrcFn:ie,processedNodeManager:Un},mirror:de}),Wn=(R=!1)=>{K(X({type:A.Meta,data:{href:window.location.href,width:si(),height:ri()}}),R),xe.reset(),Nt.init(),Xe.forEach(N=>N.lock());let ce=Au(document,{mirror:de,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:Be,maskAttributeFn:_,maskInputFn:w,maskTextFn:C,slimDOM:ot,dataURLOptions:M,recordCanvas:v,inlineImages:se,onSerialize:N=>{ii(N,de)&&Te.addIframe(N),ai(N,de)&&xe.trackLinkElement(N),Cr(N)&&Nt.addShadowRoot(N.shadowRoot,document)},onIframeLoad:(N,le)=>{Te.attachIframe(N,le),Nt.observeAttachShadow(N)},onStylesheetLoad:(N,le)=>{xe.attachLinkElement(N,le)},keepIframeSrcFn:ie});if(!ce)return console.warn("Failed to snapshot the document");K(X({type:A.FullSnapshot,data:{node:ce,initialOffset:ni(window)}})),Xe.forEach(N=>N.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&xe.adoptStyleSheets(document.adoptedStyleSheets,de.getId(document))};yn=Wn;try{let R=[],ce=le=>D(Zu)({onMutation:ae,mutationCb:Dt,mousemoveCb:(B,Re)=>K(X({type:A.IncrementalSnapshot,data:{source:Re,positions:B}})),mouseInteractionCb:B=>K(X({type:A.IncrementalSnapshot,data:{source:O.MouseInteraction,...B}})),scrollCb:hs,viewportResizeCb:B=>K(X({type:A.IncrementalSnapshot,data:{source:O.ViewportResize,...B}})),inputCb:B=>K(X({type:A.IncrementalSnapshot,data:{source:O.Input,...B}})),mediaInteractionCb:B=>K(X({type:A.IncrementalSnapshot,data:{source:O.MediaInteraction,...B}})),styleSheetRuleCb:B=>K(X({type:A.IncrementalSnapshot,data:{source:O.StyleSheetRule,...B}})),styleDeclarationCb:B=>K(X({type:A.IncrementalSnapshot,data:{source:O.StyleDeclaration,...B}})),canvasMutationCb:Ia,fontCb:B=>K(X({type:A.IncrementalSnapshot,data:{source:O.Font,...B}})),selectionCb:B=>{K(X({type:A.IncrementalSnapshot,data:{source:O.Selection,...B}}))},customElementCb:B=>{K(X({type:A.IncrementalSnapshot,data:{source:O.CustomElement,...B}}))},blockClass:s,ignoreClass:c,ignoreSelector:a,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:Be,inlineStylesheet:h,sampling:S,recordCanvas:v,inlineImages:se,userTriggeredOnInput:V,collectFonts:J,doc:le,maskAttributeFn:_,maskInputFn:w,maskTextFn:C,keepIframeSrcFn:ie,blockSelector:o,unblockSelector:i,slimDOMOptions:ot,dataURLOptions:M,mirror:de,iframeManager:Te,stylesheetManager:xe,shadowDomManager:Nt,processedNodeManager:Un,canvasManager:ms,ignoreCSSAttributes:Y,plugins:ze([H,"optionalAccess",B=>B.filter,"call",B=>B(Re=>Re.observer),"optionalAccess",B=>B.map,"call",B=>B(Re=>({observer:Re.observer,options:Re.options,callback:Ca=>K(X({type:A.Plugin,data:{plugin:Re.name,payload:Ca}}))}))])||[]},{});Te.addLoadListener(le=>{try{R.push(ce(le.contentDocument))}catch(B){console.warn(B)}});let N=()=>{Wn(),R.push(ce(document))};return document.readyState==="interactive"||document.readyState==="complete"?N():(R.push(ne("DOMContentLoaded",()=>{K(X({type:A.DomContentLoaded,data:{}})),F==="DOMContentLoaded"&&N()})),R.push(ne("load",()=>{K(X({type:A.Load,data:{}})),F==="load"&&N()},window))),()=>{R.forEach(le=>le()),Un.destroy(),yn=void 0,Uu()}}catch(R){console.warn(R)}}function Qu(e){if(!yn)throw new Error("please take full snapshot after start recording");yn(e)}ke.mirror=de;ke.takeFullSnapshot=Qu;function ed(e,t){try{return e?e(t):new gn}catch{return console.warn("Unable to initialize CanvasManager"),new gn}}var td=3,nd=5;function Zr(e){return e>9999999999?e:e*1e3}function Er(e){return e>9999999999?e/1e3:e}function Rt(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:A.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Vn(t,10,1e3)}}),t.category==="console")))}var rd="button,a";function mi(e){return e.closest(rd)||e}function gi(e){let t=yi(e);return!t||!(t instanceof Element)?t:mi(t)}function yi(e){return sd(e)?e.target:e}function sd(e){return typeof e=="object"&&!!e&&"target"in e}var Ie;function od(e){return Ie||(Ie=[],id()),Ie.push(e),()=>{let t=Ie?Ie.indexOf(e):-1;t>-1&&Ie.splice(t,1)}}function id(){pe(z,"open",function(e){return function(...t){if(Ie)try{Ie.forEach(n=>n())}catch{}return e.apply(z,t)}})}function ad(e,t,n){e.handleClick(t,n)}var Fr=class{constructor(t,n,r=Rt){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){let t=od(()=>{this._lastMutation=zo()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(ld(n,this._ignoreSelector)||!ud(t))return;let r={timestamp:Er(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Er(t)}registerScroll(t=Date.now()){this._lastScroll=Er(t)}registerClick(t){let n=mi(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){let t=[],n=zo();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(let r of t){let s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){let n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,o=!r&&!s,{clickCount:i,clickBreadcrumb:c}=t;if(o){let a=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,l=a<this._timeout*1e3?"mutation":"timeout",u={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.slowClickDetected",data:{...c.data,url:z.location.href,route:n.getCurrentRoute(),timeAfterClickMs:a,endReason:l,clickCount:i||1}};this._addBreadcrumbEvent(n,u);return}if(i>1){let a={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.multiClick",data:{...c.data,url:z.location.href,route:n.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(n,a)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}},cd=["A","BUTTON","INPUT"];function ld(e,t){return!!(!cd.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function ud(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function zo(){return Date.now()/1e3}function dd(e,t){try{if(!fd(t))return;let{source:n}=t.data;if(n===O.Mutation&&e.registerMutation(t.timestamp),n===O.Scroll&&e.registerScroll(t.timestamp),pd(t)){let{type:r,id:s}=t.data,o=ke.mirror.getNode(s);o instanceof HTMLElement&&r===ee.Click&&e.registerClick(o)}}catch{}}function fd(e){return e.type===td}function pd(e){return e.data.source===O.MouseInteraction}function me(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var _n;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(_n||(_n={}));var hd=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function md(e){let t={};for(let n in e)if(hd.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}var gd=e=>t=>{if(!e.isEnabled())return;let n=yd(t);if(!n)return;let r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&ad(e.clickDetector,n,gi(t.event)),Rt(e,n)};function _i(e,t){let n=ke.mirror.getId(e),r=n&&ke.mirror.getNode(n),s=r&&ke.mirror.getMeta(r),o=s&&Sd(s)?s:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(i=>i.type===_n.Text&&i.textContent).filter(Boolean).map(i=>i.trim()).join(""),attributes:md(o.attributes)}}:{}}}function yd(e){let{target:t,message:n}=_d(e);return me({category:`ui.${e.name}`,..._i(t,n)})}function _d(e){let t=e.name==="click",n,r=null;try{r=t?gi(e.event):yi(e.event),n=at(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function Sd(e){return e.type===_n.Element}function bd(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=vd(t);n&&Rt(e,n)}function vd(e){let{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o,target:i}=e;if(!i||Ed(i)||!o)return null;let c=t||r||s,a=o.length===1;if(!c&&a)return null;let l=at(i,{maxStringLength:200})||"<unknown>",u=_i(i,l);return me({category:"ui.keyDown",message:l,data:{...u.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o}})}function Ed(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}var $o={resource:xd,paint:kd,navigation:Cd};function wd(e){return e.map(Id).filter(Boolean)}function Id(e){return $o[e.entryType]?$o[e.entryType](e):null}function et(e){return((dt||z.performance.timeOrigin)+e)/1e3}function kd(e){let{duration:t,entryType:n,name:r,startTime:s}=e,o=et(s);return{type:n,name:r,start:o,end:o+t,data:void 0}}function Cd(e){let{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:o,encodedBodySize:i,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:h,type:g}=e;return s===0?null:{type:`${t}.${g}`,start:et(p),end:et(o),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:i,duration:s,domInteractive:l,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,loadEventStart:u,loadEventEnd:d,domComplete:o,redirectCount:f}}}function xd(e){let{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:o,decodedBodySize:i,encodedBodySize:c,responseStatus:a,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:et(o),end:et(s),name:r,data:{size:l,statusCode:a,decodedBodySize:i,encodedBodySize:c}}}function Td(e){let t=e.entries,n=t[t.length-1],r=n?n.element:void 0,s=e.value,o=et(s);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:o,end:o,data:{value:s,size:s,nodeId:r?ke.mirror.getId(r):void 0}}}function Rd(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function n({entries:s}){s.forEach(t)}let r=[];return["navigation","paint","resource"].forEach(s=>{r.push(io(s,n))}),r.push(oo(({metric:s})=>{e.replayPerformanceEntries.push(Td(s))})),()=>{r.forEach(s=>s())}}var U=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Md='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<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>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;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(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<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=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<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!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+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){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<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(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<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>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;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(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;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=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<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,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<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.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<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function Ad(){let e=new Blob([Md]);return URL.createObjectURL(e)}function te(e,t){U&&(y.info(e),t&&Si(e))}function Je(e,t){U&&(y.info(e),t&&setTimeout(()=>{Si(e)},0))}function Si(e){ue({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}var kt=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Vr}.`)}},Sn=class{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){let n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Vr)throw new kt;this.events.push(t)}finish(){return new Promise(t=>{let n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=this.events.map(n=>n.timestamp).sort()[0];return t?Zr(t):null}},Br=class{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){te("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,n){let r=this._getAndIncrementId();return new Promise((s,o)=>{let i=({data:c})=>{let a=c;if(a.method===t&&a.id===r){if(this._worker.removeEventListener("message",i),!a.success){U&&y.error("[Replay]",a.response),o(new Error("Error in compression worker"));return}s(a.response)}};this._worker.addEventListener("message",i),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}},Hr=class{constructor(t){this._worker=new Br(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){let n=Zr(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);let r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Vr?Promise.reject(new kt):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{U&&y.warn('[Replay] Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){let t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}},Ur=class{constructor(t){this._fallback=new Sn,this._compression=new Hr(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{te("[Replay] Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:t,hasCheckout:n}=this._fallback,r=[];for(let s of t)r.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._used=this._compression;try{await Promise.all(r)}catch(s){U&&y.warn("[Replay] Failed to add events when switching buffers.",s)}}};function Od({useCompression:e,workerUrl:t}){if(e&&window.Worker){let n=Ld(t);if(n)return n}return te("[Replay] Using simple buffer"),new Sn}function Ld(e){try{let t=e||Dd();if(!t)return;te(`[Replay] Using compression worker${e?` from ${e}`:""}`);let n=new Worker(t);return new Ur(n)}catch{te("[Replay] Failed to create compression worker")}}function Dd(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Ad():""}function Qr(){try{return"sessionStorage"in z&&!!z.sessionStorage}catch{return!1}}function Nd(e){Pd(),e.session=void 0}function Pd(){if(Qr())try{z.sessionStorage.removeItem(qr)}catch{}}function bi(e){return e===void 0?!1:Math.random()<e}function vi(e){let t=Date.now(),n=e.id||He(),r=e.started||t,s=e.lastActivity||t,o=e.segmentId||0,i=e.sampled,c=e.previousSessionId;return{id:n,started:r,lastActivity:s,segmentId:o,sampled:i,previousSessionId:c}}function es(e){if(Qr())try{z.sessionStorage.setItem(qr,JSON.stringify(e))}catch{}}function Fd(e,t){return bi(e)?"session":t?"buffer":!1}function jo({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let s=Fd(e,t),o=vi({sampled:s,previousSessionId:r});return n&&es(o),o}function Bd(e){if(!Qr())return null;try{let t=z.sessionStorage.getItem(qr);if(!t)return null;let n=JSON.parse(t);return Je("[Replay] Loading existing session",e),vi(n)}catch{return null}}function Wr(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function Ei(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Wr(e.started,t,r)||Wr(e.lastActivity,n,r)}function wi(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!Ei(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function wr({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:n,previousSessionId:r},s){let o=s.stickySession&&Bd(e);return o?wi(o,{sessionIdleExpire:t,maxReplayDuration:n})?(Je("[Replay] Session in sessionStorage is expired, creating new one..."),jo(s,{previousSessionId:o.id})):o:(Je("[Replay] Creating new session",e),jo(s,{previousSessionId:r}))}function Hd(e){return e.type===A.Custom}function ts(e,t,n){return ki(e,t)?(Ii(e,t,n),!0):!1}function Ud(e,t,n){return ki(e,t)?Ii(e,t,n):Promise.resolve(null)}async function Ii(e,t,n){if(!e.eventBuffer)return null;try{n&&e.recordingMode==="buffer"&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);let r=e.getOptions(),s=Wd(t,r.beforeAddRecordingEvent);return s?await e.eventBuffer.addEvent(s):void 0}catch(r){let s=r&&r instanceof kt?"addEventSizeExceeded":"addEvent";U&&y.error(r),await e.stop({reason:s});let o=P();o&&o.recordDroppedEvent("internal_sdk_error","replay")}}function ki(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=Zr(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(te(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1):!0}function Wd(e,t){try{if(typeof t=="function"&&Hd(e))return t(e)}catch(n){return U&&y.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",n),null}return e}function ns(e){return!e.type}function zr(e){return e.type==="transaction"}function zd(e){return e.type==="replay_event"}function qo(e){return e.type==="feedback"}function Ci(e){let t=qd();return(n,r)=>{if(!e.isEnabled()||!ns(n)&&!zr(n))return;let s=r&&r.statusCode;if(!(t&&(!s||s<200||s>=300))){if(zr(n)){$d(e,n);return}jd(e,n)}}}function $d(e,t){let n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function jd(e,t){let n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;let{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||setTimeout(()=>{e.sendBufferedReplayOrFlush()})}function qd(){let e=P();if(!e)return!1;let t=e.getTransport();return t&&t.send.__sentry__baseTransport__||!1}function Gd(e){return t=>{!e.isEnabled()||!ns(t)||Vd(e,t)}}function Vd(e,t){let n=t.exception&&t.exception.values&&t.exception.values[0].value;if(typeof n=="string"&&(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))){let r=me({category:"replay.hydrate-error"});Rt(e,r)}}function Yd(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function Kd(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:A.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function Xd(e,t){return e.recordingMode!=="buffer"||t.message===Gr||!t.exception||t.type?!1:bi(e.getOptions().errorSampleRate)}function Jd(e,t=!1){let n=t?Ci(e):void 0;return Object.assign((r,s)=>e.isEnabled()?zd(r)?(delete r.breadcrumbs,r):!ns(r)&&!zr(r)&&!qo(r)||!e.checkAndHandleExpiredSession()?r:qo(r)?(e.flush(),r.contexts.feedback.replay_id=e.getSessionId(),Kd(e,r),r):Yd(r,s)&&!e.getOptions()._experiments.captureExceptions?(U&&y.log("[Replay] Ignoring error from rrweb internals",r),null):((Xd(e,r)||e.recordingMode==="session")&&(r.tags={...r.tags,replayId:e.getSessionId()}),n&&n(r,{statusCode:200}),r):r,{id:"Replay"})}function kn(e,t){return t.map(({type:n,start:r,end:s,name:o,data:i})=>{let c=e.throttledAddEvent({type:A.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:o,startTimestamp:r,endTimestamp:s,data:i}}});return typeof c=="string"?Promise.resolve(null):c})}function Zd(e){let{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Qd(e){return t=>{if(!e.isEnabled())return;let n=Zd(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(kn(e,[n]),!1)))}}function ef(e,t){return U&&e.getOptions()._experiments.traceInternals?!1:no(t,P())}function Cn(e,t){e.isEnabled()&&t!==null&&(ef(e,t.name)||e.addUpdate(()=>(kn(e,[t]),!0)))}function tf(e){let{startTimestamp:t,endTimestamp:n,fetchData:r,response:s}=e;if(!n)return null;let{method:o,url:i}=r;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:i,data:{method:o,statusCode:s?s.status:void 0}}}function nf(e){return t=>{if(!e.isEnabled())return;let n=tf(t);Cn(e,n)}}function rf(e){let{startTimestamp:t,endTimestamp:n,xhr:r}=e,s=r[lt];if(!t||!n||!s)return null;let{method:o,url:i,status_code:c}=s;return i===void 0?null:{type:"resource.xhr",name:i,start:t/1e3,end:n/1e3,data:{method:o,statusCode:c}}}function sf(e){return t=>{if(!e.isEnabled())return;let n=rf(t);Cn(e,n)}}function xn(e,t){if(e)try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let n=Mi(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function xi(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function Ti(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Mi(e)];if(!e)return[void 0]}catch{return U&&y.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return U&&y.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function bn(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function Ri(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:s,method:o,statusCode:i,request:c,response:a}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:Gn({method:o,statusCode:i,request:c,response:a})}}function Ct(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Ce(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:s,warnings:o}=of(n);return r.body=s,o&&o.length>0&&(r._meta={warnings:o}),r}function $r(e,t){return Object.keys(e).reduce((n,r)=>{let s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=e[r]),n},{})}function Mi(e){return new URLSearchParams(e).toString()}function of(e){if(!e||typeof e!="string")return{body:e};let t=e.length>Ao,n=af(e);if(t){let r=e.slice(0,Ao);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}\u2026`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function af(e){let t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function vn(e,t){let n=cf(e);return bs(n,t)}function cf(e,t=z.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(z.location.origin))return e;let n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;let r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function lf(e,t,n){try{let r=await df(e,t,n),s=Ri("resource.fetch",r);Cn(n.replay,s)}catch(r){U&&y.error("[Replay] Failed to capture fetch breadcrumb",r)}}function uf(e,t,n){let{input:r,response:s}=t,o=r?Ai(r):void 0,i=xn(o,n.textEncoder),c=s?xi(s.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),c!==void 0&&(e.data.response_body_size=c)}async function df(e,t,n){let r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r}=t,{url:i,method:c,status_code:a=0,request_body_size:l,response_body_size:u}=e.data,d=vn(i,n.networkDetailAllowUrls)&&!vn(i,n.networkDetailDenyUrls),f=d?ff(n,t.input,l):Ct(l),p=await pf(d,n,t.response,u);return{startTimestamp:s,endTimestamp:o,url:i,method:c,statusCode:a,request:f,response:p}}function ff({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let s=n?gf(n,t):{};if(!e)return Ce(s,r,void 0);let o=Ai(n),[i,c]=Ti(o),a=Ce(s,r,i);return c?bn(a,c):a}async function pf(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:r},s,o){if(!e&&o!==void 0)return Ct(o);let i=s?Oi(s.headers,r):{};if(!s||!t&&o!==void 0)return Ce(i,o,void 0);let[c,a]=await mf(s),l=hf(c,{networkCaptureBodies:t,textEncoder:n,responseBodySize:o,captureDetails:e,headers:i});return a?bn(l,a):l}function hf(e,{networkCaptureBodies:t,textEncoder:n,responseBodySize:r,captureDetails:s,headers:o}){try{let i=e&&e.length&&r===void 0?xn(e,n):r;return s?t?Ce(o,i,e):Ce(o,i,void 0):Ct(i)}catch(i){return U&&y.warn("[Replay] Failed to serialize response body",i),Ce(o,r,void 0)}}async function mf(e){let t=yf(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await _f(t)]}catch(n){return U&&y.warn("[Replay] Failed to get text body from response",n),[void 0,"BODY_PARSE_ERROR"]}}function Ai(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function Oi(e,t){let n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function gf(e,t){return e.length===1&&typeof e[0]!="string"?Go(e[0],t):e.length===2?Go(e[1],t):{}}function Go(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?Oi(n,t):Array.isArray(n)?{}:$r(n,t):{}}function yf(e){try{return e.clone()}catch(t){U&&y.warn("[Replay] Failed to clone response body",t)}}function _f(e){return new Promise((t,n)=>{let r=setTimeout(()=>n(new Error("Timeout while trying to read response body")),500);Sf(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function Sf(e){return await e.text()}async function bf(e,t,n){try{let r=Ef(e,t,n),s=Ri("resource.xhr",r);Cn(n.replay,s)}catch(r){U&&y.error("[Replay] Failed to capture xhr breadcrumb",r)}}function vf(e,t,n){let{xhr:r,input:s}=t;if(!r)return;let o=xn(s,n.textEncoder),i=r.getResponseHeader("content-length")?xi(r.getResponseHeader("content-length")):Cf(r.response,r.responseType,n.textEncoder);o!==void 0&&(e.data.request_body_size=o),i!==void 0&&(e.data.response_body_size=i)}function Ef(e,t,n){let r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r,input:i,xhr:c}=t,{url:a,method:l,status_code:u=0,request_body_size:d,response_body_size:f}=e.data;if(!a)return null;if(!c||!vn(a,n.networkDetailAllowUrls)||vn(a,n.networkDetailDenyUrls)){let I=Ct(d),S=Ct(f);return{startTimestamp:s,endTimestamp:o,url:a,method:l,statusCode:u,request:I,response:S}}let p=c[lt],h=p?$r(p.request_headers,n.networkRequestHeaders):{},g=$r(wf(c),n.networkResponseHeaders),[b,m]=n.networkCaptureBodies?Ti(i):[void 0],[_,w]=n.networkCaptureBodies?If(c):[void 0],C=Ce(h,d,b),L=Ce(g,f,_);return{startTimestamp:s,endTimestamp:o,url:a,method:l,statusCode:u,request:m?bn(C,m):C,response:w?bn(L,w):L}}function wf(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
6
+ `).reduce((n,r)=>{let[s,o]=r.split(": ");return n[s.toLowerCase()]=o,n},{}):{}}function If(e){let t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return kf(e.response,e.responseType)}catch(n){t.push(n)}return U&&y.warn("[Replay] Failed to get xhr response body",...t),[void 0]}function kf(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch{return U&&y.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return U&&y.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Cf(e,t,n){try{let r=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return xn(r,n)}catch{return}}function xf(e){let t=P();try{let n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:c}=e.getOptions(),a={replay:e,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:c};t&&t.on?t.on("beforeAddBreadcrumb",(l,u)=>Tf(a,l,u)):(zt(nf(e)),$t(sf(e)))}catch{}}function Tf(e,t,n){if(t.data)try{Rf(t)&&Af(n)&&(vf(t,n,e),bf(t,n,e)),Mf(t)&&Of(n)&&(uf(t,n,e),lf(t,n,e))}catch{U&&y.warn("Error when enriching network breadcrumb")}}function Rf(e){return e.category==="xhr"}function Mf(e){return e.category==="fetch"}function Af(e){return e&&e.xhr}function Of(e){return e&&e.response}var Vo=null;function Lf(e){return!!e.category}var Df=e=>t=>{if(!e.isEnabled())return;let n=Nf(t);n&&Rt(e,n)};function Nf(e){let t=e.getLastBreadcrumb&&e.getLastBreadcrumb();return Vo===t||!t||(Vo=t,!Lf(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))?null:t.category==="console"?Pf(t):me(t)}function Pf(e){let t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return me(e);let n=!1,r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>on?(n=!0,`${s.slice(0,on)}\u2026`):s;if(typeof s=="object")try{let o=Vn(s,7);return JSON.stringify(o).length>on?(n=!0,`${JSON.stringify(o,null,2).slice(0,on)}\u2026`):o}catch{}return s});return me({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Ff(e){let t=ge(),n=P();t.addScopeListener(Df(e)),Wt(gd(e)),We(Qd(e)),xf(e);let r=Jd(e,!Yo(n));n&&n.addEventProcessor?n.addEventProcessor(r):Zn(r),Yo(n)&&(n.on("beforeSendEvent",Gd(e)),n.on("afterSendEvent",Ci(e)),n.on("createDsc",s=>{let o=e.getSessionId();o&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(s.replay_id=o)}),n.on("startTransaction",s=>{e.lastTransaction=s}),n.on("finishTransaction",s=>{e.lastTransaction=s}),n.on("beforeSendFeedback",(s,o)=>{let i=e.getSessionId();o&&o.includeReplay&&e.isEnabled()&&i&&s.contexts&&s.contexts.feedback&&(s.contexts.feedback.replay_id=i)}))}function Yo(e){return!!(e&&e.on)}async function Bf(e){try{return Promise.all(kn(e,[Hf(z.performance.memory)]))}catch{return[]}}function Hf(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Uf(e,t,n){let r,s,o,i=n&&n.maxWait?Math.max(n.maxWait,t):0;function c(){return a(),r=e(),r}function a(){s!==void 0&&clearTimeout(s),o!==void 0&&clearTimeout(o),s=o=void 0}function l(){return s!==void 0||o!==void 0?c():r}function u(){return s&&clearTimeout(s),s=setTimeout(c,t),i&&o===void 0&&(o=setTimeout(c,i)),r}return u.cancel=a,u.flush=l,u}function Wf(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){U&&y.warn("[Replay] Received replay event after session expired.");return}let s=r||!t;t=!0,e.clickDetector&&dd(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!ts(e,n,s))return!0;if(!s)return!1;if($f(e,s),e.session&&e.session.previousSessionId)return!0;if(e.recordingMode==="buffer"&&e.session&&e.eventBuffer){let o=e.eventBuffer.getEarliestTimestamp();o&&(te(`[Replay] Updating session start time to earliest event in buffer to ${new Date(o)}`,e.getOptions()._experiments.traceInternals),e.session.started=o,e.getOptions().stickySession&&es(e.session))}return e.recordingMode==="session"&&e.flush(),!0})}}function zf(e){let t=e.getOptions();return{type:A.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function $f(e,t){!t||!e.session||e.session.segmentId!==0||ts(e,zf(e),!1)}function jf(e,t,n,r){return qt(js(e,$s(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function qf({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)}
7
+ `;if(typeof e=="string")n=`${r}${e}`;else{let o=new TextEncoder().encode(r);n=new Uint8Array(o.length+e.length),n.set(o),n.set(e,o.length)}return n}async function Gf({client:e,scope:t,replayId:n,event:r}){let s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,o={event_id:n,integrations:s};e.emit&&e.emit("preprocessEvent",r,o);let i=await Gt(e.getOptions(),r,o,t,e,Xt());if(!i)return null;i.platform=i.platform||"javascript";let c=e.getSdkMetadata&&e.getSdkMetadata(),{name:a,version:l}=c&&c.sdk||{};return i.sdk={...i.sdk,name:a||"sentry.javascript.unknown",version:l||"0.0.0"},i}async function Vf({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:o}){let i=qf({recordingData:e,headers:{segment_id:n}}),{urls:c,errorIds:a,traceIds:l,initialTimestamp:u}=r,d=P(),f=ge(),p=d&&d.getTransport(),h=d&&d.getDsn();if(!d||!p||!h||!o.sampled)return;let g={type:$l,replay_start_timestamp:u/1e3,timestamp:s/1e3,error_ids:a,trace_ids:l,urls:c,replay_id:t,segment_id:n,replay_type:o.sampled},b=await Gf({scope:f,client:d,replayId:t,event:g});if(!b){d.recordDroppedEvent("event_processor","replay",g),te("An event processor returned `null`, will not send event.");return}delete b.sdkProcessingMetadata;let m=jf(b,i,h,d.getOptions().tunnel),_;try{_=await p.send(m)}catch(C){let L=new Error(Gr);try{L.cause=C}catch{}throw L}if(!_)return _;if(typeof _.statusCode=="number"&&(_.statusCode<200||_.statusCode>=300))throw new En(_.statusCode);let w=Vs({},_);if(Gs(w,"replay"))throw new wn(w);return _}var En=class extends Error{constructor(t){super(`Transport returned status code ${t}`)}},wn=class extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}};async function Li(e,t={count:0,interval:Kl}){let{recordingData:n,options:r}=e;if(n.length)try{return await Vf(e),!0}catch(s){if(s instanceof En||s instanceof wn)throw s;if(Kn("Replays",{_retryCount:t.count}),U&&r._experiments&&r._experiments.captureExceptions&&$e(s),t.count>=Xl){let o=new Error(`${Gr} - max retries exceeded`);try{o.cause=s}catch{}throw o}return t.interval*=++t.count,new Promise((o,i)=>{setTimeout(async()=>{try{await Li(e,t),o(!0)}catch(c){i(c)}},t.interval)})}}var Di="__THROTTLED",Yf="__SKIPPED";function Kf(e,t,n){let r=new Map,s=c=>{let a=c-n;r.forEach((l,u)=>{u<a&&r.delete(u)})},o=()=>[...r.values()].reduce((c,a)=>c+a,0),i=!1;return(...c)=>{let a=Math.floor(Date.now()/1e3);if(s(a),o()>=t){let u=i;return i=!0,u?Yf:Di}i=!1;let l=r.get(a)||0;return r.set(a,l+1),e(...c)}}var jr=class e{constructor({options:t,recordingOptions:n}){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),e.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:jl,sessionIdleExpire:ql},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=n,this._options=t,this._debouncedFlush=Uf(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Kf((i,c)=>Ud(this,i,c),300,5);let{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),o=r?{threshold:Math.min(Jl,r),timeout:r,scrollTimeout:Zl,ignoreSelector:s?s.join(","):""}:void 0;o&&(this.clickDetector=new Fr(this,o))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(t){let{errorSampleRate:n,sessionSampleRate:r}=this._options;if(!(n<=0&&r<=0)){if(this._initializeSessionForSampling(t),!this.session){this._handleException(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",Je(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session")throw new Error("Replay recording is already in progress");if(this._isEnabled&&this.recordingMode==="buffer")throw new Error("Replay buffering is in progress, call `flush()` to save the replay");Je("[Replay] Starting replay in session mode",this._options._experiments.traceInternals);let t=wr({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");Je("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);let t=wr({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{let t=this._canvas;this._stopRecording=ke({...this._recordingOptions,...this.recordingMode==="buffer"&&{checkoutEveryNms:Yl},emit:Wf(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:n}={}){if(this._isEnabled){this._isEnabled=!1;try{te(`[Replay] Stopping Replay${n?` triggered by ${n}`:""}`,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,Nd(this)}catch(r){this._handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),te("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),te("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();let n=Date.now();te("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();let r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){let n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Wr(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){let t=`${z.location.pathname}${z.location.hash}${z.location.search}`,n=`${z.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){let r=this._throttledAddEvent(t,n);if(r===Di){let s=me({category:"replay.throttled"});this.addUpdate(()=>!ts(this,{type:nd,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){let t=this.lastTransaction||ge().getTransaction(),r=(t&&ve(t).data||{})[Jn];if(!(!t||!r||!["route","custom"].includes(r)))return ve(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Od({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(t){U&&y.error("[Replay]",t),U&&this._options._experiments&&this._options._experiments.captureExceptions&&$e(t)}_initializeSessionForSampling(t){let n=this._options.errorSampleRate>0,r=wr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;let t=this.session;return wi(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{z.document.addEventListener("visibilitychange",this._handleVisibilityChange),z.addEventListener("blur",this._handleWindowBlur),z.addEventListener("focus",this._handleWindowFocus),z.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Ff(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}this._performanceCleanupCallback=Rd(this)}_removeListeners(){try{z.document.removeEventListener("visibilitychange",this._handleVisibilityChange),z.removeEventListener("blur",this._handleWindowBlur),z.removeEventListener("focus",this._handleWindowFocus),z.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this._handleException(t)}}__init(){this._handleVisibilityChange=()=>{z.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{let t=me({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{let t=me({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{bd(this,t)}}_doChangeToBackgroundTasks(t){!this.session||Ei(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){te("[Replay] Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_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:A.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=wd(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(kn(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:t,eventBuffer:n}=this;if(!t||!n||t.segmentId)return;let r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){let t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){let t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){U&&y.error("[Replay] No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await Bf(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");let r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();let o=await this.eventBuffer.finish();await Li({replayId:t,recordingData:o,segmentId:s,eventContext:r,session:this.session,options:this.getOptions(),timestamp:n})}catch(n){this._handleException(n),this.stop({reason:"sendReplay"});let r=P();r&&r.recordDroppedEvent("send_error","replay")}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){U&&y.error("[Replay] Attempting to finish replay event after session expired.");return}if(!this.session)return;let n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();let o=s<this._options.minReplayDuration,i=s>this._options.maxReplayDuration+5e3;if(o||i){te(`[Replay] Session duration (${Math.floor(s/1e3)}s) is too ${o?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),o&&this._debouncedFlush();return}let c=this.eventBuffer;if(c&&this.session.segmentId===0&&!c.hasCheckout&&te("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock){this._flushLock=this._runFlush(),await this._flushLock,this._flushLock=void 0;return}try{await this._flushLock}catch(a){U&&y.error(a)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&es(this.session)}__init6(){this._onMutationHandler=t=>{let n=t.length,r=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,o=r&&n>r;if(n>s||o){let i=me({category:"replay.mutations",data:{count:n,limit:o}});this._createCustomBreadcrumb(i)}return o?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}};function yt(e,t,n,r){let s=typeof r=="string"?r.split(","):[],o=[...e,...s,...t];return typeof n<"u"&&(typeof n=="string"&&o.push(`.${n}`),Bt(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),o.join(",")}function Xf({mask:e,unmask:t,block:n,unblock:r,ignore:s,blockClass:o,blockSelector:i,maskTextClass:c,maskTextSelector:a,ignoreClass:l}){let u=['base[href="/"]'],d=yt(e,[".sentry-mask","[data-sentry-mask]"],c,a),f=yt(t,[".sentry-unmask","[data-sentry-unmask]"]),p={maskTextSelector:d,unmaskTextSelector:f,blockSelector:yt(n,[".sentry-block","[data-sentry-block]",...u],o,i),unblockSelector:yt(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:yt(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],l)};return o instanceof RegExp&&(p.blockClass=o),c instanceof RegExp&&(p.maskTextClass=c),p}function Jf({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:o}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?o:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o}var Ko='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Zf=["content-length","content-type","accept"],Xo=!1,Qf=e=>new xt(e),xt=class e{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=Gl,flushMaxDelay:n=Vl,minReplayDuration:r=Ql,maxReplayDuration:s=Oo,stickySession:o=!0,useCompression:i=!0,workerUrl:c,_experiments:a={},sessionSampleRate:l,errorSampleRate:u,maskAllText:d=!0,maskAllInputs:f=!0,blockAllMedia:p=!0,mutationBreadcrumbLimit:h=750,mutationLimit:g=1e4,slowClickTimeout:b=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:_=[],networkDetailDenyUrls:w=[],networkCaptureBodies:C=!0,networkRequestHeaders:L=[],networkResponseHeaders:I=[],mask:S=[],maskAttributes:M=["title","placeholder"],unmask:$=[],block:v=[],unblock:x=[],ignore:F=[],maskFn:V,beforeAddRecordingEvent:J,beforeErrorSampling:se,blockClass:H,blockSelector:ie,maskInputOptions:Y,maskTextClass:re,maskTextSelector:ae,ignoreClass:Fn}={}){this.name=e.id;let Fe=Xf({mask:S,unmask:$,block:v,unblock:x,ignore:F,blockClass:H,blockSelector:ie,maskTextClass:re,maskTextSelector:ae,ignoreClass:Fn});if(this._recordingOptions={maskAllInputs:f,maskAllText:d,maskInputOptions:{...Y||{},password:!0},maskTextFn:V,maskInputFn:V,maskAttributeFn:(Se,Be,ot)=>Jf({maskAttributes:M,maskAllText:d,privacyOptions:Fe,key:Se,value:Be,el:ot}),...Fe,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:Se=>{try{Se.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,eu),maxReplayDuration:Math.min(s,Oo),stickySession:o,sessionSampleRate:l,errorSampleRate:u,useCompression:i,workerUrl:c,blockAllMedia:p,maskAllInputs:f,maskAllText:d,mutationBreadcrumbLimit:h,mutationLimit:g,slowClickTimeout:b,slowClickIgnoreSelectors:m,networkDetailAllowUrls:_,networkDetailDenyUrls:w,networkCaptureBodies:C,networkRequestHeaders:Jo(L),networkResponseHeaders:Jo(I),beforeAddRecordingEvent:J,beforeErrorSampling:se,_experiments:a},typeof l=="number"&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.
8
+ This option is deprecated and will be removed soon.
9
+ Instead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:
10
+ Sentry.init({ replaysSessionSampleRate: ${l} })`),this._initialOptions.sessionSampleRate=l),typeof u=="number"&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.
11
+ This option is deprecated and will be removed soon.
12
+ Instead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:
13
+ Sentry.init({ replaysOnErrorSampleRate: ${u} })`),this._initialOptions.errorSampleRate=u),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Ko}`:Ko),this._isInitialized&&ut())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Xo}set _isInitialized(t){Xo=t}setupOnce(){ut()&&(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:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return!this._replay||!this._replay.isEnabled()?Promise.resolve():this._replay.sendBufferedReplayOrFlush(t)}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){let t=ep(this._initialOptions);this._replay=new jr({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{let n=P().getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}};xt.__initStatic();function ep(e){let t=P(),n=t&&t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Gn(e)};return n?(e.sessionSampleRate==null&&e.errorSampleRate==null&&n.replaysSessionSampleRate==null&&n.replaysOnErrorSampleRate==null&&Bt(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),typeof n.replaysSessionSampleRate=="number"&&(r.sessionSampleRate=n.replaysSessionSampleRate),typeof n.replaysOnErrorSampleRate=="number"&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):(Bt(()=>{console.warn("SDK client is not available.")}),r)}function Jo(e){return[...Zf,...e.map(t=>t.toLowerCase())]}function tp(){let e=P();return e&&e.getIntegrationByName&&e.getIntegrationByName("Replay")}k();var Ni;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(Ni||(Ni={}));function np(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function ss(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:ss(e.parentNode,t,n,r+1)}function Pi(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(np(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}var tt=`Please stop import mirror directly. Instead of that,\r
14
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
15
+ or you can use record.mirror to access the mirror instance during recording.`,Fi={map:{},getId(){return console.error(tt),-1},getNode(){return console.error(tt),null},removeNodeFromMap(){console.error(tt)},has(){return console.error(tt),!1},reset(){console.error(tt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Fi=new Proxy(Fi,{get(e,t,n){return t==="map"&&console.error(tt),Reflect.get(e,t,n)}}));function is(e,t,n,r,s=window){let o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(i){setTimeout(()=>{n.set.call(this,i)},0),o&&o.set&&o.set.call(this,i)}}),()=>is(e,t,o||{},!0)}function as(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}/[1-9][0-9]{12}/.test(Date.now().toString());function An(e,t,n,r,s){if(!e)return!1;let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!o)return!1;let i=Pi(t,n);if(!s){let l=r&&o.matches(r);return i(o)&&!l}let c=ss(o,i),a=-1;return c<0?!1:(r&&(a=ss(o,Pi(null,r))),c>-1&&a<0?!0:c<a)}var rs;function rp(){if(rs)return rs;let e=window.document,t=window.requestAnimationFrame;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.requestAnimationFrame&&(t=r.requestAnimationFrame),e.head.removeChild(n)}catch{}return rs=t.bind(window)}function Le(...e){return rp()(...e)}var rt=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(rt||{}),Rn;function sp(e){Rn=e}var Bi=e=>Rn?(...n)=>{try{return e(...n)}catch(r){if(Rn&&Rn(r)===!0)return()=>{};throw r}}:e,nt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",op=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Mt=0;Mt<nt.length;Mt++)op[nt.charCodeAt(Mt)]=Mt;var Mt,ip=function(e){var t=new Uint8Array(e),n,r=t.length,s="";for(n=0;n<r;n+=3)s+=nt[t[n]>>2],s+=nt[(t[n]&3)<<4|t[n+1]>>4],s+=nt[(t[n+1]&15)<<2|t[n+2]>>6],s+=nt[t[n+2]&63];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s},Hi=new Map;function ap(e,t){let n=Hi.get(e);return n||(n=new Map,Hi.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var $i=(e,t,n)=>{if(!e||!(qi(e,t)||typeof e=="object"))return;let r=e.constructor.name,s=ap(n,r),o=s.indexOf(e);return o===-1&&(o=s.length,s.push(e)),o};function Mn(e,t,n){if(e instanceof Array)return e.map(r=>Mn(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){let r=e.constructor.name,s=ip(e);return{rr_type:r,base64:s}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Mn(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let r=e.constructor.name,{src:s}=e;return{rr_type:r,src:s}}else if(e instanceof HTMLCanvasElement){let r="HTMLImageElement",s=e.toDataURL();return{rr_type:r,src:s}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Mn(e.data,t,n),e.width,e.height]};if(qi(e,t)||typeof e=="object"){let r=e.constructor.name,s=$i(e,t,n);return{rr_type:r,index:s}}}}return e}var ji=(e,t,n)=>e.map(r=>Mn(r,t,n)),qi=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof t[s]=="function").find(s=>e instanceof t[s]);function cp(e,t,n,r,s){let o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let c of i)try{if(typeof t.CanvasRenderingContext2D.prototype[c]!="function")continue;let a=as(t.CanvasRenderingContext2D.prototype,c,function(l){return function(...u){return An(this.canvas,n,r,s,!0)||setTimeout(()=>{let d=ji(u,t,this);e(this.canvas,{type:rt["2D"],property:c,args:d})},0),l.apply(this,u)}});o.push(a)}catch{let l=is(t.CanvasRenderingContext2D.prototype,c,{set(u){e(this.canvas,{type:rt["2D"],property:c,args:[u],setter:!0})}});o.push(l)}return()=>{o.forEach(c=>c())}}function lp(e){return e==="experimental-webgl"?"webgl":e}function Ui(e,t,n,r,s){let o=[];try{let i=as(e.HTMLCanvasElement.prototype,"getContext",function(c){return function(a,...l){if(!An(this,t,n,r,!0)){let u=lp(a);if("__context"in this||(this.__context=u),s&&["webgl","webgl2"].includes(u))if(l[0]&&typeof l[0]=="object"){let d=l[0];d.preserveDrawingBuffer||(d.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return c.apply(this,[a,...l])}});o.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(i=>i())}}function Wi(e,t,n,r,s,o,i,c){let a=[],l=Object.getOwnPropertyNames(e);for(let u of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{if(typeof e[u]!="function")continue;let d=as(e,u,function(f){return function(...p){let h=f.apply(this,p);if($i(h,c,this),"tagName"in this.canvas&&!An(this.canvas,r,s,o,!0)){let g=ji(p,c,this),b={type:t,property:u,args:g};n(this.canvas,b)}return h}});a.push(d)}catch{let f=is(e,u,{set(p){n(this.canvas,{type:t,property:u,args:[p],setter:!0})}});a.push(f)}return a}function up(e,t,n,r,s,o){let i=[];return i.push(...Wi(t.WebGLRenderingContext.prototype,rt.WebGL,e,n,r,s,o,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...Wi(t.WebGL2RenderingContext.prototype,rt.WebGL2,e,n,r,s,o,t)),()=>{i.forEach(c=>c())}}var dp='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function fp(){let e=new Blob([dp]);return URL.createObjectURL(e)}var os=class{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(d,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(d)||this.pendingCanvasMutations.set(d,[]),this.pendingCanvasMutations.get(d).push(f)};let{sampling:n="all",win:r,blockClass:s,blockSelector:o,unblockSelector:i,maxCanvasSize:c,recordCanvas:a,dataURLOptions:l,errorHandler:u}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,u&&sp(u),!t.enableManualSnapshot&&Bi(()=>{a&&n==="all"&&this.initCanvasMutationObserver(r,s,o,i),a&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,s,o,i,c,{dataURLOptions:l})})()}initCanvasFPSObserver(t,n,r,s,o,i,c){let a=Ui(n,r,s,o,!0),l=this.takeSnapshot(!1,t,n,r,s,o,i,c.dataURLOptions);this.resetObservers=()=>{a(),cancelAnimationFrame(l)}}initCanvasMutationObserver(t,n,r,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let o=Ui(t,n,r,s,!1),i=cp(this.processMutation.bind(this),t,n,r,s),c=up(this.processMutation.bind(this),t,n,r,s,this.mirror);this.resetObservers=()=>{o(),i(),c()}}snapshot(t){let{options:n}=this,r=this.takeSnapshot(!0,n.sampling==="all"?2:n.sampling||2,n.win,n.blockClass,n.blockSelector,n.unblockSelector,n.maxCanvasSize,n.dataURLOptions,t);this.resetObservers=()=>{cancelAnimationFrame(r)}}takeSnapshot(t,n,r,s,o,i,c,a,l){let u=new Map,d=new Worker(fp());d.onmessage=m=>{let _=m.data,{id:w}=_;if(u.set(w,!1),!("base64"in _))return;let{base64:C,type:L,width:I,height:S}=_;this.mutationCb({id:w,type:rt["2D"],commands:[{property:"clearRect",args:[0,0,I,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:C}],type:L}]},0,0,I,S]}]})};let f=1e3/n,p=0,h,g=m=>{if(m)return[m];let _=[];return r.document.querySelectorAll("canvas").forEach(w=>{An(w,s,o,i,!0)||_.push(w)}),_},b=m=>{if(p&&m-p<f){h=Le(b);return}p=m,g(l).forEach(_=>{let w=this.mirror.getId(_);if(!u.get(w)&&!(!_.width||!_.height)){if(u.set(w,!0),!t&&["webgl","webgl2"].includes(_.__context)){let C=_.getContext(_.__context);ze([C,"optionalAccess",L=>L.getContextAttributes,"call",L=>L(),"optionalAccess",L=>L.preserveDrawingBuffer])===!1&&C.clear(C.COLOR_BUFFER_BIT)}createImageBitmap(_).then(C=>{d.postMessage({id:w,bitmap:C,width:_.width,height:_.height,dataURLOptions:a,maxCanvasSize:c},[C])}).catch(C=>{Bi(()=>{throw C})()})}}),h=Le(b)};return h=Le(b),h}startPendingCanvasMutationFlusher(){Le(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=n=>{this.rafStamps.latestId=n,Le(t)};Le(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{let r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Le(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;let s=r.map(i=>{let{type:c,...a}=i;return a}),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:s}),this.pendingCanvasMutations.delete(t)}},zi={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},Gi="ReplayCanvas",Tn=1280,pp=(e={})=>{let[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Tn):Tn,n?Math.min(n,Tn):Tn]},s,o=new Promise(i=>s=i);return{name:Gi,setupOnce(){},getOptions(){let{quality:i,enableManualSnapshot:c,maxCanvasSize:a}=r;return{enableManualSnapshot:c,recordCanvas:!0,getCanvasManager:l=>{let u=new os({...l,enableManualSnapshot:c,maxCanvasSize:a,errorHandler:d=>{try{typeof d=="object"&&(d.__rrweb__=!0)}catch{}}});return s(u),u},...zi[i||"medium"]||zi.medium}},async snapshot(i){(await o).snapshot(i)}}},Vi=pp,hp=Q(Gi,Vi);k();var Ne=be,cs="#ffffff",Yi="inherit",ls="rgba(108, 95, 199, 1)",Ki={fontFamily:"system-ui, 'Helvetica Neue', Arial, sans-serif",fontSize:"14px",background:cs,backgroundHover:"#f6f6f7",foreground:"#2b2233",border:"1.5px solid rgba(41, 35, 47, 0.13)",borderRadius:"12px",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",success:"#268d75",error:"#df3338",submitBackground:"rgba(88, 74, 192, 1)",submitBackgroundHover:ls,submitBorder:ls,submitOutlineFocus:"#29232f",submitForeground:cs,submitForegroundHover:cs,cancelBackground:"transparent",cancelBackgroundHover:"var(--background-hover)",cancelBorder:"var(--border)",cancelOutlineFocus:"var(--input-outline-focus)",cancelForeground:"var(--foreground)",cancelForegroundHover:"var(--foreground)",inputBackground:Yi,inputForeground:Yi,inputBorder:"var(--border)",inputOutlineFocus:ls,formBorderRadius:"20px",formContentBorderRadius:"6px"},Xi={light:Ki,dark:{...Ki,background:"#29232f",backgroundHover:"#352f3b",foreground:"#ebe6ef",border:"1.5px solid rgba(235, 230, 239, 0.15)",success:"#2da98c",error:"#f55459"}},mp="Report a Bug",gp="Cancel",yp="Send Bug Report",_p="Report a Bug",Sp="your.email@example.org",bp="Email",vp="What's the bug? What did you expect?",Ep="Description",wp="Your Name",Ip="Name",kp="(required)",Cp="Thank you for your report!",ta="widget",na="api";async function xp({client:e,scope:t,event:n}){let r={};e.emit&&e.emit("preprocessEvent",n,r);let s=await Gt(e.getOptions(),n,r,t,e,Xt());return s===null?(e.recordDroppedEvent("event_processor","feedback",n),null):(s.platform=s.platform||"javascript",s)}async function Tp({feedback:{message:e,email:t,name:n,source:r,url:s}},{includeReplay:o=!0}={}){let i=P(),c=i&&i.getTransport(),a=i&&i.getDsn();if(!i||!c||!a)return;let l={contexts:{feedback:{contact_email:t,name:n,message:e,url:s,source:r}},type:"feedback"};return ft(async u=>{u.clearBreadcrumbs(),[na,ta].includes(String(r))&&u.setLevel("info");let d=await xp({scope:u,client:i,event:l});if(!d)return;i.emit&&i.emit("beforeSendFeedback",d,{includeReplay:!!o});let f=Xs(d,a,i.getOptions()._metadata,i.getOptions().tunnel),p;try{p=await c.send(f)}catch(h){let g=new Error("Unable to send Feedback");try{g.cause=h}catch{}throw g}if(p){if(typeof p.statusCode=="number"&&(p.statusCode<200||p.statusCode>=300))throw new Error("Unable to send Feedback");return p}})}function ra({name:e,email:t,message:n,source:r=na,url:s=Ft()},o={}){if(!n)throw new Error("Unable to submit feedback with empty message");return Tp({feedback:{name:e,email:t,message:n,url:s,source:r}},o)}var De=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Ji(e,t){return{...e,...t,themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function Rp(e){let t=e.createElement("style");return t.textContent=`
16
+ .widget__actor {
17
+ line-height: 25px;
18
+
19
+ display: flex;
20
+ align-items: center;
21
+ gap: 8px;
22
+
23
+ border-radius: var(--border-radius);
24
+ cursor: pointer;
25
+ font-family: inherit;
26
+ font-size: var(--font-size);
27
+ font-weight: 600;
28
+ padding: 12px 16px;
29
+ text-decoration: none;
30
+ z-index: 9000;
31
+
32
+ color: var(--foreground);
33
+ background-color: var(--background);
34
+ border: var(--border);
35
+ box-shadow: var(--box-shadow);
36
+ opacity: 1;
37
+ transition: opacity 0.1s ease-in-out;
38
+ }
39
+
40
+ .widget__actor:hover {
41
+ background-color: var(--background-hover);
42
+ }
43
+
44
+ .widget__actor svg {
45
+ width: 16px;
46
+ height: 16px;
47
+ }
48
+
49
+ .widget__actor--hidden {
50
+ opacity: 0;
51
+ pointer-events: none;
52
+ visibility: hidden;
53
+ }
54
+
55
+ .widget__actor__text {
56
+ }
57
+
58
+ .feedback-icon path {
59
+ fill: var(--foreground);
60
+ }
61
+ `,t}function Mp(e){let t=e.createElement("style");return t.textContent=`
62
+ .dialog {
63
+ line-height: 25px;
64
+ background-color: rgba(0, 0, 0, 0.05);
65
+ border: none;
66
+ position: fixed;
67
+ inset: 0;
68
+ z-index: 10000;
69
+ width: 100vw;
70
+ height: 100vh;
71
+ display: flex;
72
+ align-items: center;
73
+ justify-content: center;
74
+ opacity: 1;
75
+ transition: opacity 0.2s ease-in-out;
76
+ }
77
+
78
+ .dialog:not([open]) {
79
+ opacity: 0;
80
+ pointer-events: none;
81
+ visibility: hidden;
82
+ }
83
+ .dialog:not([open]) .dialog__content {
84
+ transform: translate(0, -16px) scale(0.98);
85
+ }
86
+
87
+ .dialog__content {
88
+ position: fixed;
89
+ left: var(--left);
90
+ right: var(--right);
91
+ bottom: var(--bottom);
92
+ top: var(--top);
93
+
94
+ border: var(--border);
95
+ border-radius: var(--form-border-radius);
96
+ background-color: var(--background);
97
+ color: var(--foreground);
98
+
99
+ width: 320px;
100
+ max-width: 100%;
101
+ max-height: calc(100% - 2rem);
102
+ display: flex;
103
+ flex-direction: column;
104
+ box-shadow: var(--box-shadow);
105
+ transition: transform 0.2s ease-in-out;
106
+ transform: translate(0, 0) scale(1);
107
+ }
108
+
109
+ .dialog__header {
110
+ display: flex;
111
+ align-items: center;
112
+ justify-content: space-between;
113
+ font-size: 20px;
114
+ font-weight: 600;
115
+ padding: 24px 24px 0 24px;
116
+ margin: 0;
117
+ margin-bottom: 16px;
118
+ }
119
+
120
+ .brand-link {
121
+ display: inline-flex;
122
+ }
123
+
124
+ .error {
125
+ color: var(--error);
126
+ margin-bottom: 16px;
127
+ }
128
+
129
+ .form {
130
+ display: grid;
131
+ overflow: auto;
132
+ flex-direction: column;
133
+ gap: 16px;
134
+ padding: 0 24px 24px;
135
+ }
136
+
137
+ .form__error-container {
138
+ color: var(--error);
139
+ }
140
+
141
+ .form__error-container--hidden {
142
+ display: none;
143
+ }
144
+
145
+ .form__label {
146
+ display: flex;
147
+ flex-direction: column;
148
+ gap: 4px;
149
+ margin: 0px;
150
+ }
151
+
152
+ .form__label__text {
153
+ display: grid;
154
+ gap: 4px;
155
+ align-items: center;
156
+ grid-auto-flow: column;
157
+ grid-auto-columns: max-content;
158
+ }
159
+
160
+ .form__label__text--required {
161
+ font-size: 0.85em;
162
+ }
163
+
164
+ .form__input {
165
+ line-height: inherit;
166
+ background-color: var(--input-background);
167
+ box-sizing: border-box;
168
+ border: var(--input-border);
169
+ border-radius: var(--form-content-border-radius);
170
+ color: var(--input-foreground);
171
+ font-family: inherit;
172
+ font-size: var(--font-size);
173
+ font-weight: 500;
174
+ padding: 6px 12px;
175
+ }
176
+
177
+ .form__input::placeholder {
178
+ color: var(--input-foreground);
179
+ opacity: 0.65;
180
+ }
181
+
182
+ .form__input:focus-visible {
183
+ outline: 1px auto var(--input-outline-focus);
184
+ }
185
+
186
+ .form__input--textarea {
187
+ font-family: inherit;
188
+ resize: vertical;
189
+ }
190
+
191
+ .btn-group {
192
+ display: grid;
193
+ gap: 8px;
194
+ margin-top: 8px;
195
+ }
196
+
197
+ .btn {
198
+ line-height: inherit;
199
+ border: var(--cancel-border);
200
+ border-radius: var(--form-content-border-radius);
201
+ cursor: pointer;
202
+ font-family: inherit;
203
+ font-size: var(--font-size);
204
+ font-weight: 600;
205
+ padding: 6px 16px;
206
+ }
207
+ .btn[disabled] {
208
+ opacity: 0.6;
209
+ pointer-events: none;
210
+ }
211
+
212
+ .btn--primary {
213
+ background-color: var(--submit-background);
214
+ border-color: var(--submit-border);
215
+ color: var(--submit-foreground);
216
+ }
217
+ .btn--primary:hover {
218
+ background-color: var(--submit-background-hover);
219
+ color: var(--submit-foreground-hover);
220
+ }
221
+ .btn--primary:focus-visible {
222
+ outline: 1px auto var(--submit-outline-focus);
223
+ }
224
+
225
+ .btn--default {
226
+ background-color: var(--cancel-background);
227
+ color: var(--cancel-foreground);
228
+ font-weight: 500;
229
+ }
230
+ .btn--default:hover {
231
+ background-color: var(--cancel-background-hover);
232
+ color: var(--cancel-foreground-hover);
233
+ }
234
+ .btn--default:focus-visible {
235
+ outline: 1px auto var(--cancel-outline-focus);
236
+ }
237
+
238
+ .success-message {
239
+ background-color: var(--background);
240
+ border: var(--border);
241
+ border-radius: var(--border-radius);
242
+ box-shadow: var(--box-shadow);
243
+ font-weight: 600;
244
+ color: var(--success);
245
+ padding: 12px 24px;
246
+ line-height: 25px;
247
+ display: grid;
248
+ align-items: center;
249
+ grid-auto-flow: column;
250
+ gap: 6px;
251
+ cursor: default;
252
+ }
253
+
254
+ .success-icon path {
255
+ fill: var(--success);
256
+ }
257
+ `,t}function Zi(e){return`
258
+ --background: ${e.background};
259
+ --background-hover: ${e.backgroundHover};
260
+ --foreground: ${e.foreground};
261
+ --error: ${e.error};
262
+ --success: ${e.success};
263
+ --border: ${e.border};
264
+ --border-radius: ${e.borderRadius};
265
+ --box-shadow: ${e.boxShadow};
266
+
267
+ --submit-background: ${e.submitBackground};
268
+ --submit-background-hover: ${e.submitBackgroundHover};
269
+ --submit-border: ${e.submitBorder};
270
+ --submit-outline-focus: ${e.submitOutlineFocus};
271
+ --submit-foreground: ${e.submitForeground};
272
+ --submit-foreground-hover: ${e.submitForegroundHover};
273
+
274
+ --cancel-background: ${e.cancelBackground};
275
+ --cancel-background-hover: ${e.cancelBackgroundHover};
276
+ --cancel-border: ${e.cancelBorder};
277
+ --cancel-outline-focus: ${e.cancelOutlineFocus};
278
+ --cancel-foreground: ${e.cancelForeground};
279
+ --cancel-foreground-hover: ${e.cancelForegroundHover};
280
+
281
+ --input-background: ${e.inputBackground};
282
+ --input-foreground: ${e.inputForeground};
283
+ --input-border: ${e.inputBorder};
284
+ --input-outline-focus: ${e.inputOutlineFocus};
285
+
286
+ --form-border-radius: ${e.formBorderRadius};
287
+ --form-content-border-radius: ${e.formContentBorderRadius};
288
+ `}function Ap(e,t,n){let r=e.createElement("style");return r.textContent=`
289
+ :host {
290
+ --bottom: 1rem;
291
+ --right: 1rem;
292
+ --top: auto;
293
+ --left: auto;
294
+ --z-index: 100000;
295
+ --font-family: ${n.light.fontFamily};
296
+ --font-size: ${n.light.fontSize};
297
+
298
+ position: fixed;
299
+ left: var(--left);
300
+ right: var(--right);
301
+ bottom: var(--bottom);
302
+ top: var(--top);
303
+ z-index: var(--z-index);
304
+
305
+ font-family: var(--font-family);
306
+ font-size: var(--font-size);
307
+
308
+ ${Zi(t==="dark"?n.dark:n.light)}
309
+ }
310
+
311
+ ${t==="system"?`
312
+ @media (prefers-color-scheme: dark) {
313
+ :host {
314
+ ${Zi(n.dark)}
315
+ }
316
+ }`:""}
317
+ }`,r}function Op({id:e,colorScheme:t,themeDark:n,themeLight:r}){try{let s=Ne.document,o=s.createElement("div");o.id=e;let i=o.attachShadow({mode:"open"});return i.appendChild(Ap(s,t,{dark:n,light:r})),i.appendChild(Mp(s)),{shadow:i,host:o}}catch{throw y.warn("[Feedback] Browser does not support shadow DOM API"),new Error("Browser does not support shadow DOM API.")}}async function Lp(e,t,n){if(!e)return;let r=()=>{e&&e.showError("There was a problem submitting feedback, please wait and try again.")};e.hideError();try{return await ra({...t,source:ta},n)}catch(s){De&&y.error(s),r()}}function oe(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}var st=20,Dp="http://www.w3.org/2000/svg";function Np(){let e=c=>Ne.document.createElementNS(Dp,c),t=oe(e("svg"),{class:"feedback-icon",width:`${st}`,height:`${st}`,viewBox:`0 0 ${st} ${st}`,fill:"none"}),n=oe(e("g"),{clipPath:"url(#clip0_57_80)"}),r=oe(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);let s=e("defs"),o=oe(e("clipPath"),{id:"clip0_57_80"}),i=oe(e("rect"),{width:`${st}`,height:`${st}`,fill:"white"});return o.appendChild(i),s.appendChild(o),t.appendChild(s).appendChild(o).appendChild(i),{get el(){return t}}}function G(e,t,...n){let s=Ne.document.createElement(e);t&&Object.entries(t).forEach(([o,i])=>{o==="className"&&typeof i=="string"?s.setAttribute("class",i):typeof i=="boolean"&&i?s.setAttribute(o,""):typeof i=="string"?s.setAttribute(o,i):o.startsWith("on")&&typeof i=="function"&&s.addEventListener(o.substring(2).toLowerCase(),i)});for(let o of n)sa(s,o);return s}function sa(e,t){let n=Ne.document;if(!(typeof t>"u"||t===null))if(Array.isArray(t))for(let r of t)sa(e,r);else t===!1||(typeof t=="string"?e.appendChild(n.createTextNode(t)):t instanceof Node?e.appendChild(t):e.appendChild(n.createTextNode(String(t))))}function Pp({buttonLabel:e,onClick:t}){function n(s){t&&t(s)}let r=G("button",{type:"button",className:"widget__actor","aria-label":e,"aria-hidden":"false"},Np().el,e?G("span",{className:"widget__actor__text"},e):null);return r.addEventListener("click",n),{get el(){return r},show:()=>{r.classList.remove("widget__actor--hidden"),r.setAttribute("aria-hidden","false")},hide:()=>{r.classList.add("widget__actor--hidden"),r.setAttribute("aria-hidden","true")}}}function Fp({label:e}){return{el:G("button",{type:"submit",className:"btn btn--primary","aria-label":e},e)}}function us(e,t){let n=e.get(t);return typeof n=="string"?n.trim():""}function Bp({nameLabel:e,namePlaceholder:t,emailLabel:n,emailPlaceholder:r,messageLabel:s,messagePlaceholder:o,isRequiredLabel:i,cancelButtonLabel:c,submitButtonLabel:a,showName:l,showEmail:u,isNameRequired:d,isEmailRequired:f,defaultName:p,defaultEmail:h,onCancel:g,onSubmit:b}){let{el:m}=Fp({label:a});function _(x){if(x.preventDefault(),x.target instanceof HTMLFormElement)try{if(b){let F=new FormData(x.target),V={name:us(F,"name"),email:us(F,"email"),message:us(F,"message")};b(V)}}catch{}}let w=G("div",{className:"form__error-container form__error-container--hidden","aria-hidden":"true"});function C(x){w.textContent=x,w.classList.remove("form__error-container--hidden"),w.setAttribute("aria-hidden","false")}function L(){w.textContent="",w.classList.add("form__error-container--hidden"),w.setAttribute("aria-hidden","true")}let I=G("input",{id:"name",type:l?"text":"hidden","aria-hidden":l?"false":"true",name:"name",required:d,className:"form__input",placeholder:t,value:p}),S=G("input",{id:"email",type:u?"text":"hidden","aria-hidden":u?"false":"true",name:"email",required:f,className:"form__input",placeholder:r,value:h}),M=G("textarea",{id:"message",autoFocus:"true",rows:"5",name:"message",required:!0,className:"form__input form__input--textarea",placeholder:o}),$=G("button",{type:"button",className:"btn btn--default","aria-label":c,onClick:x=>{g&&g(x)}},c),v=G("form",{className:"form",onSubmit:_},[w,l&&G("label",{htmlFor:"name",className:"form__label"},[G("span",{className:"form__label__text"},e,d&&G("span",{className:"form__label__text--required"},` ${i}`)),I]),!l&&I,u&&G("label",{htmlFor:"email",className:"form__label"},[G("span",{className:"form__label__text"},n,f&&G("span",{className:"form__label__text--required"},` ${i}`)),S]),!u&&S,G("label",{htmlFor:"message",className:"form__label"},[G("span",{className:"form__label__text"},s,G("span",{className:"form__label__text--required"},` ${i}`)),M]),G("div",{className:"btn-group"},[m,$])]);return{get el(){return v},showError:C,hideError:L}}var Hp="http://www.w3.org/2000/svg";function Up({colorScheme:e}){let t=i=>Ne.document.createElementNS(Hp,i),n=oe(t("svg"),{class:"sentry-logo",width:"32",height:"30",viewBox:"0 0 72 66",fill:"none"}),r=oe(t("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});n.append(r);let s=t("defs"),o=t("style");return o.textContent=`
318
+ path {
319
+ fill: ${e==="dark"?"#fff":"#362d59"};
320
+ }`,e==="system"&&(o.textContent+=`
321
+ @media (prefers-color-scheme: dark) {
322
+ path: {
323
+ fill: '#fff';
324
+ }
325
+ }
326
+ `),s.append(o),n.append(s),{get el(){return n}}}function Wp({formTitle:e,showBranding:t,showName:n,showEmail:r,isNameRequired:s,isEmailRequired:o,colorScheme:i,defaultName:c,defaultEmail:a,onClosed:l,onCancel:u,onSubmit:d,...f}){let p=null;function h(){g(),l&&l()}function g(){p&&(p.open=!1)}function b(){p&&(p.open=!0)}function m(){return p&&p.open===!0||!1}let{el:_,showError:w,hideError:C}=Bp({showEmail:r,showName:n,isEmailRequired:o,isNameRequired:s,defaultName:c,defaultEmail:a,onSubmit:d,onCancel:u,...f});return p=G("dialog",{className:"dialog",open:!0,onClick:h},G("div",{className:"dialog__content",onClick:L=>{L.stopPropagation()}},G("h2",{className:"dialog__header"},e,t&&G("a",{className:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer"},Up({colorScheme:i}).el)),_)),{get el(){return p},showError:w,hideError:C,open:b,close:g,checkIsOpen:m}}var On=16,Qi=17,zp="http://www.w3.org/2000/svg";function $p(){let e=a=>Ne.document.createElementNS(zp,a),t=oe(e("svg"),{class:"success-icon",width:`${On}`,height:`${Qi}`,viewBox:`0 0 ${On} ${Qi}`,fill:"none"}),n=oe(e("g"),{clipPath:"url(#clip0_57_156)"}),r=oe(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),s=oe(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(s,r);let o=e("defs"),i=oe(e("clipPath"),{id:"clip0_57_156"}),c=oe(e("rect"),{width:`${On}`,height:`${On}`,fill:"white",transform:"translate(0 0.5)"});return i.appendChild(c),o.appendChild(i),t.appendChild(o).appendChild(i).appendChild(c),{get el(){return t}}}function jp({message:e,onRemove:t}){function n(){r&&(r.remove(),t&&t())}let r=G("div",{className:"success-message",onClick:n},$p().el,e);return{el:r,remove:n}}function ea({shadow:e,options:{shouldCreateActor:t=!0,...n},attachTo:r}){let s,o,i=!1;function c(){if(e)try{let m=jp({message:n.successMessageText,onRemove:()=>{_&&clearTimeout(_),u()}});if(!m.el)throw new Error("Unable to show success message");e.appendChild(m.el);let _=setTimeout(()=>{m&&m.remove()},5e3)}catch(m){y.error(m)}}async function a(m){if(!o)return;let _=[];if(n.isNameRequired&&!m.name&&_.push(n.nameLabel),n.isEmailRequired&&!m.email&&_.push(n.emailLabel),m.message||_.push(n.messageLabel),_.length>0){o.showError(`Please enter in the following required fields: ${_.join(", ")}`);return}if(!await Lp(o,m)){n.onSubmitError&&n.onSubmitError();return}g(),c(),n.onSubmitSuccess&&n.onSubmitSuccess()}function l(){let m=P(),_=m&&m.getIntegrationByName&&m.getIntegrationByName("Replay");_&&_.flush().catch(w=>{De&&y.error(w)})}function u(){s&&s.show()}function d(){s&&s.hide()}function f(){s&&s.el&&s.el.remove()}function p(){try{if(o){o.open(),i=!0,n.onFormOpen&&n.onFormOpen(),l();return}let m=n.useSentryUser,_=ge(),w=_&&_.getUser();if(o=Wp({colorScheme:n.colorScheme,showBranding:n.showBranding,showName:n.showName||n.isNameRequired,showEmail:n.showEmail||n.isEmailRequired,isNameRequired:n.isNameRequired,isEmailRequired:n.isEmailRequired,formTitle:n.formTitle,cancelButtonLabel:n.cancelButtonLabel,submitButtonLabel:n.submitButtonLabel,emailLabel:n.emailLabel,emailPlaceholder:n.emailPlaceholder,messageLabel:n.messageLabel,messagePlaceholder:n.messagePlaceholder,nameLabel:n.nameLabel,namePlaceholder:n.namePlaceholder,isRequiredLabel:n.isRequiredLabel,defaultName:m&&w&&w[m.name]||"",defaultEmail:m&&w&&w[m.email]||"",onClosed:()=>{u(),i=!1,n.onFormClose&&n.onFormClose()},onCancel:()=>{h(),u()},onSubmit:a}),!o.el)throw new Error("Unable to open Feedback dialog");e.appendChild(o.el),d(),n.onFormOpen&&n.onFormOpen(),l()}catch(m){y.error(m)}}function h(){o&&(o.close(),i=!1,n.onFormClose&&n.onFormClose())}function g(){if(o){h();let m=o.el;m&&m.remove(),o=void 0}}function b(){i||p(),d()}return r?r.addEventListener("click",b):t&&(s=Pp({buttonLabel:n.buttonLabel,onClick:b}),s.el&&e.appendChild(s.el)),{get actor(){return s},get dialog(){return o},showActor:u,hideActor:d,removeActor:f,openDialog:p,closeDialog:h,removeDialog:g}}var Ln=Ne.document,qp=e=>new At(e),At=class e{static __initStatic(){this.id="Feedback"}constructor({autoInject:t=!0,id:n="sentry-feedback",isEmailRequired:r=!1,isNameRequired:s=!1,showBranding:o=!0,showEmail:i=!0,showName:c=!0,useSentryUser:a={email:"email",name:"username"},themeDark:l,themeLight:u,colorScheme:d="system",buttonLabel:f=mp,cancelButtonLabel:p=gp,submitButtonLabel:h=yp,formTitle:g=_p,emailPlaceholder:b=Sp,emailLabel:m=bp,messagePlaceholder:_=vp,messageLabel:w=Ep,namePlaceholder:C=wp,nameLabel:L=Ip,isRequiredLabel:I=kp,successMessageText:S=Cp,onFormClose:M,onFormOpen:$,onSubmitError:v,onSubmitSuccess:x}={}){this.name=e.id,this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1,this.options={autoInject:t,showBranding:o,id:n,isEmailRequired:r,isNameRequired:s,showEmail:i,showName:c,useSentryUser:a,colorScheme:d,themeDark:{...Xi.dark,...l},themeLight:{...Xi.light,...u},buttonLabel:f,cancelButtonLabel:p,submitButtonLabel:h,formTitle:g,emailLabel:m,emailPlaceholder:b,messageLabel:w,messagePlaceholder:_,nameLabel:L,namePlaceholder:C,isRequiredLabel:I,successMessageText:S,onFormClose:M,onFormOpen:$,onSubmitError:v,onSubmitSuccess:x}}setupOnce(){if(ut())try{this._cleanupWidgetIfExists();let{autoInject:t}=this.options;if(!t)return;this._createWidget(this.options)}catch(t){De&&y.error(t)}}openDialog(){this._widget||this._createWidget({...this.options,shouldCreateActor:!1}),this._widget&&this._widget.openDialog()}closeDialog(){this._widget&&this._widget.closeDialog()}attachTo(t,n){try{let r=Ji(this.options,n||{});return this._ensureShadowHost(r,({shadow:s})=>{let o=typeof t=="string"?Ln.querySelector(t):typeof t.addEventListener=="function"?t:null;if(!o)return De&&y.error("[Feedback] Unable to attach to target element"),null;let i=ea({shadow:s,options:r,attachTo:o});return this._widgets.add(i),this._widget||(this._widget=i),i})}catch(r){return De&&y.error(r),null}}createWidget(t){try{return this._createWidget(Ji(this.options,t||{}))}catch(n){return De&&y.error(n),null}}removeWidget(t){if(!t)return!1;try{if(this._widgets.has(t))return t.removeActor(),t.removeDialog(),this._widgets.delete(t),this._widget===t&&(this._widget=null),!0}catch(n){De&&y.error(n)}return!1}getWidget(){return this._widget}remove(){this._host&&this._host.remove(),this._initialize()}_initialize(){this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1}_cleanupWidgetIfExists(){this._host&&this.remove();let t=Ln.querySelector(`#${this.options.id}`);t&&t.remove()}_createWidget(t){return this._ensureShadowHost(t,({shadow:n})=>{let r=ea({shadow:n,options:t});return!this._hasInsertedActorStyles&&r.actor&&(n.appendChild(Rp(Ln)),this._hasInsertedActorStyles=!0),this._widgets.add(r),this._widget||(this._widget=r),r})}_ensureShadowHost(t,n){let r=!1;if(!this._shadow||!this._host){let{id:o,colorScheme:i,themeLight:c,themeDark:a}=t,{shadow:l,host:u}=Op({id:o,colorScheme:i,themeLight:c,themeDark:a});this._shadow=l,this._host=u,r=!0}this._host.dataset.sentryFeedbackColorscheme=t.colorScheme;let s=n({shadow:this._shadow,host:this._host});return r&&Ln.body.appendChild(this._host),s}};At.__initStatic();k();function Ot(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Gp(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=Ot(n);return s=>r.then(o=>s(o.transaction(t,"readwrite").objectStore(t)))}function oa(e){return Ot(e.getAllKeys())}function Vp(e,t,n){return e(r=>oa(r).then(s=>{if(!(s.length>=n))return r.put(t,Math.max(...s,0)+1),Ot(r.transaction)}))}function Yp(e){return e(t=>oa(t).then(n=>{if(n.length!==0)return Ot(t.get(n[0])).then(r=>(t.delete(n[0]),Ot(t.transaction).then(()=>r)))}))}function Kp(e){let t;function n(){return t==null&&(t=Gp(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{insert:async r=>{try{let s=await Ws(r,e.textEncoder);await Vp(n(),s,e.maxQueueSize||30)}catch{}},pop:async()=>{try{let r=await Yp(n());if(r)return zs(r,e.textEncoder||new TextEncoder,e.textDecoder||new TextDecoder)}catch{}}}}function Xp(e){return t=>e({...t,createStore:Kp})}function Jp(e){return Xp(to(e))}k();k();var ia=1e6,Dn=String(0),Zp="main",la="",ua="",da="",ds=E.navigator&&E.navigator.userAgent||"",fa="",Qp=E.navigator&&E.navigator.language||E.navigator&&E.navigator.languages&&E.navigator.languages[0]||"";function eh(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}var aa=E.navigator&&E.navigator.userAgentData;eh(aa)&&aa.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(la=e.platform||"",da=e.architecture||"",fa=e.model||"",ua=e.platformVersion||"",e.fullVersionList&&e.fullVersionList.length>0){let t=e.fullVersionList[e.fullVersionList.length-1];ds=`${t.brand} ${t.version}`}}).catch(e=>{});function th(e){return!("thread_metadata"in e)}function nh(e){return th(e)?oh(e):e}function rh(e){let t=e&&e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id;return typeof t=="string"&&t.length!==32&&T&&y.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function sh(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);let s=rh(r),o=nh(n),i=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Date.now()),c=typeof r.timestamp=="number"?r.timestamp*1e3:Date.now();return{event_id:e,timestamp:new Date(i).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Ks,runtime:{name:"javascript",version:E.navigator.userAgent},os:{name:la,version:ua,build_number:ds},device:{locale:Qp,model:fa,manufacturer:ds,architecture:da,is_emulator:!1},debug_meta:{images:ih(n.resources)},profile:o,transactions:[{name:r.transaction||"",id:r.event_id||He(),trace_id:s,active_thread_id:Dn,relative_start_ns:"0",relative_end_ns:((c-i)*1e6).toFixed(0)}]}}function Nn(e){return e.op==="pageload"}function oh(e){let t,n=0,r={samples:[],stacks:[],frames:[],thread_metadata:{[Dn]:{name:Zp}}};if(!e.samples.length)return r;let s=e.samples[0].timestamp,o=typeof performance.timeOrigin=="number"?performance.timeOrigin:dt||0,i=o-(dt||o);for(let c=0;c<e.samples.length;c++){let a=e.samples[c];if(a.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[c]={elapsed_since_start_ns:((a.timestamp+i-s)*ia).toFixed(0),stack_id:t,thread_id:Dn};continue}let l=e.stacks[a.stackId],u=[];for(;l;){u.push(l.frameId);let f=e.frames[l.frameId];r.frames[l.frameId]===void 0&&(r.frames[l.frameId]={function:f.name,abs_path:typeof f.resourceId=="number"?e.resources[f.resourceId]:void 0,lineno:f.line,colno:f.column}),l=l.parentId===void 0?void 0:e.stacks[l.parentId]}let d={elapsed_since_start_ns:((a.timestamp+i-s)*ia).toFixed(0),stack_id:n,thread_id:Dn};r.stacks[n]=u,r.samples[c]=d,n++}return r}function pa(e,t){if(!t.length)return e;for(let n of t)e[1].push([{type:"profile"},n]);return e}function ha(e){let t=[];return Us(e,(n,r)=>{if(r==="transaction")for(let s=1;s<n.length;s++){let o=n[s];o&&o.contexts&&o.contexts.profile&&o.contexts.profile.profile_id&&t.push(n[s])}}),t}var ca=new WeakMap;function ih(e){let t=be._sentryDebugIds;if(!t)return[];let n=P(),r=n&&n.getOptions(),s=r&&r.stackParser;if(!s)return[];let o,i=ca.get(s);i?o=i:(o=new Map,ca.set(s,o));let c=Object.keys(t).reduce((l,u)=>{let d,f=o.get(u);f?d=f:(d=s(u),o.set(u,d));for(let p=d.length-1;p>=0;p--){let h=d[p],g=h&&h.filename;if(h&&g){l[g]=t[u];break}}return l},{}),a=[];for(let l of e)l&&c[l]&&a.push({type:"sourcemap",code_file:l,debug_id:c[l]});return a}function ah(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(T&&y.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(T&&y.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function ch(e){return e.samples.length<2?(T&&y.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(T&&y.log("[Profiling] Discarding profile because it contains no frames"),!1)}var ma=!1,fs=3e4;function lh(e){return typeof e=="function"}function ga(){let e=E.Profiler;if(!lh(e)){T&&y.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}let t=10,n=Math.floor(fs/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{T&&(y.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),y.log("[Profiling] Disabling profiling for current user session.")),ma=!0}}function Lt(e){if(ma)return T&&y.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return T&&y.log("[Profiling] Discarding profile because transaction was not sampled."),!1;let t=P(),n=t&&t.getOptions();if(!n)return T&&y.log("[Profiling] Profiling disabled, no options found."),!1;let r=n.profilesSampleRate;return ah(r)?r?(r===!0?!0:Math.random()<r)?!0:(T&&y.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(T&&y.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(T&&y.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function ya(e,t,n,r){return ch(n)?sh(e,t,n,r):null}var Pe=new Map;function _a(){return Pe.size}function Sa(e){let t=Pe.get(e);return t&&Pe.delete(e),t}function ba(e,t){if(Pe.set(e,t),Pe.size>30){let n=Pe.keys().next().value;Pe.delete(n)}}function uh(e){return e?Lt(e)?Pn(e):e:(T&&y.log("[Profiling] Transaction is undefined, skipping profiling"),e)}function Pn(e){let t;Nn(e)&&(t=Hs()*1e3);let n=ga();if(!n)return e;T&&y.log(`[Profiling] started profiling transaction: ${ve(e).description}`);let r=He();async function s(){return!e||!n?null:n.stop().then(a=>(o&&(E.clearTimeout(o),o=void 0),T&&y.log(`[Profiling] stopped profiling of transaction: ${ve(e).description}`),a?(ba(r,a),null):(T&&y.log(`[Profiling] profiler returned null profile for: ${ve(e).description}`,"this may indicate an overlapping transaction or a call to stopProfiling with a profile title that was never started"),null))).catch(a=>(T&&y.log("[Profiling] error while stopping profiler:",a),null))}let o=E.setTimeout(()=>{T&&y.log("[Profiling] max profile duration elapsed, stopping profiling for:",ve(e).description),s()},fs),i=e.end.bind(e);function c(){return e?(s().then(()=>{e.setContext("profile",{profile_id:r,start_timestamp:t}),i()},()=>{i()}),e):i()}return e.end=c,e}k();var va="BrowserProfiling",dh=()=>({name:va,setupOnce(){},setup(e){let n=ge().getTransaction();if(n&&Nn(n)&&Lt(n)&&Pn(n),typeof e.on!="function"){y.warn("[Profiling] Client does not support hooks, profiling will be disabled");return}e.on("startTransaction",r=>{Lt(r)&&Pn(r)}),e.on("beforeEnvelope",r=>{if(!_a())return;let s=ha(r);if(!s.length)return;let o=[];for(let i of s){let c=i&&i.contexts,a=c&&c.profile&&c.profile.profile_id,l=c&&c.profile&&c.profile.start_timestamp;if(typeof a!="string"){T&&y.log("[Profiling] cannot find profile for a transaction without a profile context");continue}if(!a){T&&y.log("[Profiling] cannot find profile for a transaction without a profile context");continue}c&&c.profile&&delete c.profile;let u=Sa(a);if(!u){T&&y.log(`[Profiling] Could not retrieve profile for transaction: ${a}`);continue}let d=ya(a,l,u,i);d&&o.push(d)}pa(r,o)})}}),Ea=dh,fh=Q(va,Ea);var wa={};E.Sentry&&E.Sentry.Integrations&&(wa=E.Sentry.Integrations);var Bg={...wa,...so,...Sr};export{fr as Breadcrumbs,ht as BrowserClient,fh as BrowserProfilingIntegration,Ec as BrowserTracing,hr as Dedupe,At as Feedback,_c as FunctionToString,mr as GlobalHandlers,gr as HttpContext,Ga as Hub,yc as InboundFilters,Bg as Integrations,yr as LinkedErrors,gc as ModuleMetadata,xt as Replay,hp as ReplayCanvas,qa as SDK_VERSION,ac as SEMANTIC_ATTRIBUTE_SENTRY_OP,cc as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,ic as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,Jn as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,ja as Scope,_r as TryCatch,E as WINDOW,ue as addBreadcrumb,Zn as addEventProcessor,Ta as addGlobalEventProcessor,dc as addIntegration,lc as addTracingExtensions,en as breadcrumbsIntegration,sn as browserApiErrorsIntegration,Ea as browserProfilingIntegration,wc as browserTracingIntegration,Cc as captureConsoleIntegration,Vt as captureEvent,$e as captureException,Ra as captureMessage,Kt as captureSession,zl as captureUserFeedback,lo as chromeStackLineParser,Ua as close,Ma as configureScope,Dc as contextLinesIntegration,oc as continueTrace,pt as createTransport,cr as createUserFeedbackEnvelope,xc as debugIntegration,Tc as dedupeIntegration,Ro as defaultIntegrations,bc as defaultRequestInstrumentationOptions,po as defaultStackLineParsers,dr as defaultStackParser,$a as endSession,ir as eventFromException,ar as eventFromMessage,Jt as exceptionFromError,Rc as extraErrorDataIntegration,Xa as extractTraceparentData,qp as feedbackIntegration,Ha as flush,Bl as forceLoad,er as functionToStringIntegration,uo as geckoStackLineParser,sc as getActiveSpan,Ka as getActiveTransaction,P as getClient,Xn as getCurrentHub,ge as getCurrentScope,Mo as getDefaultIntegrations,Ya as getHubFromCarrier,tp as getReplay,Ja as getSpanStatusFromHttpCode,tn as globalHandlersIntegration,Lc as httpClientIntegration,nn as httpContextIntegration,Qn as inboundFiltersIntegration,Pl as init,vc as instrumentOutgoingRequests,za as isInitialized,Wa as lastEventId,rn as linkedErrorsIntegration,Jp as makeBrowserOfflineTransport,lr as makeFetchTransport,Va as makeMain,pc as makeMultiplexedTransport,ur as makeXHRTransport,Sc as metrics,mc as moduleMetadataIntegration,Hl as onLoad,uh as onProfilingStartRouteTransaction,ol as opera10StackLineParser,cl as opera11StackLineParser,hc as parameterize,Vi as replayCanvasIntegration,Qf as replayIntegration,Mc as reportingObserverIntegration,Ac as rewriteFramesIntegration,ra as sendFeedback,Oc as sessionTimingIntegration,Kn as setContext,fc as setCurrentClient,Oa as setExtra,Aa as setExtras,Qa as setHttpStatus,uc as setMeasurement,Da as setTag,La as setTags,Na as setUser,Fl as showReportDialog,Za as spanStatusfromHttpCode,kc as startBrowserTracingNavigationSpan,Ic as startBrowserTracingPageLoadSpan,rc as startInactiveSpan,Yt as startSession,tc as startSpan,nc as startSpanManual,Ba as startTransaction,ec as trace,fo as winjsStackLineParser,Fa as withActiveSpan,Pa as withIsolationScope,ft as withScope,Ul as wrap};
327
+ //# sourceMappingURL=esm-X34MCOT6.js.map