PageSourceSearch

https://web-static.kurobbs.com/resource/prod/assets/sentry-handler-CCDRxDqW.js

js kurobbs.com collected 2026-10-09 01:18:22 UTC 92,556 bytes, 1 lines download raw bytes

1import{be as me,bf as xr,bg as Ee,bh as Et,bi as f,bj as B,bk as R,bl as Fr,bm as k,bn as Ht,bo as ge,bp as tt,bq as Rn,br as te,bs as bt,bt as St,bu as ne,bv as re,bw as Lr,bx as Hr,by as be,bz as m,bA as w,bB as Y,bC as qe,bD as _e,bE as Ur,bF as Ge,bG as It,bH as Br,bI as jr,bJ as Ut,bK as A,bL as We,bM as kn,bN as qr,bO as wn,bP as Gr,bQ as Nn,bR as Wr,bS as Bt,bT as vt,bU as jt,bV as Yr,bW as Rt,bX as Vr,bY as nt,bZ as On,b_ as Fe,b$ as U,c0 as Se,c1 as kt,c2 as N,c3 as Te,c4 as An,c5 as $n,c6 as Cn,c7 as rt,c8 as zr,c9 as Xr,ca as Kr,cb as Jr,cc as st,cd as Le,ce as wt,cf as Nt,cg as qt,ch as Zr,ci as Qr,cj as Ot,ck as es,cl as ts,cm as ns,cn as G,co as Gt,cp as Dn,cq as rs,cr as ss,cs as Wt,ct as Yt,aq as is}from"./index-BMfzZz2f.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="9cd965ba-5a37-4632-9059-0430005cbf06",t._sentryDebugIdIdentifier="sentry-dbid-9cd965ba-5a37-4632-9059-0430005cbf06")}catch(n){}})();function as(t,e,n=250,r,s,i,a){if(!i.exception||!i.exception.values||!a||!me(a.originalException,Error))return;const o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=os(it(t,e,s,a.originalException,r,i.exception.values,o,0),n))}function it(t,e,n,r,s,i,a,o){if(i.length>=n+1)return i;let c=[...i];if(me(r[s],Error)){Vt(a,o);const d=t(e,r[s]),u=c.length;zt(d,s,u,o),c=it(t,e,n,r[s],s,[d,...c],d,u)}return Array.isArray(r.errors)&&r.errors.forEach((d,u)=>{if(me(d,Error)){Vt(a,o);const l=t(e,d),h=c.length;zt(l,"errors[".concat(u,"]"),h,o),c=it(t,e,n,d,s,[l,...c],l,h)}}),c}function Vt(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function zt(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function os(t,e){return t.map(n=>(n.value&&(n.value=xr(n.value,e)),n))}const cs=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function us(t){return t==="http"||t==="https"}function ae(t,e=!1){const{host:n,path:r,pass:s,port:i,projectId:a,protocol:o,publicKey:c}=t;return"".concat(o,"://").concat(c).concat(e&&s?":".concat(s):"")+"@".concat(n).concat(i?":".concat(i):"","/").concat(r&&"".concat(r,"/")).concat(a)}function ds(t){const e=cs.exec(t);if(!e){Ee(()=>{console.error("Invalid Sentry Dsn: ".concat(t))});return}const[n,r,s="",i,a="",o]=e.slice(1);let c="",d=o;const u=d.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),d=u.pop()),d){const l=d.match(/^\d+/);l&&(d=l[0])}return Pn({host:i,pass:s,path:c,projectId:d,port:a,protocol:n,publicKey:r})}function Pn(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function ls(t){if(!Et)return!0;const{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(a=>t[a]?!1:(f.error("Invalid Sentry Dsn: ".concat(a," missing")),!0))?!1:n.match(/^\d+$/)?us(r)?e&&isNaN(parseInt(e,10))?(f.error("Invalid Sentry Dsn: Invalid port ".concat(e)),!1):!0:(f.error("Invalid Sentry Dsn: Invalid protocol ".concat(r)),!1):(f.error("Invalid Sentry Dsn: Invalid projectId ".concat(n)),!1)}function fs(t){const e=typeof t=="string"?ds(t):Pn(t);if(!(!e||!ls(e)))return e}class D extends Error{constructor(e,n="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}const Me={},Xt={};function V(t,e){Me[t]=Me[t]||[],Me[t].push(e)}function z(t,e){Xt[t]||(e(),Xt[t]=!0)}function O(t,e){const n=t&&Me[t];if(n)for(const r of n)try{r(e)}catch(s){Et&&f.error("Error while triggering instrumentation handler.\nType: ".concat(t,"\nName: ").concat(B(r),"\nError:"),s)}}function ps(t){const e="console";V(e,t),z(e,hs)}function hs(){"console"in R&&Fr.forEach(function(t){t in R.console&&k(R.console,t,function(e){return Ht[t]=e,function(...n){O("console",{args:n,level:t});const s=Ht[t];s&&s.apply(R.console,n)}})})}const Z=R,ms=1e3;let Kt,at,ot;function gs(t){const e="dom";V(e,t),z(e,_s)}function _s(){if(!Z.document)return;const t=O.bind(null,"dom"),e=Jt(t,!0);Z.document.addEventListener("click",e,!1),Z.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{const r=Z[n]&&Z[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(k(r,"addEventListener",function(s){return function(i,a,o){if(i==="click"||i=="keypress")try{const c=this,d=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},u=d[i]=d[i]||{refCount:0};if(!u.handler){const l=Jt(t);u.handler=l,s.call(this,i,l,o)}u.refCount++}catch(c){}return s.call(this,i,a,o)}}),k(r,"removeEventListener",function(s){return function(i,a,o){if(i==="click"||i=="keypress")try{const c=this,d=c.__sentry_instrumentation_handlers__||{},u=d[i];u&&(u.refCount--,u.refCount<=0&&(s.call(this,i,u.handler,o),u.handler=void 0,delete d[i]),Object.keys(d).length===0&&delete c.__sentry_instrumentation_handlers__)}catch(c){}return s.call(this,i,a,o)}}))})}function Ts(t){if(t.type!==at)return!1;try{if(!t.target||t.target._sentryId!==ot)return!1}catch(e){}return!0}function ys(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function Jt(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=Es(n);if(ys(n.type,r))return;ge(n,"_sentryCaptured",!0),r&&!r._sentryId&&ge(r,"_sentryId",tt());
1const s=n.type==="keypress"?"input":n.type;Ts(n)||(t({event:n,name:s,global:e}),at=n.type,ot=r?r._sentryId:void 0),clearTimeout(Kt),Kt=Z.setTimeout(()=>{ot=void 0,at=void 0},ms)}}function Es(t){try{return t.target}catch(e){return null}}const ct=Rn();function Mn(){if(!("fetch"in ct))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}function ut(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function bs(){if(typeof EdgeRuntime=="string")return!0;if(!Mn())return!1;if(ut(ct.fetch))return!0;let t=!1;const e=ct.document;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=ut(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){Et&&f.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function xn(t){const e="fetch";V(e,t),z(e,Ss)}function Ss(){bs()&&k(R,"fetch",function(t){return function(...e){const{method:n,url:r}=Is(e),s={args:e,fetchData:{method:n,url:r},startTimestamp:Date.now()};return O("fetch",{...s}),t.apply(R,e).then(i=>{const a={...s,endTimestamp:Date.now(),response:i};return O("fetch",a),i},i=>{const a={...s,endTimestamp:Date.now(),error:i};throw O("fetch",a),i})}})}function dt(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Zt(t){return typeof t=="string"?t:t?dt(t,"url")?t.url:t.toString?t.toString():"":""}function Is(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[n,r]=t;return{url:Zt(n),method:dt(r,"method")?String(r.method).toUpperCase():"GET"}}const e=t[0];return{url:Zt(e),method:dt(e,"method")?String(e.method).toUpperCase():"GET"}}let we=null;function Fn(t){const e="error";V(e,t),z(e,vs)}function vs(){we=R.onerror,R.onerror=function(t,e,n,r,s){return O("error",{column:r,error:s,line:n,msg:t,url:e}),we&&!we.__SENTRY_LOADER__?we.apply(this,arguments):!1},R.onerror.__SENTRY_INSTRUMENTED__=!0}let Ne=null;function Ln(t){const e="unhandledrejection";V(e,t),z(e,Rs)}function Rs(){Ne=R.onunhandledrejection,R.onunhandledrejection=function(t){return O("unhandledrejection",t),Ne&&!Ne.__SENTRY_LOADER__?Ne.apply(this,arguments):!0},R.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Oe=Rn();function ks(){const t=Oe.chrome,e=t&&t.app&&t.app.runtime,n="history"in Oe&&!!Oe.history.pushState&&!!Oe.history.replaceState;return!e&&n}const de=R;let Ae;function At(t){const e="history";V(e,t),z(e,ws)}function ws(){if(!ks())return;const t=de.onpopstate;de.onpopstate=function(...n){const r=de.location.href,s=Ae;if(Ae=r,O("history",{from:s,to:r}),t)try{return t.apply(this,n)}catch(a){}};function e(n){return function(...r){const s=r.length>2?r[2]:void 0;if(s){const i=Ae,a=String(s);Ae=a,O("history",{from:i,to:a})}return n.apply(this,r)}}k(de.history,"pushState",e),k(de.history,"replaceState",e)}const Ns=R,Q="__sentry_xhr_v3__";function Hn(t){const e="xhr";V(e,t),z(e,Os)}function Os(){if(!Ns.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;k(t,"open",function(e){return function(...n){const r=Date.now(),s=te(n[0])?n[0].toUpperCase():void 0,i=As(n[1]);if(!s||!i)return e.apply(this,n);this[Q]={method:s,url:i,request_headers:{}},s==="POST"&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const a=()=>{const o=this[Q];if(o&&this.readyState===4){try{o.status_code=this.status}catch(d){}const c={args:[s,i],endTimestamp:Date.now(),startTimestamp:r,xhr:this};O("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?k(this,"onreadystatechange",function(o){return function(...c){return a(),o.apply(this,c)}}):this.addEventListener("readystatechange",a),k(this,"setRequestHeader",function(o){return function(...c){const[d,u]=c,l=this[Q];return l&&te(d)&&te(u)&&(l.request_headers[d.toLowerCase()]=u),o.apply(this,c)}}),e.apply(this,n)}}),k(t,"send",function(e){return function(...n){const r=this[Q];if(!r)return e.apply(this,n);n[0]!==void 0&&(r.body=n[0]);const s={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return O("xhr",s),e.apply(this,n)}})}function As(t){if(te(t))return t;try{return t.toString()}catch(e){}}function $s(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Cs(){return"npm"}function Ds(){return!$s()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function j(t,e){return t.require(e)}function Ps(t){let e;try{e=j(module,t)}catch(n){}try{const{cwd:n}=j(module,"process");e=j(module,"".concat(n(),"/node_modules/").concat(t))}catch(n){}return e}function Ms(t){const e=[];function n(){return t===void 0||e.length<t}function r(a){return e.splice(e.indexOf(a),1)[0]}function s(a){if(!n())return bt(new D("Not adding Promise because buffer limit was reached."));const o=a();return e.indexOf(o)===-1&&e.push(o),o.then(()=>r(o)).then(null,()=>r(o).then(null,()=>{})),o}function i(a){return new St((o,c)=>{let d=e.length;if(!d)return o(!0);const u=setTimeout(()=>{a&&a>0&&o(!1)},a);e.forEach(l=>{ne(l).then(()=>{--d||(clearTimeout(u),o(!0))},c)})})}return{$:e,add:s,drain:i}}function q(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}const xs=["fatal","error","warning","log","info","debug"];function Fs(t){return t==="warn"?"warning":xs.includes(t)?t:"log"}function X(t,e=[]){return[t,e]}function Ls(t,e){const[n,r]=t;return[n,[...r,e]]}function Qt(t,e){const n=t[1];for(const r of n){const s=r[0].type;if(e(r,s))return!0}return!1}function lt(t,e){return(e||new TextEncoder).encode(t)}function Hs(t,e){const[n,r]=t;let s=JSON.stringify(n);
1function i(a){typeof s=="string"?s=typeof a=="string"?s+a:[lt(s,e),a]:s.push(typeof a=="string"?lt(a,e):a)}for(const a of r){const[o,c]=a;if(i("\n".concat(JSON.stringify(o),"\n")),typeof c=="string"||c instanceof Uint8Array)i(c);else{let d;try{d=JSON.stringify(c)}catch(u){d=JSON.stringify(Lr(c))}i(d)}}return typeof s=="string"?s:Us(s)}function Us(t){const e=t.reduce((s,i)=>s+i.length,0),n=new Uint8Array(e);let r=0;for(const s of t)n.set(s,r),r+=s.length;return n}function Bs(t,e){const n=typeof t.data=="string"?lt(t.data,e):t.data;return[re({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const js={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function en(t){return js[t]}function Un(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function qs(t,e,n,r){const s=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:ae(r)},...s&&{trace:re({...s})}}}function Gs(t,e,n){const r=[{type:"client_report"},{timestamp:n||Hr(),discarded_events:t}];return X(e?{dsn:e}:{},[r])}const Ws=60*1e3;function Ys(t,e=Date.now()){const n=parseInt("".concat(t),10);if(!isNaN(n))return n*1e3;const r=Date.parse("".concat(t));return isNaN(r)?Ws:r-e}function Vs(t,e){return t[e]||t.all||0}function zs(t,e,n=Date.now()){return Vs(t,e)>n}function Xs(t,{statusCode:e,headers:n},r=Date.now()){const s={...t},i=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(i)for(const o of i.trim().split(",")){const[c,d,,,u]=o.split(":",5),l=parseInt(c,10),h=(isNaN(l)?60:l)*1e3;if(!d)s.all=r+h;else for(const p of d.split(";"))p==="metric_bucket"?(!u||u.split(";").includes("custom"))&&(s[p]=r+h):s[p]=r+h}else a?s.all=r+Ys(a,r):e===429&&(s.all=r+60*1e3);return s}function W(t){return(t||be()).getScope().getTransaction()}let tn=!1;function Ks(){tn||(tn=!0,Fn(ft),Ln(ft))}function ft(){const t=W();if(t){const e="internal_error";m&&f.log("[Tracing] Transaction: ".concat(e," -> Global error occured")),t.setStatus(e)}}ft.tag="sentry_tracingErrorCallback";var nn;(function(t){const e="ok";t.Ok=e;const n="deadline_exceeded";t.DeadlineExceeded=n;const r="unauthenticated";t.Unauthenticated=r;const s="permission_denied";t.PermissionDenied=s;const i="not_found";t.NotFound=i;const a="resource_exhausted";t.ResourceExhausted=a;const o="invalid_argument";t.InvalidArgument=o;const c="unimplemented";t.Unimplemented=c;const d="unavailable";t.Unavailable=d;const u="internal_error";t.InternalError=u;const l="unknown_error";t.UnknownError=l;const h="cancelled";t.Cancelled=h;const p="already_exists";t.AlreadyExists=p;const g="failed_precondition";t.FailedPrecondition=g;const y="aborted";t.Aborted=y;const I="out_of_range";t.OutOfRange=I;const b="data_loss";t.DataLoss=b})(nn||(nn={}));function Js(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function $t(t,e){t.setTag("http.status_code",String(e)),t.setData("http.response.status_code",e);const n=Js(e);n!=="unknown_error"&&t.setStatus(n)}function K(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const e=w(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function He(t){if(!K())return;const e=Qs(t),n=be(),r=t.scope?t.scope.getSpan():pt();if(t.onlyIfParent&&!r)return;const a=(t.scope||Y()).clone();return Zs(n,{parentSpan:r,spanContext:e,forceTransaction:t.forceTransaction,scope:a})}function pt(){return Y().getSpan()}function Zs(t,{parentSpan:e,spanContext:n,forceTransaction:r,scope:s}){if(!K())return;const i=qe();let a;if(e&&!r)a=e.startChild(n);else if(e){const o=_e(e),{traceId:c,spanId:d}=e.spanContext(),u=Ur(e);a=t.startTransaction({traceId:c,parentSpanId:d,parentSampled:u,...n,metadata:{dynamicSamplingContext:o,...n.metadata}})}else{const{traceId:o,dsc:c,parentSpanId:d,sampled:u}={...i.getPropagationContext(),...s.getPropagationContext()};a=t.startTransaction({traceId:o,parentSpanId:d,parentSampled:u,...n,metadata:{dynamicSamplingContext:c,...n.metadata}})}return s.setSpan(a),ei(a,s,i),a}function Qs(t){if(t.startTime){const e={...t};return e.startTimestamp=Ge(t.startTime),delete e.startTime,e}return t}const Bn="_sentryScope",jn="_sentryIsolationScope";function ei(t,e,n){t&&(ge(t,jn,n),ge(t,Bn,e))}function ti(t){return{scope:t[Bn],isolationScope:t[jn]}}const P="sentry.source",ee="sentry.sample_rate",$e="sentry.op",F="sentry.origin",ni="profile_id";class qn{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}}class Ye{constructor(e={}){this._traceId=e.traceId||tt(),this._spanId=e.spanId||tt().substring(16),this._startTime=e.startTimestamp||It(),this.tags=e.tags?{...e.tags}:{},this.data=e.data?{...e.data}:{},this.instrumenter=e.instrumenter||"sentry",this._attributes={},this.setAttributes({[F]:e.origin||"manual",[$e]:e.op,...e.attributes}),this._name=e.name||e.description,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.status&&(this._status=e.status),e.endTimestamp&&(this._endTime=e.endTimestamp),e.exclusiveTime!==void 0&&(this._exclusiveTime=e.exclusiveTime),this._measurements=e.measurements?{...e.measurements}:{}}get name(){return this._name||""}set name(e){this.updateName(e)}get description(){return this._name}set description(e){this._name=e}get traceId(){return this._traceId}set traceId(e){this._traceId=e}get spanId(){return this._spanId}set spanId(e){this._spanId=e}set parentSpanId(e){this._parentSpanId=e}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(e){this._sampled=e}get attributes(){return this._attributes}set attributes(e){this._attributes=e}get startTimestamp(){return this._startTime}set startTimestamp(e){this._startTime=e}get endTimestamp(){return this._endTime}set endTimestamp(e){this._endTime=e}get status(){return this._status}set status(e){this._status=e}get op(){return this._attributes[$e]}set op(e){this.setAttribute($e,e)}get origin(){return this._attributes[F]}set origin(e){this.setAttribute(F,e)}spanContext(){const{_spanId:e,_traceId:n,_sampled:r}=this;return{spanId:e,traceId:n,traceFlags:r?Br:jr}}startChild(e){const n=new Ye({...e,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);const r=Ut(this);if(n.transaction=r,m&&r){const s=e&&e.op||"< unknown op >",i=A(n).description||"< unknown name >",a=r.spanContext().spanId,o="[Tracing] Starting '".concat(s,"' span on transaction '").concat(i,"' (").concat(a,").");f.log(o),this._logMessage=o}return n}setTag(e,n){return this.tags={...this.tags,[e]:n},this}setData(e,n){return this.data={...this.data,[e]:n},this}setAttribute(e,n){n===void 0?delete this._attributes[e]:this._attributes[e]=n}setAttributes(e){Object.keys(e).forEach(n=>this.setAttribute(n,e[n]))}setStatus(e){return this._status=e,this}setHttpStatus(e){return $t(this,e),this}setName(e){this.updateName(e)}updateName(e){return this._name=e,this}isSuccess(){return this._status==="ok"}finish(e){return this.end(e)}end(e){if(this._endTime)return;const n=Ut(this);if(m&&n&&n.spanContext().spanId!==this._spanId){const r=this._logMessage;r&&f.log(r.replace("Starting","Finishing"))}this._endTime=Ge(e)}toTraceparent(){return We(this)}toContext(){return re({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(e){return this.data=e.data||{},this._name=e.name||e.description,this._endTime=e.endTimestamp,this.op=e.op,this._parentSpanId=e.parentSpanId,this._sampled=e.sampled,this._spanId=e.spanId||this._spanId,this._startTime=e.startTimestamp||this._startTime,this._status=e.status,this.tags=e.tags||{},this._traceId=e.traceId||this._traceId,this}getTraceContext(){return kn(this)}getSpanJSON(){return re({data:this._getData(),description:this._name,op:this._attributes[$e],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[F],_metrics_summary:void 0,profile_id:this._attributes[ni],exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}
1toJSON(){return this.getSpanJSON()}_getData(){const{data:e,_attributes:n}=this,r=Object.keys(e).length>0,s=Object.keys(n).length>0;if(!(!r&&!s))return r&&s?{...e,...n}:r?e:n}}class Gn extends Ye{constructor(e,n){super(e),this._contexts={},this._hub=n||be(),this._name=e.name||"",this._metadata={...e.metadata},this._trimEnd=e.trimEnd,this.transaction=this;const r=this._metadata.dynamicSamplingContext;r&&(this._frozenDynamicSamplingContext={...r})}get name(){return this._name}set name(e){this.setName(e)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[P]&&{source:this._attributes[P]},...this._attributes[ee]&&{sampleRate:this._attributes[ee]}}}set metadata(e){this._metadata=e}setName(e,n="custom"){this._name=e,this.setAttribute(P,n)}updateName(e){return this._name=e,this}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new qn(e)),this.spanRecorder.add(this)}setContext(e,n){n===null?delete this._contexts[e]:this._contexts[e]=n}setMeasurement(e,n,r=""){this._measurements[e]={value:n,unit:r}}setMetadata(e){this._metadata={...this._metadata,...e}}end(e){const n=Ge(e),r=this._finishTransaction(n);if(r)return this._hub.captureEvent(r)}toContext(){const e=super.toContext();return re({...e,name:this._name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this._name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){return _e(this)}setHub(e){this._hub=e}getProfileId(){if(this._contexts!==void 0&&this._contexts.profile!==void 0)return this._contexts.profile.profile_id}_finishTransaction(e){if(this._endTime!==void 0)return;this._name||(m&&f.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(e);const n=this._hub.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),this._sampled!==!0){m&&f.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),n&&n.recordDroppedEvent("sample_rate","transaction");return}const r=this.spanRecorder?this.spanRecorder.spans.filter(u=>u!==this&&A(u).timestamp):[];if(this._trimEnd&&r.length>0){const u=r.map(l=>A(l).timestamp).filter(Boolean);this._endTime=u.reduce((l,h)=>l>h?l:h)}const{scope:s,isolationScope:i}=ti(this),{metadata:a}=this,{source:o}=a,c={contexts:{...this._contexts,trace:kn(this)},spans:r,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...a,capturedSpanScope:s,capturedSpanIsolationScope:i,...re({dynamicSamplingContext:_e(this)})},_metrics_summary:void 0,...o&&{transaction_info:{source:o}}};return Object.keys(this._measurements).length>0&&(m&&f.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),c.measurements=this._measurements),m&&f.log("[Tracing] Finishing ".concat(this.op," transaction: ").concat(this._name,".")),c}}const xe={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},ri="finishReason",J=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class si extends qn{constructor(e,n,r,s){super(s),this._pushActivity=e,this._popActivity=n,this.transactionSpanId=r}add(e){if(e.spanContext().spanId!==this.transactionSpanId){const n=e.end;e.end=(...r)=>(this._popActivity(e.spanContext().spanId),n.apply(e,r)),A(e).timestamp===void 0&&this._pushActivity(e.spanContext().spanId)}super.add(e)}}class ii extends Gn{constructor(e,n,r=xe.idleTimeout,s=xe.finalTimeout,i=xe.heartbeatInterval,a=!1,o=!1){super(e,n),this._idleHub=n,this._idleTimeout=r,this._finalTimeout=s,this._heartbeatInterval=i,this._onScope=a,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=J[4],this._autoFinishAllowed=!o,a&&(m&&f.log("Setting idle transaction on scope. Span ID: ".concat(this.spanContext().spanId)),n.getScope().setSpan(this)),o||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=J[3],this.end())},this._finalTimeout)}end(e){const n=Ge(e);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(ri,this._finishReason),this.spanRecorder){m&&f.log("[Tracing] finishing IdleTransaction",new Date(n*1e3).toISOString(),this.op);for(const r of this._beforeFinishCallbacks)r(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanContext().spanId===this.spanContext().spanId)return!0;A(r).timestamp||(r.setStatus("cancelled"),r.end(n),m&&f.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(r,void 0,2)));const{start_timestamp:s,timestamp:i}=A(r),a=s&&s<n,o=(this._finalTimeout+this._idleTimeout)/1e3,c=i&&s&&i-s<o;if(m){const d=JSON.stringify(r,void 0,2);a?c||f.log("[Tracing] discarding Span since it finished after Transaction final timeout",d):f.log("[Tracing] discarding Span since it happened after Transaction was finished",d)}return a&&c}),m&&f.log("[Tracing] flushing IdleTransaction")}else m&&f.log("[Tracing] No active IdleTransaction");if(this._onScope){const r=this._idleHub.getScope();r.getTransaction()===this&&r.setSpan(void 0)}return super.end(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){const n=s=>{this._finished||this._pushActivity(s)},r=s=>{this._finished||this._popActivity(s)};this.spanRecorder=new si(n,r,this.spanContext().spanId,e),m&&f.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:n}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=n===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=J[5],this.end(e)))}setFinishReason(e){this._finishReason=e}sendAutoFinishSignal(){this._autoFinishAllowed||(m&&f.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=J[1],this.end(e))},this._idleTimeout)}
1_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),m&&f.log("[Tracing] pushActivity: ".concat(e)),this.activities[e]=!0,m&&f.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(m&&f.log("[Tracing] popActivity ".concat(e)),delete this.activities[e],m&&f.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){const n=It();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=J[5],this.end(n)):this._restartIdleTimeout(n+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?this._autoFinishAllowed&&(m&&f.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=J[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){m&&f.log("pinging Heartbeat -> current counter: ".concat(this._heartbeatCounter)),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function Wn(t,e,n){if(!K(e))return t.sampled=!1,t;if(t.sampled!==void 0)return t.setAttribute(ee,Number(t.sampled)),t;let r;return typeof e.tracesSampler=="function"?(r=e.tracesSampler(n),t.setAttribute(ee,Number(r))):n.parentSampled!==void 0?r=n.parentSampled:typeof e.tracesSampleRate<"u"?(r=e.tracesSampleRate,t.setAttribute(ee,Number(r))):(r=1,t.setAttribute(ee,r)),Yn(r)?r?(t.sampled=Math.random()<r,t.sampled?(m&&f.log("[Tracing] starting ".concat(t.op," transaction - ").concat(A(t).description)),t):(m&&f.log("[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ".concat(Number(r),")")),t)):(m&&f.log("[Tracing] Discarding transaction because ".concat(typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),t.sampled=!1,t):(m&&f.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)}function Yn(t){return qr(t)||!(typeof t=="number"||typeof t=="boolean")?(m&&f.warn("[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ".concat(JSON.stringify(t)," of type ").concat(JSON.stringify(typeof t),".")),!1):t<0||t>1?(m&&f.warn("[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ".concat(t,".")),!1):!0}function ai(){const e=this.getScope().getSpan();return e?{"sentry-trace":We(e)}:{}}function oi(t,e){const n=this.getClient(),r=n&&n.getOptions()||{},s=r.instrumenter||"sentry",i=t.instrumenter||"sentry";s!==i&&(m&&f.error("A transaction was started with instrumenter=`".concat(i,"`, but the SDK is configured with the `").concat(s,"` instrumenter.\nThe transaction will not be sampled. Please use the ").concat(s," instrumentation to start transactions.")),t.sampled=!1);let a=new Gn(t,this);return a=Wn(a,r,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...e}),a.isRecording()&&a.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",a),a}function rn(t,e,n,r,s,i,a,o=!1){const c=t.getClient(),d=c&&c.getOptions()||{};let u=new ii(e,t,n,r,a,s,o);return u=Wn(u,d,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...i}),u.isRecording()&&u.initSpanRecorder(d._experiments&&d._experiments.maxSpans),c&&c.emit&&c.emit("startTransaction",u),u}function Vn(){const t=wn();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=oi),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=ai),Ks())}function ci(t,e,n){const r=W();r&&r.setMeasurement(t,e,n)}function ui(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function di(t,e,n,r){const s=Un(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:ae(e)}},a="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return X(i,[a])}function li(t,e,n,r){const s=Un(n),i=t.type&&t.type!=="replay_event"?t.type:"event";ui(t,n&&n.sdk);const a=qs(t,s,r,e);return delete t.sdkProcessingMetadata,X(a,[[{type:i},t]])}const fi="7";function pi(t){const e=t.protocol?"".concat(t.protocol,":"):"",n=t.port?":".concat(t.port):"";return"".concat(e,"//").concat(t.host).concat(n).concat(t.path?"/".concat(t.path):"","/api/")}function hi(t){return"".concat(pi(t)).concat(t.projectId,"/envelope/")}function mi(t,e){return Gr({sentry_key:t.publicKey,sentry_version:fi,...e&&{sentry_client:"".concat(e.name,"/").concat(e.version)}})}function gi(t,e={}){const n=typeof e=="string"?e:e.tunnel,r=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return n||"".concat(hi(t),"?").concat(mi(t,r))}const sn=[];function _i(t){const e={};return t.forEach(n=>{const{name:r}=n,s=e[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(e[r]=n)}),Object.keys(e).map(n=>e[n])}function Ti(t){const e=t.defaultIntegrations||[],n=t.integrations;e.forEach(a=>{a.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...e,...n]:typeof n=="function"?r=Nn(n(e)):r=e;const s=_i(r),i=Ei(s,a=>a.name==="Debug");if(i!==-1){const[a]=s.splice(i,1);s.push(a)}return s}function yi(t,e){const n={};return e.forEach(r=>{r&&zn(t,r,n)}),n}function an(t,e){for(const n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function zn(t,e,n){if(n[e.name]){m&&f.log("Integration skipped because it was already installed: ".concat(e.name));return}if(n[e.name]=e,sn.indexOf(e.name)===-1&&(e.setupOnce(Wr,be),sn.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),t.on&&typeof e.preprocessEvent=="function"){const r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(s,i)=>r(s,i,t))}if(t.addEventProcessor&&typeof e.processEvent=="function"){const r=e.processEvent.bind(e),s=Object.assign((i,a)=>r(i,a,t),{id:e.name});t.addEventProcessor(s)}m&&f.log("Integration installed: ".concat(e.name))}function Ei(t,e){for(let n=0;n<t.length;n++)if(e(t[n])===!0)return n;return-1}function H(t,e){return Object.assign(function(...r){return e(...r)},{id:t})}function bi(t){let e="";for(const n of t){const r=Object.entries(n.tags),s=r.length>0?"|#".concat(r.map(([i,a])=>"".concat(i,":").concat(a)).join(",")):"";e+="".concat(n.name,"@").concat(n.unit,":").concat(n.metric,"|").concat(n.metricType).
1concat(s,"|T").concat(n.timestamp,"\n")}return e}function Si(t,e,n,r){const s={sent_at:new Date().toISOString()};n&&n.sdk&&(s.sdk={name:n.sdk.name,version:n.sdk.version}),r&&e&&(s.dsn=ae(e));const i=Ii(t);return X(s,[i])}function Ii(t){const e=bi(t);return[{type:"statsd",length:e.length},e]}const on="Not capturing exception because it's already been captured.";class vi{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=fs(e.dsn):m&&f.warn("No DSN provided, client will not send events."),this._dsn){const n=gi(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}}captureException(e,n,r){if(Bt(e)){m&&f.log(on);return}let s=n&&n.event_id;return this._process(this.eventFromException(e,n).then(i=>this._captureEvent(i,n,r)).then(i=>{s=i})),s}captureMessage(e,n,r,s){let i=r&&r.event_id;const a=On(e)?e:String(e),o=vt(e)?this.eventFromMessage(a,n,r):this.eventFromException(e,r);return this._process(o.then(c=>this._captureEvent(c,r,s)).then(c=>{i=c})),i}captureEvent(e,n,r){if(n&&n.originalException&&Bt(n.originalException)){m&&f.log(on);return}let s=n&&n.event_id;const a=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,n,a||r).then(o=>{s=o})),s}captureSession(e){typeof e.release!="string"?m&&f.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),jt(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const n=this._transport;return n?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(e).then(r=>n.flush(e).then(s=>r&&s))):ne(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(e){return this.getIntegrationByName(e)}getIntegrationByName(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(n){return m&&f.warn("Cannot retrieve integration ".concat(e.id," from the current Client")),null}}addIntegration(e){const n=this._integrations[e.name];zn(this,e,this._integrations),n||an(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=li(e,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=Ls(r,Bs(i,this._options.transportOptions&&this._options.transportOptions.textEncoder));const s=this._sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){const n=di(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(e,n,r){if(this._options.sendClientReports){const s="".concat(e,":").concat(n);m&&f.log('Adding outcome: "'.concat(s,'"')),this._outcomes[s]=this._outcomes[s]+1||1}}captureAggregateMetrics(e){m&&f.log("Flushing aggregated metrics, number of metrics: ".concat(e.length));const n=Si(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}on(e,n){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(n)}emit(e,...n){this._hooks[e]&&this._hooks[e].forEach(r=>r(...n))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=yi(this,e),an(this,e),this._integrationsInitialized=!0}_updateSessionFromEvent(e,n){let r=!1,s=!1;const i=n.exception&&n.exception.values;if(i){s=!0;for(const c of i){const d=c.mechanism;if(d&&d.handled===!1){r=!0;break}}}const a=e.status==="ok";(a&&e.errors===0||a&&r)&&(jt(e,{...r&&{status:"crashed"},errors:e.errors||Number(s||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new St(n=>{let r=0;const s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,e&&r>=e&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r,s=qe()){const i=this.getOptions(),a=Object.keys(this._integrations);return!n.integrations&&a.length>
10&&(n.integrations=a),this.emit("preprocessEvent",e,n),Yr(i,e,n,r,this,s).then(o=>{if(o===null)return o;const c={...s.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(o.contexts&&o.contexts.trace)&&c){const{traceId:u,spanId:l,parentSpanId:h,dsc:p}=c;o.contexts={trace:{trace_id:u,span_id:l,parent_span_id:h},...o.contexts};const g=p||Rt(u,this,r);o.sdkProcessingMetadata={dynamicSamplingContext:g,...o.sdkProcessingMetadata}}return o})}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(s=>s.event_id,s=>{if(m){const i=s;i.logLevel==="log"?f.log(i.message):f.warn(i)}})}_processEvent(e,n,r){const s=this.getOptions(),{sampleRate:i}=s,a=Kn(e),o=Xn(e),c=e.type||"error",d="before send for type `".concat(c,"`");if(o&&typeof i=="number"&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",e),bt(new D("Discarding event because it's not included in the random sample (sampling rate = ".concat(i,")"),"log"));const u=c==="replay_event"?"replay":c,h=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,n,r,h).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",u,e),new D("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return p;const y=ki(s,p,n);return Ri(y,d)}).then(p=>{if(p===null)throw this.recordDroppedEvent("before_send",u,e),new D("".concat(d," returned `null`, will not send event."),"log");const g=r&&r.getSession();!a&&g&&this._updateSessionFromEvent(g,p);const y=p.transaction_info;if(a&&y&&p.transaction!==e.transaction){const I="custom";p.transaction_info={...y,source:I}}return this.sendEvent(p,n),p}).then(null,p=>{throw p instanceof D?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new D("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ".concat(p)))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,n=>{m&&f.error("Error while sending event:",n)});m&&f.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map(n=>{const[r,s]=n.split(":");return{reason:r,category:s,quantity:e[n]}})}}function Ri(t,e){const n="".concat(e," must return `null` or a valid event.");if(Vr(t))return t.then(r=>{if(!nt(r)&&r!==null)throw new D(n);return r},r=>{throw new D("".concat(e," rejected with ").concat(r))});if(!nt(t)&&t!==null)throw new D(n);return t}function ki(t,e,n){const{beforeSend:r,beforeSendTransaction:s}=t;return Xn(e)&&r?r(e,n):Kn(e)&&s?s(e,n):e}function Xn(t){return t.type===void 0}function Kn(t){return t.type==="transaction"}function wi(t,e){e.debug===!0&&(m?f.enable():Ee(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Y().update(e.initialScope);const r=new t(e);Ni(r),Oi(r)}function Ni(t){const n=be().getStackTop();n.client=t,n.scope.setClient(t)}function Oi(t){t.init?t.init():t.setupIntegrations&&t.setupIntegrations()}const Ai=30;function Jn(t,e,n=Ms(t.bufferSize||Ai)){let r={};const s=a=>n.drain(a);function i(a){const o=[];if(Qt(a,(l,h)=>{const p=en(h);if(zs(r,p)){const g=cn(l,h);t.recordDroppedEvent("ratelimit_backoff",p,g)}else o.push(l)}),o.length===0)return ne();const c=X(a[0],o),d=l=>{Qt(c,(h,p)=>{const g=cn(h,p);t.recordDroppedEvent(l,en(p),g)})},u=()=>e({body:Hs(c,t.textEncoder)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&m&&f.warn("Sentry responded with status code ".concat(l.statusCode," to sent event.")),r=Xs(r,l),l),l=>{throw d("network_error"),l});return n.add(u).then(l=>l,l=>{if(l instanceof D)return m&&f.error("Skipped sending event because buffer is full."),d("queue_overflow"),ne();throw l})}return i.__sentry__baseTransport__=!0,{send:i,flush:s}}function cn(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}function $i(t,e){const n={sent_at:new Date().toISOString()};e&&(n.dsn=ae(e));const r=t.map(Ci);return X(n,r)}function Ci(t){return[{type:"span"},t]}function Di(t,e,n=[e],r="npm"){const s=t._metadata||{};s.sdk||(s.sdk={name:"sentry.javascript.".concat(e),packages:n.map(i=>({name:"".concat(r,":@sentry/").concat(i),version:Fe})),version:Fe}),t._metadata=s}const Pi=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],Mi=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],Zn="InboundFilters",xi=(t={})=>({name:Zn,setupOnce(){},processEvent(e,n,r){const s=r.getOptions(),i=Fi(t,s);return Li(e,i)?null:e}}),Qn=xi;H(Zn,Qn);function Fi(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:Pi],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:Mi],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function Li(t,e){return e.ignoreInternal&&Gi(t)?(m&&f.warn("Event dropped due to being internal Sentry Error.\nEvent: ".concat(U(t))),!0):Hi(t,e.ignoreErrors)?(m&&f.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: ".concat(U(t))),!0):Ui(t,e.ignoreTransactions)?(m&&f.warn("Event dropped due to being matched by `ignoreTransactions` option.\nEvent: ".concat(U(t))),!0):Bi(t,e.denyUrls)?(m&&f.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: ".concat(U(t),".\nUrl: ").concat(Ue(t))),!0):ji(t,e.allowUrls)?!1:(m&&f.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: ".concat(U(t),".\nUrl: ").concat(Ue(t))),!0)}function Hi(t,e){return t.type||!e||!e.length?!1:qi(t).some(n=>Se(n,e))}function Ui(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;const n=t.transaction;return n?Se(n,e):!1}function Bi(t,e){if(!e||!e.length)return!1;const n=Ue(t);return n?Se(n,e):!1}function ji(t,e){if(!e||!e.length)return!0;const n=Ue(t);return n?Se(n,e):!0}function qi(t){const e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch(r){}return n&&n.value&&(e.push(n.value),n.type&&e.push("".concat(n.type,": ").concat(n.value))),m&&e.length===0&&f.error("Could not extract message for event ".concat(U(t))),e}function Gi(t){try{return t.exception.values[0].type==="SentryError"}catch(e){}return!1}function Wi(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Ue(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch(n){}return e?Wi(e):null}catch(e){return m&&f.error("Cannot extract url for event ".concat(U(t))),null}}let un;const er="FunctionToString",dn=new WeakMap,Yi=()=>({name:er,setupOnce(){un=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=kt(this),n=dn.has(w())&&e!==void 0?e:this;return un.apply(n,t)}}catch(t){}},setup(t){dn.set(t,!0)}}),tr=Yi;H(er,tr);const E=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,_=R;function Vi(){_.document?_.document.addEventListener("visibilitychange",()=>{const t=W();if(_.document.hidden&&t){const e="cancelled",{op:n,status:r}=A(t);E&&f.log("[Tracing] Transaction: ".concat(e," -> since tab moved to the background, op: ").concat(n)),r||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.end()}}):E&&f.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const Ie=(t,e,n)=>{let r,s;return i=>{e.value>=0&&(i||n)&&(s=e.value-(r||0),(s||r===void 0)&&(r=e.value,e.delta=s,t(e)))}},zi=()=>"v3-".concat(Date.now(),"-").concat(Math.floor(Math.random()*(9e12-1))+1e12),
1Xi=()=>{const t=_.performance.timing,e=_.performance.navigation.type,n={entryType:"navigation",startTime:0,type:e==2?"back_forward":e===1?"reload":"navigate"};for(const r in t)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(t[r]-t.navigationStart,0));return n},Ve=()=>_.__WEB_VITALS_POLYFILL__?_.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||Xi()):_.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Ct=()=>{const t=Ve();return t&&t.activationStart||0},ve=(t,e)=>{const n=Ve();let r="navigate";return n&&(_.document&&_.document.prerendering||Ct()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:t,value:typeof e>"u"?-1:e,rating:"good",delta:0,entries:[],id:zi(),navigationType:r}},oe=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(s=>{e(s.getEntries())});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(r){}},Re=(t,e)=>{const n=r=>{(r.type==="pagehide"||_.document.visibilityState==="hidden")&&(t(r),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};_.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))},Ki=t=>{const e=ve("CLS",0);let n,r=0,s=[];const i=o=>{o.forEach(c=>{if(!c.hadRecentInput){const d=s[0],u=s[s.length-1];r&&s.length!==0&&c.startTime-u.startTime<1e3&&c.startTime-d.startTime<5e3?(r+=c.value,s.push(c)):(r=c.value,s=[c]),r>e.value&&(e.value=r,e.entries=s,n&&n())}})},a=oe("layout-shift",i);if(a){n=Ie(t,e);const o=()=>{i(a.takeRecords()),n(!0)};return Re(o),o}};let Be=-1;const Ji=()=>{_.document&&_.document.visibilityState&&(Be=_.document.visibilityState==="hidden"&&!_.document.prerendering?0:1/0)},Zi=()=>{Re(({timeStamp:t})=>{Be=t},!0)},Dt=()=>(Be<0&&(Ji(),Zi()),{get firstHiddenTime(){return Be}}),Qi=t=>{const e=Dt(),n=ve("FID");let r;const s=o=>{o.startTime<e.firstHiddenTime&&(n.value=o.processingStart-o.startTime,n.entries.push(o),r(!0))},i=o=>{o.forEach(s)},a=oe("first-input",i);r=Ie(t,n),a&&Re(()=>{i(a.takeRecords()),a.disconnect()},!0)};let nr=0,Xe=1/0,Ce=0;const ea=t=>{t.forEach(e=>{e.interactionId&&(Xe=Math.min(Xe,e.interactionId),Ce=Math.max(Ce,e.interactionId),nr=Ce?(Ce-Xe)/7+1:0)})};let ht;const ta=()=>ht?nr:performance.interactionCount||0,na=()=>{"interactionCount"in performance||ht||(ht=oe("event",ea,{type:"event",buffered:!0,durationThreshold:0}))},rr=()=>ta(),ln=10,x=[],Ke={},fn=t=>{const e=x[x.length-1],n=Ke[t.interactionId];if(n||x.length<ln||t.duration>e.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{const r={id:t.interactionId,latency:t.duration,entries:[t]};Ke[r.id]=r,x.push(r)}x.sort((r,s)=>s.latency-r.latency),x.splice(ln).forEach(r=>{delete Ke[r.id]})}},ra=()=>{const t=Math.min(x.length-1,Math.floor(rr()/50));return x[t]},sa=(t,e)=>{e=e||{},na();const n=ve("INP");let r;const s=a=>{a.forEach(c=>{c.interactionId&&fn(c),c.entryType==="first-input"&&!x.some(u=>u.entries.some(l=>c.duration===l.duration&&c.startTime===l.startTime))&&fn(c)});const o=ra();o&&o.latency!==n.value&&(n.value=o.latency,n.entries=o.entries,r())},i=oe("event",s,{durationThreshold:e.durationThreshold||40});r=Ie(t,n,e.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),Re(()=>{s(i.takeRecords()),n.value<0&&rr()>0&&(n.value=0,n.entries=[]),r(!0)}))},pn={},ia=t=>{const e=Dt(),n=ve("LCP");let r;const s=a=>{const o=a[a.length-1];if(o){const c=Math.max(o.startTime-Ct(),0);c<e.firstHiddenTime&&(n.value=c,n.entries=[o],r())}},i=oe("largest-contentful-paint",s);if(i){r=Ie(t,n);const a=()=>{pn[n.id]||(s(i.takeRecords()),i.disconnect(),pn[n.id]=!0,r(!0))};return["keydown","click"].forEach(o=>{_.document&&addEventListener(o,a,{once:!0,capture:!0})}),Re(a,!0),a}},mt=t=>{_.document&&(_.document.prerendering?addEventListener("prerenderingchange",()=>mt(t),!0):_.document.readyState!=="complete"?addEventListener("load",()=>mt(t),!0):setTimeout(t,0))},aa=(t,e)=>{e=e||{};const n=ve("TTFB"),r=Ie(t,n,e.reportAllChanges);mt(()=>{const s=Ve();if(s){if(n.value=Math.max(s.responseStart-Ct(),0),n.value<0||n.value>performance.now())return;n.entries=[s],r(!0)}})},fe={},je={};let sr,ir,ar,or,cr;function oa(t,e=!1){return ke("cls",t,fa,sr,e)}function ca(t,e=!1){return ke("lcp",t,ha,ar,e)}function ua(t){return ke("ttfb",t,ma,or)}
1function da(t){return ke("fid",t,pa,ir)}function la(t){return ke("inp",t,ga,cr)}function ye(t,e){return ur(t,e),je[t]||(_a(t),je[t]=!0),dr(t,e)}function ce(t,e){const n=fe[t];if(!(!n||!n.length))for(const r of n)try{r(e)}catch(s){E&&f.error("Error while triggering instrumentation handler.\nType: ".concat(t,"\nName: ").concat(B(r),"\nError:"),s)}}function fa(){return Ki(t=>{ce("cls",{metric:t}),sr=t})}function pa(){return Qi(t=>{ce("fid",{metric:t}),ir=t})}function ha(){return ia(t=>{ce("lcp",{metric:t}),ar=t})}function ma(){return aa(t=>{ce("ttfb",{metric:t}),or=t})}function ga(){return sa(t=>{ce("inp",{metric:t}),cr=t})}function ke(t,e,n,r,s=!1){ur(t,e);let i;return je[t]||(i=n(),je[t]=!0),r&&e({metric:r}),dr(t,e,s?i:void 0)}function _a(t){const e={};t==="event"&&(e.durationThreshold=0),oe(t,n=>{ce(t,{entries:n})},e)}function ur(t,e){fe[t]=fe[t]||[],fe[t].push(e)}function dr(t,e,n){return()=>{n&&n();const r=fe[t];if(!r)return;const s=r.indexOf(e);s!==-1&&r.splice(s,1)}}function Je(t){return typeof t=="number"&&isFinite(t)}function se(t,{startTimestamp:e,...n}){return e&&t.startTimestamp>e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...n})}const Ta=2147483647;function v(t){return t/1e3}function Pt(){return _&&_.addEventListener&&_.performance}let hn=0,S={},C,pe;function ya(){const t=Pt();if(t&&N){t.mark&&_.performance.mark("sentry-tracing-init");const e=Ra(),n=Ia(),r=va(),s=ka();return()=>{e(),n(),r(),s()}}return()=>{}}function Ea(){ye("longtask",({entries:t})=>{for(const e of t){const n=W();if(!n)return;const r=v(N+e.startTime),s=v(e.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s})}})}function ba(){ye("event",({entries:t})=>{for(const e of t){const n=W();if(!n)return;if(e.name==="click"){const r=v(N+e.startTime),s=v(e.duration),i={description:Te(e.target),op:"ui.interaction.".concat(e.name),origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s},a=An(e.target);a&&(i.attributes={"ui.component_name":a}),n.startChild(i)}}})}function Sa(t,e){if(Pt()&&N){const r=wa(t,e);return()=>{r()}}return()=>{}}function Ia(){return oa(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(E&&f.log("[Measurements] Adding CLS"),S.cls={value:t.value,unit:""},pe=e)},!0)}function va(){return ca(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(E&&f.log("[Measurements] Adding LCP"),S.lcp={value:t.value,unit:"millisecond"},C=e)},!0)}function Ra(){return da(({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e)return;const n=v(N),r=v(e.startTime);E&&f.log("[Measurements] Adding FID"),S.fid={value:t.value,unit:"millisecond"},S["mark.fid"]={value:n+r,unit:"second"}})}function ka(){return ua(({metric:t})=>{t.entries[t.entries.length-1]&&(E&&f.log("[Measurements] Adding TTFB"),S.ttfb={value:t.value,unit:"millisecond"})})}const mn={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function wa(t,e){return la(({metric:n})=>{if(n.value===void 0)return;const r=n.entries.find(ue=>ue.duration===n.value&&mn[ue.name]!==void 0),s=w();if(!r||!s)return;const i=mn[r.name],a=s.getOptions(),o=v(N+r.startTime),c=v(n.value),d=r.interactionId!==void 0?t[r.interactionId]:void 0;if(d===void 0)return;const{routeName:u,parentContext:l,activeTransaction:h,user:p,replayId:g}=d,y=p!==void 0?p.email||p.id||p.ip_address:void 0,I=h!==void 0?h.getProfileId():void 0,b=new Ye({startTimestamp:o,endTimestamp:o+c,op:"ui.interaction.".concat(i),name:Te(r.target),attributes:{release:a.release,environment:a.environment,transaction:u,...y!==void 0&&y!==""?{user:y}:{},...I!==void 0?{profile_id:I}:{},...g!==void 0?{replay_id:g}:{}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:"millisecond"}}}),M=xa(l,a,e);if(M&&Math.random()<M){const ue=b?$i([b],s.getDsn()):void 0,Lt=s&&s.getTransport();Lt&&ue&&Lt.send(ue).then(null,Mr=>{E&&f.error("Error while sending interaction:",Mr)});return}})}function Na(t){const e=Pt();if(!e||!_.performance.getEntries||!N)return;E&&f.log("[Tracing] Adding & adjusting spans using Performance API");const n=v(N),r=e.getEntries(),{op:s,start_timestamp:i}=A(t);
1if(r.slice(hn).forEach(a=>{const o=v(a.startTime),c=v(a.duration);if(!(t.op==="navigation"&&i&&n+o<i))switch(a.entryType){case"navigation":{Aa(t,a,n);break}case"mark":case"paint":case"measure":{Oa(t,a,o,c,n);const d=Dt(),u=a.startTime<d.firstHiddenTime;a.name==="first-paint"&&u&&(E&&f.log("[Measurements] Adding FP"),S.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&u&&(E&&f.log("[Measurements] Adding FCP"),S.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{Ca(t,a,a.name,o,c,n);break}}}),hn=Math.max(r.length-1,0),Da(t),s==="pageload"){Ma(S),["fcp","fp","lcp"].forEach(o=>{if(!S[o]||!i||n>=i)return;const c=S[o].value,d=n+v(c),u=Math.abs((d-i)*1e3),l=u-c;E&&f.log("[Measurements] Normalized ".concat(o," from ").concat(c," to ").concat(u," (").concat(l,")")),S[o].value=u});const a=S["mark.fid"];a&&S.fid&&(se(t,{description:"first input delay",endTimestamp:a.value+v(S.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:a.value}),delete S["mark.fid"]),"fcp"in S||delete S.cls,Object.keys(S).forEach(o=>{ci(o,S[o].value,S[o].unit)}),Pa(t)}C=void 0,pe=void 0,S={}}function Oa(t,e,n,r,s){const i=s+n,a=i+r;return se(t,{description:e.name,endTimestamp:a,op:e.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i}),i}function Aa(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{De(t,e,r,n)}),De(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),De(t,e,"fetch",n,"cache","domainLookupStart"),De(t,e,"domainLookup",n,"DNS"),$a(t,e,n)}function De(t,e,n,r,s,i){const a=i?e[i]:e["".concat(n,"End")],o=e["".concat(n,"Start")];!o||!a||se(t,{op:"browser",origin:"auto.browser.browser.metrics",description:s||n,startTimestamp:r+v(o),endTimestamp:r+v(a)})}function $a(t,e,n){e.responseEnd&&(se(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+v(e.requestStart),endTimestamp:n+v(e.responseEnd)}),se(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+v(e.responseStart),endTimestamp:n+v(e.responseEnd)}))}function Ca(t,e,n,r,s,i){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;const a=q(n),o={};Ze(o,e,"transferSize","http.response_transfer_size"),Ze(o,e,"encodedBodySize","http.response_content_length"),Ze(o,e,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in e&&(o["resource.render_blocking_status"]=e.renderBlockingStatus),a.protocol&&(o["url.scheme"]=a.protocol.split(":").pop()),a.host&&(o["server.address"]=a.host),o["url.same_origin"]=n.includes(_.location.origin);const c=i+r,d=c+s;se(t,{description:n.replace(_.location.origin,""),endTimestamp:d,op:e.initiatorType?"resource.".concat(e.initiatorType):"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:c,data:o})}function Da(t){const e=_.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),Je(n.rtt)&&(S["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Je(e.deviceMemory)&&t.setTag("deviceMemory","".concat(e.deviceMemory," GB")),Je(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}function Pa(t){C&&(E&&f.log("[Measurements] Adding LCP Data"),C.element&&t.setTag("lcp.element",Te(C.element)),C.id&&t.setTag("lcp.id",C.id),C.url&&t.setTag("lcp.url",C.url.trim().slice(0,200)),t.setTag("lcp.size",C.size)),pe&&pe.sources&&(E&&f.log("[Measurements] Adding CLS Data"),pe.sources.forEach((e,n)=>t.setTag("cls.source.".concat(n+1),Te(e.node))))}function Ze(t,e,n,r){const s=e[n];s!=null&&s<Ta&&(t[r]=s)}function Ma(t){const e=Ve();if(!e)return;const{responseStart:n,requestStart:r}=e;r<=n&&(E&&f.log("[Measurements] Adding TTFB Request Time"),t["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function xa(t,e,n){if(!K(e))return!1;let r;return t!==void 0&&typeof e.tracesSampler=="function"?r=e.tracesSampler({transactionContext:t,name:t.name,parentSampled:t.parentSampled,attributes:{...t.data,...t.attributes},location:_.location}):t!==void 0&&t.sampled!==void 0?r=t.sampled:typeof e.tracesSampleRate<"u"?r=e.tracesSampleRate:r=1,Yn(r)?r===!0?n:r===!1?0:r*n:(E&&f.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}function Fa(t,e,n,r,s="auto.http.browser"){if(!K()||!t.fetchData)return;const i=e(t.fetchData.url);if(t.endTimestamp&&i){const p=t.fetchData.__span;if(!p)return;const g=r[p];g&&(Ua(g,t),delete r[p]);return}const a=Y(),o=w(),{method:c,url:d}=t.fetchData,u=Ha(d),l=u?q(u).host:void 0,h=i?He({name:"".concat(c," ").concat(d),onlyIfParent:!0,attributes:{url:d,type:"fetch","http.method":c,"http.url":u,"server.address":l,[F]:s},op:"http.client"}):void 0;if(h&&(t.fetchData.__span=h.spanContext().spanId,r[h.spanContext().spanId]=h),n(t.fetchData.url)&&o){const p=t.args[0];t.args[1]=t.args[1]||{};const g=t.args[1];g.headers=La(p,o,a,g,h)}return h}function La(t,e,n,r,s){const i=s||n.getSpan(),a=qe(),{traceId:o,spanId:c,sampled:d,dsc:u}={...a.getPropagationContext(),...n.getPropagationContext()},l=i?We(i):$n(o,c,d),h=Cn(u||(i?_e(i):Rt(o,e,n))),p=r.headers||(typeof Request<"u"&&me(t,Request)?t.headers:void 0);if(p)if(typeof Headers<"u"&&me(p,Headers)){const g=new Headers(p);return g.append("sentry-trace",l),h&&g.append(rt,h),g}else if(Array.isArray(p)){const g=[...p,["sentry-trace",l]];return h&&g.push([rt,h]),g}else{const g="baggage"in p?p.baggage:void 0,y=[];return Array.isArray(g)?y.push(...g):g&&y.push(g),h&&y.push(h),{...p,"sentry-trace":l,baggage:y.length>0?y.join(","):void 0}}else return{"sentry-trace":l,baggage:h}}function Ha(t){try{return new URL(t).href}catch(e){return}}function Ua(t,e){if(e.response){$t(t,e.response.status);const n=e.response&&e.response.headers&&e.response.headers.get("content-length");if(n){const r=parseInt(n);r>0&&t.setAttribute("http.response_content_length",r)}}else e.error&&t.setStatus("internal_error");t.end()}const gt=["localhost",/^\/(?!\/)/],_t={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:gt,tracePropagationTargets:gt};function Ba(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:r,tracingOrigins:s,shouldCreateSpanForRequest:i,enableHTTPTimings:a}={traceFetch:_t.traceFetch,traceXHR:_t.traceXHR,...t},o=typeof i=="function"?i:u=>!0,c=u=>Wa(u,r||s),d={};e&&xn(u=>{const l=Fa(u,o,c,d);if(l){const h=lr(u.fetchData.url),p=h?q(h).host:void 0;l.setAttributes({"http.url":h,"server.address":p})}a&&l&&gn(l)}),n&&Hn(u=>{const l=Ya(u,o,c,d);a&&l&&gn(l)})}function ja(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function gn(t){const{url:e}=A(t).data||{};if(!e||typeof e!="string")return;const n=ye("resource",({entries:r})=>{r.forEach(s=>
1{ja(s)&&s.name.endsWith(e)&&(Ga(s).forEach(a=>t.setAttribute(...a)),setTimeout(n))})})}function qa(t){let e="unknown",n="unknown",r="";for(const s of t){if(s==="/"){[e,n]=t.split("/");break}if(!isNaN(Number(s))){e=r==="h"?"http":r,n=t.split(r)[1];break}r+=s}return r===t&&(e=r),{name:e,version:n}}function $(t=0){return((N||performance.timeOrigin)+t)/1e3}function Ga(t){const{name:e,version:n}=qa(t.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",e]),N?[...r,["http.request.redirect_start",$(t.redirectStart)],["http.request.fetch_start",$(t.fetchStart)],["http.request.domain_lookup_start",$(t.domainLookupStart)],["http.request.domain_lookup_end",$(t.domainLookupEnd)],["http.request.connect_start",$(t.connectStart)],["http.request.secure_connection_start",$(t.secureConnectionStart)],["http.request.connection_end",$(t.connectEnd)],["http.request.request_start",$(t.requestStart)],["http.request.response_start",$(t.responseStart)],["http.request.response_end",$(t.responseEnd)]]:r}function Wa(t,e){return Se(t,e||gt)}function Ya(t,e,n,r){const s=t.xhr,i=s&&s[Q];if(!K()||!s||s.__sentry_own_request__||!i)return;const a=e(i.url);if(t.endTimestamp&&a){const p=s.__sentry_xhr_span_id__;if(!p)return;const g=r[p];g&&i.status_code!==void 0&&($t(g,i.status_code),g.end(),delete r[p]);return}const o=Y(),c=qe(),d=lr(i.url),u=d?q(d).host:void 0,l=a?He({name:"".concat(i.method," ").concat(i.url),onlyIfParent:!0,attributes:{type:"xhr","http.method":i.method,"http.url":d,url:i.url,"server.address":u,[F]:"auto.http.browser"},op:"http.client"}):void 0;l&&(s.__sentry_xhr_span_id__=l.spanContext().spanId,r[s.__sentry_xhr_span_id__]=l);const h=w();if(s.setRequestHeader&&n(i.url)&&h){const{traceId:p,spanId:g,sampled:y,dsc:I}={...c.getPropagationContext(),...o.getPropagationContext()},b=l?We(l):$n(p,g,y),M=Cn(I||(l?_e(l):Rt(p,h,o)));Va(s,b,M)}return l}function Va(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader(rt,n)}catch(r){}}function lr(t){try{return new URL(t,_.location.origin).href}catch(e){return}}function za(t,e=!0,n=!0){if(!_||!_.location){E&&f.warn("Could not initialize routing instrumentation due to invalid location");return}let r=_.location.href,s;e&&(s=t({name:_.location.pathname,startTimestamp:N?N/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&At(({to:i,from:a})=>{if(a===void 0&&r&&r.indexOf(i)!==-1){r=void 0;return}a!==i&&(r=void 0,s&&(E&&f.log("[Tracing] Finishing current transaction with op: ".concat(s.op)),s.end()),s=t({name:_.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}const Xa="BrowserTracing",Ka={...xe,markBackgroundTransactions:!0,routingInstrumentation:za,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},..._t},_n=10;let Ja=class{constructor(e){this.name=Xa,this._hasSetTracePropagationTargets=!1,Vn(),E&&(this._hasSetTracePropagationTargets=!!(e&&(e.tracePropagationTargets||e.tracingOrigins))),this.options={...Ka,...e},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=ya(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&Sa(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&Ea(),this.options._experiments.enableInteractions&&ba(),this._latestRoute={name:void 0,context:void 0}}setupOnce(e,n){this._getCurrentHub=n;const s=n().getClient(),i=s&&s.getOptions(),{routingInstrumentation:a,startTransactionOnLocationChange:o,startTransactionOnPageLoad:c,markBackgroundTransactions:d,traceFetch:u,traceXHR:l,shouldCreateSpanForRequest:h,enableHTTPTimings:p,_experiments:g}=this.options,y=i&&i.tracePropagationTargets,I=y||this.options.tracePropagationTargets;E&&this._hasSetTracePropagationTargets&&y&&f.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),a(b=>{const M=this._createRouteTransaction(b);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(M,b,n),M},c,o),d&&Vi(),g.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),Ba({traceFetch:u,traceXHR:l,tracePropagationTargets:I,shouldCreateSpanForRequest:h,enableHTTPTimings:p})}_createRouteTransaction(e){if(!this._getCurrentHub){E&&f.warn("[Tracing] Did not create ".concat(e.op," transaction because _getCurrentHub is invali
1d."));return}const n=this._getCurrentHub(),{beforeNavigate:r,idleTimeout:s,finalTimeout:i,heartbeatInterval:a}=this.options,o=e.op==="pageload";let c;if(o){const p=o?Tn("sentry-trace"):"",g=o?Tn("baggage"):void 0,{traceId:y,dsc:I,parentSpanId:b,sampled:M}=zr(p,g);c={traceId:y,parentSpanId:b,parentSampled:M,...e,metadata:{...e.metadata,dynamicSamplingContext:I},trimEnd:!0}}else c={trimEnd:!0,...e};const d=typeof r=="function"?r(c):c,u=d===void 0?{...c,sampled:!1}:d;u.metadata=u.name!==c.name?{...u.metadata,source:"custom"}:u.metadata,this._latestRoute.name=u.name,this._latestRoute.context=u,u.sampled===!1&&E&&f.log("[Tracing] Will not send ".concat(u.op," transaction because of beforeNavigate.")),E&&f.log("[Tracing] Starting ".concat(u.op," transaction on scope"));const{location:l}=_,h=rn(n,u,s,i,!0,{location:l},a,o);return o&&_.document&&(_.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(_.document.readyState)&&h.sendAutoFinishSignal()}),["interactive","complete"].includes(_.document.readyState)&&h.sendAutoFinishSignal()),h.registerBeforeFinishCallback(p=>{this._collectWebVitals(),Na(p)}),h}_registerInteractionListener(){let e;const n=()=>{const{idleTimeout:r,finalTimeout:s,heartbeatInterval:i}=this.options,a="ui.action.click",o=W();if(o&&o.op&&["navigation","pageload"].includes(o.op)){E&&f.warn("[Tracing] Did not create ".concat(a," transaction because a pageload or navigation transaction is in progress."));return}if(e&&(e.setFinishReason("interactionInterrupted"),e.end(),e=void 0),!this._getCurrentHub){E&&f.warn("[Tracing] Did not create ".concat(a," transaction because _getCurrentHub is invalid."));return}if(!this._latestRoute.name){E&&f.warn("[Tracing] Did not create ".concat(a," transaction because _latestRouteName is missing."));return}const c=this._getCurrentHub(),{location:d}=_,u={name:this._latestRoute.name,op:a,trimEnd:!0,data:{[P]:this._latestRoute.context?Za(this._latestRoute.context):"url"}};e=rn(c,u,r,s,!0,{location:d},i)};["click"].forEach(r=>{_.document&&addEventListener(r,n,{once:!1,capture:!0})})}_registerInpInteractionListener(){const e=({entries:n})=>{const r=w(),s=r!==void 0&&r.getIntegrationByName!==void 0?r.getIntegrationByName("Replay"):void 0,i=s!==void 0?s.getReplayId():void 0,a=W(),o=Y(),c=o!==void 0?o.getUser():void 0;n.forEach(d=>{if(Qa(d)){const u=d.interactionId;if(u===void 0)return;const l=this._interactionIdToRouteNameMapping[u],h=d.duration,p=d.startTime,g=Object.keys(this._interactionIdToRouteNameMapping),y=g.length>0?g.reduce((I,b)=>this._interactionIdToRouteNameMapping[I].duration<this._interactionIdToRouteNameMapping[b].duration?I:b):void 0;if(d.entryType==="first-input"&&g.map(b=>this._interactionIdToRouteNameMapping[b]).some(b=>b.duration===h&&b.startTime===p)||!u)return;if(l)l.duration=Math.max(l.duration,h);else if(g.length<_n||y===void 0||h>this._interactionIdToRouteNameMapping[y].duration){const I=this._latestRoute.name,b=this._latestRoute.context;I&&b&&(y&&Object.keys(this._interactionIdToRouteNameMapping).length>=_n&&delete this._interactionIdToRouteNameMapping[y],this._interactionIdToRouteNameMapping[u]={routeName:I,duration:h,parentContext:b,user:c,activeTransaction:a,replayId:i,startTime:p})}}})};ye("event",e),ye("first-input",e)}};function Tn(t){const e=Xr("meta[name=".concat(t,"]"));return e?e.getAttribute("content"):void 0}function Za(t){const e=t.attributes&&t.attributes[P],n=t.data&&t.data[P],r=t.metadata&&t.metadata.source;return e||n||r}function Qa(t){return"duration"in t}function eo(){const t=wn();if(!t.__SENTRY__)return;const e={mongodb(){const r=j(module,"./node/integrations/mongo");return new r.Mongo},mongoose(){const r=j(module,"./node/integrations/mongo");return new r.Mongo},mysql(){const r=j(module,"./node/integrations/mysql");return new r.Mysql},pg(){const r=j(module,"./node/integrations/postgres");return new r.Postgres}},n=Object.keys(e).filter(r=>!!Ps(r)).map(r=>{try{return e[r]()}catch(s){return}}).filter(r=>r);n.length>0&&(t.__SENTRY__.integrations=[...t.__SENTRY__.integrations||[],...n])}function to(){Vn(),Ds()&&eo()}const T=R;let Tt=0;function fr(){return Tt>0}function no(){Tt++,setTimeout(()=>{Tt--})}function ie(t,e={}
1,n){if(typeof t!="function")return t;try{const s=t.__sentry_wrapped__;if(s)return s;if(kt(t))return t}catch(s){return t}const r=function(){const s=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);const i=s.map(a=>ie(a,e));return t.apply(this,i)}catch(i){throw no(),Jr(a=>{a.addEventProcessor(o=>(e.mechanism&&(st(o,void 0,void 0),Le(o,e.mechanism)),o.extra={...o.extra,arguments:s},o)),wt(i)}),i}};try{for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}catch(s){}Kr(r,t),ge(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch(s){}return r}const L=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function pr(t,e){const n=Mt(t,e),r={type:e&&e.name,value:ao(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function ro(t,e,n,r){const s=w(),i=s&&s.getOptions().normalizeDepth,a={exception:{values:[{type:Ot(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:uo(e,{isUnhandledRejection:r})}]},extra:{__serialized__:es(e,i)}};if(n){const o=Mt(t,n);o.length&&(a.exception.values[0].stacktrace={frames:o})}return a}function Qe(t,e){return{exception:{values:[pr(t,e)]}}}function Mt(t,e){const n=e.stacktrace||e.stack||"",r=io(e);try{return t(n,r)}catch(s){}return[]}const so=/Minified React error #\d+;/i;function io(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(so.test(t.message))return 1}return 0}function ao(t){const e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function oo(t,e,n,r){const s=n&&n.syntheticException||void 0,i=xt(t,e,s,r);return Le(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),ne(i)}function co(t,e,n="info",r,s){const i=r&&r.syntheticException||void 0,a=yt(t,e,i,s);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),ne(a)}function xt(t,e,n,r,s){let i;if(Nt(e)&&e.error)return Qe(t,e.error);if(qt(e)||Zr(e)){const a=e;if("stack"in e)i=Qe(t,e);else{const o=a.name||(qt(a)?"DOMError":"DOMException"),c=a.message?"".concat(o,": ").concat(a.message):o;i=yt(t,c,n,r),st(i,c)}return"code"in a&&(i.tags={...i.tags,"DOMException.code":"".concat(a.code)}),i}return Qr(e)?Qe(t,e):nt(e)||Ot(e)?(i=ro(t,e,n,s),Le(i,{synthetic:!0}),i):(i=yt(t,e,n,r),st(i,"".concat(e),void 0),Le(i,{synthetic:!0}),i)}function yt(t,e,n,r){const s={};if(r&&n){const i=Mt(t,n);i.length&&(s.exception={values:[{value:e,stacktrace:{frames:i}}]})}if(On(e)){const{__sentry_template_string__:i,__sentry_template_values__:a}=e;return s.logentry={message:i,params:a},s}return s.message=e,s}function uo(t,{isUnhandledRejection:e}){const n=ts(t),r=e?"promise rejection":"exception";if(Nt(t))return"Event `ErrorEvent` captured as ".concat(r," with message `").concat(t.message,"`");if(Ot(t)){const s=lo(t);return"Event `".concat(s,"` (type=").concat(t.type,") captured as ").concat(r)}return"Object captured as ".concat(r," with keys: ").concat(n)}function lo(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch(e){}}function fo(t,{metadata:e,tunnel:n,dsn:r}){const s={event_id:t.event_id,sent_at:new Date().toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:ae(r)}},i=po(t);return X(s,[i])}function po(t){return[{type:"user_report"},t]}class ho extends vi{constructor(e){const n=T.SENTRY_SDK_SOURCE||Cs();Di(e,"browser",["browser"],n),super(e),e.sendClientReports&&T.document&&T.document.addEventListener("visibilitychange",()=>{T.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return oo(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return co(this._options.stackParser,e,n,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){L&&f.warn("SDK not enabled, will not capture user feedback.");return}const n=fo(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){const e=this._clearOutcomes();if(e.length===0){L&&f.log("No outcomes to send");return}if(!this._dsn){L&&f.log("No dsn provided, will not send outcomes");return}L&&f.log("Sending outcomes:",e);const n=Gs(e,this._options.tunnel&&ae(this._dsn));this._sendEnvelope(n)}}let le;function mo(){if(le)return le;if(ut(T.fetch))return le=T.fetch.bind(T);const t=T.document;let e=T.fetch;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(n){L&&f.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n
1)}return le=e.bind(T)}function go(){le=void 0}function _o(t,e=mo()){let n=0,r=0;function s(i){const a=i.body.length;n+=a,r++;const o={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};try{return e(t.url,o).then(c=>(n-=a,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return go(),n-=a,r--,bt(c)}}return Jn(t,s)}const To=4;function yo(t){function e(n){return new St((r,s)=>{const i=new XMLHttpRequest;i.onerror=s,i.onreadystatechange=()=>{i.readyState===To&&r({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",t.url);for(const a in t.headers)Object.prototype.hasOwnProperty.call(t.headers,a)&&i.setRequestHeader(a,t.headers[a]);i.send(n.body)})}return Jn(t,e)}const ze="?",Eo=30,bo=40,So=50;function Ft(t,e,n,r){const s={filename:t,function:e,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Io=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,vo=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ro=t=>{const e=Io.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){const i=vo.exec(e[2]);i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3])}const[r,s]=hr(e[1]||ze,e[2]);return Ft(s,r,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},ko=[Eo,Ro],wo=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,No=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Oo=t=>{const e=wo.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const i=No.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],s=e[1]||ze;return[s,r]=hr(s,r),Ft(r,s,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Ao=[So,Oo],$o=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Co=t=>{const e=$o.exec(t);return e?Ft(e[2],e[1]||ze,+e[3],e[4]?+e[4]:void 0):void 0},Do=[bo,Co],Po=[ko,Ao,Do],Mo=ns(...Po),hr=(t,e)=>{const n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:ze,n?"safari-extension:".concat(e):"safari-web-extension:".concat(e)]:[t,e]},Pe=1024,mr="Breadcrumbs",xo=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:mr,setupOnce(){},setup(n){e.console&&ps(Ho(n)),e.dom&&gs(Lo(n,e.dom)),e.xhr&&Hn(Uo(n)),e.fetch&&xn(Bo(n)),e.history&&At(jo(n)),e.sentry&&n.on&&n.on("beforeSendEvent",Fo(n))}}},gr=xo;H(mr,gr);function Fo(t){return function(n){w()===t&&G({category:"sentry.".concat(n.type==="transaction"?"transaction":"event"),event_id:n.event_id,level:n.level,message:U(n)},{event:n})}}function Lo(t,e){return function(r){if(w()!==t)return;let s,i,a=typeof e=="object"?e.serializeAttribute:void 0,o=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;o&&o>Pe&&(L&&f.warn("`dom.maxStringLength` cannot exceed ".concat(Pe,", but a value of ").concat(o," was configured. Sentry will use ").concat(Pe," instead.")),o=Pe),typeof a=="string"&&(a=[a]);try{const d=r.event,u=qo(d)?d.target:d;s=Te(u,{keyAttrs:a,maxStringLength:o}),i=An(u)}catch(d){s="<unknown>"}if(s.length===0)return;const c={category:"ui.".concat(r.name),message:s};i&&(c.data={"ui.component_name":i}),G(c,{event:r.event,name:r.name,global:r.global})}}function Ho(t){return function(n){if(w()!==t)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Fs(n.level),message:Gt(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message="Assertion failed: ".concat(Gt(n.args.slice(1)," ")||"console.assert"),r.data.arguments=n.args.slice(1);else return;G(r,{input:n.args,level:n.level})}}function Uo(t){return function(n){if(w()!==t)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[Q];if(!r||!s||!i)return;const{method:a,url:o,status_code:c,body:d}=i,u={method:a,url:o,status_code:c},l={xhr:n.xhr,input:d,startTimestamp:r,endTimestamp:s};G({category:"xhr",data:u,type:"http"},l)}}function Bo(t){return function(n){if(w()!==t)return;const{startTimestamp:r,endTimestamp:s}=n;
1if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i=n.fetchData,a={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};G({category:"fetch",data:i,level:"error",type:"http"},a)}else{const i=n.response,a={...n.fetchData,status_code:i&&i.status},o={input:n.args,response:i,startTimestamp:r,endTimestamp:s};G({category:"fetch",data:a,type:"http"},o)}}}function jo(t){return function(n){if(w()!==t)return;let r=n.from,s=n.to;const i=q(T.location.href);let a=r?q(r):void 0;const o=q(s);(!a||!a.path)&&(a=i),i.protocol===o.protocol&&i.host===o.host&&(s=o.relative),i.protocol===a.protocol&&i.host===a.host&&(r=a.relative),G({category:"navigation",data:{from:r,to:s}})}}function qo(t){return!!t&&!!t.target}const _r="Dedupe",Go=()=>{let t;return{name:_r,setupOnce(){},processEvent(e){if(e.type)return e;try{if(Wo(e,t))return L&&f.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(n){}return t=e}}},Tr=Go;H(_r,Tr);function Wo(t,e){return e?!!(Yo(t,e)||Vo(t,e)):!1}function Yo(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Er(t,e)||!yr(t,e))}function Vo(t,e){const n=yn(e),r=yn(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Er(t,e)||!yr(t,e))}function yr(t,e){let n=En(t),r=En(e);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++){const i=r[s],a=n[s];if(i.filename!==a.filename||i.lineno!==a.lineno||i.colno!==a.colno||i.function!==a.function)return!1}return!0}function Er(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch(s){return!1}}function yn(t){return t.exception&&t.exception.values&&t.exception.values[0]}function En(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(n){return}}const br="GlobalHandlers",zo=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:br,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(Xo(n),bn("onerror")),e.onunhandledrejection&&(Ko(n),bn("onunhandledrejection"))}}},Sr=zo;H(br,Sr);function Xo(t){Fn(e=>{const{stackParser:n,attachStacktrace:r}=vr();if(w()!==t||fr())return;const{msg:s,url:i,line:a,column:o,error:c}=e,d=c===void 0&&te(s)?Qo(s,i,a,o):Ir(xt(n,c||s,void 0,r,!1),i,a,o);d.level="error",Dn(d,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Ko(t){Ln(e=>{const{stackParser:n,attachStacktrace:r}=vr();if(w()!==t||fr())return;const s=Jo(e),i=vt(s)?Zo(s):xt(n,s,void 0,r,!0);i.level="error",Dn(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Jo(t){if(vt(t))return t;const e=t;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(n){}return t}function Zo(t){return{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: ".concat(String(t))}]}}}function Qo(t,e,n,r){const s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let i=Nt(t)?t.message:t,a="Error";const o=i.match(s);return o&&(a=o[1],i=o[2]),Ir({exception:{values:[{type:a,value:i}]}},e,n,r)}function Ir(t,e,n,r){const s=t.exception=t.exception||{},i=s.values=s.values||[],a=i[0]=i[0]||{},o=a.stacktrace=a.stacktrace||{},c=o.frames=o.frames||[],d=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,l=te(e)&&e.length>0?e:rs();return c.length===0&&c.push({colno:d,filename:l,function:"?",in_app:!0,lineno:u}),t}function bn(t){L&&f.log("Global Handler attached: ".concat(t))}function vr(){const t=w();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Rr="HttpContext",ec=()=>({name:Rr,setupOnce(){},preprocessEvent(t){if(!T.navigator&&!T.location&&!T.document)return;const e=t.request&&t.request.url||T.location&&T.location.href,{referrer:n}=T.document||{},{userAgent:r}=T.navigator||{},s={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...t.request,...e&&{url:e},headers:s};t.request=i}}),kr=ec;H(Rr,kr);const tc="cause",nc=5,wr="LinkedErrors",rc=(t={})=>{const e=t.limit||nc,n=t.key||tc;return{name:wr,setupOnce(){},preprocessEvent(r,s,i){const a=i.getOptions();as(pr,a.stackParser,a.maxValueLength,n,e,r,s)}}},Nr=rc;H(wr,Nr);const sc=["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"],Or="TryCatch",ic=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:Or,setupOnce(){e.setTimeout&&k(T,"setTimeout",Sn),e.setInterval&&k(T,"setInterval",Sn),e.requestAnimationFrame&&k(T,"requestAnimationFrame",ac),e.XMLHttpRequest&&"XMLHttpRequest"in T&&k(XMLHttpRequest.prototype,"send",oc);const n=e.eventTarget;
1n&&(Array.isArray(n)?n:sc).forEach(cc)}}},Ar=ic;H(Or,Ar);function Sn(t){return function(...e){const n=e[0];return e[0]=ie(n,{mechanism:{data:{function:B(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function ac(t){return function(e){return t.apply(this,[ie(e,{mechanism:{data:{function:"requestAnimationFrame",handler:B(t)},handled:!1,type:"instrument"}})])}}function oc(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&k(n,s,function(i){const a={mechanism:{data:{function:s,handler:B(i)},handled:!1,type:"instrument"}},o=kt(i);return o&&(a.mechanism.data.handler=B(o)),ie(i,a)})}),t.apply(this,e)}}function cc(t){const e=T,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(k(n,"addEventListener",function(r){return function(s,i,a){try{typeof i.handleEvent=="function"&&(i.handleEvent=ie(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:B(i),target:t},handled:!1,type:"instrument"}}))}catch(o){}return r.apply(this,[s,ie(i,{mechanism:{data:{function:"addEventListener",handler:B(i),target:t},handled:!1,type:"instrument"}}),a])}}),k(n,"removeEventListener",function(r){return function(s,i,a){const o=i;try{const c=o&&o.__sentry_wrapped__;c&&r.call(this,s,c,a)}catch(c){}return r.call(this,s,o,a)}}))}const uc=[Qn(),tr(),Ar(),gr(),Sr(),Nr(),Tr(),kr()];function $r(t){return[...uc]}function dc(t={}){t.defaultIntegrations===void 0&&(t.defaultIntegrations=$r()),t.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(t.release=__SENTRY_RELEASE__),T.SENTRY_RELEASE&&T.SENTRY_RELEASE.id&&(t.release=T.SENTRY_RELEASE.id)),t.autoSessionTracking===void 0&&(t.autoSessionTracking=!0),t.sendClientReports===void 0&&(t.sendClientReports=!0);const e={...t,stackParser:ss(t.stackParser||Mo),integrations:Ti(t),transport:t.transport||(Mn()?_o:yo)};wi(ho,e),t.autoSessionTracking&&lc()}function lc(){if(typeof T.document>"u"){L&&f.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}Wt({ignoreDuration:!0}),Yt(),At(({from:t,to:e})=>{t!==void 0&&t!==e&&(Wt({ignoreDuration:!0}),Yt())})}const Cr=["activate","mount","update"],fc=/(?:^|[-_])(\w)/g,pc=t=>t.replace(fc,e=>e.toUpperCase()).replace(/[-_]/g,""),hc="<Root>",et="<Anonymous>",mc=(t,e)=>t.repeat?t.repeat(e):t,he=(t,e)=>{if(!t)return et;if(t.$root===t)return hc;if(!t.$options)return et;const n=t.$options;let r=n.name||n._componentTag;const s=n.__file;if(!r&&s){const i=s.match(/([^/\\]+)\.vue$/);i&&(r=i[1])}return(r?"<".concat(pc(r),">"):et)+(s&&e!==!1?" at ".concat(s):"")},gc=t=>{if(t&&(t._isVue||t.__isVue)&&t.$parent){const e=[];let n=0;for(;t;){if(e.length>0){const s=e[e.length-1];if(s.constructor===t.constructor){n++,t=t.$parent;continue}else n>0&&(e[e.length-1]=[s,n],n=0)}e.push(t),t=t.$parent}const r=e.map((s,i)=>"".concat((i===0?"---> ":mc(" ",5+i*2))+(Array.isArray(s)?"".concat(he(s[0]),"... (").concat(s[1]," recursive calls)"):he(s)))).join("\n");return"\n\nfound in\n\n".concat(r)}return"\n\n(found in ".concat(he(t),")")},_c=(t,e)=>{const{errorHandler:n,warnHandler:r,silent:s}=t.config;t.config.errorHandler=(i,a,o)=>{const c=he(a,!1),d=a?gc(a):"",u={componentName:c,lifecycleHook:o,trace:d};if(e.attachProps&&a&&(a.$options&&a.$options.propsData?u.propsData=a.$options.propsData:a.$props&&(u.propsData=a.$props)),setTimeout(()=>{wt(i,{captureContext:{contexts:{vue:u}},mechanism:{handled:!1}})}),typeof n=="function"&&n.call(t,i,a,o),e.logErrors){const l=typeof console<"u",h="Error in ".concat(o,': "').concat(i&&i.toString(),'"');r?r.call(null,h,a,d):l&&!s&&Ee(()=>{console.error("[Vue warn]: ".concat(h).concat(d))})}}},Tc=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,In="ui.vue",yc={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function Ec(){return Y().getTransaction()}function bc(t,e,n){t.$_sentryRootSpanTimer&&clearTimeout(t.$_sentryRootSpanTimer),t.$_sentryRootSpanTimer=setTimeout(()=>{t.$root&&t.$root.$_sentryRootSpan&&(t.$root.$_sentryRootSpan.end(e),t.$root.$_sentryRootSpan=void 0)},n)}const Sc=t=>{const e=(t.hooks||[]).concat(Cr).filter((r,s,i)=>i.indexOf(r)===s),n={};for(const r of e){const s=yc[r];if(!s){Tc&&f.warn("Unknown hook: ".concat(r));continue}for(const i of s)n[i]=function(){const a=this.$root===this;a&&pt()&&(this.$_sentryRootSpan=this.$_sentryRootSpan||He({name:"Application Render",op:"".concat(In,".render"),origin:"auto.ui.vue"}));const o=he(this,!1),c=Array.isArray(t.trackComponents)?t.trackComponents.indexOf(o)>-1:t.trackComponents;if(!(!a&&!c))if(this.$_sentrySpans=this.$_sentrySpans||{},i==s[0]){if(this.$root&&this.$root.$_sentryRootSpan||pt()){const u=this.$_sentrySpans[r];u&&u.end(),this.$_sentrySpans[r]=He({name:"Vue <".concat(o,">"),op:"".concat(In,".").concat(r),origin:"auto.ui.vue"})}}else{const d=this.$_sentrySpans[r];if(!d)return;d.end(),bc(this,It(),t.timeout)}}}return n},Ic=R,vc={Vue:Ic.Vue,attachProps:!0,logErrors:!0,hooks:Cr,timeout:2e3,trackComponents:!1},Dr="Vue",Rc=(t={})=>({name:Dr,setupOnce(){},setup(e){kc(e,t)}}),Pr=Rc;H(Dr,Pr);function kc(t,e){const n={...vc,...t.getOptions(),...e};if(!n.Vue&&!n.app){Ee(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured.\nUpdate your `Sentry.init` call with an appropriate config option:\n`app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).")});return}
1n.app?Nn(n.app).forEach(s=>vn(s,n)):n.Vue&&vn(n.Vue,n)}const vn=(t,e)=>{const n=t;(n._instance&&n._instance.isMounted)===!0&&Ee(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),_c(t,e),K(e)&&t.mixin(Sc({...e,...e.tracingOptions}))};function wc(t={}){const e={_metadata:{sdk:{name:"sentry.javascript.vue",packages:[{name:"npm:@sentry/vue",version:Fe}],version:Fe}},defaultIntegrations:[...$r(),Pr()],...t};dc(e)}function Nc(t,e={}){return(n,r=!0,s=!0)=>{r&&T&&T.location&&n({name:T.location.pathname,op:"pageload",attributes:{[F]:"auto.pageload.vue",[P]:"url"}}),Oc(t,{routeLabel:e.routeLabel||"name",instrumentNavigation:s,instrumentPageLoad:r},n)}}function Oc(t,e,n){t.onError(r=>wt(r,{mechanism:{handled:!1}})),t.beforeEach((r,s,i)=>{const a=s.name==null&&s.matched.length===0,o={[F]:"auto.navigation.vue"};for(const u of Object.keys(r.params))o["params.".concat(u)]=r.params[u];for(const u of Object.keys(r.query)){const l=r.query[u];l&&(o["query.".concat(u)]=l)}let c=r.path,d="url";if(r.name&&e.routeLabel!=="path"?(c=r.name.toString(),d="custom"):r.matched[0]&&r.matched[0].path&&(c=r.matched[0].path,d="route"),e.instrumentPageLoad&&a){const u=Ec();u&&((A(u).data||{})[P]!=="custom"&&(u.updateName(c),u.setAttribute(P,d)),u.setAttributes({...o,[F]:"auto.pageload.vue"}))}e.instrumentNavigation&&!a&&(o[P]=d,n({name:c,op:"navigation",attributes:o})),i&&i()})}const Ac=Ja;(typeof __SENTRY_TRACING__>"u"||__SENTRY_TRACING__)&&to();const Dc=(t,e)=>{wc({app:t,dsn:"https://[email protected]/3",integrations:[new Ac({routingInstrumentation:e?Nc(e):()=>{},tracePropagationTargets:["localhost","https://api.kurobbs.com",/^\//]})],environment:"production",release:is.version,tracesSampleRate:.2})};export{Dc as s};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.