ghost 5.32.0 → 5.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/{tryghost-adapter-manager-5.32.0.tgz → tryghost-adapter-manager-5.33.1.tgz} +0 -0
- package/components/{tryghost-api-framework-5.32.0.tgz → tryghost-api-framework-5.33.1.tgz} +0 -0
- package/components/{tryghost-api-version-compatibility-service-5.32.0.tgz → tryghost-api-version-compatibility-service-5.33.1.tgz} +0 -0
- package/components/tryghost-audience-feedback-5.33.1.tgz +0 -0
- package/components/{tryghost-bootstrap-socket-5.32.0.tgz → tryghost-bootstrap-socket-5.33.1.tgz} +0 -0
- package/components/tryghost-constants-5.33.1.tgz +0 -0
- package/components/{tryghost-custom-theme-settings-service-5.32.0.tgz → tryghost-custom-theme-settings-service-5.33.1.tgz} +0 -0
- package/components/tryghost-data-generator-5.33.1.tgz +0 -0
- package/components/tryghost-domain-events-5.33.1.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.33.1.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.33.1.tgz +0 -0
- package/components/{tryghost-email-analytics-service-5.32.0.tgz → tryghost-email-analytics-service-5.33.1.tgz} +0 -0
- package/components/tryghost-email-content-generator-5.33.1.tgz +0 -0
- package/components/{tryghost-email-events-5.32.0.tgz → tryghost-email-events-5.33.1.tgz} +0 -0
- package/components/tryghost-email-service-5.33.1.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.33.1.tgz +0 -0
- package/components/{tryghost-express-dynamic-redirects-5.32.0.tgz → tryghost-express-dynamic-redirects-5.33.1.tgz} +0 -0
- package/components/tryghost-extract-api-key-5.33.1.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.33.1.tgz +0 -0
- package/components/tryghost-i18n-5.33.1.tgz +0 -0
- package/components/{tryghost-importer-revue-5.32.0.tgz → tryghost-importer-revue-5.33.1.tgz} +0 -0
- package/components/{tryghost-job-manager-5.32.0.tgz → tryghost-job-manager-5.33.1.tgz} +0 -0
- package/components/{tryghost-link-redirects-5.32.0.tgz → tryghost-link-redirects-5.33.1.tgz} +0 -0
- package/components/tryghost-link-replacer-5.33.1.tgz +0 -0
- package/components/{tryghost-link-tracking-5.32.0.tgz → tryghost-link-tracking-5.33.1.tgz} +0 -0
- package/components/{tryghost-magic-link-5.32.0.tgz → tryghost-magic-link-5.33.1.tgz} +0 -0
- package/components/tryghost-mailgun-client-5.33.1.tgz +0 -0
- package/components/{tryghost-member-attribution-5.32.0.tgz → tryghost-member-attribution-5.33.1.tgz} +0 -0
- package/components/tryghost-member-events-5.33.1.tgz +0 -0
- package/components/{tryghost-members-api-5.32.0.tgz → tryghost-members-api-5.33.1.tgz} +0 -0
- package/components/{tryghost-members-csv-5.32.0.tgz → tryghost-members-csv-5.33.1.tgz} +0 -0
- package/components/{tryghost-members-events-service-5.32.0.tgz → tryghost-members-events-service-5.33.1.tgz} +0 -0
- package/components/{tryghost-members-importer-5.32.0.tgz → tryghost-members-importer-5.33.1.tgz} +0 -0
- package/components/tryghost-members-offers-5.33.1.tgz +0 -0
- package/components/tryghost-members-payments-5.33.1.tgz +0 -0
- package/components/{tryghost-members-ssr-5.32.0.tgz → tryghost-members-ssr-5.33.1.tgz} +0 -0
- package/components/tryghost-members-stripe-service-5.33.1.tgz +0 -0
- package/components/{tryghost-minifier-5.32.0.tgz → tryghost-minifier-5.33.1.tgz} +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.33.1.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.33.1.tgz +0 -0
- package/components/{tryghost-mw-error-handler-5.32.0.tgz → tryghost-mw-error-handler-5.33.1.tgz} +0 -0
- package/components/tryghost-mw-session-from-token-5.33.1.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.33.1.tgz +0 -0
- package/components/tryghost-mw-vhost-5.33.1.tgz +0 -0
- package/components/tryghost-oembed-service-5.33.1.tgz +0 -0
- package/components/{tryghost-package-json-5.32.0.tgz → tryghost-package-json-5.33.1.tgz} +0 -0
- package/components/tryghost-referrers-5.33.1.tgz +0 -0
- package/components/{tryghost-security-5.32.0.tgz → tryghost-security-5.33.1.tgz} +0 -0
- package/components/tryghost-session-service-5.33.1.tgz +0 -0
- package/components/{tryghost-settings-path-manager-5.32.0.tgz → tryghost-settings-path-manager-5.33.1.tgz} +0 -0
- package/components/tryghost-staff-service-5.33.1.tgz +0 -0
- package/components/{tryghost-stats-service-5.32.0.tgz → tryghost-stats-service-5.33.1.tgz} +0 -0
- package/components/{tryghost-tiers-5.32.0.tgz → tryghost-tiers-5.33.1.tgz} +0 -0
- package/components/tryghost-update-check-service-5.33.1.tgz +0 -0
- package/components/tryghost-verification-trigger-5.33.1.tgz +0 -0
- package/components/{tryghost-version-notifications-data-service-5.32.0.tgz → tryghost-version-notifications-data-service-5.33.1.tgz} +0 -0
- package/components/tryghost-webmentions-5.33.1.tgz +0 -0
- package/core/built/admin/assets/{chunk.143.ad05239cc363254caed7.js → chunk.143.f5f38ca9117a4f365175.js} +23 -23
- package/core/built/admin/assets/{chunk.178.5260f900f09f859bf8ed.js → chunk.178.a31adf7c12e582a2df6c.js} +4 -4
- package/core/built/admin/assets/{chunk.507.aa38cb08f25bae1d4e76.js → chunk.79.c3c2c05ea7ff7707fcad.js} +173 -167
- package/core/built/admin/assets/{chunk.47.f231a64fe3fbaba23b84.js → chunk.963.e47ead5abeca4cf69fed.js} +1003 -1009
- package/core/built/admin/assets/{chunk.47.f231a64fe3fbaba23b84.js.LICENSE.txt → chunk.963.e47ead5abeca4cf69fed.js.LICENSE.txt} +0 -0
- package/core/built/admin/assets/{ghost-4571ad33bd158ced8a9f5c13598fdb7f.js → ghost-b901292f351614337993d673876c1935.js} +136 -120
- package/core/built/admin/assets/{ghost-dark-fb05eb50e216469c5626356731afa42f.css → ghost-dark-ac0cb221eddc8652a0e7c263ed6513dc.css} +1 -1
- package/core/built/admin/assets/{ghost-721a7adc4ca642c88e4ac85e1cb8b385.css → ghost-fb9fb8adbcaf1603ad4006dd2d49e401.css} +1 -1
- package/core/built/admin/assets/img/stripe-3af79c77413d7e58d0322c1de5bfdb8e.svg +1 -0
- package/core/built/admin/index.html +5 -5
- package/core/cli/generate-data.js +3 -1
- package/core/frontend/services/sitemap/base-generator.js +16 -1
- package/core/frontend/services/sitemap/manager.js +6 -0
- package/core/server/services/email-analytics/jobs/index.js +3 -3
- package/core/server/services/email-service/wrapper.js +3 -1
- package/core/server/services/mentions/BookshelfMentionRepository.js +8 -0
- package/core/server/services/mentions/ResourceService.js +45 -0
- package/core/server/services/mentions/RoutingService.js +78 -0
- package/core/server/services/mentions/service.js +19 -32
- package/core/server/services/staff/index.js +4 -1
- package/core/server/services/url/Resources.js +33 -0
- package/core/server/services/url/Urls.js +3 -0
- package/core/server/services/url/config.js +6 -3
- package/core/shared/labs.js +1 -0
- package/package.json +110 -108
- package/yarn.lock +129 -129
- package/components/tryghost-audience-feedback-5.32.0.tgz +0 -0
- package/components/tryghost-constants-5.32.0.tgz +0 -0
- package/components/tryghost-data-generator-5.32.0.tgz +0 -0
- package/components/tryghost-domain-events-5.32.0.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.32.0.tgz +0 -0
- package/components/tryghost-email-content-generator-5.32.0.tgz +0 -0
- package/components/tryghost-email-service-5.32.0.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.32.0.tgz +0 -0
- package/components/tryghost-extract-api-key-5.32.0.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.32.0.tgz +0 -0
- package/components/tryghost-i18n-5.32.0.tgz +0 -0
- package/components/tryghost-link-replacer-5.32.0.tgz +0 -0
- package/components/tryghost-mailgun-client-5.32.0.tgz +0 -0
- package/components/tryghost-member-events-5.32.0.tgz +0 -0
- package/components/tryghost-members-offers-5.32.0.tgz +0 -0
- package/components/tryghost-members-payments-5.32.0.tgz +0 -0
- package/components/tryghost-members-stripe-service-5.32.0.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.32.0.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.32.0.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.32.0.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.32.0.tgz +0 -0
- package/components/tryghost-mw-vhost-5.32.0.tgz +0 -0
- package/components/tryghost-oembed-service-5.32.0.tgz +0 -0
- package/components/tryghost-referrers-5.32.0.tgz +0 -0
- package/components/tryghost-session-service-5.32.0.tgz +0 -0
- package/components/tryghost-staff-service-5.32.0.tgz +0 -0
- package/components/tryghost-update-check-service-5.32.0.tgz +0 -0
- package/components/tryghost-verification-trigger-5.32.0.tgz +0 -0
- package/components/tryghost-webmentions-5.32.0.tgz +0 -0
|
@@ -1,242 +1,248 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]).push([[
|
|
2
|
-
var i=n(8651),
|
|
1
|
+
"use strict";(globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]).push([[79],{38285:(t,e,n)=>{n.d(e,{ro:()=>g,lb:()=>m})
|
|
2
|
+
var i=n(8651),a=n(88521),s=n(16140),r=n(30180),o=n(8142),c=n(48206)
|
|
3
3
|
function _(){const t=(0,c.x1)()
|
|
4
|
-
if(t){const e="internal_error";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&
|
|
4
|
+
if(t){const e="internal_error";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}var d=n(27448),p=n(21535)
|
|
5
5
|
function l(){const t=this.getScope()
|
|
6
6
|
if(t){const e=t.getSpan()
|
|
7
7
|
if(e)return{"sentry-trace":e.toTraceparent()}}return{}}function u(t,e,n){if(!(0,c.zu)(e))return t.sampled=!1,t
|
|
8
8
|
if(void 0!==t.sampled)return t.setMetadata({sampleRate:Number(t.sampled)}),t
|
|
9
9
|
let i
|
|
10
|
-
return"function"==typeof e.tracesSampler?(i=e.tracesSampler(n),t.setMetadata({sampleRate:Number(i)})):void 0!==n.parentSampled?i=n.parentSampled:(i=e.tracesSampleRate,t.setMetadata({sampleRate:Number(i)})),r=i,((0,
|
|
11
|
-
var r}function h(t,e){const n=this.getClient(),i=n&&n.getOptions()||{},
|
|
12
|
-
|
|
10
|
+
return"function"==typeof e.tracesSampler?(i=e.tracesSampler(n),t.setMetadata({sampleRate:Number(i)})):void 0!==n.parentSampled?i=n.parentSampled:(i=e.tracesSampleRate,t.setMetadata({sampleRate:Number(i)})),r=i,((0,s.i2)(r)||"number"!=typeof r&&"boolean"!=typeof r?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(r)} of type ${JSON.stringify(typeof r)}.`),0):!(r<0||r>1)||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${r}.`),0))?i?(t.sampled=Math.random()<i,t.sampled?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`[Tracing] starting ${t.op} transaction - ${t.name}`),t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),t)):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),t.sampled=!1,t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)
|
|
11
|
+
var r}function h(t,e){const n=this.getClient(),i=n&&n.getOptions()||{},s=i.instrumenter||"sentry",r=t.instrumenter||"sentry"
|
|
12
|
+
s!==r&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.error(`A transaction was started with instrumenter=\`${r}\`, but the SDK is configured with the \`${s}\` instrumenter.\nThe transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`),t.sampled=!1)
|
|
13
13
|
let o=new p.Y(t,this)
|
|
14
|
-
return o=u(o,i,{parentSampled:t.parentSampled,transactionContext:t,...e}),o.sampled&&o.initSpanRecorder(i._experiments&&i._experiments.maxSpans),o}function m(t,e,n,i,s,
|
|
15
|
-
let _=new d.io(e,t,n,i,r,
|
|
16
|
-
return _=u(_,c,{parentSampled:e.parentSampled,transactionContext:e,...
|
|
14
|
+
return o=u(o,i,{parentSampled:t.parentSampled,transactionContext:t,...e}),o.sampled&&o.initSpanRecorder(i._experiments&&i._experiments.maxSpans),o}function m(t,e,n,i,a,s,r){const o=t.getClient(),c=o&&o.getOptions()||{}
|
|
15
|
+
let _=new d.io(e,t,n,i,r,a)
|
|
16
|
+
return _=u(_,c,{parentSampled:e.parentSampled,transactionContext:e,...s}),_.sampled&&_.initSpanRecorder(c._experiments&&c._experiments.maxSpans),_}function g(){!function(){const t=(0,i.cu)()
|
|
17
17
|
t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=h),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=l))}(),(0,r.KV)()&&function(){const e=(0,i.cu)()
|
|
18
18
|
if(!e.__SENTRY__)return
|
|
19
|
-
const n={mongodb:()=>new((0,r.l$)(t,"./integrations/node/mongo").Mongo),mongoose:()=>new((0,r.l$)(t,"./integrations/node/mongo").Mongo)({mongoose:!0}),mysql:()=>new((0,r.l$)(t,"./integrations/node/mysql").Mysql),pg:()=>new((0,r.l$)(t,"./integrations/node/postgres").Postgres)},
|
|
20
|
-
|
|
21
|
-
var i=n(88468),
|
|
19
|
+
const n={mongodb:()=>new((0,r.l$)(t,"./integrations/node/mongo").Mongo),mongoose:()=>new((0,r.l$)(t,"./integrations/node/mongo").Mongo)({mongoose:!0}),mysql:()=>new((0,r.l$)(t,"./integrations/node/mysql").Mysql),pg:()=>new((0,r.l$)(t,"./integrations/node/postgres").Postgres)},a=Object.keys(n).filter((t=>!!(0,r.$y)(t))).map((t=>{try{return n[t]()}catch(t){return}})).filter((t=>t))
|
|
20
|
+
a.length>0&&(e.__SENTRY__.integrations=[...e.__SENTRY__.integrations||[],...a])}(),(0,o.o)("error",_),(0,o.o)("unhandledrejection",_)}t=n.hmd(t)},27448:(t,e,n)=>{n.d(e,{hd:()=>_,io:()=>p,mg:()=>c,nT:()=>o})
|
|
21
|
+
var i=n(88468),a=n(88521),s=n(20484),r=n(21535)
|
|
22
22
|
const o=1e3,c=3e4,_=5e3
|
|
23
|
-
class d extends
|
|
24
|
-
super(t,e),this._idleHub=e,this._idleTimeout=n,this._finalTimeout=i,this._heartbeatInterval=
|
|
25
|
-
if(this._finished=!0,this.activities={},this.spanRecorder){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&
|
|
23
|
+
class d extends s.gB{constructor(t,e,n,i){super(i),this._pushActivity=t,this._popActivity=e,this.transactionSpanId=n}add(t){t.spanId!==this.transactionSpanId&&(t.finish=e=>{t.endTimestamp="number"==typeof e?e:(0,i._I)(),this._popActivity(t.spanId)},void 0===t.endTimestamp&&this._pushActivity(t.spanId)),super.add(t)}}class p extends r.Y{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._beforeFinishCallbacks=[]}constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:c,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:_,r=arguments.length>5&&void 0!==arguments[5]&&arguments[5]
|
|
24
|
+
super(t,e),this._idleHub=e,this._idleTimeout=n,this._finalTimeout=i,this._heartbeatInterval=s,this._onScope=r,p.prototype.__init.call(this),p.prototype.__init2.call(this),p.prototype.__init3.call(this),p.prototype.__init4.call(this),r&&(l(e),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),e.configureScope((t=>t.setSpan(this)))),this._startIdleTimeout(),setTimeout((()=>{this._finished||(this.setStatus("deadline_exceeded"),this.finish())}),this._finalTimeout)}finish(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i._I)()
|
|
25
|
+
if(this._finished=!0,this.activities={},this.spanRecorder){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] finishing IdleTransaction",new Date(1e3*t).toISOString(),this.op)
|
|
26
26
|
for(const e of this._beforeFinishCallbacks)e(this,t)
|
|
27
27
|
this.spanRecorder.spans=this.spanRecorder.spans.filter((e=>{if(e.spanId===this.spanId)return!0
|
|
28
|
-
e.endTimestamp||(e.endTimestamp=t,e.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&
|
|
28
|
+
e.endTimestamp||(e.endTimestamp=t,e.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(e,void 0,2)))
|
|
29
29
|
const n=e.startTimestamp<t
|
|
30
|
-
return n||("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&
|
|
30
|
+
return n||("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(e,void 0,2)),n})),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] flushing IdleTransaction")}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] No active IdleTransaction")
|
|
31
31
|
return this._onScope&&l(this._idleHub),super.finish(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){if(!this.spanRecorder){const e=t=>{this._finished||this._pushActivity(t)},n=t=>{this._finished||this._popActivity(t)}
|
|
32
|
-
this.spanRecorder=new d(e,n,this.spanId,t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&
|
|
32
|
+
this.spanRecorder=new d(e,n,this.spanId,t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}_cancelIdleTimeout(){this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0)}_startIdleTimeout(t){this._cancelIdleTimeout(),this._idleTimeoutID=setTimeout((()=>{this._finished||0!==Object.keys(this.activities).length||this.finish(t)}),this._idleTimeout)}_pushActivity(t){this._cancelIdleTimeout(),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`[Tracing] popActivity ${t}`),delete this.activities[t],("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const t=(0,i._I)()+this._idleTimeout/1e3
|
|
33
33
|
this._startIdleTimeout(t)}}_beat(){if(this._finished)return
|
|
34
34
|
const t=Object.keys(this.activities).join("")
|
|
35
|
-
t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&
|
|
36
|
-
e&&e.getTransaction()&&e.setSpan(void 0)}},
|
|
35
|
+
t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this.finish()):this._pingHeartbeat()}_pingHeartbeat(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout((()=>{this._beat()}),this._heartbeatInterval)}}function l(t){const e=t.getScope()
|
|
36
|
+
e&&e.getTransaction()&&e.setSpan(void 0)}},98079:(t,e,n)=>{n.r(e),n.d(e,{BROWSER_TRACING_INTEGRATION_ID:()=>it,BrowserTracing:()=>st,IdleTransaction:()=>U.io,Integrations:()=>i,Span:()=>ct.Dr,SpanStatus:()=>ot,TRACEPARENT_REGEXP:()=>B.K,Transaction:()=>_t.Y,addExtensionMethods:()=>a.ro,defaultRequestInstrumentationOptions:()=>et,extractTraceparentData:()=>B.q,getActiveTransaction:()=>Y.x1,hasTracingEnabled:()=>Y.zu,instrumentOutgoingRequests:()=>nt,spanStatusfromHttpCode:()=>ct.Zd,startIdleTransaction:()=>a.lb,stripUrlQueryAndFragment:()=>o.rt})
|
|
37
37
|
var i={}
|
|
38
|
-
n.r(i),n.d(i,{Apollo:()=>N,BrowserTracing:()=>
|
|
39
|
-
var
|
|
40
|
-
function
|
|
41
|
-
|
|
38
|
+
n.r(i),n.d(i,{Apollo:()=>N,BrowserTracing:()=>st,Express:()=>p,GraphQL:()=>b,Mongo:()=>v,Mysql:()=>T,Postgres:()=>f,Prisma:()=>R})
|
|
39
|
+
var a=n(38285)
|
|
40
|
+
function s(t){let e,n=t[0],i=1
|
|
41
|
+
for(;i<t.length;){const a=t[i],s=t[i+1]
|
|
42
|
+
if(i+=2,("optionalAccess"===a||"optionalCall"===a)&&null==n)return
|
|
43
|
+
"access"===a||"optionalAccess"===a?(e=n,n=s(n)):"call"!==a&&"optionalCall"!==a||(n=s((function(){for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a]
|
|
44
|
+
return n.call(e,...i)})),e=void 0)}return n}var r=n(88521),o=n(72702),c=n(14205),_=n(16140)
|
|
45
|
+
function d(t){const e=s([t,"call",t=>t(),"access",t=>t.getClient,"call",t=>t(),"optionalAccess",t=>t.getOptions,"call",t=>t()])
|
|
46
|
+
return"sentry"!==(s([e,"optionalAccess",t=>t.instrumenter])||"sentry")}class p{static __initStatic(){this.id="Express"}__init(){this.name=p.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
42
47
|
p.prototype.__init.call(this),this._router=t.router||t.app,this._methods=(Array.isArray(t.methods)?t.methods:[]).concat("use")}setupOnce(t,e){this._router?d(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Express Integration is skipped because of instrumenter configuration."):(function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]
|
|
43
48
|
e.forEach((e=>h(t,e)))}(this._router,this._methods),function(t){const e="settings"in t
|
|
44
49
|
e&&void 0===t._router&&t.lazyrouter&&t.lazyrouter()
|
|
45
50
|
const n=e?t._router:t
|
|
46
51
|
if(!n)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.debug("Cannot instrument router for URL Parameterization (did not find a valid router)."),void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.debug("Routing instrumentation is currently only supported in Express 4."))
|
|
47
|
-
const i=Object.getPrototypeOf(n),
|
|
52
|
+
const i=Object.getPrototypeOf(n),a=i.process_params
|
|
48
53
|
i.process_params=function(t,e,n,i,r){n._reconstructedRoute||(n._reconstructedRoute="")
|
|
49
|
-
const{layerRoutePath:d,isRegex:p,isArray:l,numExtraSegments:u}=function(t){const e=(
|
|
54
|
+
const{layerRoutePath:d,isRegex:p,isArray:l,numExtraSegments:u}=function(t){const e=s([t,"access",t=>t.route,"optionalAccess",t=>t.path]),n=(0,_.Kj)(e),i=Array.isArray(e)
|
|
50
55
|
if(!e)return{isRegex:n,isArray:i,numExtraSegments:0}
|
|
51
|
-
const
|
|
52
|
-
return{layerRoutePath:r,isRegex:n,isArray:i,numExtraSegments:
|
|
56
|
+
const a=i?Math.max(e.reduce(((t,e)=>t+(0,o.$A)(e.toString())),0)-(0,o.$A)(t.path||""),0):0,r=function(t,e){return t?e.map((t=>t.toString())).join(","):e&&e.toString()}(i,e)
|
|
57
|
+
return{layerRoutePath:r,isRegex:n,isArray:i,numExtraSegments:a}}(t);(d||p||l)&&(n._hasParameters=!0)
|
|
53
58
|
const h=(d||t.path||"").split("/").filter((t=>t.length>0&&(p||l||!t.includes("*")))).join("/")
|
|
54
59
|
if(h&&h.length>0&&(n._reconstructedRoute+=`/${h}${p?"/":""}`),(0,o.$A)(n.originalUrl||"")+u===(0,o.$A)(n._reconstructedRoute)){n._hasParameters||n._reconstructedRoute!==n.originalUrl&&(n._reconstructedRoute=n.originalUrl)
|
|
55
60
|
const t=i.__sentry_transaction
|
|
56
61
|
if(t&&"custom"!==t.metadata.source){const e=n._reconstructedRoute||"/"
|
|
57
|
-
t.setName(...(0,c.oA)(n,{path:!0,method:!0,customRoute:e}))}}return
|
|
58
|
-
switch(n){case 2:return function(n,i){const
|
|
59
|
-
if(
|
|
62
|
+
t.setName(...(0,c.oA)(n,{path:!0,method:!0,customRoute:e}))}}return a.call(this,t,e,n,i,r)}}(this._router)):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("ExpressIntegration is missing an Express instance")}}function l(t,e){const n=t.length
|
|
63
|
+
switch(n){case 2:return function(n,i){const a=i.__sentry_transaction
|
|
64
|
+
if(a){const n=a.startChild({description:t.name,op:`middleware.express.${e}`})
|
|
60
65
|
i.once("finish",(()=>{n.finish()}))}return t.call(this,n,i)}
|
|
61
|
-
case 3:return function(n,i,
|
|
62
|
-
t.call(this,n,i,(function(){(
|
|
66
|
+
case 3:return function(n,i,a){const r=s([i.__sentry_transaction,"optionalAccess",t=>t.startChild,"call",n=>n({description:t.name,op:`middleware.express.${e}`})])
|
|
67
|
+
t.call(this,n,i,(function(){s([r,"optionalAccess",t=>t.finish,"call",t=>t()])
|
|
63
68
|
for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n]
|
|
64
|
-
|
|
65
|
-
case 4:return function(n,i,
|
|
66
|
-
t.call(this,n,i,
|
|
69
|
+
a.call(this,...e)}))}
|
|
70
|
+
case 4:return function(n,i,a,r){const o=s([a.__sentry_transaction,"optionalAccess",t=>t.startChild,"call",n=>n({description:t.name,op:`middleware.express.${e}`})])
|
|
71
|
+
t.call(this,n,i,a,(function(){s([o,"optionalAccess",t=>t.finish,"call",t=>t()])
|
|
67
72
|
for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n]
|
|
68
73
|
r.call(this,...e)}))}
|
|
69
74
|
default:throw new Error(`Express middleware takes 2-4 arguments. Got: ${n}`)}}function u(t,e){return t.map((t=>"function"==typeof t?l(t,e):Array.isArray(t)?t.map((t=>"function"==typeof t?l(t,e):t)):t))}function h(t,e){const n=t[e]
|
|
70
|
-
return t[e]=function(){for(var t=arguments.length,i=new Array(t),
|
|
75
|
+
return t[e]=function(){for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a]
|
|
71
76
|
return n.call(this,...u(i,e))},t}p.__initStatic()
|
|
72
77
|
var m=n(30180),g=n(15834)
|
|
73
78
|
class f{static __initStatic(){this.id="Postgres"}__init(){this.name=f.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
74
79
|
f.prototype.__init.call(this),this._usePgNative=!!t.usePgNative}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Postgres Integration is skipped because of instrumenter configuration."))
|
|
75
80
|
const n=(0,m.$y)("pg")
|
|
76
81
|
if(!n)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Postgres Integration was unable to require `pg` package."))
|
|
77
|
-
if(this._usePgNative&&!(
|
|
78
|
-
const{Client:i}=this._usePgNative?n.native:n;(0,g.hl)(i.prototype,"query",(function(t){return function(n,i,
|
|
79
|
-
if("function"==typeof
|
|
80
|
-
if("function"==typeof i)return t.call(this,n,(function(t,e){(
|
|
81
|
-
const
|
|
82
|
-
return(0,_.J8)(
|
|
82
|
+
if(this._usePgNative&&!s([n,"access",t=>t.native,"optionalAccess",t=>t.Client]))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Postgres Integration was unable to access 'pg-native' bindings."))
|
|
83
|
+
const{Client:i}=this._usePgNative?n.native:n;(0,g.hl)(i.prototype,"query",(function(t){return function(n,i,a){const r=s([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),o=s([r,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.text,op:"db"})])
|
|
84
|
+
if("function"==typeof a)return t.call(this,n,i,(function(t,e){s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),a(t,e)}))
|
|
85
|
+
if("function"==typeof i)return t.call(this,n,(function(t,e){s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e)}))
|
|
86
|
+
const c=void 0!==i?t.call(this,n,i):t.call(this,n)
|
|
87
|
+
return(0,_.J8)(c)?c.then((t=>(s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),t))):(s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),c)}}))}}f.__initStatic()
|
|
83
88
|
class T{constructor(){T.prototype.__init.call(this)}static __initStatic(){this.id="Mysql"}__init(){this.name=T.id}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Mysql Integration is skipped because of instrumenter configuration."))
|
|
84
89
|
const n=(0,m.$y)("mysql/lib/Connection.js")
|
|
85
|
-
n?(0,g.hl)(n,"createQuery",(function(t){return function(n,i,
|
|
86
|
-
return"function"==typeof
|
|
87
|
-
const E=["aggregate","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","drop","dropIndex","dropIndexes","estimatedDocumentCount","find","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexes","indexExists","indexInformation","initializeOrderedBulkOp","insertMany","insertOne","isCapped","mapReduce","options","parallelCollectionScan","rename","replaceOne","stats","updateMany","updateOne"],
|
|
88
|
-
function
|
|
90
|
+
n?(0,g.hl)(n,"createQuery",(function(t){return function(n,i,a){const r=s([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),o=s([r,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.sql,op:"db"})])
|
|
91
|
+
return"function"==typeof a?t.call(this,n,i,(function(t,e,n){s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),a(t,e,n)})):"function"==typeof i?t.call(this,n,(function(t,e,n){s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e,n)})):t.call(this,n,i,a)}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Mysql Integration was unable to require `mysql` package.")}}T.__initStatic()
|
|
92
|
+
const E=["aggregate","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","drop","dropIndex","dropIndexes","estimatedDocumentCount","find","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexes","indexExists","indexInformation","initializeOrderedBulkOp","insertMany","insertOne","isCapped","mapReduce","options","parallelCollectionScan","rename","replaceOne","stats","updateMany","updateOne"],S={bulkWrite:["operations"],countDocuments:["query"],createIndex:["fieldOrSpec"],createIndexes:["indexSpecs"],deleteMany:["filter"],deleteOne:["filter"],distinct:["key","query"],dropIndex:["indexName"],find:["query"],findOne:["query"],findOneAndDelete:["filter"],findOneAndReplace:["filter","replacement"],findOneAndUpdate:["filter","update"],indexExists:["indexes"],insertMany:["docs"],insertOne:["doc"],mapReduce:["map","reduce"],rename:["newName"],replaceOne:["filter","doc"],updateMany:["filter","update"],updateOne:["filter","update"]}
|
|
93
|
+
function y(t){return t&&"object"==typeof t&&t.once&&"function"==typeof t.once}class v{static __initStatic(){this.id="Mongo"}__init(){this.name=v.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
89
94
|
v.prototype.__init.call(this),this._operations=Array.isArray(t.operations)?t.operations:E,this._describeOperations=!("describeOperations"in t)||t.describeOperations,this._useMongoose=!!t.useMongoose}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Mongo Integration is skipped because of instrumenter configuration."))
|
|
90
95
|
const n=this._useMongoose?"mongoose":"mongodb",i=(0,m.$y)(n)
|
|
91
96
|
i?this._instrumentOperations(i.Collection,this._operations,e):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error(`Mongo Integration was unable to require \`${n}\` package.`)}_instrumentOperations(t,e,n){e.forEach((e=>this._patchOperation(t,e,n)))}_patchOperation(t,e,n){if(!(e in t.prototype))return
|
|
92
|
-
const i=this._getSpanContextFromOperationArguments.bind(this);(0,g.hl)(t.prototype,e,(function(t){return function(){for(var
|
|
93
|
-
const c=r[r.length-1],d=n().getScope(),p=(
|
|
94
|
-
if("function"!=typeof c||"mapReduce"===e&&2===r.length){const n=(
|
|
95
|
-
if((0,_.J8)(
|
|
96
|
-
if(
|
|
97
|
-
try{e.once("close",(()=>{(
|
|
98
|
-
return t.call(this,...r.slice(0,-1),(function(t,e){(
|
|
99
|
-
if(!
|
|
97
|
+
const i=this._getSpanContextFromOperationArguments.bind(this);(0,g.hl)(t.prototype,e,(function(t){return function(){for(var a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o]
|
|
98
|
+
const c=r[r.length-1],d=n().getScope(),p=s([d,"optionalAccess",t=>t.getSpan,"call",t=>t()])
|
|
99
|
+
if("function"!=typeof c||"mapReduce"===e&&2===r.length){const n=s([p,"optionalAccess",t=>t.startChild,"call",t=>t(i(this,e,r))]),a=t.call(this,...r)
|
|
100
|
+
if((0,_.J8)(a))return a.then((t=>(s([n,"optionalAccess",t=>t.finish,"call",t=>t()]),t)))
|
|
101
|
+
if(y(a)){const e=a
|
|
102
|
+
try{e.once("close",(()=>{s([n,"optionalAccess",t=>t.finish,"call",t=>t()])}))}catch(t){s([n,"optionalAccess",t=>t.finish,"call",t=>t()])}return e}return s([n,"optionalAccess",t=>t.finish,"call",t=>t()]),a}const l=s([p,"optionalAccess",t=>t.startChild,"call",t=>t(i(this,e,r.slice(0,-1)))])
|
|
103
|
+
return t.call(this,...r.slice(0,-1),(function(t,e){s([l,"optionalAccess",t=>t.finish,"call",t=>t()]),c(t,e)}))}}))}_getSpanContextFromOperationArguments(t,e,n){const i={collectionName:t.collectionName,dbName:t.dbName,namespace:t.namespace},a={op:"db",description:e,data:i},s=S[e],r=Array.isArray(this._describeOperations)?this._describeOperations.includes(e):this._describeOperations
|
|
104
|
+
if(!s||!r)return a
|
|
100
105
|
try{if("mapReduce"===e){const[t,e]=n
|
|
101
|
-
i[
|
|
106
|
+
i[s[0]]="string"==typeof t?t:t.name||"<anonymous>",i[s[1]]="string"==typeof e?e:e.name||"<anonymous>"}else for(let t=0;t<s.length;t++)i[s[t]]=JSON.stringify(n[t])}catch(t){}return a}}v.__initStatic()
|
|
102
107
|
class R{static __initStatic(){this.id="Prisma"}__init(){this.name=R.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
103
108
|
var e
|
|
104
|
-
R.prototype.__init.call(this),(e=t.client)&&e.$use?this._client=t.client:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`Unsupported Prisma client provided to PrismaIntegration. Provided client: ${JSON.stringify(t.client)}`)}setupOnce(t,e){this._client?d(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Prisma Integration is skipped because of instrumenter configuration."):this._client.$use(((t,n)=>{const i=e().getScope(),
|
|
105
|
-
return(0,_.J8)(
|
|
109
|
+
R.prototype.__init.call(this),(e=t.client)&&e.$use?this._client=t.client:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`Unsupported Prisma client provided to PrismaIntegration. Provided client: ${JSON.stringify(t.client)}`)}setupOnce(t,e){this._client?d(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Prisma Integration is skipped because of instrumenter configuration."):this._client.$use(((t,n)=>{const i=s([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=t.action,r=t.model,o=s([i,"optionalAccess",t=>t.startChild,"call",t=>t({description:r?`${r} ${a}`:a,op:"db.sql.prisma"})]),c=n(t)
|
|
110
|
+
return(0,_.J8)(c)?c.then((t=>(s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),t))):(s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),c)})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("PrismaIntegration is missing a Prisma Client Instance")}}R.__initStatic()
|
|
106
111
|
class b{constructor(){b.prototype.__init.call(this)}static __initStatic(){this.id="GraphQL"}__init(){this.name=b.id}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("GraphQL Integration is skipped because of instrumenter configuration."))
|
|
107
112
|
const n=(0,m.$y)("graphql/execution/execute.js")
|
|
108
|
-
n?(0,g.hl)(n,"execute",(function(t){return function(){const n=e().getScope(),i=(
|
|
113
|
+
n?(0,g.hl)(n,"execute",(function(t){return function(){const n=e().getScope(),i=s([n,"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=s([i,"optionalAccess",t=>t.startChild,"call",t=>t({description:"execute",op:"graphql.execute"})])
|
|
114
|
+
s([n,"optionalAccess",t=>t.setSpan,"call",t=>t(a)])
|
|
109
115
|
for(var r=arguments.length,o=new Array(r),c=0;c<r;c++)o[c]=arguments[c]
|
|
110
116
|
const d=t.call(this,...o)
|
|
111
|
-
return(0,_.J8)(d)?d.then((t=>((
|
|
117
|
+
return(0,_.J8)(d)?d.then((t=>(s([a,"optionalAccess",t=>t.finish,"call",t=>t()]),s([n,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),t))):(s([a,"optionalAccess",t=>t.finish,"call",t=>t()]),s([n,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),d)}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("GraphQL Integration was unable to require graphql/execution package.")}}b.__initStatic()
|
|
112
118
|
var D=n(7209)
|
|
113
119
|
class N{constructor(){N.prototype.__init.call(this)}static __initStatic(){this.id="Apollo"}__init(){this.name=N.id}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Apollo Integration is skipped because of instrumenter configuration."))
|
|
114
120
|
const n=(0,m.$y)("apollo-server-core")
|
|
115
121
|
n?(0,g.hl)(n.ApolloServerBase.prototype,"constructSchema",(function(t){return function(){if(!this.config.resolvers)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this.config.schema?r.kg.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property."):this.config.modules&&r.kg.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property."),r.kg.error("Skipping tracing as no resolvers found on the `ApolloServer` instance.")),t.call(this)
|
|
116
122
|
const n=(0,D.lE)(this.config.resolvers)
|
|
117
|
-
return this.config.resolvers=n.map((t=>(Object.keys(t).forEach((n=>{Object.keys(t[n]).forEach((i=>{"function"==typeof t[n][i]&&function(t,e,n,i){(0,g.hl)(t[e],n,(function(t){return function(){const s
|
|
118
|
-
for(var
|
|
119
|
-
const
|
|
120
|
-
return(0,_.J8)(
|
|
121
|
-
var
|
|
122
|
-
const
|
|
123
|
-
var
|
|
124
|
-
const
|
|
125
|
-
return
|
|
123
|
+
return this.config.resolvers=n.map((t=>(Object.keys(t).forEach((n=>{Object.keys(t[n]).forEach((i=>{"function"==typeof t[n][i]&&function(t,e,n,i){(0,g.hl)(t[e],n,(function(t){return function(){const a=s([i().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),r=s([a,"optionalAccess",t=>t.startChild,"call",t=>t({description:`${e}.${n}`,op:"graphql.resolve"})])
|
|
124
|
+
for(var o=arguments.length,c=new Array(o),d=0;d<o;d++)c[d]=arguments[d]
|
|
125
|
+
const p=t.call(this,...c)
|
|
126
|
+
return(0,_.J8)(p)?p.then((t=>(s([r,"optionalAccess",t=>t.finish,"call",t=>t()]),t))):(s([r,"optionalAccess",t=>t.finish,"call",t=>t()]),p)}}))}(t,n,i,e)}))})),t))),t.call(this)}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Apollo Integration was unable to require apollo-server-core package.")}}N.__initStatic()
|
|
127
|
+
var B=n(75492),k=n(22850),G=n(68256),U=n(27448),Y=n(48206)
|
|
128
|
+
const x=n(27083).n2
|
|
129
|
+
var I=n(88468)
|
|
130
|
+
const A=(t,e,n)=>{let i,a
|
|
131
|
+
return s=>{e.value>=0&&(s||n)&&(a=e.value-(i||0),(a||void 0===i)&&(i=e.value,e.delta=a,t(e)))}},C=()=>x.__WEB_VITALS_POLYFILL__?x.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=x.performance.timing,e=x.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==e?"back_forward":1===e?"reload":"navigate"}
|
|
126
132
|
for(const i in t)"navigationStart"!==i&&"toJSON"!==i&&(n[i]=Math.max(t[i]-t.navigationStart,0))
|
|
127
|
-
return n})()):
|
|
128
|
-
return t&&t.activationStart||0}
|
|
133
|
+
return n})()):x.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],O=()=>{const t=C()
|
|
134
|
+
return t&&t.activationStart||0},w=(t,e)=>{const n=C()
|
|
129
135
|
let i="navigate"
|
|
130
|
-
return n&&(i=
|
|
131
|
-
return i.observe(Object.assign({type:t,buffered:!0},n||{})),i}}catch(t){}},L=(t,e)=>{const n=i=>{"pagehide"!==i.type&&"hidden"!==
|
|
136
|
+
return n&&(i=x.document.prerendering||O()>0?"prerender":n.type.replace(/_/g,"-")),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:i}},$=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const i=new PerformanceObserver((t=>{e(t.getEntries())}))
|
|
137
|
+
return i.observe(Object.assign({type:t,buffered:!0},n||{})),i}}catch(t){}},L=(t,e)=>{const n=i=>{"pagehide"!==i.type&&"hidden"!==x.document.visibilityState||(t(i),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))}
|
|
132
138
|
addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)}
|
|
133
|
-
let
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
function
|
|
137
|
-
return n&&t.startTimestamp>n&&(t.startTimestamp=n),t.startChild({startTimestamp:n,...i})}function
|
|
138
|
-
function
|
|
139
|
-
o&&r&&
|
|
139
|
+
let M=-1
|
|
140
|
+
const P=()=>(M<0&&(M="hidden"!==x.document.visibilityState||x.document.prerendering?1/0:0,L((t=>{let{timeStamp:e}=t
|
|
141
|
+
M=e}),!0)),{get firstHiddenTime(){return M}}),q={}
|
|
142
|
+
function H(t){return"number"==typeof t&&isFinite(t)}function F(t,e){let{startTimestamp:n,...i}=e
|
|
143
|
+
return n&&t.startTimestamp>n&&(t.startTimestamp=n),t.startChild({startTimestamp:n,...i})}function j(){return x&&x.addEventListener&&x.performance}let z,X,J=0,Q={}
|
|
144
|
+
function W(t,e,n,i,a,s){const r=s?e[s]:e[`${n}End`],o=e[`${n}Start`]
|
|
145
|
+
o&&r&&F(t,{op:"browser",description:a||n,startTimestamp:i+(0,Y.XL)(o),endTimestamp:i+(0,Y.XL)(r)})}var Z=n(8651),K=n(8142),V=n(98902)
|
|
140
146
|
const tt=["localhost",/^\//],et={traceFetch:!0,traceXHR:!0,tracingOrigins:tt,tracePropagationTargets:tt}
|
|
141
|
-
function nt(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:i,tracingOrigins:
|
|
147
|
+
function nt(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:i,tracingOrigins:a,shouldCreateSpanForRequest:s}={traceFetch:et.traceFetch,traceXHR:et.traceXHR,...t},r="function"==typeof s?s:t=>!0,o=t=>function(t,e){return(0,V.U0)(t,e||tt)}(t,i||a),c={}
|
|
142
148
|
e&&(0,K.o)("fetch",(t=>{!function(t,e,n,i){if(!(0,Y.zu)()||!t.fetchData||!e(t.fetchData.url))return
|
|
143
149
|
if(t.endTimestamp){const e=t.fetchData.__span
|
|
144
150
|
if(!e)return
|
|
145
151
|
const n=i[e]
|
|
146
|
-
return void(n&&(t.response?n.setHttpStatus(t.response.status):t.error&&n.setStatus("internal_error"),n.finish(),delete i[e]))}const
|
|
147
|
-
if(s){const e=s.startChild({data:{...t.fetchData,type:"fetch"},description:`${t.fetchData.method} ${t.fetchData.url}`,op:"http.client"})
|
|
152
|
+
return void(n&&(t.response?n.setHttpStatus(t.response.status):t.error&&n.setStatus("internal_error"),n.finish(),delete i[e]))}const a=(0,Z.Gd)().getScope(),s=a&&a.getSpan(),r=s&&s.transaction
|
|
153
|
+
if(s&&r){const e=s.startChild({data:{...t.fetchData,type:"fetch"},description:`${t.fetchData.method} ${t.fetchData.url}`,op:"http.client"})
|
|
148
154
|
t.fetchData.__span=e.spanId,i[e.spanId]=e
|
|
149
155
|
const a=t.args[0]
|
|
150
156
|
t.args[1]=t.args[1]||{}
|
|
151
|
-
const
|
|
152
|
-
n(t.fetchData.url)&&(
|
|
157
|
+
const o=t.args[1]
|
|
158
|
+
n(t.fetchData.url)&&(o.headers=function(t,e,n,i){const a=(0,k.IQ)(e),s=n.toTraceparent(),r="undefined"!=typeof Request&&(0,_.V9)(t,Request)?t.headers:i.headers
|
|
153
159
|
if(r){if("undefined"!=typeof Headers&&(0,_.V9)(r,Headers)){const t=new Headers(r)
|
|
154
|
-
return t.append("sentry-trace",
|
|
155
|
-
return
|
|
156
|
-
return Array.isArray(t)?e.push(...t):t&&e.push(t),
|
|
157
|
-
const
|
|
160
|
+
return t.append("sentry-trace",s),a&&t.append(k.bU,a),t}if(Array.isArray(r)){const t=[...r,["sentry-trace",s]]
|
|
161
|
+
return a&&t.push([k.bU,a]),t}{const t="baggage"in r?r.baggage:void 0,e=[]
|
|
162
|
+
return Array.isArray(t)?e.push(...t):t&&e.push(t),a&&e.push(a),{...r,"sentry-trace":s,baggage:e.length>0?e.join(","):void 0}}}return{"sentry-trace":s,baggage:a}}(a,r.getDynamicSamplingContext(),e,o),r.metadata.propagations++)}}(t,r,o,c)})),n&&(0,K.o)("xhr",(t=>{!function(t,e,n,i){if(!(0,Y.zu)()||t.xhr&&t.xhr.__sentry_own_request__||!(t.xhr&&t.xhr.__sentry_xhr__&&e(t.xhr.__sentry_xhr__.url)))return
|
|
163
|
+
const a=t.xhr.__sentry_xhr__
|
|
158
164
|
if(t.endTimestamp){const e=t.xhr.__sentry_xhr_span_id__
|
|
159
165
|
if(!e)return
|
|
160
166
|
const n=i[e]
|
|
161
|
-
return void(n&&(n.setHttpStatus(
|
|
162
|
-
if(
|
|
167
|
+
return void(n&&(n.setHttpStatus(a.status_code),n.finish(),delete i[e]))}const s=(0,Z.Gd)().getScope(),r=s&&s.getSpan(),o=r&&r.transaction
|
|
168
|
+
if(r&&o){const e=r.startChild({data:{...a.data,type:"xhr",method:a.method,url:a.url},description:`${a.method} ${a.url}`,op:"http.client"})
|
|
163
169
|
if(t.xhr.__sentry_xhr_span_id__=e.spanId,i[t.xhr.__sentry_xhr_span_id__]=e,t.xhr.setRequestHeader&&n(t.xhr.__sentry_xhr__.url))try{t.xhr.setRequestHeader("sentry-trace",e.toTraceparent())
|
|
164
|
-
const n=
|
|
165
|
-
i&&t.xhr.setRequestHeader(k.bU,i),
|
|
166
|
-
if(!
|
|
167
|
-
let i,
|
|
168
|
-
e&&(i=t({name:
|
|
169
|
-
void 0===a
|
|
170
|
-
class
|
|
171
|
-
t&&
|
|
172
|
-
let n,i=0,
|
|
173
|
-
const
|
|
174
|
-
i&&0!==
|
|
175
|
-
o&&(n=
|
|
176
|
-
e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding CLS"),
|
|
170
|
+
const n=o.getDynamicSamplingContext(),i=(0,k.IQ)(n)
|
|
171
|
+
i&&t.xhr.setRequestHeader(k.bU,i),o.metadata.propagations++}catch(t){}}}(t,r,o,c)}))}const it="BrowserTracing",at={idleTimeout:U.nT,finalTimeout:U.mg,heartbeatInterval:U.hd,markBackgroundTransactions:!0,routingInstrumentation:function(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2]
|
|
172
|
+
if(!x||!x.location)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn("Could not initialize routing instrumentation due to invalid location"))
|
|
173
|
+
let i,a=x.location.href
|
|
174
|
+
e&&(i=t({name:x.location.pathname,op:"pageload",metadata:{source:"url"}})),n&&(0,K.o)("history",(e=>{let{to:n,from:s}=e
|
|
175
|
+
void 0===s&&a&&-1!==a.indexOf(n)?a=void 0:s!==n&&(a=void 0,i&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.finish()),i=t({name:x.location.pathname,op:"navigation",metadata:{source:"url"}}))}))},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...et}
|
|
176
|
+
class st{__init(){this.name=it}constructor(t){st.prototype.__init.call(this),this.options={...at,...t},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),function(){const t=j()
|
|
177
|
+
t&&I.Z1&&(t.mark&&x.performance.mark("sentry-tracing-init"),(t=>{const e=w("CLS",0)
|
|
178
|
+
let n,i=0,a=[]
|
|
179
|
+
const s=t=>{t.forEach((t=>{if(!t.hadRecentInput){const s=a[0],r=a[a.length-1]
|
|
180
|
+
i&&0!==a.length&&t.startTime-r.startTime<1e3&&t.startTime-s.startTime<5e3?(i+=t.value,a.push(t)):(i=t.value,a=[t]),i>e.value&&(e.value=i,e.entries=a,n&&n())}}))},o=$("layout-shift",s)
|
|
181
|
+
o&&(n=A((t=>{const e=t.entries.pop()
|
|
182
|
+
e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding CLS"),Q.cls={value:t.value,unit:""},X=e)}),e),L((()=>{s(o.takeRecords()),n(!0)})))})(),(t=>{const e=P(),n=w("LCP")
|
|
177
183
|
let i
|
|
178
|
-
const
|
|
179
|
-
if(
|
|
180
|
-
t<e.firstHiddenTime&&(n.value=t,n.entries=[
|
|
181
|
-
if(
|
|
182
|
-
e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding LCP"),
|
|
183
|
-
const t=()=>{
|
|
184
|
+
const a=t=>{const a=t[t.length-1]
|
|
185
|
+
if(a){const t=Math.max(a.startTime-O(),0)
|
|
186
|
+
t<e.firstHiddenTime&&(n.value=t,n.entries=[a],i())}},s=$("largest-contentful-paint",a)
|
|
187
|
+
if(s){i=A((t=>{const e=t.entries.pop()
|
|
188
|
+
e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding LCP"),Q.lcp={value:t.value,unit:"millisecond"},z=e)}),n)
|
|
189
|
+
const t=()=>{q[n.id]||(a(s.takeRecords()),s.disconnect(),q[n.id]=!0,i(!0))};["keydown","click"].forEach((e=>{addEventListener(e,t,{once:!0,capture:!0})})),L(t,!0)}})(),(t=>{const e=P(),n=w("FID")
|
|
184
190
|
let i
|
|
185
|
-
const
|
|
186
|
-
i=
|
|
191
|
+
const a=t=>{t.startTime<e.firstHiddenTime&&(n.value=t.processingStart-t.startTime,n.entries.push(t),i(!0))},s=t=>{t.forEach(a)},o=$("first-input",s)
|
|
192
|
+
i=A((t=>{const e=t.entries.pop()
|
|
187
193
|
if(!e)return
|
|
188
|
-
const n=(0,Y.XL)(
|
|
194
|
+
const n=(0,Y.XL)(I.Z1),i=(0,Y.XL)(e.startTime);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding FID"),Q.fid={value:t.value,unit:"millisecond"},Q["mark.fid"]={value:n+i,unit:"second"}}),n),o&&L((()=>{s(o.takeRecords()),o.disconnect()}),!0)})())}(),this.options.enableLongTask&&$("longtask",(t=>{for(const e of t){const t=(0,Y.x1)()
|
|
189
195
|
if(!t)return
|
|
190
|
-
const n=(0,Y.XL)(
|
|
196
|
+
const n=(0,Y.XL)(I.Z1+e.startTime),i=(0,Y.XL)(e.duration)
|
|
191
197
|
t.startChild({description:"Main UI thread blocked",op:"ui.long-task",startTimestamp:n,endTimestamp:n+i})}}))}setupOnce(t,e){this._getCurrentHub=e
|
|
192
|
-
const{routingInstrumentation:n,startTransactionOnLocationChange:i,startTransactionOnPageLoad:
|
|
193
|
-
n((t=>this._createRouteTransaction(t)),
|
|
194
|
-
if(
|
|
195
|
-
const{beforeNavigate:e,idleTimeout:n,finalTimeout:i,heartbeatInterval:
|
|
196
|
-
|
|
197
|
-
const
|
|
198
|
-
return
|
|
199
|
-
if(!e||!
|
|
200
|
-
const n=(0,Y.XL)(
|
|
201
|
-
let s
|
|
202
|
-
if(i.slice(
|
|
203
|
-
if(!("navigation"===t.op&&n+i<t.startTimestamp))switch(e.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach((i=>{
|
|
198
|
+
const{routingInstrumentation:n,startTransactionOnLocationChange:i,startTransactionOnPageLoad:a,markBackgroundTransactions:s,traceFetch:o,traceXHR:c,tracePropagationTargets:_,shouldCreateSpanForRequest:d,_experiments:p}=this.options
|
|
199
|
+
n((t=>this._createRouteTransaction(t)),a,i),s&&(x&&x.document?x.document.addEventListener("visibilitychange",(()=>{const t=(0,Y.x1)()
|
|
200
|
+
if(x.document.hidden&&t){const e="cancelled";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${t.op}`),t.status||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.finish()}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn("[Tracing] Could not set up background tab detection due to lack of global document")),p.enableInteractions&&this._registerInteractionListener(),nt({traceFetch:o,traceXHR:c,tracePropagationTargets:_,shouldCreateSpanForRequest:d})}_createRouteTransaction(t){if(!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`))
|
|
201
|
+
const{beforeNavigate:e,idleTimeout:n,finalTimeout:i,heartbeatInterval:s}=this.options,o="pageload"===t.op,c=o?rt("sentry-trace"):null,_=o?rt("baggage"):null,d=c?(0,B.q)(c):void 0,p=_?(0,k.EN)(_):void 0,l={...t,...d,metadata:{...t.metadata,dynamicSamplingContext:d&&!p?{}:p},trimEnd:!0},u="function"==typeof e?e(l):l,h=void 0===u?{...l,sampled:!1}:u
|
|
202
|
+
h.metadata=h.name!==l.name?{...h.metadata,source:"custom"}:h.metadata,this._latestRouteName=h.name,this._latestRouteSource=h.metadata&&h.metadata.source,!1===h.sampled&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Will not send ${h.op} transaction because of beforeNavigate.`),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Starting ${h.op} transaction on scope`)
|
|
203
|
+
const m=this._getCurrentHub(),{location:g}=x,f=(0,a.lb)(m,h,n,i,!0,{location:g},s)
|
|
204
|
+
return f.registerBeforeFinishCallback((t=>{!function(t){const e=j()
|
|
205
|
+
if(!e||!x.performance.getEntries||!I.Z1)return;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Tracing] Adding & adjusting spans using Performance API")
|
|
206
|
+
const n=(0,Y.XL)(I.Z1),i=e.getEntries()
|
|
207
|
+
let a,s
|
|
208
|
+
if(i.slice(J).forEach((e=>{const i=(0,Y.XL)(e.startTime),o=(0,Y.XL)(e.duration)
|
|
209
|
+
if(!("navigation"===t.op&&n+i<t.startTimestamp))switch(e.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach((i=>{W(t,e,i,n)})),W(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),W(t,e,"fetch",n,"cache","domainLookupStart"),W(t,e,"domainLookup",n,"DNS"),function(t,e,n){F(t,{op:"browser",description:"request",startTimestamp:n+(0,Y.XL)(e.requestStart),endTimestamp:n+(0,Y.XL)(e.responseEnd)}),F(t,{op:"browser",description:"response",startTimestamp:n+(0,Y.XL)(e.responseStart),endTimestamp:n+(0,Y.XL)(e.responseEnd)})}(t,e,n)}(t,e,n),a=n+(0,Y.XL)(e.responseStart),s=n+(0,Y.XL)(e.requestStart)
|
|
204
210
|
break
|
|
205
|
-
case"mark":case"paint":case"measure":{!function(t,e,n,i,
|
|
206
|
-
|
|
207
|
-
const
|
|
208
|
-
"first-paint"===e.name&&
|
|
209
|
-
break}case"resource":{const
|
|
210
|
-
!function(t,e,n,i,s
|
|
211
|
+
case"mark":case"paint":case"measure":{!function(t,e,n,i,a){const s=a+n,r=s+i
|
|
212
|
+
F(t,{description:e.name,endTimestamp:r,op:e.entryType,startTimestamp:s})}(t,e,i,o,n)
|
|
213
|
+
const a=P(),s=e.startTime<a.firstHiddenTime
|
|
214
|
+
"first-paint"===e.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding FP"),Q.fp={value:e.startTime,unit:"millisecond"}),"first-contentful-paint"===e.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding FCP"),Q.fcp={value:e.startTime,unit:"millisecond"})
|
|
215
|
+
break}case"resource":{const a=e.name.replace(x.location.origin,"")
|
|
216
|
+
!function(t,e,n,i,a,s){if("xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType)return
|
|
211
217
|
const r={}
|
|
212
218
|
"transferSize"in e&&(r["Transfer Size"]=e.transferSize),"encodedBodySize"in e&&(r["Encoded Body Size"]=e.encodedBodySize),"decodedBodySize"in e&&(r["Decoded Body Size"]=e.decodedBodySize)
|
|
213
|
-
const o=
|
|
214
|
-
|
|
215
|
-
break}}})),
|
|
219
|
+
const o=s+i
|
|
220
|
+
F(t,{description:n,endTimestamp:o+a,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",startTimestamp:o,data:r})}(t,e,a,i,o,n)
|
|
221
|
+
break}}})),J=Math.max(i.length-1,0),function(t){const e=x.navigator
|
|
216
222
|
if(!e)return
|
|
217
223
|
const n=e.connection
|
|
218
|
-
n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),
|
|
219
|
-
const i=
|
|
220
|
-
const e=
|
|
221
|
-
e&&
|
|
222
|
-
const e=()=>{const{idleTimeout:e,finalTimeout:n,heartbeatInterval:i}=this.options,
|
|
223
|
-
if(t&&(t.finish(),t=void 0),!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${
|
|
224
|
-
if(!this._latestRouteName)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${
|
|
225
|
-
const o=this._getCurrentHub(),{location:c}=
|
|
226
|
-
t=(0,
|
|
224
|
+
n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),H(n.rtt)&&(Q["connection.rtt"]={value:n.rtt,unit:"millisecond"})),H(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`),H(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}(t),"pageload"===t.op){"number"==typeof a&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding TTFB"),Q.ttfb={value:1e3*(a-t.startTimestamp),unit:"millisecond"},"number"==typeof s&&s<=a&&(Q["ttfb.requestTime"]={value:1e3*(a-s),unit:"millisecond"})),["fcp","fp","lcp"].forEach((e=>{if(!Q[e]||n>=t.startTimestamp)return
|
|
225
|
+
const i=Q[e].value,a=n+(0,Y.XL)(i),s=Math.abs(1e3*(a-t.startTimestamp)),o=s-i;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Measurements] Normalized ${e} from ${i} to ${s} (${o})`),Q[e].value=s}))
|
|
226
|
+
const e=Q["mark.fid"]
|
|
227
|
+
e&&Q.fid&&(F(t,{description:"first input delay",endTimestamp:e.value+(0,Y.XL)(Q.fid.value),op:"ui.action",startTimestamp:e.value}),delete Q["mark.fid"]),"fcp"in Q||delete Q.cls,Object.keys(Q).forEach((e=>{t.setMeasurement(e,Q[e].value,Q[e].unit)})),function(t){z&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding LCP Data"),z.element&&t.setTag("lcp.element",(0,G.Rt)(z.element)),z.id&&t.setTag("lcp.id",z.id),z.url&&t.setTag("lcp.url",z.url.trim().slice(0,200)),t.setTag("lcp.size",z.size)),X&&X.sources&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding CLS Data"),X.sources.forEach(((e,n)=>t.setTag(`cls.source.${n+1}`,(0,G.Rt)(e.node)))))}(t)}z=void 0,X=void 0,Q={}}(t)})),f}_registerInteractionListener(){let t
|
|
228
|
+
const e=()=>{const{idleTimeout:e,finalTimeout:n,heartbeatInterval:i}=this.options,s="ui.action.click"
|
|
229
|
+
if(t&&(t.finish(),t=void 0),!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${s} transaction because _getCurrentHub is invalid.`))
|
|
230
|
+
if(!this._latestRouteName)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`))
|
|
231
|
+
const o=this._getCurrentHub(),{location:c}=x,_={name:this._latestRouteName,op:s,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}}
|
|
232
|
+
t=(0,a.lb)(o,_,e,n,!0,{location:c},i)};["click"].forEach((t=>{addEventListener(t,e,{once:!1,capture:!0})}))}}function rt(t){const e=(0,G.qT)(`meta[name=${t}]`)
|
|
227
233
|
return e?e.getAttribute("content"):null}var ot,ct=n(20484)
|
|
228
234
|
!function(t){t.Ok="ok",t.DeadlineExceeded="deadline_exceeded",t.Unauthenticated="unauthenticated",t.PermissionDenied="permission_denied",t.NotFound="not_found",t.ResourceExhausted="resource_exhausted",t.InvalidArgument="invalid_argument",t.Unimplemented="unimplemented",t.Unavailable="unavailable",t.InternalError="internal_error",t.UnknownError="unknown_error",t.Cancelled="cancelled",t.AlreadyExists="already_exists",t.FailedPrecondition="failed_precondition",t.Aborted="aborted",t.OutOfRange="out_of_range",t.DataLoss="data_loss"}(ot||(ot={}))
|
|
229
|
-
var _t=n(21535);("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&(0,
|
|
230
|
-
var i=n(
|
|
231
|
-
class
|
|
232
|
-
|
|
233
|
-
t.traceId&&(this.traceId=t.traceId),t.spanId&&(this.spanId=t.spanId),t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this.sampled=t.sampled),t.op&&(this.op=t.op),t.description&&(this.description=t.description),t.data&&(this.data=t.data),t.tags&&(this.tags=t.tags),t.status&&(this.status=t.status),t.startTimestamp&&(this.startTimestamp=t.startTimestamp),t.endTimestamp&&(this.endTimestamp=t.endTimestamp),t.instrumenter&&(this.instrumenter=t.instrumenter)}startChild(t){const e=new
|
|
235
|
+
var _t=n(21535);("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&(0,a.ro)()},20484:(t,e,n)=>{n.d(e,{Dr:()=>c,Zd:()=>_,gB:()=>o})
|
|
236
|
+
var i=n(7209),a=n(88468),s=n(88521),r=n(15834)
|
|
237
|
+
class o{__init(){this.spans=[]}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3
|
|
238
|
+
o.prototype.__init.call(this),this._maxlen=t}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class c{__init2(){this.traceId=(0,i.DM)()}__init3(){this.spanId=(0,i.DM)().substring(16)}__init4(){this.startTimestamp=(0,a._I)()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(t){if(c.prototype.__init2.call(this),c.prototype.__init3.call(this),c.prototype.__init4.call(this),c.prototype.__init5.call(this),c.prototype.__init6.call(this),c.prototype.__init7.call(this),!t)return this
|
|
239
|
+
t.traceId&&(this.traceId=t.traceId),t.spanId&&(this.spanId=t.spanId),t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this.sampled=t.sampled),t.op&&(this.op=t.op),t.description&&(this.description=t.description),t.data&&(this.data=t.data),t.tags&&(this.tags=t.tags),t.status&&(this.status=t.status),t.startTimestamp&&(this.startTimestamp=t.startTimestamp),t.endTimestamp&&(this.endTimestamp=t.endTimestamp),t.instrumenter&&(this.instrumenter=t.instrumenter)}startChild(t){const e=new c({...t,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId})
|
|
234
240
|
if(e.spanRecorder=this.spanRecorder,e.spanRecorder&&e.spanRecorder.add(e),e.transaction=this.transaction,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&e.transaction){const n=`[Tracing] Starting '${t&&t.op||"< unknown op >"}' span on transaction '${e.transaction.name||"< unknown name >"}' (${e.transaction.spanId}).`
|
|
235
|
-
e.transaction.metadata.spanMetadata[e.spanId]={logMessage:n},
|
|
236
|
-
const e=
|
|
241
|
+
e.transaction.metadata.spanMetadata[e.spanId]={logMessage:n},s.kg.log(n)}return e}setTag(t,e){return this.tags={...this.tags,[t]:e},this}setData(t,e){return this.data={...this.data,[t]:e},this}setStatus(t){return this.status=t,this}setHttpStatus(t){this.setTag("http.status_code",String(t))
|
|
242
|
+
const e=_(t)
|
|
237
243
|
return"unknown_error"!==e&&this.setStatus(e),this}isSuccess(){return"ok"===this.status}finish(t){if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){const{logMessage:t}=this.transaction.metadata.spanMetadata[this.spanId]
|
|
238
|
-
t&&
|
|
239
|
-
return void 0!==this.sampled&&(t=this.sampled?"-1":"-0"),`${this.traceId}-${this.spanId}${t}`}toContext(){return(0,
|
|
244
|
+
t&&s.kg.log(t.replace("Starting","Finishing"))}this.endTimestamp="number"==typeof t?t:(0,a._I)()}toTraceparent(){let t=""
|
|
245
|
+
return void 0!==this.sampled&&(t=this.sampled?"-1":"-0"),`${this.traceId}-${this.spanId}${t}`}toContext(){return(0,r.Jr)({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(t){return this.data=t.data||{},this.description=t.description,this.endTimestamp=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this.sampled=t.sampled,this.spanId=t.spanId||this.spanId,this.startTimestamp=t.startTimestamp||this.startTimestamp,this.status=t.status,this.tags=t.tags||{},this.traceId=t.traceId||this.traceId,this}getTraceContext(){return(0,r.Jr)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return(0,r.Jr)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}}function _(t){if(t<400&&t>=100)return"ok"
|
|
240
246
|
if(t>=400&&t<500)switch(t){case 401:return"unauthenticated"
|
|
241
247
|
case 403:return"permission_denied"
|
|
242
248
|
case 404:return"not_found"
|
|
@@ -246,28 +252,28 @@ case 429:return"resource_exhausted"
|
|
|
246
252
|
default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented"
|
|
247
253
|
case 503:return"unavailable"
|
|
248
254
|
case 504:return"deadline_exceeded"
|
|
249
|
-
default:return"internal_error"}return"unknown_error"}},21535:(t,e,n)=>{n.d(e,{Y:()=>
|
|
250
|
-
var i=n(
|
|
251
|
-
class
|
|
255
|
+
default:return"internal_error"}return"unknown_error"}},21535:(t,e,n)=>{n.d(e,{Y:()=>c})
|
|
256
|
+
var i=n(8651),a=n(88468),s=n(88521),r=n(15834),o=n(20484)
|
|
257
|
+
class c extends o.Dr{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(t,e){super(t),c.prototype.__init.call(this),c.prototype.__init2.call(this),c.prototype.__init3.call(this),this._hub=e||(0,i.Gd)(),this._name=t.name||"",this.metadata={source:"custom",...t.metadata,spanMetadata:{},changes:[],propagations:0},this._trimEnd=t.trimEnd,this.transaction=this
|
|
252
258
|
const n=this.metadata.dynamicSamplingContext
|
|
253
259
|
n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(t){this.setName(t)}setName(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"custom"
|
|
254
260
|
t===this.name&&e===this.metadata.source||this.metadata.changes.push({source:this.metadata.source,timestamp:(0,a.ph)(),propagations:this.metadata.propagations}),this._name=t,this.metadata.source=e}initSpanRecorder(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3
|
|
255
|
-
this.spanRecorder||(this.spanRecorder=new
|
|
261
|
+
this.spanRecorder||(this.spanRecorder=new o.gB(t)),this.spanRecorder.add(this)}setContext(t,e){null===e?delete this._contexts[t]:this._contexts[t]=e}setMeasurement(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:""
|
|
256
262
|
this._measurements[t]={value:e,unit:n}}setMetadata(t){this.metadata={...this.metadata,...t}}finish(t){if(void 0!==this.endTimestamp)return
|
|
257
|
-
if(this.name||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&
|
|
263
|
+
if(this.name||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(t),!0!==this.sampled){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled.")
|
|
258
264
|
const t=this._hub.getClient()
|
|
259
265
|
return void(t&&t.recordDroppedEvent("sample_rate","transaction"))}const e=this.spanRecorder?this.spanRecorder.spans.filter((t=>t!==this&&t.endTimestamp)):[]
|
|
260
266
|
this._trimEnd&&e.length>0&&(this.endTimestamp=e.reduce(((t,e)=>t.endTimestamp&&e.endTimestamp?t.endTimestamp>e.endTimestamp?t:e:t)).endTimestamp)
|
|
261
267
|
const n=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:e,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...n,dynamicSamplingContext:this.getDynamicSamplingContext()},...n.source&&{transaction_info:{source:n.source,changes:n.changes,propagations:n.propagations}}}
|
|
262
|
-
return Object.keys(this._measurements).length>0&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&
|
|
263
|
-
return(0,
|
|
264
|
-
const t=this._hub||(0,
|
|
268
|
+
return Object.keys(this._measurements).length>0&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(i)}toContext(){const t=super.toContext()
|
|
269
|
+
return(0,r.Jr)({...t,name:this.name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this.name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext
|
|
270
|
+
const t=this._hub||(0,i.Gd)(),e=t&&t.getClient()
|
|
265
271
|
if(!e)return{}
|
|
266
|
-
const{environment:n,release:
|
|
267
|
-
return(0,
|
|
272
|
+
const{environment:n,release:a}=e.getOptions()||{},{publicKey:s}=e.getDsn()||{},o=this.metadata.sampleRate,c=void 0!==o?o.toString():void 0,_=t.getScope(),{segment:d}=_&&_.getUser()||{},p=this.metadata.source,l=p&&"url"!==p?this.name:void 0
|
|
273
|
+
return(0,r.Jr)({environment:n,release:a,transaction:l,user_segment:d,public_key:s,trace_id:this.traceId,sample_rate:c})}}},48206:(t,e,n)=>{n.d(e,{XL:()=>r,x1:()=>s,zu:()=>a})
|
|
268
274
|
var i=n(8651)
|
|
269
|
-
function
|
|
270
|
-
return!!n&&("tracesSampleRate"in n||"tracesSampler"in n)}function
|
|
271
|
-
return e&&e.getTransaction()}function r(t){return t/1e3}}
|
|
275
|
+
function a(t){const e=(0,i.Gd)().getClient(),n=t||e&&e.getOptions()
|
|
276
|
+
return!!n&&("tracesSampleRate"in n||"tracesSampler"in n)}function s(t){const e=(t||(0,i.Gd)()).getScope()
|
|
277
|
+
return e&&e.getTransaction()}function r(t){return t/1e3}}}])
|
|
272
278
|
|
|
273
|
-
//# sourceMappingURL=chunk.
|
|
279
|
+
//# sourceMappingURL=chunk.79.c3c2c05ea7ff7707fcad.map
|