UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 43.8 kB
!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"n8n@2.13.4"}}catch(t){}}(),System.register([],(function(t,e){var n,r,s,i,o,a,c,u,p,d,f,l,h,_,g,m,y,b,S,v,x,k,I,E,w,T,A,C,D,O,$,N,P,j,R,M,L,U,J,F,Y,z,V,H,B,W;function G(){return K(r),r}function K(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||"10.36.0",e[s]=e["10.36.0"]||{}}function q(t,e,n=r){const i=n.__SENTRY__=n.__SENTRY__||{},o=i[s]=i["10.36.0"]||{};return o[t]||(o[t]=e())}function Q(t){if(!("console"in r))return t();const e=r.console,n={},s=Object.keys(o);s.forEach((t=>{const r=o[t];n[t]=e[t],e[t]=r}));try{return t()}finally{s.forEach((t=>{e[t]=n[t]}))}}function X(){it().enabled=!0}function Z(){it().enabled=!1}function tt(){return it().enabled}function et(...t){st("log",...t)}function nt(...t){st("warn",...t)}function rt(...t){st("error",...t)}function st(t,...e){n&&tt()&&Q((()=>{r.console[t](`${i}[${t}]:`,...e)}))}function it(){return n?q("loggerSettings",(()=>({enabled:!1}))):{enabled:!1}}function ot(...t){const e=t.sort(((t,e)=>t[0]-e[0])).map((t=>t[1]));return(t,n=0,r=0)=>{const s=[],i=t.split("\n");for(let o=n;o<i.length;o++){let t=i[o];t.length>1024&&(t=t.slice(0,1024));const n=u.test(t)?t.replace(u,"$1"):t;if(!n.match(/\S*Error: /)){for(const t of e){const e=t(n);if(e){s.push(e);break}}if(s.length>=c+r)break}}return function(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(at(e).function||"")&&e.pop(),e.reverse(),p.test(at(e).function||"")&&(e.pop(),p.test(at(e).function||"")&&e.pop()),e.slice(0,c).map((t=>({...t,filename:t.filename||at(e).filename,function:t.function||"?"})))}(s.slice(r))}}function at(t){return t[t.length-1]||{}}function ct(t){try{return t&&"function"==typeof t&&t.name||d}catch{return d}}function ut(t){return"__v_isVNode"in t&&t.__v_isVNode?"[VueVNode]":"[VueViewModel]"}function pt(t){switch(f.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return mt(t,Error)}}function dt(t,e){return f.call(t)===`[object ${e}]`}function ft(t){return dt(t,"String")}function lt(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function ht(t){return dt(t,"Object")}function _t(t){return"undefined"!=typeof Event&&mt(t,Event)}function gt(t){return Boolean(t?.then&&"function"==typeof t.then)}function mt(t,e){try{return t instanceof e}catch{return!1}}function yt(t){return!("object"!=typeof t||null===t||!(t.__isVue||t._isVue||t.__v_isVNode))}function bt(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,s=[];let i=0,o=0;const a=" > ",c=3;let u;const p=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||h;for(;n&&i++<r&&(u=St(n,p),!("html"===u||i>1&&o+s.length*c+u.length>=d));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function St(t,e){const n=t,r=[];if(!n?.tagName)return"";if(l.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=e?.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(s?.length)s.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);const t=n.className;if(t&&ft(t)){const e=t.split(/\s+/);for(const t of e)r.push(`.${t}`)}}for(const i of["aria-label","type","name","title","alt"]){const t=n.getAttribute(i);t&&r.push(`[${i}="${t}"]`)}return r.join("")}function vt(t,e,r){try{Object.defineProperty(t,e,{value:r,writable:!0,configurable:!0})}catch{n&&a.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function xt(t,e){try{t.prototype=e.prototype=e.prototype||{},vt(t,"__sentry_original__",e)}catch{}}function kt(t){if(pt(t))return{message:t.message,name:t.name,stack:t.stack,...Et(t)};if(_t(t)){const e={type:t.type,target:It(t.target),currentTarget:It(t.currentTarget),...Et(t)};return"undefined"!=typeof CustomEvent&&mt(t,CustomEvent)&&(e.detail=t.detail),e}return t}function It(t){try{return e=t,"undefined"!=typeof Element&&mt(e,Element)?bt(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}var e}function Et(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function wt(t){if(void 0!==_)return _?_(t):t();const e=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=r;return e in n&&"function"==typeof n[e]?(_=n[e])(t):(_=null,t())}function Tt(){return wt((()=>Math.random()))}function At(){return wt((()=>Date.now()))}function Ct(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function Dt(t,e,n=!1){return!!ft(t)&&(dt(e,"RegExp")?e.test(t):!!ft(e)&&(n?t===e:t.includes(e)))}function Ot(t=function(){const t=r;return t.crypto||t.msCrypto}()){try{if(t?.randomUUID)return wt((()=>t.randomUUID())).replace(/-/g,"")}catch{}return g||(g="10000000100040008000100000000000"),g.replace(/[018]/g,(t=>(t^(16*Tt()&15)>>t/4).toString(16)))}function $t(t){return t.exception?.values?.[0]}function Nt(t,e){const n=$t(t);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){const t={...r?.data,...e.data};n.mechanism.data=t}}function Pt(){return At()/m}function jt(){return(y??(y=function(){const{performance:t}=r;if(!t?.now||!t.timeOrigin)return Pt;const e=t.timeOrigin;return()=>(e+wt((()=>t.now())))/m}()))()}function Rt(t){const e=jt(),n={sid:Ot(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return{sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}}}(n)};return t&&Mt(n,t),n}function Mt(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||jt(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:Ot()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}function Lt(t,e,n=2){if(!e||"object"!=typeof e||n<=0)return e;if(t&&0===Object.keys(e).length)return t;const r={...t};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Lt(r[s],e[s],n-1));return r}function Ut(){return Ot()}function Jt(){return Ot().substring(16)}function Ft(t,e){e?vt(t,b,e):delete t[b]}function Yt(t){return t[b]}function zt(){const t=K(G());return t.stack=t.stack||new v(q("defaultCurrentScope",(()=>new S)),q("defaultIsolationScope",(()=>new S)))}function Vt(t){return zt().withScope(t)}function Ht(t,e){const n=zt();return n.withScope((()=>(n.getStackTop().scope=t,e(t))))}function Bt(t){return zt().withScope((()=>t(zt().getIsolationScope())))}function Wt(t){const e=K(t);return e.acs?e.acs:{withIsolationScope:Bt,withScope:Vt,withSetScope:Ht,withSetIsolationScope:(t,e)=>Bt(e),getCurrentScope:()=>zt().getScope(),getIsolationScope:()=>zt().getIsolationScope()}}function Gt(){return Wt(G()).getCurrentScope()}function Kt(){return Wt(G()).getIsolationScope()}function qt(...t){const e=Wt(G());if(2===t.length){const[n,r]=t;return n?e.withSetScope(n,r):e.withScope(r)}return e.withScope(t[0])}function Qt(){return Gt().getClient()}function Xt(t){if(t){if("object"==typeof t&&"deref"in t&&"function"==typeof t.deref)try{return t.deref()}catch{return}return t}}function Zt(t,e,n){t&&(vt(t,D,function(t){try{const e=r.WeakRef;if("function"==typeof e)return new e(t)}catch{}return t}(n)),vt(t,C,e))}function te(t){const e=t;return{scope:e[C],isolationScope:Xt(e[D])}}function ee(t){const e=function(t){if(t&&(ft(t)||Array.isArray(t)))return Array.isArray(t)?t.reduce(((t,e)=>{const n=ne(e);return Object.entries(n).forEach((([e,n])=>{t[e]=n})),t}),{}):ne(t)}(t);if(!e)return;const n=Object.entries(e).reduce(((t,[e,n])=>(e.match(O)&&(t[e.slice(7)]=n),t)),{});return Object.keys(n).length>0?n:void 0}function ne(t){return t.split(",").map((t=>{const e=t.indexOf("=");return-1===e?[]:[t.slice(0,e),t.slice(e+1)].map((t=>{try{return decodeURIComponent(t.trim())}catch{return}}))})).reduce(((t,[e,n])=>(e&&n&&(t[e]=n),t)),{})}function re(t,e=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:c}=t;return`${a}://${c}${e&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${o}`}function se(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function ie(t){const e=t.getOptions(),{host:n}=t.getDsn()||{};let r;return e.orgId?r=String(e.orgId):n&&(r=function(t){return t.match($)?.[1]}(n)),r}function oe(t){if("boolean"==typeof t)return Number(t);const e="string"==typeof t?parseFloat(t):t;return"number"!=typeof e||isNaN(e)||e<0||e>1?void 0:e}function ae(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:i,status:o,origin:a,links:c}=fe(t);return{parent_span_id:i,span_id:e,trace_id:n,data:r,op:s,status:o,origin:a,links:c}}function ce(t){const{spanId:e,traceId:n,isRemote:r}=t.spanContext(),s=r?e:fe(t).parent_span_id,i=te(t).scope;return{parent_span_id:s,span_id:r?i?.getPropagationContext().propagationSpanId||Jt():e,trace_id:n}}function ue(t){return t&&t.length>0?t.map((({context:{spanId:t,traceId:e,traceFlags:n,...r},attributes:s})=>({span_id:t,trace_id:e,sampled:1===n,attributes:s,...r}))):void 0}function pe(t){return"number"==typeof t?de(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?de(t.getTime()):jt()}function de(t){return t>9999999999?t/1e3:t}function fe(t){if(function(t){return"function"==typeof t.getSpanJSON}(t))return t.getSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(function(t){const e=t;return!!(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status)}(t)){const{attributes:r,startTime:s,name:i,endTime:o,status:a,links:c}=t;return{span_id:e,trace_id:n,data:r,description:i,parent_span_id:"parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?t.parentSpanContext?.spanId:void 0,start_timestamp:pe(s),timestamp:pe(o)||void 0,status:he(a),op:r[I],origin:r[E],links:ue(c)}}return{span_id:e,trace_id:n,start_timestamp:0,data:{}}}function le(t){const{traceFlags:e}=t.spanContext();return 1===e}function he(t){if(t&&0!==t.code)return 1===t.code?"ok":t.message||"internal_error"}function _e(t,e){vt(e,R,t[R]||t),t[j]?t[j].add(e):vt(t,j,new Set([e]))}function ge(t){return t[R]||t}function me(){P||(Q((()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")})),P=!0)}function ye(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=t||Qt()?.getOptions();return!(!e||null==e.tracesSampleRate&&!e.tracesSampler)}function be(t){a.log(`Ignoring span ${t.op} - ${t.description} because it matches \`ignoreSpans\`.`)}function Se(t,e){if(!e?.length||!t.description)return!1;for(const s of e){if("string"==typeof(r=s)||r instanceof RegExp){if(Dt(t.description,s))return n&&be(t),!0;continue}if(!s.name&&!s.op)continue;const e=!s.name||Dt(t.description,s.name),i=!s.op||t.op&&Dt(t.op,s.op);if(e&&i)return n&&be(t),!0}var r;return!1}function ve(t,e){vt(t,M,e)}function xe(t,e){const n=e.getOptions(),{publicKey:r}=e.getDsn()||{},s={environment:n.environment||"production",release:n.release,public_key:r,trace_id:t,org_id:ie(e)};return e.emit("createDsc",s),s}function ke(t){const e=Qt();if(!e)return{};const n=ge(t),r=fe(n),s=r.data,i=n.spanContext().traceState,o=i?.get("sentry.sample_rate")??s["sentry.sample_rate"]??s["sentry.previous_trace_sample_rate"];function a(t){return"number"!=typeof o&&"string"!=typeof o||(t.sample_rate=`${o}`),t}const c=n[M];if(c)return a(c);const u=i?.get("sentry.dsc"),p=u&&ee(u);if(p)return a(p);const d=xe(t.spanContext().traceId,e),f=s[x],l=r.description;return"url"!==f&&l&&(d.transaction=l),ye()&&(d.sampled=String(le(n)),d.sample_rand=i?.get("sentry.sample_rand")??te(n).scope?.getPropagationContext().sampleRand.toString()),a(d),e.emit("createDsc",d,n),d}function Ie(t,e=100,n=1/0){try{return Ee("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Ee(t,e,n=1/0,r=1/0,s=function(){const t=new WeakSet;function e(e){return!!t.has(e)||(t.add(e),!1)}function n(e){t.delete(e)}return[e,n]}()){const[i,o]=s;if(null==e||["boolean","string"].includes(typeof e)||"number"==typeof e&&Number.isFinite(e))return e;const a=function(t,e){try{if("domain"===t&&e&&"object"==typeof e&&e._events)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&e===global)return"[Global]";if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(yt(e))return ut(e);if(ht(n=e)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof e&&!Number.isFinite(e))return`[${e}]`;if("function"==typeof e)return`[Function: ${ct(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const r=function(t){const e=Object.getPrototypeOf(t);return e?.constructor?e.constructor.name:"null prototype"}(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}var n}(t,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;const c="number"==typeof e.__sentry_override_normalization_depth__?e.__sentry_override_normalization_depth__:n;if(0===c)return a.replace("object ","");if(i(e))return"[Circular ~]";const u=e;if(u&&"function"==typeof u.toJSON)try{return Ee("",u.toJSON(),c-1,r,s)}catch{}const p=Array.isArray(e)?[]:{};let d=0;const f=kt(e);for(const l in f){if(!Object.prototype.hasOwnProperty.call(f,l))continue;if(d>=r){p[l]="[MaxProperties ~]";break}const t=f[l];p[l]=Ee(l,t,c-1,r,s),d++}return o(e),p}function we(t,e=[]){return[t,e]}function Te(t,e){const n=t[1];for(const r of n)if(e(r,r[0].type))return!0;return!1}function Ae(t){const e=K(r);return e.encodePolyfill?e.encodePolyfill(t):(new TextEncoder).encode(t)}function Ce(t){return[{type:"span"},t]}function De(t){if(!t?.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function Oe(t){if(!t||0===t.length)return;const e={};return t.forEach((t=>{const n=t.attributes||{},r=n[w],s=n[T];"string"==typeof r&&"number"==typeof s&&(e[t.name]={value:s,unit:r})})),e}function $e(t){return t&&"number"==typeof t||t instanceof Date||Array.isArray(t)}function Ne(t){return!!(t.start_timestamp&&t.timestamp&&t.span_id&&t.trace_id)}function Pe(){return Wt(G())}function je(t,e,r){const s=Qt(),i=s?.getOptions()||{},{name:o=""}=t,c={spanAttributes:{...t.attributes},spanName:o,parentSampled:r};s?.emit("beforeSampling",c,{decision:!1});const u=c.parentSampled??r,p=c.spanAttributes,d=e.getPropagationContext(),[f,l,h]=e.getScopeData().sdkProcessingMetadata[F]?[!1]:function(t,e,r){if(!ye(t))return[!1];let s,i;"function"==typeof t.tracesSampler?(i=t.tracesSampler({...e,inheritOrSampleWith:t=>"number"==typeof e.parentSampleRate?e.parentSampleRate:"boolean"==typeof e.parentSampled?Number(e.parentSampled):t}),s=!0):void 0!==e.parentSampled?i=e.parentSampled:void 0!==t.tracesSampleRate&&(i=t.tracesSampleRate,s=!0);const o=oe(i);if(void 0===o)return n&&a.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!o)return n&&a.log("[Tracing] Discarding transaction because "+("function"==typeof t.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,o,s];const c=r<o;return c||n&&a.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[c,o,s]}(i,{name:o,parentSampled:u,attributes:p,parentSampleRate:oe(d.dsc?.sample_rate)},d.sampleRand),_=new J({...t,attributes:{[x]:"custom",[k]:void 0!==l&&h?l:void 0,...p},sampled:f});return!f&&s&&(n&&a.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),s.recordDroppedEvent("sample_rate","transaction")),s&&s.emit("spanStart",_),_}function Re(t){return new Y((e=>{e(t)}))}function Me(t){return new Y(((e,n)=>{n(t)}))}function Le(t,e,n,r=0){try{const s=Ue(e,n,t,r);return gt(s)?s:Re(s)}catch(s){return Me(s)}}function Ue(t,e,r,s){const i=r[s];if(!t||!i)return t;const o=i({...t},e);return n&&null===o&&a.log(`Event processor "${i.id||"?"}" dropped event`),gt(o)?o.then((t=>Ue(t,e,r,s+1))):Ue(o,e,r,s+1)}function Je(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=e;!function(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=e;Object.keys(n).length&&(t.extra={...n,...t.extra}),Object.keys(r).length&&(t.tags={...r,...t.tags}),Object.keys(s).length&&(t.user={...s,...t.user}),Object.keys(i).length&&(t.contexts={...i,...t.contexts}),o&&(t.level=o),a&&"transaction"!==t.type&&(t.transaction=a)}(t,e),r&&function(t,e){t.contexts={trace:ce(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:ke(e),...t.sdkProcessingMetadata};const n=fe(ge(e)).description;n&&!t.transaction&&"transaction"===t.type&&(t.transaction=n)}(t,r),function(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint.length||delete t.fingerprint}(t,n),function(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}(t,s),function(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}(t,i)}function Fe(t,e){const{extra:n,tags:r,attributes:s,user:i,contexts:o,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:p,eventProcessors:d,attachments:f,propagationContext:l,transactionName:h,span:_}=e;Ye(t,"extra",n),Ye(t,"tags",r),Ye(t,"attributes",s),Ye(t,"user",i),Ye(t,"contexts",o),t.sdkProcessingMetadata=Lt(t.sdkProcessingMetadata,c,2),a&&(t.level=a),h&&(t.transactionName=h),_&&(t.span=_),u.length&&(t.breadcrumbs=[...t.breadcrumbs,...u]),p.length&&(t.fingerprint=[...t.fingerprint,...p]),d.length&&(t.eventProcessors=[...t.eventProcessors,...d]),f.length&&(t.attachments=[...t.attachments,...f]),t.propagationContext={...t.propagationContext,...l}}function Ye(t,e,n){t[e]=Lt(t[e],n,1)}function ze(t,e){const n=q("globalScope",(()=>new S)).getScopeData();return t&&Fe(n,t.getScopeData()),e&&Fe(n,e.getScopeData()),n}function Ve(t){if(t)return function(t){return t instanceof S||"function"==typeof t}(t)||function(t){return Object.keys(t).some((t=>W.includes(t)))}(t)?{captureContext:t}:t}function He(){const t=Kt(),e=Gt().getSession()||t.getSession();e&&function(t,e){let n={};e?n={status:e}:"ok"===t.status&&(n={status:"exited"}),Mt(t,n)}(e),Be(),t.setSession()}function Be(){const t=Kt(),e=Qt(),n=t.getSession();n&&e&&e.captureSession(n)}return t({$:vt,A:re,B:Lt,Ct:function(t){return Array.isArray(t)?ot(...t):t},D:function(){const t=Wt(G());return t.getActiveSpan?t.getActiveSpan():Yt(Gt())},E:ye,F:Qt,G:function(t,e,n){const r=t.exception=t.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=e||""),i.type||(i.type=n||"Error")},H:Pt,I:Gt,J:Ot,K:function(t){if(function(t){try{return t.__sentry_captured__}catch{}}(t))return!0;try{vt(t,"__sentry_captured__",!0)}catch{}return!1},L:Kt,O:me,Ot:q,Q:Tt,R:function(t){const{traceId:e,parentSpanId:n,propagationSpanId:r}=t.getPropagationContext(),s={trace_id:e,span_id:r||Jt()};return n&&(s.parent_span_id=n),s},S:function(t,e){const n=e.getPropagationContext();return n.dsc||xe(n.traceId,t)},St:ct,T:Se,Tt:Q,U:jt,V:Mt,W:Nt,X:function(t,e=[],n=!1){return e.some((e=>Dt(t,e,n)))},Y:function(t,e){if(!Array.isArray(t))return"";const n=[];for(let r=0;r<t.length;r++){const e=t[r];try{yt(e)?n.push(ut(e)):n.push(String(e))}catch{n.push("[value cannot be serialized]")}}return n.join(e)},Z:At,_:function(t,e){return Te(t,((t,n)=>e.includes(n)))},_t:ft,a:function(t,e){Kt().setTag(t,e)},at:function(){try{return l.document.location.href}catch{return""}},b:function(t){const[e,n]=t;let r=JSON.stringify(e);function s(t){"string"==typeof r?r="string"==typeof t?r+t:[Ae(r),t]:r.push("string"==typeof t?Ae(t):t)}for(const i of n){const[t,e]=i;if(s(`\n${JSON.stringify(t)}\n`),"string"==typeof e||e instanceof Uint8Array)s(e);else{let t;try{t=JSON.stringify(e)}catch{t=JSON.stringify(Ie(e))}s(t)}}return"string"==typeof r?r:function(t){const e=t.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(e);let r=0;for(const s of t)n.set(s,r),r+=s.length;return n}(r)},bt:ot,c:function(t,e,n,s,i,o){const{normalizeDepth:a=3,normalizeMaxBreadth:c=1e3}=t,u={...e,event_id:e.event_id||n.event_id||Ot(),timestamp:e.timestamp||Pt()},p=n.integrations||t.integrations.map((t=>t.name));!function(t,e){const{environment:n,release:r,dist:s,maxValueLength:i}=e;t.environment=t.environment||n||"production",!t.release&&r&&(t.release=r),!t.dist&&s&&(t.dist=s);const o=t.request;o?.url&&i&&(o.url=Ct(o.url,i)),i&&t.exception?.values?.forEach((t=>{t.value&&(t.value=Ct(t.value,i))}))}(u,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(u,p),i&&i.emit("applyFrameMetadata",e),void 0===e.type&&function(t,e){const n=function(t){const e=r._sentryDebugIds,n=r._debugIds;if(!e&&!n)return{};const s=e?Object.keys(e):[],i=n?Object.keys(n):[];if(B&&s.length===V&&i.length===H)return B;V=s.length,H=i.length,B={},z||(z={});const o=(e,n)=>{for(const r of e){const e=n[r],s=z?.[r];if(s&&B&&e)B[s[0]]=e,z&&(z[r]=[s[0],e]);else if(e){const n=t(r);for(let t=n.length-1;t>=0;t--){const s=n[t]?.filename;if(s&&B&&z){B[s]=e,z[r]=[s,e];break}}}}};return e&&o(s,e),n&&o(i,n),B}(e);t.exception?.values?.forEach((t=>{t.stacktrace?.frames?.forEach((t=>{t.filename&&(t.debug_id=n[t.filename])}))}))}(u,t.stackParser);const d=function(t,e){if(!e)return t;const n=t?t.clone():new S;return n.update(e),n}(s,n.captureContext);n.mechanism&&Nt(u,n.mechanism);const f=i?i.getEventProcessors():[],l=ze(o,d),h=[...n.attachments||[],...l.attachments];return h.length&&(n.attachments=h),Je(u,l),Le([...f,...l.eventProcessors],u,n).then((t=>(t&&function(t){const e={};if(t.exception?.values?.forEach((t=>{t.stacktrace?.frames?.forEach((t=>{t.debug_id&&(t.abs_path?e[t.abs_path]=t.debug_id:t.filename&&(e[t.filename]=t.debug_id),delete t.debug_id)}))})),0===Object.keys(e).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.entries(e).forEach((([t,e])=>{n.push({type:"sourcemap",code_file:t,debug_id:e})}))}(t),"number"==typeof a&&a>0?function(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((t=>({...t,...t.data&&{data:Ie(t.data,e,n)}})))},...t.user&&{user:Ie(t.user,e,n)},...t.contexts&&{contexts:Ie(t.contexts,e,n)},...t.extra&&{extra:Ie(t.extra,e,n)}};return t.contexts?.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Ie(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map((t=>({...t,...t.data&&{data:Ie(t.data,e,n)}})))),t.contexts?.flags&&r.contexts&&(r.contexts.flags=Ie(t.contexts.flags,3,n)),r}(t,a,c):t)))},ct:function(t){return dt(t,"DOMException")},d:function(t){const e=Pe();if(e.startInactiveSpan)return e.startInactiveSpan(t);const r=function(t){const e={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const n={...e};return n.startTimestamp=pe(t.startTime),delete n.startTime,n}return e}(t),{forceTransaction:s,parentSpan:i}=t;return(t.scope?e=>qt(t.scope,e):void 0!==i?t=>function(t,e){const n=Pe();return n.withActiveSpan?n.withActiveSpan(t,e):qt((n=>(Ft(n,t||void 0),e(n))))}(i,t):t=>t())((()=>{const e=Gt(),o=function(t,e){if(e)return e;if(null===e)return;const n=Yt(t);if(!n)return;const r=Qt();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?ge(n):n}(e,i);return t.onlyIfParent&&!o?new L:function({parentSpan:t,spanArguments:e,forceTransaction:r,scope:s}){if(!ye()){const n=new L;return!r&&t||ve(n,{sampled:"false",sample_rate:"0",transaction:e.name,...ke(n)}),n}const i=Kt();let o;if(t&&!r)o=function(t,e,n){const{spanId:r,traceId:s}=t.spanContext(),i=!e.getScopeData().sdkProcessingMetadata[F]&&le(t),o=i?new J({...n,parentSpanId:r,traceId:s,sampled:i}):new L({traceId:s});_e(t,o);const a=Qt();return a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o)),o}(t,s,e),_e(t,o);else if(t){const n=ke(t),{traceId:r,spanId:i}=t.spanContext(),a=le(t);o=je({traceId:r,parentSpanId:i,...e},s,a),ve(o,n)}else{const{traceId:t,dsc:n,parentSpanId:r,sampled:a}={...i.getPropagationContext(),...s.getPropagationContext()};o=je({traceId:t,parentSpanId:r,...e},s,a),n&&ve(o,n)}return function(t){if(!n)return;const{description:e="< unknown name >",op:r="< unknown op >",parent_span_id:s}=fe(t),{spanId:i}=t.spanContext(),o=le(t),c=ge(t),u=c===t,p=`[Tracing] Starting ${o?"sampled":"unsampled"} ${u?"root ":""}span`,d=[`op: ${r}`,`name: ${e}`,`ID: ${i}`];if(s&&d.push(`parent ID: ${s}`),!u){const{op:t,description:e}=fe(c);d.push(`root ID: ${c.spanContext().spanId}`),t&&d.push(`root op: ${t}`),e&&d.push(`root description: ${e}`)}a.log(`${p}\n ${d.join("\n ")}`)}(o),Zt(o,s,i),o}({parentSpan:o,spanArguments:r,forceTransaction:s,scope:e})}))},dt:_t,et:function(t){const e=Object.keys(kt(t));return e.sort(),e[0]?e.join(", "):"[object has no keys]"},f:function(t,e,n,r){const s=De(n),i=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){if(!e)return t;const n=t.sdk||{};t.sdk={...n,name:n.name||e.name,version:n.version||e.version,integrations:[...t.sdk?.integrations||[],...e.integrations||[]],packages:[...t.sdk?.packages||[],...e.packages||[]],settings:t.sdk?.settings||e.settings?{...t.sdk?.settings,...e.settings}:void 0}}(t,n?.sdk);const o=function(t,e,n,r){const s=t.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:re(r)},...s&&{trace:s}}}(t,s,r,e);return delete t.sdkProcessingMetadata,we(o,[[{type:i},t]])},ft:mt,g:we,gt:function(t){return"undefined"!=typeof Request&&mt(t,Request)},h:function(t){const e="string"==typeof t.data?Ae(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]},ht:function(t){return null===t||lt(t)||"object"!=typeof t&&"function"!=typeof t},i:function(t=!1){t?He():Be()},it:function(t){if(!l.HTMLElement)return null;let e=t;for(let n=0;n<5;n++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null},j:function(t){const e="string"==typeof t?function(t){const e=N.exec(t);if(!e)return void Q((()=>{console.error(`Invalid Sentry Dsn: ${t}`)}));const[n,r,s="",i="",o="",a=""]=e.slice(1);let c="",u=a;const p=u.split("/");if(p.length>1&&(c=p.slice(0,-1).join("/"),u=p.pop()),u){const t=u.match(/^\d+/);t&&(u=t[0])}return se({host:i,pass:s,path:c,projectId:u,port:o,protocol:n,publicKey:r})}(t):se(t);if(e&&function(t){if(!n)return!0;const{port:e,projectId:r,protocol:s}=t;return!(["protocol","publicKey","host","projectId"].find((e=>!t[e]&&(a.error(`Invalid Sentry Dsn: ${e} missing`),!0)))||(r.match(/^\d+$/)?function(t){return"http"===t||"https"===t}(s)?e&&isNaN(parseInt(e,10))&&(a.error(`Invalid Sentry Dsn: Invalid port ${e}`),1):(a.error(`Invalid Sentry Dsn: Invalid protocol ${s}`),1):(a.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),1)))}(e))return e},k:oe,l:Me,lt:pt,m:function(t,e){const[n,r]=t;return[n,[...r,e]]},mt:ht,n:function(t,e){return Gt().captureException(t,Ve(e))},nt:function(t){return t.__sentry_original__},o:function(t){Kt().setUser(t)},ot:bt,p:function(t,e,n,r){const s=De(n);return we({sent_at:(new Date).toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:re(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])},pt:lt,q:function(t){const{message:e,event_id:n}=t;if(e)return e;const r=$t(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"},r:function(t,e){const n="string"==typeof e?e:void 0,r="string"!=typeof e?{captureContext:e}:void 0;return Gt().captureMessage(t,n,r)},rt:xt,s:function(t){const e=Kt(),n=Gt(),{userAgent:s}=r.navigator||{},i=Rt({user:n.getUser()||e.getUser(),...s&&{userAgent:s},...t}),o=e.getSession();return"ok"===o?.status&&Mt(o,{status:"exited"}),He(),e.setSession(i),i},st:function(t){return dt(t,"DOMError")},t:function(t,e){return Gt().captureEvent(t,e)},tt:function(t,e,r){if(!(e in t))return;const s=t[e];if("function"!=typeof s)return;const i=r(s);"function"==typeof i&&xt(i,s);try{t[e]=i}catch{n&&a.log(`Failed to replace method "${e}" in object`,t)}},u:Re,ut:function(t){return dt(t,"ErrorEvent")},v:function(t){return U[t]},vt:gt,w:function(t,e){const n=e.parent_span_id,r=e.span_id;if(n)for(const s of t)s.parent_span_id===r&&(s.parent_span_id=n)},x:function t(e,n=3,r=102400){const s=Ie(e,n);return i=s,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(i))>r?t(e,n-1,r):s;var i},xt:function(t){const e=t.exception;if(e){const t=[];try{return e.values.forEach((e=>{e.stacktrace.frames&&t.push(...e.stacktrace.frames)})),t}catch{return}}},y:Te,z:qt}),{setters:[],execute:function(){try{e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(_=(new e.Error).stack)&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[_]="d508095f-051a-48f8-93c6-a5e225dc5f98",e._sentryDebugIdIdentifier="sentry-dbid-d508095f-051a-48f8-93c6-a5e225dc5f98")}catch(e){}var e,_;t("jt",n="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__),t("At",r=globalThis),t("kt",s="10.36.0"),t("wt",["debug","info","warn","error","log","assert","trace"]),i="Sentry Logger ",t("Dt",o={}),t("Et",a={enable:X,disable:Z,isEnabled:tt,log:et,warn:nt,error:rt}),c=50,t("yt","?"),u=/\(error: (.*)\)/,p=/captureMessage|captureException/,d="<anonymous>",f=Object.prototype.toString,l=r,h=80,m=1e3,b="_sentrySpan",S=class t{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Ut(),sampleRand:Tt()}}clone(){const e=new t;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._attributes={...this._attributes},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,Ft(e,Yt(this)),e}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Mt(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,e){return this.setTags({[t]:e})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,e){return this.setAttributes({[t]:e})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const n="function"==typeof e?e(this):e,{tags:r,attributes:s,extra:i,user:o,contexts:a,level:c,fingerprint:u=[],propagationContext:p}=(n instanceof t?n.getScopeData():ht(n)?e:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...s},this._extra={...this._extra,...i},this._contexts={...this._contexts,...a},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),u.length&&(this._fingerprint=u),p&&(this._propagationContext=p),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,Ft(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ut(),sampleRand:Tt()}),this._notifyScopeListeners(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:Pt(),...t,message:t.message?Ct(t.message,2048):t.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Yt(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Lt(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,e){const r=e?.event_id||Ot();if(!this._client)return n&&a.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...e,event_id:r},this),r}captureMessage(t,e,r){const s=r?.event_id||Ot();if(!this._client)return n&&a.warn("No client configured on scope - will not capture message!"),s;const i=r?.syntheticException??new Error(t);return this._client.captureMessage(t,e,{originalException:t,syntheticException:i,...r,event_id:s},this),s}captureEvent(t,e){const r=e?.event_id||Ot();return this._client?(this._client.captureEvent(t,{...e,event_id:r},this),r):(n&&a.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((t=>{t(this)})),this._notifyingListeners=!1)}},v=class{constructor(t,e){let n,r;n=t||new S,r=e||new S,this._stack=[{scope:n}],this._isolationScope=r}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(e){throw this._popScope(),e}return gt(r)?r.then((t=>(this._popScope(),t)),(t=>{throw this._popScope(),t})):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return!(this._stack.length<=1||!this._stack.pop())}},x="sentry.source",k="sentry.sample_rate",I="sentry.op",t("P",E="sentry.origin"),w="sentry.measurement_unit",T="sentry.measurement_value",A="sentry.custom_span_name",t("N","sentry.profile_id"),t("M","sentry.exclusive_time"),C="_sentryScope",D="_sentryIsolationScope",O=/^sentry-/,$=/^o(\d+)\./,N=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/,P=!1,j="_sentryChildSpans",R="_sentryRootSpan",t("C","production"),M="_frozenDsc",L=class{constructor(t={}){this._traceId=t.traceId||Ut(),this._spanId=t.spanId||Jt()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(t){}setAttribute(t,e){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,e,n){return this}addLink(t){return this}addLinks(t){return this}recordException(t,e){}},U={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"},J=class{constructor(t={}){this._traceId=t.traceId||Ut(),this._spanId=t.spanId||Jt(),this._startTime=t.startTimestamp||jt(),this._links=t.links,this._attributes={},this.setAttributes({[E]:"manual",[I]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,e){}spanContext(){const{_spanId:t,_traceId:e,_sampled:n}=this;return{spanId:t,traceId:e,traceFlags:n?1:0}}setAttribute(t,e){return void 0===e?delete this._attributes[t]:this._attributes[t]=e,this}setAttributes(t){return Object.keys(t).forEach((e=>this.setAttribute(e,t[e]))),this}updateStartTime(t){this._startTime=pe(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(x,"custom"),this}end(t){this._endTime||(this._endTime=pe(t),function(t){if(!n)return;const{description:e="< unknown name >",op:r="< unknown op >"}=fe(t),{spanId:s}=t.spanContext(),i=`[Tracing] Finishing "${r}" ${ge(t)===t?"root ":""}span "${e}" with ID ${s}`;a.log(i)}(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[I],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:he(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[E],profile_id:this._attributes["sentry.profile_id"],exclusive_time:this._attributes["sentry.exclusive_time"],measurements:Oe(this._events),is_segment:this._isStandaloneSpan&&ge(this)===this||void 0,segment_id:this._isStandaloneSpan?ge(this).spanContext().spanId:void 0,links:ue(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,e,r){n&&a.log("[Tracing] Adding an event to span:",t);const s=$e(e)?e:r||jt(),i=$e(e)?{}:e||{},o={name:t,time:pe(s),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=Qt();if(t&&t.emit("spanEnd",this),!this._isStandaloneSpan&&this!==ge(this))return;if(this._isStandaloneSpan)return void(this._sampled?function(t){const e=Qt();if(!e)return;const n=t[1];n&&0!==n.length?e.sendEnvelope(t):e.recordDroppedEvent("before_send","span")}(function(t,e){const n=ke(t[0]),r=e?.getDsn(),s=e?.getOptions().tunnel,i={sent_at:(new Date).toISOString(),...(o=n,!!o.trace_id&&!!o.public_key&&{trace:n}),...!!s&&r&&{dsn:re(r)}};var o;const{beforeSendSpan:a,ignoreSpans:c}=e?.getOptions()||{},u=c?.length?t.filter((t=>!Se(fe(t),c))):t,p=t.length-u.length;p&&e?.recordDroppedEvent("before_send","span",p);const d=a?t=>{const e=fe(t);return a(e)||(me(),e)}:fe,f=[];for(const l of u){const t=d(l);t&&f.push(Ce(t))}return we(i,f)}([this],t)):(n&&a.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span")));const e=this._convertSpanToTransaction();e&&(te(this).scope||Gt()).captureEvent(e)}_convertSpanToTransaction(){if(!Ne(fe(this)))return;this._name||(n&&a.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:e}=te(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(!0!==this._sampled)return;const s=function(t){const e=new Set;return function t(n){if(!e.has(n)&&le(n)){e.add(n);const r=n[j]?Array.from(n[j]):[];for(const e of r)t(e)}}(t),Array.from(e)}(this).filter((t=>t!==this&&!function(t){return t instanceof J&&t.isStandaloneSpan()}(t))).map((t=>fe(t))).filter(Ne),i=this._attributes[x];delete this._attributes[A],s.forEach((t=>{delete t.data[A]}));const o={contexts:{trace:ae(this)},spans:s.length>1e3?s.sort(((t,e)=>t.start_timestamp-e.start_timestamp)).slice(0,1e3):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:e,dynamicSamplingContext:ke(this)},request:r,...i&&{transaction_info:{source:i}}},c=Oe(this._events);return c&&Object.keys(c).length&&(n&&a.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),o.measurements=c),o}},F="__SENTRY_SUPPRESS_TRACING__",Y=class t{constructor(t){this._state=0,this._handlers=[],this._runExecutor(t)}then(n,r){return new t(((t,s)=>{this._handlers.push([!1,r=>{if(n)try{t(n(r))}catch(e){s(e)}else t(r)},n=>{if(r)try{t(r(n))}catch(e){s(e)}else s(n)}]),this._executeHandlers()}))}catch(t){return this.then((t=>t),t)}finally(e){return new t(((t,n)=>{let r,s;return this.then((t=>{s=!1,r=t,e&&e()}),(t=>{s=!0,r=t,e&&e()})).then((()=>{s?n(r):t(r)}))}))}_executeHandlers(){if(0===this._state)return;const t=this._handlers.slice();this._handlers=[],t.forEach((t=>{t[0]||(1===this._state&&t[1](this._value),2===this._state&&t[2](this._value),t[0]=!0)}))}_runExecutor(t){const n=(t,e)=>{0===this._state&&(gt(e)?e.then(r,s):(this._state=t,this._value=e,this._executeHandlers()))},r=t=>{n(1,t)},s=t=>{n(2,t)};try{t(r,s)}catch(e){s(e)}}},W=["user","level","extra","contexts","tags","fingerprint","propagationContext"]}}})); //# sourceMappingURL=exports-legacy-BsKX_nf9.js.map