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EjB,IAAM,EAAS,IAAI,CAAC,OAAO,CAErB,EAAY,IAAI,CAAC,cAAc,CAC/B,EAAc,IAAI,CAAC,gBAAgB,CAEnC,EAAS,SAAS,aAAa,CAAC,IAAI,CAAC,WAAW,EACtD,GAAI,AAAU,MAAV,EACF,OAGF,IAAM,EAAc,EAAO,WAAW,CACtC,GAAI,AAAe,MAAf,EACF,QAGF,AAhDJ,SAAyB,CAAW,EAClC,IAAM,EAAK,SAAS,aAAa,CAAC,WAClC,CAAA,EAAG,KAAK,CAAG,EACX,2DAA2D;AAC3D,EAAG,YAAY,CAAC,WAAY,IAC5B,EAAG,YAAY,CAAC,QAAS,qCACzB,SAAS,IAAI,CAAC,WAAW,CAAC,GAC1B,6BAA6B;AAC7B,EAAG,MAAM,GACT,EAAG,iBAAiB,CAAC,EAAG,EAAG,KAAK,CAAC,MAAM,EACvC,SAAS,WAAW,CAAC,QACrB,2BAA2B;AAC3B,SAAS,IAAI,CAAC,WAAW,CAAC,EAC5B,EAmCoB,EAEhB,iBAAgB;AAChB,IAAI,EAAgB,IAAI,CAAC,aAAa,AAEjB,OAAjB,IACF,OAAO,YAAY,CAAC,GACpB,IAAI,CAAC,aAAa,CAAG,MAGnB,IAAI,CAAC,iBAAiB,EAAI,IAAI,CAAC,mBAAmB,EACpD,CAAA,EAAO,WAAW,CAAG,CADvB,EAGA,EAAO,SAAS,CAAC,GAAG,CAAC,WACrB,IAAM,EAAY,OAAO,UAAU,CAAC,KAE9B,IAAI,CAAC,iBAAiB,EAAI,IAAI,CAAC,mBAAmB,EACpD,CAAA,EAAO,WAAW,CAAG,CADvB,EAGA,EAAO,SAAS,CAAC,MAAM,CAAC,WACxB,IAAI,CAAC,aAAa,CAAG,IACvB,EAAG,IACH,CAAA,IAAI,CAAC,aAAa,CAAG,CACvB,CACF,C,E,uE","sources":["","node_modules/@sentry/browser/esm/sdk.js","node_modules/src/sdk.ts","node_modules/@sentry/core/esm/hub.js","node_modules/@sentry/src/hub.ts","node_modules/@sentry/utils/esm/logger.js","node_modules/@sentry/src/logger.ts","node_modules/@sentry/utils/esm/worldwide.js","node_modules/@sentry/src/worldwide.ts","node_modules/@sentry/utils/esm/time.js","node_modules/@sentry/src/time.ts","node_modules/@sentry/utils/esm/node.js","node_modules/@sentry/src/node.ts","node_modules/@sentry/utils/esm/env.js","node_modules/@sentry/src/env.ts","node_modules/@sentry/utils/esm/misc.js","node_modules/@sentry/src/misc.ts","node_modules/@sentry/utils/esm/object.js","node_modules/@sentry/src/object.ts","node_modules/@sentry/utils/esm/browser.js","node_modules/@sentry/src/browser.ts","node_modules/@sentry/utils/esm/is.js","node_modules/@sentry/src/is.ts","node_modules/@sentry/utils/esm/string.js","node_modules/@sentry/src/string.ts","node_modules/@sentry/core/esm/constants.js","node_modules/@sentry/src/constants.ts","node_modules/@sentry/core/esm/scope.js","node_modules/@sentry/src/scope.ts","node_modules/@sentry/core/esm/eventProcessors.js","node_modules/@sentry/src/eventProcessors.ts","node_modules/@sentry/utils/esm/syncpromise.js","node_modules/@sentry/src/syncpromise.ts","node_modules/@sentry/core/esm/session.js","node_modules/@sentry/src/session.ts","node_modules/@sentry/core/esm/integration.js","node_modules/@sentry/src/integration.ts","node_modules/@sentry/core/esm/api.js","node_modules/@sentry/src/api.ts","node_modules/@sentry/utils/esm/dsn.js","node_modules/@sentry/src/dsn.ts","node_modules/@sentry/core/esm/sdk.js","node_modules/@sentry/src/sdk.ts","node_modules/@sentry/core/esm/integrations/functiontostring.js","node_modules/@sentry/src/integrations/functiontostring.ts","node_modules/@sentry/core/esm/integrations/inboundfilters.js","node_modules/@sentry/src/integrations/inboundfilters.ts","node_modules/@sentry/core/esm/integrations/linkederrors.js","node_modules/@sentry/src/integrations/linkederrors.ts","node_modules/@sentry/utils/esm/aggregate-errors.js","node_modules/@sentry/src/aggregate-errors.ts","node_modules/@sentry/utils/esm/eventbuilder.js","node_modules/@sentry/src/eventbuilder.ts","node_modules/@sentry/utils/esm/normalize.js","node_modules/@sentry/src/normalize.ts","node_modules/@sentry/utils/esm/memo.js","node_modules/@sentry/src/memo.ts","node_modules/@sentry/utils/esm/stacktrace.js","node_modules/@sentry/src/stacktrace.ts","node_modules/@sentry/utils/esm/node-stack-trace.js","node_modules/@sentry/src/node-stack-trace.ts","node_modules/@sentry/utils/esm/instrument.js","node_modules/@sentry/src/instrument.ts","node_modules/@sentry/utils/esm/supports.js","node_modules/@sentry/src/supports.ts","node_modules/@sentry/utils/esm/vendor/supportsHistory.js","node_modules/@sentry/src/vendor/supportsHistory.ts","node_modules/@sentry/browser/esm/client.js","node_modules/src/client.ts","node_modules/@sentry/core/esm/baseclient.js","node_modules/@sentry/src/baseclient.ts","node_modules/@sentry/utils/esm/envelope.js","node_modules/@sentry/src/envelope.ts","node_modules/@sentry/utils/esm/error.js","node_modules/@sentry/src/error.ts","node_modules/@sentry/core/esm/envelope.js","node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js","node_modules/@sentry/src/tracing/dynamicSamplingContext.ts","node_modules/@sentry/core/esm/utils/prepareEvent.js","node_modules/@sentry/src/utils/prepareEvent.ts","node_modules/@sentry/core/esm/version.js","node_modules/@sentry/src/version.ts","node_modules/@sentry/utils/esm/clientreport.js","node_modules/@sentry/src/clientreport.ts","node_modules/@sentry/browser/esm/eventbuilder.js","node_modules/src/eventbuilder.ts","node_modules/@sentry/browser/esm/helpers.js","node_modules/src/helpers.ts","node_modules/@sentry/core/esm/exports.js","node_modules/@sentry/src/exports.ts","node_modules/@sentry/browser/esm/userfeedback.js","node_modules/src/userfeedback.ts","node_modules/@sentry/browser/esm/integrations/globalhandlers.js","node_modules/src/integrations/globalhandlers.ts","node_modules/@sentry/browser/esm/integrations/trycatch.js","node_modules/src/integrations/trycatch.ts","node_modules/@sentry/browser/esm/integrations/breadcrumbs.js","node_modules/src/integrations/breadcrumbs.ts","node_modules/@sentry/utils/esm/url.js","node_modules/@sentry/src/url.ts","node_modules/@sentry/utils/esm/severity.js","node_modules/@sentry/src/severity.ts","node_modules/@sentry/browser/esm/integrations/linkederrors.js","node_modules/src/integrations/linkederrors.ts","node_modules/@sentry/browser/esm/integrations/httpcontext.js","node_modules/src/integrations/httpcontext.ts","node_modules/@sentry/browser/esm/integrations/dedupe.js","node_modules/src/integrations/dedupe.ts","node_modules/@sentry/browser/esm/stack-parsers.js","node_modules/src/stack-parsers.ts","node_modules/@sentry/browser/esm/transports/fetch.js","node_modules/src/transports/fetch.ts","node_modules/@sentry/core/esm/transports/base.js","node_modules/@sentry/src/transports/base.ts","node_modules/@sentry/utils/esm/ratelimit.js","node_modules/@sentry/src/ratelimit.ts","node_modules/@sentry/utils/esm/promisebuffer.js","node_modules/@sentry/src/promisebuffer.ts","node_modules/@sentry/browser/esm/transports/utils.js","node_modules/src/transports/utils.ts","node_modules/@sentry/browser/esm/transports/xhr.js","node_modules/src/transports/xhr.ts","node_modules/@sentry/tracing/esm/index.js","node_modules/src/index.ts","node_modules/@sentry-internal/tracing/esm/extensions.js","node_modules/@sentry-internal/src/extensions.ts","node_modules/@sentry/core/esm/tracing/hubextensions.js","node_modules/@sentry/src/tracing/hubextensions.ts","node_modules/@sentry/core/esm/tracing/errors.js","node_modules/@sentry/src/tracing/errors.ts","node_modules/@sentry/core/esm/tracing/utils.js","node_modules/@sentry/src/tracing/utils.ts","node_modules/@sentry/core/esm/tracing/idletransaction.js","node_modules/@sentry/src/tracing/idletransaction.ts","node_modules/@sentry/core/esm/tracing/span.js","node_modules/@sentry/src/tracing/span.ts","node_modules/@sentry/utils/esm/tracing.js","node_modules/@sentry/src/tracing.ts","node_modules/@sentry/utils/esm/baggage.js","node_modules/@sentry/src/baggage.ts","node_modules/@sentry/core/esm/tracing/transaction.js","node_modules/@sentry/src/tracing/transaction.ts","node_modules/@sentry/core/esm/tracing/sampling.js","node_modules/@sentry/src/tracing/sampling.ts","node_modules/@sentry/core/esm/utils/hasTracingEnabled.js","node_modules/@sentry/src/utils/hasTracingEnabled.ts","node_modules/@sentry-internal/tracing/esm/node/integrations/apollo.js","node_modules/@sentry-internal/src/node/integrations/apollo.ts","node_modules/@sentry/utils/esm/buildPolyfills/_optionalChain.js","node_modules/@sentry/src/buildPolyfills/_optionalChain.ts","node_modules/@sentry-internal/tracing/esm/node/integrations/utils/node-utils.js","node_modules/@sentry-internal/src/node/integrations/utils/node-utils.ts","node_modules/@sentry-internal/tracing/esm/browser/browsertracing.js","node_modules/@sentry-internal/src/browser/browsertracing.ts","node_modules/@sentry-internal/tracing/esm/browser/backgroundtab.js","node_modules/@sentry-internal/src/browser/backgroundtab.ts","node_modules/@sentry-internal/tracing/esm/browser/types.js","node_modules/@sentry-internal/src/browser/types.ts","node_modules/@sentry-internal/tracing/esm/browser/metrics/index.js","node_modules/@sentry-internal/src/browser/metrics/index.ts","node_modules/@sentry-internal/tracing/esm/browser/instrument.js","node_modules/@sentry-internal/src/browser/instrument.ts","node_modules/@sentry-internal/tracing/esm/browser/web-vitals/getCLS.js","node_modules/@sentry-internal/src/browser/web-vitals/getCLS.ts","node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/bindReporter.js","node_modules/@sentry-internal/src/browser/web-vitals/lib/bindReporter.ts","node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/initMetric.js","node_modules/@sentry-internal/src/browser/web-vitals/lib/initMetric.ts","node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/generateUniqueID.js","node_modules/@sentry-internal/src/browser/web-vitals/lib/generateUniqueID.ts","node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/getActivationStart.js","node_modules/@sentry-internal/src/browser/web-vitals/lib/getActivationStart.ts","node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/getNavigationEntry.js","node_modules/@sentry-internal/src/browser/web-vitals/lib/getNavigationEntry.ts","node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/observe.js","node_modules/@sentry-internal/src/browser/web-vitals/lib/observe.ts","node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/onHidden.js","node_modules/@sentry-internal/src/browser/web-vitals/lib/onHidden.ts","node_modules/@sentry-internal/tracing/esm/browser/web-vitals/getFID.js","node_modules/@sentry-internal/src/browser/web-vitals/getFID.ts","node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/getVisibilityWatcher.js","node_modules/@sentry-internal/src/browser/web-vitals/lib/getVisibilityWatcher.ts","node_modules/@sentry-internal/tracing/esm/browser/web-vitals/getLCP.js","node_modules/@sentry-internal/src/browser/web-vitals/getLCP.ts","node_modules/@sentry-internal/tracing/esm/browser/metrics/utils.js","node_modules/@sentry-internal/src/browser/metrics/utils.ts","node_modules/@sentry-internal/tracing/esm/browser/request.js","node_modules/@sentry-internal/src/browser/request.ts","node_modules/@sentry-internal/tracing/esm/browser/router.js","node_modules/@sentry-internal/src/browser/router.ts","node_modules/@sentry-internal/tracing/esm/node/integrations/express.js","node_modules/@sentry-internal/src/node/integrations/express.ts","node_modules/@sentry/utils/esm/requestdata.js","node_modules/@sentry/src/requestdata.ts","node_modules/@sentry-internal/tracing/esm/node/integrations/graphql.js","node_modules/@sentry-internal/src/node/integrations/graphql.ts","node_modules/@sentry-internal/tracing/esm/node/integrations/mongo.js","node_modules/@sentry-internal/src/node/integrations/mongo.ts","node_modules/@sentry-internal/tracing/esm/node/integrations/mysql.js","node_modules/@sentry-internal/src/node/integrations/mysql.ts","node_modules/@sentry-internal/tracing/esm/node/integrations/postgres.js","node_modules/@sentry-internal/src/node/integrations/postgres.ts","node_modules/@sentry-internal/tracing/esm/node/integrations/prisma.js","node_modules/@sentry-internal/src/node/integrations/prisma.ts","node_modules/@sentry/core/esm/tracing/trace.js","node_modules/@sentry/src/tracing/trace.ts","node_modules/@sentry/core/esm/tracing/spanstatus.js","node_modules/@sentry/src/tracing/spanstatus.ts","src/form.ts","src/loading.ts","src/messageBar.ts","src/preventDoubleTap.ts","src/lockout.ts","node_modules/luxon/build/cjs-browser/luxon.js","node_modules/luxon/src/errors.js","node_modules/luxon/src/impl/formats.js","node_modules/luxon/src/zone.js","node_modules/luxon/src/zones/systemZone.js","node_modules/luxon/src/zones/IANAZone.js","node_modules/luxon/src/impl/locale.js","node_modules/luxon/src/zones/fixedOffsetZone.js","node_modules/luxon/src/zones/invalidZone.js","node_modules/luxon/src/impl/zoneUtil.js","node_modules/luxon/src/settings.js","node_modules/luxon/src/impl/invalid.js","node_modules/luxon/src/impl/conversions.js","node_modules/luxon/src/impl/util.js","node_modules/luxon/src/impl/english.js","node_modules/luxon/src/impl/formatter.js","node_modules/luxon/src/impl/regexParser.js","node_modules/luxon/src/duration.js","node_modules/luxon/src/interval.js","node_modules/luxon/src/info.js","node_modules/luxon/src/impl/diff.js","node_modules/luxon/src/impl/digits.js","node_modules/luxon/src/impl/tokenParser.js","node_modules/luxon/src/datetime.js","node_modules/luxon/src/luxon.js","src/date.ts","src/feature.ts","src/resendButton.ts","src/passwordVisibility.ts","src/copy.ts"],"sourcesContent":["\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirebaaf\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirebaaf\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"h5KO3\", function(module, exports) {\n\n$parcel$export(module.exports, \"init\", () => $c717361202759bca$export$2cd8252107eb640b);\n\nvar $1D41F = parcelRequire(\"1D41F\");\nvar $cIx5z = parcelRequire(\"cIx5z\");\nvar $f2G1X = parcelRequire(\"f2G1X\");\nvar $7kOyh = parcelRequire(\"7kOyh\");\nvar $rNbsF = parcelRequire(\"rNbsF\");\n\nvar $8GNPF = parcelRequire(\"8GNPF\");\nvar $boFAr = parcelRequire(\"boFAr\");\nvar $fxSvy = parcelRequire(\"fxSvy\");\nvar $lQaUW = parcelRequire(\"lQaUW\");\n\nvar $l46vI = parcelRequire(\"l46vI\");\n\nvar $ikSrI = parcelRequire(\"ikSrI\");\n\nvar $cgnMu = parcelRequire(\"cgnMu\");\n\nvar $aQXYv = parcelRequire(\"aQXYv\");\n\nvar $ap2QB = parcelRequire(\"ap2QB\");\n\nvar $lElMz = parcelRequire(\"lElMz\");\n\nvar $3CtSo = parcelRequire(\"3CtSo\");\n\nvar $dErZh = parcelRequire(\"dErZh\");\n\nvar $l8ZBF = parcelRequire(\"l8ZBF\");\n\nvar $kWGRK = parcelRequire(\"kWGRK\");\n\nvar $6Uiw0 = parcelRequire(\"6Uiw0\");\nconst $c717361202759bca$export$5ef831fccfce35e5 = [\n new (0, $rNbsF).InboundFilters(),\n new (0, $rNbsF).FunctionToString(),\n new (0, $aQXYv.TryCatch)(),\n new (0, $ap2QB.Breadcrumbs)(),\n new (0, $cgnMu.GlobalHandlers)(),\n new (0, $lElMz.LinkedErrors)(),\n new (0, $dErZh.Dedupe)(),\n new (0, $3CtSo.HttpContext)()\n];\n/**\n * A magic string that build tooling can leverage in order to inject a release value into the SDK.\n */ /**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */ function $c717361202759bca$export$2cd8252107eb640b(options = {}) {\n if (options.defaultIntegrations === undefined) options.defaultIntegrations = $c717361202759bca$export$5ef831fccfce35e5;\n if (options.release === undefined) {\n // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value\n if (typeof __SENTRY_RELEASE__ === \"string\") options.release = __SENTRY_RELEASE__;\n // This supports the variable that sentry-webpack-plugin injects\n if ((0, $ikSrI.WINDOW).SENTRY_RELEASE && (0, $ikSrI.WINDOW).SENTRY_RELEASE.id) options.release = (0, $ikSrI.WINDOW).SENTRY_RELEASE.id;\n }\n if (options.autoSessionTracking === undefined) options.autoSessionTracking = true;\n if (options.sendClientReports === undefined) options.sendClientReports = true;\n const clientOptions = {\n ...options,\n stackParser: (0, $fxSvy.stackParserFromStackParserOptions)(options.stackParser || (0, $l8ZBF.defaultStackParser)),\n integrations: (0, $cIx5z.getIntegrationsToSetup)(options),\n transport: options.transport || ((0, $lQaUW.supportsFetch)() ? (0, $kWGRK.makeFetchTransport) : (0, $6Uiw0.makeXHRTransport))\n };\n (0, $7kOyh.initAndBind)((0, $l46vI.BrowserClient), clientOptions);\n if (options.autoSessionTracking) $c717361202759bca$var$startSessionTracking();\n}\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */ function $c717361202759bca$export$3a8fd680da42627b(options = {}, hub = (0, $1D41F.getCurrentHub)()) {\n // doesn't work without a document (React Native)\n if (!(0, $ikSrI.WINDOW).document) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(\"Global document not defined in showReportDialog call\");\n return;\n }\n const { client: client, scope: scope } = hub.getStackTop();\n const dsn = options.dsn || client && client.getDsn();\n if (!dsn) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(\"DSN not configured for showReportDialog call\");\n return;\n }\n if (scope) options.user = {\n ...scope.getUser(),\n ...options.user\n };\n if (!options.eventId) options.eventId = hub.lastEventId();\n const script = (0, $ikSrI.WINDOW).document.createElement(\"script\");\n script.async = true;\n script.crossOrigin = \"anonymous\";\n script.src = (0, $f2G1X.getReportDialogEndpoint)(dsn, options);\n if (options.onLoad) script.onload = options.onLoad;\n const injectionPoint = (0, $ikSrI.WINDOW).document.head || (0, $ikSrI.WINDOW).document.body;\n if (injectionPoint) injectionPoint.appendChild(script);\n else (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(\"Not injecting report dialog. No injection point found in HTML\");\n}\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */ function $c717361202759bca$export$a3f323d81eede727() {\n// Noop\n}\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */ function $c717361202759bca$export$4e4d8b287d028b6b(callback) {\n callback();\n}\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @deprecated This function will be removed in v8.\n * It is not part of Sentry's official API and it's easily replaceable by using a try/catch block\n * and calling Sentry.captureException.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */ // TODO(v8): Remove this function\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction $c717361202759bca$export$4997ffc0176396a6(fn) {\n return (0, $ikSrI.wrap)(fn)();\n}\nfunction $c717361202759bca$var$startSessionOnHub(hub) {\n hub.startSession({\n ignoreDuration: true\n });\n hub.captureSession();\n}\n/**\n * Enable automatic Session Tracking for the initial page load.\n */ function $c717361202759bca$var$startSessionTracking() {\n if (typeof (0, $ikSrI.WINDOW).document === \"undefined\") {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(\"Session tracking in non-browser environment with @sentry/browser is not supported.\");\n return;\n }\n const hub = (0, $1D41F.getCurrentHub)();\n // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and\n // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are\n // pinned at the same version in package.json, but there are edge cases where it's possible. See\n // https://github.com/getsentry/sentry-javascript/issues/3207 and\n // https://github.com/getsentry/sentry-javascript/issues/3234 and\n // https://github.com/getsentry/sentry-javascript/issues/3278.\n if (!hub.captureSession) return;\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n $c717361202759bca$var$startSessionOnHub(hub);\n // We want to create a session for every navigation as well\n (0, $8GNPF.addInstrumentationHandler)(\"history\", ({ from: from, to: to })=>{\n // Don't create an additional session for the initial route or if the location did not change\n if (!(from === undefined || from === to)) $c717361202759bca$var$startSessionOnHub((0, $1D41F.getCurrentHub)());\n });\n}\n/**\n * Captures user feedback and sends it to Sentry.\n */ function $c717361202759bca$export$88cefaf72d1e58a3(feedback) {\n const client = (0, $1D41F.getCurrentHub)().getClient();\n if (client) client.captureUserFeedback(feedback);\n}\n\n});\nparcelRegister(\"1D41F\", function(module, exports) {\n\n$parcel$export(module.exports, \"getMainCarrier\", () => $12fc8e6f8b8c537c$export$19eade501500c6c1);\n$parcel$export(module.exports, \"getCurrentHub\", () => $12fc8e6f8b8c537c$export$a07cdf6544bbd7c);\n\nvar $boFAr = parcelRequire(\"boFAr\");\nvar $hbZCn = parcelRequire(\"hbZCn\");\nvar $kPqMJ = parcelRequire(\"kPqMJ\");\nvar $aZ9cG = parcelRequire(\"aZ9cG\");\n\nvar $bagDH = parcelRequire(\"bagDH\");\n\nvar $gP2DW = parcelRequire(\"gP2DW\");\n\nvar $4Dtig = parcelRequire(\"4Dtig\");\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */ const $12fc8e6f8b8c537c$export$24a86ef7798177e4 = 4;\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */ const $12fc8e6f8b8c537c$var$DEFAULT_BREADCRUMBS = 100;\n/**\n * @inheritDoc\n */ class $12fc8e6f8b8c537c$export$8c41bb232f1008b1 {\n /** Is a {@link Layer}[] containing the client and scope */ /** Contains the last event id of a captured event. */ /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */ constructor(client, scope = new (0, $gP2DW.Scope)(), _version = $12fc8e6f8b8c537c$export$24a86ef7798177e4){\n this._version = _version;\n this._stack = [\n {\n scope: scope\n }\n ];\n if (client) this.bindClient(client);\n }\n /**\n * @inheritDoc\n */ isOlderThan(version) {\n return this._version < version;\n }\n /**\n * @inheritDoc\n */ bindClient(client) {\n const top = this.getStackTop();\n top.client = client;\n if (client && client.setupIntegrations) client.setupIntegrations();\n }\n /**\n * @inheritDoc\n */ pushScope() {\n // We want to clone the content of prev scope\n const scope = (0, $gP2DW.Scope).clone(this.getScope());\n this.getStack().push({\n client: this.getClient(),\n scope: scope\n });\n return scope;\n }\n /**\n * @inheritDoc\n */ popScope() {\n if (this.getStack().length <= 1) return false;\n return !!this.getStack().pop();\n }\n /**\n * @inheritDoc\n */ withScope(callback) {\n const scope = this.pushScope();\n try {\n callback(scope);\n } finally{\n this.popScope();\n }\n }\n /**\n * @inheritDoc\n */ getClient() {\n return this.getStackTop().client;\n }\n /** Returns the scope of the top stack. */ getScope() {\n return this.getStackTop().scope;\n }\n /** Returns the scope stack for domains or the process. */ getStack() {\n return this._stack;\n }\n /** Returns the topmost scope layer in the order domain > local > process. */ getStackTop() {\n return this._stack[this._stack.length - 1];\n }\n /**\n * @inheritDoc\n */ captureException(exception, hint) {\n const eventId = this._lastEventId = hint && hint.event_id ? hint.event_id : (0, $aZ9cG.uuid4)();\n const syntheticException = new Error(\"Sentry syntheticException\");\n this._withClient((client, scope)=>{\n client.captureException(exception, {\n originalException: exception,\n syntheticException: syntheticException,\n ...hint,\n event_id: eventId\n }, scope);\n });\n return eventId;\n }\n /**\n * @inheritDoc\n */ captureMessage(message, // eslint-disable-next-line deprecation/deprecation\n level, hint) {\n const eventId = this._lastEventId = hint && hint.event_id ? hint.event_id : (0, $aZ9cG.uuid4)();\n const syntheticException = new Error(message);\n this._withClient((client, scope)=>{\n client.captureMessage(message, level, {\n originalException: message,\n syntheticException: syntheticException,\n ...hint,\n event_id: eventId\n }, scope);\n });\n return eventId;\n }\n /**\n * @inheritDoc\n */ captureEvent(event, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : (0, $aZ9cG.uuid4)();\n if (!event.type) this._lastEventId = eventId;\n this._withClient((client, scope)=>{\n client.captureEvent(event, {\n ...hint,\n event_id: eventId\n }, scope);\n });\n return eventId;\n }\n /**\n * @inheritDoc\n */ lastEventId() {\n return this._lastEventId;\n }\n /**\n * @inheritDoc\n */ addBreadcrumb(breadcrumb, hint) {\n const { scope: scope, client: client } = this.getStackTop();\n if (!client) return;\n const { beforeBreadcrumb: beforeBreadcrumb = null, maxBreadcrumbs: maxBreadcrumbs = $12fc8e6f8b8c537c$var$DEFAULT_BREADCRUMBS } = client.getOptions && client.getOptions() || {};\n if (maxBreadcrumbs <= 0) return;\n const timestamp = (0, $hbZCn.dateTimestampInSeconds)();\n const mergedBreadcrumb = {\n timestamp: timestamp,\n ...breadcrumb\n };\n const finalBreadcrumb = beforeBreadcrumb ? (0, $boFAr.consoleSandbox)(()=>beforeBreadcrumb(mergedBreadcrumb, hint)) : mergedBreadcrumb;\n if (finalBreadcrumb === null) return;\n if (client.emit) client.emit(\"beforeAddBreadcrumb\", finalBreadcrumb, hint);\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n }\n /**\n * @inheritDoc\n */ setUser(user) {\n this.getScope().setUser(user);\n }\n /**\n * @inheritDoc\n */ setTags(tags) {\n this.getScope().setTags(tags);\n }\n /**\n * @inheritDoc\n */ setExtras(extras) {\n this.getScope().setExtras(extras);\n }\n /**\n * @inheritDoc\n */ setTag(key, value) {\n this.getScope().setTag(key, value);\n }\n /**\n * @inheritDoc\n */ setExtra(key, extra) {\n this.getScope().setExtra(key, extra);\n }\n /**\n * @inheritDoc\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setContext(name, context) {\n this.getScope().setContext(name, context);\n }\n /**\n * @inheritDoc\n */ configureScope(callback) {\n const { scope: scope, client: client } = this.getStackTop();\n if (client) callback(scope);\n }\n /**\n * @inheritDoc\n */ run(callback) {\n const oldHub = $12fc8e6f8b8c537c$export$4188a14ad302d1bc(this);\n try {\n callback(this);\n } finally{\n $12fc8e6f8b8c537c$export$4188a14ad302d1bc(oldHub);\n }\n }\n /**\n * @inheritDoc\n */ getIntegration(integration) {\n const client = this.getClient();\n if (!client) return null;\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n /**\n * @inheritDoc\n */ startTransaction(context, customSamplingContext) {\n const result = this._callExtensionMethod(\"startTransaction\", context, customSamplingContext);\n if ((typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && !result) {\n const client = this.getClient();\n if (!client) // eslint-disable-next-line no-console\n console.warn(\"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'\");\n else // eslint-disable-next-line no-console\n console.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n`);\n }\n return result;\n }\n /**\n * @inheritDoc\n */ traceHeaders() {\n return this._callExtensionMethod(\"traceHeaders\");\n }\n /**\n * @inheritDoc\n */ captureSession(endSession = false) {\n // both send the update and pull the session from the scope\n if (endSession) return this.endSession();\n // only send the update\n this._sendSessionUpdate();\n }\n /**\n * @inheritDoc\n */ endSession() {\n const layer = this.getStackTop();\n const scope = layer.scope;\n const session = scope.getSession();\n if (session) (0, $4Dtig.closeSession)(session);\n this._sendSessionUpdate();\n // the session is over; take it off of the scope\n scope.setSession();\n }\n /**\n * @inheritDoc\n */ startSession(context) {\n const { scope: scope, client: client } = this.getStackTop();\n const { release: release, environment: environment = (0, $bagDH.DEFAULT_ENVIRONMENT) } = client && client.getOptions() || {};\n // Will fetch userAgent if called from browser sdk\n const { userAgent: userAgent } = (0, $kPqMJ.GLOBAL_OBJ).navigator || {};\n const session = (0, $4Dtig.makeSession)({\n release: release,\n environment: environment,\n user: scope.getUser(),\n ...userAgent && {\n userAgent: userAgent\n },\n ...context\n });\n // End existing session if there's one\n const currentSession = scope.getSession && scope.getSession();\n if (currentSession && currentSession.status === \"ok\") (0, $4Dtig.updateSession)(currentSession, {\n status: \"exited\"\n });\n this.endSession();\n // Afterwards we set the new session on the scope\n scope.setSession(session);\n return session;\n }\n /**\n * Returns if default PII should be sent to Sentry and propagated in ourgoing requests\n * when Tracing is used.\n */ shouldSendDefaultPii() {\n const client = this.getClient();\n const options = client && client.getOptions();\n return Boolean(options && options.sendDefaultPii);\n }\n /**\n * Sends the current Session on the scope\n */ _sendSessionUpdate() {\n const { scope: scope, client: client } = this.getStackTop();\n const session = scope.getSession();\n if (session && client && client.captureSession) client.captureSession(session);\n }\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */ _withClient(callback) {\n const { scope: scope, client: client } = this.getStackTop();\n if (client) callback(client, scope);\n }\n /**\n * Calls global extension method and binding current instance to the function call\n */ // @ts-expect-error Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _callExtensionMethod(method, ...args) {\n const carrier = $12fc8e6f8b8c537c$export$19eade501500c6c1();\n const sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === \"function\") return sentry.extensions[method].apply(this, args);\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/ function $12fc8e6f8b8c537c$export$19eade501500c6c1() {\n (0, $kPqMJ.GLOBAL_OBJ).__SENTRY__ = (0, $kPqMJ.GLOBAL_OBJ).__SENTRY__ || {\n extensions: {},\n hub: undefined\n };\n return 0, $kPqMJ.GLOBAL_OBJ;\n}\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */ function $12fc8e6f8b8c537c$export$4188a14ad302d1bc(hub) {\n const registry = $12fc8e6f8b8c537c$export$19eade501500c6c1();\n const oldHub = $12fc8e6f8b8c537c$export$bfa8a924a84a76b7(registry);\n $12fc8e6f8b8c537c$export$849f05434e95d2f2(registry, hub);\n return oldHub;\n}\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */ function $12fc8e6f8b8c537c$export$a07cdf6544bbd7c() {\n // Get main carrier (global for every environment)\n const registry = $12fc8e6f8b8c537c$export$19eade501500c6c1();\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n const hub = registry.__SENTRY__.acs.getCurrentHub();\n if (hub) return hub;\n }\n // Return hub that lives on a global object\n return $12fc8e6f8b8c537c$var$getGlobalHub(registry);\n}\nfunction $12fc8e6f8b8c537c$var$getGlobalHub(registry = $12fc8e6f8b8c537c$export$19eade501500c6c1()) {\n // If there's no hub, or its an old API, assign a new one\n if (!$12fc8e6f8b8c537c$var$hasHubOnCarrier(registry) || $12fc8e6f8b8c537c$export$bfa8a924a84a76b7(registry).isOlderThan($12fc8e6f8b8c537c$export$24a86ef7798177e4)) $12fc8e6f8b8c537c$export$849f05434e95d2f2(registry, new $12fc8e6f8b8c537c$export$8c41bb232f1008b1());\n // Return hub that lives on a global object\n return $12fc8e6f8b8c537c$export$bfa8a924a84a76b7(registry);\n}\n/**\n * @private Private API with no semver guarantees!\n *\n * If the carrier does not contain a hub, a new hub is created with the global hub client and scope.\n */ function $12fc8e6f8b8c537c$export$236689a79f5aa020(carrier, parent = $12fc8e6f8b8c537c$var$getGlobalHub()) {\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!$12fc8e6f8b8c537c$var$hasHubOnCarrier(carrier) || $12fc8e6f8b8c537c$export$bfa8a924a84a76b7(carrier).isOlderThan($12fc8e6f8b8c537c$export$24a86ef7798177e4)) {\n const globalHubTopStack = parent.getStackTop();\n $12fc8e6f8b8c537c$export$849f05434e95d2f2(carrier, new $12fc8e6f8b8c537c$export$8c41bb232f1008b1(globalHubTopStack.client, (0, $gP2DW.Scope).clone(globalHubTopStack.scope)));\n }\n}\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */ function $12fc8e6f8b8c537c$export$774ae0e6b6e444ca(strategy) {\n // Get main carrier (global for every environment)\n const registry = $12fc8e6f8b8c537c$export$19eade501500c6c1();\n registry.__SENTRY__ = registry.__SENTRY__ || {};\n registry.__SENTRY__.acs = strategy;\n}\n/**\n * Runs the supplied callback in its own async context. Async Context strategies are defined per SDK.\n *\n * @param callback The callback to run in its own async context\n * @param options Options to pass to the async context strategy\n * @returns The result of the callback\n */ function $12fc8e6f8b8c537c$export$70d775fb1f267027(callback, options = {}) {\n const registry = $12fc8e6f8b8c537c$export$19eade501500c6c1();\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) return registry.__SENTRY__.acs.runWithAsyncContext(callback, options);\n // if there was no strategy, fallback to just calling the callback\n return callback();\n}\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */ function $12fc8e6f8b8c537c$var$hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */ function $12fc8e6f8b8c537c$export$bfa8a924a84a76b7(carrier) {\n return (0, $kPqMJ.getGlobalSingleton)(\"hub\", ()=>new $12fc8e6f8b8c537c$export$8c41bb232f1008b1(), carrier);\n}\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n * @returns A boolean indicating success or failure\n */ function $12fc8e6f8b8c537c$export$849f05434e95d2f2(carrier, hub) {\n if (!carrier) return false;\n const __SENTRY__ = carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n __SENTRY__.hub = hub;\n return true;\n}\n\n});\nparcelRegister(\"boFAr\", function(module, exports) {\n\n$parcel$export(module.exports, \"CONSOLE_LEVELS\", () => $84c231e20e4ef99a$export$2a2b1d2252a69ecb);\n$parcel$export(module.exports, \"originalConsoleMethods\", () => $84c231e20e4ef99a$export$77c4ce905194557b);\n$parcel$export(module.exports, \"consoleSandbox\", () => $84c231e20e4ef99a$export$cda52e2a8927a2ca);\n$parcel$export(module.exports, \"logger\", () => $84c231e20e4ef99a$export$af88d00dbe7f521);\n\nvar $kPqMJ = parcelRequire(\"kPqMJ\");\n/** Prefix for logging strings */ const $84c231e20e4ef99a$var$PREFIX = \"Sentry Logger \";\nconst $84c231e20e4ef99a$export$2a2b1d2252a69ecb = [\n \"debug\",\n \"info\",\n \"warn\",\n \"error\",\n \"log\",\n \"assert\",\n \"trace\"\n];\n/** This may be mutated by the console instrumentation. */ const $84c231e20e4ef99a$export$77c4ce905194557b = {};\n/** JSDoc */ /**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */ function $84c231e20e4ef99a$export$cda52e2a8927a2ca(callback) {\n if (!(\"console\" in (0, $kPqMJ.GLOBAL_OBJ))) return callback();\n const console = (0, $kPqMJ.GLOBAL_OBJ).console;\n const wrappedFuncs = {};\n const wrappedLevels = Object.keys($84c231e20e4ef99a$export$77c4ce905194557b);\n // Restore all wrapped console methods\n wrappedLevels.forEach((level)=>{\n const originalConsoleMethod = $84c231e20e4ef99a$export$77c4ce905194557b[level];\n wrappedFuncs[level] = console[level];\n console[level] = originalConsoleMethod;\n });\n try {\n return callback();\n } finally{\n // Revert restoration to wrapped state\n wrappedLevels.forEach((level)=>{\n console[level] = wrappedFuncs[level];\n });\n }\n}\nfunction $84c231e20e4ef99a$var$makeLogger() {\n let enabled = false;\n const logger = {\n enable: ()=>{\n enabled = true;\n },\n disable: ()=>{\n enabled = false;\n },\n isEnabled: ()=>enabled\n };\n if (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) $84c231e20e4ef99a$export$2a2b1d2252a69ecb.forEach((name)=>{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logger[name] = (...args)=>{\n if (enabled) $84c231e20e4ef99a$export$cda52e2a8927a2ca(()=>{\n (0, $kPqMJ.GLOBAL_OBJ).console[name](`${$84c231e20e4ef99a$var$PREFIX}[${name}]:`, ...args);\n });\n };\n });\n else $84c231e20e4ef99a$export$2a2b1d2252a69ecb.forEach((name)=>{\n logger[name] = ()=>undefined;\n });\n return logger;\n}\nconst $84c231e20e4ef99a$export$af88d00dbe7f521 = $84c231e20e4ef99a$var$makeLogger();\n\n});\nparcelRegister(\"kPqMJ\", function(module, exports) {\n\n$parcel$export(module.exports, \"GLOBAL_OBJ\", () => $f29d59038dfac1ce$export$f1a6cdb1459e81d1);\n$parcel$export(module.exports, \"getGlobalObject\", () => $f29d59038dfac1ce$export$256479dc0cea61c4);\n$parcel$export(module.exports, \"getGlobalSingleton\", () => $f29d59038dfac1ce$export$7e223ec222791509);\n/** Internal global with common properties and Sentry extensions */ // The code below for 'isGlobalObj' and 'GLOBAL_OBJ' was copied from core-js before modification\n// https://github.com/zloirock/core-js/blob/1b944df55282cdc99c90db5f49eb0b6eda2cc0a3/packages/core-js/internals/global.js\n// core-js has the following licence:\n//\n// Copyright (c) 2014-2022 Denis Pushkarev\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n/** Returns 'obj' if it's the global object, otherwise returns undefined */ function $f29d59038dfac1ce$var$isGlobalObj(obj) {\n return obj && obj.Math == Math ? obj : undefined;\n}\n/** Get's the global object for the current JavaScript runtime */ const $f29d59038dfac1ce$export$f1a6cdb1459e81d1 = typeof globalThis == \"object\" && $f29d59038dfac1ce$var$isGlobalObj(globalThis) || // eslint-disable-next-line no-restricted-globals\ntypeof window == \"object\" && $f29d59038dfac1ce$var$isGlobalObj(window) || typeof self == \"object\" && $f29d59038dfac1ce$var$isGlobalObj(self) || typeof $parcel$global == \"object\" && $f29d59038dfac1ce$var$isGlobalObj($parcel$global) || function() {\n return this;\n}() || {};\n/**\n * @deprecated Use GLOBAL_OBJ instead or WINDOW from @sentry/browser. This will be removed in v8\n */ function $f29d59038dfac1ce$export$256479dc0cea61c4() {\n return $f29d59038dfac1ce$export$f1a6cdb1459e81d1;\n}\n/**\n * Returns a global singleton contained in the global `__SENTRY__` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value\n * @returns the singleton\n */ function $f29d59038dfac1ce$export$7e223ec222791509(name, creator, obj) {\n const gbl = obj || $f29d59038dfac1ce$export$f1a6cdb1459e81d1;\n const __SENTRY__ = gbl.__SENTRY__ = gbl.__SENTRY__ || {};\n const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n}\n\n});\n\n\nparcelRegister(\"hbZCn\", function(module, exports) {\n\n$parcel$export(module.exports, \"dateTimestampInSeconds\", () => dateTimestampInSeconds);\n$parcel$export(module.exports, \"timestampInSeconds\", () => timestampInSeconds);\n$parcel$export(module.exports, \"browserPerformanceTimeOrigin\", () => browserPerformanceTimeOrigin);\n\nvar $ink2I = parcelRequire(\"ink2I\");\n\nvar $kPqMJ = parcelRequire(\"kPqMJ\");\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = (0, $kPqMJ.getGlobalObject)();\n/**\n * An object that can return the current timestamp in seconds since the UNIX epoch.\n */ /**\n * A TimestampSource implementation for environments that do not support the Performance Web API natively.\n *\n * Note that this TimestampSource does not use a monotonic clock. A call to `nowSeconds` may return a timestamp earlier\n * than a previously returned value. We do not try to emulate a monotonic behavior in order to facilitate debugging. It\n * is more obvious to explain \"why does my span have negative duration\" than \"why my spans have zero duration\".\n */ const dateTimestampSource = {\n nowSeconds: ()=>Date.now() / 1000\n};\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */ /**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */ function getBrowserPerformance() {\n const { performance } = WINDOW;\n if (!performance || !performance.now) return undefined;\n // Replace performance.timeOrigin with our own timeOrigin based on Date.now().\n //\n // This is a partial workaround for browsers reporting performance.timeOrigin such that performance.timeOrigin +\n // performance.now() gives a date arbitrarily in the past.\n //\n // Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is\n // undefined.\n //\n // The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to\n // interact with data coming out of performance entries.\n //\n // Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that\n // might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes\n // performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have\n // observed skews that can be as long as days, weeks or months.\n //\n // See https://github.com/getsentry/sentry-javascript/issues/2590.\n //\n // BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload\n // transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation\n // transactions of long-lived web pages.\n const timeOrigin = Date.now() - performance.now();\n return {\n now: ()=>performance.now(),\n timeOrigin: timeOrigin\n };\n}\n/**\n * Returns the native Performance API implementation from Node.js. Returns undefined in old Node.js versions that don't\n * implement the API.\n */ function getNodePerformance() {\n try {\n const perfHooks = (0, $ink2I.dynamicRequire)(module, \"perf_hooks\");\n return perfHooks.performance;\n } catch (_) {\n return undefined;\n }\n}\n/**\n * The Performance API implementation for the current platform, if available.\n */ const platformPerformance = (0, $ink2I.isNodeEnv)() ? getNodePerformance() : getBrowserPerformance();\nconst timestampSource = platformPerformance === undefined ? dateTimestampSource : {\n nowSeconds: ()=>(platformPerformance.timeOrigin + platformPerformance.now()) / 1000\n};\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n */ const dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSource);\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * See `usingPerformanceAPI` to test whether the Performance API is used.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */ const timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource);\n/**\n * Re-exported with an old name for backwards-compatibility.\n * TODO (v8): Remove this\n *\n * @deprecated Use `timestampInSeconds` instead.\n */ const timestampWithMs = timestampInSeconds;\n/**\n * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.\n */ const usingPerformanceAPI = platformPerformance !== undefined;\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n */ let _browserPerformanceTimeOriginMode;\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */ const browserPerformanceTimeOrigin = (()=>{\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n const { performance } = WINDOW;\n if (!performance || !performance.now) {\n _browserPerformanceTimeOriginMode = \"none\";\n return undefined;\n }\n const threshold = 3600000;\n const performanceNow = performance.now();\n const dateNow = Date.now();\n // if timeOrigin isn't available set delta to threshold so it isn't used\n const timeOriginDelta = performance.timeOrigin ? Math.abs(performance.timeOrigin + performanceNow - dateNow) : threshold;\n const timeOriginIsReliable = timeOriginDelta < threshold;\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n const navigationStart = performance.timing && performance.timing.navigationStart;\n const hasNavigationStart = typeof navigationStart === \"number\";\n // if navigationStart isn't available set delta to threshold so it isn't used\n const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n const navigationStartIsReliable = navigationStartDelta < threshold;\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n _browserPerformanceTimeOriginMode = \"timeOrigin\";\n return performance.timeOrigin;\n } else {\n _browserPerformanceTimeOriginMode = \"navigationStart\";\n return navigationStart;\n }\n }\n // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n _browserPerformanceTimeOriginMode = \"dateNow\";\n return dateNow;\n})();\n\n});\nparcelRegister(\"ink2I\", function(module, exports) {\n\n$parcel$export(module.exports, \"isNodeEnv\", () => isNodeEnv);\n$parcel$export(module.exports, \"dynamicRequire\", () => dynamicRequire);\n$parcel$export(module.exports, \"loadModule\", () => loadModule);\n\nvar $kK3mJ = parcelRequire(\"kK3mJ\");\n\nvar $hP8pc = parcelRequire(\"hP8pc\");\n/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n */ /**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */ function isNodeEnv() {\n // explicitly check for browser bundles as those can be optimized statically\n // by terser/rollup.\n return !(0, $kK3mJ.isBrowserBundle)() && Object.prototype.toString.call(typeof $hP8pc !== \"undefined\" ? $hP8pc : 0) === \"[object process]\";\n}\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\nfunction dynamicRequire(mod, request) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\n}\n/**\n * Helper for dynamically loading module that should work with linked dependencies.\n * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`\n * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during\n * build time. `require.resolve` is also not available in any other way, so we cannot create,\n * a fake helper like we do with `dynamicRequire`.\n *\n * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.\n * That is to mimic the behavior of `require.resolve` exactly.\n *\n * @param moduleName module name to require\n * @returns possibly required module\n */ function loadModule(moduleName) {\n let mod;\n try {\n mod = dynamicRequire(module, moduleName);\n } catch (e) {\n // no-empty\n }\n try {\n const { cwd } = dynamicRequire(module, \"process\");\n mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`);\n } catch (e) {\n // no-empty\n }\n return mod;\n}\n\n});\nparcelRegister(\"kK3mJ\", function(module, exports) {\n\n$parcel$export(module.exports, \"isBrowserBundle\", () => $f19ab6e0ef0517a3$export$2928c40372e623c0);\n$parcel$export(module.exports, \"getSDKSource\", () => $f19ab6e0ef0517a3$export$8ad33f488b1ab046);\n/*\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `logger` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */ /**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */ function $f19ab6e0ef0517a3$export$2928c40372e623c0() {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== \"undefined\" && !!__SENTRY_BROWSER_BUNDLE__;\n}\n/**\n * Get source of SDK.\n */ function $f19ab6e0ef0517a3$export$8ad33f488b1ab046() {\n // @ts-expect-error \"npm\" is injected by rollup during build process\n return \"npm\";\n}\n\n});\n\n\n\nparcelRegister(\"aZ9cG\", function(module, exports) {\n\n$parcel$export(module.exports, \"uuid4\", () => $7ff6bd81588b7196$export$19f53698e68b2496);\n$parcel$export(module.exports, \"getEventDescription\", () => $7ff6bd81588b7196$export$4157119e2b157127);\n$parcel$export(module.exports, \"addExceptionTypeValue\", () => $7ff6bd81588b7196$export$f26508487bf83ee7);\n$parcel$export(module.exports, \"addExceptionMechanism\", () => $7ff6bd81588b7196$export$c69a9a0313b03bb1);\n$parcel$export(module.exports, \"checkOrSetAlreadyCaught\", () => $7ff6bd81588b7196$export$6de4ffac6a2f1098);\n$parcel$export(module.exports, \"arrayify\", () => $7ff6bd81588b7196$export$3131421a7d01b4fb);\n\nvar $aCgU1 = parcelRequire(\"aCgU1\");\n\nvar $6qV3U = parcelRequire(\"6qV3U\");\n\nvar $kPqMJ = parcelRequire(\"kPqMJ\");\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */ function $7ff6bd81588b7196$export$19f53698e68b2496() {\n const gbl = (0, $kPqMJ.GLOBAL_OBJ);\n const crypto = gbl.crypto || gbl.msCrypto;\n let getRandomByte = ()=>Math.random() * 16;\n try {\n if (crypto && crypto.randomUUID) return crypto.randomUUID().replace(/-/g, \"\");\n if (crypto && crypto.getRandomValues) getRandomByte = ()=>crypto.getRandomValues(new Uint8Array(1))[0];\n } catch (_) {\n // some runtimes can crash invoking crypto\n // https://github.com/getsentry/sentry-javascript/issues/8935\n }\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n return \"10000000100040008000100000000000\".replace(/[018]/g, (c)=>// eslint-disable-next-line no-bitwise\n (c ^ (getRandomByte() & 15) >> c / 4).toString(16));\n}\nfunction $7ff6bd81588b7196$var$getFirstException(event) {\n return event.exception && event.exception.values ? event.exception.values[0] : undefined;\n}\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */ function $7ff6bd81588b7196$export$4157119e2b157127(event) {\n const { message: message, event_id: eventId } = event;\n if (message) return message;\n const firstException = $7ff6bd81588b7196$var$getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) return `${firstException.type}: ${firstException.value}`;\n return firstException.type || firstException.value || eventId || \"\";\n }\n return eventId || \"\";\n}\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */ function $7ff6bd81588b7196$export$f26508487bf83ee7(event, value, type) {\n const exception = event.exception = event.exception || {};\n const values = exception.values = exception.values || [];\n const firstException = values[0] = values[0] || {};\n if (!firstException.value) firstException.value = value || \"\";\n if (!firstException.type) firstException.type = type || \"Error\";\n}\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */ function $7ff6bd81588b7196$export$c69a9a0313b03bb1(event, newMechanism) {\n const firstException = $7ff6bd81588b7196$var$getFirstException(event);\n if (!firstException) return;\n const defaultMechanism = {\n type: \"generic\",\n handled: true\n };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = {\n ...defaultMechanism,\n ...currentMechanism,\n ...newMechanism\n };\n if (newMechanism && \"data\" in newMechanism) {\n const mergedData = {\n ...currentMechanism && currentMechanism.data,\n ...newMechanism.data\n };\n firstException.mechanism.data = mergedData;\n }\n}\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst $7ff6bd81588b7196$var$SEMVER_REGEXP = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n/**\n * Represents Semantic Versioning object\n */ /**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */ function $7ff6bd81588b7196$export$d364f2020ab30578(input) {\n const match = input.match($7ff6bd81588b7196$var$SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4]\n };\n}\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */ function $7ff6bd81588b7196$export$ec2291bfc64632f0(lines, frame, linesOfContext = 5) {\n // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n if (frame.lineno === undefined) return;\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n frame.pre_context = lines.slice(Math.max(0, sourceLine - linesOfContext), sourceLine).map((line)=>(0, $6qV3U.snipLine)(line, 0));\n frame.context_line = (0, $6qV3U.snipLine)(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n frame.post_context = lines.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext).map((line)=>(0, $6qV3U.snipLine)(line, 0));\n}\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */ function $7ff6bd81588b7196$export$6de4ffac6a2f1098(exception) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (exception && exception.__sentry_captured__) return true;\n try {\n // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n // `ExtraErrorData` integration\n (0, $aCgU1.addNonEnumerableProperty)(exception, \"__sentry_captured__\", true);\n } catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n return false;\n}\n/**\n * Checks whether the given input is already an array, and if it isn't, wraps it in one.\n *\n * @param maybeArray Input to turn into an array, if necessary\n * @returns The input, if already an array, or an array with the input as the only element, if not\n */ function $7ff6bd81588b7196$export$3131421a7d01b4fb(maybeArray) {\n return Array.isArray(maybeArray) ? maybeArray : [\n maybeArray\n ];\n}\n\n});\nparcelRegister(\"aCgU1\", function(module, exports) {\n\n$parcel$export(module.exports, \"fill\", () => $7baa907c91595aad$export$9563e054e6f787fb);\n$parcel$export(module.exports, \"markFunctionWrapped\", () => $7baa907c91595aad$export$5c1499e2e5d010ae);\n$parcel$export(module.exports, \"addNonEnumerableProperty\", () => $7baa907c91595aad$export$e73679ffaf56810e);\n$parcel$export(module.exports, \"getOriginalFunction\", () => $7baa907c91595aad$export$e6cc1e135e2092e5);\n$parcel$export(module.exports, \"urlEncode\", () => $7baa907c91595aad$export$9ef804feabbcbaf1);\n$parcel$export(module.exports, \"convertToPlainObject\", () => $7baa907c91595aad$export$62ff257738bf57f5);\n$parcel$export(module.exports, \"extractExceptionKeysForMessage\", () => $7baa907c91595aad$export$b0244d5063c0b61b);\n$parcel$export(module.exports, \"dropUndefinedKeys\", () => $7baa907c91595aad$export$d25f2688db1bb433);\n\nvar $8SKxE = parcelRequire(\"8SKxE\");\n\nvar $8cfrP = parcelRequire(\"8cfrP\");\n\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $6qV3U = parcelRequire(\"6qV3U\");\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, )` or `origMethod.apply(this, [])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */ function $7baa907c91595aad$export$9563e054e6f787fb(source, name, replacementFactory) {\n if (!(name in source)) return;\n const original = source[name];\n const wrapped = replacementFactory(original);\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === \"function\") $7baa907c91595aad$export$5c1499e2e5d010ae(wrapped, original);\n source[name] = wrapped;\n}\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */ function $7baa907c91595aad$export$e73679ffaf56810e(obj, name, value) {\n try {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true\n });\n } catch (o_O) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(`Failed to add non-enumerable property \"${name}\" to object`, obj);\n }\n}\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */ function $7baa907c91595aad$export$5c1499e2e5d010ae(wrapped, original) {\n try {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n $7baa907c91595aad$export$e73679ffaf56810e(wrapped, \"__sentry_original__\", original);\n } catch (o_O) {} // eslint-disable-line no-empty\n}\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */ function $7baa907c91595aad$export$e6cc1e135e2092e5(func) {\n return func.__sentry_original__;\n}\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */ function $7baa907c91595aad$export$9ef804feabbcbaf1(object) {\n return Object.keys(object).map((key)=>`${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`).join(\"&\");\n}\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor\n * an Error.\n */ function $7baa907c91595aad$export$62ff257738bf57f5(value) {\n if ((0, $8cfrP.isError)(value)) return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...$7baa907c91595aad$var$getOwnProperties(value)\n };\n else if ((0, $8cfrP.isEvent)(value)) {\n const newObj = {\n type: value.type,\n target: $7baa907c91595aad$var$serializeEventTarget(value.target),\n currentTarget: $7baa907c91595aad$var$serializeEventTarget(value.currentTarget),\n ...$7baa907c91595aad$var$getOwnProperties(value)\n };\n if (typeof CustomEvent !== \"undefined\" && (0, $8cfrP.isInstanceOf)(value, CustomEvent)) newObj.detail = value.detail;\n return newObj;\n } else return value;\n}\n/** Creates a string representation of the target of an `Event` object */ function $7baa907c91595aad$var$serializeEventTarget(target) {\n try {\n return (0, $8cfrP.isElement)(target) ? (0, $8SKxE.htmlTreeAsString)(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return \"\";\n }\n}\n/** Filters out all but an object's own properties */ function $7baa907c91595aad$var$getOwnProperties(obj) {\n if (typeof obj === \"object\" && obj !== null) {\n const extractedProps = {};\n for(const property in obj)if (Object.prototype.hasOwnProperty.call(obj, property)) extractedProps[property] = obj[property];\n return extractedProps;\n } else return {};\n}\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */ function $7baa907c91595aad$export$b0244d5063c0b61b(exception, maxLength = 40) {\n const keys = Object.keys($7baa907c91595aad$export$62ff257738bf57f5(exception));\n keys.sort();\n if (!keys.length) return \"[object has no keys]\";\n if (keys[0].length >= maxLength) return (0, $6qV3U.truncate)(keys[0], maxLength);\n for(let includedKeys = keys.length; includedKeys > 0; includedKeys--){\n const serialized = keys.slice(0, includedKeys).join(\", \");\n if (serialized.length > maxLength) continue;\n if (includedKeys === keys.length) return serialized;\n return (0, $6qV3U.truncate)(serialized, maxLength);\n }\n return \"\";\n}\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */ function $7baa907c91595aad$export$d25f2688db1bb433(inputValue) {\n // This map keeps track of what already visited nodes map to.\n // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n // references as the input object.\n const memoizationMap = new Map();\n // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n return $7baa907c91595aad$var$_dropUndefinedKeys(inputValue, memoizationMap);\n}\nfunction $7baa907c91595aad$var$_dropUndefinedKeys(inputValue, memoizationMap) {\n if ((0, $8cfrP.isPlainObject)(inputValue)) {\n // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) return memoVal;\n const returnValue = {};\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n for (const key of Object.keys(inputValue))if (typeof inputValue[key] !== \"undefined\") returnValue[key] = $7baa907c91595aad$var$_dropUndefinedKeys(inputValue[key], memoizationMap);\n return returnValue;\n }\n if (Array.isArray(inputValue)) {\n // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) return memoVal;\n const returnValue = [];\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n inputValue.forEach((item)=>{\n returnValue.push($7baa907c91595aad$var$_dropUndefinedKeys(item, memoizationMap));\n });\n return returnValue;\n }\n return inputValue;\n}\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */ function $7baa907c91595aad$export$92b78acdbe066b6b(wat) {\n let objectified;\n switch(true){\n case wat === undefined || wat === null:\n objectified = new String(wat);\n break;\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === \"symbol\" || typeof wat === \"bigint\":\n objectified = Object(wat);\n break;\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case (0, $8cfrP.isPrimitive)(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new wat.constructor(wat);\n break;\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n\n});\nparcelRegister(\"8SKxE\", function(module, exports) {\n\n$parcel$export(module.exports, \"htmlTreeAsString\", () => $6777781ef1f2f9dd$export$5647df6b7814ac86);\n$parcel$export(module.exports, \"getLocationHref\", () => $6777781ef1f2f9dd$export$1cfafeee2987818b);\n$parcel$export(module.exports, \"getDomElement\", () => $6777781ef1f2f9dd$export$c660c1f3ab49225c);\n\nvar $8cfrP = parcelRequire(\"8cfrP\");\n\nvar $kPqMJ = parcelRequire(\"kPqMJ\");\n// eslint-disable-next-line deprecation/deprecation\nconst $6777781ef1f2f9dd$var$WINDOW = (0, $kPqMJ.getGlobalObject)();\nconst $6777781ef1f2f9dd$var$DEFAULT_MAX_STRING_LENGTH = 80;\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */ function $6777781ef1f2f9dd$export$5647df6b7814ac86(elem, options = {}) {\n if (!elem) return \"\";\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = \" > \";\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = !Array.isArray(options) && options.maxStringLength || $6777781ef1f2f9dd$var$DEFAULT_MAX_STRING_LENGTH;\n while(currentElem && height++ < MAX_TRAVERSE_HEIGHT){\n nextStr = $6777781ef1f2f9dd$var$_htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === \"html\" || height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength) break;\n out.push(nextStr);\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n return out.reverse().join(separator);\n } catch (_oO) {\n return \"\";\n }\n}\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */ function $6777781ef1f2f9dd$var$_htmlElementAsString(el, keyAttrs) {\n const elem = el;\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n if (!elem || !elem.tagName) return \"\";\n out.push(elem.tagName.toLowerCase());\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs = keyAttrs && keyAttrs.length ? keyAttrs.filter((keyAttr)=>elem.getAttribute(keyAttr)).map((keyAttr)=>[\n keyAttr,\n elem.getAttribute(keyAttr)\n ]) : null;\n if (keyAttrPairs && keyAttrPairs.length) keyAttrPairs.forEach((keyAttrPair)=>{\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n else {\n if (elem.id) out.push(`#${elem.id}`);\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && (0, $8cfrP.isString)(className)) {\n classes = className.split(/\\s+/);\n for(i = 0; i < classes.length; i++)out.push(`.${classes[i]}`);\n }\n }\n const allowedAttrs = [\n \"aria-label\",\n \"type\",\n \"name\",\n \"title\",\n \"alt\"\n ];\n for(i = 0; i < allowedAttrs.length; i++){\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) out.push(`[${key}=\"${attr}\"]`);\n }\n return out.join(\"\");\n}\n/**\n * A safe form of location.href\n */ function $6777781ef1f2f9dd$export$1cfafeee2987818b() {\n try {\n return $6777781ef1f2f9dd$var$WINDOW.document.location.href;\n } catch (oO) {\n return \"\";\n }\n}\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existance of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction $6777781ef1f2f9dd$export$c660c1f3ab49225c(selector) {\n if ($6777781ef1f2f9dd$var$WINDOW.document && $6777781ef1f2f9dd$var$WINDOW.document.querySelector) return $6777781ef1f2f9dd$var$WINDOW.document.querySelector(selector);\n return null;\n}\n\n});\nparcelRegister(\"8cfrP\", function(module, exports) {\n\n$parcel$export(module.exports, \"isError\", () => $5f7b6d58759a9242$export$e6127cc7fe7395c3);\n$parcel$export(module.exports, \"isInstanceOf\", () => $5f7b6d58759a9242$export$49034edbe6b62415);\n$parcel$export(module.exports, \"isErrorEvent\", () => $5f7b6d58759a9242$export$9f9636d330b71954);\n$parcel$export(module.exports, \"isDOMError\", () => $5f7b6d58759a9242$export$ef9e2056653f0c8e);\n$parcel$export(module.exports, \"isDOMException\", () => $5f7b6d58759a9242$export$12e869b2a583f783);\n$parcel$export(module.exports, \"isString\", () => $5f7b6d58759a9242$export$844ec244b1367d54);\n$parcel$export(module.exports, \"isPrimitive\", () => $5f7b6d58759a9242$export$c3825b437cbdea5c);\n$parcel$export(module.exports, \"isPlainObject\", () => $5f7b6d58759a9242$export$53b83ca8eaab0383);\n$parcel$export(module.exports, \"isEvent\", () => $5f7b6d58759a9242$export$9671ea99bd126ace);\n$parcel$export(module.exports, \"isElement\", () => $5f7b6d58759a9242$export$45a5e7f76e0caa8d);\n$parcel$export(module.exports, \"isRegExp\", () => $5f7b6d58759a9242$export$49841c62b9eff15);\n$parcel$export(module.exports, \"isThenable\", () => $5f7b6d58759a9242$export$f5b060c2914b97c8);\n$parcel$export(module.exports, \"isSyntheticEvent\", () => $5f7b6d58759a9242$export$bc2894c7158efbac);\n$parcel$export(module.exports, \"isNaN\", () => $5f7b6d58759a9242$export$c9f5652083b8129d);\n$parcel$export(module.exports, \"isVueViewModel\", () => $5f7b6d58759a9242$export$7916fad0ebc23f48);\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst $5f7b6d58759a9242$var$objectToString = Object.prototype.toString;\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */ function $5f7b6d58759a9242$export$e6127cc7fe7395c3(wat) {\n switch($5f7b6d58759a9242$var$objectToString.call(wat)){\n case \"[object Error]\":\n case \"[object Exception]\":\n case \"[object DOMException]\":\n return true;\n default:\n return $5f7b6d58759a9242$export$49034edbe6b62415(wat, Error);\n }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */ function $5f7b6d58759a9242$var$isBuiltin(wat, className) {\n return $5f7b6d58759a9242$var$objectToString.call(wat) === `[object ${className}]`;\n}\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */ function $5f7b6d58759a9242$export$9f9636d330b71954(wat) {\n return $5f7b6d58759a9242$var$isBuiltin(wat, \"ErrorEvent\");\n}\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */ function $5f7b6d58759a9242$export$ef9e2056653f0c8e(wat) {\n return $5f7b6d58759a9242$var$isBuiltin(wat, \"DOMError\");\n}\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */ function $5f7b6d58759a9242$export$12e869b2a583f783(wat) {\n return $5f7b6d58759a9242$var$isBuiltin(wat, \"DOMException\");\n}\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */ function $5f7b6d58759a9242$export$844ec244b1367d54(wat) {\n return $5f7b6d58759a9242$var$isBuiltin(wat, \"String\");\n}\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */ function $5f7b6d58759a9242$export$c3825b437cbdea5c(wat) {\n return wat === null || typeof wat !== \"object\" && typeof wat !== \"function\";\n}\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */ function $5f7b6d58759a9242$export$53b83ca8eaab0383(wat) {\n return $5f7b6d58759a9242$var$isBuiltin(wat, \"Object\");\n}\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */ function $5f7b6d58759a9242$export$9671ea99bd126ace(wat) {\n return typeof Event !== \"undefined\" && $5f7b6d58759a9242$export$49034edbe6b62415(wat, Event);\n}\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */ function $5f7b6d58759a9242$export$45a5e7f76e0caa8d(wat) {\n return typeof Element !== \"undefined\" && $5f7b6d58759a9242$export$49034edbe6b62415(wat, Element);\n}\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */ function $5f7b6d58759a9242$export$49841c62b9eff15(wat) {\n return $5f7b6d58759a9242$var$isBuiltin(wat, \"RegExp\");\n}\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */ function $5f7b6d58759a9242$export$f5b060c2914b97c8(wat) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === \"function\");\n}\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */ function $5f7b6d58759a9242$export$bc2894c7158efbac(wat) {\n return $5f7b6d58759a9242$export$53b83ca8eaab0383(wat) && \"nativeEvent\" in wat && \"preventDefault\" in wat && \"stopPropagation\" in wat;\n}\n/**\n * Checks whether given value is NaN\n * {@link isNaN}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */ function $5f7b6d58759a9242$export$c9f5652083b8129d(wat) {\n return typeof wat === \"number\" && wat !== wat;\n}\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */ function $5f7b6d58759a9242$export$49034edbe6b62415(wat, base) {\n try {\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n/**\n * Checks whether given value's type is a Vue ViewModel.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */ function $5f7b6d58759a9242$export$7916fad0ebc23f48(wat) {\n // Not using Object.prototype.toString because in Vue 3 it would read the instance's Symbol(Symbol.toStringTag) property.\n return !!(typeof wat === \"object\" && wat !== null && (wat.__isVue || wat._isVue));\n}\n\n});\n\n\nparcelRegister(\"6qV3U\", function(module, exports) {\n\n$parcel$export(module.exports, \"truncate\", () => $4af16f1ad58b3b60$export$6a506b36fdea397d);\n$parcel$export(module.exports, \"snipLine\", () => $4af16f1ad58b3b60$export$4215662d762d6f9d);\n$parcel$export(module.exports, \"safeJoin\", () => $4af16f1ad58b3b60$export$465e9d514283d4fd);\n$parcel$export(module.exports, \"stringMatchesSomePattern\", () => $4af16f1ad58b3b60$export$a7a5ec66062ea5d);\n\nvar $8cfrP = parcelRequire(\"8cfrP\");\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */ function $4af16f1ad58b3b60$export$6a506b36fdea397d(str, max = 0) {\n if (typeof str !== \"string\" || max === 0) return str;\n return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */ function $4af16f1ad58b3b60$export$4215662d762d6f9d(line, colno) {\n let newLine = line;\n const lineLength = newLine.length;\n if (lineLength <= 150) return newLine;\n if (colno > lineLength) // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n let start = Math.max(colno - 60, 0);\n if (start < 5) start = 0;\n let end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) end = lineLength;\n if (end === lineLength) start = Math.max(end - 140, 0);\n newLine = newLine.slice(start, end);\n if (start > 0) newLine = `'{snip} ${newLine}`;\n if (end < lineLength) newLine += \" {snip}\";\n return newLine;\n}\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction $4af16f1ad58b3b60$export$465e9d514283d4fd(input, delimiter) {\n if (!Array.isArray(input)) return \"\";\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for(let i = 0; i < input.length; i++){\n const value = input[i];\n try {\n // This is a hack to fix a Vue3-specific bug that causes an infinite loop of\n // console warnings. This happens when a Vue template is rendered with\n // an undeclared variable, which we try to stringify, ultimately causing\n // Vue to issue another warning which repeats indefinitely.\n // see: https://github.com/getsentry/sentry-javascript/pull/8981\n if ((0, $8cfrP.isVueViewModel)(value)) output.push(\"[VueViewModel]\");\n else output.push(String(value));\n } catch (e) {\n output.push(\"[value cannot be serialized]\");\n }\n }\n return output.join(delimiter);\n}\n/**\n * Checks if the given value matches a regex or string\n *\n * @param value The string to test\n * @param pattern Either a regex or a string against which `value` will be matched\n * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match\n * `pattern` if it contains `pattern`. Only applies to string-type patterns.\n */ function $4af16f1ad58b3b60$export$cdded5b28a5f8c6d(value, pattern, requireExactStringMatch = false) {\n if (!(0, $8cfrP.isString)(value)) return false;\n if ((0, $8cfrP.isRegExp)(pattern)) return pattern.test(value);\n if ((0, $8cfrP.isString)(pattern)) return requireExactStringMatch ? value === pattern : value.includes(pattern);\n return false;\n}\n/**\n * Test the given string against an array of strings and regexes. By default, string matching is done on a\n * substring-inclusion basis rather than a strict equality basis\n *\n * @param testString The string to test\n * @param patterns The patterns against which to test the string\n * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to\n * count. If false, `testString` will match a string pattern if it contains that pattern.\n * @returns\n */ function $4af16f1ad58b3b60$export$a7a5ec66062ea5d(testString, patterns = [], requireExactStringMatch = false) {\n return patterns.some((pattern)=>$4af16f1ad58b3b60$export$cdded5b28a5f8c6d(testString, pattern, requireExactStringMatch));\n}\n\n});\n\n\n\nparcelRegister(\"bagDH\", function(module, exports) {\n\n$parcel$export(module.exports, \"DEFAULT_ENVIRONMENT\", () => $820d891af722c6fc$export$849dbeeeda01ae98);\nconst $820d891af722c6fc$export$849dbeeeda01ae98 = \"production\";\n\n});\n\nparcelRegister(\"gP2DW\", function(module, exports) {\n\n$parcel$export(module.exports, \"Scope\", () => $c3f375ac93578695$export$775b6bb06e53a214);\n\nvar $aZ9cG = parcelRequire(\"aZ9cG\");\nvar $hbZCn = parcelRequire(\"hbZCn\");\nvar $8cfrP = parcelRequire(\"8cfrP\");\n\nvar $1Be8C = parcelRequire(\"1Be8C\");\n\nvar $4Dtig = parcelRequire(\"4Dtig\");\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */ const $c3f375ac93578695$var$DEFAULT_MAX_BREADCRUMBS = 100;\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */ class $c3f375ac93578695$export$775b6bb06e53a214 {\n /** Flag if notifying is happening. */ /** Callback for client to receive scope changes. */ /** Callback list that will be called after {@link applyToEvent}. */ /** Array of breadcrumbs. */ /** User */ /** Tags */ /** Extra */ /** Contexts */ /** Attachments */ /** Propagation Context for distributed tracing */ /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */ /** Fingerprint */ /** Severity */ // eslint-disable-next-line deprecation/deprecation\n /** Transaction Name */ /** Span */ /** Session */ /** Request Mode Session Status */ // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n constructor(){\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = $c3f375ac93578695$var$generatePropagationContext();\n }\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */ static clone(scope) {\n const newScope = new $c3f375ac93578695$export$775b6bb06e53a214();\n if (scope) {\n newScope._breadcrumbs = [\n ...scope._breadcrumbs\n ];\n newScope._tags = {\n ...scope._tags\n };\n newScope._extra = {\n ...scope._extra\n };\n newScope._contexts = {\n ...scope._contexts\n };\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._session = scope._session;\n newScope._transactionName = scope._transactionName;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = [\n ...scope._eventProcessors\n ];\n newScope._requestSession = scope._requestSession;\n newScope._attachments = [\n ...scope._attachments\n ];\n newScope._sdkProcessingMetadata = {\n ...scope._sdkProcessingMetadata\n };\n newScope._propagationContext = {\n ...scope._propagationContext\n };\n }\n return newScope;\n }\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */ addScopeListener(callback) {\n this._scopeListeners.push(callback);\n }\n /**\n * @inheritDoc\n */ addEventProcessor(callback) {\n this._eventProcessors.push(callback);\n return this;\n }\n /**\n * @inheritDoc\n */ setUser(user) {\n this._user = user || {};\n if (this._session) (0, $4Dtig.updateSession)(this._session, {\n user: user\n });\n this._notifyScopeListeners();\n return this;\n }\n /**\n * @inheritDoc\n */ getUser() {\n return this._user;\n }\n /**\n * @inheritDoc\n */ getRequestSession() {\n return this._requestSession;\n }\n /**\n * @inheritDoc\n */ setRequestSession(requestSession) {\n this._requestSession = requestSession;\n return this;\n }\n /**\n * @inheritDoc\n */ setTags(tags) {\n this._tags = {\n ...this._tags,\n ...tags\n };\n this._notifyScopeListeners();\n return this;\n }\n /**\n * @inheritDoc\n */ setTag(key, value) {\n this._tags = {\n ...this._tags,\n [key]: value\n };\n this._notifyScopeListeners();\n return this;\n }\n /**\n * @inheritDoc\n */ setExtras(extras) {\n this._extra = {\n ...this._extra,\n ...extras\n };\n this._notifyScopeListeners();\n return this;\n }\n /**\n * @inheritDoc\n */ setExtra(key, extra) {\n this._extra = {\n ...this._extra,\n [key]: extra\n };\n this._notifyScopeListeners();\n return this;\n }\n /**\n * @inheritDoc\n */ setFingerprint(fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n /**\n * @inheritDoc\n */ setLevel(// eslint-disable-next-line deprecation/deprecation\n level) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n /**\n * @inheritDoc\n */ setTransactionName(name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n /**\n * @inheritDoc\n */ setContext(key, context) {\n if (context === null) // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n else this._contexts[key] = context;\n this._notifyScopeListeners();\n return this;\n }\n /**\n * @inheritDoc\n */ setSpan(span) {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n /**\n * @inheritDoc\n */ getSpan() {\n return this._span;\n }\n /**\n * @inheritDoc\n */ getTransaction() {\n // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will\n // have a pointer to the currently-active transaction.\n const span = this.getSpan();\n return span && span.transaction;\n }\n /**\n * @inheritDoc\n */ setSession(session) {\n if (!session) delete this._session;\n else this._session = session;\n this._notifyScopeListeners();\n return this;\n }\n /**\n * @inheritDoc\n */ getSession() {\n return this._session;\n }\n /**\n * @inheritDoc\n */ update(captureContext) {\n if (!captureContext) return this;\n if (typeof captureContext === \"function\") {\n const updatedScope = captureContext(this);\n return updatedScope instanceof $c3f375ac93578695$export$775b6bb06e53a214 ? updatedScope : this;\n }\n if (captureContext instanceof $c3f375ac93578695$export$775b6bb06e53a214) {\n this._tags = {\n ...this._tags,\n ...captureContext._tags\n };\n this._extra = {\n ...this._extra,\n ...captureContext._extra\n };\n this._contexts = {\n ...this._contexts,\n ...captureContext._contexts\n };\n if (captureContext._user && Object.keys(captureContext._user).length) this._user = captureContext._user;\n if (captureContext._level) this._level = captureContext._level;\n if (captureContext._fingerprint) this._fingerprint = captureContext._fingerprint;\n if (captureContext._requestSession) this._requestSession = captureContext._requestSession;\n if (captureContext._propagationContext) this._propagationContext = captureContext._propagationContext;\n } else if ((0, $8cfrP.isPlainObject)(captureContext)) {\n // eslint-disable-next-line no-param-reassign\n captureContext;\n this._tags = {\n ...this._tags,\n ...captureContext.tags\n };\n this._extra = {\n ...this._extra,\n ...captureContext.extra\n };\n this._contexts = {\n ...this._contexts,\n ...captureContext.contexts\n };\n if (captureContext.user) this._user = captureContext.user;\n if (captureContext.level) this._level = captureContext.level;\n if (captureContext.fingerprint) this._fingerprint = captureContext.fingerprint;\n if (captureContext.requestSession) this._requestSession = captureContext.requestSession;\n if (captureContext.propagationContext) this._propagationContext = captureContext.propagationContext;\n }\n return this;\n }\n /**\n * @inheritDoc\n */ clear() {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n this._attachments = [];\n this._propagationContext = $c3f375ac93578695$var$generatePropagationContext();\n return this;\n }\n /**\n * @inheritDoc\n */ addBreadcrumb(breadcrumb, maxBreadcrumbs) {\n const maxCrumbs = typeof maxBreadcrumbs === \"number\" ? maxBreadcrumbs : $c3f375ac93578695$var$DEFAULT_MAX_BREADCRUMBS;\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) return this;\n const mergedBreadcrumb = {\n timestamp: (0, $hbZCn.dateTimestampInSeconds)(),\n ...breadcrumb\n };\n const breadcrumbs = this._breadcrumbs;\n breadcrumbs.push(mergedBreadcrumb);\n this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs;\n this._notifyScopeListeners();\n return this;\n }\n /**\n * @inheritDoc\n */ getLastBreadcrumb() {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n /**\n * @inheritDoc\n */ clearBreadcrumbs() {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n /**\n * @inheritDoc\n */ addAttachment(attachment) {\n this._attachments.push(attachment);\n return this;\n }\n /**\n * @inheritDoc\n */ getAttachments() {\n return this._attachments;\n }\n /**\n * @inheritDoc\n */ clearAttachments() {\n this._attachments = [];\n return this;\n }\n /**\n * Applies data from the scope to the event and runs all event processors on it.\n *\n * @param event Event\n * @param hint Object containing additional information about the original exception, for use by the event processors.\n * @hidden\n */ applyToEvent(event, hint = {}, additionalEventProcessors) {\n if (this._extra && Object.keys(this._extra).length) event.extra = {\n ...this._extra,\n ...event.extra\n };\n if (this._tags && Object.keys(this._tags).length) event.tags = {\n ...this._tags,\n ...event.tags\n };\n if (this._user && Object.keys(this._user).length) event.user = {\n ...this._user,\n ...event.user\n };\n if (this._contexts && Object.keys(this._contexts).length) event.contexts = {\n ...this._contexts,\n ...event.contexts\n };\n if (this._level) event.level = this._level;\n if (this._transactionName) event.transaction = this._transactionName;\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (this._span) {\n event.contexts = {\n trace: this._span.getTraceContext(),\n ...event.contexts\n };\n const transaction = this._span.transaction;\n if (transaction) {\n event.sdkProcessingMetadata = {\n dynamicSamplingContext: transaction.getDynamicSamplingContext(),\n ...event.sdkProcessingMetadata\n };\n const transactionName = transaction.name;\n if (transactionName) event.tags = {\n transaction: transactionName,\n ...event.tags\n };\n }\n }\n this._applyFingerprint(event);\n const scopeBreadcrumbs = this._getBreadcrumbs();\n const breadcrumbs = [\n ...event.breadcrumbs || [],\n ...scopeBreadcrumbs\n ];\n event.breadcrumbs = breadcrumbs.length > 0 ? breadcrumbs : undefined;\n event.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n ...this._sdkProcessingMetadata,\n propagationContext: this._propagationContext\n };\n // TODO (v8): Update this order to be: Global > Client > Scope\n return (0, $1Be8C.notifyEventProcessors)([\n ...additionalEventProcessors || [],\n ...(0, $1Be8C.getGlobalEventProcessors)(),\n ...this._eventProcessors\n ], event, hint);\n }\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry\n */ setSDKProcessingMetadata(newData) {\n this._sdkProcessingMetadata = {\n ...this._sdkProcessingMetadata,\n ...newData\n };\n return this;\n }\n /**\n * @inheritDoc\n */ setPropagationContext(context) {\n this._propagationContext = context;\n return this;\n }\n /**\n * @inheritDoc\n */ getPropagationContext() {\n return this._propagationContext;\n }\n /**\n * Get the breadcrumbs for this scope.\n */ _getBreadcrumbs() {\n return this._breadcrumbs;\n }\n /**\n * This will be called on every set call.\n */ _notifyScopeListeners() {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach((callback)=>{\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */ _applyFingerprint(event) {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint ? (0, $aZ9cG.arrayify)(event.fingerprint) : [];\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) event.fingerprint = event.fingerprint.concat(this._fingerprint);\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) delete event.fingerprint;\n }\n}\nfunction $c3f375ac93578695$var$generatePropagationContext() {\n return {\n traceId: (0, $aZ9cG.uuid4)(),\n spanId: (0, $aZ9cG.uuid4)().substring(16)\n };\n}\n\n});\nparcelRegister(\"1Be8C\", function(module, exports) {\n\n$parcel$export(module.exports, \"getGlobalEventProcessors\", () => $12a436a7097f0d31$export$3c4238858b85e8ac);\n$parcel$export(module.exports, \"addGlobalEventProcessor\", () => $12a436a7097f0d31$export$8e4e25f54d456511);\n$parcel$export(module.exports, \"notifyEventProcessors\", () => $12a436a7097f0d31$export$bf2a096c3e883e79);\n\nvar $kPqMJ = parcelRequire(\"kPqMJ\");\nvar $8cfrP = parcelRequire(\"8cfrP\");\nvar $boFAr = parcelRequire(\"boFAr\");\nvar $6SaPC = parcelRequire(\"6SaPC\");\n/**\n * Returns the global event processors.\n */ function $12a436a7097f0d31$export$3c4238858b85e8ac() {\n return (0, $kPqMJ.getGlobalSingleton)(\"globalEventProcessors\", ()=>[]);\n}\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */ function $12a436a7097f0d31$export$8e4e25f54d456511(callback) {\n $12a436a7097f0d31$export$3c4238858b85e8ac().push(callback);\n}\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */ function $12a436a7097f0d31$export$bf2a096c3e883e79(processors, event, hint, index = 0) {\n return new (0, $6SaPC.SyncPromise)((resolve, reject)=>{\n const processor = processors[index];\n if (event === null || typeof processor !== \"function\") resolve(event);\n else {\n const result = processor({\n ...event\n }, hint);\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && processor.id && result === null && (0, $boFAr.logger).log(`Event processor \"${processor.id}\" dropped event`);\n if ((0, $8cfrP.isThenable)(result)) result.then((final)=>$12a436a7097f0d31$export$bf2a096c3e883e79(processors, final, hint, index + 1).then(resolve)).then(null, reject);\n else $12a436a7097f0d31$export$bf2a096c3e883e79(processors, result, hint, index + 1).then(resolve).then(null, reject);\n }\n });\n}\n\n});\nparcelRegister(\"6SaPC\", function(module, exports) {\n\n$parcel$export(module.exports, \"resolvedSyncPromise\", () => $50103023bee6d175$export$1fda8aa4d135f8aa);\n$parcel$export(module.exports, \"SyncPromise\", () => $50103023bee6d175$export$6f292d4960313241);\n$parcel$export(module.exports, \"rejectedSyncPromise\", () => $50103023bee6d175$export$78e43115b553f358);\n\nvar $8cfrP = parcelRequire(\"8cfrP\");\n/* eslint-disable @typescript-eslint/explicit-function-return-type */ /** SyncPromise internal states */ var $50103023bee6d175$var$States;\n(function(States) {\n /** Pending */ const PENDING = 0;\n States[States[\"PENDING\"] = PENDING] = \"PENDING\";\n /** Resolved / OK */ const RESOLVED = 1;\n States[States[\"RESOLVED\"] = RESOLVED] = \"RESOLVED\";\n /** Rejected / Error */ const REJECTED = 2;\n States[States[\"REJECTED\"] = REJECTED] = \"REJECTED\";\n})($50103023bee6d175$var$States || ($50103023bee6d175$var$States = {}));\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */ function $50103023bee6d175$export$1fda8aa4d135f8aa(value) {\n return new $50103023bee6d175$export$6f292d4960313241((resolve)=>{\n resolve(value);\n });\n}\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */ function $50103023bee6d175$export$78e43115b553f358(reason) {\n return new $50103023bee6d175$export$6f292d4960313241((_, reject)=>{\n reject(reason);\n });\n}\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */ class $50103023bee6d175$export$6f292d4960313241 {\n constructor(executor){\n $50103023bee6d175$export$6f292d4960313241.prototype.__init.call(this);\n $50103023bee6d175$export$6f292d4960313241.prototype.__init2.call(this);\n $50103023bee6d175$export$6f292d4960313241.prototype.__init3.call(this);\n $50103023bee6d175$export$6f292d4960313241.prototype.__init4.call(this);\n this._state = $50103023bee6d175$var$States.PENDING;\n this._handlers = [];\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n /** JSDoc */ then(onfulfilled, onrejected) {\n return new $50103023bee6d175$export$6f292d4960313241((resolve, reject)=>{\n this._handlers.push([\n false,\n (result)=>{\n if (!onfulfilled) // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result);\n else try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n },\n (reason)=>{\n if (!onrejected) reject(reason);\n else try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n ]);\n this._executeHandlers();\n });\n }\n /** JSDoc */ catch(onrejected) {\n return this.then((val)=>val, onrejected);\n }\n /** JSDoc */ finally(onfinally) {\n return new $50103023bee6d175$export$6f292d4960313241((resolve, reject)=>{\n let val;\n let isRejected;\n return this.then((value)=>{\n isRejected = false;\n val = value;\n if (onfinally) onfinally();\n }, (reason)=>{\n isRejected = true;\n val = reason;\n if (onfinally) onfinally();\n }).then(()=>{\n if (isRejected) {\n reject(val);\n return;\n }\n resolve(val);\n });\n });\n }\n /** JSDoc */ __init() {\n this._resolve = (value)=>{\n this._setResult($50103023bee6d175$var$States.RESOLVED, value);\n };\n }\n /** JSDoc */ __init2() {\n this._reject = (reason)=>{\n this._setResult($50103023bee6d175$var$States.REJECTED, reason);\n };\n }\n /** JSDoc */ __init3() {\n this._setResult = (state, value)=>{\n if (this._state !== $50103023bee6d175$var$States.PENDING) return;\n if ((0, $8cfrP.isThenable)(value)) {\n value.then(this._resolve, this._reject);\n return;\n }\n this._state = state;\n this._value = value;\n this._executeHandlers();\n };\n }\n /** JSDoc */ __init4() {\n this._executeHandlers = ()=>{\n if (this._state === $50103023bee6d175$var$States.PENDING) return;\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n cachedHandlers.forEach((handler)=>{\n if (handler[0]) return;\n if (this._state === $50103023bee6d175$var$States.RESOLVED) // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](this._value);\n if (this._state === $50103023bee6d175$var$States.REJECTED) handler[2](this._value);\n handler[0] = true;\n });\n };\n }\n}\n\n});\n\n\nparcelRegister(\"4Dtig\", function(module, exports) {\n\n$parcel$export(module.exports, \"makeSession\", () => $36018705d1bcadfa$export$14a186326edbb264);\n$parcel$export(module.exports, \"updateSession\", () => $36018705d1bcadfa$export$531818e825e774db);\n$parcel$export(module.exports, \"closeSession\", () => $36018705d1bcadfa$export$56521d9ba90f62ee);\n\nvar $aCgU1 = parcelRequire(\"aCgU1\");\nvar $hbZCn = parcelRequire(\"hbZCn\");\nvar $aZ9cG = parcelRequire(\"aZ9cG\");\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */ function $36018705d1bcadfa$export$14a186326edbb264(context) {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = (0, $hbZCn.timestampInSeconds)();\n const session = {\n sid: (0, $aZ9cG.uuid4)(),\n init: true,\n timestamp: startingTime,\n started: startingTime,\n duration: 0,\n status: \"ok\",\n errors: 0,\n ignoreDuration: false,\n toJSON: ()=>$36018705d1bcadfa$var$sessionToJSON(session)\n };\n if (context) $36018705d1bcadfa$export$531818e825e774db(session, context);\n return session;\n}\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see BaseClient.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */ // eslint-disable-next-line complexity\nfunction $36018705d1bcadfa$export$531818e825e774db(session, context = {}) {\n if (context.user) {\n if (!session.ipAddress && context.user.ip_address) session.ipAddress = context.user.ip_address;\n if (!session.did && !context.did) session.did = context.user.id || context.user.email || context.user.username;\n }\n session.timestamp = context.timestamp || (0, $hbZCn.timestampInSeconds)();\n if (context.abnormal_mechanism) session.abnormal_mechanism = context.abnormal_mechanism;\n if (context.ignoreDuration) session.ignoreDuration = context.ignoreDuration;\n if (context.sid) // Good enough uuid validation. — Kamil\n session.sid = context.sid.length === 32 ? context.sid : (0, $aZ9cG.uuid4)();\n if (context.init !== undefined) session.init = context.init;\n if (!session.did && context.did) session.did = `${context.did}`;\n if (typeof context.started === \"number\") session.started = context.started;\n if (session.ignoreDuration) session.duration = undefined;\n else if (typeof context.duration === \"number\") session.duration = context.duration;\n else {\n const duration = session.timestamp - session.started;\n session.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) session.release = context.release;\n if (context.environment) session.environment = context.environment;\n if (!session.ipAddress && context.ipAddress) session.ipAddress = context.ipAddress;\n if (!session.userAgent && context.userAgent) session.userAgent = context.userAgent;\n if (typeof context.errors === \"number\") session.errors = context.errors;\n if (context.status) session.status = context.status;\n}\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n * this function will keep the previously set status, unless it was `'ok'` in which case\n * it is changed to `'exited'`.\n */ function $36018705d1bcadfa$export$56521d9ba90f62ee(session, status) {\n let context = {};\n if (status) context = {\n status: status\n };\n else if (session.status === \"ok\") context = {\n status: \"exited\"\n };\n $36018705d1bcadfa$export$531818e825e774db(session, context);\n}\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */ function $36018705d1bcadfa$var$sessionToJSON(session) {\n return (0, $aCgU1.dropUndefinedKeys)({\n sid: `${session.sid}`,\n init: session.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(session.started * 1000).toISOString(),\n timestamp: new Date(session.timestamp * 1000).toISOString(),\n status: session.status,\n errors: session.errors,\n did: typeof session.did === \"number\" || typeof session.did === \"string\" ? `${session.did}` : undefined,\n duration: session.duration,\n abnormal_mechanism: session.abnormal_mechanism,\n attrs: {\n release: session.release,\n environment: session.environment,\n ip_address: session.ipAddress,\n user_agent: session.userAgent\n }\n });\n}\n\n});\n\n\n\nparcelRegister(\"cIx5z\", function(module, exports) {\n\n$parcel$export(module.exports, \"getIntegrationsToSetup\", () => $942342d81ce1affd$export$68bc4c01ab8ae766);\n$parcel$export(module.exports, \"setupIntegrations\", () => $942342d81ce1affd$export$51abed9797baa598);\n$parcel$export(module.exports, \"setupIntegration\", () => $942342d81ce1affd$export$e7390a03b70a6f2f);\n\nvar $aZ9cG = parcelRequire(\"aZ9cG\");\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $1Be8C = parcelRequire(\"1Be8C\");\n\nvar $1D41F = parcelRequire(\"1D41F\");\nconst $942342d81ce1affd$export$b14a8888f80a0b3e = [];\n/** Map of integrations assigned to a client */ /**\n * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to\n * preseve the order of integrations in the array.\n *\n * @private\n */ function $942342d81ce1affd$var$filterDuplicates(integrations) {\n const integrationsByName = {};\n integrations.forEach((currentInstance)=>{\n const { name: name } = currentInstance;\n const existingInstance = integrationsByName[name];\n // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n // default instance to overwrite an existing user instance\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) return;\n integrationsByName[name] = currentInstance;\n });\n return Object.keys(integrationsByName).map((k)=>integrationsByName[k]);\n}\n/** Gets integrations to install */ function $942342d81ce1affd$export$68bc4c01ab8ae766(options) {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach((integration)=>{\n integration.isDefaultInstance = true;\n });\n let integrations;\n if (Array.isArray(userIntegrations)) integrations = [\n ...defaultIntegrations,\n ...userIntegrations\n ];\n else if (typeof userIntegrations === \"function\") integrations = (0, $aZ9cG.arrayify)(userIntegrations(defaultIntegrations));\n else integrations = defaultIntegrations;\n const finalIntegrations = $942342d81ce1affd$var$filterDuplicates(integrations);\n // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n const debugIndex = $942342d81ce1affd$var$findIndex(finalIntegrations, (integration)=>integration.name === \"Debug\");\n if (debugIndex !== -1) {\n const [debugInstance] = finalIntegrations.splice(debugIndex, 1);\n finalIntegrations.push(debugInstance);\n }\n return finalIntegrations;\n}\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */ function $942342d81ce1affd$export$51abed9797baa598(client, integrations) {\n const integrationIndex = {};\n integrations.forEach((integration)=>{\n // guard against empty provided integrations\n if (integration) $942342d81ce1affd$export$e7390a03b70a6f2f(client, integration, integrationIndex);\n });\n return integrationIndex;\n}\n/** Setup a single integration. */ function $942342d81ce1affd$export$e7390a03b70a6f2f(client, integration, integrationIndex) {\n integrationIndex[integration.name] = integration;\n if ($942342d81ce1affd$export$b14a8888f80a0b3e.indexOf(integration.name) === -1) {\n integration.setupOnce((0, $1Be8C.addGlobalEventProcessor), (0, $1D41F.getCurrentHub));\n $942342d81ce1affd$export$b14a8888f80a0b3e.push(integration.name);\n }\n if (client.on && typeof integration.preprocessEvent === \"function\") {\n const callback = integration.preprocessEvent.bind(integration);\n client.on(\"preprocessEvent\", (event, hint)=>callback(event, hint, client));\n }\n if (client.addEventProcessor && typeof integration.processEvent === \"function\") {\n const callback = integration.processEvent.bind(integration);\n const processor = Object.assign((event, hint)=>callback(event, hint, client), {\n id: integration.name\n });\n client.addEventProcessor(processor);\n }\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(`Integration installed: ${integration.name}`);\n}\n/** Add an integration to the current hub's client. */ function $942342d81ce1affd$export$2d8f5188773bcddd(integration) {\n const client = (0, $1D41F.getCurrentHub)().getClient();\n if (!client || !client.addIntegration) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n return;\n }\n client.addIntegration(integration);\n}\n// Polyfill for Array.findIndex(), which is not supported in ES5\nfunction $942342d81ce1affd$var$findIndex(arr, callback) {\n for(let i = 0; i < arr.length; i++){\n if (callback(arr[i]) === true) return i;\n }\n return -1;\n}\n\n});\n\nparcelRegister(\"f2G1X\", function(module, exports) {\n\n$parcel$export(module.exports, \"getEnvelopeEndpointWithUrlEncodedAuth\", () => $af37a54b12e8cd80$export$9964600bfe84e6a3);\n$parcel$export(module.exports, \"getReportDialogEndpoint\", () => $af37a54b12e8cd80$export$671c7ed8e40a7a57);\n\nvar $3R32v = parcelRequire(\"3R32v\");\nvar $aCgU1 = parcelRequire(\"aCgU1\");\nconst $af37a54b12e8cd80$var$SENTRY_API_VERSION = \"7\";\n/** Returns the prefix to construct Sentry ingestion API endpoints. */ function $af37a54b12e8cd80$var$getBaseApiEndpoint(dsn) {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : \"\";\n const port = dsn.port ? `:${dsn.port}` : \"\";\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : \"\"}/api/`;\n}\n/** Returns the ingest API endpoint for target. */ function $af37a54b12e8cd80$var$_getIngestEndpoint(dsn) {\n return `${$af37a54b12e8cd80$var$getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n/** Returns a URL-encoded string with auth config suitable for a query string. */ function $af37a54b12e8cd80$var$_encodedAuth(dsn, sdkInfo) {\n return (0, $aCgU1.urlEncode)({\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: $af37a54b12e8cd80$var$SENTRY_API_VERSION,\n ...sdkInfo && {\n sentry_client: `${sdkInfo.name}/${sdkInfo.version}`\n }\n });\n}\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */ function $af37a54b12e8cd80$export$9964600bfe84e6a3(dsn, // TODO (v8): Remove `tunnelOrOptions` in favor of `options`, and use the substitute code below\n// options: ClientOptions = {} as ClientOptions,\ntunnelOrOptions = {}) {\n // TODO (v8): Use this code instead\n // const { tunnel, _metadata = {} } = options;\n // return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, _metadata.sdk)}`;\n const tunnel = typeof tunnelOrOptions === \"string\" ? tunnelOrOptions : tunnelOrOptions.tunnel;\n const sdkInfo = typeof tunnelOrOptions === \"string\" || !tunnelOrOptions._metadata ? undefined : tunnelOrOptions._metadata.sdk;\n return tunnel ? tunnel : `${$af37a54b12e8cd80$var$_getIngestEndpoint(dsn)}?${$af37a54b12e8cd80$var$_encodedAuth(dsn, sdkInfo)}`;\n}\n/** Returns the url to the report dialog endpoint. */ function $af37a54b12e8cd80$export$671c7ed8e40a7a57(dsnLike, dialogOptions) {\n const dsn = (0, $3R32v.makeDsn)(dsnLike);\n if (!dsn) return \"\";\n const endpoint = `${$af37a54b12e8cd80$var$getBaseApiEndpoint(dsn)}embed/error-page/`;\n let encodedOptions = `dsn=${(0, $3R32v.dsnToString)(dsn)}`;\n for(const key in dialogOptions){\n if (key === \"dsn\") continue;\n if (key === \"user\") {\n const user = dialogOptions.user;\n if (!user) continue;\n if (user.name) encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n if (user.email) encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n } else encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key])}`;\n }\n return `${endpoint}?${encodedOptions}`;\n}\n\n});\nparcelRegister(\"3R32v\", function(module, exports) {\n\n$parcel$export(module.exports, \"dsnToString\", () => $2ce8ade492c2c66d$export$44d472fbb931a776);\n$parcel$export(module.exports, \"makeDsn\", () => $2ce8ade492c2c66d$export$128827c3562ec0cb);\n\nvar $boFAr = parcelRequire(\"boFAr\");\n/** Regular expression used to parse a Dsn. */ const $2ce8ade492c2c66d$var$DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\nfunction $2ce8ade492c2c66d$var$isValidProtocol(protocol) {\n return protocol === \"http\" || protocol === \"https\";\n}\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */ function $2ce8ade492c2c66d$export$44d472fbb931a776(dsn, withPassword = false) {\n const { host: host, path: path, pass: pass, port: port, projectId: projectId, protocol: protocol, publicKey: publicKey } = dsn;\n return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : \"\"}` + `@${host}${port ? `:${port}` : \"\"}/${path ? `${path}/` : path}${projectId}`;\n}\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */ function $2ce8ade492c2c66d$export$b892860177f70a30(str) {\n const match = $2ce8ade492c2c66d$var$DSN_REGEX.exec(str);\n if (!match) {\n // This should be logged to the console\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n return undefined;\n }\n const [protocol, publicKey, pass = \"\", host, port = \"\", lastPath] = match.slice(1);\n let path = \"\";\n let projectId = lastPath;\n const split = projectId.split(\"/\");\n if (split.length > 1) {\n path = split.slice(0, -1).join(\"/\");\n projectId = split.pop();\n }\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) projectId = projectMatch[0];\n }\n return $2ce8ade492c2c66d$var$dsnFromComponents({\n host: host,\n pass: pass,\n path: path,\n projectId: projectId,\n port: port,\n protocol: protocol,\n publicKey: publicKey\n });\n}\nfunction $2ce8ade492c2c66d$var$dsnFromComponents(components) {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || \"\",\n pass: components.pass || \"\",\n host: components.host,\n port: components.port || \"\",\n path: components.path || \"\",\n projectId: components.projectId\n };\n}\nfunction $2ce8ade492c2c66d$var$validateDsn(dsn) {\n if (!(typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__)) return true;\n const { port: port, projectId: projectId, protocol: protocol } = dsn;\n const requiredComponents = [\n \"protocol\",\n \"publicKey\",\n \"host\",\n \"projectId\"\n ];\n const hasMissingRequiredComponent = requiredComponents.find((component)=>{\n if (!dsn[component]) {\n (0, $boFAr.logger).error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n if (hasMissingRequiredComponent) return false;\n if (!projectId.match(/^\\d+$/)) {\n (0, $boFAr.logger).error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n if (!$2ce8ade492c2c66d$var$isValidProtocol(protocol)) {\n (0, $boFAr.logger).error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n if (port && isNaN(parseInt(port, 10))) {\n (0, $boFAr.logger).error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n return true;\n}\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */ function $2ce8ade492c2c66d$export$128827c3562ec0cb(from) {\n const components = typeof from === \"string\" ? $2ce8ade492c2c66d$export$b892860177f70a30(from) : $2ce8ade492c2c66d$var$dsnFromComponents(from);\n if (!components || !$2ce8ade492c2c66d$var$validateDsn(components)) return undefined;\n return components;\n}\n\n});\n\n\nparcelRegister(\"7kOyh\", function(module, exports) {\n\n$parcel$export(module.exports, \"initAndBind\", () => $55719d3744764fca$export$5333c3f1c58d9bc1);\n\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $1D41F = parcelRequire(\"1D41F\");\n/** A class object that can instantiate Client objects. */ /**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */ function $55719d3744764fca$export$5333c3f1c58d9bc1(clientClass, options) {\n if (options.debug === true) {\n if (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) (0, $boFAr.logger).enable();\n else // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n // eslint-disable-next-line no-console\n console.warn(\"[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.\");\n }\n const hub = (0, $1D41F.getCurrentHub)();\n const scope = hub.getScope();\n scope.update(options.initialScope);\n const client = new clientClass(options);\n hub.bindClient(client);\n}\n\n});\n\nparcelRegister(\"rNbsF\", function(module, exports) {\n\n$parcel$export(module.exports, \"FunctionToString\", () => (parcelRequire(\"5jNMi\")).FunctionToString);\n$parcel$export(module.exports, \"InboundFilters\", () => (parcelRequire(\"iULrj\")).InboundFilters);\n$parcel$export(module.exports, \"LinkedErrors\", () => (parcelRequire(\"crBKB\")).LinkedErrors);\n\nvar $5jNMi = parcelRequire(\"5jNMi\");\n\nvar $iULrj = parcelRequire(\"iULrj\");\n\nvar $crBKB = parcelRequire(\"crBKB\");\n\n});\nparcelRegister(\"5jNMi\", function(module, exports) {\n\n$parcel$export(module.exports, \"FunctionToString\", () => $3df556fcff5e8d6a$export$da4704525c20ae79);\n\nvar $aCgU1 = parcelRequire(\"aCgU1\");\nlet $3df556fcff5e8d6a$var$originalFunctionToString;\n/** Patch toString calls to return proper name for wrapped functions */ class $3df556fcff5e8d6a$export$da4704525c20ae79 {\n /**\n * @inheritDoc\n */ static __initStatic() {\n this.id = \"FunctionToString\";\n }\n /**\n * @inheritDoc\n */ constructor(){\n this.name = $3df556fcff5e8d6a$export$da4704525c20ae79.id;\n }\n /**\n * @inheritDoc\n */ setupOnce() {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n $3df556fcff5e8d6a$var$originalFunctionToString = Function.prototype.toString;\n // intrinsics (like Function.prototype) might be immutable in some environments\n // e.g. Node with --frozen-intrinsics, XS (an embedded JavaScript engine) or SES (a JavaScript proposal)\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function(...args) {\n const context = (0, $aCgU1.getOriginalFunction)(this) || this;\n return $3df556fcff5e8d6a$var$originalFunctionToString.apply(context, args);\n };\n } catch (e) {\n // ignore errors here, just don't patch this\n }\n }\n}\n$3df556fcff5e8d6a$export$da4704525c20ae79.__initStatic();\n\n});\n\nparcelRegister(\"iULrj\", function(module, exports) {\n\n$parcel$export(module.exports, \"InboundFilters\", () => $dc52417356a5d683$export$2ffbb5359dcc6be4);\n\nvar $aZ9cG = parcelRequire(\"aZ9cG\");\nvar $boFAr = parcelRequire(\"boFAr\");\nvar $6qV3U = parcelRequire(\"6qV3U\");\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst $dc52417356a5d683$var$DEFAULT_IGNORE_ERRORS = [\n /^Script error\\.?$/,\n /^Javascript error: Script error\\.? on line 0$/\n];\nconst $dc52417356a5d683$var$DEFAULT_IGNORE_TRANSACTIONS = [\n /^.*\\/healthcheck$/,\n /^.*\\/healthy$/,\n /^.*\\/live$/,\n /^.*\\/ready$/,\n /^.*\\/heartbeat$/,\n /^.*\\/health$/,\n /^.*\\/healthz$/\n];\n/** Options for the InboundFilters integration */ /** Inbound filters configurable by the user */ class $dc52417356a5d683$export$2ffbb5359dcc6be4 {\n /**\n * @inheritDoc\n */ static __initStatic() {\n this.id = \"InboundFilters\";\n }\n /**\n * @inheritDoc\n */ constructor(options = {}){\n this.name = $dc52417356a5d683$export$2ffbb5359dcc6be4.id;\n this._options = options;\n }\n /**\n * @inheritDoc\n */ setupOnce(_addGlobaleventProcessor, _getCurrentHub) {\n // noop\n }\n /** @inheritDoc */ processEvent(event, _eventHint, client) {\n const clientOptions = client.getOptions();\n const options = $dc52417356a5d683$export$6620a151868b99aa(this._options, clientOptions);\n return $dc52417356a5d683$export$3c6361fddf6cd929(event, options) ? null : event;\n }\n}\n$dc52417356a5d683$export$2ffbb5359dcc6be4.__initStatic();\n/** JSDoc */ function $dc52417356a5d683$export$6620a151868b99aa(internalOptions = {}, clientOptions = {}) {\n return {\n allowUrls: [\n ...internalOptions.allowUrls || [],\n ...clientOptions.allowUrls || []\n ],\n denyUrls: [\n ...internalOptions.denyUrls || [],\n ...clientOptions.denyUrls || []\n ],\n ignoreErrors: [\n ...internalOptions.ignoreErrors || [],\n ...clientOptions.ignoreErrors || [],\n ...internalOptions.disableErrorDefaults ? [] : $dc52417356a5d683$var$DEFAULT_IGNORE_ERRORS\n ],\n ignoreTransactions: [\n ...internalOptions.ignoreTransactions || [],\n ...clientOptions.ignoreTransactions || [],\n ...internalOptions.disableTransactionDefaults ? [] : $dc52417356a5d683$var$DEFAULT_IGNORE_TRANSACTIONS\n ],\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true\n };\n}\n/** JSDoc */ function $dc52417356a5d683$export$3c6361fddf6cd929(event, options) {\n if (options.ignoreInternal && $dc52417356a5d683$var$_isSentryError(event)) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${(0, $aZ9cG.getEventDescription)(event)}`);\n return true;\n }\n if ($dc52417356a5d683$var$_isIgnoredError(event, options.ignoreErrors)) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(`Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${(0, $aZ9cG.getEventDescription)(event)}`);\n return true;\n }\n if ($dc52417356a5d683$var$_isIgnoredTransaction(event, options.ignoreTransactions)) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(`Event dropped due to being matched by \\`ignoreTransactions\\` option.\\nEvent: ${(0, $aZ9cG.getEventDescription)(event)}`);\n return true;\n }\n if ($dc52417356a5d683$var$_isDeniedUrl(event, options.denyUrls)) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(`Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${(0, $aZ9cG.getEventDescription)(event)}.\\nUrl: ${$dc52417356a5d683$var$_getEventFilterUrl(event)}`);\n return true;\n }\n if (!$dc52417356a5d683$var$_isAllowedUrl(event, options.allowUrls)) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(`Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${(0, $aZ9cG.getEventDescription)(event)}.\\nUrl: ${$dc52417356a5d683$var$_getEventFilterUrl(event)}`);\n return true;\n }\n return false;\n}\nfunction $dc52417356a5d683$var$_isIgnoredError(event, ignoreErrors) {\n // If event.type, this is not an error\n if (event.type || !ignoreErrors || !ignoreErrors.length) return false;\n return $dc52417356a5d683$var$_getPossibleEventMessages(event).some((message)=>(0, $6qV3U.stringMatchesSomePattern)(message, ignoreErrors));\n}\nfunction $dc52417356a5d683$var$_isIgnoredTransaction(event, ignoreTransactions) {\n if (event.type !== \"transaction\" || !ignoreTransactions || !ignoreTransactions.length) return false;\n const name = event.transaction;\n return name ? (0, $6qV3U.stringMatchesSomePattern)(name, ignoreTransactions) : false;\n}\nfunction $dc52417356a5d683$var$_isDeniedUrl(event, denyUrls) {\n // TODO: Use Glob instead?\n if (!denyUrls || !denyUrls.length) return false;\n const url = $dc52417356a5d683$var$_getEventFilterUrl(event);\n return !url ? false : (0, $6qV3U.stringMatchesSomePattern)(url, denyUrls);\n}\nfunction $dc52417356a5d683$var$_isAllowedUrl(event, allowUrls) {\n // TODO: Use Glob instead?\n if (!allowUrls || !allowUrls.length) return true;\n const url = $dc52417356a5d683$var$_getEventFilterUrl(event);\n return !url ? true : (0, $6qV3U.stringMatchesSomePattern)(url, allowUrls);\n}\nfunction $dc52417356a5d683$var$_getPossibleEventMessages(event) {\n const possibleMessages = [];\n if (event.message) possibleMessages.push(event.message);\n let lastException;\n try {\n // @ts-expect-error Try catching to save bundle size\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n lastException = event.exception.values[event.exception.values.length - 1];\n } catch (e) {\n // try catching to save bundle size checking existence of variables\n }\n if (lastException) {\n if (lastException.value) {\n possibleMessages.push(lastException.value);\n if (lastException.type) possibleMessages.push(`${lastException.type}: ${lastException.value}`);\n }\n }\n if ((typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && possibleMessages.length === 0) (0, $boFAr.logger).error(`Could not extract message for event ${(0, $aZ9cG.getEventDescription)(event)}`);\n return possibleMessages;\n}\nfunction $dc52417356a5d683$var$_isSentryError(event) {\n try {\n // @ts-expect-error can't be a sentry error if undefined\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return event.exception.values[0].type === \"SentryError\";\n } catch (e) {\n // ignore\n }\n return false;\n}\nfunction $dc52417356a5d683$var$_getLastValidUrl(frames = []) {\n for(let i = frames.length - 1; i >= 0; i--){\n const frame = frames[i];\n if (frame && frame.filename !== \"\" && frame.filename !== \"[native code]\") return frame.filename || null;\n }\n return null;\n}\nfunction $dc52417356a5d683$var$_getEventFilterUrl(event) {\n try {\n let frames;\n try {\n // @ts-expect-error we only care about frames if the whole thing here is defined\n frames = event.exception.values[0].stacktrace.frames;\n } catch (e) {\n // ignore\n }\n return frames ? $dc52417356a5d683$var$_getLastValidUrl(frames) : null;\n } catch (oO) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(`Cannot extract url for event ${(0, $aZ9cG.getEventDescription)(event)}`);\n return null;\n }\n}\n\n});\n\nparcelRegister(\"crBKB\", function(module, exports) {\n\n$parcel$export(module.exports, \"LinkedErrors\", () => $90f54a2bd3a75444$export$8d1e60aaf616fb4f);\n\nvar $7qGRm = parcelRequire(\"7qGRm\");\nvar $aCdlr = parcelRequire(\"aCdlr\");\nconst $90f54a2bd3a75444$var$DEFAULT_KEY = \"cause\";\nconst $90f54a2bd3a75444$var$DEFAULT_LIMIT = 5;\n/** Adds SDK info to an event. */ class $90f54a2bd3a75444$export$8d1e60aaf616fb4f {\n /**\n * @inheritDoc\n */ static __initStatic() {\n this.id = \"LinkedErrors\";\n }\n /**\n * @inheritDoc\n */ /**\n * @inheritDoc\n */ /**\n * @inheritDoc\n */ /**\n * @inheritDoc\n */ constructor(options = {}){\n this._key = options.key || $90f54a2bd3a75444$var$DEFAULT_KEY;\n this._limit = options.limit || $90f54a2bd3a75444$var$DEFAULT_LIMIT;\n this.name = $90f54a2bd3a75444$export$8d1e60aaf616fb4f.id;\n }\n /** @inheritdoc */ setupOnce() {\n // noop\n }\n /**\n * @inheritDoc\n */ preprocessEvent(event, hint, client) {\n const options = client.getOptions();\n (0, $7qGRm.applyAggregateErrorsToEvent)((0, $aCdlr.exceptionFromError), options.stackParser, options.maxValueLength, this._key, this._limit, event, hint);\n }\n}\n$90f54a2bd3a75444$export$8d1e60aaf616fb4f.__initStatic();\n\n});\nparcelRegister(\"7qGRm\", function(module, exports) {\n\n$parcel$export(module.exports, \"applyAggregateErrorsToEvent\", () => $568c35217631c696$export$b91c38ed7d8ae9b2);\n\nvar $8cfrP = parcelRequire(\"8cfrP\");\n\nvar $6qV3U = parcelRequire(\"6qV3U\");\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */ function $568c35217631c696$export$b91c38ed7d8ae9b2(exceptionFromErrorImplementation, parser, maxValueLimit = 250, key, limit, event, hint) {\n if (!event.exception || !event.exception.values || !hint || !(0, $8cfrP.isInstanceOf)(hint.originalException, Error)) return;\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException = event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n // We only create exception grouping if there is an exception in the event.\n if (originalException) event.exception.values = $568c35217631c696$var$truncateAggregateExceptions($568c35217631c696$var$aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, hint.originalException, key, event.exception.values, originalException, 0), maxValueLimit);\n}\nfunction $568c35217631c696$var$aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, error, key, prevExceptions, exception, exceptionId) {\n if (prevExceptions.length >= limit + 1) return prevExceptions;\n let newExceptions = [\n ...prevExceptions\n ];\n if ((0, $8cfrP.isInstanceOf)(error[key], Error)) {\n $568c35217631c696$var$applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n $568c35217631c696$var$applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = $568c35217631c696$var$aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, error[key], key, [\n newException,\n ...newExceptions\n ], newException, newExceptionId);\n }\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) error.errors.forEach((childError, i)=>{\n if ((0, $8cfrP.isInstanceOf)(childError, Error)) {\n $568c35217631c696$var$applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n $568c35217631c696$var$applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = $568c35217631c696$var$aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, childError, key, [\n newException,\n ...newExceptions\n ], newException, newExceptionId);\n }\n });\n return newExceptions;\n}\nfunction $568c35217631c696$var$applyExceptionGroupFieldsForParentException(exception, exceptionId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || {\n type: \"generic\",\n handled: true\n };\n exception.mechanism = {\n ...exception.mechanism,\n is_exception_group: true,\n exception_id: exceptionId\n };\n}\nfunction $568c35217631c696$var$applyExceptionGroupFieldsForChildException(exception, source, exceptionId, parentId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || {\n type: \"generic\",\n handled: true\n };\n exception.mechanism = {\n ...exception.mechanism,\n type: \"chained\",\n source: source,\n exception_id: exceptionId,\n parent_id: parentId\n };\n}\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */ function $568c35217631c696$var$truncateAggregateExceptions(exceptions, maxValueLength) {\n return exceptions.map((exception)=>{\n if (exception.value) exception.value = (0, $6qV3U.truncate)(exception.value, maxValueLength);\n return exception;\n });\n}\n\n});\n\nparcelRegister(\"aCdlr\", function(module, exports) {\n\n$parcel$export(module.exports, \"exceptionFromError\", () => $7ba7ce02ba83c421$export$a6c2d27607295951);\n\nvar $8cfrP = parcelRequire(\"8cfrP\");\n\nvar $aZ9cG = parcelRequire(\"aZ9cG\");\n\nvar $2mHZf = parcelRequire(\"2mHZf\");\n\nvar $aCgU1 = parcelRequire(\"aCgU1\");\n/**\n * Extracts stack frames from the error.stack string\n */ function $7ba7ce02ba83c421$export$d478b2c12fbcfdda(stackParser, error) {\n return stackParser(error.stack || \"\", 1);\n}\n/**\n * Extracts stack frames from the error and builds a Sentry Exception\n */ function $7ba7ce02ba83c421$export$a6c2d27607295951(stackParser, error) {\n const exception = {\n type: error.name || error.constructor.name,\n value: error.message\n };\n const frames = $7ba7ce02ba83c421$export$d478b2c12fbcfdda(stackParser, error);\n if (frames.length) exception.stacktrace = {\n frames: frames\n };\n return exception;\n}\nfunction $7ba7ce02ba83c421$var$getMessageForObject(exception) {\n if (\"name\" in exception && typeof exception.name === \"string\") {\n let message = `'${exception.name}' captured as exception`;\n if (\"message\" in exception && typeof exception.message === \"string\") message += ` with message '${exception.message}'`;\n return message;\n } else if (\"message\" in exception && typeof exception.message === \"string\") return exception.message;\n else // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n return `Object captured as exception with keys: ${(0, $aCgU1.extractExceptionKeysForMessage)(exception)}`;\n}\n/**\n * Builds and Event from a Exception\n * @hidden\n */ function $7ba7ce02ba83c421$export$9dd56ed1ef0c3420(getCurrentHub, stackParser, exception, hint) {\n let ex = exception;\n const providedMechanism = hint && hint.data && hint.data.mechanism;\n const mechanism = providedMechanism || {\n handled: true,\n type: \"generic\"\n };\n if (!(0, $8cfrP.isError)(exception)) {\n if ((0, $8cfrP.isPlainObject)(exception)) {\n const hub = getCurrentHub();\n const client = hub.getClient();\n const normalizeDepth = client && client.getOptions().normalizeDepth;\n hub.configureScope((scope)=>{\n scope.setExtra(\"__serialized__\", (0, $2mHZf.normalizeToSize)(exception, normalizeDepth));\n });\n const message = $7ba7ce02ba83c421$var$getMessageForObject(exception);\n ex = hint && hint.syntheticException || new Error(message);\n ex.message = message;\n } else {\n // This handles when someone does: `throw \"something awesome\";`\n // We use synthesized Error here so we can extract a (rough) stack trace.\n ex = hint && hint.syntheticException || new Error(exception);\n ex.message = exception;\n }\n mechanism.synthetic = true;\n }\n const event = {\n exception: {\n values: [\n $7ba7ce02ba83c421$export$a6c2d27607295951(stackParser, ex)\n ]\n }\n };\n (0, $aZ9cG.addExceptionTypeValue)(event, undefined, undefined);\n (0, $aZ9cG.addExceptionMechanism)(event, mechanism);\n return {\n ...event,\n event_id: hint && hint.event_id\n };\n}\n/**\n * Builds and Event from a Message\n * @hidden\n */ function $7ba7ce02ba83c421$export$5425b53185d13d6c(stackParser, message, // eslint-disable-next-line deprecation/deprecation\nlevel = \"info\", hint, attachStacktrace) {\n const event = {\n event_id: hint && hint.event_id,\n level: level,\n message: message\n };\n if (attachStacktrace && hint && hint.syntheticException) {\n const frames = $7ba7ce02ba83c421$export$d478b2c12fbcfdda(stackParser, hint.syntheticException);\n if (frames.length) event.exception = {\n values: [\n {\n value: message,\n stacktrace: {\n frames: frames\n }\n }\n ]\n };\n }\n return event;\n}\n\n});\nparcelRegister(\"2mHZf\", function(module, exports) {\n\n$parcel$export(module.exports, \"normalize\", () => $1b8fc1be6ce75068$export$a3295358bff77e);\n$parcel$export(module.exports, \"normalizeToSize\", () => $1b8fc1be6ce75068$export$23fbbb20bed71033);\n\nvar $8cfrP = parcelRequire(\"8cfrP\");\n\nvar $bniZ5 = parcelRequire(\"bniZ5\");\n\nvar $aCgU1 = parcelRequire(\"aCgU1\");\n\nvar $fxSvy = parcelRequire(\"fxSvy\");\n/**\n * Recursively normalizes the given object.\n *\n * - Creates a copy to prevent original input mutation\n * - Skips non-enumerable properties\n * - When stringifying, calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format\n * - Translates known global objects/classes to a string representations\n * - Takes care of `Error` object serialization\n * - Optionally limits depth of final output\n * - Optionally limits number of properties/elements included in any single object/array\n *\n * @param input The object to be normalized.\n * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)\n * @param maxProperties The max number of elements or properties to be included in any single array or\n * object in the normallized output.\n * @returns A normalized version of the object, or `\"**non-serializable**\"` if any errors are thrown during normalization.\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction $1b8fc1be6ce75068$export$a3295358bff77e(input, depth = 100, maxProperties = Infinity) {\n try {\n // since we're at the outermost level, we don't provide a key\n return $1b8fc1be6ce75068$export$588732934346abbf(\"\", input, depth, maxProperties);\n } catch (err) {\n return {\n ERROR: `**non-serializable** (${err})`\n };\n }\n}\n/** JSDoc */ function $1b8fc1be6ce75068$export$23fbbb20bed71033(// eslint-disable-next-line @typescript-eslint/no-explicit-any\nobject, // Default Node.js REPL depth\ndepth = 3, // 100kB, as 200kB is max payload size, so half sounds reasonable\nmaxSize = 102400) {\n const normalized = $1b8fc1be6ce75068$export$a3295358bff77e(object, depth);\n if ($1b8fc1be6ce75068$var$jsonSize(normalized) > maxSize) return $1b8fc1be6ce75068$export$23fbbb20bed71033(object, depth - 1, maxSize);\n return normalized;\n}\n/**\n * Visits a node to perform normalization on it\n *\n * @param key The key corresponding to the given node\n * @param value The node to be visited\n * @param depth Optional number indicating the maximum recursion depth\n * @param maxProperties Optional maximum number of properties/elements included in any single object/array\n * @param memo Optional Memo class handling decycling\n */ function $1b8fc1be6ce75068$export$588732934346abbf(key, value, depth = Infinity, maxProperties = Infinity, memo = (0, $bniZ5.memoBuilder)()) {\n const [memoize, unmemoize] = memo;\n // Get the simple cases out of the way first\n if (value == null || // this matches null and undefined -> eqeq not eqeqeq\n [\n \"number\",\n \"boolean\",\n \"string\"\n ].includes(typeof value) && !(0, $8cfrP.isNaN)(value)) return value;\n const stringified = $1b8fc1be6ce75068$var$stringifyValue(key, value);\n // Anything we could potentially dig into more (objects or arrays) will have come back as `\"[object XXXX]\"`.\n // Everything else will have already been serialized, so if we don't see that pattern, we're done.\n if (!stringified.startsWith(\"[object \")) return stringified;\n // From here on, we can assert that `value` is either an object or an array.\n // Do not normalize objects that we know have already been normalized. As a general rule, the\n // \"__sentry_skip_normalization__\" property should only be used sparingly and only should only be set on objects that\n // have already been normalized.\n if (value[\"__sentry_skip_normalization__\"]) return value;\n // We can set `__sentry_override_normalization_depth__` on an object to ensure that from there\n // We keep a certain amount of depth.\n // This should be used sparingly, e.g. we use it for the redux integration to ensure we get a certain amount of state.\n const remainingDepth = typeof value[\"__sentry_override_normalization_depth__\"] === \"number\" ? value[\"__sentry_override_normalization_depth__\"] : depth;\n // We're also done if we've reached the max depth\n if (remainingDepth === 0) // At this point we know `serialized` is a string of the form `\"[object XXXX]\"`. Clean it up so it's just `\"[XXXX]\"`.\n return stringified.replace(\"object \", \"\");\n // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n if (memoize(value)) return \"[Circular ~]\";\n // If the value has a `toJSON` method, we call it to extract more information\n const valueWithToJSON = value;\n if (valueWithToJSON && typeof valueWithToJSON.toJSON === \"function\") try {\n const jsonValue = valueWithToJSON.toJSON();\n // We need to normalize the return value of `.toJSON()` in case it has circular references\n return $1b8fc1be6ce75068$export$588732934346abbf(\"\", jsonValue, remainingDepth - 1, maxProperties, memo);\n } catch (err) {\n // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)\n }\n // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse\n // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each\n // property/entry, and keep track of the number of items we add to it.\n const normalized = Array.isArray(value) ? [] : {};\n let numAdded = 0;\n // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant\n // properties are non-enumerable and otherwise would get missed.\n const visitable = (0, $aCgU1.convertToPlainObject)(value);\n for(const visitKey in visitable){\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) continue;\n if (numAdded >= maxProperties) {\n normalized[visitKey] = \"[MaxProperties ~]\";\n break;\n }\n // Recursively visit all the child nodes\n const visitValue = visitable[visitKey];\n normalized[visitKey] = $1b8fc1be6ce75068$export$588732934346abbf(visitKey, visitValue, remainingDepth - 1, maxProperties, memo);\n numAdded++;\n }\n // Once we've visited all the branches, remove the parent from memo storage\n unmemoize(value);\n // Return accumulated values\n return normalized;\n}\n/* eslint-disable complexity */ /**\n * Stringify the given value. Handles various known special values and types.\n *\n * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn\n * the number 1231 into \"[Object Number]\", nor on `null`, as it will throw.\n *\n * @param value The value to stringify\n * @returns A stringified representation of the given value\n */ function $1b8fc1be6ce75068$var$stringifyValue(key, // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n// our internal use, it'll do\nvalue) {\n try {\n if (key === \"domain\" && value && typeof value === \"object\" && value._events) return \"[Domain]\";\n if (key === \"domainEmitter\") return \"[DomainEmitter]\";\n // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first\n // which won't throw if they are not present.\n if (typeof $parcel$global !== \"undefined\" && value === $parcel$global) return \"[Global]\";\n // eslint-disable-next-line no-restricted-globals\n if (typeof window !== \"undefined\" && value === window) return \"[Window]\";\n // eslint-disable-next-line no-restricted-globals\n if (typeof document !== \"undefined\" && value === document) return \"[Document]\";\n if ((0, $8cfrP.isVueViewModel)(value)) return \"[VueViewModel]\";\n // React's SyntheticEvent thingy\n if ((0, $8cfrP.isSyntheticEvent)(value)) return \"[SyntheticEvent]\";\n if (typeof value === \"number\" && value !== value) return \"[NaN]\";\n if (typeof value === \"function\") return `[Function: ${(0, $fxSvy.getFunctionName)(value)}]`;\n if (typeof value === \"symbol\") return `[${String(value)}]`;\n // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n if (typeof value === \"bigint\") return `[BigInt: ${String(value)}]`;\n // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n // we can make sure that only plain objects come out that way.\n const objName = $1b8fc1be6ce75068$var$getConstructorName(value);\n // Handle HTML Elements\n if (/^HTML(\\w*)Element$/.test(objName)) return `[HTMLElement: ${objName}]`;\n return `[object ${objName}]`;\n } catch (err) {\n return `**non-serializable** (${err})`;\n }\n}\n/* eslint-enable complexity */ function $1b8fc1be6ce75068$var$getConstructorName(value) {\n const prototype = Object.getPrototypeOf(value);\n return prototype ? prototype.constructor.name : \"null prototype\";\n}\n/** Calculates bytes size of input string */ function $1b8fc1be6ce75068$var$utf8Length(value) {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n/** Calculates bytes size of input object */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction $1b8fc1be6ce75068$var$jsonSize(value) {\n return $1b8fc1be6ce75068$var$utf8Length(JSON.stringify(value));\n}\n\n});\nparcelRegister(\"bniZ5\", function(module, exports) {\n\n$parcel$export(module.exports, \"memoBuilder\", () => $84809191b153e415$export$8115b0b78e956ab3);\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-explicit-any */ /**\n * Helper to decycle json objects\n */ function $84809191b153e415$export$8115b0b78e956ab3() {\n const hasWeakSet = typeof WeakSet === \"function\";\n const inner = hasWeakSet ? new WeakSet() : [];\n function memoize(obj) {\n if (hasWeakSet) {\n if (inner.has(obj)) return true;\n inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for(let i = 0; i < inner.length; i++){\n const value = inner[i];\n if (value === obj) return true;\n }\n inner.push(obj);\n return false;\n }\n function unmemoize(obj) {\n if (hasWeakSet) inner.delete(obj);\n else {\n for(let i = 0; i < inner.length; i++)if (inner[i] === obj) {\n inner.splice(i, 1);\n break;\n }\n }\n }\n return [\n memoize,\n unmemoize\n ];\n}\n\n});\n\nparcelRegister(\"fxSvy\", function(module, exports) {\n\n$parcel$export(module.exports, \"createStackParser\", () => $b51438391e17bfa0$export$a5739666fb2d03d4);\n$parcel$export(module.exports, \"stackParserFromStackParserOptions\", () => $b51438391e17bfa0$export$1d5cf88b347146d4);\n$parcel$export(module.exports, \"getFunctionName\", () => $b51438391e17bfa0$export$aad197c7121a6651);\n\nvar $3iBXP = parcelRequire(\"3iBXP\");\nconst $b51438391e17bfa0$var$STACKTRACE_FRAME_LIMIT = 50;\n// Used to sanitize webpack (error: *) wrapped stack errors\nconst $b51438391e17bfa0$var$WEBPACK_ERROR_REGEXP = /\\(error: (.*)\\)/;\nconst $b51438391e17bfa0$var$STRIP_FRAME_REGEXP = /captureMessage|captureException/;\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */ function $b51438391e17bfa0$export$a5739666fb2d03d4(...parsers) {\n const sortedParsers = parsers.sort((a, b)=>a[0] - b[0]).map((p)=>p[1]);\n return (stack, skipFirst = 0)=>{\n const frames = [];\n const lines = stack.split(\"\\n\");\n for(let i = skipFirst; i < lines.length; i++){\n const line = lines[i];\n // Ignore lines over 1kb as they are unlikely to be stack frames.\n // Many of the regular expressions use backtracking which results in run time that increases exponentially with\n // input size. Huge strings can result in hangs/Denial of Service:\n // https://github.com/getsentry/sentry-javascript/issues/2286\n if (line.length > 1024) continue;\n // https://github.com/getsentry/sentry-javascript/issues/5459\n // Remove webpack (error: *) wrappers\n const cleanedLine = $b51438391e17bfa0$var$WEBPACK_ERROR_REGEXP.test(line) ? line.replace($b51438391e17bfa0$var$WEBPACK_ERROR_REGEXP, \"$1\") : line;\n // https://github.com/getsentry/sentry-javascript/issues/7813\n // Skip Error: lines\n if (cleanedLine.match(/\\S*Error: /)) continue;\n for (const parser of sortedParsers){\n const frame = parser(cleanedLine);\n if (frame) {\n frames.push(frame);\n break;\n }\n }\n if (frames.length >= $b51438391e17bfa0$var$STACKTRACE_FRAME_LIMIT) break;\n }\n return $b51438391e17bfa0$export$c55c24c0eeba0205(frames);\n };\n}\n/**\n * Gets a stack parser implementation from Options.stackParser\n * @see Options\n *\n * If options contains an array of line parsers, it is converted into a parser\n */ function $b51438391e17bfa0$export$1d5cf88b347146d4(stackParser) {\n if (Array.isArray(stackParser)) return $b51438391e17bfa0$export$a5739666fb2d03d4(...stackParser);\n return stackParser;\n}\n/**\n * Removes Sentry frames from the top and bottom of the stack if present and enforces a limit of max number of frames.\n * Assumes stack input is ordered from top to bottom and returns the reverse representation so call site of the\n * function that caused the crash is the last frame in the array.\n * @hidden\n */ function $b51438391e17bfa0$export$c55c24c0eeba0205(stack) {\n if (!stack.length) return [];\n const localStack = Array.from(stack);\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (/sentryWrapped/.test(localStack[localStack.length - 1].function || \"\")) localStack.pop();\n // Reversing in the middle of the procedure allows us to just pop the values off the stack\n localStack.reverse();\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if ($b51438391e17bfa0$var$STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || \"\")) {\n localStack.pop();\n // When using synthetic events, we will have a 2 levels deep stack, as `new Error('Sentry syntheticException')`\n // is produced within the hub itself, making it:\n //\n // Sentry.captureException()\n // getCurrentHub().captureException()\n //\n // instead of just the top `Sentry` call itself.\n // This forces us to possibly strip an additional frame in the exact same was as above.\n if ($b51438391e17bfa0$var$STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || \"\")) localStack.pop();\n }\n return localStack.slice(0, $b51438391e17bfa0$var$STACKTRACE_FRAME_LIMIT).map((frame)=>({\n ...frame,\n filename: frame.filename || localStack[localStack.length - 1].filename,\n function: frame.function || \"?\"\n }));\n}\nconst $b51438391e17bfa0$var$defaultFunctionName = \"\";\n/**\n * Safely extract function name from itself\n */ function $b51438391e17bfa0$export$aad197c7121a6651(fn) {\n try {\n if (!fn || typeof fn !== \"function\") return $b51438391e17bfa0$var$defaultFunctionName;\n return fn.name || $b51438391e17bfa0$var$defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return $b51438391e17bfa0$var$defaultFunctionName;\n }\n}\n/**\n * Node.js stack line parser\n *\n * This is in @sentry/utils so it can be used from the Electron SDK in the browser for when `nodeIntegration == true`.\n * This allows it to be used without referencing or importing any node specific code which causes bundlers to complain\n */ function $b51438391e17bfa0$export$673345a0da635a78(getModule) {\n return [\n 90,\n (0, $3iBXP.node)(getModule)\n ];\n}\n\n});\nparcelRegister(\"3iBXP\", function(module, exports) {\n\n$parcel$export(module.exports, \"node\", () => $2670805f51a3a407$export$35059013cd4a06db);\n/**\n * Does this filename look like it's part of the app code?\n */ function $2670805f51a3a407$export$1de92f38f4de99a8(filename, isNative = false) {\n const isInternal = isNative || filename && // It's not internal if it's an absolute linux path\n !filename.startsWith(\"/\") && // It's not internal if it's an absolute windows path\n !filename.includes(\":\\\\\") && // It's not internal if the path is starting with a dot\n !filename.startsWith(\".\") && // It's not internal if the frame has a protocol. In node, this is usually the case if the file got pre-processed with a bundler like webpack\n !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\\-+])*:\\/\\//); // Schema from: https://stackoverflow.com/a/3641782\n // in_app is all that's not an internal Node function or a module within node_modules\n // note that isNative appears to return true even for node core libraries\n // see https://github.com/getsentry/raven-node/issues/176\n return !isInternal && filename !== undefined && !filename.includes(\"node_modules/\");\n}\n/** Node Stack line parser */ // eslint-disable-next-line complexity\nfunction $2670805f51a3a407$export$35059013cd4a06db(getModule) {\n const FILENAME_MATCH = /^\\s*[-]{4,}$/;\n const FULL_MATCH = /at (?:async )?(?:(.+?)\\s+\\()?(?:(.+):(\\d+):(\\d+)?|([^)]+))\\)?/;\n // eslint-disable-next-line complexity\n return (line)=>{\n const lineMatch = line.match(FULL_MATCH);\n if (lineMatch) {\n let object;\n let method;\n let functionName;\n let typeName;\n let methodName;\n if (lineMatch[1]) {\n functionName = lineMatch[1];\n let methodStart = functionName.lastIndexOf(\".\");\n if (functionName[methodStart - 1] === \".\") methodStart--;\n if (methodStart > 0) {\n object = functionName.slice(0, methodStart);\n method = functionName.slice(methodStart + 1);\n const objectEnd = object.indexOf(\".Module\");\n if (objectEnd > 0) {\n functionName = functionName.slice(objectEnd + 1);\n object = object.slice(0, objectEnd);\n }\n }\n typeName = undefined;\n }\n if (method) {\n typeName = object;\n methodName = method;\n }\n if (method === \"\") {\n methodName = undefined;\n functionName = undefined;\n }\n if (functionName === undefined) {\n methodName = methodName || \"\";\n functionName = typeName ? `${typeName}.${methodName}` : methodName;\n }\n let filename = lineMatch[2] && lineMatch[2].startsWith(\"file://\") ? lineMatch[2].slice(7) : lineMatch[2];\n const isNative = lineMatch[5] === \"native\";\n if (!filename && lineMatch[5] && !isNative) filename = lineMatch[5];\n return {\n filename: filename,\n module: getModule ? getModule(filename) : undefined,\n function: functionName,\n lineno: parseInt(lineMatch[3], 10) || undefined,\n colno: parseInt(lineMatch[4], 10) || undefined,\n in_app: $2670805f51a3a407$export$1de92f38f4de99a8(filename, isNative)\n };\n }\n if (line.match(FILENAME_MATCH)) return {\n filename: line\n };\n return undefined;\n };\n}\n\n});\n\n\n\n\n\n\nparcelRegister(\"8GNPF\", function(module, exports) {\n\n$parcel$export(module.exports, \"SENTRY_XHR_DATA_KEY\", () => $6538e6a9c5c2197b$export$55b6bb1e45c6cf59);\n$parcel$export(module.exports, \"addInstrumentationHandler\", () => $6538e6a9c5c2197b$export$285b9172a3741fb7);\n\nvar $8cfrP = parcelRequire(\"8cfrP\");\n\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $aZ9cG = parcelRequire(\"aZ9cG\");\n\nvar $aCgU1 = parcelRequire(\"aCgU1\");\n\nvar $fxSvy = parcelRequire(\"fxSvy\");\n\nvar $lQaUW = parcelRequire(\"lQaUW\");\n\nvar $kPqMJ = parcelRequire(\"kPqMJ\");\n\nvar $aGprC = parcelRequire(\"aGprC\");\n// eslint-disable-next-line deprecation/deprecation\nconst $6538e6a9c5c2197b$var$WINDOW = (0, $kPqMJ.getGlobalObject)();\nconst $6538e6a9c5c2197b$export$55b6bb1e45c6cf59 = \"__sentry_xhr_v2__\";\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */ const $6538e6a9c5c2197b$var$handlers = {};\nconst $6538e6a9c5c2197b$var$instrumented = {};\n/** Instruments given API */ function $6538e6a9c5c2197b$var$instrument(type) {\n if ($6538e6a9c5c2197b$var$instrumented[type]) return;\n $6538e6a9c5c2197b$var$instrumented[type] = true;\n switch(type){\n case \"console\":\n $6538e6a9c5c2197b$var$instrumentConsole();\n break;\n case \"dom\":\n $6538e6a9c5c2197b$export$3014bbf0af0e1d4a();\n break;\n case \"xhr\":\n $6538e6a9c5c2197b$export$c67d533bf77cbf54();\n break;\n case \"fetch\":\n $6538e6a9c5c2197b$var$instrumentFetch();\n break;\n case \"history\":\n $6538e6a9c5c2197b$var$instrumentHistory();\n break;\n case \"error\":\n $6538e6a9c5c2197b$var$instrumentError();\n break;\n case \"unhandledrejection\":\n $6538e6a9c5c2197b$var$instrumentUnhandledRejection();\n break;\n default:\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(\"unknown instrumentation type:\", type);\n return;\n }\n}\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */ function $6538e6a9c5c2197b$export$285b9172a3741fb7(type, callback) {\n $6538e6a9c5c2197b$var$handlers[type] = $6538e6a9c5c2197b$var$handlers[type] || [];\n $6538e6a9c5c2197b$var$handlers[type].push(callback);\n $6538e6a9c5c2197b$var$instrument(type);\n}\n/**\n * Reset all instrumentation handlers.\n * This can be used by tests to ensure we have a clean slate of instrumentation handlers.\n */ function $6538e6a9c5c2197b$export$b17eab759a1cb5fe() {\n Object.keys($6538e6a9c5c2197b$var$handlers).forEach((key)=>{\n $6538e6a9c5c2197b$var$handlers[key] = undefined;\n });\n}\n/** JSDoc */ function $6538e6a9c5c2197b$var$triggerHandlers(type, data) {\n if (!type || !$6538e6a9c5c2197b$var$handlers[type]) return;\n for (const handler of $6538e6a9c5c2197b$var$handlers[type] || [])try {\n handler(data);\n } catch (e) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(`Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${(0, $fxSvy.getFunctionName)(handler)}\\nError:`, e);\n }\n}\n/** JSDoc */ function $6538e6a9c5c2197b$var$instrumentConsole() {\n if (!(\"console\" in (0, $kPqMJ.GLOBAL_OBJ))) return;\n (0, $boFAr.CONSOLE_LEVELS).forEach(function(level) {\n if (!(level in (0, $kPqMJ.GLOBAL_OBJ).console)) return;\n (0, $aCgU1.fill)((0, $kPqMJ.GLOBAL_OBJ).console, level, function(originalConsoleMethod) {\n (0, $boFAr.originalConsoleMethods)[level] = originalConsoleMethod;\n return function(...args) {\n $6538e6a9c5c2197b$var$triggerHandlers(\"console\", {\n args: args,\n level: level\n });\n const log = (0, $boFAr.originalConsoleMethods)[level];\n log && log.apply((0, $kPqMJ.GLOBAL_OBJ).console, args);\n };\n });\n });\n}\n/** JSDoc */ function $6538e6a9c5c2197b$var$instrumentFetch() {\n if (!(0, $lQaUW.supportsNativeFetch)()) return;\n (0, $aCgU1.fill)((0, $kPqMJ.GLOBAL_OBJ), \"fetch\", function(originalFetch) {\n return function(...args) {\n const { method: method, url: url } = $6538e6a9c5c2197b$export$f7a71163cc309d9a(args);\n const handlerData = {\n args: args,\n fetchData: {\n method: method,\n url: url\n },\n startTimestamp: Date.now()\n };\n $6538e6a9c5c2197b$var$triggerHandlers(\"fetch\", {\n ...handlerData\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply((0, $kPqMJ.GLOBAL_OBJ), args).then((response)=>{\n $6538e6a9c5c2197b$var$triggerHandlers(\"fetch\", {\n ...handlerData,\n endTimestamp: Date.now(),\n response: response\n });\n return response;\n }, (error)=>{\n $6538e6a9c5c2197b$var$triggerHandlers(\"fetch\", {\n ...handlerData,\n endTimestamp: Date.now(),\n error: error\n });\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n });\n };\n });\n}\nfunction $6538e6a9c5c2197b$var$hasProp(obj, prop) {\n return !!obj && typeof obj === \"object\" && !!obj[prop];\n}\nfunction $6538e6a9c5c2197b$var$getUrlFromResource(resource) {\n if (typeof resource === \"string\") return resource;\n if (!resource) return \"\";\n if ($6538e6a9c5c2197b$var$hasProp(resource, \"url\")) return resource.url;\n if (resource.toString) return resource.toString();\n return \"\";\n}\n/**\n * Parses the fetch arguments to find the used Http method and the url of the request\n */ function $6538e6a9c5c2197b$export$f7a71163cc309d9a(fetchArgs) {\n if (fetchArgs.length === 0) return {\n method: \"GET\",\n url: \"\"\n };\n if (fetchArgs.length === 2) {\n const [url, options] = fetchArgs;\n return {\n url: $6538e6a9c5c2197b$var$getUrlFromResource(url),\n method: $6538e6a9c5c2197b$var$hasProp(options, \"method\") ? String(options.method).toUpperCase() : \"GET\"\n };\n }\n const arg = fetchArgs[0];\n return {\n url: $6538e6a9c5c2197b$var$getUrlFromResource(arg),\n method: $6538e6a9c5c2197b$var$hasProp(arg, \"method\") ? String(arg.method).toUpperCase() : \"GET\"\n };\n}\n/** JSDoc */ function $6538e6a9c5c2197b$export$c67d533bf77cbf54() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (!$6538e6a9c5c2197b$var$WINDOW.XMLHttpRequest) return;\n const xhrproto = XMLHttpRequest.prototype;\n (0, $aCgU1.fill)(xhrproto, \"open\", function(originalOpen) {\n return function(...args) {\n const startTimestamp = Date.now();\n const url = args[1];\n const xhrInfo = this[$6538e6a9c5c2197b$export$55b6bb1e45c6cf59] = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n method: (0, $8cfrP.isString)(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n request_headers: {}\n };\n // if Sentry key appears in URL, don't capture it as a request\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if ((0, $8cfrP.isString)(url) && xhrInfo.method === \"POST\" && url.match(/sentry_key/)) this.__sentry_own_request__ = true;\n const onreadystatechangeHandler = ()=>{\n // For whatever reason, this is not the same instance here as from the outer method\n const xhrInfo = this[$6538e6a9c5c2197b$export$55b6bb1e45c6cf59];\n if (!xhrInfo) return;\n if (this.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = this.status;\n } catch (e) {\n /* do nothing */ }\n $6538e6a9c5c2197b$var$triggerHandlers(\"xhr\", {\n args: args,\n endTimestamp: Date.now(),\n startTimestamp: startTimestamp,\n xhr: this\n });\n }\n };\n if (\"onreadystatechange\" in this && typeof this.onreadystatechange === \"function\") (0, $aCgU1.fill)(this, \"onreadystatechange\", function(original) {\n return function(...readyStateArgs) {\n onreadystatechangeHandler();\n return original.apply(this, readyStateArgs);\n };\n });\n else this.addEventListener(\"readystatechange\", onreadystatechangeHandler);\n // Intercepting `setRequestHeader` to access the request headers of XHR instance.\n // This will only work for user/library defined headers, not for the default/browser-assigned headers.\n // Request cookies are also unavailable for XHR, as `Cookie` header can't be defined by `setRequestHeader`.\n (0, $aCgU1.fill)(this, \"setRequestHeader\", function(original) {\n return function(...setRequestHeaderArgs) {\n const [header, value] = setRequestHeaderArgs;\n const xhrInfo = this[$6538e6a9c5c2197b$export$55b6bb1e45c6cf59];\n if (xhrInfo) xhrInfo.request_headers[header.toLowerCase()] = value;\n return original.apply(this, setRequestHeaderArgs);\n };\n });\n return originalOpen.apply(this, args);\n };\n });\n (0, $aCgU1.fill)(xhrproto, \"send\", function(originalSend) {\n return function(...args) {\n const sentryXhrData = this[$6538e6a9c5c2197b$export$55b6bb1e45c6cf59];\n if (sentryXhrData && args[0] !== undefined) sentryXhrData.body = args[0];\n $6538e6a9c5c2197b$var$triggerHandlers(\"xhr\", {\n args: args,\n startTimestamp: Date.now(),\n xhr: this\n });\n return originalSend.apply(this, args);\n };\n });\n}\nlet $6538e6a9c5c2197b$var$lastHref;\n/** JSDoc */ function $6538e6a9c5c2197b$var$instrumentHistory() {\n if (!(0, $aGprC.supportsHistory)()) return;\n const oldOnPopState = $6538e6a9c5c2197b$var$WINDOW.onpopstate;\n $6538e6a9c5c2197b$var$WINDOW.onpopstate = function(...args) {\n const to = $6538e6a9c5c2197b$var$WINDOW.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = $6538e6a9c5c2197b$var$lastHref;\n $6538e6a9c5c2197b$var$lastHref = to;\n $6538e6a9c5c2197b$var$triggerHandlers(\"history\", {\n from: from,\n to: to\n });\n if (oldOnPopState) // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n } catch (_oO) {\n // no-empty\n }\n };\n /** @hidden */ function historyReplacementFunction(originalHistoryFunction) {\n return function(...args) {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = $6538e6a9c5c2197b$var$lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n $6538e6a9c5c2197b$var$lastHref = to;\n $6538e6a9c5c2197b$var$triggerHandlers(\"history\", {\n from: from,\n to: to\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n (0, $aCgU1.fill)($6538e6a9c5c2197b$var$WINDOW.history, \"pushState\", historyReplacementFunction);\n (0, $aCgU1.fill)($6538e6a9c5c2197b$var$WINDOW.history, \"replaceState\", historyReplacementFunction);\n}\nconst $6538e6a9c5c2197b$var$DEBOUNCE_DURATION = 1000;\nlet $6538e6a9c5c2197b$var$debounceTimerID;\nlet $6538e6a9c5c2197b$var$lastCapturedEventType;\nlet $6538e6a9c5c2197b$var$lastCapturedEventTargetId;\n/**\n * Check whether the event is similar to the last captured one. For example, two click events on the same button.\n */ function $6538e6a9c5c2197b$var$isSimilarToLastCapturedEvent(event) {\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (event.type !== $6538e6a9c5c2197b$var$lastCapturedEventType) return false;\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (!event.target || event.target._sentryId !== $6538e6a9c5c2197b$var$lastCapturedEventTargetId) return false;\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return true;\n}\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */ function $6538e6a9c5c2197b$var$shouldSkipDOMEvent(eventType, target) {\n // We are only interested in filtering `keypress` events for now.\n if (eventType !== \"keypress\") return false;\n if (!target || !target.tagName) return true;\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === \"INPUT\" || target.tagName === \"TEXTAREA\" || target.isContentEditable) return false;\n return true;\n}\nfunction $6538e6a9c5c2197b$var$getEventTarget(event) {\n try {\n return event.target;\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n return null;\n }\n}\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param handler function that will be triggered\n * @param globalListener indicates whether event was captured by the global event listener\n * @returns wrapped breadcrumb events handler\n * @hidden\n */ function $6538e6a9c5c2197b$var$makeDOMEventHandler(handler, globalListener = false) {\n return (event)=>{\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || event[\"_sentryCaptured\"]) return;\n const target = $6538e6a9c5c2197b$var$getEventTarget(event);\n // We always want to skip _some_ events.\n if ($6538e6a9c5c2197b$var$shouldSkipDOMEvent(event.type, target)) return;\n // Mark event as \"seen\"\n (0, $aCgU1.addNonEnumerableProperty)(event, \"_sentryCaptured\", true);\n if (target && !target._sentryId) // Add UUID to event target so we can identify if\n (0, $aCgU1.addNonEnumerableProperty)(target, \"_sentryId\", (0, $aZ9cG.uuid4)());\n const name = event.type === \"keypress\" ? \"input\" : event.type;\n // If there is no last captured event, it means that we can safely capture the new event and store it for future comparisons.\n // If there is a last captured event, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n if (!$6538e6a9c5c2197b$var$isSimilarToLastCapturedEvent(event)) {\n handler({\n event: event,\n name: name,\n global: globalListener\n });\n $6538e6a9c5c2197b$var$lastCapturedEventType = event.type;\n $6538e6a9c5c2197b$var$lastCapturedEventTargetId = target ? target._sentryId : undefined;\n }\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout($6538e6a9c5c2197b$var$debounceTimerID);\n $6538e6a9c5c2197b$var$debounceTimerID = $6538e6a9c5c2197b$var$WINDOW.setTimeout(()=>{\n $6538e6a9c5c2197b$var$lastCapturedEventTargetId = undefined;\n $6538e6a9c5c2197b$var$lastCapturedEventType = undefined;\n }, $6538e6a9c5c2197b$var$DEBOUNCE_DURATION);\n };\n}\n/** JSDoc */ function $6538e6a9c5c2197b$export$3014bbf0af0e1d4a() {\n if (!$6538e6a9c5c2197b$var$WINDOW.document) return;\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n const triggerDOMHandler = $6538e6a9c5c2197b$var$triggerHandlers.bind(null, \"dom\");\n const globalDOMEventHandler = $6538e6a9c5c2197b$var$makeDOMEventHandler(triggerDOMHandler, true);\n $6538e6a9c5c2197b$var$WINDOW.document.addEventListener(\"click\", globalDOMEventHandler, false);\n $6538e6a9c5c2197b$var$WINDOW.document.addEventListener(\"keypress\", globalDOMEventHandler, false);\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n [\n \"EventTarget\",\n \"Node\"\n ].forEach((target)=>{\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = $6538e6a9c5c2197b$var$WINDOW[target] && $6538e6a9c5c2197b$var$WINDOW[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty(\"addEventListener\")) return;\n (0, $aCgU1.fill)(proto, \"addEventListener\", function(originalAddEventListener) {\n return function(type, listener, options) {\n if (type === \"click\" || type == \"keypress\") try {\n const el = this;\n const handlers = el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type] = handlers[type] || {\n refCount: 0\n };\n if (!handlerForType.handler) {\n const handler = $6538e6a9c5c2197b$var$makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n handlerForType.refCount++;\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n (0, $aCgU1.fill)(proto, \"removeEventListener\", function(originalRemoveEventListener) {\n return function(type, listener, options) {\n if (type === \"click\" || type == \"keypress\") try {\n const el = this;\n const handlers = el.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n if (handlerForType) {\n handlerForType.refCount--;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers).length === 0) delete el.__sentry_instrumentation_handlers__;\n }\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n });\n });\n}\nlet $6538e6a9c5c2197b$var$_oldOnErrorHandler = null;\n/** JSDoc */ function $6538e6a9c5c2197b$var$instrumentError() {\n $6538e6a9c5c2197b$var$_oldOnErrorHandler = $6538e6a9c5c2197b$var$WINDOW.onerror;\n $6538e6a9c5c2197b$var$WINDOW.onerror = function(msg, url, line, column, error) {\n $6538e6a9c5c2197b$var$triggerHandlers(\"error\", {\n column: column,\n error: error,\n line: line,\n msg: msg,\n url: url\n });\n if ($6538e6a9c5c2197b$var$_oldOnErrorHandler && !$6538e6a9c5c2197b$var$_oldOnErrorHandler.__SENTRY_LOADER__) // eslint-disable-next-line prefer-rest-params\n return $6538e6a9c5c2197b$var$_oldOnErrorHandler.apply(this, arguments);\n return false;\n };\n $6538e6a9c5c2197b$var$WINDOW.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\nlet $6538e6a9c5c2197b$var$_oldOnUnhandledRejectionHandler = null;\n/** JSDoc */ function $6538e6a9c5c2197b$var$instrumentUnhandledRejection() {\n $6538e6a9c5c2197b$var$_oldOnUnhandledRejectionHandler = $6538e6a9c5c2197b$var$WINDOW.onunhandledrejection;\n $6538e6a9c5c2197b$var$WINDOW.onunhandledrejection = function(e) {\n $6538e6a9c5c2197b$var$triggerHandlers(\"unhandledrejection\", e);\n if ($6538e6a9c5c2197b$var$_oldOnUnhandledRejectionHandler && !$6538e6a9c5c2197b$var$_oldOnUnhandledRejectionHandler.__SENTRY_LOADER__) // eslint-disable-next-line prefer-rest-params\n return $6538e6a9c5c2197b$var$_oldOnUnhandledRejectionHandler.apply(this, arguments);\n return true;\n };\n $6538e6a9c5c2197b$var$WINDOW.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;\n}\n\n});\nparcelRegister(\"lQaUW\", function(module, exports) {\n\n$parcel$export(module.exports, \"supportsFetch\", () => $fe66ec44f2f5431f$export$edf3cb81fd7d2a3e);\n$parcel$export(module.exports, \"isNativeFetch\", () => $fe66ec44f2f5431f$export$18cf36ed71d733e7);\n$parcel$export(module.exports, \"supportsNativeFetch\", () => $fe66ec44f2f5431f$export$c82d238e23c40b21);\n\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $kPqMJ = parcelRequire(\"kPqMJ\");\n// eslint-disable-next-line deprecation/deprecation\nconst $fe66ec44f2f5431f$var$WINDOW = (0, $kPqMJ.getGlobalObject)();\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */ function $fe66ec44f2f5431f$export$caa710b4d7f9cadf() {\n try {\n new ErrorEvent(\"\");\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */ function $fe66ec44f2f5431f$export$1c08bd1a7eb3c472() {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-expect-error It really needs 1 argument, not 0.\n new DOMError(\"\");\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */ function $fe66ec44f2f5431f$export$ab12a5d056f1d3a() {\n try {\n new DOMException(\"\");\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */ function $fe66ec44f2f5431f$export$edf3cb81fd7d2a3e() {\n if (!(\"fetch\" in $fe66ec44f2f5431f$var$WINDOW)) return false;\n try {\n new Headers();\n new Request(\"http://www.example.com\");\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */ // eslint-disable-next-line @typescript-eslint/ban-types\nfunction $fe66ec44f2f5431f$export$18cf36ed71d733e7(func) {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */ function $fe66ec44f2f5431f$export$c82d238e23c40b21() {\n if (!$fe66ec44f2f5431f$export$edf3cb81fd7d2a3e()) return false;\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if ($fe66ec44f2f5431f$export$18cf36ed71d733e7($fe66ec44f2f5431f$var$WINDOW.fetch)) return true;\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = $fe66ec44f2f5431f$var$WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof doc.createElement === \"function\") try {\n const sandbox = doc.createElement(\"iframe\");\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) // eslint-disable-next-line @typescript-eslint/unbound-method\n result = $fe66ec44f2f5431f$export$18cf36ed71d733e7(sandbox.contentWindow.fetch);\n doc.head.removeChild(sandbox);\n } catch (err) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(\"Could not create sandbox iframe for pure fetch check, bailing to window.fetch: \", err);\n }\n return result;\n}\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */ function $fe66ec44f2f5431f$export$531055a6c684a70a() {\n return \"ReportingObserver\" in $fe66ec44f2f5431f$var$WINDOW;\n}\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */ function $fe66ec44f2f5431f$export$2d308b428295192f() {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n if (!$fe66ec44f2f5431f$export$edf3cb81fd7d2a3e()) return false;\n try {\n new Request(\"_\", {\n referrerPolicy: \"origin\"\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\n});\n\nparcelRegister(\"aGprC\", function(module, exports) {\n\n$parcel$export(module.exports, \"supportsHistory\", () => $7c71906350cd4073$export$67fc34576016d6ec);\n\nvar $kPqMJ = parcelRequire(\"kPqMJ\");\n// Based on https://github.com/angular/angular.js/pull/13945/files\n// eslint-disable-next-line deprecation/deprecation\nconst $7c71906350cd4073$var$WINDOW = (0, $kPqMJ.getGlobalObject)();\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */ function $7c71906350cd4073$export$67fc34576016d6ec() {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const chrome = $7c71906350cd4073$var$WINDOW.chrome;\n const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */ const hasHistoryApi = \"history\" in $7c71906350cd4073$var$WINDOW && !!$7c71906350cd4073$var$WINDOW.history.pushState && !!$7c71906350cd4073$var$WINDOW.history.replaceState;\n return !isChromePackagedApp && hasHistoryApi;\n}\n\n});\n\n\nparcelRegister(\"l46vI\", function(module, exports) {\n\n$parcel$export(module.exports, \"BrowserClient\", () => $f55f058e732ce077$export$1df9218a526d318d);\n\nvar $83DUc = parcelRequire(\"83DUc\");\nvar $5j5C8 = parcelRequire(\"5j5C8\");\n\nvar $hL11s = parcelRequire(\"hL11s\");\nvar $3R32v = parcelRequire(\"3R32v\");\nvar $kK3mJ = parcelRequire(\"kK3mJ\");\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $kJZcO = parcelRequire(\"kJZcO\");\n\nvar $ikSrI = parcelRequire(\"ikSrI\");\n\nvar $jpXo4 = parcelRequire(\"jpXo4\");\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see @sentry/types Options for more information.\n */ /**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */ class $f55f058e732ce077$export$1df9218a526d318d extends (0, $83DUc.BaseClient) {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */ constructor(options){\n const sdkSource = (0, $ikSrI.WINDOW).SENTRY_SDK_SOURCE || (0, $kK3mJ.getSDKSource)();\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: \"sentry.javascript.browser\",\n packages: [\n {\n name: `${sdkSource}:@sentry/browser`,\n version: (0, $5j5C8.SDK_VERSION)\n }\n ],\n version: (0, $5j5C8.SDK_VERSION)\n };\n super(options);\n if (options.sendClientReports && (0, $ikSrI.WINDOW).document) (0, $ikSrI.WINDOW).document.addEventListener(\"visibilitychange\", ()=>{\n if ((0, $ikSrI.WINDOW).document.visibilityState === \"hidden\") this._flushOutcomes();\n });\n }\n /**\n * @inheritDoc\n */ eventFromException(exception, hint) {\n return (0, $kJZcO.eventFromException)(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n /**\n * @inheritDoc\n */ eventFromMessage(message, // eslint-disable-next-line deprecation/deprecation\n level = \"info\", hint) {\n return (0, $kJZcO.eventFromMessage)(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n /**\n * Sends user feedback to Sentry.\n */ captureUserFeedback(feedback) {\n if (!this._isEnabled()) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(\"SDK not enabled, will not capture user feedback.\");\n return;\n }\n const envelope = (0, $jpXo4.createUserFeedbackEnvelope)(feedback, {\n metadata: this.getSdkMetadata(),\n dsn: this.getDsn(),\n tunnel: this.getOptions().tunnel\n });\n this._sendEnvelope(envelope);\n }\n /**\n * @inheritDoc\n */ _prepareEvent(event, hint, scope) {\n event.platform = event.platform || \"javascript\";\n return super._prepareEvent(event, hint, scope);\n }\n /**\n * Sends client reports as an envelope.\n */ _flushOutcomes() {\n const outcomes = this._clearOutcomes();\n if (outcomes.length === 0) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"No outcomes to send\");\n return;\n }\n // This is really the only place where we want to check for a DSN and only send outcomes then\n if (!this._dsn) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"No dsn provided, will not send outcomes\");\n return;\n }\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"Sending outcomes:\", outcomes);\n const envelope = (0, $hL11s.createClientReportEnvelope)(outcomes, this._options.tunnel && (0, $3R32v.dsnToString)(this._dsn));\n this._sendEnvelope(envelope);\n }\n}\n\n});\nparcelRegister(\"83DUc\", function(module, exports) {\n\n$parcel$export(module.exports, \"BaseClient\", () => $5ddd8eea08b5db9d$export$4f22f74eddb7716a);\n\nvar $i4Z6l = parcelRequire(\"i4Z6l\");\nvar $aZ9cG = parcelRequire(\"aZ9cG\");\nvar $8cfrP = parcelRequire(\"8cfrP\");\nvar $boFAr = parcelRequire(\"boFAr\");\nvar $3R32v = parcelRequire(\"3R32v\");\nvar $6SaPC = parcelRequire(\"6SaPC\");\nvar $3nsdT = parcelRequire(\"3nsdT\");\n\nvar $f2G1X = parcelRequire(\"f2G1X\");\n\nvar $eSP6V = parcelRequire(\"eSP6V\");\n\nvar $cIx5z = parcelRequire(\"cIx5z\");\n\nvar $4Dtig = parcelRequire(\"4Dtig\");\n\nvar $vjmKu = parcelRequire(\"vjmKu\");\n\nvar $783pM = parcelRequire(\"783pM\");\nconst $5ddd8eea08b5db9d$var$ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(options);\n * }\n *\n * // ...\n * }\n */ class $5ddd8eea08b5db9d$export$4f22f74eddb7716a {\n /** Options passed to the SDK. */ /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */ /** Array of set up integrations. */ /** Indicates whether this client's integrations have been set up. */ /** Number of calls being processed */ /** Holds flushable */ // eslint-disable-next-line @typescript-eslint/ban-types\n /**\n * Initializes this client instance.\n *\n * @param options Options for the client.\n */ constructor(options){\n this._options = options;\n this._integrations = {};\n this._integrationsInitialized = false;\n this._numProcessing = 0;\n this._outcomes = {};\n this._hooks = {};\n this._eventProcessors = [];\n if (options.dsn) this._dsn = (0, $3R32v.makeDsn)(options.dsn);\n else (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(\"No DSN provided, client will not send events.\");\n if (this._dsn) {\n const url = (0, $f2G1X.getEnvelopeEndpointWithUrlEncodedAuth)(this._dsn, options);\n this._transport = options.transport({\n recordDroppedEvent: this.recordDroppedEvent.bind(this),\n ...options.transportOptions,\n url: url\n });\n }\n }\n /**\n * @inheritDoc\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n captureException(exception, hint, scope) {\n // ensure we haven't captured this very object before\n if ((0, $aZ9cG.checkOrSetAlreadyCaught)(exception)) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log($5ddd8eea08b5db9d$var$ALREADY_SEEN_ERROR);\n return;\n }\n let eventId = hint && hint.event_id;\n this._process(this.eventFromException(exception, hint).then((event)=>this._captureEvent(event, hint, scope)).then((result)=>{\n eventId = result;\n }));\n return eventId;\n }\n /**\n * @inheritDoc\n */ captureMessage(message, // eslint-disable-next-line deprecation/deprecation\n level, hint, scope) {\n let eventId = hint && hint.event_id;\n const promisedEvent = (0, $8cfrP.isPrimitive)(message) ? this.eventFromMessage(String(message), level, hint) : this.eventFromException(message, hint);\n this._process(promisedEvent.then((event)=>this._captureEvent(event, hint, scope)).then((result)=>{\n eventId = result;\n }));\n return eventId;\n }\n /**\n * @inheritDoc\n */ captureEvent(event, hint, scope) {\n // ensure we haven't captured this very object before\n if (hint && hint.originalException && (0, $aZ9cG.checkOrSetAlreadyCaught)(hint.originalException)) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log($5ddd8eea08b5db9d$var$ALREADY_SEEN_ERROR);\n return;\n }\n let eventId = hint && hint.event_id;\n this._process(this._captureEvent(event, hint, scope).then((result)=>{\n eventId = result;\n }));\n return eventId;\n }\n /**\n * @inheritDoc\n */ captureSession(session) {\n if (!(typeof session.release === \"string\")) (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(\"Discarded session because of missing or non-string release\");\n else {\n this.sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n (0, $4Dtig.updateSession)(session, {\n init: false\n });\n }\n }\n /**\n * @inheritDoc\n */ getDsn() {\n return this._dsn;\n }\n /**\n * @inheritDoc\n */ getOptions() {\n return this._options;\n }\n /**\n * @see SdkMetadata in @sentry/types\n *\n * @return The metadata of the SDK\n */ getSdkMetadata() {\n return this._options._metadata;\n }\n /**\n * @inheritDoc\n */ getTransport() {\n return this._transport;\n }\n /**\n * @inheritDoc\n */ flush(timeout) {\n const transport = this._transport;\n if (transport) return this._isClientDoneProcessing(timeout).then((clientFinished)=>{\n return transport.flush(timeout).then((transportFlushed)=>clientFinished && transportFlushed);\n });\n else return (0, $6SaPC.resolvedSyncPromise)(true);\n }\n /**\n * @inheritDoc\n */ close(timeout) {\n return this.flush(timeout).then((result)=>{\n this.getOptions().enabled = false;\n return result;\n });\n }\n /** Get all installed event processors. */ getEventProcessors() {\n return this._eventProcessors;\n }\n /** @inheritDoc */ addEventProcessor(eventProcessor) {\n this._eventProcessors.push(eventProcessor);\n }\n /**\n * Sets up the integrations\n */ setupIntegrations(forceInitialize) {\n if (forceInitialize && !this._integrationsInitialized || this._isEnabled() && !this._integrationsInitialized) {\n this._integrations = (0, $cIx5z.setupIntegrations)(this, this._options.integrations);\n this._integrationsInitialized = true;\n }\n }\n /**\n * Gets an installed integration by its `id`.\n *\n * @returns The installed integration or `undefined` if no integration with that `id` was installed.\n */ getIntegrationById(integrationId) {\n return this._integrations[integrationId];\n }\n /**\n * @inheritDoc\n */ getIntegration(integration) {\n try {\n return this._integrations[integration.id] || null;\n } catch (_oO) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n /**\n * @inheritDoc\n */ addIntegration(integration) {\n (0, $cIx5z.setupIntegration)(this, integration, this._integrations);\n }\n /**\n * @inheritDoc\n */ sendEvent(event, hint = {}) {\n this.emit(\"beforeSendEvent\", event, hint);\n let env = (0, $eSP6V.createEventEnvelope)(event, this._dsn, this._options._metadata, this._options.tunnel);\n for (const attachment of hint.attachments || [])env = (0, $i4Z6l.addItemToEnvelope)(env, (0, $i4Z6l.createAttachmentEnvelopeItem)(attachment, this._options.transportOptions && this._options.transportOptions.textEncoder));\n const promise = this._sendEnvelope(env);\n if (promise) promise.then((sendResponse)=>this.emit(\"afterSendEvent\", event, sendResponse), null);\n }\n /**\n * @inheritDoc\n */ sendSession(session) {\n const env = (0, $eSP6V.createSessionEnvelope)(session, this._dsn, this._options._metadata, this._options.tunnel);\n this._sendEnvelope(env);\n }\n /**\n * @inheritDoc\n */ recordDroppedEvent(reason, category, _event) {\n // Note: we use `event` in replay, where we overwrite this hook.\n if (this._options.sendClientReports) {\n // We want to track each category (error, transaction, session, replay_event) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial>>>`\n // With typescript 4.1 we could even use template literal types\n const key = `${reason}:${category}`;\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(`Adding outcome: \"${key}\"`);\n // The following works because undefined + 1 === NaN and NaN is falsy\n this._outcomes[key] = this._outcomes[key] + 1 || 1;\n }\n }\n // Keep on() & emit() signatures in sync with types' client.ts interface\n /* eslint-disable @typescript-eslint/unified-signatures */ /** @inheritdoc */ /** @inheritdoc */ on(hook, callback) {\n if (!this._hooks[hook]) this._hooks[hook] = [];\n // @ts-expect-error We assue the types are correct\n this._hooks[hook].push(callback);\n }\n /** @inheritdoc */ /** @inheritdoc */ emit(hook, ...rest) {\n if (this._hooks[hook]) this._hooks[hook].forEach((callback)=>callback(...rest));\n }\n /* eslint-enable @typescript-eslint/unified-signatures */ /** Updates existing session based on the provided event */ _updateSessionFromEvent(session, event) {\n let crashed = false;\n let errored = false;\n const exceptions = event.exception && event.exception.values;\n if (exceptions) {\n errored = true;\n for (const ex of exceptions){\n const mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n const sessionNonTerminal = session.status === \"ok\";\n const shouldUpdateAndSend = sessionNonTerminal && session.errors === 0 || sessionNonTerminal && crashed;\n if (shouldUpdateAndSend) {\n (0, $4Dtig.updateSession)(session, {\n ...crashed && {\n status: \"crashed\"\n },\n errors: session.errors || Number(errored || crashed)\n });\n this.captureSession(session);\n }\n }\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */ _isClientDoneProcessing(timeout) {\n return new (0, $6SaPC.SyncPromise)((resolve)=>{\n let ticked = 0;\n const tick = 1;\n const interval = setInterval(()=>{\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n /** Determines whether this SDK is enabled and a transport is present. */ _isEnabled() {\n return this.getOptions().enabled !== false && this._transport !== undefined;\n }\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */ _prepareEvent(event, hint, scope) {\n const options = this.getOptions();\n const integrations = Object.keys(this._integrations);\n if (!hint.integrations && integrations.length > 0) hint.integrations = integrations;\n this.emit(\"preprocessEvent\", event, hint);\n return (0, $783pM.prepareEvent)(options, event, hint, scope, this).then((evt)=>{\n if (evt === null) return evt;\n // If a trace context is not set on the event, we use the propagationContext set on the event to\n // generate a trace context. If the propagationContext does not have a dynamic sampling context, we\n // also generate one for it.\n const { propagationContext: propagationContext } = evt.sdkProcessingMetadata || {};\n const trace = evt.contexts && evt.contexts.trace;\n if (!trace && propagationContext) {\n const { traceId: trace_id, spanId: spanId, parentSpanId: parentSpanId, dsc: dsc } = propagationContext;\n evt.contexts = {\n trace: {\n trace_id: trace_id,\n span_id: spanId,\n parent_span_id: parentSpanId\n },\n ...evt.contexts\n };\n const dynamicSamplingContext = dsc ? dsc : (0, $vjmKu.getDynamicSamplingContextFromClient)(trace_id, this, scope);\n evt.sdkProcessingMetadata = {\n dynamicSamplingContext: dynamicSamplingContext,\n ...evt.sdkProcessingMetadata\n };\n }\n return evt;\n });\n }\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */ _captureEvent(event, hint = {}, scope) {\n return this._processEvent(event, hint, scope).then((finalEvent)=>{\n return finalEvent.event_id;\n }, (reason)=>{\n if (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n const sentryError = reason;\n if (sentryError.logLevel === \"log\") (0, $boFAr.logger).log(sentryError.message);\n else (0, $boFAr.logger).warn(sentryError);\n }\n return undefined;\n });\n }\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */ _processEvent(event, hint, scope) {\n const options = this.getOptions();\n const { sampleRate: sampleRate } = options;\n const isTransaction = $5ddd8eea08b5db9d$var$isTransactionEvent(event);\n const isError = $5ddd8eea08b5db9d$var$isErrorEvent(event);\n const eventType = event.type || \"error\";\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (isError && typeof sampleRate === \"number\" && Math.random() > sampleRate) {\n this.recordDroppedEvent(\"sample_rate\", \"error\", event);\n return (0, $6SaPC.rejectedSyncPromise)(new (0, $3nsdT.SentryError)(`Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`, \"log\"));\n }\n const dataCategory = eventType === \"replay_event\" ? \"replay\" : eventType;\n return this._prepareEvent(event, hint, scope).then((prepared)=>{\n if (prepared === null) {\n this.recordDroppedEvent(\"event_processor\", dataCategory, event);\n throw new (0, $3nsdT.SentryError)(\"An event processor returned `null`, will not send event.\", \"log\");\n }\n const isInternalException = hint.data && hint.data.__sentry__ === true;\n if (isInternalException) return prepared;\n const result = $5ddd8eea08b5db9d$var$processBeforeSend(options, prepared, hint);\n return $5ddd8eea08b5db9d$var$_validateBeforeSendResult(result, beforeSendLabel);\n }).then((processedEvent)=>{\n if (processedEvent === null) {\n this.recordDroppedEvent(\"before_send\", dataCategory, event);\n throw new (0, $3nsdT.SentryError)(`${beforeSendLabel} returned \\`null\\`, will not send event.`, \"log\");\n }\n const session = scope && scope.getSession();\n if (!isTransaction && session) this._updateSessionFromEvent(session, processedEvent);\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = \"custom\";\n processedEvent.transaction_info = {\n ...transactionInfo,\n source: source\n };\n }\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n }).then(null, (reason)=>{\n if (reason instanceof (0, $3nsdT.SentryError)) throw reason;\n this.captureException(reason, {\n data: {\n __sentry__: true\n },\n originalException: reason\n });\n throw new (0, $3nsdT.SentryError)(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`);\n });\n }\n /**\n * Occupies the client with processing and event\n */ _process(promise) {\n this._numProcessing++;\n promise.then((value)=>{\n this._numProcessing--;\n return value;\n }, (reason)=>{\n this._numProcessing--;\n return reason;\n });\n }\n /**\n * @inheritdoc\n */ _sendEnvelope(envelope) {\n this.emit(\"beforeEnvelope\", envelope);\n if (this._isEnabled() && this._transport) return this._transport.send(envelope).then(null, (reason)=>{\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(\"Error while sending event:\", reason);\n });\n else (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(\"Transport disabled\");\n }\n /**\n * Clears outcomes on this client and returns them.\n */ _clearOutcomes() {\n const outcomes = this._outcomes;\n this._outcomes = {};\n return Object.keys(outcomes).map((key)=>{\n const [reason, category] = key.split(\":\");\n return {\n reason: reason,\n category: category,\n quantity: outcomes[key]\n };\n });\n }\n}\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */ function $5ddd8eea08b5db9d$var$_validateBeforeSendResult(beforeSendResult, beforeSendLabel) {\n const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n if ((0, $8cfrP.isThenable)(beforeSendResult)) return beforeSendResult.then((event)=>{\n if (!(0, $8cfrP.isPlainObject)(event) && event !== null) throw new (0, $3nsdT.SentryError)(invalidValueError);\n return event;\n }, (e)=>{\n throw new (0, $3nsdT.SentryError)(`${beforeSendLabel} rejected with ${e}`);\n });\n else if (!(0, $8cfrP.isPlainObject)(beforeSendResult) && beforeSendResult !== null) throw new (0, $3nsdT.SentryError)(invalidValueError);\n return beforeSendResult;\n}\n/**\n * Process the matching `beforeSendXXX` callback.\n */ function $5ddd8eea08b5db9d$var$processBeforeSend(options, event, hint) {\n const { beforeSend: beforeSend, beforeSendTransaction: beforeSendTransaction } = options;\n if ($5ddd8eea08b5db9d$var$isErrorEvent(event) && beforeSend) return beforeSend(event, hint);\n if ($5ddd8eea08b5db9d$var$isTransactionEvent(event) && beforeSendTransaction) return beforeSendTransaction(event, hint);\n return event;\n}\nfunction $5ddd8eea08b5db9d$var$isErrorEvent(event) {\n return event.type === undefined;\n}\nfunction $5ddd8eea08b5db9d$var$isTransactionEvent(event) {\n return event.type === \"transaction\";\n}\n\n});\nparcelRegister(\"i4Z6l\", function(module, exports) {\n\n$parcel$export(module.exports, \"createEnvelope\", () => $d297ff2edd68285e$export$f93f7f385160c44e);\n$parcel$export(module.exports, \"addItemToEnvelope\", () => $d297ff2edd68285e$export$d650323442802f6f);\n$parcel$export(module.exports, \"forEachEnvelopeItem\", () => $d297ff2edd68285e$export$c56c55acf0136fd3);\n$parcel$export(module.exports, \"serializeEnvelope\", () => $d297ff2edd68285e$export$32f9b428425aac85);\n$parcel$export(module.exports, \"createAttachmentEnvelopeItem\", () => $d297ff2edd68285e$export$d8fc80952cc31fa4);\n$parcel$export(module.exports, \"envelopeItemTypeToDataCategory\", () => $d297ff2edd68285e$export$b11169581eeaf237);\n$parcel$export(module.exports, \"getSdkMetadataForEnvelopeHeader\", () => $d297ff2edd68285e$export$d369f3b2758f6743);\n$parcel$export(module.exports, \"createEventEnvelopeHeaders\", () => $d297ff2edd68285e$export$92b6093782fe661b);\n\nvar $3R32v = parcelRequire(\"3R32v\");\n\nvar $2mHZf = parcelRequire(\"2mHZf\");\n\nvar $aCgU1 = parcelRequire(\"aCgU1\");\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */ function $d297ff2edd68285e$export$f93f7f385160c44e(headers, items = []) {\n return [\n headers,\n items\n ];\n}\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */ function $d297ff2edd68285e$export$d650323442802f6f(envelope, newItem) {\n const [headers, items] = envelope;\n return [\n headers,\n [\n ...items,\n newItem\n ]\n ];\n}\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */ function $d297ff2edd68285e$export$c56c55acf0136fd3(envelope, callback) {\n const envelopeItems = envelope[1];\n for (const envelopeItem of envelopeItems){\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n if (result) return true;\n }\n return false;\n}\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */ function $d297ff2edd68285e$export$604a45d95a155e2b(envelope, types) {\n return $d297ff2edd68285e$export$c56c55acf0136fd3(envelope, (_, type)=>types.includes(type));\n}\n/**\n * Encode a string to UTF8.\n */ function $d297ff2edd68285e$var$encodeUTF8(input, textEncoder) {\n const utf8 = textEncoder || new TextEncoder();\n return utf8.encode(input);\n}\n/**\n * Serializes an envelope.\n */ function $d297ff2edd68285e$export$32f9b428425aac85(envelope, textEncoder) {\n const [envHeaders, items] = envelope;\n // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n let parts = JSON.stringify(envHeaders);\n function append(next) {\n if (typeof parts === \"string\") parts = typeof next === \"string\" ? parts + next : [\n $d297ff2edd68285e$var$encodeUTF8(parts, textEncoder),\n next\n ];\n else parts.push(typeof next === \"string\" ? $d297ff2edd68285e$var$encodeUTF8(next, textEncoder) : next);\n }\n for (const item of items){\n const [itemHeaders, payload] = item;\n append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n if (typeof payload === \"string\" || payload instanceof Uint8Array) append(payload);\n else {\n let stringifiedPayload;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch (e) {\n // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.strinify()` still\n // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n // performance impact but in this case a performance hit is better than throwing.\n stringifiedPayload = JSON.stringify((0, $2mHZf.normalize)(payload));\n }\n append(stringifiedPayload);\n }\n }\n return typeof parts === \"string\" ? parts : $d297ff2edd68285e$var$concatBuffers(parts);\n}\nfunction $d297ff2edd68285e$var$concatBuffers(buffers) {\n const totalLength = buffers.reduce((acc, buf)=>acc + buf.length, 0);\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers){\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n return merged;\n}\n/**\n * Parses an envelope\n */ function $d297ff2edd68285e$export$3338d0c7b6e17a2b(env, textEncoder, textDecoder) {\n let buffer = typeof env === \"string\" ? textEncoder.encode(env) : env;\n function readBinary(length) {\n const bin = buffer.subarray(0, length);\n // Replace the buffer with the remaining data excluding trailing newline\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n function readJson() {\n let i = buffer.indexOf(0xa);\n // If we couldn't find a newline, we must have found the end of the buffer\n if (i < 0) i = buffer.length;\n return JSON.parse(textDecoder.decode(readBinary(i)));\n }\n const envelopeHeader = readJson();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const items = [];\n while(buffer.length){\n const itemHeader = readJson();\n const binaryLength = typeof itemHeader.length === \"number\" ? itemHeader.length : undefined;\n items.push([\n itemHeader,\n binaryLength ? readBinary(binaryLength) : readJson()\n ]);\n }\n return [\n envelopeHeader,\n items\n ];\n}\n/**\n * Creates attachment envelope items\n */ function $d297ff2edd68285e$export$d8fc80952cc31fa4(attachment, textEncoder) {\n const buffer = typeof attachment.data === \"string\" ? $d297ff2edd68285e$var$encodeUTF8(attachment.data, textEncoder) : attachment.data;\n return [\n (0, $aCgU1.dropUndefinedKeys)({\n type: \"attachment\",\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType\n }),\n buffer\n ];\n}\nconst $d297ff2edd68285e$var$ITEM_TYPE_TO_DATA_CATEGORY_MAP = {\n session: \"session\",\n sessions: \"session\",\n attachment: \"attachment\",\n transaction: \"transaction\",\n event: \"error\",\n client_report: \"internal\",\n user_report: \"default\",\n profile: \"profile\",\n replay_event: \"replay\",\n replay_recording: \"replay\",\n check_in: \"monitor\",\n feedback: \"feedback\",\n // TODO: This is a temporary workaround until we have a proper data category for metrics\n statsd: \"unknown\"\n};\n/**\n * Maps the type of an envelope item to a data category.\n */ function $d297ff2edd68285e$export$b11169581eeaf237(type) {\n return $d297ff2edd68285e$var$ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];\n}\n/** Extracts the minimal SDK info from from the metadata or an events */ function $d297ff2edd68285e$export$d369f3b2758f6743(metadataOrEvent) {\n if (!metadataOrEvent || !metadataOrEvent.sdk) return;\n const { name: name, version: version } = metadataOrEvent.sdk;\n return {\n name: name,\n version: version\n };\n}\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */ function $d297ff2edd68285e$export$92b6093782fe661b(event, sdkInfo, tunnel, dsn) {\n const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext;\n return {\n event_id: event.event_id,\n sent_at: new Date().toISOString(),\n ...sdkInfo && {\n sdk: sdkInfo\n },\n ...!!tunnel && dsn && {\n dsn: (0, $3R32v.dsnToString)(dsn)\n },\n ...dynamicSamplingContext && {\n trace: (0, $aCgU1.dropUndefinedKeys)({\n ...dynamicSamplingContext\n })\n }\n };\n}\n\n});\n\nparcelRegister(\"3nsdT\", function(module, exports) {\n\n$parcel$export(module.exports, \"SentryError\", () => $27596998e7932a97$export$5949942ba2a7c0e2);\n/** An error emitted by Sentry SDKs and related utilities. */ class $27596998e7932a97$export$5949942ba2a7c0e2 extends Error {\n /** Display name of this error instance. */ constructor(message, logLevel = \"warn\"){\n super(message);\n this.message = message;\n this.name = new.target.prototype.constructor.name;\n // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line\n // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes\n // instances of `SentryError` fail `obj instanceof SentryError` checks.\n Object.setPrototypeOf(this, new.target.prototype);\n this.logLevel = logLevel;\n }\n}\n\n});\n\nparcelRegister(\"eSP6V\", function(module, exports) {\n\n$parcel$export(module.exports, \"createSessionEnvelope\", () => $ad5dc15cfce7242d$export$124b03c077baa2f3);\n$parcel$export(module.exports, \"createEventEnvelope\", () => $ad5dc15cfce7242d$export$c31057337a18010f);\n\nvar $i4Z6l = parcelRequire(\"i4Z6l\");\nvar $3R32v = parcelRequire(\"3R32v\");\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/ function $ad5dc15cfce7242d$var$enhanceEventWithSdkInfo(event, sdkInfo) {\n if (!sdkInfo) return event;\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = [\n ...event.sdk.integrations || [],\n ...sdkInfo.integrations || []\n ];\n event.sdk.packages = [\n ...event.sdk.packages || [],\n ...sdkInfo.packages || []\n ];\n return event;\n}\n/** Creates an envelope from a Session */ function $ad5dc15cfce7242d$export$124b03c077baa2f3(session, dsn, metadata, tunnel) {\n const sdkInfo = (0, $i4Z6l.getSdkMetadataForEnvelopeHeader)(metadata);\n const envelopeHeaders = {\n sent_at: new Date().toISOString(),\n ...sdkInfo && {\n sdk: sdkInfo\n },\n ...!!tunnel && dsn && {\n dsn: (0, $3R32v.dsnToString)(dsn)\n }\n };\n const envelopeItem = \"aggregates\" in session ? [\n {\n type: \"sessions\"\n },\n session\n ] : [\n {\n type: \"session\"\n },\n session.toJSON()\n ];\n return (0, $i4Z6l.createEnvelope)(envelopeHeaders, [\n envelopeItem\n ]);\n}\n/**\n * Create an Envelope from an event.\n */ function $ad5dc15cfce7242d$export$c31057337a18010f(event, dsn, metadata, tunnel) {\n const sdkInfo = (0, $i4Z6l.getSdkMetadataForEnvelopeHeader)(metadata);\n /*\n Note: Due to TS, event.type may be `replay_event`, theoretically.\n In practice, we never call `createEventEnvelope` with `replay_event` type,\n and we'd have to adjut a looot of types to make this work properly.\n We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)\n So the safe choice is to really guard against the replay_event type here.\n */ const eventType = event.type && event.type !== \"replay_event\" ? event.type : \"event\";\n $ad5dc15cfce7242d$var$enhanceEventWithSdkInfo(event, metadata && metadata.sdk);\n const envelopeHeaders = (0, $i4Z6l.createEventEnvelopeHeaders)(event, sdkInfo, tunnel, dsn);\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete event.sdkProcessingMetadata;\n const eventItem = [\n {\n type: eventType\n },\n event\n ];\n return (0, $i4Z6l.createEnvelope)(envelopeHeaders, [\n eventItem\n ]);\n}\n\n});\n\nparcelRegister(\"vjmKu\", function(module, exports) {\n\n$parcel$export(module.exports, \"getDynamicSamplingContextFromClient\", () => $05e1eb084ed8c80c$export$366bad00d6815eed);\n\nvar $aCgU1 = parcelRequire(\"aCgU1\");\n\nvar $bagDH = parcelRequire(\"bagDH\");\n/**\n * Creates a dynamic sampling context from a client.\n *\n * Dispatchs the `createDsc` lifecycle hook as a side effect.\n */ function $05e1eb084ed8c80c$export$366bad00d6815eed(trace_id, client, scope) {\n const options = client.getOptions();\n const { publicKey: public_key } = client.getDsn() || {};\n const { segment: user_segment } = scope && scope.getUser() || {};\n const dsc = (0, $aCgU1.dropUndefinedKeys)({\n environment: options.environment || (0, $bagDH.DEFAULT_ENVIRONMENT),\n release: options.release,\n user_segment: user_segment,\n public_key: public_key,\n trace_id: trace_id\n });\n client.emit && client.emit(\"createDsc\", dsc);\n return dsc;\n}\n\n});\n\nparcelRegister(\"783pM\", function(module, exports) {\n\n$parcel$export(module.exports, \"prepareEvent\", () => $530bedd7fb374bf8$export$2d67fb380bd11267);\n\nvar $hbZCn = parcelRequire(\"hbZCn\");\nvar $kPqMJ = parcelRequire(\"kPqMJ\");\nvar $2mHZf = parcelRequire(\"2mHZf\");\nvar $6SaPC = parcelRequire(\"6SaPC\");\nvar $6qV3U = parcelRequire(\"6qV3U\");\nvar $aZ9cG = parcelRequire(\"aZ9cG\");\n\nvar $bagDH = parcelRequire(\"bagDH\");\n\nvar $1Be8C = parcelRequire(\"1Be8C\");\n\nvar $gP2DW = parcelRequire(\"gP2DW\");\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * Note: This also triggers callbacks for `addGlobalEventProcessor`, but not `beforeSend`.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */ function $530bedd7fb374bf8$export$2d67fb380bd11267(options, event, hint, scope, client) {\n const { normalizeDepth: normalizeDepth = 3, normalizeMaxBreadth: normalizeMaxBreadth = 1000 } = options;\n const prepared = {\n ...event,\n event_id: event.event_id || hint.event_id || (0, $aZ9cG.uuid4)(),\n timestamp: event.timestamp || (0, $hbZCn.dateTimestampInSeconds)()\n };\n const integrations = hint.integrations || options.integrations.map((i)=>i.name);\n $530bedd7fb374bf8$var$applyClientOptions(prepared, options);\n $530bedd7fb374bf8$var$applyIntegrationsMetadata(prepared, integrations);\n // Only put debug IDs onto frames for error events.\n if (event.type === undefined) $530bedd7fb374bf8$export$63042efc86f043e7(prepared, options.stackParser);\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n let finalScope = scope;\n if (hint.captureContext) finalScope = (0, $gP2DW.Scope).clone(finalScope).update(hint.captureContext);\n // We prepare the result here with a resolved Event.\n let result = (0, $6SaPC.resolvedSyncPromise)(prepared);\n const clientEventProcessors = client && client.getEventProcessors ? client.getEventProcessors() : [];\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n //\n // We need to check for the existence of `finalScope.getAttachments`\n // because `getAttachments` can be undefined if users are using an older version\n // of `@sentry/core` that does not have the `getAttachments` method.\n // See: https://github.com/getsentry/sentry-javascript/issues/5229\n if (finalScope) {\n // Collect attachments from the hint and scope\n if (finalScope.getAttachments) {\n const attachments = [\n ...hint.attachments || [],\n ...finalScope.getAttachments()\n ];\n if (attachments.length) hint.attachments = attachments;\n }\n // In case we have a hub we reassign it.\n result = finalScope.applyToEvent(prepared, hint, clientEventProcessors);\n } else // Apply client & global event processors even if there is no scope\n // TODO (v8): Update the order to be Global > Client\n result = (0, $1Be8C.notifyEventProcessors)([\n ...clientEventProcessors,\n ...(0, $1Be8C.getGlobalEventProcessors)()\n ], prepared, hint);\n return result.then((evt)=>{\n if (evt) // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n // any new data\n $530bedd7fb374bf8$export$1be657ba8ef44ff0(evt);\n if (typeof normalizeDepth === \"number\" && normalizeDepth > 0) return $530bedd7fb374bf8$var$normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n return evt;\n });\n}\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */ function $530bedd7fb374bf8$var$applyClientOptions(event, options) {\n const { environment: environment, release: release, dist: dist, maxValueLength: maxValueLength = 250 } = options;\n if (!(\"environment\" in event)) event.environment = \"environment\" in options ? environment : (0, $bagDH.DEFAULT_ENVIRONMENT);\n if (event.release === undefined && release !== undefined) event.release = release;\n if (event.dist === undefined && dist !== undefined) event.dist = dist;\n if (event.message) event.message = (0, $6qV3U.truncate)(event.message, maxValueLength);\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) exception.value = (0, $6qV3U.truncate)(exception.value, maxValueLength);\n const request = event.request;\n if (request && request.url) request.url = (0, $6qV3U.truncate)(request.url, maxValueLength);\n}\nconst $530bedd7fb374bf8$var$debugIdStackParserCache = new WeakMap();\n/**\n * Puts debug IDs into the stack frames of an error event.\n */ function $530bedd7fb374bf8$export$63042efc86f043e7(event, stackParser) {\n const debugIdMap = (0, $kPqMJ.GLOBAL_OBJ)._sentryDebugIds;\n if (!debugIdMap) return;\n let debugIdStackFramesCache;\n const cachedDebugIdStackFrameCache = $530bedd7fb374bf8$var$debugIdStackParserCache.get(stackParser);\n if (cachedDebugIdStackFrameCache) debugIdStackFramesCache = cachedDebugIdStackFrameCache;\n else {\n debugIdStackFramesCache = new Map();\n $530bedd7fb374bf8$var$debugIdStackParserCache.set(stackParser, debugIdStackFramesCache);\n }\n // Build a map of filename -> debug_id\n const filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace)=>{\n let parsedStack;\n const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);\n if (cachedParsedStack) parsedStack = cachedParsedStack;\n else {\n parsedStack = stackParser(debugIdStackTrace);\n debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);\n }\n for(let i = parsedStack.length - 1; i >= 0; i--){\n const stackFrame = parsedStack[i];\n if (stackFrame.filename) {\n acc[stackFrame.filename] = debugIdMap[debugIdStackTrace];\n break;\n }\n }\n return acc;\n }, {});\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach((exception)=>{\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach((frame)=>{\n if (frame.filename) frame.debug_id = filenameDebugIdMap[frame.filename];\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */ function $530bedd7fb374bf8$export$1be657ba8ef44ff0(event) {\n // Extract debug IDs and filenames from the stack frames on the event.\n const filenameDebugIdMap = {};\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach((exception)=>{\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach((frame)=>{\n if (frame.debug_id) {\n if (frame.abs_path) filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n else if (frame.filename) filenameDebugIdMap[frame.filename] = frame.debug_id;\n delete frame.debug_id;\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n if (Object.keys(filenameDebugIdMap).length === 0) return;\n // Fill debug_meta information\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n const images = event.debug_meta.images;\n Object.keys(filenameDebugIdMap).forEach((filename)=>{\n images.push({\n type: \"sourcemap\",\n code_file: filename,\n debug_id: filenameDebugIdMap[filename]\n });\n });\n}\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */ function $530bedd7fb374bf8$var$applyIntegrationsMetadata(event, integrationNames) {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [\n ...event.sdk.integrations || [],\n ...integrationNames\n ];\n }\n}\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */ function $530bedd7fb374bf8$var$normalizeEvent(event, depth, maxBreadth) {\n if (!event) return null;\n const normalized = {\n ...event,\n ...event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map((b)=>({\n ...b,\n ...b.data && {\n data: (0, $2mHZf.normalize)(b.data, depth, maxBreadth)\n }\n }))\n },\n ...event.user && {\n user: (0, $2mHZf.normalize)(event.user, depth, maxBreadth)\n },\n ...event.contexts && {\n contexts: (0, $2mHZf.normalize)(event.contexts, depth, maxBreadth)\n },\n ...event.extra && {\n extra: (0, $2mHZf.normalize)(event.extra, depth, maxBreadth)\n }\n };\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace;\n // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n if (event.contexts.trace.data) normalized.contexts.trace.data = (0, $2mHZf.normalize)(event.contexts.trace.data, depth, maxBreadth);\n }\n // event.spans[].data may contain circular/dangerous data so we need to normalize it\n if (event.spans) normalized.spans = event.spans.map((span)=>{\n // We cannot use the spread operator here because `toJSON` on `span` is non-enumerable\n if (span.data) span.data = (0, $2mHZf.normalize)(span.data, depth, maxBreadth);\n return span;\n });\n return normalized;\n}\n\n});\n\n\nparcelRegister(\"5j5C8\", function(module, exports) {\n\n$parcel$export(module.exports, \"SDK_VERSION\", () => $3dd314f1f3559771$export$31499a9cd224b78c);\nconst $3dd314f1f3559771$export$31499a9cd224b78c = \"7.80.0\";\n\n});\n\nparcelRegister(\"hL11s\", function(module, exports) {\n\n$parcel$export(module.exports, \"createClientReportEnvelope\", () => $ced79e81321045b6$export$f3b9ed77c03eeb00);\n\nvar $i4Z6l = parcelRequire(\"i4Z6l\");\n\nvar $hbZCn = parcelRequire(\"hbZCn\");\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */ function $ced79e81321045b6$export$f3b9ed77c03eeb00(discarded_events, dsn, timestamp) {\n const clientReportItem = [\n {\n type: \"client_report\"\n },\n {\n timestamp: timestamp || (0, $hbZCn.dateTimestampInSeconds)(),\n discarded_events: discarded_events\n }\n ];\n return (0, $i4Z6l.createEnvelope)(dsn ? {\n dsn: dsn\n } : {}, [\n clientReportItem\n ]);\n}\n\n});\n\nparcelRegister(\"kJZcO\", function(module, exports) {\n\n$parcel$export(module.exports, \"exceptionFromError\", () => $f1977cc3047eace9$export$a6c2d27607295951);\n$parcel$export(module.exports, \"eventFromException\", () => $f1977cc3047eace9$export$ea3ec7e569b823fc);\n$parcel$export(module.exports, \"eventFromUnknownInput\", () => $f1977cc3047eace9$export$9dd56ed1ef0c3420);\n$parcel$export(module.exports, \"eventFromMessage\", () => $f1977cc3047eace9$export$5425b53185d13d6c);\n\nvar $1D41F = parcelRequire(\"1D41F\");\n\nvar $aZ9cG = parcelRequire(\"aZ9cG\");\nvar $aCgU1 = parcelRequire(\"aCgU1\");\nvar $8cfrP = parcelRequire(\"8cfrP\");\nvar $2mHZf = parcelRequire(\"2mHZf\");\nvar $6SaPC = parcelRequire(\"6SaPC\");\n/**\n * This function creates an exception from a JavaScript Error\n */ function $f1977cc3047eace9$export$a6c2d27607295951(stackParser, ex) {\n // Get the frames first since Opera can lose the stack if we touch anything else first\n const frames = $f1977cc3047eace9$export$d478b2c12fbcfdda(stackParser, ex);\n const exception = {\n type: ex && ex.name,\n value: $f1977cc3047eace9$var$extractMessage(ex)\n };\n if (frames.length) exception.stacktrace = {\n frames: frames\n };\n if (exception.type === undefined && exception.value === \"\") exception.value = \"Unrecoverable error caught\";\n return exception;\n}\n/**\n * @hidden\n */ function $f1977cc3047eace9$export$a6a5dd73e489caf(stackParser, exception, syntheticException, isUnhandledRejection) {\n const hub = (0, $1D41F.getCurrentHub)();\n const client = hub.getClient();\n const normalizeDepth = client && client.getOptions().normalizeDepth;\n const event = {\n exception: {\n values: [\n {\n type: (0, $8cfrP.isEvent)(exception) ? exception.constructor.name : isUnhandledRejection ? \"UnhandledRejection\" : \"Error\",\n value: $f1977cc3047eace9$var$getNonErrorObjectExceptionValue(exception, {\n isUnhandledRejection: isUnhandledRejection\n })\n }\n ]\n },\n extra: {\n __serialized__: (0, $2mHZf.normalizeToSize)(exception, normalizeDepth)\n }\n };\n if (syntheticException) {\n const frames = $f1977cc3047eace9$export$d478b2c12fbcfdda(stackParser, syntheticException);\n if (frames.length) // event.exception.values[0] has been set above\n event.exception.values[0].stacktrace = {\n frames: frames\n };\n }\n return event;\n}\n/**\n * @hidden\n */ function $f1977cc3047eace9$export$73fbea5a0a5234af(stackParser, ex) {\n return {\n exception: {\n values: [\n $f1977cc3047eace9$export$a6c2d27607295951(stackParser, ex)\n ]\n }\n };\n}\n/** Parses stack frames from an error */ function $f1977cc3047eace9$export$d478b2c12fbcfdda(stackParser, ex) {\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace || ex.stack || \"\";\n const popSize = $f1977cc3047eace9$var$getPopSize(ex);\n try {\n return stackParser(stacktrace, popSize);\n } catch (e) {\n // no-empty\n }\n return [];\n}\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst $f1977cc3047eace9$var$reactMinifiedRegexp = /Minified React error #\\d+;/i;\nfunction $f1977cc3047eace9$var$getPopSize(ex) {\n if (ex) {\n if (typeof ex.framesToPop === \"number\") return ex.framesToPop;\n if ($f1977cc3047eace9$var$reactMinifiedRegexp.test(ex.message)) return 1;\n }\n return 0;\n}\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */ function $f1977cc3047eace9$var$extractMessage(ex) {\n const message = ex && ex.message;\n if (!message) return \"No error message\";\n if (message.error && typeof message.error.message === \"string\") return message.error.message;\n return message;\n}\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */ function $f1977cc3047eace9$export$ea3ec7e569b823fc(stackParser, exception, hint, attachStacktrace) {\n const syntheticException = hint && hint.syntheticException || undefined;\n const event = $f1977cc3047eace9$export$9dd56ed1ef0c3420(stackParser, exception, syntheticException, attachStacktrace);\n (0, $aZ9cG.addExceptionMechanism)(event); // defaults to { type: 'generic', handled: true }\n event.level = \"error\";\n if (hint && hint.event_id) event.event_id = hint.event_id;\n return (0, $6SaPC.resolvedSyncPromise)(event);\n}\n/**\n * Builds and Event from a Message\n * @hidden\n */ function $f1977cc3047eace9$export$5425b53185d13d6c(stackParser, message, // eslint-disable-next-line deprecation/deprecation\nlevel = \"info\", hint, attachStacktrace) {\n const syntheticException = hint && hint.syntheticException || undefined;\n const event = $f1977cc3047eace9$export$47d86ae4b3c9994(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint && hint.event_id) event.event_id = hint.event_id;\n return (0, $6SaPC.resolvedSyncPromise)(event);\n}\n/**\n * @hidden\n */ function $f1977cc3047eace9$export$9dd56ed1ef0c3420(stackParser, exception, syntheticException, attachStacktrace, isUnhandledRejection) {\n let event;\n if ((0, $8cfrP.isErrorEvent)(exception) && exception.error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception;\n return $f1977cc3047eace9$export$73fbea5a0a5234af(stackParser, errorEvent.error);\n }\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if ((0, $8cfrP.isDOMError)(exception) || (0, $8cfrP.isDOMException)(exception)) {\n const domException = exception;\n if (\"stack\" in exception) event = $f1977cc3047eace9$export$73fbea5a0a5234af(stackParser, exception);\n else {\n const name = domException.name || ((0, $8cfrP.isDOMError)(domException) ? \"DOMError\" : \"DOMException\");\n const message = domException.message ? `${name}: ${domException.message}` : name;\n event = $f1977cc3047eace9$export$47d86ae4b3c9994(stackParser, message, syntheticException, attachStacktrace);\n (0, $aZ9cG.addExceptionTypeValue)(event, message);\n }\n if (\"code\" in domException) // eslint-disable-next-line deprecation/deprecation\n event.tags = {\n ...event.tags,\n \"DOMException.code\": `${domException.code}`\n };\n return event;\n }\n if ((0, $8cfrP.isError)(exception)) // we have a real Error object, do nothing\n return $f1977cc3047eace9$export$73fbea5a0a5234af(stackParser, exception);\n if ((0, $8cfrP.isPlainObject)(exception) || (0, $8cfrP.isEvent)(exception)) {\n // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n // group on any key/value change.\n const objectException = exception;\n event = $f1977cc3047eace9$export$a6a5dd73e489caf(stackParser, objectException, syntheticException, isUnhandledRejection);\n (0, $aZ9cG.addExceptionMechanism)(event, {\n synthetic: true\n });\n return event;\n }\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = $f1977cc3047eace9$export$47d86ae4b3c9994(stackParser, exception, syntheticException, attachStacktrace);\n (0, $aZ9cG.addExceptionTypeValue)(event, `${exception}`, undefined);\n (0, $aZ9cG.addExceptionMechanism)(event, {\n synthetic: true\n });\n return event;\n}\n/**\n * @hidden\n */ function $f1977cc3047eace9$export$47d86ae4b3c9994(stackParser, input, syntheticException, attachStacktrace) {\n const event = {\n message: input\n };\n if (attachStacktrace && syntheticException) {\n const frames = $f1977cc3047eace9$export$d478b2c12fbcfdda(stackParser, syntheticException);\n if (frames.length) event.exception = {\n values: [\n {\n value: input,\n stacktrace: {\n frames: frames\n }\n }\n ]\n };\n }\n return event;\n}\nfunction $f1977cc3047eace9$var$getNonErrorObjectExceptionValue(exception, { isUnhandledRejection: isUnhandledRejection }) {\n const keys = (0, $aCgU1.extractExceptionKeysForMessage)(exception);\n const captureType = isUnhandledRejection ? \"promise rejection\" : \"exception\";\n // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before\n // We still want to try to get a decent message for these cases\n if ((0, $8cfrP.isErrorEvent)(exception)) return `Event \\`ErrorEvent\\` captured as ${captureType} with message \\`${exception.message}\\``;\n if ((0, $8cfrP.isEvent)(exception)) {\n const className = $f1977cc3047eace9$var$getObjectClassName(exception);\n return `Event \\`${className}\\` (type=${exception.type}) captured as ${captureType}`;\n }\n return `Object captured as ${captureType} with keys: ${keys}`;\n}\nfunction $f1977cc3047eace9$var$getObjectClassName(obj) {\n try {\n const prototype = Object.getPrototypeOf(obj);\n return prototype ? prototype.constructor.name : undefined;\n } catch (e) {\n // ignore errors here\n }\n}\n\n});\n\nparcelRegister(\"ikSrI\", function(module, exports) {\n\n$parcel$export(module.exports, \"WINDOW\", () => $d5945412a22fffe3$export$56d8a8a25bd48b81);\n$parcel$export(module.exports, \"shouldIgnoreOnError\", () => $d5945412a22fffe3$export$b79738ab10c590b2);\n$parcel$export(module.exports, \"wrap\", () => $d5945412a22fffe3$export$4997ffc0176396a6);\n\nvar $dUAl9 = parcelRequire(\"dUAl9\");\n\nvar $aZ9cG = parcelRequire(\"aZ9cG\");\nvar $aCgU1 = parcelRequire(\"aCgU1\");\nvar $kPqMJ = parcelRequire(\"kPqMJ\");\nconst $d5945412a22fffe3$export$56d8a8a25bd48b81 = (0, $kPqMJ.GLOBAL_OBJ);\nlet $d5945412a22fffe3$var$ignoreOnError = 0;\n/**\n * @hidden\n */ function $d5945412a22fffe3$export$b79738ab10c590b2() {\n return $d5945412a22fffe3$var$ignoreOnError > 0;\n}\n/**\n * @hidden\n */ function $d5945412a22fffe3$export$1265a142ff5ba165() {\n // onerror should trigger before setTimeout\n $d5945412a22fffe3$var$ignoreOnError++;\n setTimeout(()=>{\n $d5945412a22fffe3$var$ignoreOnError--;\n });\n}\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap. It is generally safe to pass an unbound function, because the returned wrapper always\n * has a correct `this` context.\n * @returns The wrapped function.\n * @hidden\n */ function $d5945412a22fffe3$export$4997ffc0176396a6(fn, options = {}, before) {\n // for future readers what this does is wrap a function and then create\n // a bi-directional wrapping between them.\n //\n // example: wrapped = wrap(original);\n // original.__sentry_wrapped__ -> wrapped\n // wrapped.__sentry_original__ -> original\n if (typeof fn !== \"function\") return fn;\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n const wrapper = fn.__sentry_wrapped__;\n if (wrapper) return wrapper;\n // We don't wanna wrap it twice\n if ((0, $aCgU1.getOriginalFunction)(fn)) return fn;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n /* eslint-disable prefer-rest-params */ // It is important that `sentryWrapped` is not an arrow function to preserve the context of `this`\n const sentryWrapped = function() {\n const args = Array.prototype.slice.call(arguments);\n try {\n if (before && typeof before === \"function\") before.apply(this, arguments);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n const wrappedArguments = args.map((arg)=>$d5945412a22fffe3$export$4997ffc0176396a6(arg, options));\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n } catch (ex) {\n $d5945412a22fffe3$export$1265a142ff5ba165();\n (0, $dUAl9.withScope)((scope)=>{\n scope.addEventProcessor((event)=>{\n if (options.mechanism) {\n (0, $aZ9cG.addExceptionTypeValue)(event, undefined, undefined);\n (0, $aZ9cG.addExceptionMechanism)(event, options.mechanism);\n }\n event.extra = {\n ...event.extra,\n arguments: args\n };\n return event;\n });\n (0, $dUAl9.captureException)(ex);\n });\n throw ex;\n }\n };\n /* eslint-enable prefer-rest-params */ // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for(const property in fn)if (Object.prototype.hasOwnProperty.call(fn, property)) sentryWrapped[property] = fn[property];\n } catch (_oO) {} // eslint-disable-line no-empty\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n (0, $aCgU1.markFunctionWrapped)(sentryWrapped, fn);\n (0, $aCgU1.addNonEnumerableProperty)(fn, \"__sentry_wrapped__\", sentryWrapped);\n // Restore original function name (not all browsers allow that)\n try {\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, \"name\");\n if (descriptor.configurable) Object.defineProperty(sentryWrapped, \"name\", {\n get () {\n return fn.name;\n }\n });\n // eslint-disable-next-line no-empty\n } catch (_oO) {}\n return sentryWrapped;\n}\n\n});\nparcelRegister(\"dUAl9\", function(module, exports) {\n\n$parcel$export(module.exports, \"captureException\", () => $a20cb1b2a03a8593$export$f5282963edea4a68);\n$parcel$export(module.exports, \"withScope\", () => $a20cb1b2a03a8593$export$ec58d9285c204497);\n\nvar $8cfrP = parcelRequire(\"8cfrP\");\nvar $boFAr = parcelRequire(\"boFAr\");\nvar $hbZCn = parcelRequire(\"hbZCn\");\nvar $aZ9cG = parcelRequire(\"aZ9cG\");\n\nvar $1D41F = parcelRequire(\"1D41F\");\n// Note: All functions in this file are typed with a return value of `ReturnType`,\n// where HUB_FUNCTION is some method on the Hub class.\n//\n// This is done to make sure the top level SDK methods stay in sync with the hub methods.\n// Although every method here has an explicit return type, some of them (that map to void returns) do not\n// contain `return` keywords. This is done to save on bundle size, as `return` is not minifiable.\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param captureContext Additional scope data to apply to exception event.\n * @returns The generated eventId.\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nfunction $a20cb1b2a03a8593$export$f5282963edea4a68(exception, captureContext) {\n return (0, $1D41F.getCurrentHub)().captureException(exception, {\n captureContext: captureContext\n });\n}\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param Severity Define the level of the message.\n * @returns The generated eventId.\n */ function $a20cb1b2a03a8593$export$45654777c133ae80(message, // eslint-disable-next-line deprecation/deprecation\ncaptureContext) {\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n const level = typeof captureContext === \"string\" ? captureContext : undefined;\n const context = typeof captureContext !== \"string\" ? {\n captureContext: captureContext\n } : undefined;\n return (0, $1D41F.getCurrentHub)().captureMessage(message, level, context);\n}\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */ function $a20cb1b2a03a8593$export$1462b974fdcf6ba2(event, hint) {\n return (0, $1D41F.getCurrentHub)().captureEvent(event, hint);\n}\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */ function $a20cb1b2a03a8593$export$99d44f04437e9cb8(callback) {\n (0, $1D41F.getCurrentHub)().configureScope(callback);\n}\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */ function $a20cb1b2a03a8593$export$efda9a273d7a036d(breadcrumb) {\n (0, $1D41F.getCurrentHub)().addBreadcrumb(breadcrumb);\n}\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction $a20cb1b2a03a8593$export$2f04de43fe27971a(name, context) {\n (0, $1D41F.getCurrentHub)().setContext(name, context);\n}\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */ function $a20cb1b2a03a8593$export$bb4922da0dd51b92(extras) {\n (0, $1D41F.getCurrentHub)().setExtras(extras);\n}\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */ function $a20cb1b2a03a8593$export$8e8e7789d42ed61d(key, extra) {\n (0, $1D41F.getCurrentHub)().setExtra(key, extra);\n}\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */ function $a20cb1b2a03a8593$export$74a8fb34822092e6(tags) {\n (0, $1D41F.getCurrentHub)().setTags(tags);\n}\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */ function $a20cb1b2a03a8593$export$a37d07ee78eb4569(key, value) {\n (0, $1D41F.getCurrentHub)().setTag(key, value);\n}\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */ function $a20cb1b2a03a8593$export$8b6bb3dd62a01be2(user) {\n (0, $1D41F.getCurrentHub)().setUser(user);\n}\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */ function $a20cb1b2a03a8593$export$ec58d9285c204497(callback) {\n (0, $1D41F.getCurrentHub)().withScope(callback);\n}\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * NOTE: This function should only be used for *manual* instrumentation. Auto-instrumentation should call\n * `startTransaction` directly on the hub.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n */ function $a20cb1b2a03a8593$export$e262da7ae6480481(context, customSamplingContext) {\n return (0, $1D41F.getCurrentHub)().startTransaction({\n ...context\n }, customSamplingContext);\n}\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */ function $a20cb1b2a03a8593$export$413528111fbc67c(checkIn, upsertMonitorConfig) {\n const hub = (0, $1D41F.getCurrentHub)();\n const scope = hub.getScope();\n const client = hub.getClient();\n if (!client) (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(\"Cannot capture check-in. No client defined.\");\n else if (!client.captureCheckIn) (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(\"Cannot capture check-in. Client does not support sending check-ins.\");\n else return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n return (0, $aZ9cG.uuid4)();\n}\n/**\n * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.\n *\n * @param monitorSlug The distinct slug of the monitor.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */ function $a20cb1b2a03a8593$export$553526fc5f03c0b1(monitorSlug, callback, upsertMonitorConfig) {\n const checkInId = $a20cb1b2a03a8593$export$413528111fbc67c({\n monitorSlug: monitorSlug,\n status: \"in_progress\"\n }, upsertMonitorConfig);\n const now = (0, $hbZCn.timestampInSeconds)();\n function finishCheckIn(status) {\n $a20cb1b2a03a8593$export$413528111fbc67c({\n monitorSlug: monitorSlug,\n status: status,\n checkInId: checkInId,\n duration: (0, $hbZCn.timestampInSeconds)() - now\n });\n }\n let maybePromiseResult;\n try {\n maybePromiseResult = callback();\n } catch (e) {\n finishCheckIn(\"error\");\n throw e;\n }\n if ((0, $8cfrP.isThenable)(maybePromiseResult)) Promise.resolve(maybePromiseResult).then(()=>{\n finishCheckIn(\"ok\");\n }, ()=>{\n finishCheckIn(\"error\");\n });\n else finishCheckIn(\"ok\");\n return maybePromiseResult;\n}\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */ async function $a20cb1b2a03a8593$export$4909b86c8034bf73(timeout) {\n const client = (0, $1D41F.getCurrentHub)().getClient();\n if (client) return client.flush(timeout);\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(\"Cannot flush events. No client defined.\");\n return Promise.resolve(false);\n}\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */ async function $a20cb1b2a03a8593$export$8360e631d277ea4d(timeout) {\n const client = (0, $1D41F.getCurrentHub)().getClient();\n if (client) return client.close(timeout);\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(\"Cannot flush events and disable SDK. No client defined.\");\n return Promise.resolve(false);\n}\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */ function $a20cb1b2a03a8593$export$5d4e9fd7fac8e617() {\n return (0, $1D41F.getCurrentHub)().lastEventId();\n}\n\n});\n\n\nparcelRegister(\"jpXo4\", function(module, exports) {\n\n$parcel$export(module.exports, \"createUserFeedbackEnvelope\", () => $e22e6b2b9a589077$export$24a4dfcb686ee5bf);\n\nvar $i4Z6l = parcelRequire(\"i4Z6l\");\nvar $3R32v = parcelRequire(\"3R32v\");\n/**\n * Creates an envelope from a user feedback.\n */ function $e22e6b2b9a589077$export$24a4dfcb686ee5bf(feedback, { metadata: metadata, tunnel: tunnel, dsn: dsn }) {\n const headers = {\n event_id: feedback.event_id,\n sent_at: new Date().toISOString(),\n ...metadata && metadata.sdk && {\n sdk: {\n name: metadata.sdk.name,\n version: metadata.sdk.version\n }\n },\n ...!!tunnel && !!dsn && {\n dsn: (0, $3R32v.dsnToString)(dsn)\n }\n };\n const item = $e22e6b2b9a589077$var$createUserFeedbackEnvelopeItem(feedback);\n return (0, $i4Z6l.createEnvelope)(headers, [\n item\n ]);\n}\nfunction $e22e6b2b9a589077$var$createUserFeedbackEnvelopeItem(feedback) {\n const feedbackHeaders = {\n type: \"user_report\"\n };\n return [\n feedbackHeaders,\n feedback\n ];\n}\n\n});\n\n\nparcelRegister(\"cgnMu\", function(module, exports) {\n\n$parcel$export(module.exports, \"GlobalHandlers\", () => $8ed96d1b89d46273$export$204155decbc90e5a);\n\nvar $1D41F = parcelRequire(\"1D41F\");\n\nvar $aZ9cG = parcelRequire(\"aZ9cG\");\nvar $8GNPF = parcelRequire(\"8GNPF\");\nvar $8SKxE = parcelRequire(\"8SKxE\");\nvar $8cfrP = parcelRequire(\"8cfrP\");\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $kJZcO = parcelRequire(\"kJZcO\");\n\nvar $ikSrI = parcelRequire(\"ikSrI\");\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */ /** Global handlers */ class $8ed96d1b89d46273$export$204155decbc90e5a {\n /**\n * @inheritDoc\n */ static __initStatic() {\n this.id = \"GlobalHandlers\";\n }\n /**\n * @inheritDoc\n */ /** JSDoc */ /**\n * Stores references functions to installing handlers. Will set to undefined\n * after they have been run so that they are not used twice.\n */ /** JSDoc */ constructor(options){\n this.name = $8ed96d1b89d46273$export$204155decbc90e5a.id;\n this._options = {\n onerror: true,\n onunhandledrejection: true,\n ...options\n };\n this._installFunc = {\n onerror: $8ed96d1b89d46273$var$_installGlobalOnErrorHandler,\n onunhandledrejection: $8ed96d1b89d46273$var$_installGlobalOnUnhandledRejectionHandler\n };\n }\n /**\n * @inheritDoc\n */ setupOnce() {\n Error.stackTraceLimit = 50;\n const options = this._options;\n // We can disable guard-for-in as we construct the options object above + do checks against\n // `this._installFunc` for the property.\n // eslint-disable-next-line guard-for-in\n for(const key in options){\n const installFunc = this._installFunc[key];\n if (installFunc && options[key]) {\n $8ed96d1b89d46273$var$globalHandlerLog(key);\n installFunc();\n this._installFunc[key] = undefined;\n }\n }\n }\n}\n$8ed96d1b89d46273$export$204155decbc90e5a.__initStatic();\n/** JSDoc */ function $8ed96d1b89d46273$var$_installGlobalOnErrorHandler() {\n (0, $8GNPF.addInstrumentationHandler)(\"error\", // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (data)=>{\n const [hub, stackParser, attachStacktrace] = $8ed96d1b89d46273$var$getHubAndOptions();\n if (!hub.getIntegration($8ed96d1b89d46273$export$204155decbc90e5a)) return;\n const { msg: msg, url: url, line: line, column: column, error: error } = data;\n if ((0, $ikSrI.shouldIgnoreOnError)() || error && error.__sentry_own_request__) return;\n const event = error === undefined && (0, $8cfrP.isString)(msg) ? $8ed96d1b89d46273$var$_eventFromIncompleteOnError(msg, url, line, column) : $8ed96d1b89d46273$var$_enhanceEventWithInitialFrame((0, $kJZcO.eventFromUnknownInput)(stackParser, error || msg, undefined, attachStacktrace, false), url, line, column);\n event.level = \"error\";\n $8ed96d1b89d46273$var$addMechanismAndCapture(hub, error, event, \"onerror\");\n });\n}\n/** JSDoc */ function $8ed96d1b89d46273$var$_installGlobalOnUnhandledRejectionHandler() {\n (0, $8GNPF.addInstrumentationHandler)(\"unhandledrejection\", // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (e)=>{\n const [hub, stackParser, attachStacktrace] = $8ed96d1b89d46273$var$getHubAndOptions();\n if (!hub.getIntegration($8ed96d1b89d46273$export$204155decbc90e5a)) return;\n let error = e;\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if (\"reason\" in e) error = e.reason;\n else if (\"detail\" in e && \"reason\" in e.detail) error = e.detail.reason;\n } catch (_oO) {\n // no-empty\n }\n if ((0, $ikSrI.shouldIgnoreOnError)() || error && error.__sentry_own_request__) return true;\n const event = (0, $8cfrP.isPrimitive)(error) ? $8ed96d1b89d46273$var$_eventFromRejectionWithPrimitive(error) : (0, $kJZcO.eventFromUnknownInput)(stackParser, error, undefined, attachStacktrace, true);\n event.level = \"error\";\n $8ed96d1b89d46273$var$addMechanismAndCapture(hub, error, event, \"onunhandledrejection\");\n return;\n });\n}\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */ function $8ed96d1b89d46273$var$_eventFromRejectionWithPrimitive(reason) {\n return {\n exception: {\n values: [\n {\n type: \"UnhandledRejection\",\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: `Non-Error promise rejection captured with value: ${String(reason)}`\n }\n ]\n }\n };\n}\n/**\n * This function creates a stack from an old, error-less onerror handler.\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction $8ed96d1b89d46273$var$_eventFromIncompleteOnError(msg, url, line, column) {\n const ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n // If 'message' is ErrorEvent, get real message from inside\n let message = (0, $8cfrP.isErrorEvent)(msg) ? msg.message : msg;\n let name = \"Error\";\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n const event = {\n exception: {\n values: [\n {\n type: name,\n value: message\n }\n ]\n }\n };\n return $8ed96d1b89d46273$var$_enhanceEventWithInitialFrame(event, url, line, column);\n}\n/** JSDoc */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction $8ed96d1b89d46273$var$_enhanceEventWithInitialFrame(event, url, line, column) {\n // event.exception\n const e = event.exception = event.exception || {};\n // event.exception.values\n const ev = e.values = e.values || [];\n // event.exception.values[0]\n const ev0 = ev[0] = ev[0] || {};\n // event.exception.values[0].stacktrace\n const ev0s = ev0.stacktrace = ev0.stacktrace || {};\n // event.exception.values[0].stacktrace.frames\n const ev0sf = ev0s.frames = ev0s.frames || [];\n const colno = isNaN(parseInt(column, 10)) ? undefined : column;\n const lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n const filename = (0, $8cfrP.isString)(url) && url.length > 0 ? url : (0, $8SKxE.getLocationHref)();\n // event.exception.values[0].stacktrace.frames\n if (ev0sf.length === 0) ev0sf.push({\n colno: colno,\n filename: filename,\n function: \"?\",\n in_app: true,\n lineno: lineno\n });\n return event;\n}\nfunction $8ed96d1b89d46273$var$globalHandlerLog(type) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(`Global Handler attached: ${type}`);\n}\nfunction $8ed96d1b89d46273$var$addMechanismAndCapture(hub, error, event, type) {\n (0, $aZ9cG.addExceptionMechanism)(event, {\n handled: false,\n type: type\n });\n hub.captureEvent(event, {\n originalException: error\n });\n}\nfunction $8ed96d1b89d46273$var$getHubAndOptions() {\n const hub = (0, $1D41F.getCurrentHub)();\n const client = hub.getClient();\n const options = client && client.getOptions() || {\n stackParser: ()=>[],\n attachStacktrace: false\n };\n return [\n hub,\n options.stackParser,\n options.attachStacktrace\n ];\n}\n\n});\n\nparcelRegister(\"aQXYv\", function(module, exports) {\n\n$parcel$export(module.exports, \"TryCatch\", () => $7e6d4877388ba425$export$f1a018517668e6d3);\n\nvar $aCgU1 = parcelRequire(\"aCgU1\");\nvar $fxSvy = parcelRequire(\"fxSvy\");\n\nvar $ikSrI = parcelRequire(\"ikSrI\");\nconst $7e6d4877388ba425$var$DEFAULT_EVENT_TARGET = [\n \"EventTarget\",\n \"Window\",\n \"Node\",\n \"ApplicationCache\",\n \"AudioTrackList\",\n \"BroadcastChannel\",\n \"ChannelMergerNode\",\n \"CryptoOperation\",\n \"EventSource\",\n \"FileReader\",\n \"HTMLUnknownElement\",\n \"IDBDatabase\",\n \"IDBRequest\",\n \"IDBTransaction\",\n \"KeyOperation\",\n \"MediaController\",\n \"MessagePort\",\n \"ModalWindow\",\n \"Notification\",\n \"SVGElementInstance\",\n \"Screen\",\n \"SharedWorker\",\n \"TextTrack\",\n \"TextTrackCue\",\n \"TextTrackList\",\n \"WebSocket\",\n \"WebSocketWorker\",\n \"Worker\",\n \"XMLHttpRequest\",\n \"XMLHttpRequestEventTarget\",\n \"XMLHttpRequestUpload\"\n];\n/** Wrap timer functions and event targets to catch errors and provide better meta data */ class $7e6d4877388ba425$export$f1a018517668e6d3 {\n /**\n * @inheritDoc\n */ static __initStatic() {\n this.id = \"TryCatch\";\n }\n /**\n * @inheritDoc\n */ /** JSDoc */ /**\n * @inheritDoc\n */ constructor(options){\n this.name = $7e6d4877388ba425$export$f1a018517668e6d3.id;\n this._options = {\n XMLHttpRequest: true,\n eventTarget: true,\n requestAnimationFrame: true,\n setInterval: true,\n setTimeout: true,\n ...options\n };\n }\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */ setupOnce() {\n if (this._options.setTimeout) (0, $aCgU1.fill)((0, $ikSrI.WINDOW), \"setTimeout\", $7e6d4877388ba425$var$_wrapTimeFunction);\n if (this._options.setInterval) (0, $aCgU1.fill)((0, $ikSrI.WINDOW), \"setInterval\", $7e6d4877388ba425$var$_wrapTimeFunction);\n if (this._options.requestAnimationFrame) (0, $aCgU1.fill)((0, $ikSrI.WINDOW), \"requestAnimationFrame\", $7e6d4877388ba425$var$_wrapRAF);\n if (this._options.XMLHttpRequest && \"XMLHttpRequest\" in (0, $ikSrI.WINDOW)) (0, $aCgU1.fill)(XMLHttpRequest.prototype, \"send\", $7e6d4877388ba425$var$_wrapXHR);\n const eventTargetOption = this._options.eventTarget;\n if (eventTargetOption) {\n const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : $7e6d4877388ba425$var$DEFAULT_EVENT_TARGET;\n eventTarget.forEach($7e6d4877388ba425$var$_wrapEventTarget);\n }\n }\n}\n$7e6d4877388ba425$export$f1a018517668e6d3.__initStatic();\n/** JSDoc */ function $7e6d4877388ba425$var$_wrapTimeFunction(original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function(...args) {\n const originalCallback = args[0];\n args[0] = (0, $ikSrI.wrap)(originalCallback, {\n mechanism: {\n data: {\n function: (0, $fxSvy.getFunctionName)(original)\n },\n handled: false,\n type: \"instrument\"\n }\n });\n return original.apply(this, args);\n };\n}\n/** JSDoc */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction $7e6d4877388ba425$var$_wrapRAF(original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function(callback) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return original.apply(this, [\n (0, $ikSrI.wrap)(callback, {\n mechanism: {\n data: {\n function: \"requestAnimationFrame\",\n handler: (0, $fxSvy.getFunctionName)(original)\n },\n handled: false,\n type: \"instrument\"\n }\n })\n ]);\n };\n}\n/** JSDoc */ function $7e6d4877388ba425$var$_wrapXHR(originalSend) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function(...args) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const xmlHttpRequestProps = [\n \"onload\",\n \"onerror\",\n \"onprogress\",\n \"onreadystatechange\"\n ];\n xmlHttpRequestProps.forEach((prop)=>{\n if (prop in xhr && typeof xhr[prop] === \"function\") // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (0, $aCgU1.fill)(xhr, prop, function(original) {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: (0, $fxSvy.getFunctionName)(original)\n },\n handled: false,\n type: \"instrument\"\n }\n };\n // If Instrument integration has been called before TryCatch, get the name of original function\n const originalFunction = (0, $aCgU1.getOriginalFunction)(original);\n if (originalFunction) wrapOptions.mechanism.data.handler = (0, $fxSvy.getFunctionName)(originalFunction);\n // Otherwise wrap directly\n return (0, $ikSrI.wrap)(original, wrapOptions);\n });\n });\n return originalSend.apply(this, args);\n };\n}\n/** JSDoc */ function $7e6d4877388ba425$var$_wrapEventTarget(target) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const globalObject = (0, $ikSrI.WINDOW);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = globalObject[target] && globalObject[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty(\"addEventListener\")) return;\n (0, $aCgU1.fill)(proto, \"addEventListener\", function(original) {\n return function(// eslint-disable-next-line @typescript-eslint/no-explicit-any\n eventName, fn, options) {\n try {\n if (typeof fn.handleEvent === \"function\") // ESlint disable explanation:\n // First, it is generally safe to call `wrap` with an unbound function. Furthermore, using `.bind()` would\n // introduce a bug here, because bind returns a new function that doesn't have our\n // flags(like __sentry_original__) attached. `wrap` checks for those flags to avoid unnecessary wrapping.\n // Without those flags, every call to addEventListener wraps the function again, causing a memory leak.\n // eslint-disable-next-line @typescript-eslint/unbound-method\n fn.handleEvent = (0, $ikSrI.wrap)(fn.handleEvent, {\n mechanism: {\n data: {\n function: \"handleEvent\",\n handler: (0, $fxSvy.getFunctionName)(fn),\n target: target\n },\n handled: false,\n type: \"instrument\"\n }\n });\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n return original.apply(this, [\n eventName,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (0, $ikSrI.wrap)(fn, {\n mechanism: {\n data: {\n function: \"addEventListener\",\n handler: (0, $fxSvy.getFunctionName)(fn),\n target: target\n },\n handled: false,\n type: \"instrument\"\n }\n }),\n options\n ]);\n };\n });\n (0, $aCgU1.fill)(proto, \"removeEventListener\", function(originalRemoveEventListener) {\n return function(// eslint-disable-next-line @typescript-eslint/no-explicit-any\n eventName, fn, options) {\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */ const wrappedEventHandler = fn;\n try {\n const originalEventHandler = wrappedEventHandler && wrappedEventHandler.__sentry_wrapped__;\n if (originalEventHandler) originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);\n };\n });\n}\n\n});\n\nparcelRegister(\"ap2QB\", function(module, exports) {\n\n$parcel$export(module.exports, \"Breadcrumbs\", () => $792e729eaea52473$export$2dc68d50d56fbbd);\n\nvar $1D41F = parcelRequire(\"1D41F\");\n\nvar $8GNPF = parcelRequire(\"8GNPF\");\nvar $aZ9cG = parcelRequire(\"aZ9cG\");\nvar $8SKxE = parcelRequire(\"8SKxE\");\nvar $boFAr = parcelRequire(\"boFAr\");\nvar $iKY39 = parcelRequire(\"iKY39\");\nvar $6qV3U = parcelRequire(\"6qV3U\");\nvar $8WUsZ = parcelRequire(\"8WUsZ\");\n\nvar $ikSrI = parcelRequire(\"ikSrI\");\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */ /** maxStringLength gets capped to prevent 100 breadcrumbs exceeding 1MB event payload size */ const $792e729eaea52473$var$MAX_ALLOWED_STRING_LENGTH = 1024;\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */ class $792e729eaea52473$export$2dc68d50d56fbbd {\n /**\n * @inheritDoc\n */ static __initStatic() {\n this.id = \"Breadcrumbs\";\n }\n /**\n * @inheritDoc\n */ /**\n * Options of the breadcrumbs integration.\n */ // This field is public, because we use it in the browser client to check if the `sentry` option is enabled.\n /**\n * @inheritDoc\n */ constructor(options){\n this.name = $792e729eaea52473$export$2dc68d50d56fbbd.id;\n this.options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options\n };\n }\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */ setupOnce() {\n if (this.options.console) (0, $8GNPF.addInstrumentationHandler)(\"console\", $792e729eaea52473$var$_consoleBreadcrumb);\n if (this.options.dom) (0, $8GNPF.addInstrumentationHandler)(\"dom\", $792e729eaea52473$var$_domBreadcrumb(this.options.dom));\n if (this.options.xhr) (0, $8GNPF.addInstrumentationHandler)(\"xhr\", $792e729eaea52473$var$_xhrBreadcrumb);\n if (this.options.fetch) (0, $8GNPF.addInstrumentationHandler)(\"fetch\", $792e729eaea52473$var$_fetchBreadcrumb);\n if (this.options.history) (0, $8GNPF.addInstrumentationHandler)(\"history\", $792e729eaea52473$var$_historyBreadcrumb);\n if (this.options.sentry) {\n const client = (0, $1D41F.getCurrentHub)().getClient();\n client && client.on && client.on(\"beforeSendEvent\", $792e729eaea52473$var$addSentryBreadcrumb);\n }\n }\n}\n$792e729eaea52473$export$2dc68d50d56fbbd.__initStatic();\n/**\n * Adds a breadcrumb for Sentry events or transactions if this option is enabled.\n */ function $792e729eaea52473$var$addSentryBreadcrumb(event) {\n (0, $1D41F.getCurrentHub)().addBreadcrumb({\n category: `sentry.${event.type === \"transaction\" ? \"transaction\" : \"event\"}`,\n event_id: event.event_id,\n level: event.level,\n message: (0, $aZ9cG.getEventDescription)(event)\n }, {\n event: event\n });\n}\n/**\n * A HOC that creaes a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */ function $792e729eaea52473$var$_domBreadcrumb(dom) {\n function _innerDomBreadcrumb(handlerData) {\n let target;\n let keyAttrs = typeof dom === \"object\" ? dom.serializeAttribute : undefined;\n let maxStringLength = typeof dom === \"object\" && typeof dom.maxStringLength === \"number\" ? dom.maxStringLength : undefined;\n if (maxStringLength && maxStringLength > $792e729eaea52473$var$MAX_ALLOWED_STRING_LENGTH) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(`\\`dom.maxStringLength\\` cannot exceed ${$792e729eaea52473$var$MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${$792e729eaea52473$var$MAX_ALLOWED_STRING_LENGTH} instead.`);\n maxStringLength = $792e729eaea52473$var$MAX_ALLOWED_STRING_LENGTH;\n }\n if (typeof keyAttrs === \"string\") keyAttrs = [\n keyAttrs\n ];\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n const event = handlerData.event;\n target = $792e729eaea52473$var$_isEvent(event) ? (0, $8SKxE.htmlTreeAsString)(event.target, {\n keyAttrs: keyAttrs,\n maxStringLength: maxStringLength\n }) : (0, $8SKxE.htmlTreeAsString)(event, {\n keyAttrs: keyAttrs,\n maxStringLength: maxStringLength\n });\n } catch (e) {\n target = \"\";\n }\n if (target.length === 0) return;\n (0, $1D41F.getCurrentHub)().addBreadcrumb({\n category: `ui.${handlerData.name}`,\n message: target\n }, {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global\n });\n }\n return _innerDomBreadcrumb;\n}\n/**\n * Creates breadcrumbs from console API calls\n */ function $792e729eaea52473$var$_consoleBreadcrumb(handlerData) {\n const breadcrumb = {\n category: \"console\",\n data: {\n arguments: handlerData.args,\n logger: \"console\"\n },\n level: (0, $8WUsZ.severityLevelFromString)(handlerData.level),\n message: (0, $6qV3U.safeJoin)(handlerData.args, \" \")\n };\n if (handlerData.level === \"assert\") {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${(0, $6qV3U.safeJoin)(handlerData.args.slice(1), \" \") || \"console.assert\"}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else // Don't capture a breadcrumb for passed assertions\n return;\n }\n (0, $1D41F.getCurrentHub)().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level\n });\n}\n/**\n * Creates breadcrumbs from XHR API calls\n */ function $792e729eaea52473$var$_xhrBreadcrumb(handlerData) {\n const { startTimestamp: startTimestamp, endTimestamp: endTimestamp } = handlerData;\n const sentryXhrData = handlerData.xhr[0, $8GNPF.SENTRY_XHR_DATA_KEY];\n // We only capture complete, non-sentry requests\n if (!startTimestamp || !endTimestamp || !sentryXhrData) return;\n const { method: method, url: url, status_code: status_code, body: body } = sentryXhrData;\n const data = {\n method: method,\n url: url,\n status_code: status_code\n };\n const hint = {\n xhr: handlerData.xhr,\n input: body,\n startTimestamp: startTimestamp,\n endTimestamp: endTimestamp\n };\n (0, $1D41F.getCurrentHub)().addBreadcrumb({\n category: \"xhr\",\n data: data,\n type: \"http\"\n }, hint);\n}\n/**\n * Creates breadcrumbs from fetch API calls\n */ function $792e729eaea52473$var$_fetchBreadcrumb(handlerData) {\n const { startTimestamp: startTimestamp, endTimestamp: endTimestamp } = handlerData;\n // We only capture complete fetch requests\n if (!endTimestamp) return;\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === \"POST\") // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n if (handlerData.error) {\n const data = handlerData.fetchData;\n const hint = {\n data: handlerData.error,\n input: handlerData.args,\n startTimestamp: startTimestamp,\n endTimestamp: endTimestamp\n };\n (0, $1D41F.getCurrentHub)().addBreadcrumb({\n category: \"fetch\",\n data: data,\n level: \"error\",\n type: \"http\"\n }, hint);\n } else {\n const data = {\n ...handlerData.fetchData,\n status_code: handlerData.response && handlerData.response.status\n };\n const hint = {\n input: handlerData.args,\n response: handlerData.response,\n startTimestamp: startTimestamp,\n endTimestamp: endTimestamp\n };\n (0, $1D41F.getCurrentHub)().addBreadcrumb({\n category: \"fetch\",\n data: data,\n type: \"http\"\n }, hint);\n }\n}\n/**\n * Creates breadcrumbs from history API calls\n */ function $792e729eaea52473$var$_historyBreadcrumb(handlerData) {\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = (0, $iKY39.parseUrl)((0, $ikSrI.WINDOW).location.href);\n let parsedFrom = (0, $iKY39.parseUrl)(from);\n const parsedTo = (0, $iKY39.parseUrl)(to);\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) parsedFrom = parsedLoc;\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) to = parsedTo.relative;\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) from = parsedFrom.relative;\n (0, $1D41F.getCurrentHub)().addBreadcrumb({\n category: \"navigation\",\n data: {\n from: from,\n to: to\n }\n });\n}\nfunction $792e729eaea52473$var$_isEvent(event) {\n return !!event && !!event.target;\n}\n\n});\nparcelRegister(\"iKY39\", function(module, exports) {\n\n$parcel$export(module.exports, \"parseUrl\", () => $da7b1a819db558f8$export$7a5253c0f62e0150);\n$parcel$export(module.exports, \"stripUrlQueryAndFragment\", () => $da7b1a819db558f8$export$ce084c78234bd35);\n$parcel$export(module.exports, \"getNumberOfUrlSegments\", () => $da7b1a819db558f8$export$69dd85280a8d374c);\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */ function $da7b1a819db558f8$export$7a5253c0f62e0150(url) {\n if (!url) return {};\n const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n if (!match) return {};\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || \"\";\n const fragment = match[8] || \"\";\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n search: query,\n hash: fragment,\n relative: match[5] + query + fragment\n };\n}\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */ function $da7b1a819db558f8$export$ce084c78234bd35(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n}\n/**\n * Returns number of URL segments of a passed string URL.\n */ function $da7b1a819db558f8$export$69dd85280a8d374c(url) {\n // split at '/' or at '\\/' to split regex urls correctly\n return url.split(/\\\\?\\//).filter((s)=>s.length > 0 && s !== \",\").length;\n}\n/**\n * Takes a URL object and returns a sanitized string which is safe to use as span description\n * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data\n */ function $da7b1a819db558f8$export$e0ba26c9e23e1fe0(url) {\n const { protocol: protocol, host: host, path: path } = url;\n const filteredHost = host && host// Always filter out authority\n .replace(/^.*@/, \"[filtered]:[filtered]@\")// Don't show standard :80 (http) and :443 (https) ports to reduce the noise\n .replace(\":80\", \"\").replace(\":443\", \"\") || \"\";\n return `${protocol ? `${protocol}://` : \"\"}${filteredHost}${path}`;\n}\n\n});\n\nparcelRegister(\"8WUsZ\", function(module, exports) {\n\n$parcel$export(module.exports, \"severityLevelFromString\", () => $683f8a96b52a79a6$export$d771ef054122c30a);\n// Note: Ideally the `SeverityLevel` type would be derived from `validSeverityLevels`, but that would mean either\n//\n// a) moving `validSeverityLevels` to `@sentry/types`,\n// b) moving the`SeverityLevel` type here, or\n// c) importing `validSeverityLevels` from here into `@sentry/types`.\n//\n// Option A would make `@sentry/types` a runtime dependency of `@sentry/utils` (not good), and options B and C would\n// create a circular dependency between `@sentry/types` and `@sentry/utils` (also not good). So a TODO accompanying the\n// type, reminding anyone who changes it to change this list also, will have to do.\nconst $683f8a96b52a79a6$export$411d0ffdba845b6c = [\n \"fatal\",\n \"error\",\n \"warning\",\n \"log\",\n \"info\",\n \"debug\"\n];\n/**\n * Converts a string-based level into a member of the deprecated {@link Severity} enum.\n *\n * @deprecated `severityFromString` is deprecated. Please use `severityLevelFromString` instead.\n *\n * @param level String representation of Severity\n * @returns Severity\n */ function $683f8a96b52a79a6$export$e01cef29b4327697(level) {\n return $683f8a96b52a79a6$export$d771ef054122c30a(level);\n}\n/**\n * Converts a string-based level into a `SeverityLevel`, normalizing it along the way.\n *\n * @param level String representation of desired `SeverityLevel`.\n * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level.\n */ function $683f8a96b52a79a6$export$d771ef054122c30a(level) {\n return level === \"warn\" ? \"warning\" : $683f8a96b52a79a6$export$411d0ffdba845b6c.includes(level) ? level : \"log\";\n}\n\n});\n\n\nparcelRegister(\"lElMz\", function(module, exports) {\n\n$parcel$export(module.exports, \"LinkedErrors\", () => $fc2e3af0e52e68b5$export$8d1e60aaf616fb4f);\n\nvar $7qGRm = parcelRequire(\"7qGRm\");\n\nvar $kJZcO = parcelRequire(\"kJZcO\");\nconst $fc2e3af0e52e68b5$var$DEFAULT_KEY = \"cause\";\nconst $fc2e3af0e52e68b5$var$DEFAULT_LIMIT = 5;\n/** Adds SDK info to an event. */ class $fc2e3af0e52e68b5$export$8d1e60aaf616fb4f {\n /**\n * @inheritDoc\n */ static __initStatic() {\n this.id = \"LinkedErrors\";\n }\n /**\n * @inheritDoc\n */ /**\n * @inheritDoc\n */ /**\n * @inheritDoc\n */ /**\n * @inheritDoc\n */ constructor(options = {}){\n this.name = $fc2e3af0e52e68b5$export$8d1e60aaf616fb4f.id;\n this._key = options.key || $fc2e3af0e52e68b5$var$DEFAULT_KEY;\n this._limit = options.limit || $fc2e3af0e52e68b5$var$DEFAULT_LIMIT;\n }\n /** @inheritdoc */ setupOnce() {\n // noop\n }\n /**\n * @inheritDoc\n */ preprocessEvent(event, hint, client) {\n const options = client.getOptions();\n (0, $7qGRm.applyAggregateErrorsToEvent)((0, $kJZcO.exceptionFromError), options.stackParser, options.maxValueLength, this._key, this._limit, event, hint);\n }\n}\n$fc2e3af0e52e68b5$export$8d1e60aaf616fb4f.__initStatic();\n\n});\n\nparcelRegister(\"3CtSo\", function(module, exports) {\n\n$parcel$export(module.exports, \"HttpContext\", () => $2a2c18815a6144f5$export$5d2ee9a544b09a94);\n\nvar $ikSrI = parcelRequire(\"ikSrI\");\n/** HttpContext integration collects information about HTTP request headers */ class $2a2c18815a6144f5$export$5d2ee9a544b09a94 {\n /**\n * @inheritDoc\n */ static __initStatic() {\n this.id = \"HttpContext\";\n }\n /**\n * @inheritDoc\n */ constructor(){\n this.name = $2a2c18815a6144f5$export$5d2ee9a544b09a94.id;\n }\n /**\n * @inheritDoc\n */ setupOnce() {\n // noop\n }\n /** @inheritDoc */ preprocessEvent(event) {\n // if none of the information we want exists, don't bother\n if (!(0, $ikSrI.WINDOW).navigator && !(0, $ikSrI.WINDOW).location && !(0, $ikSrI.WINDOW).document) return;\n // grab as much info as exists and add it to the event\n const url = event.request && event.request.url || (0, $ikSrI.WINDOW).location && (0, $ikSrI.WINDOW).location.href;\n const { referrer: referrer } = (0, $ikSrI.WINDOW).document || {};\n const { userAgent: userAgent } = (0, $ikSrI.WINDOW).navigator || {};\n const headers = {\n ...event.request && event.request.headers,\n ...referrer && {\n Referer: referrer\n },\n ...userAgent && {\n \"User-Agent\": userAgent\n }\n };\n const request = {\n ...event.request,\n ...url && {\n url: url\n },\n headers: headers\n };\n event.request = request;\n }\n}\n$2a2c18815a6144f5$export$5d2ee9a544b09a94.__initStatic();\n\n});\n\nparcelRegister(\"dErZh\", function(module, exports) {\n\n$parcel$export(module.exports, \"Dedupe\", () => $9f04b87be0479eaa$export$688d98c249d31ad3);\n\nvar $boFAr = parcelRequire(\"boFAr\");\n/** Deduplication filter */ class $9f04b87be0479eaa$export$688d98c249d31ad3 {\n /**\n * @inheritDoc\n */ static __initStatic() {\n this.id = \"Dedupe\";\n }\n /**\n * @inheritDoc\n */ /**\n * @inheritDoc\n */ constructor(){\n this.name = $9f04b87be0479eaa$export$688d98c249d31ad3.id;\n }\n /** @inheritDoc */ setupOnce(_addGlobaleventProcessor, _getCurrentHub) {\n // noop\n }\n /**\n * @inheritDoc\n */ processEvent(currentEvent) {\n // We want to ignore any non-error type events, e.g. transactions or replays\n // These should never be deduped, and also not be compared against as _previousEvent.\n if (currentEvent.type) return currentEvent;\n // Juuust in case something goes wrong\n try {\n if ($9f04b87be0479eaa$var$_shouldDropEvent(currentEvent, this._previousEvent)) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(\"Event dropped due to being a duplicate of previously captured event.\");\n return null;\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n return this._previousEvent = currentEvent;\n }\n}\n$9f04b87be0479eaa$export$688d98c249d31ad3.__initStatic();\n/** JSDoc */ function $9f04b87be0479eaa$var$_shouldDropEvent(currentEvent, previousEvent) {\n if (!previousEvent) return false;\n if ($9f04b87be0479eaa$var$_isSameMessageEvent(currentEvent, previousEvent)) return true;\n if ($9f04b87be0479eaa$var$_isSameExceptionEvent(currentEvent, previousEvent)) return true;\n return false;\n}\n/** JSDoc */ function $9f04b87be0479eaa$var$_isSameMessageEvent(currentEvent, previousEvent) {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) return false;\n // If only one event has a stacktrace, but not the other one, they are not the same\n if (currentMessage && !previousMessage || !currentMessage && previousMessage) return false;\n if (currentMessage !== previousMessage) return false;\n if (!$9f04b87be0479eaa$var$_isSameFingerprint(currentEvent, previousEvent)) return false;\n if (!$9f04b87be0479eaa$var$_isSameStacktrace(currentEvent, previousEvent)) return false;\n return true;\n}\n/** JSDoc */ function $9f04b87be0479eaa$var$_isSameExceptionEvent(currentEvent, previousEvent) {\n const previousException = $9f04b87be0479eaa$var$_getExceptionFromEvent(previousEvent);\n const currentException = $9f04b87be0479eaa$var$_getExceptionFromEvent(currentEvent);\n if (!previousException || !currentException) return false;\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) return false;\n if (!$9f04b87be0479eaa$var$_isSameFingerprint(currentEvent, previousEvent)) return false;\n if (!$9f04b87be0479eaa$var$_isSameStacktrace(currentEvent, previousEvent)) return false;\n return true;\n}\n/** JSDoc */ function $9f04b87be0479eaa$var$_isSameStacktrace(currentEvent, previousEvent) {\n let currentFrames = $9f04b87be0479eaa$var$_getFramesFromEvent(currentEvent);\n let previousFrames = $9f04b87be0479eaa$var$_getFramesFromEvent(previousEvent);\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) return true;\n // If only one event has a stacktrace, but not the other one, they are not the same\n if (currentFrames && !previousFrames || !currentFrames && previousFrames) return false;\n currentFrames;\n previousFrames;\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) return false;\n // Otherwise, compare the two\n for(let i = 0; i < previousFrames.length; i++){\n const frameA = previousFrames[i];\n const frameB = currentFrames[i];\n if (frameA.filename !== frameB.filename || frameA.lineno !== frameB.lineno || frameA.colno !== frameB.colno || frameA.function !== frameB.function) return false;\n }\n return true;\n}\n/** JSDoc */ function $9f04b87be0479eaa$var$_isSameFingerprint(currentEvent, previousEvent) {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) return true;\n // If only one event has a fingerprint, but not the other one, they are not the same\n if (currentFingerprint && !previousFingerprint || !currentFingerprint && previousFingerprint) return false;\n currentFingerprint;\n previousFingerprint;\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join(\"\") === previousFingerprint.join(\"\"));\n } catch (_oO) {\n return false;\n }\n}\n/** JSDoc */ function $9f04b87be0479eaa$var$_getExceptionFromEvent(event) {\n return event.exception && event.exception.values && event.exception.values[0];\n}\n/** JSDoc */ function $9f04b87be0479eaa$var$_getFramesFromEvent(event) {\n const exception = event.exception;\n if (exception) try {\n // @ts-expect-error Object could be undefined\n return exception.values[0].stacktrace.frames;\n } catch (_oO) {\n return undefined;\n }\n return undefined;\n}\n\n});\n\nparcelRegister(\"l8ZBF\", function(module, exports) {\n\n$parcel$export(module.exports, \"defaultStackParser\", () => $f64a22202534c31a$export$2b2b997d81bf3907);\n\nvar $fxSvy = parcelRequire(\"fxSvy\");\n// global reference to slice\nconst $f64a22202534c31a$var$UNKNOWN_FUNCTION = \"?\";\nconst $f64a22202534c31a$var$OPERA10_PRIORITY = 10;\nconst $f64a22202534c31a$var$OPERA11_PRIORITY = 20;\nconst $f64a22202534c31a$var$CHROME_PRIORITY = 30;\nconst $f64a22202534c31a$var$WINJS_PRIORITY = 40;\nconst $f64a22202534c31a$var$GECKO_PRIORITY = 50;\nfunction $f64a22202534c31a$var$createFrame(filename, func, lineno, colno) {\n const frame = {\n filename: filename,\n function: func,\n in_app: true\n };\n if (lineno !== undefined) frame.lineno = lineno;\n if (colno !== undefined) frame.colno = colno;\n return frame;\n}\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nconst $f64a22202534c31a$var$chromeRegex = /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nconst $f64a22202534c31a$var$chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\nconst $f64a22202534c31a$var$chrome = (line)=>{\n const parts = $f64a22202534c31a$var$chromeRegex.exec(line);\n if (parts) {\n const isEval = parts[2] && parts[2].indexOf(\"eval\") === 0; // start of line\n if (isEval) {\n const subMatch = $f64a22202534c31a$var$chromeEvalRegex.exec(parts[2]);\n if (subMatch) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = subMatch[1]; // url\n parts[3] = subMatch[2]; // line\n parts[4] = subMatch[3]; // column\n }\n }\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n const [func, filename] = $f64a22202534c31a$var$extractSafariExtensionDetails(parts[1] || $f64a22202534c31a$var$UNKNOWN_FUNCTION, parts[2]);\n return $f64a22202534c31a$var$createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n }\n return;\n};\nconst $f64a22202534c31a$export$263a749fff749872 = [\n $f64a22202534c31a$var$CHROME_PRIORITY,\n $f64a22202534c31a$var$chrome\n];\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst $f64a22202534c31a$var$geckoREgex = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst $f64a22202534c31a$var$geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nconst $f64a22202534c31a$var$gecko = (line)=>{\n const parts = $f64a22202534c31a$var$geckoREgex.exec(line);\n if (parts) {\n const isEval = parts[3] && parts[3].indexOf(\" > eval\") > -1;\n if (isEval) {\n const subMatch = $f64a22202534c31a$var$geckoEvalRegex.exec(parts[3]);\n if (subMatch) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || \"eval\";\n parts[3] = subMatch[1];\n parts[4] = subMatch[2];\n parts[5] = \"\"; // no column when eval\n }\n }\n let filename = parts[3];\n let func = parts[1] || $f64a22202534c31a$var$UNKNOWN_FUNCTION;\n [func, filename] = $f64a22202534c31a$var$extractSafariExtensionDetails(func, filename);\n return $f64a22202534c31a$var$createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n }\n return;\n};\nconst $f64a22202534c31a$export$cdba47a5dd2804d = [\n $f64a22202534c31a$var$GECKO_PRIORITY,\n $f64a22202534c31a$var$gecko\n];\nconst $f64a22202534c31a$var$winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nconst $f64a22202534c31a$var$winjs = (line)=>{\n const parts = $f64a22202534c31a$var$winjsRegex.exec(line);\n return parts ? $f64a22202534c31a$var$createFrame(parts[2], parts[1] || $f64a22202534c31a$var$UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined) : undefined;\n};\nconst $f64a22202534c31a$export$179460296da408e8 = [\n $f64a22202534c31a$var$WINJS_PRIORITY,\n $f64a22202534c31a$var$winjs\n];\nconst $f64a22202534c31a$var$opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\nconst $f64a22202534c31a$var$opera10 = (line)=>{\n const parts = $f64a22202534c31a$var$opera10Regex.exec(line);\n return parts ? $f64a22202534c31a$var$createFrame(parts[2], parts[3] || $f64a22202534c31a$var$UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\nconst $f64a22202534c31a$export$f892b52c880ffc7a = [\n $f64a22202534c31a$var$OPERA10_PRIORITY,\n $f64a22202534c31a$var$opera10\n];\nconst $f64a22202534c31a$var$opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\nconst $f64a22202534c31a$var$opera11 = (line)=>{\n const parts = $f64a22202534c31a$var$opera11Regex.exec(line);\n return parts ? $f64a22202534c31a$var$createFrame(parts[5], parts[3] || parts[4] || $f64a22202534c31a$var$UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\nconst $f64a22202534c31a$export$af11af13f09fb0dc = [\n $f64a22202534c31a$var$OPERA11_PRIORITY,\n $f64a22202534c31a$var$opera11\n];\nconst $f64a22202534c31a$export$7197c0fe6554c079 = [\n $f64a22202534c31a$export$263a749fff749872,\n $f64a22202534c31a$export$cdba47a5dd2804d,\n $f64a22202534c31a$export$179460296da408e8\n];\nconst $f64a22202534c31a$export$2b2b997d81bf3907 = (0, $fxSvy.createStackParser)(...$f64a22202534c31a$export$7197c0fe6554c079);\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */ const $f64a22202534c31a$var$extractSafariExtensionDetails = (func, filename)=>{\n const isSafariExtension = func.indexOf(\"safari-extension\") !== -1;\n const isSafariWebExtension = func.indexOf(\"safari-web-extension\") !== -1;\n return isSafariExtension || isSafariWebExtension ? [\n func.indexOf(\"@\") !== -1 ? func.split(\"@\")[0] : $f64a22202534c31a$var$UNKNOWN_FUNCTION,\n isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`\n ] : [\n func,\n filename\n ];\n};\n\n});\n\nparcelRegister(\"kWGRK\", function(module, exports) {\n\n$parcel$export(module.exports, \"makeFetchTransport\", () => $f3fa79b9a4beedac$export$b2311068c46d7cc8);\n\nvar $igQ6w = parcelRequire(\"igQ6w\");\n\nvar $6SaPC = parcelRequire(\"6SaPC\");\n\nvar $5ZH6C = parcelRequire(\"5ZH6C\");\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */ function $f3fa79b9a4beedac$export$b2311068c46d7cc8(options, nativeFetch = (0, $5ZH6C.getNativeFetchImplementation)()) {\n let pendingBodySize = 0;\n let pendingCount = 0;\n function makeRequest(request) {\n const requestSize = request.body.length;\n pendingBodySize += requestSize;\n pendingCount++;\n const requestOptions = {\n body: request.body,\n method: \"POST\",\n referrerPolicy: \"origin\",\n headers: options.headers,\n // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n // frequently sending events right before the user is switching pages (eg. whenfinishing navigation transactions).\n // Gotchas:\n // - `keepalive` isn't supported by Firefox\n // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):\n // If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.\n // We will therefore only activate the flag when we're below that limit.\n // There is also a limit of requests that can be open at the same time, so we also limit this to 15\n // See https://github.com/getsentry/sentry-javascript/pull/7553 for details\n keepalive: pendingBodySize <= 60000 && pendingCount < 15,\n ...options.fetchOptions\n };\n try {\n return nativeFetch(options.url, requestOptions).then((response)=>{\n pendingBodySize -= requestSize;\n pendingCount--;\n return {\n statusCode: response.status,\n headers: {\n \"x-sentry-rate-limits\": response.headers.get(\"X-Sentry-Rate-Limits\"),\n \"retry-after\": response.headers.get(\"Retry-After\")\n }\n };\n });\n } catch (e) {\n (0, $5ZH6C.clearCachedFetchImplementation)();\n pendingBodySize -= requestSize;\n pendingCount--;\n return (0, $6SaPC.rejectedSyncPromise)(e);\n }\n }\n return (0, $igQ6w.createTransport)(options, makeRequest);\n}\n\n});\nparcelRegister(\"igQ6w\", function(module, exports) {\n\n$parcel$export(module.exports, \"createTransport\", () => $d4d2236f6e082fa6$export$d09f50d9ab7f7b69);\n\nvar $i4Z6l = parcelRequire(\"i4Z6l\");\nvar $4EjQ0 = parcelRequire(\"4EjQ0\");\nvar $boFAr = parcelRequire(\"boFAr\");\nvar $imGg5 = parcelRequire(\"imGg5\");\nvar $6SaPC = parcelRequire(\"6SaPC\");\nvar $3nsdT = parcelRequire(\"3nsdT\");\nconst $d4d2236f6e082fa6$export$e515cf6dfd2f98b8 = 30;\n/**\n * Creates an instance of a Sentry `Transport`\n *\n * @param options\n * @param makeRequest\n */ function $d4d2236f6e082fa6$export$d09f50d9ab7f7b69(options, makeRequest, buffer = (0, $imGg5.makePromiseBuffer)(options.bufferSize || $d4d2236f6e082fa6$export$e515cf6dfd2f98b8)) {\n let rateLimits = {};\n const flush = (timeout)=>buffer.drain(timeout);\n function send(envelope) {\n const filteredEnvelopeItems = [];\n // Drop rate limited items from envelope\n (0, $i4Z6l.forEachEnvelopeItem)(envelope, (item, type)=>{\n const envelopeItemDataCategory = (0, $i4Z6l.envelopeItemTypeToDataCategory)(type);\n if ((0, $4EjQ0.isRateLimited)(rateLimits, envelopeItemDataCategory)) {\n const event = $d4d2236f6e082fa6$var$getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent(\"ratelimit_backoff\", envelopeItemDataCategory, event);\n } else filteredEnvelopeItems.push(item);\n });\n // Skip sending if envelope is empty after filtering out rate limited events\n if (filteredEnvelopeItems.length === 0) return (0, $6SaPC.resolvedSyncPromise)();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const filteredEnvelope = (0, $i4Z6l.createEnvelope)(envelope[0], filteredEnvelopeItems);\n // Creates client report for each item in an envelope\n const recordEnvelopeLoss = (reason)=>{\n (0, $i4Z6l.forEachEnvelopeItem)(filteredEnvelope, (item, type)=>{\n const event = $d4d2236f6e082fa6$var$getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent(reason, (0, $i4Z6l.envelopeItemTypeToDataCategory)(type), event);\n });\n };\n const requestTask = ()=>makeRequest({\n body: (0, $i4Z6l.serializeEnvelope)(filteredEnvelope, options.textEncoder)\n }).then((response)=>{\n // We don't want to throw on NOK responses, but we want to at least log them\n if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n rateLimits = (0, $4EjQ0.updateRateLimits)(rateLimits, response);\n return response;\n }, (error)=>{\n recordEnvelopeLoss(\"network_error\");\n throw error;\n });\n return buffer.add(requestTask).then((result)=>result, (error)=>{\n if (error instanceof (0, $3nsdT.SentryError)) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(\"Skipped sending event because buffer is full.\");\n recordEnvelopeLoss(\"queue_overflow\");\n return (0, $6SaPC.resolvedSyncPromise)();\n } else throw error;\n });\n }\n // We use this to identifify if the transport is the base transport\n // TODO (v8): Remove this again as we'll no longer need it\n send.__sentry__baseTransport__ = true;\n return {\n send: send,\n flush: flush\n };\n}\nfunction $d4d2236f6e082fa6$var$getEventForEnvelopeItem(item, type) {\n if (type !== \"event\" && type !== \"transaction\") return undefined;\n return Array.isArray(item) ? item[1] : undefined;\n}\n\n});\nparcelRegister(\"4EjQ0\", function(module, exports) {\n\n$parcel$export(module.exports, \"isRateLimited\", () => $362a493cd541548f$export$6c91fec22056810a);\n$parcel$export(module.exports, \"updateRateLimits\", () => $362a493cd541548f$export$699aff705e0d49d4);\n// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend\nconst $362a493cd541548f$export$b09ce39faaeb1e7c = 60000; // 60 seconds\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param header string representation of 'Retry-After' header\n * @param now current unix timestamp\n *\n */ function $362a493cd541548f$export$615352e17ed7741(header, now = Date.now()) {\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) return headerDelay * 1000;\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) return headerDate - now;\n return $362a493cd541548f$export$b09ce39faaeb1e7c;\n}\n/**\n * Gets the time that the given category is disabled until for rate limiting.\n * In case no category-specific limit is set but a general rate limit across all categories is active,\n * that time is returned.\n *\n * @return the time in ms that the category is disabled until or 0 if there's no active rate limit.\n */ function $362a493cd541548f$export$b89fc7b2e4c799e7(limits, category) {\n return limits[category] || limits.all || 0;\n}\n/**\n * Checks if a category is rate limited\n */ function $362a493cd541548f$export$6c91fec22056810a(limits, category, now = Date.now()) {\n return $362a493cd541548f$export$b89fc7b2e4c799e7(limits, category) > now;\n}\n/**\n * Update ratelimits from incoming headers.\n *\n * @return the updated RateLimits object.\n */ function $362a493cd541548f$export$699aff705e0d49d4(limits, { statusCode: statusCode, headers: headers }, now = Date.now()) {\n const updatedRateLimits = {\n ...limits\n };\n // \"The name is case-insensitive.\"\n // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n const rateLimitHeader = headers && headers[\"x-sentry-rate-limits\"];\n const retryAfterHeader = headers && headers[\"retry-after\"];\n if (rateLimitHeader) /**\n * rate limit headers are of the form\n *
,
,..\n * where each
is of the form\n * : : : \n * where\n * is a delay in seconds\n * is the event type(s) (error, transaction, etc) being rate limited and is of the form\n * ;;...\n * is what's being limited (org, project, or key) - ignored by SDK\n * is an arbitrary string like \"org_quota\" - ignored by SDK\n */ for (const limit of rateLimitHeader.trim().split(\",\")){\n const [retryAfter, categories] = limit.split(\":\", 2);\n const headerDelay = parseInt(retryAfter, 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n if (!categories) updatedRateLimits.all = now + delay;\n else for (const category of categories.split(\";\"))updatedRateLimits[category] = now + delay;\n }\n else if (retryAfterHeader) updatedRateLimits.all = now + $362a493cd541548f$export$615352e17ed7741(retryAfterHeader, now);\n else if (statusCode === 429) updatedRateLimits.all = now + 60000;\n return updatedRateLimits;\n}\n\n});\n\nparcelRegister(\"imGg5\", function(module, exports) {\n\n$parcel$export(module.exports, \"makePromiseBuffer\", () => $d5eb0fb89c56fa57$export$85a4f67f852183e6);\n\nvar $3nsdT = parcelRequire(\"3nsdT\");\n\nvar $6SaPC = parcelRequire(\"6SaPC\");\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */ function $d5eb0fb89c56fa57$export$85a4f67f852183e6(limit) {\n const buffer = [];\n function isReady() {\n return limit === undefined || buffer.length < limit;\n }\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */ function remove(task) {\n return buffer.splice(buffer.indexOf(task), 1)[0];\n }\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task:\n * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */ function add(taskProducer) {\n if (!isReady()) return (0, $6SaPC.rejectedSyncPromise)(new (0, $3nsdT.SentryError)(\"Not adding Promise because buffer limit was reached.\"));\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (buffer.indexOf(task) === -1) buffer.push(task);\n task.then(()=>remove(task))// Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, ()=>remove(task).then(null, ()=>{\n // We have to add another catch here because `remove()` starts a new promise chain.\n }));\n return task;\n }\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */ function drain(timeout) {\n return new (0, $6SaPC.SyncPromise)((resolve, reject)=>{\n let counter = buffer.length;\n if (!counter) return resolve(true);\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(()=>{\n if (timeout && timeout > 0) resolve(false);\n }, timeout);\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach((item)=>{\n (0, $6SaPC.resolvedSyncPromise)(item).then(()=>{\n if (!--counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n return {\n $: buffer,\n add: add,\n drain: drain\n };\n}\n\n});\n\n\nparcelRegister(\"5ZH6C\", function(module, exports) {\n\n$parcel$export(module.exports, \"getNativeFetchImplementation\", () => $45d416244a3de8fc$export$8be2119ce08e3379);\n$parcel$export(module.exports, \"clearCachedFetchImplementation\", () => $45d416244a3de8fc$export$d499686d2dd738c6);\n\nvar $lQaUW = parcelRequire(\"lQaUW\");\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $ikSrI = parcelRequire(\"ikSrI\");\nlet $45d416244a3de8fc$var$cachedFetchImpl = undefined;\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */ function $45d416244a3de8fc$export$8be2119ce08e3379() {\n if ($45d416244a3de8fc$var$cachedFetchImpl) return $45d416244a3de8fc$var$cachedFetchImpl;\n /* eslint-disable @typescript-eslint/unbound-method */ // Fast path to avoid DOM I/O\n if ((0, $lQaUW.isNativeFetch)((0, $ikSrI.WINDOW).fetch)) return $45d416244a3de8fc$var$cachedFetchImpl = (0, $ikSrI.WINDOW).fetch.bind((0, $ikSrI.WINDOW));\n const document = (0, $ikSrI.WINDOW).document;\n let fetchImpl = (0, $ikSrI.WINDOW).fetch;\n // eslint-disable-next-line deprecation/deprecation\n if (document && typeof document.createElement === \"function\") try {\n const sandbox = document.createElement(\"iframe\");\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow.fetch) fetchImpl = contentWindow.fetch;\n document.head.removeChild(sandbox);\n } catch (e) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(\"Could not create sandbox iframe for pure fetch check, bailing to window.fetch: \", e);\n }\n return $45d416244a3de8fc$var$cachedFetchImpl = fetchImpl.bind((0, $ikSrI.WINDOW));\n/* eslint-enable @typescript-eslint/unbound-method */ }\n/** Clears cached fetch impl */ function $45d416244a3de8fc$export$d499686d2dd738c6() {\n $45d416244a3de8fc$var$cachedFetchImpl = undefined;\n}\n\n});\n\n\nparcelRegister(\"6Uiw0\", function(module, exports) {\n\n$parcel$export(module.exports, \"makeXHRTransport\", () => $507655c2edd18f55$export$5e1441cee30d5a39);\n\nvar $igQ6w = parcelRequire(\"igQ6w\");\n\nvar $6SaPC = parcelRequire(\"6SaPC\");\n/**\n * The DONE ready state for XmlHttpRequest\n *\n * Defining it here as a constant b/c XMLHttpRequest.DONE is not always defined\n * (e.g. during testing, it is `undefined`)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState}\n */ const $507655c2edd18f55$var$XHR_READYSTATE_DONE = 4;\n/**\n * Creates a Transport that uses the XMLHttpRequest API to send events to Sentry.\n */ function $507655c2edd18f55$export$5e1441cee30d5a39(options) {\n function makeRequest(request) {\n return new (0, $6SaPC.SyncPromise)((resolve, reject)=>{\n const xhr = new XMLHttpRequest();\n xhr.onerror = reject;\n xhr.onreadystatechange = ()=>{\n if (xhr.readyState === $507655c2edd18f55$var$XHR_READYSTATE_DONE) resolve({\n statusCode: xhr.status,\n headers: {\n \"x-sentry-rate-limits\": xhr.getResponseHeader(\"X-Sentry-Rate-Limits\"),\n \"retry-after\": xhr.getResponseHeader(\"Retry-After\")\n }\n });\n };\n xhr.open(\"POST\", options.url);\n for(const header in options.headers)if (Object.prototype.hasOwnProperty.call(options.headers, header)) xhr.setRequestHeader(header, options.headers[header]);\n xhr.send(request.body);\n });\n }\n return (0, $igQ6w.createTransport)(options, makeRequest);\n}\n\n});\n\n\nparcelRegister(\"6yg2u\", function(module, exports) {\n\n$parcel$export(module.exports, \"BrowserTracing\", () => $4c525c1ee72da3ec$export$46d3bbd0375f5fa4);\n\nvar $bD37U = parcelRequire(\"bD37U\");\nvar $cQrvJ = parcelRequire(\"cQrvJ\");\nvar $2okBR = parcelRequire(\"2okBR\");\nvar $eF6SP = parcelRequire(\"eF6SP\");\nvar $kIlbl = parcelRequire(\"kIlbl\");\nvar $iI7u6 = parcelRequire(\"iI7u6\");\nvar $9QK0o = parcelRequire(\"9QK0o\");\nvar $eqzpm = parcelRequire(\"eqzpm\");\nvar $6Em9x = parcelRequire(\"6Em9x\");\nvar $60Zur = parcelRequire(\"60Zur\");\nvar $1Q6St = parcelRequire(\"1Q6St\");\nvar $4bvNg = parcelRequire(\"4bvNg\");\nvar $lA9Ai = parcelRequire(\"lA9Ai\");\nvar $f0Fc8 = parcelRequire(\"f0Fc8\");\nvar $a2D5e = parcelRequire(\"a2D5e\");\nvar $19lWH = parcelRequire(\"19lWH\");\nvar $29dwI = parcelRequire(\"29dwI\");\nvar $iKY39 = parcelRequire(\"iKY39\");\nvar $jiipB = parcelRequire(\"jiipB\");\n// BrowserTracing is already exported as part of `Integrations` below (and for the moment will remain so for\n// backwards compatibility), but that interferes with treeshaking, so we also export it separately\n// here.\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `BrowserTracing` can be imported from `@sentry/browser` or your framework SDK\n *\n * import { BrowserTracing } from '@sentry/browser';\n * new BrowserTracing()\n */ const $4c525c1ee72da3ec$export$46d3bbd0375f5fa4 = (0, $2okBR.BrowserTracing);\n// BrowserTracing is already exported as part of `Integrations` below (and for the moment will remain so for\n// backwards compatibility), but that interferes with treeshaking, so we also export it separately\n// here.\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `BrowserTracing` can be imported from `@sentry/browser` or your framework SDK\n *\n * import { BrowserTracing } from '@sentry/browser';\n * new BrowserTracing()\n */ /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */ const $4c525c1ee72da3ec$export$5a20b45239a3c0a6 = (0, $bD37U.addExtensionMethods);\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `getActiveTransaction` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */ const $4c525c1ee72da3ec$export$a7feb32fdd923295 = (0, $9QK0o.getActiveTransaction);\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `extractTraceparentData` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */ const $4c525c1ee72da3ec$export$8e9a29865c0a1226 = (0, $iI7u6.extractTraceparentData);\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `spanStatusfromHttpCode` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */ const $4c525c1ee72da3ec$export$ac65c70d78fcdb55 = (0, $a2D5e.spanStatusfromHttpCode);\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `SpanStatusType` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */ /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `Transaction` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */ const $4c525c1ee72da3ec$export$febc5573c75cefb0 = (0, $jiipB.Transaction);\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `Transaction` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */ /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `Span` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */ const $4c525c1ee72da3ec$export$5f1714a13ed34c01 = (0, $a2D5e.Span);\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `Span` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */ /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */ const $4c525c1ee72da3ec$export$bbd2089f30bd3708 = (0, $2okBR.BROWSER_TRACING_INTEGRATION_ID);\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `defaultRequestInstrumentationOptions` can be imported from `@sentry/browser`, or your framework SDK\n */ const $4c525c1ee72da3ec$export$cc17fb3c0bc95cd7 = (0, $eF6SP.defaultRequestInstrumentationOptions);\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `hasTracingEnabled` can be imported from `@sentry/utils`\n */ const $4c525c1ee72da3ec$export$5008da00b1b6dee6 = (0, $6Em9x.hasTracingEnabled);\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `stripUrlQueryAndFragment` can be imported from `@sentry/utils`\n */ const $4c525c1ee72da3ec$export$ce084c78234bd35 = (0, $iKY39.stripUrlQueryAndFragment);\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `TRACEPARENT_REGEXP` can be imported from `@sentry/utils`\n */ const $4c525c1ee72da3ec$export$394a210812ba3012 = (0, $iI7u6.TRACEPARENT_REGEXP);\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */ const $4c525c1ee72da3ec$export$b279e6bd7040371f = (0, $60Zur.IdleTransaction);\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */ /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */ const $4c525c1ee72da3ec$export$864489cb3478db3e = (0, $eF6SP.instrumentOutgoingRequests);\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */ const $4c525c1ee72da3ec$export$479dbd817e392a4f = (0, $29dwI.startIdleTransaction);\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */ // eslint-disable-next-line deprecation/deprecation\nconst $4c525c1ee72da3ec$export$beb8e6a823e89c5d = (0, $19lWH.SpanStatus);\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */ // eslint-disable-next-line deprecation/deprecation\nconst $4c525c1ee72da3ec$export$99d02219d259eb94 = {\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `BrowserTracing` can be imported from `@sentry/browser` or your framework SDK\n *\n * import { BrowserTracing } from '@sentry/browser';\n * new BrowserTracing()\n */ // eslint-disable-next-line deprecation/deprecation\n BrowserTracing: $4c525c1ee72da3ec$export$46d3bbd0375f5fa4,\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `Apollo` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.Apollo({ ... })\n */ // eslint-disable-next-line deprecation/deprecation\n Apollo: (0, $cQrvJ.Apollo),\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `Express` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.Express({ ... })\n */ // eslint-disable-next-line deprecation/deprecation\n Express: (0, $kIlbl.Express),\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `GraphQL` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.GraphQL({ ... })\n */ // eslint-disable-next-line deprecation/deprecation\n GraphQL: (0, $eqzpm.GraphQL),\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `Mongo` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.Mongo({ ... })\n */ // eslint-disable-next-line deprecation/deprecation\n Mongo: (0, $1Q6St.Mongo),\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `Mysql` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.Mysql({ ... })\n */ // eslint-disable-next-line deprecation/deprecation\n Mysql: (0, $4bvNg.Mysql),\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `Postgres` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.Postgres({ ... })\n */ // eslint-disable-next-line deprecation/deprecation\n Postgres: (0, $lA9Ai.Postgres),\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `Prisma` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.Prisma({ ... })\n */ // eslint-disable-next-line deprecation/deprecation\n Prisma: (0, $f0Fc8.Prisma)\n};\n// Treeshakable guard to remove all code related to tracing\n// Guard for tree\nif (typeof __SENTRY_TRACING__ === \"undefined\" || __SENTRY_TRACING__) // We are patching the global object with our hub extension methods\n(0, $bD37U.addExtensionMethods)();\n\n});\nparcelRegister(\"bD37U\", function(module, exports) {\n\n$parcel$export(module.exports, \"addExtensionMethods\", () => addExtensionMethods);\n\nvar $29dwI = parcelRequire(\"29dwI\");\nvar $1D41F = parcelRequire(\"1D41F\");\n\nvar $ink2I = parcelRequire(\"ink2I\");\n/**\n * @private\n */ function _autoloadDatabaseIntegrations() {\n const carrier = (0, $1D41F.getMainCarrier)();\n if (!carrier.__SENTRY__) return;\n const packageToIntegrationMapping = {\n mongodb () {\n const integration = (0, $ink2I.dynamicRequire)(module, \"./node/integrations/mongo\");\n return new integration.Mongo();\n },\n mongoose () {\n const integration = (0, $ink2I.dynamicRequire)(module, \"./node/integrations/mongo\");\n return new integration.Mongo();\n },\n mysql () {\n const integration = (0, $ink2I.dynamicRequire)(module, \"./node/integrations/mysql\");\n return new integration.Mysql();\n },\n pg () {\n const integration = (0, $ink2I.dynamicRequire)(module, \"./node/integrations/postgres\");\n return new integration.Postgres();\n }\n };\n const mappedPackages = Object.keys(packageToIntegrationMapping).filter((moduleName)=>!!(0, $ink2I.loadModule)(moduleName)).map((pkg)=>{\n try {\n return packageToIntegrationMapping[pkg]();\n } catch (e) {\n return undefined;\n }\n }).filter((p)=>p);\n if (mappedPackages.length > 0) carrier.__SENTRY__.integrations = [\n ...carrier.__SENTRY__.integrations || [],\n ...mappedPackages\n ];\n}\n/**\n * This patches the global object and injects the Tracing extensions methods\n */ function addExtensionMethods() {\n (0, $29dwI.addTracingExtensions)();\n // Detect and automatically load specified integrations.\n if ((0, $ink2I.isNodeEnv)()) _autoloadDatabaseIntegrations();\n}\n\n});\nparcelRegister(\"29dwI\", function(module, exports) {\n\n$parcel$export(module.exports, \"startIdleTransaction\", () => $1906ea2bbf7221f7$export$479dbd817e392a4f);\n$parcel$export(module.exports, \"addTracingExtensions\", () => $1906ea2bbf7221f7$export$653d0ef2bad9cdf9);\n\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $1D41F = parcelRequire(\"1D41F\");\n\nvar $byAJR = parcelRequire(\"byAJR\");\n\nvar $60Zur = parcelRequire(\"60Zur\");\n\nvar $2gSGS = parcelRequire(\"2gSGS\");\n\nvar $jiipB = parcelRequire(\"jiipB\");\n/** Returns all trace headers that are currently on the top scope. */ function $1906ea2bbf7221f7$var$traceHeaders() {\n const scope = this.getScope();\n const span = scope.getSpan();\n return span ? {\n \"sentry-trace\": span.toTraceparent()\n } : {};\n}\n/**\n * Creates a new transaction and adds a sampling decision if it doesn't yet have one.\n *\n * The Hub.startTransaction method delegates to this method to do its work, passing the Hub instance in as `this`, as if\n * it had been called on the hub directly. Exists as a separate function so that it can be injected into the class as an\n * \"extension method.\"\n *\n * @param this: The Hub starting the transaction\n * @param transactionContext: Data used to configure the transaction\n * @param CustomSamplingContext: Optional data to be provided to the `tracesSampler` function (if any)\n *\n * @returns The new transaction\n *\n * @see {@link Hub.startTransaction}\n */ function $1906ea2bbf7221f7$var$_startTransaction(transactionContext, customSamplingContext) {\n const client = this.getClient();\n const options = client && client.getOptions() || {};\n const configInstrumenter = options.instrumenter || \"sentry\";\n const transactionInstrumenter = transactionContext.instrumenter || \"sentry\";\n if (configInstrumenter !== transactionInstrumenter) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(`A transaction was started with instrumenter=\\`${transactionInstrumenter}\\`, but the SDK is configured with the \\`${configInstrumenter}\\` instrumenter.\nThe transaction will not be sampled. Please use the ${configInstrumenter} instrumentation to start transactions.`);\n transactionContext.sampled = false;\n }\n let transaction = new (0, $jiipB.Transaction)(transactionContext, this);\n transaction = (0, $2gSGS.sampleTransaction)(transaction, options, {\n parentSampled: transactionContext.parentSampled,\n transactionContext: transactionContext,\n ...customSamplingContext\n });\n if (transaction.sampled) transaction.initSpanRecorder(options._experiments && options._experiments.maxSpans);\n if (client && client.emit) client.emit(\"startTransaction\", transaction);\n return transaction;\n}\n/**\n * Create new idle transaction.\n */ function $1906ea2bbf7221f7$export$479dbd817e392a4f(hub, transactionContext, idleTimeout, finalTimeout, onScope, customSamplingContext, heartbeatInterval) {\n const client = hub.getClient();\n const options = client && client.getOptions() || {};\n let transaction = new (0, $60Zur.IdleTransaction)(transactionContext, hub, idleTimeout, finalTimeout, heartbeatInterval, onScope);\n transaction = (0, $2gSGS.sampleTransaction)(transaction, options, {\n parentSampled: transactionContext.parentSampled,\n transactionContext: transactionContext,\n ...customSamplingContext\n });\n if (transaction.sampled) transaction.initSpanRecorder(options._experiments && options._experiments.maxSpans);\n if (client && client.emit) client.emit(\"startTransaction\", transaction);\n return transaction;\n}\n/**\n * Adds tracing extensions to the global hub.\n */ function $1906ea2bbf7221f7$export$653d0ef2bad9cdf9() {\n const carrier = (0, $1D41F.getMainCarrier)();\n if (!carrier.__SENTRY__) return;\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n if (!carrier.__SENTRY__.extensions.startTransaction) carrier.__SENTRY__.extensions.startTransaction = $1906ea2bbf7221f7$var$_startTransaction;\n if (!carrier.__SENTRY__.extensions.traceHeaders) carrier.__SENTRY__.extensions.traceHeaders = $1906ea2bbf7221f7$var$traceHeaders;\n (0, $byAJR.registerErrorInstrumentation)();\n}\n\n});\nparcelRegister(\"byAJR\", function(module, exports) {\n\n$parcel$export(module.exports, \"registerErrorInstrumentation\", () => $869f5e3c70ce3a16$export$637857c1d87b640c);\n\nvar $8GNPF = parcelRequire(\"8GNPF\");\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $9QK0o = parcelRequire(\"9QK0o\");\nlet $869f5e3c70ce3a16$var$errorsInstrumented = false;\n/**\n * Configures global error listeners\n */ function $869f5e3c70ce3a16$export$637857c1d87b640c() {\n if ($869f5e3c70ce3a16$var$errorsInstrumented) return;\n $869f5e3c70ce3a16$var$errorsInstrumented = true;\n (0, $8GNPF.addInstrumentationHandler)(\"error\", $869f5e3c70ce3a16$var$errorCallback);\n (0, $8GNPF.addInstrumentationHandler)(\"unhandledrejection\", $869f5e3c70ce3a16$var$errorCallback);\n}\n/**\n * If an error or unhandled promise occurs, we mark the active transaction as failed\n */ function $869f5e3c70ce3a16$var$errorCallback() {\n const activeTransaction = (0, $9QK0o.getActiveTransaction)();\n if (activeTransaction) {\n const status = \"internal_error\";\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(`[Tracing] Transaction: ${status} -> Global error occured`);\n activeTransaction.setStatus(status);\n }\n}\n// The function name will be lost when bundling but we need to be able to identify this listener later to maintain the\n// node.js default exit behaviour\n$869f5e3c70ce3a16$var$errorCallback.tag = \"sentry_tracingErrorCallback\";\n\n});\nparcelRegister(\"9QK0o\", function(module, exports) {\n\n$parcel$export(module.exports, \"getActiveTransaction\", () => $72bca8191f377eee$export$a7feb32fdd923295);\n\nvar $1D41F = parcelRequire(\"1D41F\");\n\n/** Grabs active transaction off scope, if any */ function $72bca8191f377eee$export$a7feb32fdd923295(maybeHub) {\n const hub = maybeHub || (0, $1D41F.getCurrentHub)();\n const scope = hub.getScope();\n return scope.getTransaction();\n}\n\n});\n\n\nparcelRegister(\"60Zur\", function(module, exports) {\n\n$parcel$export(module.exports, \"TRACING_DEFAULTS\", () => $461270d1452094f7$export$809a2b7987fd5306);\n$parcel$export(module.exports, \"IdleTransaction\", () => $461270d1452094f7$export$b279e6bd7040371f);\n\nvar $boFAr = parcelRequire(\"boFAr\");\nvar $hbZCn = parcelRequire(\"hbZCn\");\n\nvar $a2D5e = parcelRequire(\"a2D5e\");\n\nvar $jiipB = parcelRequire(\"jiipB\");\nconst $461270d1452094f7$export$809a2b7987fd5306 = {\n idleTimeout: 1000,\n finalTimeout: 30000,\n heartbeatInterval: 5000\n};\nconst $461270d1452094f7$var$FINISH_REASON_TAG = \"finishReason\";\nconst $461270d1452094f7$var$IDLE_TRANSACTION_FINISH_REASONS = [\n \"heartbeatFailed\",\n \"idleTimeout\",\n \"documentHidden\",\n \"finalTimeout\",\n \"externalFinish\",\n \"cancelled\"\n];\n/**\n * @inheritDoc\n */ class $461270d1452094f7$export$370d6113c18ba86c extends (0, $a2D5e.SpanRecorder) {\n constructor(_pushActivity, _popActivity, transactionSpanId, maxlen){\n super(maxlen);\n this._pushActivity = _pushActivity;\n this._popActivity = _popActivity;\n this.transactionSpanId = transactionSpanId;\n }\n /**\n * @inheritDoc\n */ add(span) {\n // We should make sure we do not push and pop activities for\n // the transaction that this span recorder belongs to.\n if (span.spanId !== this.transactionSpanId) {\n // We patch span.finish() to pop an activity after setting an endTimestamp.\n span.finish = (endTimestamp)=>{\n span.endTimestamp = typeof endTimestamp === \"number\" ? endTimestamp : (0, $hbZCn.timestampInSeconds)();\n this._popActivity(span.spanId);\n };\n // We should only push new activities if the span does not have an end timestamp.\n if (span.endTimestamp === undefined) this._pushActivity(span.spanId);\n }\n super.add(span);\n }\n}\n/**\n * An IdleTransaction is a transaction that automatically finishes. It does this by tracking child spans as activities.\n * You can have multiple IdleTransactions active, but if the `onScope` option is specified, the idle transaction will\n * put itself on the scope on creation.\n */ class $461270d1452094f7$export$b279e6bd7040371f extends (0, $jiipB.Transaction) {\n // Activities store a list of active spans\n // Track state of activities in previous heartbeat\n // Amount of times heartbeat has counted. Will cause transaction to finish after 3 beats.\n // We should not use heartbeat if we finished a transaction\n // Idle timeout was canceled and we should finish the transaction with the last span end.\n /**\n * Timer that tracks Transaction idleTimeout\n */ constructor(transactionContext, _idleHub, /**\n * The time to wait in ms until the idle transaction will be finished. This timer is started each time\n * there are no active spans on this transaction.\n */ _idleTimeout = $461270d1452094f7$export$809a2b7987fd5306.idleTimeout, /**\n * The final value in ms that a transaction cannot exceed\n */ _finalTimeout = $461270d1452094f7$export$809a2b7987fd5306.finalTimeout, _heartbeatInterval = $461270d1452094f7$export$809a2b7987fd5306.heartbeatInterval, // Whether or not the transaction should put itself on the scope when it starts and pop itself off when it ends\n _onScope = false){\n super(transactionContext, _idleHub);\n this._idleHub = _idleHub;\n this._idleTimeout = _idleTimeout;\n this._finalTimeout = _finalTimeout;\n this._heartbeatInterval = _heartbeatInterval;\n this._onScope = _onScope;\n this.activities = {};\n this._heartbeatCounter = 0;\n this._finished = false;\n this._idleTimeoutCanceledPermanently = false;\n this._beforeFinishCallbacks = [];\n this._finishReason = $461270d1452094f7$var$IDLE_TRANSACTION_FINISH_REASONS[4];\n if (_onScope) {\n // We set the transaction here on the scope so error events pick up the trace\n // context and attach it to the error.\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(`Setting idle transaction on scope. Span ID: ${this.spanId}`);\n _idleHub.configureScope((scope)=>scope.setSpan(this));\n }\n this._restartIdleTimeout();\n setTimeout(()=>{\n if (!this._finished) {\n this.setStatus(\"deadline_exceeded\");\n this._finishReason = $461270d1452094f7$var$IDLE_TRANSACTION_FINISH_REASONS[3];\n this.finish();\n }\n }, this._finalTimeout);\n }\n /** {@inheritDoc} */ finish(endTimestamp = (0, $hbZCn.timestampInSeconds)()) {\n this._finished = true;\n this.activities = {};\n if (this.op === \"ui.action.click\") this.setTag($461270d1452094f7$var$FINISH_REASON_TAG, this._finishReason);\n if (this.spanRecorder) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"[Tracing] finishing IdleTransaction\", new Date(endTimestamp * 1000).toISOString(), this.op);\n for (const callback of this._beforeFinishCallbacks)callback(this, endTimestamp);\n this.spanRecorder.spans = this.spanRecorder.spans.filter((span)=>{\n // If we are dealing with the transaction itself, we just return it\n if (span.spanId === this.spanId) return true;\n // We cancel all pending spans with status \"cancelled\" to indicate the idle transaction was finished early\n if (!span.endTimestamp) {\n span.endTimestamp = endTimestamp;\n span.setStatus(\"cancelled\");\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"[Tracing] cancelling span since transaction ended early\", JSON.stringify(span, undefined, 2));\n }\n const spanStartedBeforeTransactionFinish = span.startTimestamp < endTimestamp;\n // Add a delta with idle timeout so that we prevent false positives\n const timeoutWithMarginOfError = (this._finalTimeout + this._idleTimeout) / 1000;\n const spanEndedBeforeFinalTimeout = span.endTimestamp - this.startTimestamp < timeoutWithMarginOfError;\n if (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) {\n const stringifiedSpan = JSON.stringify(span, undefined, 2);\n if (!spanStartedBeforeTransactionFinish) (0, $boFAr.logger).log(\"[Tracing] discarding Span since it happened after Transaction was finished\", stringifiedSpan);\n else if (!spanEndedBeforeFinalTimeout) (0, $boFAr.logger).log(\"[Tracing] discarding Span since it finished after Transaction final timeout\", stringifiedSpan);\n }\n return spanStartedBeforeTransactionFinish && spanEndedBeforeFinalTimeout;\n });\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"[Tracing] flushing IdleTransaction\");\n } else (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"[Tracing] No active IdleTransaction\");\n // if `this._onScope` is `true`, the transaction put itself on the scope when it started\n if (this._onScope) {\n const scope = this._idleHub.getScope();\n if (scope.getTransaction() === this) scope.setSpan(undefined);\n }\n return super.finish(endTimestamp);\n }\n /**\n * Register a callback function that gets excecuted before the transaction finishes.\n * Useful for cleanup or if you want to add any additional spans based on current context.\n *\n * This is exposed because users have no other way of running something before an idle transaction\n * finishes.\n */ registerBeforeFinishCallback(callback) {\n this._beforeFinishCallbacks.push(callback);\n }\n /**\n * @inheritDoc\n */ initSpanRecorder(maxlen) {\n if (!this.spanRecorder) {\n const pushActivity = (id)=>{\n if (this._finished) return;\n this._pushActivity(id);\n };\n const popActivity = (id)=>{\n if (this._finished) return;\n this._popActivity(id);\n };\n this.spanRecorder = new $461270d1452094f7$export$370d6113c18ba86c(pushActivity, popActivity, this.spanId, maxlen);\n // Start heartbeat so that transactions do not run forever.\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"Starting heartbeat\");\n this._pingHeartbeat();\n }\n this.spanRecorder.add(this);\n }\n /**\n * Cancels the existing idle timeout, if there is one.\n * @param restartOnChildSpanChange Default is `true`.\n * If set to false the transaction will end\n * with the last child span.\n */ cancelIdleTimeout(endTimestamp, { restartOnChildSpanChange: restartOnChildSpanChange } = {\n restartOnChildSpanChange: true\n }) {\n this._idleTimeoutCanceledPermanently = restartOnChildSpanChange === false;\n if (this._idleTimeoutID) {\n clearTimeout(this._idleTimeoutID);\n this._idleTimeoutID = undefined;\n if (Object.keys(this.activities).length === 0 && this._idleTimeoutCanceledPermanently) {\n this._finishReason = $461270d1452094f7$var$IDLE_TRANSACTION_FINISH_REASONS[5];\n this.finish(endTimestamp);\n }\n }\n }\n /**\n * Temporary method used to externally set the transaction's `finishReason`\n *\n * ** WARNING**\n * This is for the purpose of experimentation only and will be removed in the near future, do not use!\n *\n * @internal\n *\n */ setFinishReason(reason) {\n this._finishReason = reason;\n }\n /**\n * Restarts idle timeout, if there is no running idle timeout it will start one.\n */ _restartIdleTimeout(endTimestamp) {\n this.cancelIdleTimeout();\n this._idleTimeoutID = setTimeout(()=>{\n if (!this._finished && Object.keys(this.activities).length === 0) {\n this._finishReason = $461270d1452094f7$var$IDLE_TRANSACTION_FINISH_REASONS[1];\n this.finish(endTimestamp);\n }\n }, this._idleTimeout);\n }\n /**\n * Start tracking a specific activity.\n * @param spanId The span id that represents the activity\n */ _pushActivity(spanId) {\n this.cancelIdleTimeout(undefined, {\n restartOnChildSpanChange: !this._idleTimeoutCanceledPermanently\n });\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(`[Tracing] pushActivity: ${spanId}`);\n this.activities[spanId] = true;\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"[Tracing] new activities count\", Object.keys(this.activities).length);\n }\n /**\n * Remove an activity from usage\n * @param spanId The span id that represents the activity\n */ _popActivity(spanId) {\n if (this.activities[spanId]) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(`[Tracing] popActivity ${spanId}`);\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this.activities[spanId];\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"[Tracing] new activities count\", Object.keys(this.activities).length);\n }\n if (Object.keys(this.activities).length === 0) {\n const endTimestamp = (0, $hbZCn.timestampInSeconds)();\n if (this._idleTimeoutCanceledPermanently) {\n this._finishReason = $461270d1452094f7$var$IDLE_TRANSACTION_FINISH_REASONS[5];\n this.finish(endTimestamp);\n } else // We need to add the timeout here to have the real endtimestamp of the transaction\n // Remember timestampInSeconds is in seconds, timeout is in ms\n this._restartIdleTimeout(endTimestamp + this._idleTimeout / 1000);\n }\n }\n /**\n * Checks when entries of this.activities are not changing for 3 beats.\n * If this occurs we finish the transaction.\n */ _beat() {\n // We should not be running heartbeat if the idle transaction is finished.\n if (this._finished) return;\n const heartbeatString = Object.keys(this.activities).join(\"\");\n if (heartbeatString === this._prevHeartbeatString) this._heartbeatCounter++;\n else this._heartbeatCounter = 1;\n this._prevHeartbeatString = heartbeatString;\n if (this._heartbeatCounter >= 3) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"[Tracing] Transaction finished because of no change for 3 heart beats\");\n this.setStatus(\"deadline_exceeded\");\n this._finishReason = $461270d1452094f7$var$IDLE_TRANSACTION_FINISH_REASONS[0];\n this.finish();\n } else this._pingHeartbeat();\n }\n /**\n * Pings the heartbeat\n */ _pingHeartbeat() {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`);\n setTimeout(()=>{\n this._beat();\n }, this._heartbeatInterval);\n }\n}\n\n});\nparcelRegister(\"a2D5e\", function(module, exports) {\n\n$parcel$export(module.exports, \"SpanRecorder\", () => $74f868682f73a5ea$export$10c95c129cd0d4fe);\n$parcel$export(module.exports, \"Span\", () => $74f868682f73a5ea$export$5f1714a13ed34c01);\n$parcel$export(module.exports, \"spanStatusfromHttpCode\", () => $74f868682f73a5ea$export$ac65c70d78fcdb55);\n\nvar $aCgU1 = parcelRequire(\"aCgU1\");\nvar $iI7u6 = parcelRequire(\"iI7u6\");\nvar $boFAr = parcelRequire(\"boFAr\");\nvar $hbZCn = parcelRequire(\"hbZCn\");\nvar $aZ9cG = parcelRequire(\"aZ9cG\");\n/**\n * Keeps track of finished spans for a given transaction\n * @internal\n * @hideconstructor\n * @hidden\n */ class $74f868682f73a5ea$export$10c95c129cd0d4fe {\n constructor(maxlen = 1000){\n this._maxlen = maxlen;\n this.spans = [];\n }\n /**\n * This is just so that we don't run out of memory while recording a lot\n * of spans. At some point we just stop and flush out the start of the\n * trace tree (i.e.the first n spans with the smallest\n * start_timestamp).\n */ add(span) {\n if (this.spans.length > this._maxlen) span.spanRecorder = undefined;\n else this.spans.push(span);\n }\n}\n/**\n * Span contains all data about a span\n */ class $74f868682f73a5ea$export$5f1714a13ed34c01 {\n /**\n * @inheritDoc\n */ /**\n * @inheritDoc\n */ /**\n * @inheritDoc\n */ /**\n * Internal keeper of the status\n */ /**\n * @inheritDoc\n */ /**\n * Timestamp in seconds when the span was created.\n */ /**\n * Timestamp in seconds when the span ended.\n */ /**\n * @inheritDoc\n */ /**\n * @inheritDoc\n */ /**\n * @inheritDoc\n */ /**\n * @inheritDoc\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\n /**\n * List of spans that were finalized\n */ /**\n * @inheritDoc\n */ /**\n * The instrumenter that created this span.\n */ /**\n * The origin of the span, giving context about what created the span.\n */ /**\n * You should never call the constructor manually, always use `Sentry.startTransaction()`\n * or call `startChild()` on an existing span.\n * @internal\n * @hideconstructor\n * @hidden\n */ constructor(spanContext = {}){\n this.traceId = spanContext.traceId || (0, $aZ9cG.uuid4)();\n this.spanId = spanContext.spanId || (0, $aZ9cG.uuid4)().substring(16);\n this.startTimestamp = spanContext.startTimestamp || (0, $hbZCn.timestampInSeconds)();\n this.tags = spanContext.tags || {};\n this.data = spanContext.data || {};\n this.instrumenter = spanContext.instrumenter || \"sentry\";\n this.origin = spanContext.origin || \"manual\";\n if (spanContext.parentSpanId) this.parentSpanId = spanContext.parentSpanId;\n // We want to include booleans as well here\n if (\"sampled\" in spanContext) this.sampled = spanContext.sampled;\n if (spanContext.op) this.op = spanContext.op;\n if (spanContext.description) this.description = spanContext.description;\n if (spanContext.name) this.description = spanContext.name;\n if (spanContext.status) this.status = spanContext.status;\n if (spanContext.endTimestamp) this.endTimestamp = spanContext.endTimestamp;\n }\n /** An alias for `description` of the Span. */ get name() {\n return this.description || \"\";\n }\n /** Update the name of the span. */ set name(name) {\n this.setName(name);\n }\n /**\n * @inheritDoc\n */ startChild(spanContext) {\n const childSpan = new $74f868682f73a5ea$export$5f1714a13ed34c01({\n ...spanContext,\n parentSpanId: this.spanId,\n sampled: this.sampled,\n traceId: this.traceId\n });\n childSpan.spanRecorder = this.spanRecorder;\n if (childSpan.spanRecorder) childSpan.spanRecorder.add(childSpan);\n childSpan.transaction = this.transaction;\n if ((typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && childSpan.transaction) {\n const opStr = spanContext && spanContext.op || \"< unknown op >\";\n const nameStr = childSpan.transaction.name || \"< unknown name >\";\n const idStr = childSpan.transaction.spanId;\n const logMessage = `[Tracing] Starting '${opStr}' span on transaction '${nameStr}' (${idStr}).`;\n childSpan.transaction.metadata.spanMetadata[childSpan.spanId] = {\n logMessage: logMessage\n };\n (0, $boFAr.logger).log(logMessage);\n }\n return childSpan;\n }\n /**\n * @inheritDoc\n */ setTag(key, value) {\n this.tags = {\n ...this.tags,\n [key]: value\n };\n return this;\n }\n /**\n * @inheritDoc\n */ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n setData(key, value) {\n this.data = {\n ...this.data,\n [key]: value\n };\n return this;\n }\n /**\n * @inheritDoc\n */ setStatus(value) {\n this.status = value;\n return this;\n }\n /**\n * @inheritDoc\n */ setHttpStatus(httpStatus) {\n this.setTag(\"http.status_code\", String(httpStatus));\n this.setData(\"http.response.status_code\", httpStatus);\n const spanStatus = $74f868682f73a5ea$export$ac65c70d78fcdb55(httpStatus);\n if (spanStatus !== \"unknown_error\") this.setStatus(spanStatus);\n return this;\n }\n /**\n * @inheritDoc\n */ setName(name) {\n this.description = name;\n }\n /**\n * @inheritDoc\n */ isSuccess() {\n return this.status === \"ok\";\n }\n /**\n * @inheritDoc\n */ finish(endTimestamp) {\n if ((typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && // Don't call this for transactions\n this.transaction && this.transaction.spanId !== this.spanId) {\n const { logMessage: logMessage } = this.transaction.metadata.spanMetadata[this.spanId];\n if (logMessage) (0, $boFAr.logger).log(logMessage.replace(\"Starting\", \"Finishing\"));\n }\n this.endTimestamp = typeof endTimestamp === \"number\" ? endTimestamp : (0, $hbZCn.timestampInSeconds)();\n }\n /**\n * @inheritDoc\n */ toTraceparent() {\n return (0, $iI7u6.generateSentryTraceHeader)(this.traceId, this.spanId, this.sampled);\n }\n /**\n * @inheritDoc\n */ toContext() {\n return (0, $aCgU1.dropUndefinedKeys)({\n data: this.data,\n description: this.description,\n endTimestamp: this.endTimestamp,\n op: this.op,\n parentSpanId: this.parentSpanId,\n sampled: this.sampled,\n spanId: this.spanId,\n startTimestamp: this.startTimestamp,\n status: this.status,\n tags: this.tags,\n traceId: this.traceId\n });\n }\n /**\n * @inheritDoc\n */ updateWithContext(spanContext) {\n this.data = spanContext.data || {};\n this.description = spanContext.description;\n this.endTimestamp = spanContext.endTimestamp;\n this.op = spanContext.op;\n this.parentSpanId = spanContext.parentSpanId;\n this.sampled = spanContext.sampled;\n this.spanId = spanContext.spanId || this.spanId;\n this.startTimestamp = spanContext.startTimestamp || this.startTimestamp;\n this.status = spanContext.status;\n this.tags = spanContext.tags || {};\n this.traceId = spanContext.traceId || this.traceId;\n return this;\n }\n /**\n * @inheritDoc\n */ getTraceContext() {\n return (0, $aCgU1.dropUndefinedKeys)({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n trace_id: this.traceId,\n origin: this.origin\n });\n }\n /**\n * @inheritDoc\n */ toJSON() {\n return (0, $aCgU1.dropUndefinedKeys)({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n start_timestamp: this.startTimestamp,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n timestamp: this.endTimestamp,\n trace_id: this.traceId,\n origin: this.origin\n });\n }\n}\n/**\n * Converts a HTTP status code into a {@link SpanStatusType}.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or unknown_error.\n */ function $74f868682f73a5ea$export$ac65c70d78fcdb55(httpStatus) {\n if (httpStatus < 400 && httpStatus >= 100) return \"ok\";\n if (httpStatus >= 400 && httpStatus < 500) switch(httpStatus){\n case 401:\n return \"unauthenticated\";\n case 403:\n return \"permission_denied\";\n case 404:\n return \"not_found\";\n case 409:\n return \"already_exists\";\n case 413:\n return \"failed_precondition\";\n case 429:\n return \"resource_exhausted\";\n default:\n return \"invalid_argument\";\n }\n if (httpStatus >= 500 && httpStatus < 600) switch(httpStatus){\n case 501:\n return \"unimplemented\";\n case 503:\n return \"unavailable\";\n case 504:\n return \"deadline_exceeded\";\n default:\n return \"internal_error\";\n }\n return \"unknown_error\";\n}\n\n});\nparcelRegister(\"iI7u6\", function(module, exports) {\n\n$parcel$export(module.exports, \"TRACEPARENT_REGEXP\", () => $d9f2245613a34f82$export$394a210812ba3012);\n$parcel$export(module.exports, \"extractTraceparentData\", () => $d9f2245613a34f82$export$8e9a29865c0a1226);\n$parcel$export(module.exports, \"tracingContextFromHeaders\", () => $d9f2245613a34f82$export$ca5c066532785b6e);\n$parcel$export(module.exports, \"generateSentryTraceHeader\", () => $d9f2245613a34f82$export$f35d907436da45cf);\n\nvar $1s9A9 = parcelRequire(\"1s9A9\");\n\nvar $aZ9cG = parcelRequire(\"aZ9cG\");\nconst $d9f2245613a34f82$export$394a210812ba3012 = new RegExp(\"^[ \\\\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\\\t]*$\");\n/**\n * Extract transaction context data from a `sentry-trace` header.\n *\n * @param traceparent Traceparent string\n *\n * @returns Object containing data from the header, or undefined if traceparent string is malformed\n */ function $d9f2245613a34f82$export$8e9a29865c0a1226(traceparent) {\n if (!traceparent) return undefined;\n const matches = traceparent.match($d9f2245613a34f82$export$394a210812ba3012);\n if (!matches) return undefined;\n let parentSampled;\n if (matches[3] === \"1\") parentSampled = true;\n else if (matches[3] === \"0\") parentSampled = false;\n return {\n traceId: matches[1],\n parentSampled: parentSampled,\n parentSpanId: matches[2]\n };\n}\n/**\n * Create tracing context from incoming headers.\n */ function $d9f2245613a34f82$export$ca5c066532785b6e(sentryTrace, baggage) {\n const traceparentData = $d9f2245613a34f82$export$8e9a29865c0a1226(sentryTrace);\n const dynamicSamplingContext = (0, $1s9A9.baggageHeaderToDynamicSamplingContext)(baggage);\n const { traceId: traceId, parentSpanId: parentSpanId, parentSampled: parentSampled } = traceparentData || {};\n const propagationContext = {\n traceId: traceId || (0, $aZ9cG.uuid4)(),\n spanId: (0, $aZ9cG.uuid4)().substring(16),\n sampled: parentSampled\n };\n if (parentSpanId) propagationContext.parentSpanId = parentSpanId;\n if (dynamicSamplingContext) propagationContext.dsc = dynamicSamplingContext;\n return {\n traceparentData: traceparentData,\n dynamicSamplingContext: dynamicSamplingContext,\n propagationContext: propagationContext\n };\n}\n/**\n * Create sentry-trace header from span context values.\n */ function $d9f2245613a34f82$export$f35d907436da45cf(traceId = (0, $aZ9cG.uuid4)(), spanId = (0, $aZ9cG.uuid4)().substring(16), sampled) {\n let sampledString = \"\";\n if (sampled !== undefined) sampledString = sampled ? \"-1\" : \"-0\";\n return `${traceId}-${spanId}${sampledString}`;\n}\n\n});\nparcelRegister(\"1s9A9\", function(module, exports) {\n\n$parcel$export(module.exports, \"BAGGAGE_HEADER_NAME\", () => $10efd6cb1115e979$export$9ca9946bd449ac06);\n$parcel$export(module.exports, \"baggageHeaderToDynamicSamplingContext\", () => $10efd6cb1115e979$export$5b96ee2c8421f107);\n$parcel$export(module.exports, \"dynamicSamplingContextToSentryBaggageHeader\", () => $10efd6cb1115e979$export$56766feef403f365);\n\nvar $8cfrP = parcelRequire(\"8cfrP\");\n\nvar $boFAr = parcelRequire(\"boFAr\");\nconst $10efd6cb1115e979$export$9ca9946bd449ac06 = \"baggage\";\nconst $10efd6cb1115e979$export$6e69537d67fa20f = \"sentry-\";\nconst $10efd6cb1115e979$export$eb0401070c617ea5 = /^sentry-/;\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */ const $10efd6cb1115e979$export$bdd844ddb2def819 = 8192;\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */ function $10efd6cb1115e979$export$5b96ee2c8421f107(// Very liberal definition of what any incoming header might look like\nbaggageHeader) {\n if (!(0, $8cfrP.isString)(baggageHeader) && !Array.isArray(baggageHeader)) return undefined;\n // Intermediary object to store baggage key value pairs of incoming baggage headers on.\n // It is later used to read Sentry-DSC-values from.\n let baggageObject = {};\n if (Array.isArray(baggageHeader)) // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n baggageObject = baggageHeader.reduce((acc, curr)=>{\n const currBaggageObject = $10efd6cb1115e979$var$baggageHeaderToObject(curr);\n return {\n ...acc,\n ...currBaggageObject\n };\n }, {});\n else {\n // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but\n // this is how we choose to handle it)\n if (!baggageHeader) return undefined;\n baggageObject = $10efd6cb1115e979$var$baggageHeaderToObject(baggageHeader);\n }\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value])=>{\n if (key.match($10efd6cb1115e979$export$eb0401070c617ea5)) {\n const nonPrefixedKey = key.slice($10efd6cb1115e979$export$6e69537d67fa20f.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) return dynamicSamplingContext;\n else return undefined;\n}\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */ function $10efd6cb1115e979$export$56766feef403f365(// this also takes undefined for convenience and bundle size in other places\ndynamicSamplingContext) {\n if (!dynamicSamplingContext) return undefined;\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce((acc, [dscKey, dscValue])=>{\n if (dscValue) acc[`${$10efd6cb1115e979$export$6e69537d67fa20f}${dscKey}`] = dscValue;\n return acc;\n }, {});\n return $10efd6cb1115e979$var$objectToBaggageHeader(sentryPrefixedDSC);\n}\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */ function $10efd6cb1115e979$var$baggageHeaderToObject(baggageHeader) {\n return baggageHeader.split(\",\").map((baggageEntry)=>baggageEntry.split(\"=\").map((keyOrValue)=>decodeURIComponent(keyOrValue.trim()))).reduce((acc, [key, value])=>{\n acc[key] = value;\n return acc;\n }, {});\n}\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */ function $10efd6cb1115e979$var$objectToBaggageHeader(object) {\n if (Object.keys(object).length === 0) // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex)=>{\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > $10efd6cb1115e979$export$bdd844ddb2def819) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(`Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`);\n return baggageHeader;\n } else return newBaggageHeader;\n }, \"\");\n}\n\n});\n\n\n\nparcelRegister(\"jiipB\", function(module, exports) {\n\n$parcel$export(module.exports, \"Transaction\", () => $e0bdfb01a41c5c9f$export$febc5573c75cefb0);\n\nvar $aCgU1 = parcelRequire(\"aCgU1\");\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $1D41F = parcelRequire(\"1D41F\");\n\nvar $vjmKu = parcelRequire(\"vjmKu\");\n\nvar $a2D5e = parcelRequire(\"a2D5e\");\n/** JSDoc */ class $e0bdfb01a41c5c9f$export$febc5573c75cefb0 extends (0, $a2D5e.Span) {\n /**\n * The reference to the current hub.\n */ /**\n * This constructor should never be called manually. Those instrumenting tracing should use\n * `Sentry.startTransaction()`, and internal methods should use `hub.startTransaction()`.\n * @internal\n * @hideconstructor\n * @hidden\n */ constructor(transactionContext, hub){\n super(transactionContext);\n // We need to delete description since it's set by the Span class constructor\n // but not needed for transactions.\n delete this.description;\n this._measurements = {};\n this._contexts = {};\n this._hub = hub || (0, $1D41F.getCurrentHub)();\n this._name = transactionContext.name || \"\";\n this.metadata = {\n source: \"custom\",\n ...transactionContext.metadata,\n spanMetadata: {}\n };\n this._trimEnd = transactionContext.trimEnd;\n // this is because transactions are also spans, and spans have a transaction pointer\n this.transaction = this;\n // If Dynamic Sampling Context is provided during the creation of the transaction, we freeze it as it usually means\n // there is incoming Dynamic Sampling Context. (Either through an incoming request, a baggage meta-tag, or other means)\n const incomingDynamicSamplingContext = this.metadata.dynamicSamplingContext;\n if (incomingDynamicSamplingContext) // We shallow copy this in case anything writes to the original reference of the passed in `dynamicSamplingContext`\n this._frozenDynamicSamplingContext = {\n ...incomingDynamicSamplingContext\n };\n }\n /** Getter for `name` property */ get name() {\n return this._name;\n }\n /** Setter for `name` property, which also sets `source` as custom */ set name(newName) {\n this.setName(newName);\n }\n /**\n * JSDoc\n */ setName(name, source = \"custom\") {\n this._name = name;\n this.metadata.source = source;\n }\n /**\n * Attaches SpanRecorder to the span itself\n * @param maxlen maximum number of spans that can be recorded\n */ initSpanRecorder(maxlen = 1000) {\n if (!this.spanRecorder) this.spanRecorder = new (0, $a2D5e.SpanRecorder)(maxlen);\n this.spanRecorder.add(this);\n }\n /**\n * @inheritDoc\n */ setContext(key, context) {\n if (context === null) // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n else this._contexts[key] = context;\n }\n /**\n * @inheritDoc\n */ setMeasurement(name, value, unit = \"\") {\n this._measurements[name] = {\n value: value,\n unit: unit\n };\n }\n /**\n * @inheritDoc\n */ setMetadata(newMetadata) {\n this.metadata = {\n ...this.metadata,\n ...newMetadata\n };\n }\n /**\n * @inheritDoc\n */ finish(endTimestamp) {\n const transaction = this._finishTransaction(endTimestamp);\n if (!transaction) return undefined;\n return this._hub.captureEvent(transaction);\n }\n /**\n * @inheritDoc\n */ toContext() {\n const spanContext = super.toContext();\n return (0, $aCgU1.dropUndefinedKeys)({\n ...spanContext,\n name: this.name,\n trimEnd: this._trimEnd\n });\n }\n /**\n * @inheritDoc\n */ updateWithContext(transactionContext) {\n super.updateWithContext(transactionContext);\n this.name = transactionContext.name || \"\";\n this._trimEnd = transactionContext.trimEnd;\n return this;\n }\n /**\n * @inheritdoc\n *\n * @experimental\n */ getDynamicSamplingContext() {\n if (this._frozenDynamicSamplingContext) return this._frozenDynamicSamplingContext;\n const hub = this._hub || (0, $1D41F.getCurrentHub)();\n const client = hub.getClient();\n if (!client) return {};\n const scope = hub.getScope();\n const dsc = (0, $vjmKu.getDynamicSamplingContextFromClient)(this.traceId, client, scope);\n const maybeSampleRate = this.metadata.sampleRate;\n if (maybeSampleRate !== undefined) dsc.sample_rate = `${maybeSampleRate}`;\n // We don't want to have a transaction name in the DSC if the source is \"url\" because URLs might contain PII\n const source = this.metadata.source;\n if (source && source !== \"url\") dsc.transaction = this.name;\n if (this.sampled !== undefined) dsc.sampled = String(this.sampled);\n // Uncomment if we want to make DSC immutable\n // this._frozenDynamicSamplingContext = dsc;\n return dsc;\n }\n /**\n * Override the current hub with a new one.\n * Used if you want another hub to finish the transaction.\n *\n * @internal\n */ setHub(hub) {\n this._hub = hub;\n }\n /**\n * Finish the transaction & prepare the event to send to Sentry.\n */ _finishTransaction(endTimestamp) {\n // This transaction is already finished, so we should not flush it again.\n if (this.endTimestamp !== undefined) return undefined;\n if (!this.name) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(\"Transaction has no name, falling back to ``.\");\n this.name = \"\";\n }\n // just sets the end timestamp\n super.finish(endTimestamp);\n const client = this._hub.getClient();\n if (client && client.emit) client.emit(\"finishTransaction\", this);\n if (this.sampled !== true) {\n // At this point if `sampled !== true` we want to discard the transaction.\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"[Tracing] Discarding transaction because its trace was not chosen to be sampled.\");\n if (client) client.recordDroppedEvent(\"sample_rate\", \"transaction\");\n return undefined;\n }\n const finishedSpans = this.spanRecorder ? this.spanRecorder.spans.filter((s)=>s !== this && s.endTimestamp) : [];\n if (this._trimEnd && finishedSpans.length > 0) this.endTimestamp = finishedSpans.reduce((prev, current)=>{\n if (prev.endTimestamp && current.endTimestamp) return prev.endTimestamp > current.endTimestamp ? prev : current;\n return prev;\n }).endTimestamp;\n const metadata = this.metadata;\n const transaction = {\n contexts: {\n ...this._contexts,\n // We don't want to override trace context\n trace: this.getTraceContext()\n },\n spans: finishedSpans,\n start_timestamp: this.startTimestamp,\n tags: this.tags,\n timestamp: this.endTimestamp,\n transaction: this.name,\n type: \"transaction\",\n sdkProcessingMetadata: {\n ...metadata,\n dynamicSamplingContext: this.getDynamicSamplingContext()\n },\n ...metadata.source && {\n transaction_info: {\n source: metadata.source\n }\n }\n };\n const hasMeasurements = Object.keys(this._measurements).length > 0;\n if (hasMeasurements) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"[Measurements] Adding measurements to transaction\", JSON.stringify(this._measurements, undefined, 2));\n transaction.measurements = this._measurements;\n }\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`);\n return transaction;\n }\n}\n\n});\n\n\nparcelRegister(\"2gSGS\", function(module, exports) {\n\n$parcel$export(module.exports, \"sampleTransaction\", () => $1a777fcb8ededcae$export$b3258c3993bc9b71);\n\nvar $8cfrP = parcelRequire(\"8cfrP\");\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $6Em9x = parcelRequire(\"6Em9x\");\n/**\n * Makes a sampling decision for the given transaction and stores it on the transaction.\n *\n * Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n *\n * This method muttes the given `transaction` and will set the `sampled` value on it.\n * It returns the same transaction, for convenience.\n */ function $1a777fcb8ededcae$export$b3258c3993bc9b71(transaction, options, samplingContext) {\n // nothing to do if tracing is not enabled\n if (!(0, $6Em9x.hasTracingEnabled)(options)) {\n transaction.sampled = false;\n return transaction;\n }\n // if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that\n if (transaction.sampled !== undefined) {\n transaction.setMetadata({\n sampleRate: Number(transaction.sampled)\n });\n return transaction;\n }\n // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` nor `enableTracing` were defined, so one of these should\n // work; prefer the hook if so\n let sampleRate;\n if (typeof options.tracesSampler === \"function\") {\n sampleRate = options.tracesSampler(samplingContext);\n transaction.setMetadata({\n sampleRate: Number(sampleRate)\n });\n } else if (samplingContext.parentSampled !== undefined) sampleRate = samplingContext.parentSampled;\n else if (typeof options.tracesSampleRate !== \"undefined\") {\n sampleRate = options.tracesSampleRate;\n transaction.setMetadata({\n sampleRate: Number(sampleRate)\n });\n } else {\n // When `enableTracing === true`, we use a sample rate of 100%\n sampleRate = 1;\n transaction.setMetadata({\n sampleRate: sampleRate\n });\n }\n // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The\n // only valid values are booleans or numbers between 0 and 1.)\n if (!$1a777fcb8ededcae$var$isValidSampleRate(sampleRate)) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(\"[Tracing] Discarding transaction because of invalid sample rate.\");\n transaction.sampled = false;\n return transaction;\n }\n // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n if (!sampleRate) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(`[Tracing] Discarding transaction because ${typeof options.tracesSampler === \"function\" ? \"tracesSampler returned 0 or false\" : \"a negative sampling decision was inherited or tracesSampleRate is set to 0\"}`);\n transaction.sampled = false;\n return transaction;\n }\n // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is\n // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.\n transaction.sampled = Math.random() < sampleRate;\n // if we're not going to keep it, we're done\n if (!transaction.sampled) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(sampleRate)})`);\n return transaction;\n }\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(`[Tracing] starting ${transaction.op} transaction - ${transaction.name}`);\n return transaction;\n}\n/**\n * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).\n */ function $1a777fcb8ededcae$var$isValidSampleRate(rate) {\n // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if ((0, $8cfrP.isNaN)(rate) || !(typeof rate === \"number\" || typeof rate === \"boolean\")) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(rate)} of type ${JSON.stringify(typeof rate)}.`);\n return false;\n }\n // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false\n if (rate < 0 || rate > 1) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${rate}.`);\n return false;\n }\n return true;\n}\n\n});\nparcelRegister(\"6Em9x\", function(module, exports) {\n\n$parcel$export(module.exports, \"hasTracingEnabled\", () => $4d77a998e73876a1$export$5008da00b1b6dee6);\n\nvar $1D41F = parcelRequire(\"1D41F\");\n// Treeshakable guard to remove all code related to tracing\n/**\n * Determines if tracing is currently enabled.\n *\n * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.\n */ function $4d77a998e73876a1$export$5008da00b1b6dee6(maybeOptions) {\n if (typeof __SENTRY_TRACING__ === \"boolean\" && !__SENTRY_TRACING__) return false;\n const client = (0, $1D41F.getCurrentHub)().getClient();\n const options = maybeOptions || client && client.getOptions();\n return !!options && (options.enableTracing || \"tracesSampleRate\" in options || \"tracesSampler\" in options);\n}\n\n});\n\n\n\n\nparcelRegister(\"cQrvJ\", function(module, exports) {\n\n$parcel$export(module.exports, \"Apollo\", () => $959fae7468217515$export$3db3e396472fda8d);\n\nvar $4I4m1 = parcelRequire(\"4I4m1\");\nvar $aZ9cG = parcelRequire(\"aZ9cG\");\nvar $aCgU1 = parcelRequire(\"aCgU1\");\nvar $8cfrP = parcelRequire(\"8cfrP\");\nvar $ink2I = parcelRequire(\"ink2I\");\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $3yaN4 = parcelRequire(\"3yaN4\");\n/** Tracing integration for Apollo */ class $959fae7468217515$export$3db3e396472fda8d {\n /**\n * @inheritDoc\n */ static __initStatic() {\n this.id = \"Apollo\";\n }\n /**\n * @inheritDoc\n */ /**\n * @inheritDoc\n */ constructor(options = {\n useNestjs: false\n }){\n this.name = $959fae7468217515$export$3db3e396472fda8d.id;\n this._useNest = !!options.useNestjs;\n }\n /** @inheritdoc */ loadDependency() {\n if (this._useNest) this._module = this._module || (0, $ink2I.loadModule)(\"@nestjs/graphql\");\n else this._module = this._module || (0, $ink2I.loadModule)(\"apollo-server-core\");\n return this._module;\n }\n /**\n * @inheritDoc\n */ setupOnce(_, getCurrentHub) {\n if ((0, $3yaN4.shouldDisableAutoInstrumentation)(getCurrentHub)) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"Apollo Integration is skipped because of instrumenter configuration.\");\n return;\n }\n if (this._useNest) {\n const pkg = this.loadDependency();\n if (!pkg) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(\"Apollo-NestJS Integration was unable to require @nestjs/graphql package.\");\n return;\n }\n /**\n * Iterate over resolvers of NestJS ResolversExplorerService before schemas are constructed.\n */ (0, $aCgU1.fill)(pkg.GraphQLFactory.prototype, \"mergeWithSchema\", function(orig) {\n return function(...args) {\n (0, $aCgU1.fill)(this.resolversExplorerService, \"explore\", function(orig) {\n return function() {\n const resolvers = (0, $aZ9cG.arrayify)(orig.call(this));\n const instrumentedResolvers = $959fae7468217515$var$instrumentResolvers(resolvers, getCurrentHub);\n return instrumentedResolvers;\n };\n });\n return orig.call(this, ...args);\n };\n });\n } else {\n const pkg = this.loadDependency();\n if (!pkg) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(\"Apollo Integration was unable to require apollo-server-core package.\");\n return;\n }\n /**\n * Iterate over resolvers of the ApolloServer instance before schemas are constructed.\n */ (0, $aCgU1.fill)(pkg.ApolloServerBase.prototype, \"constructSchema\", function(orig) {\n return function() {\n if (!this.config.resolvers) {\n if (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) {\n if (this.config.schema) {\n (0, $boFAr.logger).warn(\"Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead.\");\n (0, $boFAr.logger).warn();\n } else if (this.config.modules) (0, $boFAr.logger).warn(\"Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property.\");\n (0, $boFAr.logger).error(\"Skipping tracing as no resolvers found on the `ApolloServer` instance.\");\n }\n return orig.call(this);\n }\n const resolvers = (0, $aZ9cG.arrayify)(this.config.resolvers);\n this.config.resolvers = $959fae7468217515$var$instrumentResolvers(resolvers, getCurrentHub);\n return orig.call(this);\n };\n });\n }\n }\n}\n$959fae7468217515$export$3db3e396472fda8d.__initStatic();\nfunction $959fae7468217515$var$instrumentResolvers(resolvers, getCurrentHub) {\n return resolvers.map((model)=>{\n Object.keys(model).forEach((resolverGroupName)=>{\n Object.keys(model[resolverGroupName]).forEach((resolverName)=>{\n if (typeof model[resolverGroupName][resolverName] !== \"function\") return;\n $959fae7468217515$var$wrapResolver(model, resolverGroupName, resolverName, getCurrentHub);\n });\n });\n return model;\n });\n}\n/**\n * Wrap a single resolver which can be a parent of other resolvers and/or db operations.\n */ function $959fae7468217515$var$wrapResolver(model, resolverGroupName, resolverName, getCurrentHub) {\n (0, $aCgU1.fill)(model[resolverGroupName], resolverName, function(orig) {\n return function(...args) {\n const scope = getCurrentHub().getScope();\n const parentSpan = scope.getSpan();\n const span = (0, $4I4m1._optionalChain)([\n parentSpan,\n \"optionalAccess\",\n (_2)=>_2.startChild,\n \"call\",\n (_3)=>_3({\n description: `${resolverGroupName}.${resolverName}`,\n op: \"graphql.resolve\",\n origin: \"auto.graphql.apollo\"\n })\n ]);\n const rv = orig.call(this, ...args);\n if ((0, $8cfrP.isThenable)(rv)) return rv.then((res)=>{\n (0, $4I4m1._optionalChain)([\n span,\n \"optionalAccess\",\n (_4)=>_4.finish,\n \"call\",\n (_5)=>_5()\n ]);\n return res;\n });\n (0, $4I4m1._optionalChain)([\n span,\n \"optionalAccess\",\n (_6)=>_6.finish,\n \"call\",\n (_7)=>_7()\n ]);\n return rv;\n };\n });\n}\n\n});\nparcelRegister(\"4I4m1\", function(module, exports) {\n\n$parcel$export(module.exports, \"_optionalChain\", () => $36dea620c29829d9$export$3cc482e6b02f32f7);\n/**\n * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values,\n * descriptors, and functions.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase)\n * See https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15\n *\n * @param ops Array result of expression conversion\n * @returns The value of the expression\n */ function $36dea620c29829d9$export$3cc482e6b02f32f7(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while(i < ops.length){\n const op = ops[i];\n const fn = ops[i + 1];\n i += 2;\n // by checking for loose equality to `null`, we catch both `null` and `undefined`\n if ((op === \"optionalAccess\" || op === \"optionalCall\") && value == null) // really we're meaning to return `undefined` as an actual value here, but it saves bytes not to write it\n return;\n if (op === \"access\" || op === \"optionalAccess\") {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === \"call\" || op === \"optionalCall\") {\n value = fn((...args)=>value.call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n}\n\n});\n\nparcelRegister(\"3yaN4\", function(module, exports) {\n\n$parcel$export(module.exports, \"shouldDisableAutoInstrumentation\", () => $295ceadbba9c16cd$export$34db76d03eb96b7e);\n\nvar $4I4m1 = parcelRequire(\"4I4m1\");\n/**\n * Check if Sentry auto-instrumentation should be disabled.\n *\n * @param getCurrentHub A method to fetch the current hub\n * @returns boolean\n */ function $295ceadbba9c16cd$export$34db76d03eb96b7e(getCurrentHub) {\n const clientOptions = (0, $4I4m1._optionalChain)([\n getCurrentHub,\n \"call\",\n (_)=>_(),\n \"access\",\n (_2)=>_2.getClient,\n \"call\",\n (_3)=>_3(),\n \"optionalAccess\",\n (_4)=>_4.getOptions,\n \"call\",\n (_5)=>_5()\n ]);\n const instrumenter = (0, $4I4m1._optionalChain)([\n clientOptions,\n \"optionalAccess\",\n (_6)=>_6.instrumenter\n ]) || \"sentry\";\n return instrumenter !== \"sentry\";\n}\n\n});\n\n\nparcelRegister(\"2okBR\", function(module, exports) {\n\n$parcel$export(module.exports, \"BROWSER_TRACING_INTEGRATION_ID\", () => $1bddcf4cca1dd8db$export$bbd2089f30bd3708);\n$parcel$export(module.exports, \"BrowserTracing\", () => $1bddcf4cca1dd8db$export$46d3bbd0375f5fa4);\n\nvar $29dwI = parcelRequire(\"29dwI\");\nvar $9QK0o = parcelRequire(\"9QK0o\");\nvar $60Zur = parcelRequire(\"60Zur\");\n\nvar $8SKxE = parcelRequire(\"8SKxE\");\nvar $boFAr = parcelRequire(\"boFAr\");\nvar $iI7u6 = parcelRequire(\"iI7u6\");\n\nvar $hIUQs = parcelRequire(\"hIUQs\");\n\nvar $21QZq = parcelRequire(\"21QZq\");\n\nvar $eF6SP = parcelRequire(\"eF6SP\");\n\nvar $cJLfg = parcelRequire(\"cJLfg\");\n\nvar $eKkm5 = parcelRequire(\"eKkm5\");\nconst $1bddcf4cca1dd8db$export$bbd2089f30bd3708 = \"BrowserTracing\";\n/** Options for Browser Tracing integration */ const $1bddcf4cca1dd8db$var$DEFAULT_BROWSER_TRACING_OPTIONS = {\n ...(0, $60Zur.TRACING_DEFAULTS),\n markBackgroundTransactions: true,\n routingInstrumentation: (0, $cJLfg.instrumentRoutingWithDefaults),\n startTransactionOnLocationChange: true,\n startTransactionOnPageLoad: true,\n enableLongTask: true,\n _experiments: {},\n ...(0, $eF6SP.defaultRequestInstrumentationOptions)\n};\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library. This integration uses {@see IdleTransaction} to create transactions.\n */ class $1bddcf4cca1dd8db$export$46d3bbd0375f5fa4 {\n // This class currently doesn't have a static `id` field like the other integration classes, because it prevented\n // @sentry/tracing from being treeshaken. Tree shakers do not like static fields, because they behave like side effects.\n // TODO: Come up with a better plan, than using static fields on integration classes, and use that plan on all\n // integrations.\n /** Browser Tracing integration options */ /**\n * @inheritDoc\n */ constructor(_options){\n this.name = $1bddcf4cca1dd8db$export$bbd2089f30bd3708;\n this._hasSetTracePropagationTargets = false;\n (0, $29dwI.addTracingExtensions)();\n if (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) this._hasSetTracePropagationTargets = !!(_options && // eslint-disable-next-line deprecation/deprecation\n (_options.tracePropagationTargets || _options.tracingOrigins));\n this.options = {\n ...$1bddcf4cca1dd8db$var$DEFAULT_BROWSER_TRACING_OPTIONS,\n ..._options\n };\n // Special case: enableLongTask can be set in _experiments\n // TODO (v8): Remove this in v8\n if (this.options._experiments.enableLongTask !== undefined) this.options.enableLongTask = this.options._experiments.enableLongTask;\n // TODO (v8): remove this block after tracingOrigins is removed\n // Set tracePropagationTargets to tracingOrigins if specified by the user\n // In case both are specified, tracePropagationTargets takes precedence\n // eslint-disable-next-line deprecation/deprecation\n if (_options && !_options.tracePropagationTargets && _options.tracingOrigins) // eslint-disable-next-line deprecation/deprecation\n this.options.tracePropagationTargets = _options.tracingOrigins;\n this._collectWebVitals = (0, $21QZq.startTrackingWebVitals)();\n if (this.options.enableLongTask) (0, $21QZq.startTrackingLongTasks)();\n if (this.options._experiments.enableInteractions) (0, $21QZq.startTrackingInteractions)();\n }\n /**\n * @inheritDoc\n */ setupOnce(_, getCurrentHub) {\n this._getCurrentHub = getCurrentHub;\n const hub = getCurrentHub();\n const client = hub.getClient();\n const clientOptions = client && client.getOptions();\n const { routingInstrumentation: instrumentRouting, startTransactionOnLocationChange: startTransactionOnLocationChange, startTransactionOnPageLoad: startTransactionOnPageLoad, markBackgroundTransactions: markBackgroundTransactions, traceFetch: traceFetch, traceXHR: traceXHR, shouldCreateSpanForRequest: shouldCreateSpanForRequest, enableHTTPTimings: enableHTTPTimings, _experiments: _experiments } = this.options;\n const clientOptionsTracePropagationTargets = clientOptions && clientOptions.tracePropagationTargets;\n // There are three ways to configure tracePropagationTargets:\n // 1. via top level client option `tracePropagationTargets`\n // 2. via BrowserTracing option `tracePropagationTargets`\n // 3. via BrowserTracing option `tracingOrigins` (deprecated)\n //\n // To avoid confusion, favour top level client option `tracePropagationTargets`, and fallback to\n // BrowserTracing option `tracePropagationTargets` and then `tracingOrigins` (deprecated).\n // This is done as it minimizes bundle size (we don't have to have undefined checks).\n //\n // If both 1 and either one of 2 or 3 are set (from above), we log out a warning.\n // eslint-disable-next-line deprecation/deprecation\n const tracePropagationTargets = clientOptionsTracePropagationTargets || this.options.tracePropagationTargets;\n if ((typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && this._hasSetTracePropagationTargets && clientOptionsTracePropagationTargets) (0, $boFAr.logger).warn(\"[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.\");\n instrumentRouting((context)=>{\n const transaction = this._createRouteTransaction(context);\n this.options._experiments.onStartRouteTransaction && this.options._experiments.onStartRouteTransaction(transaction, context, getCurrentHub);\n return transaction;\n }, startTransactionOnPageLoad, startTransactionOnLocationChange);\n if (markBackgroundTransactions) (0, $hIUQs.registerBackgroundTabDetection)();\n if (_experiments.enableInteractions) this._registerInteractionListener();\n (0, $eF6SP.instrumentOutgoingRequests)({\n traceFetch: traceFetch,\n traceXHR: traceXHR,\n tracePropagationTargets: tracePropagationTargets,\n shouldCreateSpanForRequest: shouldCreateSpanForRequest,\n enableHTTPTimings: enableHTTPTimings\n });\n }\n /** Create routing idle transaction. */ _createRouteTransaction(context) {\n if (!this._getCurrentHub) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(`[Tracing] Did not create ${context.op} transaction because _getCurrentHub is invalid.`);\n return undefined;\n }\n const hub = this._getCurrentHub();\n const { beforeNavigate: beforeNavigate, idleTimeout: idleTimeout, finalTimeout: finalTimeout, heartbeatInterval: heartbeatInterval } = this.options;\n const isPageloadTransaction = context.op === \"pageload\";\n const sentryTrace = isPageloadTransaction ? $1bddcf4cca1dd8db$export$f147b32b03c9cf11(\"sentry-trace\") : \"\";\n const baggage = isPageloadTransaction ? $1bddcf4cca1dd8db$export$f147b32b03c9cf11(\"baggage\") : \"\";\n const { traceparentData: traceparentData, dynamicSamplingContext: dynamicSamplingContext, propagationContext: propagationContext } = (0, $iI7u6.tracingContextFromHeaders)(sentryTrace, baggage);\n const expandedContext = {\n ...context,\n ...traceparentData,\n metadata: {\n ...context.metadata,\n dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext\n },\n trimEnd: true\n };\n const modifiedContext = typeof beforeNavigate === \"function\" ? beforeNavigate(expandedContext) : expandedContext;\n // For backwards compatibility reasons, beforeNavigate can return undefined to \"drop\" the transaction (prevent it\n // from being sent to Sentry).\n const finalContext = modifiedContext === undefined ? {\n ...expandedContext,\n sampled: false\n } : modifiedContext;\n // If `beforeNavigate` set a custom name, record that fact\n finalContext.metadata = finalContext.name !== expandedContext.name ? {\n ...finalContext.metadata,\n source: \"custom\"\n } : finalContext.metadata;\n this._latestRouteName = finalContext.name;\n this._latestRouteSource = finalContext.metadata && finalContext.metadata.source;\n if (finalContext.sampled === false) (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(`[Tracing] Will not send ${finalContext.op} transaction because of beforeNavigate.`);\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(`[Tracing] Starting ${finalContext.op} transaction on scope`);\n const { location: location } = (0, $eKkm5.WINDOW);\n const idleTransaction = (0, $29dwI.startIdleTransaction)(hub, finalContext, idleTimeout, finalTimeout, true, {\n location: location\n }, heartbeatInterval);\n const scope = hub.getScope();\n // If it's a pageload and there is a meta tag set\n // use the traceparentData as the propagation context\n if (isPageloadTransaction && traceparentData) scope.setPropagationContext(propagationContext);\n else // Navigation transactions should set a new propagation context based on the\n // created idle transaction.\n scope.setPropagationContext({\n traceId: idleTransaction.traceId,\n spanId: idleTransaction.spanId,\n parentSpanId: idleTransaction.parentSpanId,\n sampled: idleTransaction.sampled\n });\n idleTransaction.registerBeforeFinishCallback((transaction)=>{\n this._collectWebVitals();\n (0, $21QZq.addPerformanceEntries)(transaction);\n });\n return idleTransaction;\n }\n /** Start listener for interaction transactions */ _registerInteractionListener() {\n let inflightInteractionTransaction;\n const registerInteractionTransaction = ()=>{\n const { idleTimeout: idleTimeout, finalTimeout: finalTimeout, heartbeatInterval: heartbeatInterval } = this.options;\n const op = \"ui.action.click\";\n const currentTransaction = (0, $9QK0o.getActiveTransaction)();\n if (currentTransaction && currentTransaction.op && [\n \"navigation\",\n \"pageload\"\n ].includes(currentTransaction.op)) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(`[Tracing] Did not create ${op} transaction because a pageload or navigation transaction is in progress.`);\n return undefined;\n }\n if (inflightInteractionTransaction) {\n inflightInteractionTransaction.setFinishReason(\"interactionInterrupted\");\n inflightInteractionTransaction.finish();\n inflightInteractionTransaction = undefined;\n }\n if (!this._getCurrentHub) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(`[Tracing] Did not create ${op} transaction because _getCurrentHub is invalid.`);\n return undefined;\n }\n if (!this._latestRouteName) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(`[Tracing] Did not create ${op} transaction because _latestRouteName is missing.`);\n return undefined;\n }\n const hub = this._getCurrentHub();\n const { location: location } = (0, $eKkm5.WINDOW);\n const context = {\n name: this._latestRouteName,\n op: op,\n trimEnd: true,\n metadata: {\n source: this._latestRouteSource || \"url\"\n }\n };\n inflightInteractionTransaction = (0, $29dwI.startIdleTransaction)(hub, context, idleTimeout, finalTimeout, true, {\n location: location\n }, heartbeatInterval);\n };\n [\n \"click\"\n ].forEach((type)=>{\n addEventListener(type, registerInteractionTransaction, {\n once: false,\n capture: true\n });\n });\n }\n}\n/** Returns the value of a meta tag */ function $1bddcf4cca1dd8db$export$f147b32b03c9cf11(metaName) {\n // Can't specify generic to `getDomElement` because tracing can be used\n // in a variety of environments, have to disable `no-unsafe-member-access`\n // as a result.\n const metaTag = (0, $8SKxE.getDomElement)(`meta[name=${metaName}]`);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return metaTag ? metaTag.getAttribute(\"content\") : undefined;\n}\n\n});\nparcelRegister(\"hIUQs\", function(module, exports) {\n\n$parcel$export(module.exports, \"registerBackgroundTabDetection\", () => $ce72a3f6040a3d13$export$6f18f55521af71a1);\n\nvar $9QK0o = parcelRequire(\"9QK0o\");\n\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $eKkm5 = parcelRequire(\"eKkm5\");\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */ function $ce72a3f6040a3d13$export$6f18f55521af71a1() {\n if ((0, $eKkm5.WINDOW) && (0, $eKkm5.WINDOW).document) (0, $eKkm5.WINDOW).document.addEventListener(\"visibilitychange\", ()=>{\n const activeTransaction = (0, $9QK0o.getActiveTransaction)();\n if ((0, $eKkm5.WINDOW).document.hidden && activeTransaction) {\n const statusType = \"cancelled\";\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(`[Tracing] Transaction: ${statusType} -> since tab moved to the background, op: ${activeTransaction.op}`);\n // We should not set status if it is already set, this prevent important statuses like\n // error or data loss from being overwritten on transaction.\n if (!activeTransaction.status) activeTransaction.setStatus(statusType);\n activeTransaction.setTag(\"visibilitychange\", \"document.hidden\");\n activeTransaction.finish();\n }\n });\n else (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(\"[Tracing] Could not set up background tab detection due to lack of global document\");\n}\n\n});\nparcelRegister(\"eKkm5\", function(module, exports) {\n\n$parcel$export(module.exports, \"WINDOW\", () => $abc526b0c18364b6$export$56d8a8a25bd48b81);\n\nvar $kPqMJ = parcelRequire(\"kPqMJ\");\nconst $abc526b0c18364b6$export$56d8a8a25bd48b81 = (0, $kPqMJ.GLOBAL_OBJ);\n\n});\n\n\nparcelRegister(\"21QZq\", function(module, exports) {\n\n$parcel$export(module.exports, \"startTrackingWebVitals\", () => $17a4c76669ae2502$export$7c69f0412d101b88);\n$parcel$export(module.exports, \"startTrackingLongTasks\", () => $17a4c76669ae2502$export$f396d19077034ad2);\n$parcel$export(module.exports, \"startTrackingInteractions\", () => $17a4c76669ae2502$export$e27543e0976315e4);\n$parcel$export(module.exports, \"addPerformanceEntries\", () => $17a4c76669ae2502$export$5f8fa6b3467a7443);\n\nvar $9QK0o = parcelRequire(\"9QK0o\");\n\nvar $hbZCn = parcelRequire(\"hbZCn\");\nvar $8SKxE = parcelRequire(\"8SKxE\");\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $aPEnJ = parcelRequire(\"aPEnJ\");\n\nvar $eKkm5 = parcelRequire(\"eKkm5\");\n\nvar $aYJ7F = parcelRequire(\"aYJ7F\");\n\nvar $g2e6t = parcelRequire(\"g2e6t\");\n/**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */ function $17a4c76669ae2502$var$msToSec(time) {\n return time / 1000;\n}\nfunction $17a4c76669ae2502$var$getBrowserPerformanceAPI() {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n return (0, $eKkm5.WINDOW) && (0, $eKkm5.WINDOW).addEventListener && (0, $eKkm5.WINDOW).performance;\n}\nlet $17a4c76669ae2502$var$_performanceCursor = 0;\nlet $17a4c76669ae2502$var$_measurements = {};\nlet $17a4c76669ae2502$var$_lcpEntry;\nlet $17a4c76669ae2502$var$_clsEntry;\n/**\n * Start tracking web vitals\n *\n * @returns A function that forces web vitals collection\n */ function $17a4c76669ae2502$export$7c69f0412d101b88() {\n const performance = $17a4c76669ae2502$var$getBrowserPerformanceAPI();\n if (performance && (0, $hbZCn.browserPerformanceTimeOrigin)) {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n if (performance.mark) (0, $eKkm5.WINDOW).performance.mark(\"sentry-tracing-init\");\n const fidCallback = $17a4c76669ae2502$var$_trackFID();\n const clsCallback = $17a4c76669ae2502$var$_trackCLS();\n const lcpCallback = $17a4c76669ae2502$var$_trackLCP();\n return ()=>{\n fidCallback();\n clsCallback();\n lcpCallback();\n };\n }\n return ()=>undefined;\n}\n/**\n * Start tracking long tasks.\n */ function $17a4c76669ae2502$export$f396d19077034ad2() {\n (0, $aPEnJ.addPerformanceInstrumentationHandler)(\"longtask\", ({ entries: entries })=>{\n for (const entry of entries){\n const transaction = (0, $9QK0o.getActiveTransaction)();\n if (!transaction) return;\n const startTime = $17a4c76669ae2502$var$msToSec((0, $hbZCn.browserPerformanceTimeOrigin) + entry.startTime);\n const duration = $17a4c76669ae2502$var$msToSec(entry.duration);\n transaction.startChild({\n description: \"Main UI thread blocked\",\n op: \"ui.long-task\",\n origin: \"auto.ui.browser.metrics\",\n startTimestamp: startTime,\n endTimestamp: startTime + duration\n });\n }\n });\n}\n/**\n * Start tracking interaction events.\n */ function $17a4c76669ae2502$export$e27543e0976315e4() {\n (0, $aPEnJ.addPerformanceInstrumentationHandler)(\"event\", ({ entries: entries })=>{\n for (const entry of entries){\n const transaction = (0, $9QK0o.getActiveTransaction)();\n if (!transaction) return;\n if (entry.name === \"click\") {\n const startTime = $17a4c76669ae2502$var$msToSec((0, $hbZCn.browserPerformanceTimeOrigin) + entry.startTime);\n const duration = $17a4c76669ae2502$var$msToSec(entry.duration);\n transaction.startChild({\n description: (0, $8SKxE.htmlTreeAsString)(entry.target),\n op: `ui.interaction.${entry.name}`,\n origin: \"auto.ui.browser.metrics\",\n startTimestamp: startTime,\n endTimestamp: startTime + duration\n });\n }\n }\n });\n}\n/** Starts tracking the Cumulative Layout Shift on the current page. */ function $17a4c76669ae2502$var$_trackCLS() {\n return (0, $aPEnJ.addClsInstrumentationHandler)(({ metric: metric })=>{\n const entry = metric.entries.pop();\n if (!entry) return;\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"[Measurements] Adding CLS\");\n $17a4c76669ae2502$var$_measurements[\"cls\"] = {\n value: metric.value,\n unit: \"\"\n };\n $17a4c76669ae2502$var$_clsEntry = entry;\n });\n}\n/** Starts tracking the Largest Contentful Paint on the current page. */ function $17a4c76669ae2502$var$_trackLCP() {\n return (0, $aPEnJ.addLcpInstrumentationHandler)(({ metric: metric })=>{\n const entry = metric.entries.pop();\n if (!entry) return;\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"[Measurements] Adding LCP\");\n $17a4c76669ae2502$var$_measurements[\"lcp\"] = {\n value: metric.value,\n unit: \"millisecond\"\n };\n $17a4c76669ae2502$var$_lcpEntry = entry;\n });\n}\n/** Starts tracking the First Input Delay on the current page. */ function $17a4c76669ae2502$var$_trackFID() {\n return (0, $aPEnJ.addFidInstrumentationHandler)(({ metric: metric })=>{\n const entry = metric.entries.pop();\n if (!entry) return;\n const timeOrigin = $17a4c76669ae2502$var$msToSec((0, $hbZCn.browserPerformanceTimeOrigin));\n const startTime = $17a4c76669ae2502$var$msToSec(entry.startTime);\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"[Measurements] Adding FID\");\n $17a4c76669ae2502$var$_measurements[\"fid\"] = {\n value: metric.value,\n unit: \"millisecond\"\n };\n $17a4c76669ae2502$var$_measurements[\"mark.fid\"] = {\n value: timeOrigin + startTime,\n unit: \"second\"\n };\n });\n}\n/** Add performance related spans to a transaction */ function $17a4c76669ae2502$export$5f8fa6b3467a7443(transaction) {\n const performance = $17a4c76669ae2502$var$getBrowserPerformanceAPI();\n if (!performance || !(0, $eKkm5.WINDOW).performance.getEntries || !(0, $hbZCn.browserPerformanceTimeOrigin)) // Gatekeeper if performance API not available\n return;\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"[Tracing] Adding & adjusting spans using Performance API\");\n const timeOrigin = $17a4c76669ae2502$var$msToSec((0, $hbZCn.browserPerformanceTimeOrigin));\n const performanceEntries = performance.getEntries();\n let responseStartTimestamp;\n let requestStartTimestamp;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n performanceEntries.slice($17a4c76669ae2502$var$_performanceCursor).forEach((entry)=>{\n const startTime = $17a4c76669ae2502$var$msToSec(entry.startTime);\n const duration = $17a4c76669ae2502$var$msToSec(entry.duration);\n if (transaction.op === \"navigation\" && timeOrigin + startTime < transaction.startTimestamp) return;\n switch(entry.entryType){\n case \"navigation\":\n $17a4c76669ae2502$var$_addNavigationSpans(transaction, entry, timeOrigin);\n responseStartTimestamp = timeOrigin + $17a4c76669ae2502$var$msToSec(entry.responseStart);\n requestStartTimestamp = timeOrigin + $17a4c76669ae2502$var$msToSec(entry.requestStart);\n break;\n case \"mark\":\n case \"paint\":\n case \"measure\":\n {\n $17a4c76669ae2502$export$bc93b84e4d45912d(transaction, entry, startTime, duration, timeOrigin);\n // capture web vitals\n const firstHidden = (0, $aYJ7F.getVisibilityWatcher)();\n // Only report if the page wasn't hidden prior to the web vital.\n const shouldRecord = entry.startTime < firstHidden.firstHiddenTime;\n if (entry.name === \"first-paint\" && shouldRecord) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"[Measurements] Adding FP\");\n $17a4c76669ae2502$var$_measurements[\"fp\"] = {\n value: entry.startTime,\n unit: \"millisecond\"\n };\n }\n if (entry.name === \"first-contentful-paint\" && shouldRecord) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"[Measurements] Adding FCP\");\n $17a4c76669ae2502$var$_measurements[\"fcp\"] = {\n value: entry.startTime,\n unit: \"millisecond\"\n };\n }\n break;\n }\n case \"resource\":\n {\n const resourceName = entry.name.replace((0, $eKkm5.WINDOW).location.origin, \"\");\n $17a4c76669ae2502$export$c82fe1a70634f317(transaction, entry, resourceName, startTime, duration, timeOrigin);\n break;\n }\n }\n });\n $17a4c76669ae2502$var$_performanceCursor = Math.max(performanceEntries.length - 1, 0);\n $17a4c76669ae2502$var$_trackNavigator(transaction);\n // Measurements are only available for pageload transactions\n if (transaction.op === \"pageload\") {\n // Generate TTFB (Time to First Byte), which measured as the time between the beginning of the transaction and the\n // start of the response in milliseconds\n if (typeof responseStartTimestamp === \"number\") {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"[Measurements] Adding TTFB\");\n $17a4c76669ae2502$var$_measurements[\"ttfb\"] = {\n value: (responseStartTimestamp - transaction.startTimestamp) * 1000,\n unit: \"millisecond\"\n };\n if (typeof requestStartTimestamp === \"number\" && requestStartTimestamp <= responseStartTimestamp) // Capture the time spent making the request and receiving the first byte of the response.\n // This is the time between the start of the request and the start of the response in milliseconds.\n $17a4c76669ae2502$var$_measurements[\"ttfb.requestTime\"] = {\n value: (responseStartTimestamp - requestStartTimestamp) * 1000,\n unit: \"millisecond\"\n };\n }\n [\n \"fcp\",\n \"fp\",\n \"lcp\"\n ].forEach((name)=>{\n if (!$17a4c76669ae2502$var$_measurements[name] || timeOrigin >= transaction.startTimestamp) return;\n // The web vitals, fcp, fp, lcp, and ttfb, all measure relative to timeOrigin.\n // Unfortunately, timeOrigin is not captured within the transaction span data, so these web vitals will need\n // to be adjusted to be relative to transaction.startTimestamp.\n const oldValue = $17a4c76669ae2502$var$_measurements[name].value;\n const measurementTimestamp = timeOrigin + $17a4c76669ae2502$var$msToSec(oldValue);\n // normalizedValue should be in milliseconds\n const normalizedValue = Math.abs((measurementTimestamp - transaction.startTimestamp) * 1000);\n const delta = normalizedValue - oldValue;\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(`[Measurements] Normalized ${name} from ${oldValue} to ${normalizedValue} (${delta})`);\n $17a4c76669ae2502$var$_measurements[name].value = normalizedValue;\n });\n const fidMark = $17a4c76669ae2502$var$_measurements[\"mark.fid\"];\n if (fidMark && $17a4c76669ae2502$var$_measurements[\"fid\"]) {\n // create span for FID\n (0, $g2e6t._startChild)(transaction, {\n description: \"first input delay\",\n endTimestamp: fidMark.value + $17a4c76669ae2502$var$msToSec($17a4c76669ae2502$var$_measurements[\"fid\"].value),\n op: \"ui.action\",\n origin: \"auto.ui.browser.metrics\",\n startTimestamp: fidMark.value\n });\n // Delete mark.fid as we don't want it to be part of final payload\n delete $17a4c76669ae2502$var$_measurements[\"mark.fid\"];\n }\n // If FCP is not recorded we should not record the cls value\n // according to the new definition of CLS.\n if (!(\"fcp\" in $17a4c76669ae2502$var$_measurements)) delete $17a4c76669ae2502$var$_measurements.cls;\n Object.keys($17a4c76669ae2502$var$_measurements).forEach((measurementName)=>{\n transaction.setMeasurement(measurementName, $17a4c76669ae2502$var$_measurements[measurementName].value, $17a4c76669ae2502$var$_measurements[measurementName].unit);\n });\n $17a4c76669ae2502$var$_tagMetricInfo(transaction);\n }\n $17a4c76669ae2502$var$_lcpEntry = undefined;\n $17a4c76669ae2502$var$_clsEntry = undefined;\n $17a4c76669ae2502$var$_measurements = {};\n}\n/** Create measure related spans */ function $17a4c76669ae2502$export$bc93b84e4d45912d(transaction, // eslint-disable-next-line @typescript-eslint/no-explicit-any\nentry, startTime, duration, timeOrigin) {\n const measureStartTimestamp = timeOrigin + startTime;\n const measureEndTimestamp = measureStartTimestamp + duration;\n (0, $g2e6t._startChild)(transaction, {\n description: entry.name,\n endTimestamp: measureEndTimestamp,\n op: entry.entryType,\n origin: \"auto.resource.browser.metrics\",\n startTimestamp: measureStartTimestamp\n });\n return measureStartTimestamp;\n}\n/** Instrument navigation entries */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction $17a4c76669ae2502$var$_addNavigationSpans(transaction, entry, timeOrigin) {\n [\n \"unloadEvent\",\n \"redirect\",\n \"domContentLoadedEvent\",\n \"loadEvent\",\n \"connect\"\n ].forEach((event)=>{\n $17a4c76669ae2502$var$_addPerformanceNavigationTiming(transaction, entry, event, timeOrigin);\n });\n $17a4c76669ae2502$var$_addPerformanceNavigationTiming(transaction, entry, \"secureConnection\", timeOrigin, \"TLS/SSL\", \"connectEnd\");\n $17a4c76669ae2502$var$_addPerformanceNavigationTiming(transaction, entry, \"fetch\", timeOrigin, \"cache\", \"domainLookupStart\");\n $17a4c76669ae2502$var$_addPerformanceNavigationTiming(transaction, entry, \"domainLookup\", timeOrigin, \"DNS\");\n $17a4c76669ae2502$var$_addRequest(transaction, entry, timeOrigin);\n}\n/** Create performance navigation related spans */ function $17a4c76669ae2502$var$_addPerformanceNavigationTiming(transaction, // eslint-disable-next-line @typescript-eslint/no-explicit-any\nentry, event, timeOrigin, description, eventEnd) {\n const end = eventEnd ? entry[eventEnd] : entry[`${event}End`];\n const start = entry[`${event}Start`];\n if (!start || !end) return;\n (0, $g2e6t._startChild)(transaction, {\n op: \"browser\",\n origin: \"auto.browser.browser.metrics\",\n description: description || event,\n startTimestamp: timeOrigin + $17a4c76669ae2502$var$msToSec(start),\n endTimestamp: timeOrigin + $17a4c76669ae2502$var$msToSec(end)\n });\n}\n/** Create request and response related spans */ // eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction $17a4c76669ae2502$var$_addRequest(transaction, entry, timeOrigin) {\n (0, $g2e6t._startChild)(transaction, {\n op: \"browser\",\n origin: \"auto.browser.browser.metrics\",\n description: \"request\",\n startTimestamp: timeOrigin + $17a4c76669ae2502$var$msToSec(entry.requestStart),\n endTimestamp: timeOrigin + $17a4c76669ae2502$var$msToSec(entry.responseEnd)\n });\n (0, $g2e6t._startChild)(transaction, {\n op: \"browser\",\n origin: \"auto.browser.browser.metrics\",\n description: \"response\",\n startTimestamp: timeOrigin + $17a4c76669ae2502$var$msToSec(entry.responseStart),\n endTimestamp: timeOrigin + $17a4c76669ae2502$var$msToSec(entry.responseEnd)\n });\n}\n/** Create resource-related spans */ function $17a4c76669ae2502$export$c82fe1a70634f317(transaction, entry, resourceName, startTime, duration, timeOrigin) {\n // we already instrument based on fetch and xhr, so we don't need to\n // duplicate spans here.\n if (entry.initiatorType === \"xmlhttprequest\" || entry.initiatorType === \"fetch\") return;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const data = {};\n if (\"transferSize\" in entry) data[\"http.response_transfer_size\"] = entry.transferSize;\n if (\"encodedBodySize\" in entry) data[\"http.response_content_length\"] = entry.encodedBodySize;\n if (\"decodedBodySize\" in entry) data[\"http.decoded_response_content_length\"] = entry.decodedBodySize;\n if (\"renderBlockingStatus\" in entry) data[\"resource.render_blocking_status\"] = entry.renderBlockingStatus;\n const startTimestamp = timeOrigin + startTime;\n const endTimestamp = startTimestamp + duration;\n (0, $g2e6t._startChild)(transaction, {\n description: resourceName,\n endTimestamp: endTimestamp,\n op: entry.initiatorType ? `resource.${entry.initiatorType}` : \"resource.other\",\n origin: \"auto.resource.browser.metrics\",\n startTimestamp: startTimestamp,\n data: data\n });\n}\n/**\n * Capture the information of the user agent.\n */ function $17a4c76669ae2502$var$_trackNavigator(transaction) {\n const navigator = (0, $eKkm5.WINDOW).navigator;\n if (!navigator) return;\n // track network connectivity\n const connection = navigator.connection;\n if (connection) {\n if (connection.effectiveType) transaction.setTag(\"effectiveConnectionType\", connection.effectiveType);\n if (connection.type) transaction.setTag(\"connectionType\", connection.type);\n if ((0, $g2e6t.isMeasurementValue)(connection.rtt)) $17a4c76669ae2502$var$_measurements[\"connection.rtt\"] = {\n value: connection.rtt,\n unit: \"millisecond\"\n };\n }\n if ((0, $g2e6t.isMeasurementValue)(navigator.deviceMemory)) transaction.setTag(\"deviceMemory\", `${navigator.deviceMemory} GB`);\n if ((0, $g2e6t.isMeasurementValue)(navigator.hardwareConcurrency)) transaction.setTag(\"hardwareConcurrency\", String(navigator.hardwareConcurrency));\n}\n/** Add LCP / CLS data to transaction to allow debugging */ function $17a4c76669ae2502$var$_tagMetricInfo(transaction) {\n if ($17a4c76669ae2502$var$_lcpEntry) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"[Measurements] Adding LCP Data\");\n // Capture Properties of the LCP element that contributes to the LCP.\n if ($17a4c76669ae2502$var$_lcpEntry.element) transaction.setTag(\"lcp.element\", (0, $8SKxE.htmlTreeAsString)($17a4c76669ae2502$var$_lcpEntry.element));\n if ($17a4c76669ae2502$var$_lcpEntry.id) transaction.setTag(\"lcp.id\", $17a4c76669ae2502$var$_lcpEntry.id);\n if ($17a4c76669ae2502$var$_lcpEntry.url) // Trim URL to the first 200 characters.\n transaction.setTag(\"lcp.url\", $17a4c76669ae2502$var$_lcpEntry.url.trim().slice(0, 200));\n transaction.setTag(\"lcp.size\", $17a4c76669ae2502$var$_lcpEntry.size);\n }\n // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift\n if ($17a4c76669ae2502$var$_clsEntry && $17a4c76669ae2502$var$_clsEntry.sources) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"[Measurements] Adding CLS Data\");\n $17a4c76669ae2502$var$_clsEntry.sources.forEach((source, index)=>transaction.setTag(`cls.source.${index + 1}`, (0, $8SKxE.htmlTreeAsString)(source.node)));\n }\n}\n\n});\nparcelRegister(\"aPEnJ\", function(module, exports) {\n\n$parcel$export(module.exports, \"addClsInstrumentationHandler\", () => $7e2dfdc583f71ae7$export$861b82818b37ba5b);\n$parcel$export(module.exports, \"addLcpInstrumentationHandler\", () => $7e2dfdc583f71ae7$export$3fd4b53331200102);\n$parcel$export(module.exports, \"addFidInstrumentationHandler\", () => $7e2dfdc583f71ae7$export$2707d7471c0b918f);\n$parcel$export(module.exports, \"addPerformanceInstrumentationHandler\", () => $7e2dfdc583f71ae7$export$69816c1a049f8db6);\n\nvar $fxSvy = parcelRequire(\"fxSvy\");\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $6RVhN = parcelRequire(\"6RVhN\");\n\nvar $hbTjc = parcelRequire(\"hbTjc\");\n\nvar $cxxaY = parcelRequire(\"cxxaY\");\n\nvar $7l4XI = parcelRequire(\"7l4XI\");\nconst $7e2dfdc583f71ae7$var$handlers = {};\nconst $7e2dfdc583f71ae7$var$instrumented = {};\nlet $7e2dfdc583f71ae7$var$_previousCls;\nlet $7e2dfdc583f71ae7$var$_previousFid;\nlet $7e2dfdc583f71ae7$var$_previousLcp;\n/**\n * Add a callback that will be triggered when a CLS metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */ function $7e2dfdc583f71ae7$export$861b82818b37ba5b(callback) {\n return $7e2dfdc583f71ae7$var$addMetricObserver(\"cls\", callback, $7e2dfdc583f71ae7$var$instrumentCls, $7e2dfdc583f71ae7$var$_previousCls);\n}\n/**\n * Add a callback that will be triggered when a LCP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */ function $7e2dfdc583f71ae7$export$3fd4b53331200102(callback) {\n return $7e2dfdc583f71ae7$var$addMetricObserver(\"lcp\", callback, $7e2dfdc583f71ae7$var$instrumentLcp, $7e2dfdc583f71ae7$var$_previousLcp);\n}\n/**\n * Add a callback that will be triggered when a FID metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */ function $7e2dfdc583f71ae7$export$2707d7471c0b918f(callback) {\n return $7e2dfdc583f71ae7$var$addMetricObserver(\"fid\", callback, $7e2dfdc583f71ae7$var$instrumentFid, $7e2dfdc583f71ae7$var$_previousFid);\n}\n/**\n * Add a callback that will be triggered when a performance observer is triggered,\n * and receives the entries of the observer.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */ function $7e2dfdc583f71ae7$export$69816c1a049f8db6(type, callback) {\n $7e2dfdc583f71ae7$var$addHandler(type, callback);\n if (!$7e2dfdc583f71ae7$var$instrumented[type]) {\n $7e2dfdc583f71ae7$var$instrumentPerformanceObserver(type);\n $7e2dfdc583f71ae7$var$instrumented[type] = true;\n }\n return $7e2dfdc583f71ae7$var$getCleanupCallback(type, callback);\n}\n/** Trigger all handlers of a given type. */ function $7e2dfdc583f71ae7$var$triggerHandlers(type, data) {\n const typeHandlers = $7e2dfdc583f71ae7$var$handlers[type];\n if (!typeHandlers || !typeHandlers.length) return;\n for (const handler of typeHandlers)try {\n handler(data);\n } catch (e) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(`Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${(0, $fxSvy.getFunctionName)(handler)}\\nError:`, e);\n }\n}\nfunction $7e2dfdc583f71ae7$var$instrumentCls() {\n (0, $6RVhN.onCLS)((metric)=>{\n $7e2dfdc583f71ae7$var$triggerHandlers(\"cls\", {\n metric: metric\n });\n $7e2dfdc583f71ae7$var$_previousCls = metric;\n });\n}\nfunction $7e2dfdc583f71ae7$var$instrumentFid() {\n (0, $hbTjc.onFID)((metric)=>{\n $7e2dfdc583f71ae7$var$triggerHandlers(\"fid\", {\n metric: metric\n });\n $7e2dfdc583f71ae7$var$_previousFid = metric;\n });\n}\nfunction $7e2dfdc583f71ae7$var$instrumentLcp() {\n (0, $cxxaY.onLCP)((metric)=>{\n $7e2dfdc583f71ae7$var$triggerHandlers(\"lcp\", {\n metric: metric\n });\n $7e2dfdc583f71ae7$var$_previousLcp = metric;\n });\n}\nfunction $7e2dfdc583f71ae7$var$addMetricObserver(type, callback, instrumentFn, previousValue) {\n $7e2dfdc583f71ae7$var$addHandler(type, callback);\n if (!$7e2dfdc583f71ae7$var$instrumented[type]) {\n instrumentFn();\n $7e2dfdc583f71ae7$var$instrumented[type] = true;\n }\n if (previousValue) callback({\n metric: previousValue\n });\n return $7e2dfdc583f71ae7$var$getCleanupCallback(type, callback);\n}\nfunction $7e2dfdc583f71ae7$var$instrumentPerformanceObserver(type) {\n const options = {};\n // Special per-type options we want to use\n if (type === \"event\") options.durationThreshold = 0;\n (0, $7l4XI.observe)(type, (entries)=>{\n $7e2dfdc583f71ae7$var$triggerHandlers(type, {\n entries: entries\n });\n }, options);\n}\nfunction $7e2dfdc583f71ae7$var$addHandler(type, handler) {\n $7e2dfdc583f71ae7$var$handlers[type] = $7e2dfdc583f71ae7$var$handlers[type] || [];\n $7e2dfdc583f71ae7$var$handlers[type].push(handler);\n}\n// Get a callback which can be called to remove the instrumentation handler\nfunction $7e2dfdc583f71ae7$var$getCleanupCallback(type, callback) {\n return ()=>{\n const typeHandlers = $7e2dfdc583f71ae7$var$handlers[type];\n if (!typeHandlers) return;\n const index = typeHandlers.indexOf(callback);\n if (index !== -1) typeHandlers.splice(index, 1);\n };\n}\n\n});\nparcelRegister(\"6RVhN\", function(module, exports) {\n\n$parcel$export(module.exports, \"onCLS\", () => $5004211a3379e720$export$a7873055838e5ad8);\n\nvar $6htuU = parcelRequire(\"6htuU\");\n\nvar $h2Dpw = parcelRequire(\"h2Dpw\");\n\nvar $7l4XI = parcelRequire(\"7l4XI\");\n\nvar $hCBGv = parcelRequire(\"hCBGv\");\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ /**\n * Calculates the [CLS](https://web.dev/cls/) value for the current page and\n * calls the `callback` function once the value is ready to be reported, along\n * with all `layout-shift` performance entries that were used in the metric\n * value calculation. The reported value is a `double` (corresponding to a\n * [layout shift score](https://web.dev/cls/#layout-shift-score)).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** CLS should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */ const $5004211a3379e720$export$a7873055838e5ad8 = (onReport)=>{\n const metric = (0, $h2Dpw.initMetric)(\"CLS\", 0);\n let report;\n let sessionValue = 0;\n let sessionEntries = [];\n // const handleEntries = (entries: Metric['entries']) => {\n const handleEntries = (entries)=>{\n entries.forEach((entry)=>{\n // Only count layout shifts without recent user input.\n if (!entry.hadRecentInput) {\n const firstSessionEntry = sessionEntries[0];\n const lastSessionEntry = sessionEntries[sessionEntries.length - 1];\n // If the entry occurred less than 1 second after the previous entry and\n // less than 5 seconds after the first entry in the session, include the\n // entry in the current session. Otherwise, start a new session.\n if (sessionValue && sessionEntries.length !== 0 && entry.startTime - lastSessionEntry.startTime < 1000 && entry.startTime - firstSessionEntry.startTime < 5000) {\n sessionValue += entry.value;\n sessionEntries.push(entry);\n } else {\n sessionValue = entry.value;\n sessionEntries = [\n entry\n ];\n }\n // If the current session value is larger than the current CLS value,\n // update CLS and the entries contributing to it.\n if (sessionValue > metric.value) {\n metric.value = sessionValue;\n metric.entries = sessionEntries;\n if (report) report();\n }\n }\n });\n };\n const po = (0, $7l4XI.observe)(\"layout-shift\", handleEntries);\n if (po) {\n report = (0, $6htuU.bindReporter)(onReport, metric);\n const stopListening = ()=>{\n handleEntries(po.takeRecords());\n report(true);\n };\n (0, $hCBGv.onHidden)(stopListening);\n return stopListening;\n }\n return;\n};\n\n});\nparcelRegister(\"6htuU\", function(module, exports) {\n\n$parcel$export(module.exports, \"bindReporter\", () => $492b36332a705c53$export$17679dccdd551979);\nconst $492b36332a705c53$export$17679dccdd551979 = (callback, metric, reportAllChanges)=>{\n let prevValue;\n let delta;\n return (forceReport)=>{\n if (metric.value >= 0) {\n if (forceReport || reportAllChanges) {\n delta = metric.value - (prevValue || 0);\n // Report the metric if there's a non-zero delta or if no previous\n // value exists (which can happen in the case of the document becoming\n // hidden when the metric value is 0).\n // See: https://github.com/GoogleChrome/web-vitals/issues/14\n if (delta || prevValue === undefined) {\n prevValue = metric.value;\n metric.delta = delta;\n callback(metric);\n }\n }\n }\n };\n};\n\n});\n\nparcelRegister(\"h2Dpw\", function(module, exports) {\n\n$parcel$export(module.exports, \"initMetric\", () => $c68131b758542993$export$3c29b44508a0612b);\n\nvar $eKkm5 = parcelRequire(\"eKkm5\");\n\nvar $6LHZG = parcelRequire(\"6LHZG\");\n\nvar $01kTG = parcelRequire(\"01kTG\");\n\nvar $hMqmr = parcelRequire(\"hMqmr\");\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ const $c68131b758542993$export$3c29b44508a0612b = (name, value)=>{\n const navEntry = (0, $hMqmr.getNavigationEntry)();\n let navigationType = \"navigate\";\n if (navEntry) {\n if ((0, $eKkm5.WINDOW).document.prerendering || (0, $01kTG.getActivationStart)() > 0) navigationType = \"prerender\";\n else navigationType = navEntry.type.replace(/_/g, \"-\");\n }\n return {\n name: name,\n value: typeof value === \"undefined\" ? -1 : value,\n rating: \"good\",\n delta: 0,\n entries: [],\n id: (0, $6LHZG.generateUniqueID)(),\n navigationType: navigationType\n };\n};\n\n});\nparcelRegister(\"6LHZG\", function(module, exports) {\n\n$parcel$export(module.exports, \"generateUniqueID\", () => $4ed94220185c2472$export$407ea409d1f3b539);\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ /**\n * Performantly generate a unique, 30-char string by combining a version\n * number, the current timestamp with a 13-digit number integer.\n * @return {string}\n */ const $4ed94220185c2472$export$407ea409d1f3b539 = ()=>{\n return `v3-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;\n};\n\n});\n\nparcelRegister(\"01kTG\", function(module, exports) {\n\n$parcel$export(module.exports, \"getActivationStart\", () => $00404ddb8ea2dcd5$export$d3e828b3c7b5b845);\n\nvar $hMqmr = parcelRequire(\"hMqmr\");\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ const $00404ddb8ea2dcd5$export$d3e828b3c7b5b845 = ()=>{\n const navEntry = (0, $hMqmr.getNavigationEntry)();\n return navEntry && navEntry.activationStart || 0;\n};\n\n});\nparcelRegister(\"hMqmr\", function(module, exports) {\n\n$parcel$export(module.exports, \"getNavigationEntry\", () => $cf1b5e15ac1ab493$export$6431553786c94949);\n\nvar $eKkm5 = parcelRequire(\"eKkm5\");\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ const $cf1b5e15ac1ab493$var$getNavigationEntryFromPerformanceTiming = ()=>{\n // eslint-disable-next-line deprecation/deprecation\n const timing = (0, $eKkm5.WINDOW).performance.timing;\n // eslint-disable-next-line deprecation/deprecation\n const type = (0, $eKkm5.WINDOW).performance.navigation.type;\n const navigationEntry = {\n entryType: \"navigation\",\n startTime: 0,\n type: type == 2 ? \"back_forward\" : type === 1 ? \"reload\" : \"navigate\"\n };\n for(const key in timing)if (key !== \"navigationStart\" && key !== \"toJSON\") // eslint-disable-next-line deprecation/deprecation\n navigationEntry[key] = Math.max(timing[key] - timing.navigationStart, 0);\n return navigationEntry;\n};\nconst $cf1b5e15ac1ab493$export$6431553786c94949 = ()=>{\n if ((0, $eKkm5.WINDOW).__WEB_VITALS_POLYFILL__) return (0, $eKkm5.WINDOW).performance && (performance.getEntriesByType && performance.getEntriesByType(\"navigation\")[0] || $cf1b5e15ac1ab493$var$getNavigationEntryFromPerformanceTiming());\n else return (0, $eKkm5.WINDOW).performance && performance.getEntriesByType && performance.getEntriesByType(\"navigation\")[0];\n};\n\n});\n\n\n\nparcelRegister(\"7l4XI\", function(module, exports) {\n\n$parcel$export(module.exports, \"observe\", () => $557e57f25a2ff1c6$export$d1203567a167490e);\n/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */ const $557e57f25a2ff1c6$export$d1203567a167490e = (type, callback, opts)=>{\n try {\n if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n const po = new PerformanceObserver((list)=>{\n callback(list.getEntries());\n });\n po.observe(Object.assign({\n type: type,\n buffered: true\n }, opts || {}));\n return po;\n }\n } catch (e) {\n // Do nothing.\n }\n return;\n};\n\n});\n\nparcelRegister(\"hCBGv\", function(module, exports) {\n\n$parcel$export(module.exports, \"onHidden\", () => $cd4337a39bc4ec72$export$91ec2be6fdd8f1b4);\n\nvar $eKkm5 = parcelRequire(\"eKkm5\");\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ const $cd4337a39bc4ec72$export$91ec2be6fdd8f1b4 = (cb, once)=>{\n const onHiddenOrPageHide = (event)=>{\n if (event.type === \"pagehide\" || (0, $eKkm5.WINDOW).document.visibilityState === \"hidden\") {\n cb(event);\n if (once) {\n removeEventListener(\"visibilitychange\", onHiddenOrPageHide, true);\n removeEventListener(\"pagehide\", onHiddenOrPageHide, true);\n }\n }\n };\n addEventListener(\"visibilitychange\", onHiddenOrPageHide, true);\n // Some browsers have buggy implementations of visibilitychange,\n // so we use pagehide in addition, just to be safe.\n addEventListener(\"pagehide\", onHiddenOrPageHide, true);\n};\n\n});\n\n\nparcelRegister(\"hbTjc\", function(module, exports) {\n\n$parcel$export(module.exports, \"onFID\", () => $c83e5de965c7bdae$export$39705a25c49af873);\n\nvar $6htuU = parcelRequire(\"6htuU\");\n\nvar $aYJ7F = parcelRequire(\"aYJ7F\");\n\nvar $h2Dpw = parcelRequire(\"h2Dpw\");\n\nvar $7l4XI = parcelRequire(\"7l4XI\");\n\nvar $hCBGv = parcelRequire(\"hCBGv\");\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ /**\n * Calculates the [FID](https://web.dev/fid/) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `first-input` performance entry used to determine the value. The\n * reported value is a `DOMHighResTimeStamp`.\n *\n * _**Important:** since FID is only reported after the user interacts with the\n * page, it's possible that it will not be reported for some page loads._\n */ const $c83e5de965c7bdae$export$39705a25c49af873 = (onReport)=>{\n const visibilityWatcher = (0, $aYJ7F.getVisibilityWatcher)();\n const metric = (0, $h2Dpw.initMetric)(\"FID\");\n // eslint-disable-next-line prefer-const\n let report;\n const handleEntry = (entry)=>{\n // Only report if the page wasn't hidden prior to the first input.\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n metric.value = entry.processingStart - entry.startTime;\n metric.entries.push(entry);\n report(true);\n }\n };\n const handleEntries = (entries)=>{\n entries.forEach(handleEntry);\n };\n const po = (0, $7l4XI.observe)(\"first-input\", handleEntries);\n report = (0, $6htuU.bindReporter)(onReport, metric);\n if (po) (0, $hCBGv.onHidden)(()=>{\n handleEntries(po.takeRecords());\n po.disconnect();\n }, true);\n};\n\n});\nparcelRegister(\"aYJ7F\", function(module, exports) {\n\n$parcel$export(module.exports, \"getVisibilityWatcher\", () => $7fe282614dd24467$export$443f86b2c77012c4);\n\nvar $eKkm5 = parcelRequire(\"eKkm5\");\n\nvar $hCBGv = parcelRequire(\"hCBGv\");\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ let $7fe282614dd24467$var$firstHiddenTime = -1;\nconst $7fe282614dd24467$var$initHiddenTime = ()=>{\n // If the document is hidden and not prerendering, assume it was always\n // hidden and the page was loaded in the background.\n return (0, $eKkm5.WINDOW).document.visibilityState === \"hidden\" && !(0, $eKkm5.WINDOW).document.prerendering ? 0 : Infinity;\n};\nconst $7fe282614dd24467$var$trackChanges = ()=>{\n // Update the time if/when the document becomes hidden.\n (0, $hCBGv.onHidden)(({ timeStamp: timeStamp })=>{\n $7fe282614dd24467$var$firstHiddenTime = timeStamp;\n }, true);\n};\nconst $7fe282614dd24467$export$443f86b2c77012c4 = ()=>{\n if ($7fe282614dd24467$var$firstHiddenTime < 0) {\n // If the document is hidden when this code runs, assume it was hidden\n // since navigation start. This isn't a perfect heuristic, but it's the\n // best we can do until an API is available to support querying past\n // visibilityState.\n $7fe282614dd24467$var$firstHiddenTime = $7fe282614dd24467$var$initHiddenTime();\n $7fe282614dd24467$var$trackChanges();\n }\n return {\n get firstHiddenTime () {\n return $7fe282614dd24467$var$firstHiddenTime;\n }\n };\n};\n\n});\n\n\nparcelRegister(\"cxxaY\", function(module, exports) {\n\n$parcel$export(module.exports, \"onLCP\", () => $92124d293fb37e9b$export$947b1626ab8d5632);\n\nvar $6htuU = parcelRequire(\"6htuU\");\n\nvar $01kTG = parcelRequire(\"01kTG\");\n\nvar $aYJ7F = parcelRequire(\"aYJ7F\");\n\nvar $h2Dpw = parcelRequire(\"h2Dpw\");\n\nvar $7l4XI = parcelRequire(\"7l4XI\");\n\nvar $hCBGv = parcelRequire(\"hCBGv\");\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ const $92124d293fb37e9b$var$reportedMetricIDs = {};\n/**\n * Calculates the [LCP](https://web.dev/lcp/) value for the current page and\n * calls the `callback` function once the value is ready (along with the\n * relevant `largest-contentful-paint` performance entry used to determine the\n * value). The reported value is a `DOMHighResTimeStamp`.\n */ const $92124d293fb37e9b$export$947b1626ab8d5632 = (onReport)=>{\n const visibilityWatcher = (0, $aYJ7F.getVisibilityWatcher)();\n const metric = (0, $h2Dpw.initMetric)(\"LCP\");\n let report;\n const handleEntries = (entries)=>{\n const lastEntry = entries[entries.length - 1];\n if (lastEntry) {\n // The startTime attribute returns the value of the renderTime if it is\n // not 0, and the value of the loadTime otherwise. The activationStart\n // reference is used because LCP should be relative to page activation\n // rather than navigation start if the page was prerendered.\n const value = Math.max(lastEntry.startTime - (0, $01kTG.getActivationStart)(), 0);\n // Only report if the page wasn't hidden prior to LCP.\n if (value < visibilityWatcher.firstHiddenTime) {\n metric.value = value;\n metric.entries = [\n lastEntry\n ];\n report();\n }\n }\n };\n const po = (0, $7l4XI.observe)(\"largest-contentful-paint\", handleEntries);\n if (po) {\n report = (0, $6htuU.bindReporter)(onReport, metric);\n const stopListening = ()=>{\n if (!$92124d293fb37e9b$var$reportedMetricIDs[metric.id]) {\n handleEntries(po.takeRecords());\n po.disconnect();\n $92124d293fb37e9b$var$reportedMetricIDs[metric.id] = true;\n report(true);\n }\n };\n // Stop listening after input. Note: while scrolling is an input that\n // stop LCP observation, it's unreliable since it can be programmatically\n // generated. See: https://github.com/GoogleChrome/web-vitals/issues/75\n [\n \"keydown\",\n \"click\"\n ].forEach((type)=>{\n addEventListener(type, stopListening, {\n once: true,\n capture: true\n });\n });\n (0, $hCBGv.onHidden)(stopListening, true);\n return stopListening;\n }\n return;\n};\n\n});\n\n\nparcelRegister(\"g2e6t\", function(module, exports) {\n\n$parcel$export(module.exports, \"isMeasurementValue\", () => $bac7c5e2ea621c69$export$27169ccae1b439e3);\n$parcel$export(module.exports, \"_startChild\", () => $bac7c5e2ea621c69$export$8bd469e1f37aa721);\n/**\n * Checks if a given value is a valid measurement value.\n */ function $bac7c5e2ea621c69$export$27169ccae1b439e3(value) {\n return typeof value === \"number\" && isFinite(value);\n}\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n */ function $bac7c5e2ea621c69$export$8bd469e1f37aa721(transaction, { startTimestamp: startTimestamp, ...ctx }) {\n if (startTimestamp && transaction.startTimestamp > startTimestamp) transaction.startTimestamp = startTimestamp;\n return transaction.startChild({\n startTimestamp: startTimestamp,\n ...ctx\n });\n}\n\n});\n\n\nparcelRegister(\"eF6SP\", function(module, exports) {\n\n$parcel$export(module.exports, \"defaultRequestInstrumentationOptions\", () => $aaca3bedce12f6e4$export$cc17fb3c0bc95cd7);\n$parcel$export(module.exports, \"instrumentOutgoingRequests\", () => $aaca3bedce12f6e4$export$864489cb3478db3e);\n\nvar $1D41F = parcelRequire(\"1D41F\");\nvar $vjmKu = parcelRequire(\"vjmKu\");\nvar $6Em9x = parcelRequire(\"6Em9x\");\n\nvar $8GNPF = parcelRequire(\"8GNPF\");\nvar $1s9A9 = parcelRequire(\"1s9A9\");\nvar $hbZCn = parcelRequire(\"hbZCn\");\nvar $iI7u6 = parcelRequire(\"iI7u6\");\nvar $8cfrP = parcelRequire(\"8cfrP\");\nvar $6qV3U = parcelRequire(\"6qV3U\");\n\nvar $aPEnJ = parcelRequire(\"aPEnJ\");\n/* eslint-disable max-lines */ const $aaca3bedce12f6e4$export$15bd0305d05ad07b = [\n \"localhost\",\n /^\\/(?!\\/)/\n];\n/** Options for Request Instrumentation */ const $aaca3bedce12f6e4$export$cc17fb3c0bc95cd7 = {\n traceFetch: true,\n traceXHR: true,\n enableHTTPTimings: true,\n // TODO (v8): Remove this property\n tracingOrigins: $aaca3bedce12f6e4$export$15bd0305d05ad07b,\n tracePropagationTargets: $aaca3bedce12f6e4$export$15bd0305d05ad07b\n};\n/** Registers span creators for xhr and fetch requests */ function $aaca3bedce12f6e4$export$864489cb3478db3e(_options) {\n const { traceFetch: traceFetch, traceXHR: traceXHR, tracePropagationTargets: // eslint-disable-next-line deprecation/deprecation\n tracePropagationTargets, tracingOrigins: // eslint-disable-next-line deprecation/deprecation\n tracingOrigins, shouldCreateSpanForRequest: shouldCreateSpanForRequest, enableHTTPTimings: enableHTTPTimings } = {\n traceFetch: $aaca3bedce12f6e4$export$cc17fb3c0bc95cd7.traceFetch,\n traceXHR: $aaca3bedce12f6e4$export$cc17fb3c0bc95cd7.traceXHR,\n ..._options\n };\n const shouldCreateSpan = typeof shouldCreateSpanForRequest === \"function\" ? shouldCreateSpanForRequest : (_)=>true;\n // TODO(v8) Remove tracingOrigins here\n // The only reason we're passing it in here is because this instrumentOutgoingRequests function is publicly exported\n // and we don't want to break the API. We can remove it in v8.\n const shouldAttachHeadersWithTargets = (url)=>$aaca3bedce12f6e4$export$c260386ab3f0b3dd(url, tracePropagationTargets || tracingOrigins);\n const spans = {};\n if (traceFetch) (0, $8GNPF.addInstrumentationHandler)(\"fetch\", (handlerData)=>{\n const createdSpan = $aaca3bedce12f6e4$export$cd8846dd8ea4bd7a(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n if (enableHTTPTimings && createdSpan) $aaca3bedce12f6e4$var$addHTTPTimings(createdSpan);\n });\n if (traceXHR) (0, $8GNPF.addInstrumentationHandler)(\"xhr\", (handlerData)=>{\n const createdSpan = $aaca3bedce12f6e4$export$49680d91e75e2ef7(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n if (enableHTTPTimings && createdSpan) $aaca3bedce12f6e4$var$addHTTPTimings(createdSpan);\n });\n}\nfunction $aaca3bedce12f6e4$var$isPerformanceResourceTiming(entry) {\n return entry.entryType === \"resource\" && \"initiatorType\" in entry && typeof entry.nextHopProtocol === \"string\" && (entry.initiatorType === \"fetch\" || entry.initiatorType === \"xmlhttprequest\");\n}\n/**\n * Creates a temporary observer to listen to the next fetch/xhr resourcing timings,\n * so that when timings hit their per-browser limit they don't need to be removed.\n *\n * @param span A span that has yet to be finished, must contain `url` on data.\n */ function $aaca3bedce12f6e4$var$addHTTPTimings(span) {\n const url = span.data.url;\n if (!url) return;\n const cleanup = (0, $aPEnJ.addPerformanceInstrumentationHandler)(\"resource\", ({ entries: entries })=>{\n entries.forEach((entry)=>{\n if ($aaca3bedce12f6e4$var$isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) {\n const spanData = $aaca3bedce12f6e4$var$resourceTimingEntryToSpanData(entry);\n spanData.forEach((data)=>span.setData(...data));\n // In the next tick, clean this handler up\n // We have to wait here because otherwise this cleans itself up before it is fully done\n setTimeout(cleanup);\n }\n });\n });\n}\n/**\n * Converts ALPN protocol ids to name and version.\n *\n * (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)\n * @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol\n */ function $aaca3bedce12f6e4$export$57c6f824442f9fe1(nextHopProtocol) {\n let name = \"unknown\";\n let version = \"unknown\";\n let _name = \"\";\n for (const char of nextHopProtocol){\n // http/1.1 etc.\n if (char === \"/\") {\n [name, version] = nextHopProtocol.split(\"/\");\n break;\n }\n // h2, h3 etc.\n if (!isNaN(Number(char))) {\n name = _name === \"h\" ? \"http\" : _name;\n version = nextHopProtocol.split(_name)[1];\n break;\n }\n _name += char;\n }\n if (_name === nextHopProtocol) // webrtc, ftp, etc.\n name = _name;\n return {\n name: name,\n version: version\n };\n}\nfunction $aaca3bedce12f6e4$var$getAbsoluteTime(time = 0) {\n return (((0, $hbZCn.browserPerformanceTimeOrigin) || performance.timeOrigin) + time) / 1000;\n}\nfunction $aaca3bedce12f6e4$var$resourceTimingEntryToSpanData(resourceTiming) {\n const { name: name, version: version } = $aaca3bedce12f6e4$export$57c6f824442f9fe1(resourceTiming.nextHopProtocol);\n const timingSpanData = [];\n timingSpanData.push([\n \"network.protocol.version\",\n version\n ], [\n \"network.protocol.name\",\n name\n ]);\n if (!(0, $hbZCn.browserPerformanceTimeOrigin)) return timingSpanData;\n return [\n ...timingSpanData,\n [\n \"http.request.redirect_start\",\n $aaca3bedce12f6e4$var$getAbsoluteTime(resourceTiming.redirectStart)\n ],\n [\n \"http.request.fetch_start\",\n $aaca3bedce12f6e4$var$getAbsoluteTime(resourceTiming.fetchStart)\n ],\n [\n \"http.request.domain_lookup_start\",\n $aaca3bedce12f6e4$var$getAbsoluteTime(resourceTiming.domainLookupStart)\n ],\n [\n \"http.request.domain_lookup_end\",\n $aaca3bedce12f6e4$var$getAbsoluteTime(resourceTiming.domainLookupEnd)\n ],\n [\n \"http.request.connect_start\",\n $aaca3bedce12f6e4$var$getAbsoluteTime(resourceTiming.connectStart)\n ],\n [\n \"http.request.secure_connection_start\",\n $aaca3bedce12f6e4$var$getAbsoluteTime(resourceTiming.secureConnectionStart)\n ],\n [\n \"http.request.connection_end\",\n $aaca3bedce12f6e4$var$getAbsoluteTime(resourceTiming.connectEnd)\n ],\n [\n \"http.request.request_start\",\n $aaca3bedce12f6e4$var$getAbsoluteTime(resourceTiming.requestStart)\n ],\n [\n \"http.request.response_start\",\n $aaca3bedce12f6e4$var$getAbsoluteTime(resourceTiming.responseStart)\n ],\n [\n \"http.request.response_end\",\n $aaca3bedce12f6e4$var$getAbsoluteTime(resourceTiming.responseEnd)\n ]\n ];\n}\n/**\n * A function that determines whether to attach tracing headers to a request.\n * This was extracted from `instrumentOutgoingRequests` to make it easier to test shouldAttachHeaders.\n * We only export this fuction for testing purposes.\n */ function $aaca3bedce12f6e4$export$c260386ab3f0b3dd(url, tracePropagationTargets) {\n return (0, $6qV3U.stringMatchesSomePattern)(url, tracePropagationTargets || $aaca3bedce12f6e4$export$15bd0305d05ad07b);\n}\n/**\n * Create and track fetch request spans\n *\n * @returns Span if a span was created, otherwise void.\n */ function $aaca3bedce12f6e4$export$cd8846dd8ea4bd7a(handlerData, shouldCreateSpan, shouldAttachHeaders, spans) {\n if (!(0, $6Em9x.hasTracingEnabled)() || !handlerData.fetchData) return undefined;\n const shouldCreateSpanResult = shouldCreateSpan(handlerData.fetchData.url);\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = handlerData.fetchData.__span;\n if (!spanId) return;\n const span = spans[spanId];\n if (span) {\n if (handlerData.response) {\n // TODO (kmclb) remove this once types PR goes through\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n span.setHttpStatus(handlerData.response.status);\n const contentLength = // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n handlerData.response && handlerData.response.headers && handlerData.response.headers.get(\"content-length\");\n const contentLengthNum = parseInt(contentLength);\n if (contentLengthNum > 0) span.setData(\"http.response_content_length\", contentLengthNum);\n } else if (handlerData.error) span.setStatus(\"internal_error\");\n span.finish();\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n const hub = (0, $1D41F.getCurrentHub)();\n const scope = hub.getScope();\n const client = hub.getClient();\n const parentSpan = scope.getSpan();\n const { method: method, url: url } = handlerData.fetchData;\n const span = shouldCreateSpanResult && parentSpan ? parentSpan.startChild({\n data: {\n url: url,\n type: \"fetch\",\n \"http.method\": method\n },\n description: `${method} ${url}`,\n op: \"http.client\",\n origin: \"auto.http.browser\"\n }) : undefined;\n if (span) {\n handlerData.fetchData.__span = span.spanId;\n spans[span.spanId] = span;\n }\n if (shouldAttachHeaders(handlerData.fetchData.url) && client) {\n const request = handlerData.args[0];\n // In case the user hasn't set the second argument of a fetch call we default it to `{}`.\n handlerData.args[1] = handlerData.args[1] || {};\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const options = handlerData.args[1];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n options.headers = $aaca3bedce12f6e4$export$6717acf674206871(request, client, scope, options, span);\n }\n return span;\n}\n/**\n * Adds sentry-trace and baggage headers to the various forms of fetch headers\n */ function $aaca3bedce12f6e4$export$6717acf674206871(request, client, scope, options, requestSpan) {\n const span = requestSpan || scope.getSpan();\n const transaction = span && span.transaction;\n const { traceId: traceId, sampled: sampled, dsc: dsc } = scope.getPropagationContext();\n const sentryTraceHeader = span ? span.toTraceparent() : (0, $iI7u6.generateSentryTraceHeader)(traceId, undefined, sampled);\n const dynamicSamplingContext = transaction ? transaction.getDynamicSamplingContext() : dsc ? dsc : (0, $vjmKu.getDynamicSamplingContextFromClient)(traceId, client, scope);\n const sentryBaggageHeader = (0, $1s9A9.dynamicSamplingContextToSentryBaggageHeader)(dynamicSamplingContext);\n const headers = typeof Request !== \"undefined\" && (0, $8cfrP.isInstanceOf)(request, Request) ? request.headers : options.headers;\n if (!headers) return {\n \"sentry-trace\": sentryTraceHeader,\n baggage: sentryBaggageHeader\n };\n else if (typeof Headers !== \"undefined\" && (0, $8cfrP.isInstanceOf)(headers, Headers)) {\n const newHeaders = new Headers(headers);\n newHeaders.append(\"sentry-trace\", sentryTraceHeader);\n if (sentryBaggageHeader) // If the same header is appended multiple times the browser will merge the values into a single request header.\n // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n newHeaders.append((0, $1s9A9.BAGGAGE_HEADER_NAME), sentryBaggageHeader);\n return newHeaders;\n } else if (Array.isArray(headers)) {\n const newHeaders = [\n ...headers,\n [\n \"sentry-trace\",\n sentryTraceHeader\n ]\n ];\n if (sentryBaggageHeader) // If there are multiple entries with the same key, the browser will merge the values into a single request header.\n // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n newHeaders.push([\n (0, $1s9A9.BAGGAGE_HEADER_NAME),\n sentryBaggageHeader\n ]);\n return newHeaders;\n } else {\n const existingBaggageHeader = \"baggage\" in headers ? headers.baggage : undefined;\n const newBaggageHeaders = [];\n if (Array.isArray(existingBaggageHeader)) newBaggageHeaders.push(...existingBaggageHeader);\n else if (existingBaggageHeader) newBaggageHeaders.push(existingBaggageHeader);\n if (sentryBaggageHeader) newBaggageHeaders.push(sentryBaggageHeader);\n return {\n ...headers,\n \"sentry-trace\": sentryTraceHeader,\n baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(\",\") : undefined\n };\n }\n}\n/**\n * Create and track xhr request spans\n *\n * @returns Span if a span was created, otherwise void.\n */ // eslint-disable-next-line complexity\nfunction $aaca3bedce12f6e4$export$49680d91e75e2ef7(handlerData, shouldCreateSpan, shouldAttachHeaders, spans) {\n const xhr = handlerData.xhr;\n const sentryXhrData = xhr && xhr[0, $8GNPF.SENTRY_XHR_DATA_KEY];\n if (!(0, $6Em9x.hasTracingEnabled)() || xhr && xhr.__sentry_own_request__ || !xhr || !sentryXhrData) return undefined;\n const shouldCreateSpanResult = shouldCreateSpan(sentryXhrData.url);\n // check first if the request has finished and is tracked by an existing span which should now end\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = xhr.__sentry_xhr_span_id__;\n if (!spanId) return;\n const span = spans[spanId];\n if (span) {\n span.setHttpStatus(sentryXhrData.status_code);\n span.finish();\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n const hub = (0, $1D41F.getCurrentHub)();\n const scope = hub.getScope();\n const parentSpan = scope.getSpan();\n const span = shouldCreateSpanResult && parentSpan ? parentSpan.startChild({\n data: {\n ...sentryXhrData.data,\n type: \"xhr\",\n \"http.method\": sentryXhrData.method,\n url: sentryXhrData.url\n },\n description: `${sentryXhrData.method} ${sentryXhrData.url}`,\n op: \"http.client\",\n origin: \"auto.http.browser\"\n }) : undefined;\n if (span) {\n xhr.__sentry_xhr_span_id__ = span.spanId;\n spans[xhr.__sentry_xhr_span_id__] = span;\n }\n if (xhr.setRequestHeader && shouldAttachHeaders(sentryXhrData.url)) {\n if (span) {\n const transaction = span && span.transaction;\n const dynamicSamplingContext = transaction && transaction.getDynamicSamplingContext();\n const sentryBaggageHeader = (0, $1s9A9.dynamicSamplingContextToSentryBaggageHeader)(dynamicSamplingContext);\n $aaca3bedce12f6e4$var$setHeaderOnXhr(xhr, span.toTraceparent(), sentryBaggageHeader);\n } else {\n const client = hub.getClient();\n const { traceId: traceId, sampled: sampled, dsc: dsc } = scope.getPropagationContext();\n const sentryTraceHeader = (0, $iI7u6.generateSentryTraceHeader)(traceId, undefined, sampled);\n const dynamicSamplingContext = dsc || (client ? (0, $vjmKu.getDynamicSamplingContextFromClient)(traceId, client, scope) : undefined);\n const sentryBaggageHeader = (0, $1s9A9.dynamicSamplingContextToSentryBaggageHeader)(dynamicSamplingContext);\n $aaca3bedce12f6e4$var$setHeaderOnXhr(xhr, sentryTraceHeader, sentryBaggageHeader);\n }\n }\n return span;\n}\nfunction $aaca3bedce12f6e4$var$setHeaderOnXhr(xhr, sentryTraceHeader, sentryBaggageHeader) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader(\"sentry-trace\", sentryTraceHeader);\n if (sentryBaggageHeader) // From MDN: \"If this method is called several times with the same header, the values are merged into one single request header.\"\n // We can therefore simply set a baggage header without checking what was there before\n // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader((0, $1s9A9.BAGGAGE_HEADER_NAME), sentryBaggageHeader);\n } catch (_) {\n // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n }\n}\n\n});\n\nparcelRegister(\"cJLfg\", function(module, exports) {\n\n$parcel$export(module.exports, \"instrumentRoutingWithDefaults\", () => $945e55ebcf49ab38$export$86649cc09fe75143);\n\nvar $8GNPF = parcelRequire(\"8GNPF\");\nvar $hbZCn = parcelRequire(\"hbZCn\");\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $eKkm5 = parcelRequire(\"eKkm5\");\n/**\n * Default function implementing pageload and navigation transactions\n */ function $945e55ebcf49ab38$export$86649cc09fe75143(customStartTransaction, startTransactionOnPageLoad = true, startTransactionOnLocationChange = true) {\n if (!(0, $eKkm5.WINDOW) || !(0, $eKkm5.WINDOW).location) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(\"Could not initialize routing instrumentation due to invalid location\");\n return;\n }\n let startingUrl = (0, $eKkm5.WINDOW).location.href;\n let activeTransaction;\n if (startTransactionOnPageLoad) activeTransaction = customStartTransaction({\n name: (0, $eKkm5.WINDOW).location.pathname,\n // pageload should always start at timeOrigin (and needs to be in s, not ms)\n startTimestamp: (0, $hbZCn.browserPerformanceTimeOrigin) ? (0, $hbZCn.browserPerformanceTimeOrigin) / 1000 : undefined,\n op: \"pageload\",\n origin: \"auto.pageload.browser\",\n metadata: {\n source: \"url\"\n }\n });\n if (startTransactionOnLocationChange) (0, $8GNPF.addInstrumentationHandler)(\"history\", ({ to: to, from: from })=>{\n /**\n * This early return is there to account for some cases where a navigation transaction starts right after\n * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n * create an uneccessary navigation transaction.\n *\n * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n * only be caused in certain development environments where the usage of a hot module reloader is causing\n * errors.\n */ if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) {\n startingUrl = undefined;\n return;\n }\n if (from !== to) {\n startingUrl = undefined;\n if (activeTransaction) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(`[Tracing] Finishing current transaction with op: ${activeTransaction.op}`);\n // If there's an open transaction on the scope, we need to finish it before creating an new one.\n activeTransaction.finish();\n }\n activeTransaction = customStartTransaction({\n name: (0, $eKkm5.WINDOW).location.pathname,\n op: \"navigation\",\n origin: \"auto.navigation.browser\",\n metadata: {\n source: \"url\"\n }\n });\n }\n });\n}\n\n});\n\n\nparcelRegister(\"kIlbl\", function(module, exports) {\n\n$parcel$export(module.exports, \"Express\", () => $f14858ffb6e8fa17$export$6dafdd8fec05099d);\n\nvar $4I4m1 = parcelRequire(\"4I4m1\");\nvar $inESk = parcelRequire(\"inESk\");\nvar $iKY39 = parcelRequire(\"iKY39\");\nvar $8cfrP = parcelRequire(\"8cfrP\");\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $3yaN4 = parcelRequire(\"3yaN4\");\n\nvar $hP8pc = parcelRequire(\"hP8pc\");\n/**\n * Express integration\n *\n * Provides an request and error handler for Express framework as well as tracing capabilities\n */ class $f14858ffb6e8fa17$export$6dafdd8fec05099d {\n /**\n * @inheritDoc\n */ static __initStatic() {\n this.id = \"Express\";\n }\n /**\n * @inheritDoc\n */ /**\n * Express App instance\n */ /**\n * @inheritDoc\n */ constructor(options = {}){\n this.name = $f14858ffb6e8fa17$export$6dafdd8fec05099d.id;\n this._router = options.router || options.app;\n this._methods = (Array.isArray(options.methods) ? options.methods : []).concat(\"use\");\n }\n /**\n * @inheritDoc\n */ setupOnce(_, getCurrentHub) {\n if (!this._router) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(\"ExpressIntegration is missing an Express instance\");\n return;\n }\n if ((0, $3yaN4.shouldDisableAutoInstrumentation)(getCurrentHub)) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"Express Integration is skipped because of instrumenter configuration.\");\n return;\n }\n $f14858ffb6e8fa17$var$instrumentMiddlewares(this._router, this._methods);\n $f14858ffb6e8fa17$var$instrumentRouter(this._router);\n }\n}\n$f14858ffb6e8fa17$export$6dafdd8fec05099d.__initStatic();\n/**\n * Wraps original middleware function in a tracing call, which stores the info about the call as a span,\n * and finishes it once the middleware is done invoking.\n *\n * Express middlewares have 3 various forms, thus we have to take care of all of them:\n * // sync\n * app.use(function (req, res) { ... })\n * // async\n * app.use(function (req, res, next) { ... })\n * // error handler\n * app.use(function (err, req, res, next) { ... })\n *\n * They all internally delegate to the `router[method]` of the given application instance.\n */ // eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-explicit-any\nfunction $f14858ffb6e8fa17$var$wrap(fn, method) {\n const arity = fn.length;\n switch(arity){\n case 2:\n return function(req, res) {\n const transaction = res.__sentry_transaction;\n if (transaction) {\n const span = transaction.startChild({\n description: fn.name,\n op: `middleware.express.${method}`,\n origin: \"auto.middleware.express\"\n });\n res.once(\"finish\", ()=>{\n span.finish();\n });\n }\n return fn.call(this, req, res);\n };\n case 3:\n return function(req, res, next) {\n const transaction = res.__sentry_transaction;\n const span = (0, $4I4m1._optionalChain)([\n transaction,\n \"optionalAccess\",\n (_2)=>_2.startChild,\n \"call\",\n (_3)=>_3({\n description: fn.name,\n op: `middleware.express.${method}`,\n origin: \"auto.middleware.express\"\n })\n ]);\n fn.call(this, req, res, function(...args) {\n (0, $4I4m1._optionalChain)([\n span,\n \"optionalAccess\",\n (_4)=>_4.finish,\n \"call\",\n (_5)=>_5()\n ]);\n next.call(this, ...args);\n });\n };\n case 4:\n return function(err, req, res, next) {\n const transaction = res.__sentry_transaction;\n const span = (0, $4I4m1._optionalChain)([\n transaction,\n \"optionalAccess\",\n (_6)=>_6.startChild,\n \"call\",\n (_7)=>_7({\n description: fn.name,\n op: `middleware.express.${method}`,\n origin: \"auto.middleware.express\"\n })\n ]);\n fn.call(this, err, req, res, function(...args) {\n (0, $4I4m1._optionalChain)([\n span,\n \"optionalAccess\",\n (_8)=>_8.finish,\n \"call\",\n (_9)=>_9()\n ]);\n next.call(this, ...args);\n });\n };\n default:\n throw new Error(`Express middleware takes 2-4 arguments. Got: ${arity}`);\n }\n}\n/**\n * Takes all the function arguments passed to the original `app` or `router` method, eg. `app.use` or `router.use`\n * and wraps every function, as well as array of functions with a call to our `wrap` method.\n * We have to take care of the arrays as well as iterate over all of the arguments,\n * as `app.use` can accept middlewares in few various forms.\n *\n * app.use([], )\n * app.use([], , ...)\n * app.use([], ...[])\n */ function $f14858ffb6e8fa17$var$wrapMiddlewareArgs(args, method) {\n return args.map((arg)=>{\n if (typeof arg === \"function\") return $f14858ffb6e8fa17$var$wrap(arg, method);\n if (Array.isArray(arg)) return arg.map((a)=>{\n if (typeof a === \"function\") return $f14858ffb6e8fa17$var$wrap(a, method);\n return a;\n });\n return arg;\n });\n}\n/**\n * Patches original router to utilize our tracing functionality\n */ function $f14858ffb6e8fa17$var$patchMiddleware(router, method) {\n const originalCallback = router[method];\n router[method] = function(...args) {\n return originalCallback.call(this, ...$f14858ffb6e8fa17$var$wrapMiddlewareArgs(args, method));\n };\n return router;\n}\n/**\n * Patches original router methods\n */ function $f14858ffb6e8fa17$var$instrumentMiddlewares(router, methods = []) {\n methods.forEach((method)=>$f14858ffb6e8fa17$var$patchMiddleware(router, method));\n}\n/**\n * Patches the prototype of Express.Router to accumulate the resolved route\n * if a layer instance's `match` function was called and it returned a successful match.\n *\n * @see https://github.com/expressjs/express/blob/master/lib/router/index.js\n *\n * @param appOrRouter the router instance which can either be an app (i.e. top-level) or a (nested) router.\n */ function $f14858ffb6e8fa17$var$instrumentRouter(appOrRouter) {\n // This is how we can distinguish between app and routers\n const isApp = \"settings\" in appOrRouter;\n // In case the app's top-level router hasn't been initialized yet, we have to do it now\n if (isApp && appOrRouter._router === undefined && appOrRouter.lazyrouter) appOrRouter.lazyrouter();\n const router = isApp ? appOrRouter._router : appOrRouter;\n if (!router) {\n /*\n If we end up here, this means likely that this integration is used with Express 3 or Express 5.\n For now, we don't support these versions (3 is very old and 5 is still in beta). To support Express 5,\n we'd need to make more changes to the routing instrumentation because the router is no longer part of\n the Express core package but maintained in its own package. The new router has different function\n signatures and works slightly differently, demanding more changes than just taking the router from\n `app.router` instead of `app._router`.\n @see https://github.com/pillarjs/router\n\n TODO: Proper Express 5 support\n */ (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).debug(\"Cannot instrument router for URL Parameterization (did not find a valid router).\");\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).debug(\"Routing instrumentation is currently only supported in Express 4.\");\n return;\n }\n const routerProto = Object.getPrototypeOf(router);\n const originalProcessParams = routerProto.process_params;\n routerProto.process_params = function process_params(layer, called, req, res, done) {\n // Base case: We're in the first part of the URL (thus we start with the root '/')\n if (!req._reconstructedRoute) req._reconstructedRoute = \"\";\n // If the layer's partial route has params, is a regex or an array, the route is stored in layer.route.\n const { layerRoutePath: layerRoutePath, isRegex: isRegex, isArray: isArray, numExtraSegments: numExtraSegments } = $f14858ffb6e8fa17$var$getLayerRoutePathInfo(layer);\n if (layerRoutePath || isRegex || isArray) req._hasParameters = true;\n // Otherwise, the hardcoded path (i.e. a partial route without params) is stored in layer.path\n let partialRoute;\n if (layerRoutePath) partialRoute = layerRoutePath;\n else /**\n * prevent duplicate segment in _reconstructedRoute param if router match multiple routes before final path\n * example:\n * original url: /api/v1/1234\n * prevent: /api/api/v1/:userId\n * router structure\n * /api -> middleware\n * /api/v1 -> middleware\n * /1234 -> endpoint with param :userId\n * final _reconstructedRoute is /api/v1/:userId\n */ partialRoute = $f14858ffb6e8fa17$export$ea5dbbfd8423c1fa(req.originalUrl, req._reconstructedRoute, layer.path) || \"\";\n // Normalize the partial route so that it doesn't contain leading or trailing slashes\n // and exclude empty or '*' wildcard routes.\n // The exclusion of '*' routes is our best effort to not \"pollute\" the transaction name\n // with interim handlers (e.g. ones that check authentication or do other middleware stuff).\n // We want to end up with the parameterized URL of the incoming request without any extraneous path segments.\n const finalPartialRoute = partialRoute.split(\"/\").filter((segment)=>segment.length > 0 && (isRegex || isArray || !segment.includes(\"*\"))).join(\"/\");\n // If we found a valid partial URL, we append it to the reconstructed route\n if (finalPartialRoute && finalPartialRoute.length > 0) // If the partial route is from a regex route, we append a '/' to close the regex\n req._reconstructedRoute += `/${finalPartialRoute}${isRegex ? \"/\" : \"\"}`;\n // Now we check if we are in the \"last\" part of the route. We determine this by comparing the\n // number of URL segments from the original URL to that of our reconstructed parameterized URL.\n // If we've reached our final destination, we update the transaction name.\n const urlLength = (0, $iKY39.getNumberOfUrlSegments)((0, $iKY39.stripUrlQueryAndFragment)(req.originalUrl || \"\")) + numExtraSegments;\n const routeLength = (0, $iKY39.getNumberOfUrlSegments)(req._reconstructedRoute);\n if (urlLength === routeLength) {\n if (!req._hasParameters) {\n if (req._reconstructedRoute !== req.originalUrl) req._reconstructedRoute = req.originalUrl ? (0, $iKY39.stripUrlQueryAndFragment)(req.originalUrl) : req.originalUrl;\n }\n const transaction = res.__sentry_transaction;\n if (transaction && transaction.metadata.source !== \"custom\") {\n // If the request URL is '/' or empty, the reconstructed route will be empty.\n // Therefore, we fall back to setting the final route to '/' in this case.\n const finalRoute = req._reconstructedRoute || \"/\";\n transaction.setName(...(0, $inESk.extractPathForTransaction)(req, {\n path: true,\n method: true,\n customRoute: finalRoute\n }));\n }\n }\n return originalProcessParams.call(this, layer, called, req, res, done);\n };\n}\n/**\n * Recreate layer.route.path from layer.regexp and layer.keys.\n * Works until express.js used package path-to-regexp@0.1.7\n * or until layer.keys contain offset attribute\n *\n * @param layer the layer to extract the stringified route from\n *\n * @returns string in layer.route.path structure 'router/:pathParam' or undefined\n */ const $f14858ffb6e8fa17$export$bde9c19304d7dbd3 = (path, regexp, keys)=>{\n if (!path || !regexp || !keys || Object.keys(keys).length === 0 || !(0, $4I4m1._optionalChain)([\n keys,\n \"access\",\n (_10)=>_10[0],\n \"optionalAccess\",\n (_11)=>_11.offset\n ])) return undefined;\n const orderedKeys = keys.sort((a, b)=>a.offset - b.offset);\n // add d flag for getting indices from regexp result\n const pathRegex = new RegExp(regexp, `${regexp.flags}d`);\n /**\n * use custom type cause of TS error with missing indices in RegExpExecArray\n */ const execResult = pathRegex.exec(path);\n if (!execResult || !execResult.indices) return undefined;\n /**\n * remove first match from regex cause contain whole layer.path\n */ const [, ...paramIndices] = execResult.indices;\n if (paramIndices.length !== orderedKeys.length) return undefined;\n let resultPath = path;\n let indexShift = 0;\n /**\n * iterate param matches from regexp.exec\n */ paramIndices.forEach((item, index)=>{\n /** check if offsets is define because in some cases regex d flag returns undefined */ if (item) {\n const [startOffset, endOffset] = item;\n /**\n * isolate part before param\n */ const substr1 = resultPath.substring(0, startOffset - indexShift);\n /**\n * define paramName as replacement in format :pathParam\n */ const replacement = `:${orderedKeys[index].name}`;\n /**\n * isolate part after param\n */ const substr2 = resultPath.substring(endOffset - indexShift);\n /**\n * recreate original path but with param replacement\n */ resultPath = substr1 + replacement + substr2;\n /**\n * calculate new index shift after resultPath was modified\n */ indexShift = indexShift + (endOffset - startOffset - replacement.length);\n }\n });\n return resultPath;\n};\n/**\n * Extracts and stringifies the layer's route which can either be a string with parameters (`users/:id`),\n * a RegEx (`/test/`) or an array of strings and regexes (`['/path1', /\\/path[2-5]/, /path/:id]`). Additionally\n * returns extra information about the route, such as if the route is defined as regex or as an array.\n *\n * @param layer the layer to extract the stringified route from\n *\n * @returns an object containing the stringified route, a flag determining if the route was a regex\n * and the number of extra segments to the matched path that are additionally in the route,\n * if the route was an array (defaults to 0).\n */ function $f14858ffb6e8fa17$var$getLayerRoutePathInfo(layer) {\n let lrp = (0, $4I4m1._optionalChain)([\n layer,\n \"access\",\n (_12)=>_12.route,\n \"optionalAccess\",\n (_13)=>_13.path\n ]);\n const isRegex = (0, $8cfrP.isRegExp)(lrp);\n const isArray = Array.isArray(lrp);\n if (!lrp) {\n // parse node.js major version\n const [major] = $hP8pc.versions.node.split(\".\").map(Number);\n // allow call extractOriginalRoute only if node version support Regex d flag, node 16+\n if (major >= 16) /**\n * If lrp does not exist try to recreate original layer path from route regexp\n */ lrp = $f14858ffb6e8fa17$export$bde9c19304d7dbd3(layer.path, layer.regexp, layer.keys);\n }\n if (!lrp) return {\n isRegex: isRegex,\n isArray: isArray,\n numExtraSegments: 0\n };\n const numExtraSegments = isArray ? Math.max($f14858ffb6e8fa17$var$getNumberOfArrayUrlSegments(lrp) - (0, $iKY39.getNumberOfUrlSegments)(layer.path || \"\"), 0) : 0;\n const layerRoutePath = $f14858ffb6e8fa17$var$getLayerRoutePathString(isArray, lrp);\n return {\n layerRoutePath: layerRoutePath,\n isRegex: isRegex,\n isArray: isArray,\n numExtraSegments: numExtraSegments\n };\n}\n/**\n * Returns the number of URL segments in an array of routes\n *\n * Example: ['/api/test', /\\/api\\/post[0-9]/, '/users/:id/details`] -> 7\n */ function $f14858ffb6e8fa17$var$getNumberOfArrayUrlSegments(routesArray) {\n return routesArray.reduce((accNumSegments, currentRoute)=>{\n // array members can be a RegEx -> convert them toString\n return accNumSegments + (0, $iKY39.getNumberOfUrlSegments)(currentRoute.toString());\n }, 0);\n}\n/**\n * Extracts and returns the stringified version of the layers route path\n * Handles route arrays (by joining the paths together) as well as RegExp and normal\n * string values (in the latter case the toString conversion is technically unnecessary but\n * it doesn't hurt us either).\n */ function $f14858ffb6e8fa17$var$getLayerRoutePathString(isArray, lrp) {\n if (isArray) return lrp.map((r)=>r.toString()).join(\",\");\n return lrp && lrp.toString();\n}\n/**\n * remove duplicate segment contain in layerPath against reconstructedRoute,\n * and return only unique segment that can be added into reconstructedRoute\n */ function $f14858ffb6e8fa17$export$ea5dbbfd8423c1fa(originalUrl, reconstructedRoute, layerPath) {\n const originalUrlSplit = (0, $4I4m1._optionalChain)([\n originalUrl,\n \"optionalAccess\",\n (_14)=>_14.split,\n \"call\",\n (_15)=>_15(\"/\"),\n \"access\",\n (_16)=>_16.filter,\n \"call\",\n (_17)=>_17((v)=>!!v)\n ]);\n let tempCounter = 0;\n const currentOffset = (0, $4I4m1._optionalChain)([\n reconstructedRoute,\n \"optionalAccess\",\n (_18)=>_18.split,\n \"call\",\n (_19)=>_19(\"/\"),\n \"access\",\n (_20)=>_20.filter,\n \"call\",\n (_21)=>_21((v)=>!!v),\n \"access\",\n (_22)=>_22.length\n ]) || 0;\n const result = (0, $4I4m1._optionalChain)([\n layerPath,\n \"optionalAccess\",\n (_23)=>_23.split,\n \"call\",\n (_24)=>_24(\"/\"),\n \"access\",\n (_25)=>_25.filter,\n \"call\",\n (_26)=>_26((segment)=>{\n if ((0, $4I4m1._optionalChain)([\n originalUrlSplit,\n \"optionalAccess\",\n (_27)=>_27[currentOffset + tempCounter]\n ]) === segment) {\n tempCounter += 1;\n return true;\n }\n return false;\n }),\n \"access\",\n (_28)=>_28.join,\n \"call\",\n (_29)=>_29(\"/\")\n ]);\n return result;\n}\n\n});\nparcelRegister(\"inESk\", function(module, exports) {\n\n$parcel$export(module.exports, \"extractPathForTransaction\", () => $d61a14f058aa8e95$export$8c5ebee2e5bb9575);\n\nvar $8cfrP = parcelRequire(\"8cfrP\");\n\nvar $2mHZf = parcelRequire(\"2mHZf\");\n\nvar $iKY39 = parcelRequire(\"iKY39\");\nconst $d61a14f058aa8e95$var$DEFAULT_INCLUDES = {\n ip: false,\n request: true,\n transaction: true,\n user: true\n};\nconst $d61a14f058aa8e95$var$DEFAULT_REQUEST_INCLUDES = [\n \"cookies\",\n \"data\",\n \"headers\",\n \"method\",\n \"query_string\",\n \"url\"\n];\nconst $d61a14f058aa8e95$var$DEFAULT_USER_INCLUDES = [\n \"id\",\n \"username\",\n \"email\"\n];\n/**\n * Sets parameterized route as transaction name e.g.: `GET /users/:id`\n * Also adds more context data on the transaction from the request\n */ function $d61a14f058aa8e95$export$1973410ef8793cd6(transaction, req, deps) {\n if (!transaction) return;\n if (!transaction.metadata.source || transaction.metadata.source === \"url\") // Attempt to grab a parameterized route off of the request\n transaction.setName(...$d61a14f058aa8e95$export$8c5ebee2e5bb9575(req, {\n path: true,\n method: true\n }));\n transaction.setData(\"url\", req.originalUrl || req.url);\n if (req.baseUrl) transaction.setData(\"baseUrl\", req.baseUrl);\n transaction.setData(\"query\", $d61a14f058aa8e95$var$extractQueryParams(req, deps));\n}\n/**\n * Extracts a complete and parameterized path from the request object and uses it to construct transaction name.\n * If the parameterized transaction name cannot be extracted, we fall back to the raw URL.\n *\n * Additionally, this function determines and returns the transaction name source\n *\n * eg. GET /mountpoint/user/:id\n *\n * @param req A request object\n * @param options What to include in the transaction name (method, path, or a custom route name to be\n * used instead of the request's route)\n *\n * @returns A tuple of the fully constructed transaction name [0] and its source [1] (can be either 'route' or 'url')\n */ function $d61a14f058aa8e95$export$8c5ebee2e5bb9575(req, options = {}) {\n const method = req.method && req.method.toUpperCase();\n let path = \"\";\n let source = \"url\";\n // Check to see if there's a parameterized route we can use (as there is in Express)\n if (options.customRoute || req.route) {\n path = options.customRoute || `${req.baseUrl || \"\"}${req.route && req.route.path}`;\n source = \"route\";\n } else if (req.originalUrl || req.url) path = (0, $iKY39.stripUrlQueryAndFragment)(req.originalUrl || req.url || \"\");\n let name = \"\";\n if (options.method && method) name += method;\n if (options.method && options.path) name += \" \";\n if (options.path && path) name += path;\n return [\n name,\n source\n ];\n}\n/** JSDoc */ function $d61a14f058aa8e95$var$extractTransaction(req, type) {\n switch(type){\n case \"path\":\n return $d61a14f058aa8e95$export$8c5ebee2e5bb9575(req, {\n path: true\n })[0];\n case \"handler\":\n return req.route && req.route.stack && req.route.stack[0] && req.route.stack[0].name || \"\";\n case \"methodPath\":\n default:\n return $d61a14f058aa8e95$export$8c5ebee2e5bb9575(req, {\n path: true,\n method: true\n })[0];\n }\n}\n/** JSDoc */ function $d61a14f058aa8e95$var$extractUserData(user, keys) {\n const extractedUser = {};\n const attributes = Array.isArray(keys) ? keys : $d61a14f058aa8e95$var$DEFAULT_USER_INCLUDES;\n attributes.forEach((key)=>{\n if (user && key in user) extractedUser[key] = user[key];\n });\n return extractedUser;\n}\n/**\n * Normalize data from the request object, accounting for framework differences.\n *\n * @param req The request object from which to extract data\n * @param options.include An optional array of keys to include in the normalized data. Defaults to\n * DEFAULT_REQUEST_INCLUDES if not provided.\n * @param options.deps Injected, platform-specific dependencies\n * @returns An object containing normalized request data\n */ function $d61a14f058aa8e95$export$b5c5d78255f11c84(req, options) {\n const { include: include = $d61a14f058aa8e95$var$DEFAULT_REQUEST_INCLUDES, deps: deps } = options || {};\n const requestData = {};\n // headers:\n // node, express, koa, nextjs: req.headers\n const headers = req.headers || {};\n // method:\n // node, express, koa, nextjs: req.method\n const method = req.method;\n // host:\n // express: req.hostname in > 4 and req.host in < 4\n // koa: req.host\n // node, nextjs: req.headers.host\n const host = req.hostname || req.host || headers.host || \"\";\n // protocol:\n // node, nextjs: \n // express, koa: req.protocol\n const protocol = req.protocol === \"https\" || req.socket && req.socket.encrypted ? \"https\" : \"http\";\n // url (including path and query string):\n // node, express: req.originalUrl\n // koa, nextjs: req.url\n const originalUrl = req.originalUrl || req.url || \"\";\n // absolute url\n const absoluteUrl = `${protocol}://${host}${originalUrl}`;\n include.forEach((key)=>{\n switch(key){\n case \"headers\":\n requestData.headers = headers;\n break;\n case \"method\":\n requestData.method = method;\n break;\n case \"url\":\n requestData.url = absoluteUrl;\n break;\n case \"cookies\":\n // cookies:\n // node, express, koa: req.headers.cookie\n // vercel, sails.js, express (w/ cookie middleware), nextjs: req.cookies\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n requestData.cookies = // TODO (v8 / #5257): We're only sending the empty object for backwards compatibility, so the last bit can\n // come off in v8\n req.cookies || headers.cookie && deps && deps.cookie && deps.cookie.parse(headers.cookie) || {};\n break;\n case \"query_string\":\n // query string:\n // node: req.url (raw)\n // express, koa, nextjs: req.query\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n requestData.query_string = $d61a14f058aa8e95$var$extractQueryParams(req, deps);\n break;\n case \"data\":\n if (method === \"GET\" || method === \"HEAD\") break;\n // body data:\n // express, koa, nextjs: req.body\n //\n // when using node by itself, you have to read the incoming stream(see\n // https://nodejs.dev/learn/get-http-request-body-data-using-nodejs); if a user is doing that, we can't know\n // where they're going to store the final result, so they'll have to capture this data themselves\n if (req.body !== undefined) requestData.data = (0, $8cfrP.isString)(req.body) ? req.body : JSON.stringify((0, $2mHZf.normalize)(req.body));\n break;\n default:\n if (({}).hasOwnProperty.call(req, key)) requestData[key] = req[key];\n }\n });\n return requestData;\n}\n/**\n * Options deciding what parts of the request to use when enhancing an event\n */ /**\n * Add data from the given request to the given event\n *\n * @param event The event to which the request data will be added\n * @param req Request object\n * @param options.include Flags to control what data is included\n * @param options.deps Injected platform-specific dependencies\n * @hidden\n */ function $d61a14f058aa8e95$export$e560aeb323d2791d(event, req, options) {\n const include = {\n ...$d61a14f058aa8e95$var$DEFAULT_INCLUDES,\n ...options && options.include\n };\n if (include.request) {\n const extractedRequestData = Array.isArray(include.request) ? $d61a14f058aa8e95$export$b5c5d78255f11c84(req, {\n include: include.request,\n deps: options && options.deps\n }) : $d61a14f058aa8e95$export$b5c5d78255f11c84(req, {\n deps: options && options.deps\n });\n event.request = {\n ...event.request,\n ...extractedRequestData\n };\n }\n if (include.user) {\n const extractedUser = req.user && (0, $8cfrP.isPlainObject)(req.user) ? $d61a14f058aa8e95$var$extractUserData(req.user, include.user) : {};\n if (Object.keys(extractedUser).length) event.user = {\n ...event.user,\n ...extractedUser\n };\n }\n // client ip:\n // node, nextjs: req.socket.remoteAddress\n // express, koa: req.ip\n if (include.ip) {\n const ip = req.ip || req.socket && req.socket.remoteAddress;\n if (ip) event.user = {\n ...event.user,\n ip_address: ip\n };\n }\n if (include.transaction && !event.transaction) // TODO do we even need this anymore?\n // TODO make this work for nextjs\n event.transaction = $d61a14f058aa8e95$var$extractTransaction(req, include.transaction);\n return event;\n}\nfunction $d61a14f058aa8e95$var$extractQueryParams(req, deps) {\n // url (including path and query string):\n // node, express: req.originalUrl\n // koa, nextjs: req.url\n let originalUrl = req.originalUrl || req.url || \"\";\n if (!originalUrl) return;\n // The `URL` constructor can't handle internal URLs of the form `/some/path/here`, so stick a dummy protocol and\n // hostname on the beginning. Since the point here is just to grab the query string, it doesn't matter what we use.\n if (originalUrl.startsWith(\"/\")) originalUrl = `http://dogs.are.great${originalUrl}`;\n return req.query || new URL(originalUrl).search.replace(\"?\", \"\") || // In Node 8, `URL` isn't in the global scope, so we have to use the built-in module from Node\n deps && deps.url && deps.url.parse(originalUrl).query || undefined;\n}\n\n});\n\n\nparcelRegister(\"eqzpm\", function(module, exports) {\n\n$parcel$export(module.exports, \"GraphQL\", () => $a80ef5afbf6ef141$export$b735d011553f1049);\n\nvar $4I4m1 = parcelRequire(\"4I4m1\");\nvar $aCgU1 = parcelRequire(\"aCgU1\");\nvar $8cfrP = parcelRequire(\"8cfrP\");\nvar $ink2I = parcelRequire(\"ink2I\");\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $3yaN4 = parcelRequire(\"3yaN4\");\n/** Tracing integration for graphql package */ class $a80ef5afbf6ef141$export$b735d011553f1049 {\n /**\n * @inheritDoc\n */ static __initStatic() {\n this.id = \"GraphQL\";\n }\n /**\n * @inheritDoc\n */ constructor(){\n this.name = $a80ef5afbf6ef141$export$b735d011553f1049.id;\n }\n /** @inheritdoc */ loadDependency() {\n return this._module = this._module || (0, $ink2I.loadModule)(\"graphql/execution/execute.js\");\n }\n /**\n * @inheritDoc\n */ setupOnce(_, getCurrentHub) {\n if ((0, $3yaN4.shouldDisableAutoInstrumentation)(getCurrentHub)) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"GraphQL Integration is skipped because of instrumenter configuration.\");\n return;\n }\n const pkg = this.loadDependency();\n if (!pkg) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(\"GraphQL Integration was unable to require graphql/execution package.\");\n return;\n }\n (0, $aCgU1.fill)(pkg, \"execute\", function(orig) {\n return function(...args) {\n const scope = getCurrentHub().getScope();\n const parentSpan = scope.getSpan();\n const span = (0, $4I4m1._optionalChain)([\n parentSpan,\n \"optionalAccess\",\n (_2)=>_2.startChild,\n \"call\",\n (_3)=>_3({\n description: \"execute\",\n op: \"graphql.execute\",\n origin: \"auto.graphql.graphql\"\n })\n ]);\n (0, $4I4m1._optionalChain)([\n scope,\n \"optionalAccess\",\n (_4)=>_4.setSpan,\n \"call\",\n (_5)=>_5(span)\n ]);\n const rv = orig.call(this, ...args);\n if ((0, $8cfrP.isThenable)(rv)) return rv.then((res)=>{\n (0, $4I4m1._optionalChain)([\n span,\n \"optionalAccess\",\n (_6)=>_6.finish,\n \"call\",\n (_7)=>_7()\n ]);\n (0, $4I4m1._optionalChain)([\n scope,\n \"optionalAccess\",\n (_8)=>_8.setSpan,\n \"call\",\n (_9)=>_9(parentSpan)\n ]);\n return res;\n });\n (0, $4I4m1._optionalChain)([\n span,\n \"optionalAccess\",\n (_10)=>_10.finish,\n \"call\",\n (_11)=>_11()\n ]);\n (0, $4I4m1._optionalChain)([\n scope,\n \"optionalAccess\",\n (_12)=>_12.setSpan,\n \"call\",\n (_13)=>_13(parentSpan)\n ]);\n return rv;\n };\n });\n }\n}\n$a80ef5afbf6ef141$export$b735d011553f1049.__initStatic();\n\n});\n\nparcelRegister(\"1Q6St\", function(module, exports) {\n\n$parcel$export(module.exports, \"Mongo\", () => $156ffb7f877676fa$export$968aa4360b02a334);\n\nvar $4I4m1 = parcelRequire(\"4I4m1\");\nvar $aCgU1 = parcelRequire(\"aCgU1\");\nvar $8cfrP = parcelRequire(\"8cfrP\");\nvar $ink2I = parcelRequire(\"ink2I\");\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $3yaN4 = parcelRequire(\"3yaN4\");\n// This allows us to use the same array for both defaults options and the type itself.\n// (note `as const` at the end to make it a union of string literal types (i.e. \"a\" | \"b\" | ... )\n// and not just a string[])\nconst $156ffb7f877676fa$var$OPERATIONS = [\n \"aggregate\",\n \"bulkWrite\",\n \"countDocuments\",\n \"createIndex\",\n \"createIndexes\",\n \"deleteMany\",\n \"deleteOne\",\n \"distinct\",\n \"drop\",\n \"dropIndex\",\n \"dropIndexes\",\n \"estimatedDocumentCount\",\n \"find\",\n \"findOne\",\n \"findOneAndDelete\",\n \"findOneAndReplace\",\n \"findOneAndUpdate\",\n \"indexes\",\n \"indexExists\",\n \"indexInformation\",\n \"initializeOrderedBulkOp\",\n \"insertMany\",\n \"insertOne\",\n \"isCapped\",\n \"mapReduce\",\n \"options\",\n \"parallelCollectionScan\",\n \"rename\",\n \"replaceOne\",\n \"stats\",\n \"updateMany\",\n \"updateOne\"\n];\n// All of the operations above take `options` and `callback` as their final parameters, but some of them\n// take additional parameters as well. For those operations, this is a map of\n// { : [] }, as a way to know what to call the operation's\n// positional arguments when we add them to the span's `data` object later\nconst $156ffb7f877676fa$var$OPERATION_SIGNATURES = {\n // aggregate intentionally not included because `pipeline` arguments are too complex to serialize well\n // see https://github.com/getsentry/sentry-javascript/pull/3102\n bulkWrite: [\n \"operations\"\n ],\n countDocuments: [\n \"query\"\n ],\n createIndex: [\n \"fieldOrSpec\"\n ],\n createIndexes: [\n \"indexSpecs\"\n ],\n deleteMany: [\n \"filter\"\n ],\n deleteOne: [\n \"filter\"\n ],\n distinct: [\n \"key\",\n \"query\"\n ],\n dropIndex: [\n \"indexName\"\n ],\n find: [\n \"query\"\n ],\n findOne: [\n \"query\"\n ],\n findOneAndDelete: [\n \"filter\"\n ],\n findOneAndReplace: [\n \"filter\",\n \"replacement\"\n ],\n findOneAndUpdate: [\n \"filter\",\n \"update\"\n ],\n indexExists: [\n \"indexes\"\n ],\n insertMany: [\n \"docs\"\n ],\n insertOne: [\n \"doc\"\n ],\n mapReduce: [\n \"map\",\n \"reduce\"\n ],\n rename: [\n \"newName\"\n ],\n replaceOne: [\n \"filter\",\n \"doc\"\n ],\n updateMany: [\n \"filter\",\n \"update\"\n ],\n updateOne: [\n \"filter\",\n \"update\"\n ]\n};\nfunction $156ffb7f877676fa$var$isCursor(maybeCursor) {\n return maybeCursor && typeof maybeCursor === \"object\" && maybeCursor.once && typeof maybeCursor.once === \"function\";\n}\n/** Tracing integration for mongo package */ class $156ffb7f877676fa$export$968aa4360b02a334 {\n /**\n * @inheritDoc\n */ static __initStatic() {\n this.id = \"Mongo\";\n }\n /**\n * @inheritDoc\n */ /**\n * @inheritDoc\n */ constructor(options = {}){\n this.name = $156ffb7f877676fa$export$968aa4360b02a334.id;\n this._operations = Array.isArray(options.operations) ? options.operations : $156ffb7f877676fa$var$OPERATIONS;\n this._describeOperations = \"describeOperations\" in options ? options.describeOperations : true;\n this._useMongoose = !!options.useMongoose;\n }\n /** @inheritdoc */ loadDependency() {\n const moduleName = this._useMongoose ? \"mongoose\" : \"mongodb\";\n return this._module = this._module || (0, $ink2I.loadModule)(moduleName);\n }\n /**\n * @inheritDoc\n */ setupOnce(_, getCurrentHub) {\n if ((0, $3yaN4.shouldDisableAutoInstrumentation)(getCurrentHub)) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"Mongo Integration is skipped because of instrumenter configuration.\");\n return;\n }\n const pkg = this.loadDependency();\n if (!pkg) {\n const moduleName = this._useMongoose ? \"mongoose\" : \"mongodb\";\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(`Mongo Integration was unable to require \\`${moduleName}\\` package.`);\n return;\n }\n this._instrumentOperations(pkg.Collection, this._operations, getCurrentHub);\n }\n /**\n * Patches original collection methods\n */ _instrumentOperations(collection, operations, getCurrentHub) {\n operations.forEach((operation)=>this._patchOperation(collection, operation, getCurrentHub));\n }\n /**\n * Patches original collection to utilize our tracing functionality\n */ _patchOperation(collection, operation, getCurrentHub) {\n if (!(operation in collection.prototype)) return;\n const getSpanContext = this._getSpanContextFromOperationArguments.bind(this);\n (0, $aCgU1.fill)(collection.prototype, operation, function(orig) {\n return function(...args) {\n const lastArg = args[args.length - 1];\n const scope = getCurrentHub().getScope();\n const parentSpan = scope.getSpan();\n // Check if the operation was passed a callback. (mapReduce requires a different check, as\n // its (non-callback) arguments can also be functions.)\n if (typeof lastArg !== \"function\" || operation === \"mapReduce\" && args.length === 2) {\n const span = (0, $4I4m1._optionalChain)([\n parentSpan,\n \"optionalAccess\",\n (_2)=>_2.startChild,\n \"call\",\n (_3)=>_3(getSpanContext(this, operation, args))\n ]);\n const maybePromiseOrCursor = orig.call(this, ...args);\n if ((0, $8cfrP.isThenable)(maybePromiseOrCursor)) return maybePromiseOrCursor.then((res)=>{\n (0, $4I4m1._optionalChain)([\n span,\n \"optionalAccess\",\n (_4)=>_4.finish,\n \"call\",\n (_5)=>_5()\n ]);\n return res;\n });\n else if ($156ffb7f877676fa$var$isCursor(maybePromiseOrCursor)) {\n const cursor = maybePromiseOrCursor;\n try {\n cursor.once(\"close\", ()=>{\n (0, $4I4m1._optionalChain)([\n span,\n \"optionalAccess\",\n (_6)=>_6.finish,\n \"call\",\n (_7)=>_7()\n ]);\n });\n } catch (e) {\n // If the cursor is already closed, `once` will throw an error. In that case, we can\n // finish the span immediately.\n (0, $4I4m1._optionalChain)([\n span,\n \"optionalAccess\",\n (_8)=>_8.finish,\n \"call\",\n (_9)=>_9()\n ]);\n }\n return cursor;\n } else {\n (0, $4I4m1._optionalChain)([\n span,\n \"optionalAccess\",\n (_10)=>_10.finish,\n \"call\",\n (_11)=>_11()\n ]);\n return maybePromiseOrCursor;\n }\n }\n const span = (0, $4I4m1._optionalChain)([\n parentSpan,\n \"optionalAccess\",\n (_12)=>_12.startChild,\n \"call\",\n (_13)=>_13(getSpanContext(this, operation, args.slice(0, -1)))\n ]);\n return orig.call(this, ...args.slice(0, -1), function(err, result) {\n (0, $4I4m1._optionalChain)([\n span,\n \"optionalAccess\",\n (_14)=>_14.finish,\n \"call\",\n (_15)=>_15()\n ]);\n lastArg(err, result);\n });\n };\n });\n }\n /**\n * Form a SpanContext based on the user input to a given operation.\n */ _getSpanContextFromOperationArguments(collection, operation, args) {\n const data = {\n \"db.system\": \"mongodb\",\n \"db.name\": collection.dbName,\n \"db.operation\": operation,\n \"db.mongodb.collection\": collection.collectionName\n };\n const spanContext = {\n op: \"db\",\n // TODO v8: Use `${collection.collectionName}.${operation}`\n origin: \"auto.db.mongo\",\n description: operation,\n data: data\n };\n // If the operation takes no arguments besides `options` and `callback`, or if argument\n // collection is disabled for this operation, just return early.\n const signature = $156ffb7f877676fa$var$OPERATION_SIGNATURES[operation];\n const shouldDescribe = Array.isArray(this._describeOperations) ? this._describeOperations.includes(operation) : this._describeOperations;\n if (!signature || !shouldDescribe) return spanContext;\n try {\n // Special case for `mapReduce`, as the only one accepting functions as arguments.\n if (operation === \"mapReduce\") {\n const [map, reduce] = args;\n data[signature[0]] = typeof map === \"string\" ? map : map.name || \"\";\n data[signature[1]] = typeof reduce === \"string\" ? reduce : reduce.name || \"\";\n } else for(let i = 0; i < signature.length; i++)data[`db.mongodb.${signature[i]}`] = JSON.stringify(args[i]);\n } catch (_oO) {\n // no-empty\n }\n return spanContext;\n }\n}\n$156ffb7f877676fa$export$968aa4360b02a334.__initStatic();\n\n});\n\nparcelRegister(\"4bvNg\", function(module, exports) {\n\n$parcel$export(module.exports, \"Mysql\", () => $30c0da0699e9da3d$export$a2cc26ff91a3f8ad);\n\nvar $4I4m1 = parcelRequire(\"4I4m1\");\nvar $aCgU1 = parcelRequire(\"aCgU1\");\nvar $ink2I = parcelRequire(\"ink2I\");\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $3yaN4 = parcelRequire(\"3yaN4\");\n/** Tracing integration for node-mysql package */ class $30c0da0699e9da3d$export$a2cc26ff91a3f8ad {\n /**\n * @inheritDoc\n */ static __initStatic() {\n this.id = \"Mysql\";\n }\n /**\n * @inheritDoc\n */ constructor(){\n this.name = $30c0da0699e9da3d$export$a2cc26ff91a3f8ad.id;\n }\n /** @inheritdoc */ loadDependency() {\n return this._module = this._module || (0, $ink2I.loadModule)(\"mysql/lib/Connection.js\");\n }\n /**\n * @inheritDoc\n */ setupOnce(_, getCurrentHub) {\n if ((0, $3yaN4.shouldDisableAutoInstrumentation)(getCurrentHub)) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"Mysql Integration is skipped because of instrumenter configuration.\");\n return;\n }\n const pkg = this.loadDependency();\n if (!pkg) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(\"Mysql Integration was unable to require `mysql` package.\");\n return;\n }\n let mySqlConfig = undefined;\n try {\n pkg.prototype.connect = new Proxy(pkg.prototype.connect, {\n apply (wrappingTarget, thisArg, args) {\n if (!mySqlConfig) mySqlConfig = thisArg.config;\n return wrappingTarget.apply(thisArg, args);\n }\n });\n } catch (e) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(\"Mysql Integration was unable to instrument `mysql` config.\");\n }\n function spanDataFromConfig() {\n if (!mySqlConfig) return {};\n return {\n \"server.address\": mySqlConfig.host,\n \"server.port\": mySqlConfig.port,\n \"db.user\": mySqlConfig.user\n };\n }\n function finishSpan(span) {\n if (!span || span.endTimestamp) return;\n const data = spanDataFromConfig();\n Object.keys(data).forEach((key)=>{\n span.setData(key, data[key]);\n });\n span.finish();\n }\n // The original function will have one of these signatures:\n // function (callback) => void\n // function (options, callback) => void\n // function (options, values, callback) => void\n (0, $aCgU1.fill)(pkg, \"createQuery\", function(orig) {\n return function(options, values, callback) {\n const scope = getCurrentHub().getScope();\n const parentSpan = scope.getSpan();\n const span = (0, $4I4m1._optionalChain)([\n parentSpan,\n \"optionalAccess\",\n (_2)=>_2.startChild,\n \"call\",\n (_3)=>_3({\n description: typeof options === \"string\" ? options : options.sql,\n op: \"db\",\n origin: \"auto.db.mysql\",\n data: {\n \"db.system\": \"mysql\"\n }\n })\n ]);\n if (typeof callback === \"function\") return orig.call(this, options, values, function(err, result, fields) {\n finishSpan(span);\n callback(err, result, fields);\n });\n if (typeof values === \"function\") return orig.call(this, options, function(err, result, fields) {\n finishSpan(span);\n values(err, result, fields);\n });\n // streaming, no callback!\n const query = orig.call(this, options, values);\n query.on(\"end\", ()=>{\n finishSpan(span);\n });\n return query;\n };\n });\n }\n}\n$30c0da0699e9da3d$export$a2cc26ff91a3f8ad.__initStatic();\n\n});\n\nparcelRegister(\"lA9Ai\", function(module, exports) {\n\n$parcel$export(module.exports, \"Postgres\", () => $fb64650258fea1e0$export$806ddb599177abc4);\n\nvar $4I4m1 = parcelRequire(\"4I4m1\");\nvar $aCgU1 = parcelRequire(\"aCgU1\");\nvar $8cfrP = parcelRequire(\"8cfrP\");\nvar $ink2I = parcelRequire(\"ink2I\");\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $3yaN4 = parcelRequire(\"3yaN4\");\n/** Tracing integration for node-postgres package */ class $fb64650258fea1e0$export$806ddb599177abc4 {\n /**\n * @inheritDoc\n */ static __initStatic() {\n this.id = \"Postgres\";\n }\n /**\n * @inheritDoc\n */ constructor(options = {}){\n this.name = $fb64650258fea1e0$export$806ddb599177abc4.id;\n this._usePgNative = !!options.usePgNative;\n this._module = options.module;\n }\n /** @inheritdoc */ loadDependency() {\n return this._module = this._module || (0, $ink2I.loadModule)(\"pg\");\n }\n /**\n * @inheritDoc\n */ setupOnce(_, getCurrentHub) {\n if ((0, $3yaN4.shouldDisableAutoInstrumentation)(getCurrentHub)) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).log(\"Postgres Integration is skipped because of instrumenter configuration.\");\n return;\n }\n const pkg = this.loadDependency();\n if (!pkg) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(\"Postgres Integration was unable to require `pg` package.\");\n return;\n }\n const Client = this._usePgNative ? (0, $4I4m1._optionalChain)([\n pkg,\n \"access\",\n (_2)=>_2.native,\n \"optionalAccess\",\n (_3)=>_3.Client\n ]) : pkg.Client;\n if (!Client) {\n (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).error(\"Postgres Integration was unable to access 'pg-native' bindings.\");\n return;\n }\n /**\n * function (query, callback) => void\n * function (query, params, callback) => void\n * function (query) => Promise\n * function (query, params) => Promise\n * function (pg.Cursor) => pg.Cursor\n */ (0, $aCgU1.fill)(Client.prototype, \"query\", function(orig) {\n return function(config, values, callback) {\n const scope = getCurrentHub().getScope();\n const parentSpan = scope.getSpan();\n const data = {\n \"db.system\": \"postgresql\"\n };\n try {\n if (this.database) data[\"db.name\"] = this.database;\n if (this.host) data[\"server.address\"] = this.host;\n if (this.port) data[\"server.port\"] = this.port;\n if (this.user) data[\"db.user\"] = this.user;\n } catch (e) {\n // ignore\n }\n const span = (0, $4I4m1._optionalChain)([\n parentSpan,\n \"optionalAccess\",\n (_4)=>_4.startChild,\n \"call\",\n (_5)=>_5({\n description: typeof config === \"string\" ? config : config.text,\n op: \"db\",\n origin: \"auto.db.postgres\",\n data: data\n })\n ]);\n if (typeof callback === \"function\") return orig.call(this, config, values, function(err, result) {\n (0, $4I4m1._optionalChain)([\n span,\n \"optionalAccess\",\n (_6)=>_6.finish,\n \"call\",\n (_7)=>_7()\n ]);\n callback(err, result);\n });\n if (typeof values === \"function\") return orig.call(this, config, function(err, result) {\n (0, $4I4m1._optionalChain)([\n span,\n \"optionalAccess\",\n (_8)=>_8.finish,\n \"call\",\n (_9)=>_9()\n ]);\n values(err, result);\n });\n const rv = typeof values !== \"undefined\" ? orig.call(this, config, values) : orig.call(this, config);\n if ((0, $8cfrP.isThenable)(rv)) return rv.then((res)=>{\n (0, $4I4m1._optionalChain)([\n span,\n \"optionalAccess\",\n (_10)=>_10.finish,\n \"call\",\n (_11)=>_11()\n ]);\n return res;\n });\n (0, $4I4m1._optionalChain)([\n span,\n \"optionalAccess\",\n (_12)=>_12.finish,\n \"call\",\n (_13)=>_13()\n ]);\n return rv;\n };\n });\n }\n}\n$fb64650258fea1e0$export$806ddb599177abc4.__initStatic();\n\n});\n\nparcelRegister(\"f0Fc8\", function(module, exports) {\n\n$parcel$export(module.exports, \"Prisma\", () => $aed6cf858dbccebe$export$e300e6f4779d55c2);\n\nvar $1D41F = parcelRequire(\"1D41F\");\nvar $1bEoM = parcelRequire(\"1bEoM\");\n\nvar $aCgU1 = parcelRequire(\"aCgU1\");\nvar $boFAr = parcelRequire(\"boFAr\");\n\nvar $3yaN4 = parcelRequire(\"3yaN4\");\nfunction $aed6cf858dbccebe$var$isValidPrismaClient(possibleClient) {\n return !!possibleClient && !!possibleClient[\"$use\"];\n}\n/** Tracing integration for @prisma/client package */ class $aed6cf858dbccebe$export$e300e6f4779d55c2 {\n /**\n * @inheritDoc\n */ static __initStatic() {\n this.id = \"Prisma\";\n }\n /**\n * @inheritDoc\n */ /**\n * @inheritDoc\n */ constructor(options = {}){\n this.name = $aed6cf858dbccebe$export$e300e6f4779d55c2.id;\n // We instrument the PrismaClient inside the constructor and not inside `setupOnce` because in some cases of server-side\n // bundling (Next.js) multiple Prisma clients can be instantiated, even though users don't intend to. When instrumenting\n // in setupOnce we can only ever instrument one client.\n // https://github.com/getsentry/sentry-javascript/issues/7216#issuecomment-1602375012\n // In the future we might explore providing a dedicated PrismaClient middleware instead of this hack.\n if ($aed6cf858dbccebe$var$isValidPrismaClient(options.client) && !options.client._sentryInstrumented) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (0, $aCgU1.addNonEnumerableProperty)(options.client, \"_sentryInstrumented\", true);\n const clientData = {};\n try {\n const engineConfig = options.client._engineConfig;\n if (engineConfig) {\n const { activeProvider: activeProvider, clientVersion: clientVersion } = engineConfig;\n if (activeProvider) clientData[\"db.system\"] = activeProvider;\n if (clientVersion) clientData[\"db.prisma.version\"] = clientVersion;\n }\n } catch (e) {\n // ignore\n }\n options.client.$use((params, next)=>{\n if ((0, $3yaN4.shouldDisableAutoInstrumentation)((0, $1D41F.getCurrentHub))) return next(params);\n const action = params.action;\n const model = params.model;\n return (0, $1bEoM.trace)({\n name: model ? `${model} ${action}` : action,\n op: \"db.sql.prisma\",\n origin: \"auto.db.prisma\",\n data: {\n ...clientData,\n \"db.operation\": action\n }\n }, ()=>next(params));\n });\n } else (typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && (0, $boFAr.logger).warn(\"Unsupported Prisma client provided to PrismaIntegration. Provided client:\", options.client);\n }\n /**\n * @inheritDoc\n */ setupOnce() {\n // Noop - here for backwards compatibility\n }\n}\n$aed6cf858dbccebe$export$e300e6f4779d55c2.__initStatic();\n\n});\nparcelRegister(\"1bEoM\", function(module, exports) {\n\n$parcel$export(module.exports, \"trace\", () => $0dd627dda6e5095f$export$357889f174732d38);\n\nvar $aCgU1 = parcelRequire(\"aCgU1\");\nvar $8cfrP = parcelRequire(\"8cfrP\");\nvar $boFAr = parcelRequire(\"boFAr\");\nvar $iI7u6 = parcelRequire(\"iI7u6\");\n\nvar $1D41F = parcelRequire(\"1D41F\");\n\nvar $6Em9x = parcelRequire(\"6Em9x\");\n/**\n * Wraps a function with a transaction/span and finishes the span after the function is done.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n *\n * This function is meant to be used internally and may break at any time. Use at your own risk.\n *\n * @internal\n * @private\n */ function $0dd627dda6e5095f$export$357889f174732d38(context, callback, // eslint-disable-next-line @typescript-eslint/no-empty-function\nonError = ()=>{}) {\n const ctx = $0dd627dda6e5095f$var$normalizeContext(context);\n const hub = (0, $1D41F.getCurrentHub)();\n const scope = hub.getScope();\n const parentSpan = scope.getSpan();\n const activeSpan = $0dd627dda6e5095f$var$createChildSpanOrTransaction(hub, parentSpan, ctx);\n scope.setSpan(activeSpan);\n function finishAndSetSpan() {\n activeSpan && activeSpan.finish();\n hub.getScope().setSpan(parentSpan);\n }\n let maybePromiseResult;\n try {\n maybePromiseResult = callback(activeSpan);\n } catch (e) {\n activeSpan && activeSpan.setStatus(\"internal_error\");\n onError(e);\n finishAndSetSpan();\n throw e;\n }\n if ((0, $8cfrP.isThenable)(maybePromiseResult)) Promise.resolve(maybePromiseResult).then(()=>{\n finishAndSetSpan();\n }, (e)=>{\n activeSpan && activeSpan.setStatus(\"internal_error\");\n onError(e);\n finishAndSetSpan();\n });\n else finishAndSetSpan();\n return maybePromiseResult;\n}\n/**\n * Wraps a function with a transaction/span and finishes the span after the function is done.\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getSpan()`, as long as the function is executed while the scope is active.\n *\n * If you want to create a span that is not set as active, use {@link startInactiveSpan}.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n */ function $0dd627dda6e5095f$export$a1bd95187356f372(context, callback) {\n const ctx = $0dd627dda6e5095f$var$normalizeContext(context);\n const hub = (0, $1D41F.getCurrentHub)();\n const scope = hub.getScope();\n const parentSpan = scope.getSpan();\n const activeSpan = $0dd627dda6e5095f$var$createChildSpanOrTransaction(hub, parentSpan, ctx);\n scope.setSpan(activeSpan);\n function finishAndSetSpan() {\n activeSpan && activeSpan.finish();\n hub.getScope().setSpan(parentSpan);\n }\n let maybePromiseResult;\n try {\n maybePromiseResult = callback(activeSpan);\n } catch (e) {\n activeSpan && activeSpan.setStatus(\"internal_error\");\n finishAndSetSpan();\n throw e;\n }\n if ((0, $8cfrP.isThenable)(maybePromiseResult)) Promise.resolve(maybePromiseResult).then(()=>{\n finishAndSetSpan();\n }, ()=>{\n activeSpan && activeSpan.setStatus(\"internal_error\");\n finishAndSetSpan();\n });\n else finishAndSetSpan();\n return maybePromiseResult;\n}\n/**\n * @deprecated Use {@link startSpan} instead.\n */ const $0dd627dda6e5095f$export$cb9e396e6b90b703 = $0dd627dda6e5095f$export$a1bd95187356f372;\n/**\n * Similar to `Sentry.startSpan`. Wraps a function with a transaction/span, but does not finish the span\n * after the function is done automatically.\n *\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n */ function $0dd627dda6e5095f$export$c10292ad04b92aea(context, callback) {\n const ctx = $0dd627dda6e5095f$var$normalizeContext(context);\n const hub = (0, $1D41F.getCurrentHub)();\n const scope = hub.getScope();\n const parentSpan = scope.getSpan();\n const activeSpan = $0dd627dda6e5095f$var$createChildSpanOrTransaction(hub, parentSpan, ctx);\n scope.setSpan(activeSpan);\n function finishAndSetSpan() {\n activeSpan && activeSpan.finish();\n hub.getScope().setSpan(parentSpan);\n }\n let maybePromiseResult;\n try {\n maybePromiseResult = callback(activeSpan, finishAndSetSpan);\n } catch (e) {\n activeSpan && activeSpan.setStatus(\"internal_error\");\n throw e;\n }\n if ((0, $8cfrP.isThenable)(maybePromiseResult)) Promise.resolve(maybePromiseResult).then(undefined, ()=>{\n activeSpan && activeSpan.setStatus(\"internal_error\");\n });\n return maybePromiseResult;\n}\n/**\n * Creates a span. This span is not set as active, so will not get automatic instrumentation spans\n * as children or be able to be accessed via `Sentry.getSpan()`.\n *\n * If you want to create a span that is set as active, use {@link startSpan}.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate` or `tracesSampler`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n */ function $0dd627dda6e5095f$export$63dbba021a6b4047(context) {\n if (!(0, $6Em9x.hasTracingEnabled)()) return undefined;\n const ctx = {\n ...context\n };\n // If a name is set and a description is not, set the description to the name.\n if (ctx.name !== undefined && ctx.description === undefined) ctx.description = ctx.name;\n const hub = (0, $1D41F.getCurrentHub)();\n const parentSpan = $0dd627dda6e5095f$export$1be426a8e585c83e();\n return parentSpan ? parentSpan.startChild(ctx) : hub.startTransaction(ctx);\n}\n/**\n * Returns the currently active span.\n */ function $0dd627dda6e5095f$export$1be426a8e585c83e() {\n return (0, $1D41F.getCurrentHub)().getScope().getSpan();\n}\n/**\n * Continue a trace from `sentry-trace` and `baggage` values.\n * These values can be obtained from incoming request headers,\n * or in the browser from `` and `` HTML tags.\n *\n * It also takes an optional `request` option, which if provided will also be added to the scope & transaction metadata.\n * The callback receives a transactionContext that may be used for `startTransaction` or `startSpan`.\n */ function $0dd627dda6e5095f$export$d2ee9b39b25437b3({ sentryTrace: sentryTrace, baggage: baggage }, callback) {\n const hub = (0, $1D41F.getCurrentHub)();\n const currentScope = hub.getScope();\n const { traceparentData: traceparentData, dynamicSamplingContext: dynamicSamplingContext, propagationContext: propagationContext } = (0, $iI7u6.tracingContextFromHeaders)(sentryTrace, baggage);\n currentScope.setPropagationContext(propagationContext);\n if ((typeof __SENTRY_DEBUG__ === \"undefined\" || __SENTRY_DEBUG__) && traceparentData) (0, $boFAr.logger).log(`[Tracing] Continuing trace ${traceparentData.traceId}.`);\n const transactionContext = {\n ...traceparentData,\n metadata: (0, $aCgU1.dropUndefinedKeys)({\n dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext\n })\n };\n return callback(transactionContext);\n}\nfunction $0dd627dda6e5095f$var$createChildSpanOrTransaction(hub, parentSpan, ctx) {\n if (!(0, $6Em9x.hasTracingEnabled)()) return undefined;\n return parentSpan ? parentSpan.startChild(ctx) : hub.startTransaction(ctx);\n}\nfunction $0dd627dda6e5095f$var$normalizeContext(context) {\n const ctx = {\n ...context\n };\n // If a name is set and a description is not, set the description to the name.\n if (ctx.name !== undefined && ctx.description === undefined) ctx.description = ctx.name;\n return ctx;\n}\n\n});\n\n\nparcelRegister(\"19lWH\", function(module, exports) {\n\n$parcel$export(module.exports, \"SpanStatus\", () => $0d67a7b19af82315$export$beb8e6a823e89c5d);\n/** The status of an Span.\n *\n * @deprecated Use string literals - if you require type casting, cast to SpanStatusType type\n */ // eslint-disable-next-line import/export\nvar $0d67a7b19af82315$export$beb8e6a823e89c5d;\n(function(SpanStatus) {\n /** The operation completed successfully. */ const Ok = \"ok\";\n SpanStatus[\"Ok\"] = Ok;\n /** Deadline expired before operation could complete. */ const DeadlineExceeded = \"deadline_exceeded\";\n SpanStatus[\"DeadlineExceeded\"] = DeadlineExceeded;\n /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */ const Unauthenticated = \"unauthenticated\";\n SpanStatus[\"Unauthenticated\"] = Unauthenticated;\n /** 403 Forbidden */ const PermissionDenied = \"permission_denied\";\n SpanStatus[\"PermissionDenied\"] = PermissionDenied;\n /** 404 Not Found. Some requested entity (file or directory) was not found. */ const NotFound = \"not_found\";\n SpanStatus[\"NotFound\"] = NotFound;\n /** 429 Too Many Requests */ const ResourceExhausted = \"resource_exhausted\";\n SpanStatus[\"ResourceExhausted\"] = ResourceExhausted;\n /** Client specified an invalid argument. 4xx. */ const InvalidArgument = \"invalid_argument\";\n SpanStatus[\"InvalidArgument\"] = InvalidArgument;\n /** 501 Not Implemented */ const Unimplemented = \"unimplemented\";\n SpanStatus[\"Unimplemented\"] = Unimplemented;\n /** 503 Service Unavailable */ const Unavailable = \"unavailable\";\n SpanStatus[\"Unavailable\"] = Unavailable;\n /** Other/generic 5xx. */ const InternalError = \"internal_error\";\n SpanStatus[\"InternalError\"] = InternalError;\n /** Unknown. Any non-standard HTTP status code. */ const UnknownError = \"unknown_error\";\n SpanStatus[\"UnknownError\"] = UnknownError;\n /** The operation was cancelled (typically by the user). */ const Cancelled = \"cancelled\";\n SpanStatus[\"Cancelled\"] = Cancelled;\n /** Already exists (409) */ const AlreadyExists = \"already_exists\";\n SpanStatus[\"AlreadyExists\"] = AlreadyExists;\n /** Operation was rejected because the system is not in a state required for the operation's */ const FailedPrecondition = \"failed_precondition\";\n SpanStatus[\"FailedPrecondition\"] = FailedPrecondition;\n /** The operation was aborted, typically due to a concurrency issue. */ const Aborted = \"aborted\";\n SpanStatus[\"Aborted\"] = Aborted;\n /** Operation was attempted past the valid range. */ const OutOfRange = \"out_of_range\";\n SpanStatus[\"OutOfRange\"] = OutOfRange;\n /** Unrecoverable data loss or corruption */ const DataLoss = \"data_loss\";\n SpanStatus[\"DataLoss\"] = DataLoss;\n})($0d67a7b19af82315$export$beb8e6a823e89c5d || ($0d67a7b19af82315$export$beb8e6a823e89c5d = {}));\n\n});\n\n\nparcelRegister(\"6apTV\", function(module, exports) {\n\n$parcel$export(module.exports, \"XHRSubmitFormController\", () => $c9721eed98d92ce1$export$3ff7d2096ad729f0);\n$parcel$export(module.exports, \"RestoreFormController\", () => $c9721eed98d92ce1$export$fdd0d4d850365372);\n$parcel$export(module.exports, \"RetainFormFormController\", () => $c9721eed98d92ce1$export$1c6fba4d645dcec2);\n$parcel$export(module.exports, \"RetainFormInputController\", () => $c9721eed98d92ce1$export$ff14e7c38350c77d);\n\nvar $a9NjE = parcelRequire(\"a9NjE\");\n\nvar $ixn3l = parcelRequire(\"ixn3l\");\n\nvar $kavin = parcelRequire(\"kavin\");\n\nvar $7pkPC = parcelRequire(\"7pkPC\");\n\nvar $1EGrR = parcelRequire(\"1EGrR\");\nclass $c9721eed98d92ce1$export$3ff7d2096ad729f0 extends (0, $ixn3l.Controller) {\n async submitForm(e) {\n const form = e.currentTarget;\n if (form.querySelector('[data-turbo=\"false\"]')) return;\n // Do not stop propagation so that GTM can recognize the event as Form Submission trigger.\n // e.stopPropagation();\n const formData = new FormData(form);\n const params = new URLSearchParams();\n formData.forEach((value, name)=>{\n params.set(name, value);\n });\n // FormData does not include any submit button's data:\n // include them manually, since we have at most one submit button per form.\n const submitButtons = form.querySelectorAll('button[type=\"submit\"]');\n for(let i = 0; i < submitButtons.length; i++){\n const button = submitButtons[i];\n params.set(button.name, button.value);\n }\n if (form.id) {\n const el = document.querySelector(`button[type=\"submit\"][form=\"${form.id}\"]`);\n if (el) {\n const button = el;\n params.set(button.name, button.value);\n }\n }\n this.revertDisabledButtons = (0, $7pkPC.disableAllButtons)();\n (0, $7pkPC.showProgressBar)();\n try {\n const resp = await (0, $kavin.default)(form.action, {\n method: form.method,\n headers: {\n \"Content-Type\": \"application/x-www-form-urlencoded;charset=UTF-8\",\n \"X-Authgear-XHR\": \"true\"\n },\n data: params,\n onUploadProgress: (0, $7pkPC.progressEventHandler),\n onDownloadProgress: (0, $7pkPC.progressEventHandler)\n });\n const { redirect_uri: redirect_uri, action: action } = resp.data;\n (0, $a9NjE.clearCache)();\n switch(action){\n case \"redirect\":\n // Perform full redirect.\n window.location = redirect_uri;\n break;\n case \"replace\":\n case \"advance\":\n // We assume the URL returned by the server have query preserved.\n (0, $a9NjE.visit)(redirect_uri, {\n action: action\n });\n break;\n }\n } catch (e) {\n (0, $1EGrR.handleAxiosError)(e);\n // revert is only called for error branch because\n // The success branch also loads a new page.\n // Keeping the buttons in disabled state reduce flickering in the UI.\n if (this.revertDisabledButtons) {\n this.revertDisabledButtons();\n this.revertDisabledButtons = null;\n }\n } finally{\n (0, $7pkPC.hideProgressBar)();\n }\n }\n connect() {\n const elems = document.querySelectorAll(\"form\");\n for(let i = 0; i < elems.length; i++){\n if (elems[i].querySelector('[data-turbo=\"false\"]')) continue;\n this.forms.push(elems[i]);\n }\n for (const form of this.forms){\n form.addEventListener(\"submit\", this.onSubmitCapture, true);\n form.addEventListener(\"submit\", this.onSubmit);\n }\n document.addEventListener(\"turbo:before-cache\", this.beforeCache);\n }\n disconnect() {\n for (const form of this.forms){\n form.removeEventListener(\"submit\", this.onSubmitCapture, true);\n form.removeEventListener(\"submit\", this.onSubmit);\n }\n document.removeEventListener(\"turbo:before-cache\", this.beforeCache);\n }\n constructor(...args){\n super(...args);\n this.revertDisabledButtons = null;\n this.forms = [];\n // Revert disabled buttons before Turbo caches the page\n // To avoid flickering in the UI\n this.beforeCache = ()=>{\n if (this.revertDisabledButtons) this.revertDisabledButtons();\n };\n this.onSubmitCapture = (e)=>{\n e.preventDefault();\n };\n this.onSubmit = (e)=>{\n this.submitForm(e);\n };\n }\n}\nclass $c9721eed98d92ce1$export$fdd0d4d850365372 extends (0, $ixn3l.Controller) {\n static #_ = this.values = {\n json: String\n };\n connect() {\n const content = this.jsonValue;\n if (content === \"\") return;\n // Clear the content to avoid restoring twice.\n this.jsonValue = \"\";\n const formDataJSON = JSON.parse(content);\n // Find the form.\n let form = null;\n const xAction = formDataJSON[\"x_action\"];\n const elementsWithXAction = document.querySelectorAll(`[name=\"x_action\"]`);\n for(let i = 0; i < elementsWithXAction.length; i++){\n const elem = elementsWithXAction[i];\n if (elem instanceof HTMLButtonElement && elem.value === xAction) {\n form = elem.form;\n break;\n }\n }\n if (form == null) return;\n if (form.getAttribute(\"data-restore-form\") === \"false\") return;\n for(let i = 0; i < form.elements.length; i++){\n const elem = form.elements[i];\n if (elem instanceof HTMLInputElement || elem instanceof HTMLSelectElement || elem instanceof HTMLTextAreaElement) {\n const value = formDataJSON[elem.name];\n if (value != null) elem.value = value;\n }\n }\n }\n}\nclass $c9721eed98d92ce1$export$1c6fba4d645dcec2 extends (0, $ixn3l.Controller) {\n static #_ = this.values = {\n id: String\n };\n static #_1 = this.targets = [\n \"input\"\n ];\n input(e) {\n const name = e.params.name;\n const value = e.detail.value;\n if (typeof name === \"string\" && typeof value === \"string\") this.retained[name] = value;\n }\n getSessionStorageKey(id) {\n return `restore-form-form-${id}`;\n }\n connect() {\n if (this.idValue !== \"\") {\n const key = this.getSessionStorageKey(this.idValue);\n const value = sessionStorage.getItem(key);\n if (value == null) return;\n sessionStorage.removeItem(key);\n this.retained = JSON.parse(value);\n for (const input of this.inputTargets){\n for(const name in this.retained)if (input.getAttribute(\"data-retain-form-form-name-param\") === name) input.setAttribute(\"value\", this.retained[name]);\n }\n }\n }\n disconnect() {\n // Before disconnect, collect all values once.\n this.collectAllValues();\n if (this.idValue !== \"\") {\n const key = this.getSessionStorageKey(this.idValue);\n sessionStorage.setItem(key, JSON.stringify(this.retained));\n }\n }\n collectAllValues() {\n for (const input of this.inputTargets){\n const name = input.getAttribute(\"data-retain-form-form-name-param\");\n const value = input.value;\n if (typeof name === \"string\" && typeof value === \"string\") this.retained[name] = value;\n }\n }\n constructor(...args){\n super(...args);\n this.retained = {};\n }\n}\nclass $c9721eed98d92ce1$export$ff14e7c38350c77d extends (0, $ixn3l.Controller) {\n input(e) {\n if (e.currentTarget instanceof HTMLInputElement) this.dispatch(\"input\", {\n detail: {\n value: e.currentTarget.value\n }\n });\n }\n}\n\n});\nparcelRegister(\"7pkPC\", function(module, exports) {\n\n$parcel$export(module.exports, \"disableAllButtons\", () => $8e2027ca6b52a8f5$export$e395a65fcce0676e);\n$parcel$export(module.exports, \"hideProgressBar\", () => $8e2027ca6b52a8f5$export$eddeecc40507de3b);\n$parcel$export(module.exports, \"showProgressBar\", () => $8e2027ca6b52a8f5$export$78e919f667bc272b);\n$parcel$export(module.exports, \"progressEventHandler\", () => $8e2027ca6b52a8f5$export$6e08f0b3718c5078);\nfunction $8e2027ca6b52a8f5$export$e395a65fcce0676e() {\n const buttons = document.querySelectorAll(\"button\");\n const original = [];\n for(let i = 0; i < buttons.length; i++){\n const button = buttons[i];\n const disabled = button.disabled;\n const state = [\n button,\n disabled\n ];\n button.disabled = true;\n original.push(state);\n }\n return ()=>{\n for(let i = 0; i < original.length; i++){\n const [button, disabled] = original[i];\n button.disabled = disabled;\n }\n };\n}\nfunction $8e2027ca6b52a8f5$export$eddeecc40507de3b() {\n const loadingProgressBar = document.getElementById(\"loading-progress-bar\");\n if (loadingProgressBar == null) return;\n loadingProgressBar.style.opacity = \"0\";\n}\nfunction $8e2027ca6b52a8f5$export$78e919f667bc272b() {\n const loadingProgressBar = document.getElementById(\"loading-progress-bar\");\n if (loadingProgressBar == null) return;\n loadingProgressBar.style.opacity = \"1\";\n}\nfunction $8e2027ca6b52a8f5$export$6e08f0b3718c5078(progressEvent) {\n const loadingProgressBar = document.getElementById(\"loading-progress-bar\");\n if (loadingProgressBar == null) return;\n if (progressEvent.total == null) return;\n const percentage = Math.round(100 * progressEvent.loaded / progressEvent.total);\n const width = Math.max(0, Math.min(100, percentage));\n loadingProgressBar.style.width = `${width}%`;\n}\n\n});\n\nparcelRegister(\"1EGrR\", function(module, exports) {\n\n$parcel$export(module.exports, \"handleAxiosError\", () => $b19aa4638d51eb26$export$d8daec839daf2d34);\n$parcel$export(module.exports, \"showErrorMessage\", () => $b19aa4638d51eb26$export$f3b8e31d958a9f24);\n$parcel$export(module.exports, \"hideErrorMessage\", () => $b19aa4638d51eb26$export$333c4084290bc216);\n$parcel$export(module.exports, \"MessageBarController\", () => $b19aa4638d51eb26$export$9bee1a6f18f533d2);\n\nvar $ixn3l = parcelRequire(\"ixn3l\");\n\nvar $a9NjE = parcelRequire(\"a9NjE\");\nfunction $b19aa4638d51eb26$export$d8daec839daf2d34(e) {\n const err = e;\n if (err.code === \"ERR_NETWORK\") $b19aa4638d51eb26$export$f3b8e31d958a9f24(\"error-message-network\");\n else if (err.response != null) {\n const response = err.response;\n if (typeof response.data === \"string\") {\n (0, $a9NjE.session).renderStreamMessage(response.data);\n return;\n }\n $b19aa4638d51eb26$export$f3b8e31d958a9f24(\"error-message-server\");\n } else if (err.request != null) $b19aa4638d51eb26$export$f3b8e31d958a9f24(\"error-message-network\");\n console.error(err);\n}\nfunction $b19aa4638d51eb26$export$f3b8e31d958a9f24(id) {\n $b19aa4638d51eb26$var$setErrorMessage(id, false);\n}\nfunction $b19aa4638d51eb26$export$333c4084290bc216(id) {\n $b19aa4638d51eb26$var$setErrorMessage(id, true);\n}\nfunction $b19aa4638d51eb26$var$setErrorMessage(id, hidden) {\n if (hidden) {\n const e = new CustomEvent(\"messagebar:hide-message\", {\n detail: {\n id: id\n }\n });\n document.dispatchEvent(e);\n } else {\n const e = new CustomEvent(\"messagebar:show-message\", {\n detail: {\n id: id\n }\n });\n document.dispatchEvent(e);\n }\n}\nclass $b19aa4638d51eb26$export$9bee1a6f18f533d2 extends (0, $ixn3l.Controller) {\n connect() {\n document.addEventListener(\"turbo:before-cache\", this.beforeCache);\n }\n close(e) {\n e.preventDefault();\n e.stopPropagation();\n this.hide();\n }\n disconnect() {\n document.removeEventListener(\"turbo:before-cache\", this.beforeCache);\n }\n showMessage(e) {\n this.open();\n const id = e.detail.id;\n document.getElementById(id)?.classList?.remove(\"hidden\");\n }\n hideMessage(e) {\n this.hide();\n const id = e.detail.id;\n document.getElementById(id)?.classList?.add(\"hidden\");\n }\n constructor(...args){\n super(...args);\n // Close the message bar before cache the page.\n // So that the cached page does not have the message bar shown.\n // See https://github.com/authgear/authgear-server/issues/1424\n this.beforeCache = ()=>{\n this.hide();\n };\n this.open = ()=>{\n const barTarget = this.element;\n barTarget.classList.remove(\"hidden\");\n };\n this.hide = ()=>{\n const barTarget = this.element;\n barTarget.classList.add(\"hidden\");\n };\n }\n}\n\n});\n\n\nparcelRegister(\"iMJ7H\", function(module, exports) {\n\n$parcel$export(module.exports, \"PreventDoubleTapController\", () => $5df3022776a321e4$export$c6da7db072182cc4);\n\nvar $ixn3l = parcelRequire(\"ixn3l\");\nclass $5df3022776a321e4$export$c6da7db072182cc4 extends (0, $ixn3l.Controller) {\n action(e) {\n e.preventDefault();\n e.stopPropagation();\n }\n}\n\n});\n\nparcelRegister(\"2Y0mv\", function(module, exports) {\n\n$parcel$export(module.exports, \"LockoutController\", () => $9b1e3d6e13a9a761$export$a4310b58c682348e);\n\nvar $ixn3l = parcelRequire(\"ixn3l\");\n\nvar $7jicr = parcelRequire(\"7jicr\");\nclass $9b1e3d6e13a9a761$export$a4310b58c682348e extends (0, $ixn3l.Controller) {\n static #_ = this.outlets = [\n \"format-date-relative\"\n ];\n static #_1 = this.targets = [\n \"locked\",\n \"unlocked\"\n ];\n static #_2 = this.values = {\n lockUntil: String,\n actionButtonSelector: String\n };\n stopTick() {\n if (this.intervalHandle != null) {\n window.clearInterval(this.intervalHandle);\n this.intervalHandle = null;\n this.wasActionButtonDisabled = false;\n }\n }\n setupTick() {\n this.isLocked = undefined;\n this.stopTick();\n const el = this.element;\n const lockUntil = (0, $7jicr.DateTime).fromISO(this.lockUntilValue);\n if (!this.lockUntilValue || !lockUntil.isValid) return;\n const tick = ()=>{\n const actionButtonEl = el.querySelector(this.actionButtonSelectorValue);\n const now = (0, $7jicr.DateTime).now();\n this.formatDateRelativeOutlets.forEach((outlet)=>outlet.relativeBaseValue = now.toISO());\n const newIsLocked = now < lockUntil;\n if (newIsLocked === this.isLocked) return;\n this.isLocked = newIsLocked;\n if (actionButtonEl != null) {\n if (newIsLocked === true) {\n this.wasActionButtonDisabled = actionButtonEl?.getAttribute(\"disabled\") ? true : false;\n actionButtonEl.disabled = true;\n } else actionButtonEl.disabled = this.wasActionButtonDisabled;\n }\n this.lockedTargets.forEach((el)=>el.style.display = newIsLocked ? \"\" : \"none\");\n this.unlockedTargets.forEach((el)=>el.style.display = newIsLocked ? \"none\" : \"\");\n if (!newIsLocked) this.stopTick();\n };\n tick();\n this.intervalHandle = window.setInterval(tick, 100);\n }\n connect() {\n this.setupTick();\n }\n disconnect() {\n this.stopTick();\n }\n constructor(...args){\n super(...args);\n this.isLocked = undefined;\n this.wasActionButtonDisabled = false;\n }\n}\n\n});\nparcelRegister(\"7jicr\", function(module, exports) {\n\"use strict\";\nObject.defineProperty(module.exports, \"__esModule\", {\n value: true\n});\nfunction $55286cce8d5d6f71$var$_defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, $55286cce8d5d6f71$var$_toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction $55286cce8d5d6f71$var$_createClass(Constructor, protoProps, staticProps) {\n if (protoProps) $55286cce8d5d6f71$var$_defineProperties(Constructor.prototype, protoProps);\n if (staticProps) $55286cce8d5d6f71$var$_defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nfunction $55286cce8d5d6f71$var$_extends() {\n $55286cce8d5d6f71$var$_extends = Object.assign ? Object.assign.bind() : function(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i];\n for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];\n }\n return target;\n };\n return $55286cce8d5d6f71$var$_extends.apply(this, arguments);\n}\nfunction $55286cce8d5d6f71$var$_inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n $55286cce8d5d6f71$var$_setPrototypeOf(subClass, superClass);\n}\nfunction $55286cce8d5d6f71$var$_getPrototypeOf(o) {\n $55286cce8d5d6f71$var$_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return $55286cce8d5d6f71$var$_getPrototypeOf(o);\n}\nfunction $55286cce8d5d6f71$var$_setPrototypeOf(o, p) {\n $55286cce8d5d6f71$var$_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return $55286cce8d5d6f71$var$_setPrototypeOf(o, p);\n}\nfunction $55286cce8d5d6f71$var$_isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));\n return true;\n } catch (e) {\n return false;\n }\n}\nfunction $55286cce8d5d6f71$var$_construct(Parent, args, Class) {\n if ($55286cce8d5d6f71$var$_isNativeReflectConstruct()) $55286cce8d5d6f71$var$_construct = Reflect.construct.bind();\n else $55286cce8d5d6f71$var$_construct = function _construct(Parent, args, Class) {\n var a = [\n null\n ];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) $55286cce8d5d6f71$var$_setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n return $55286cce8d5d6f71$var$_construct.apply(null, arguments);\n}\nfunction $55286cce8d5d6f71$var$_isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\nfunction $55286cce8d5d6f71$var$_wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n $55286cce8d5d6f71$var$_wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !$55286cce8d5d6f71$var$_isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") throw new TypeError(\"Super expression must either be null or a function\");\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return $55286cce8d5d6f71$var$_construct(Class, arguments, $55286cce8d5d6f71$var$_getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return $55286cce8d5d6f71$var$_setPrototypeOf(Wrapper, Class);\n };\n return $55286cce8d5d6f71$var$_wrapNativeSuper(Class);\n}\nfunction $55286cce8d5d6f71$var$_objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for(i = 0; i < sourceKeys.length; i++){\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nfunction $55286cce8d5d6f71$var$_unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return $55286cce8d5d6f71$var$_arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return $55286cce8d5d6f71$var$_arrayLikeToArray(o, minLen);\n}\nfunction $55286cce8d5d6f71$var$_arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction $55286cce8d5d6f71$var$_createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (it) return (it = it.call(o)).next.bind(it);\n if (Array.isArray(o) || (it = $55286cce8d5d6f71$var$_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction $55286cce8d5d6f71$var$_toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nfunction $55286cce8d5d6f71$var$_toPropertyKey(arg) {\n var key = $55286cce8d5d6f71$var$_toPrimitive(arg, \"string\");\n return typeof key === \"symbol\" ? key : String(key);\n}\n// these aren't really private, but nor are they really useful to document\n/**\n * @private\n */ var $55286cce8d5d6f71$var$LuxonError = /*#__PURE__*/ function(_Error) {\n $55286cce8d5d6f71$var$_inheritsLoose(LuxonError, _Error);\n function LuxonError() {\n return _Error.apply(this, arguments) || this;\n }\n return LuxonError;\n}(/*#__PURE__*/ $55286cce8d5d6f71$var$_wrapNativeSuper(Error));\n/**\n * @private\n */ var $55286cce8d5d6f71$var$InvalidDateTimeError = /*#__PURE__*/ function(_LuxonError) {\n $55286cce8d5d6f71$var$_inheritsLoose(InvalidDateTimeError, _LuxonError);\n function InvalidDateTimeError(reason) {\n return _LuxonError.call(this, \"Invalid DateTime: \" + reason.toMessage()) || this;\n }\n return InvalidDateTimeError;\n}($55286cce8d5d6f71$var$LuxonError);\n/**\n * @private\n */ var $55286cce8d5d6f71$var$InvalidIntervalError = /*#__PURE__*/ function(_LuxonError2) {\n $55286cce8d5d6f71$var$_inheritsLoose(InvalidIntervalError, _LuxonError2);\n function InvalidIntervalError(reason) {\n return _LuxonError2.call(this, \"Invalid Interval: \" + reason.toMessage()) || this;\n }\n return InvalidIntervalError;\n}($55286cce8d5d6f71$var$LuxonError);\n/**\n * @private\n */ var $55286cce8d5d6f71$var$InvalidDurationError = /*#__PURE__*/ function(_LuxonError3) {\n $55286cce8d5d6f71$var$_inheritsLoose(InvalidDurationError, _LuxonError3);\n function InvalidDurationError(reason) {\n return _LuxonError3.call(this, \"Invalid Duration: \" + reason.toMessage()) || this;\n }\n return InvalidDurationError;\n}($55286cce8d5d6f71$var$LuxonError);\n/**\n * @private\n */ var $55286cce8d5d6f71$var$ConflictingSpecificationError = /*#__PURE__*/ function(_LuxonError4) {\n $55286cce8d5d6f71$var$_inheritsLoose(ConflictingSpecificationError, _LuxonError4);\n function ConflictingSpecificationError() {\n return _LuxonError4.apply(this, arguments) || this;\n }\n return ConflictingSpecificationError;\n}($55286cce8d5d6f71$var$LuxonError);\n/**\n * @private\n */ var $55286cce8d5d6f71$var$InvalidUnitError = /*#__PURE__*/ function(_LuxonError5) {\n $55286cce8d5d6f71$var$_inheritsLoose(InvalidUnitError, _LuxonError5);\n function InvalidUnitError(unit) {\n return _LuxonError5.call(this, \"Invalid unit \" + unit) || this;\n }\n return InvalidUnitError;\n}($55286cce8d5d6f71$var$LuxonError);\n/**\n * @private\n */ var $55286cce8d5d6f71$var$InvalidArgumentError = /*#__PURE__*/ function(_LuxonError6) {\n $55286cce8d5d6f71$var$_inheritsLoose(InvalidArgumentError, _LuxonError6);\n function InvalidArgumentError() {\n return _LuxonError6.apply(this, arguments) || this;\n }\n return InvalidArgumentError;\n}($55286cce8d5d6f71$var$LuxonError);\n/**\n * @private\n */ var $55286cce8d5d6f71$var$ZoneIsAbstractError = /*#__PURE__*/ function(_LuxonError7) {\n $55286cce8d5d6f71$var$_inheritsLoose(ZoneIsAbstractError, _LuxonError7);\n function ZoneIsAbstractError() {\n return _LuxonError7.call(this, \"Zone is an abstract class\") || this;\n }\n return ZoneIsAbstractError;\n}($55286cce8d5d6f71$var$LuxonError);\n/**\n * @private\n */ var $55286cce8d5d6f71$var$n = \"numeric\", $55286cce8d5d6f71$var$s = \"short\", $55286cce8d5d6f71$var$l = \"long\";\nvar $55286cce8d5d6f71$var$DATE_SHORT = {\n year: $55286cce8d5d6f71$var$n,\n month: $55286cce8d5d6f71$var$n,\n day: $55286cce8d5d6f71$var$n\n};\nvar $55286cce8d5d6f71$var$DATE_MED = {\n year: $55286cce8d5d6f71$var$n,\n month: $55286cce8d5d6f71$var$s,\n day: $55286cce8d5d6f71$var$n\n};\nvar $55286cce8d5d6f71$var$DATE_MED_WITH_WEEKDAY = {\n year: $55286cce8d5d6f71$var$n,\n month: $55286cce8d5d6f71$var$s,\n day: $55286cce8d5d6f71$var$n,\n weekday: $55286cce8d5d6f71$var$s\n};\nvar $55286cce8d5d6f71$var$DATE_FULL = {\n year: $55286cce8d5d6f71$var$n,\n month: $55286cce8d5d6f71$var$l,\n day: $55286cce8d5d6f71$var$n\n};\nvar $55286cce8d5d6f71$var$DATE_HUGE = {\n year: $55286cce8d5d6f71$var$n,\n month: $55286cce8d5d6f71$var$l,\n day: $55286cce8d5d6f71$var$n,\n weekday: $55286cce8d5d6f71$var$l\n};\nvar $55286cce8d5d6f71$var$TIME_SIMPLE = {\n hour: $55286cce8d5d6f71$var$n,\n minute: $55286cce8d5d6f71$var$n\n};\nvar $55286cce8d5d6f71$var$TIME_WITH_SECONDS = {\n hour: $55286cce8d5d6f71$var$n,\n minute: $55286cce8d5d6f71$var$n,\n second: $55286cce8d5d6f71$var$n\n};\nvar $55286cce8d5d6f71$var$TIME_WITH_SHORT_OFFSET = {\n hour: $55286cce8d5d6f71$var$n,\n minute: $55286cce8d5d6f71$var$n,\n second: $55286cce8d5d6f71$var$n,\n timeZoneName: $55286cce8d5d6f71$var$s\n};\nvar $55286cce8d5d6f71$var$TIME_WITH_LONG_OFFSET = {\n hour: $55286cce8d5d6f71$var$n,\n minute: $55286cce8d5d6f71$var$n,\n second: $55286cce8d5d6f71$var$n,\n timeZoneName: $55286cce8d5d6f71$var$l\n};\nvar $55286cce8d5d6f71$var$TIME_24_SIMPLE = {\n hour: $55286cce8d5d6f71$var$n,\n minute: $55286cce8d5d6f71$var$n,\n hourCycle: \"h23\"\n};\nvar $55286cce8d5d6f71$var$TIME_24_WITH_SECONDS = {\n hour: $55286cce8d5d6f71$var$n,\n minute: $55286cce8d5d6f71$var$n,\n second: $55286cce8d5d6f71$var$n,\n hourCycle: \"h23\"\n};\nvar $55286cce8d5d6f71$var$TIME_24_WITH_SHORT_OFFSET = {\n hour: $55286cce8d5d6f71$var$n,\n minute: $55286cce8d5d6f71$var$n,\n second: $55286cce8d5d6f71$var$n,\n hourCycle: \"h23\",\n timeZoneName: $55286cce8d5d6f71$var$s\n};\nvar $55286cce8d5d6f71$var$TIME_24_WITH_LONG_OFFSET = {\n hour: $55286cce8d5d6f71$var$n,\n minute: $55286cce8d5d6f71$var$n,\n second: $55286cce8d5d6f71$var$n,\n hourCycle: \"h23\",\n timeZoneName: $55286cce8d5d6f71$var$l\n};\nvar $55286cce8d5d6f71$var$DATETIME_SHORT = {\n year: $55286cce8d5d6f71$var$n,\n month: $55286cce8d5d6f71$var$n,\n day: $55286cce8d5d6f71$var$n,\n hour: $55286cce8d5d6f71$var$n,\n minute: $55286cce8d5d6f71$var$n\n};\nvar $55286cce8d5d6f71$var$DATETIME_SHORT_WITH_SECONDS = {\n year: $55286cce8d5d6f71$var$n,\n month: $55286cce8d5d6f71$var$n,\n day: $55286cce8d5d6f71$var$n,\n hour: $55286cce8d5d6f71$var$n,\n minute: $55286cce8d5d6f71$var$n,\n second: $55286cce8d5d6f71$var$n\n};\nvar $55286cce8d5d6f71$var$DATETIME_MED = {\n year: $55286cce8d5d6f71$var$n,\n month: $55286cce8d5d6f71$var$s,\n day: $55286cce8d5d6f71$var$n,\n hour: $55286cce8d5d6f71$var$n,\n minute: $55286cce8d5d6f71$var$n\n};\nvar $55286cce8d5d6f71$var$DATETIME_MED_WITH_SECONDS = {\n year: $55286cce8d5d6f71$var$n,\n month: $55286cce8d5d6f71$var$s,\n day: $55286cce8d5d6f71$var$n,\n hour: $55286cce8d5d6f71$var$n,\n minute: $55286cce8d5d6f71$var$n,\n second: $55286cce8d5d6f71$var$n\n};\nvar $55286cce8d5d6f71$var$DATETIME_MED_WITH_WEEKDAY = {\n year: $55286cce8d5d6f71$var$n,\n month: $55286cce8d5d6f71$var$s,\n day: $55286cce8d5d6f71$var$n,\n weekday: $55286cce8d5d6f71$var$s,\n hour: $55286cce8d5d6f71$var$n,\n minute: $55286cce8d5d6f71$var$n\n};\nvar $55286cce8d5d6f71$var$DATETIME_FULL = {\n year: $55286cce8d5d6f71$var$n,\n month: $55286cce8d5d6f71$var$l,\n day: $55286cce8d5d6f71$var$n,\n hour: $55286cce8d5d6f71$var$n,\n minute: $55286cce8d5d6f71$var$n,\n timeZoneName: $55286cce8d5d6f71$var$s\n};\nvar $55286cce8d5d6f71$var$DATETIME_FULL_WITH_SECONDS = {\n year: $55286cce8d5d6f71$var$n,\n month: $55286cce8d5d6f71$var$l,\n day: $55286cce8d5d6f71$var$n,\n hour: $55286cce8d5d6f71$var$n,\n minute: $55286cce8d5d6f71$var$n,\n second: $55286cce8d5d6f71$var$n,\n timeZoneName: $55286cce8d5d6f71$var$s\n};\nvar $55286cce8d5d6f71$var$DATETIME_HUGE = {\n year: $55286cce8d5d6f71$var$n,\n month: $55286cce8d5d6f71$var$l,\n day: $55286cce8d5d6f71$var$n,\n weekday: $55286cce8d5d6f71$var$l,\n hour: $55286cce8d5d6f71$var$n,\n minute: $55286cce8d5d6f71$var$n,\n timeZoneName: $55286cce8d5d6f71$var$l\n};\nvar $55286cce8d5d6f71$var$DATETIME_HUGE_WITH_SECONDS = {\n year: $55286cce8d5d6f71$var$n,\n month: $55286cce8d5d6f71$var$l,\n day: $55286cce8d5d6f71$var$n,\n weekday: $55286cce8d5d6f71$var$l,\n hour: $55286cce8d5d6f71$var$n,\n minute: $55286cce8d5d6f71$var$n,\n second: $55286cce8d5d6f71$var$n,\n timeZoneName: $55286cce8d5d6f71$var$l\n};\n/**\n * @interface\n */ var $55286cce8d5d6f71$var$Zone = /*#__PURE__*/ function() {\n function Zone() {}\n var _proto = Zone.prototype;\n /**\n * Returns the offset's common name (such as EST) at the specified timestamp\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the name\n * @param {Object} opts - Options to affect the format\n * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n * @param {string} opts.locale - What locale to return the offset name in.\n * @return {string}\n */ _proto.offsetName = function offsetName(ts, opts) {\n throw new $55286cce8d5d6f71$var$ZoneIsAbstractError();\n } /**\n * Returns the offset's value as a string\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */ ;\n _proto.formatOffset = function formatOffset(ts, format) {\n throw new $55286cce8d5d6f71$var$ZoneIsAbstractError();\n } /**\n * Return the offset in minutes for this zone at the specified timestamp.\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to compute the offset\n * @return {number}\n */ ;\n _proto.offset = function offset(ts) {\n throw new $55286cce8d5d6f71$var$ZoneIsAbstractError();\n } /**\n * Return whether this Zone is equal to another zone\n * @abstract\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */ ;\n _proto.equals = function equals(otherZone) {\n throw new $55286cce8d5d6f71$var$ZoneIsAbstractError();\n } /**\n * Return whether this Zone is valid.\n * @abstract\n * @type {boolean}\n */ ;\n $55286cce8d5d6f71$var$_createClass(Zone, [\n {\n key: \"type\",\n get: /**\n * The type of zone\n * @abstract\n * @type {string}\n */ function get() {\n throw new $55286cce8d5d6f71$var$ZoneIsAbstractError();\n }\n },\n {\n key: \"name\",\n get: function get() {\n throw new $55286cce8d5d6f71$var$ZoneIsAbstractError();\n }\n },\n {\n key: \"ianaName\",\n get: function get() {\n return this.name;\n }\n },\n {\n key: \"isUniversal\",\n get: function get() {\n throw new $55286cce8d5d6f71$var$ZoneIsAbstractError();\n }\n },\n {\n key: \"isValid\",\n get: function get() {\n throw new $55286cce8d5d6f71$var$ZoneIsAbstractError();\n }\n }\n ]);\n return Zone;\n}();\nvar $55286cce8d5d6f71$var$singleton$1 = null;\n/**\n * Represents the local zone for this JavaScript environment.\n * @implements {Zone}\n */ var $55286cce8d5d6f71$var$SystemZone = /*#__PURE__*/ function(_Zone) {\n $55286cce8d5d6f71$var$_inheritsLoose(SystemZone, _Zone);\n function SystemZone() {\n return _Zone.apply(this, arguments) || this;\n }\n var _proto = SystemZone.prototype;\n /** @override **/ _proto.offsetName = function offsetName(ts, _ref) {\n var format = _ref.format, locale = _ref.locale;\n return $55286cce8d5d6f71$var$parseZoneInfo(ts, format, locale);\n } /** @override **/ ;\n _proto.formatOffset = function formatOffset$1(ts, format) {\n return $55286cce8d5d6f71$var$formatOffset(this.offset(ts), format);\n } /** @override **/ ;\n _proto.offset = function offset(ts) {\n return -new Date(ts).getTimezoneOffset();\n } /** @override **/ ;\n _proto.equals = function equals(otherZone) {\n return otherZone.type === \"system\";\n } /** @override **/ ;\n $55286cce8d5d6f71$var$_createClass(SystemZone, [\n {\n key: \"type\",\n get: /** @override **/ function get() {\n return \"system\";\n }\n },\n {\n key: \"name\",\n get: function get() {\n return new Intl.DateTimeFormat().resolvedOptions().timeZone;\n }\n },\n {\n key: \"isUniversal\",\n get: function get() {\n return false;\n }\n },\n {\n key: \"isValid\",\n get: function get() {\n return true;\n }\n }\n ], [\n {\n key: \"instance\",\n get: /**\n * Get a singleton instance of the local zone\n * @return {SystemZone}\n */ function get() {\n if ($55286cce8d5d6f71$var$singleton$1 === null) $55286cce8d5d6f71$var$singleton$1 = new SystemZone();\n return $55286cce8d5d6f71$var$singleton$1;\n }\n }\n ]);\n return SystemZone;\n}($55286cce8d5d6f71$var$Zone);\nvar $55286cce8d5d6f71$var$dtfCache = {};\nfunction $55286cce8d5d6f71$var$makeDTF(zone) {\n if (!$55286cce8d5d6f71$var$dtfCache[zone]) $55286cce8d5d6f71$var$dtfCache[zone] = new Intl.DateTimeFormat(\"en-US\", {\n hour12: false,\n timeZone: zone,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n era: \"short\"\n });\n return $55286cce8d5d6f71$var$dtfCache[zone];\n}\nvar $55286cce8d5d6f71$var$typeToPos = {\n year: 0,\n month: 1,\n day: 2,\n era: 3,\n hour: 4,\n minute: 5,\n second: 6\n};\nfunction $55286cce8d5d6f71$var$hackyOffset(dtf, date) {\n var formatted = dtf.format(date).replace(/\\u200E/g, \"\"), parsed = /(\\d+)\\/(\\d+)\\/(\\d+) (AD|BC),? (\\d+):(\\d+):(\\d+)/.exec(formatted), fMonth = parsed[1], fDay = parsed[2], fYear = parsed[3], fadOrBc = parsed[4], fHour = parsed[5], fMinute = parsed[6], fSecond = parsed[7];\n return [\n fYear,\n fMonth,\n fDay,\n fadOrBc,\n fHour,\n fMinute,\n fSecond\n ];\n}\nfunction $55286cce8d5d6f71$var$partsOffset(dtf, date) {\n var formatted = dtf.formatToParts(date);\n var filled = [];\n for(var i = 0; i < formatted.length; i++){\n var _formatted$i = formatted[i], type = _formatted$i.type, value = _formatted$i.value;\n var pos = $55286cce8d5d6f71$var$typeToPos[type];\n if (type === \"era\") filled[pos] = value;\n else if (!$55286cce8d5d6f71$var$isUndefined(pos)) filled[pos] = parseInt(value, 10);\n }\n return filled;\n}\nvar $55286cce8d5d6f71$var$ianaZoneCache = {};\n/**\n * A zone identified by an IANA identifier, like America/New_York\n * @implements {Zone}\n */ var $55286cce8d5d6f71$var$IANAZone = /*#__PURE__*/ function(_Zone) {\n $55286cce8d5d6f71$var$_inheritsLoose(IANAZone, _Zone);\n /**\n * @param {string} name - Zone name\n * @return {IANAZone}\n */ IANAZone.create = function create(name) {\n if (!$55286cce8d5d6f71$var$ianaZoneCache[name]) $55286cce8d5d6f71$var$ianaZoneCache[name] = new IANAZone(name);\n return $55286cce8d5d6f71$var$ianaZoneCache[name];\n } /**\n * Reset local caches. Should only be necessary in testing scenarios.\n * @return {void}\n */ ;\n IANAZone.resetCache = function resetCache() {\n $55286cce8d5d6f71$var$ianaZoneCache = {};\n $55286cce8d5d6f71$var$dtfCache = {};\n } /**\n * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.\n * @param {string} s - The string to check validity on\n * @example IANAZone.isValidSpecifier(\"America/New_York\") //=> true\n * @example IANAZone.isValidSpecifier(\"Sport~~blorp\") //=> false\n * @deprecated This method returns false for some valid IANA names. Use isValidZone instead.\n * @return {boolean}\n */ ;\n IANAZone.isValidSpecifier = function isValidSpecifier(s) {\n return this.isValidZone(s);\n } /**\n * Returns whether the provided string identifies a real zone\n * @param {string} zone - The string to check\n * @example IANAZone.isValidZone(\"America/New_York\") //=> true\n * @example IANAZone.isValidZone(\"Fantasia/Castle\") //=> false\n * @example IANAZone.isValidZone(\"Sport~~blorp\") //=> false\n * @return {boolean}\n */ ;\n IANAZone.isValidZone = function isValidZone(zone) {\n if (!zone) return false;\n try {\n new Intl.DateTimeFormat(\"en-US\", {\n timeZone: zone\n }).format();\n return true;\n } catch (e) {\n return false;\n }\n };\n function IANAZone(name) {\n var _this;\n _this = _Zone.call(this) || this;\n /** @private **/ _this.zoneName = name;\n /** @private **/ _this.valid = IANAZone.isValidZone(name);\n return _this;\n }\n /** @override **/ var _proto = IANAZone.prototype;\n /** @override **/ _proto.offsetName = function offsetName(ts, _ref) {\n var format = _ref.format, locale = _ref.locale;\n return $55286cce8d5d6f71$var$parseZoneInfo(ts, format, locale, this.name);\n } /** @override **/ ;\n _proto.formatOffset = function formatOffset$1(ts, format) {\n return $55286cce8d5d6f71$var$formatOffset(this.offset(ts), format);\n } /** @override **/ ;\n _proto.offset = function offset(ts) {\n var date = new Date(ts);\n if (isNaN(date)) return NaN;\n var dtf = $55286cce8d5d6f71$var$makeDTF(this.name);\n var _ref2 = dtf.formatToParts ? $55286cce8d5d6f71$var$partsOffset(dtf, date) : $55286cce8d5d6f71$var$hackyOffset(dtf, date), year = _ref2[0], month = _ref2[1], day = _ref2[2], adOrBc = _ref2[3], hour = _ref2[4], minute = _ref2[5], second = _ref2[6];\n if (adOrBc === \"BC\") year = -Math.abs(year) + 1;\n // because we're using hour12 and https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat\n var adjustedHour = hour === 24 ? 0 : hour;\n var asUTC = $55286cce8d5d6f71$var$objToLocalTS({\n year: year,\n month: month,\n day: day,\n hour: adjustedHour,\n minute: minute,\n second: second,\n millisecond: 0\n });\n var asTS = +date;\n var over = asTS % 1000;\n asTS -= over >= 0 ? over : 1000 + over;\n return (asUTC - asTS) / 60000;\n } /** @override **/ ;\n _proto.equals = function equals(otherZone) {\n return otherZone.type === \"iana\" && otherZone.name === this.name;\n } /** @override **/ ;\n $55286cce8d5d6f71$var$_createClass(IANAZone, [\n {\n key: \"type\",\n get: function get() {\n return \"iana\";\n }\n },\n {\n key: \"name\",\n get: function get() {\n return this.zoneName;\n }\n },\n {\n key: \"isUniversal\",\n get: function get() {\n return false;\n }\n },\n {\n key: \"isValid\",\n get: function get() {\n return this.valid;\n }\n }\n ]);\n return IANAZone;\n}($55286cce8d5d6f71$var$Zone);\nvar $55286cce8d5d6f71$var$_excluded = [\n \"base\"\n], $55286cce8d5d6f71$var$_excluded2 = [\n \"padTo\",\n \"floor\"\n];\n// todo - remap caching\nvar $55286cce8d5d6f71$var$intlLFCache = {};\nfunction $55286cce8d5d6f71$var$getCachedLF(locString, opts) {\n if (opts === void 0) opts = {};\n var key = JSON.stringify([\n locString,\n opts\n ]);\n var dtf = $55286cce8d5d6f71$var$intlLFCache[key];\n if (!dtf) {\n dtf = new Intl.ListFormat(locString, opts);\n $55286cce8d5d6f71$var$intlLFCache[key] = dtf;\n }\n return dtf;\n}\nvar $55286cce8d5d6f71$var$intlDTCache = {};\nfunction $55286cce8d5d6f71$var$getCachedDTF(locString, opts) {\n if (opts === void 0) opts = {};\n var key = JSON.stringify([\n locString,\n opts\n ]);\n var dtf = $55286cce8d5d6f71$var$intlDTCache[key];\n if (!dtf) {\n dtf = new Intl.DateTimeFormat(locString, opts);\n $55286cce8d5d6f71$var$intlDTCache[key] = dtf;\n }\n return dtf;\n}\nvar $55286cce8d5d6f71$var$intlNumCache = {};\nfunction $55286cce8d5d6f71$var$getCachedINF(locString, opts) {\n if (opts === void 0) opts = {};\n var key = JSON.stringify([\n locString,\n opts\n ]);\n var inf = $55286cce8d5d6f71$var$intlNumCache[key];\n if (!inf) {\n inf = new Intl.NumberFormat(locString, opts);\n $55286cce8d5d6f71$var$intlNumCache[key] = inf;\n }\n return inf;\n}\nvar $55286cce8d5d6f71$var$intlRelCache = {};\nfunction $55286cce8d5d6f71$var$getCachedRTF(locString, opts) {\n if (opts === void 0) opts = {};\n var _opts = opts;\n _opts.base;\n var cacheKeyOpts = $55286cce8d5d6f71$var$_objectWithoutPropertiesLoose(_opts, $55286cce8d5d6f71$var$_excluded); // exclude `base` from the options\n var key = JSON.stringify([\n locString,\n cacheKeyOpts\n ]);\n var inf = $55286cce8d5d6f71$var$intlRelCache[key];\n if (!inf) {\n inf = new Intl.RelativeTimeFormat(locString, opts);\n $55286cce8d5d6f71$var$intlRelCache[key] = inf;\n }\n return inf;\n}\nvar $55286cce8d5d6f71$var$sysLocaleCache = null;\nfunction $55286cce8d5d6f71$var$systemLocale() {\n if ($55286cce8d5d6f71$var$sysLocaleCache) return $55286cce8d5d6f71$var$sysLocaleCache;\n else {\n $55286cce8d5d6f71$var$sysLocaleCache = new Intl.DateTimeFormat().resolvedOptions().locale;\n return $55286cce8d5d6f71$var$sysLocaleCache;\n }\n}\nvar $55286cce8d5d6f71$var$weekInfoCache = {};\nfunction $55286cce8d5d6f71$var$getCachedWeekInfo(locString) {\n var data = $55286cce8d5d6f71$var$weekInfoCache[locString];\n if (!data) {\n var locale = new Intl.Locale(locString);\n // browsers currently implement this as a property, but spec says it should be a getter function\n data = \"getWeekInfo\" in locale ? locale.getWeekInfo() : locale.weekInfo;\n $55286cce8d5d6f71$var$weekInfoCache[locString] = data;\n }\n return data;\n}\nfunction $55286cce8d5d6f71$var$parseLocaleString(localeStr) {\n // I really want to avoid writing a BCP 47 parser\n // see, e.g. https://github.com/wooorm/bcp-47\n // Instead, we'll do this:\n // a) if the string has no -u extensions, just leave it alone\n // b) if it does, use Intl to resolve everything\n // c) if Intl fails, try again without the -u\n // private subtags and unicode subtags have ordering requirements,\n // and we're not properly parsing this, so just strip out the\n // private ones if they exist.\n var xIndex = localeStr.indexOf(\"-x-\");\n if (xIndex !== -1) localeStr = localeStr.substring(0, xIndex);\n var uIndex = localeStr.indexOf(\"-u-\");\n if (uIndex === -1) return [\n localeStr\n ];\n else {\n var options;\n var selectedStr;\n try {\n options = $55286cce8d5d6f71$var$getCachedDTF(localeStr).resolvedOptions();\n selectedStr = localeStr;\n } catch (e) {\n var smaller = localeStr.substring(0, uIndex);\n options = $55286cce8d5d6f71$var$getCachedDTF(smaller).resolvedOptions();\n selectedStr = smaller;\n }\n var _options = options, numberingSystem = _options.numberingSystem, calendar = _options.calendar;\n return [\n selectedStr,\n numberingSystem,\n calendar\n ];\n }\n}\nfunction $55286cce8d5d6f71$var$intlConfigString(localeStr, numberingSystem, outputCalendar) {\n if (outputCalendar || numberingSystem) {\n if (!localeStr.includes(\"-u-\")) localeStr += \"-u\";\n if (outputCalendar) localeStr += \"-ca-\" + outputCalendar;\n if (numberingSystem) localeStr += \"-nu-\" + numberingSystem;\n return localeStr;\n } else return localeStr;\n}\nfunction $55286cce8d5d6f71$var$mapMonths(f) {\n var ms = [];\n for(var i = 1; i <= 12; i++){\n var dt = $55286cce8d5d6f71$var$DateTime.utc(2009, i, 1);\n ms.push(f(dt));\n }\n return ms;\n}\nfunction $55286cce8d5d6f71$var$mapWeekdays(f) {\n var ms = [];\n for(var i = 1; i <= 7; i++){\n var dt = $55286cce8d5d6f71$var$DateTime.utc(2016, 11, 13 + i);\n ms.push(f(dt));\n }\n return ms;\n}\nfunction $55286cce8d5d6f71$var$listStuff(loc, length, englishFn, intlFn) {\n var mode = loc.listingMode();\n if (mode === \"error\") return null;\n else if (mode === \"en\") return englishFn(length);\n else return intlFn(length);\n}\nfunction $55286cce8d5d6f71$var$supportsFastNumbers(loc) {\n if (loc.numberingSystem && loc.numberingSystem !== \"latn\") return false;\n else return loc.numberingSystem === \"latn\" || !loc.locale || loc.locale.startsWith(\"en\") || new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === \"latn\";\n}\n/**\n * @private\n */ var $55286cce8d5d6f71$var$PolyNumberFormatter = /*#__PURE__*/ function() {\n function PolyNumberFormatter(intl, forceSimple, opts) {\n this.padTo = opts.padTo || 0;\n this.floor = opts.floor || false;\n opts.padTo;\n opts.floor;\n var otherOpts = $55286cce8d5d6f71$var$_objectWithoutPropertiesLoose(opts, $55286cce8d5d6f71$var$_excluded2);\n if (!forceSimple || Object.keys(otherOpts).length > 0) {\n var intlOpts = $55286cce8d5d6f71$var$_extends({\n useGrouping: false\n }, opts);\n if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;\n this.inf = $55286cce8d5d6f71$var$getCachedINF(intl, intlOpts);\n }\n }\n var _proto = PolyNumberFormatter.prototype;\n _proto.format = function format(i) {\n if (this.inf) {\n var fixed = this.floor ? Math.floor(i) : i;\n return this.inf.format(fixed);\n } else {\n // to match the browser's numberformatter defaults\n var _fixed = this.floor ? Math.floor(i) : $55286cce8d5d6f71$var$roundTo(i, 3);\n return $55286cce8d5d6f71$var$padStart(_fixed, this.padTo);\n }\n };\n return PolyNumberFormatter;\n}();\n/**\n * @private\n */ var $55286cce8d5d6f71$var$PolyDateFormatter = /*#__PURE__*/ function() {\n function PolyDateFormatter(dt, intl, opts) {\n this.opts = opts;\n this.originalZone = undefined;\n var z = undefined;\n if (this.opts.timeZone) // Don't apply any workarounds if a timeZone is explicitly provided in opts\n this.dt = dt;\n else if (dt.zone.type === \"fixed\") {\n // UTC-8 or Etc/UTC-8 are not part of tzdata, only Etc/GMT+8 and the like.\n // That is why fixed-offset TZ is set to that unless it is:\n // 1. Representing offset 0 when UTC is used to maintain previous behavior and does not become GMT.\n // 2. Unsupported by the browser:\n // - some do not support Etc/\n // - < Etc/GMT-14, > Etc/GMT+12, and 30-minute or 45-minute offsets are not part of tzdata\n var gmtOffset = -1 * (dt.offset / 60);\n var offsetZ = gmtOffset >= 0 ? \"Etc/GMT+\" + gmtOffset : \"Etc/GMT\" + gmtOffset;\n if (dt.offset !== 0 && $55286cce8d5d6f71$var$IANAZone.create(offsetZ).valid) {\n z = offsetZ;\n this.dt = dt;\n } else {\n // Not all fixed-offset zones like Etc/+4:30 are present in tzdata so\n // we manually apply the offset and substitute the zone as needed.\n z = \"UTC\";\n this.dt = dt.offset === 0 ? dt : dt.setZone(\"UTC\").plus({\n minutes: dt.offset\n });\n this.originalZone = dt.zone;\n }\n } else if (dt.zone.type === \"system\") this.dt = dt;\n else if (dt.zone.type === \"iana\") {\n this.dt = dt;\n z = dt.zone.name;\n } else {\n // Custom zones can have any offset / offsetName so we just manually\n // apply the offset and substitute the zone as needed.\n z = \"UTC\";\n this.dt = dt.setZone(\"UTC\").plus({\n minutes: dt.offset\n });\n this.originalZone = dt.zone;\n }\n var intlOpts = $55286cce8d5d6f71$var$_extends({}, this.opts);\n intlOpts.timeZone = intlOpts.timeZone || z;\n this.dtf = $55286cce8d5d6f71$var$getCachedDTF(intl, intlOpts);\n }\n var _proto2 = PolyDateFormatter.prototype;\n _proto2.format = function format() {\n if (this.originalZone) // If we have to substitute in the actual zone name, we have to use\n // formatToParts so that the timezone can be replaced.\n return this.formatToParts().map(function(_ref) {\n var value = _ref.value;\n return value;\n }).join(\"\");\n return this.dtf.format(this.dt.toJSDate());\n };\n _proto2.formatToParts = function formatToParts() {\n var _this = this;\n var parts = this.dtf.formatToParts(this.dt.toJSDate());\n if (this.originalZone) return parts.map(function(part) {\n if (part.type === \"timeZoneName\") {\n var offsetName = _this.originalZone.offsetName(_this.dt.ts, {\n locale: _this.dt.locale,\n format: _this.opts.timeZoneName\n });\n return $55286cce8d5d6f71$var$_extends({}, part, {\n value: offsetName\n });\n } else return part;\n });\n return parts;\n };\n _proto2.resolvedOptions = function resolvedOptions() {\n return this.dtf.resolvedOptions();\n };\n return PolyDateFormatter;\n}();\n/**\n * @private\n */ var $55286cce8d5d6f71$var$PolyRelFormatter = /*#__PURE__*/ function() {\n function PolyRelFormatter(intl, isEnglish, opts) {\n this.opts = $55286cce8d5d6f71$var$_extends({\n style: \"long\"\n }, opts);\n if (!isEnglish && $55286cce8d5d6f71$var$hasRelative()) this.rtf = $55286cce8d5d6f71$var$getCachedRTF(intl, opts);\n }\n var _proto3 = PolyRelFormatter.prototype;\n _proto3.format = function format(count, unit) {\n if (this.rtf) return this.rtf.format(count, unit);\n else return $55286cce8d5d6f71$var$formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== \"long\");\n };\n _proto3.formatToParts = function formatToParts(count, unit) {\n if (this.rtf) return this.rtf.formatToParts(count, unit);\n else return [];\n };\n return PolyRelFormatter;\n}();\nvar $55286cce8d5d6f71$var$fallbackWeekSettings = {\n firstDay: 1,\n minimalDays: 4,\n weekend: [\n 6,\n 7\n ]\n};\n/**\n * @private\n */ var $55286cce8d5d6f71$var$Locale = /*#__PURE__*/ function() {\n Locale.fromOpts = function fromOpts(opts) {\n return Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.weekSettings, opts.defaultToEN);\n };\n Locale.create = function create(locale, numberingSystem, outputCalendar, weekSettings, defaultToEN) {\n if (defaultToEN === void 0) defaultToEN = false;\n var specifiedLocale = locale || $55286cce8d5d6f71$var$Settings.defaultLocale;\n // the system locale is useful for human readable strings but annoying for parsing/formatting known formats\n var localeR = specifiedLocale || (defaultToEN ? \"en-US\" : $55286cce8d5d6f71$var$systemLocale());\n var numberingSystemR = numberingSystem || $55286cce8d5d6f71$var$Settings.defaultNumberingSystem;\n var outputCalendarR = outputCalendar || $55286cce8d5d6f71$var$Settings.defaultOutputCalendar;\n var weekSettingsR = $55286cce8d5d6f71$var$validateWeekSettings(weekSettings) || $55286cce8d5d6f71$var$Settings.defaultWeekSettings;\n return new Locale(localeR, numberingSystemR, outputCalendarR, weekSettingsR, specifiedLocale);\n };\n Locale.resetCache = function resetCache() {\n $55286cce8d5d6f71$var$sysLocaleCache = null;\n $55286cce8d5d6f71$var$intlDTCache = {};\n $55286cce8d5d6f71$var$intlNumCache = {};\n $55286cce8d5d6f71$var$intlRelCache = {};\n };\n Locale.fromObject = function fromObject(_temp) {\n var _ref2 = _temp === void 0 ? {} : _temp, locale = _ref2.locale, numberingSystem = _ref2.numberingSystem, outputCalendar = _ref2.outputCalendar, weekSettings = _ref2.weekSettings;\n return Locale.create(locale, numberingSystem, outputCalendar, weekSettings);\n };\n function Locale(locale, numbering, outputCalendar, weekSettings, specifiedLocale) {\n var _parseLocaleString = $55286cce8d5d6f71$var$parseLocaleString(locale), parsedLocale = _parseLocaleString[0], parsedNumberingSystem = _parseLocaleString[1], parsedOutputCalendar = _parseLocaleString[2];\n this.locale = parsedLocale;\n this.numberingSystem = numbering || parsedNumberingSystem || null;\n this.outputCalendar = outputCalendar || parsedOutputCalendar || null;\n this.weekSettings = weekSettings;\n this.intl = $55286cce8d5d6f71$var$intlConfigString(this.locale, this.numberingSystem, this.outputCalendar);\n this.weekdaysCache = {\n format: {},\n standalone: {}\n };\n this.monthsCache = {\n format: {},\n standalone: {}\n };\n this.meridiemCache = null;\n this.eraCache = {};\n this.specifiedLocale = specifiedLocale;\n this.fastNumbersCached = null;\n }\n var _proto4 = Locale.prototype;\n _proto4.listingMode = function listingMode() {\n var isActuallyEn = this.isEnglish();\n var hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === \"latn\") && (this.outputCalendar === null || this.outputCalendar === \"gregory\");\n return isActuallyEn && hasNoWeirdness ? \"en\" : \"intl\";\n };\n _proto4.clone = function clone(alts) {\n if (!alts || Object.getOwnPropertyNames(alts).length === 0) return this;\n else return Locale.create(alts.locale || this.specifiedLocale, alts.numberingSystem || this.numberingSystem, alts.outputCalendar || this.outputCalendar, $55286cce8d5d6f71$var$validateWeekSettings(alts.weekSettings) || this.weekSettings, alts.defaultToEN || false);\n };\n _proto4.redefaultToEN = function redefaultToEN(alts) {\n if (alts === void 0) alts = {};\n return this.clone($55286cce8d5d6f71$var$_extends({}, alts, {\n defaultToEN: true\n }));\n };\n _proto4.redefaultToSystem = function redefaultToSystem(alts) {\n if (alts === void 0) alts = {};\n return this.clone($55286cce8d5d6f71$var$_extends({}, alts, {\n defaultToEN: false\n }));\n };\n _proto4.months = function months$1(length, format) {\n var _this2 = this;\n if (format === void 0) format = false;\n return $55286cce8d5d6f71$var$listStuff(this, length, $55286cce8d5d6f71$var$months, function() {\n var intl = format ? {\n month: length,\n day: \"numeric\"\n } : {\n month: length\n }, formatStr = format ? \"format\" : \"standalone\";\n if (!_this2.monthsCache[formatStr][length]) _this2.monthsCache[formatStr][length] = $55286cce8d5d6f71$var$mapMonths(function(dt) {\n return _this2.extract(dt, intl, \"month\");\n });\n return _this2.monthsCache[formatStr][length];\n });\n };\n _proto4.weekdays = function weekdays$1(length, format) {\n var _this3 = this;\n if (format === void 0) format = false;\n return $55286cce8d5d6f71$var$listStuff(this, length, $55286cce8d5d6f71$var$weekdays, function() {\n var intl = format ? {\n weekday: length,\n year: \"numeric\",\n month: \"long\",\n day: \"numeric\"\n } : {\n weekday: length\n }, formatStr = format ? \"format\" : \"standalone\";\n if (!_this3.weekdaysCache[formatStr][length]) _this3.weekdaysCache[formatStr][length] = $55286cce8d5d6f71$var$mapWeekdays(function(dt) {\n return _this3.extract(dt, intl, \"weekday\");\n });\n return _this3.weekdaysCache[formatStr][length];\n });\n };\n _proto4.meridiems = function meridiems$1() {\n var _this4 = this;\n return $55286cce8d5d6f71$var$listStuff(this, undefined, function() {\n return $55286cce8d5d6f71$var$meridiems;\n }, function() {\n // In theory there could be aribitrary day periods. We're gonna assume there are exactly two\n // for AM and PM. This is probably wrong, but it's makes parsing way easier.\n if (!_this4.meridiemCache) {\n var intl = {\n hour: \"numeric\",\n hourCycle: \"h12\"\n };\n _this4.meridiemCache = [\n $55286cce8d5d6f71$var$DateTime.utc(2016, 11, 13, 9),\n $55286cce8d5d6f71$var$DateTime.utc(2016, 11, 13, 19)\n ].map(function(dt) {\n return _this4.extract(dt, intl, \"dayperiod\");\n });\n }\n return _this4.meridiemCache;\n });\n };\n _proto4.eras = function eras$1(length) {\n var _this5 = this;\n return $55286cce8d5d6f71$var$listStuff(this, length, $55286cce8d5d6f71$var$eras, function() {\n var intl = {\n era: length\n };\n // This is problematic. Different calendars are going to define eras totally differently. What I need is the minimum set of dates\n // to definitely enumerate them.\n if (!_this5.eraCache[length]) _this5.eraCache[length] = [\n $55286cce8d5d6f71$var$DateTime.utc(-40, 1, 1),\n $55286cce8d5d6f71$var$DateTime.utc(2017, 1, 1)\n ].map(function(dt) {\n return _this5.extract(dt, intl, \"era\");\n });\n return _this5.eraCache[length];\n });\n };\n _proto4.extract = function extract(dt, intlOpts, field) {\n var df = this.dtFormatter(dt, intlOpts), results = df.formatToParts(), matching = results.find(function(m) {\n return m.type.toLowerCase() === field;\n });\n return matching ? matching.value : null;\n };\n _proto4.numberFormatter = function numberFormatter(opts) {\n if (opts === void 0) opts = {};\n // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave)\n // (in contrast, the rest of the condition is used heavily)\n return new $55286cce8d5d6f71$var$PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts);\n };\n _proto4.dtFormatter = function dtFormatter(dt, intlOpts) {\n if (intlOpts === void 0) intlOpts = {};\n return new $55286cce8d5d6f71$var$PolyDateFormatter(dt, this.intl, intlOpts);\n };\n _proto4.relFormatter = function relFormatter(opts) {\n if (opts === void 0) opts = {};\n return new $55286cce8d5d6f71$var$PolyRelFormatter(this.intl, this.isEnglish(), opts);\n };\n _proto4.listFormatter = function listFormatter(opts) {\n if (opts === void 0) opts = {};\n return $55286cce8d5d6f71$var$getCachedLF(this.intl, opts);\n };\n _proto4.isEnglish = function isEnglish() {\n return this.locale === \"en\" || this.locale.toLowerCase() === \"en-us\" || new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith(\"en-us\");\n };\n _proto4.getWeekSettings = function getWeekSettings() {\n if (this.weekSettings) return this.weekSettings;\n else if (!$55286cce8d5d6f71$var$hasLocaleWeekInfo()) return $55286cce8d5d6f71$var$fallbackWeekSettings;\n else return $55286cce8d5d6f71$var$getCachedWeekInfo(this.locale);\n };\n _proto4.getStartOfWeek = function getStartOfWeek() {\n return this.getWeekSettings().firstDay;\n };\n _proto4.getMinDaysInFirstWeek = function getMinDaysInFirstWeek() {\n return this.getWeekSettings().minimalDays;\n };\n _proto4.getWeekendDays = function getWeekendDays() {\n return this.getWeekSettings().weekend;\n };\n _proto4.equals = function equals(other) {\n return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar;\n };\n $55286cce8d5d6f71$var$_createClass(Locale, [\n {\n key: \"fastNumbers\",\n get: function get() {\n if (this.fastNumbersCached == null) this.fastNumbersCached = $55286cce8d5d6f71$var$supportsFastNumbers(this);\n return this.fastNumbersCached;\n }\n }\n ]);\n return Locale;\n}();\nvar $55286cce8d5d6f71$var$singleton = null;\n/**\n * A zone with a fixed offset (meaning no DST)\n * @implements {Zone}\n */ var $55286cce8d5d6f71$var$FixedOffsetZone = /*#__PURE__*/ function(_Zone) {\n $55286cce8d5d6f71$var$_inheritsLoose(FixedOffsetZone, _Zone);\n /**\n * Get an instance with a specified offset\n * @param {number} offset - The offset in minutes\n * @return {FixedOffsetZone}\n */ FixedOffsetZone.instance = function instance(offset) {\n return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset);\n } /**\n * Get an instance of FixedOffsetZone from a UTC offset string, like \"UTC+6\"\n * @param {string} s - The offset string to parse\n * @example FixedOffsetZone.parseSpecifier(\"UTC+6\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC+06\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC-6:00\")\n * @return {FixedOffsetZone}\n */ ;\n FixedOffsetZone.parseSpecifier = function parseSpecifier(s) {\n if (s) {\n var r = s.match(/^utc(?:([+-]\\d{1,2})(?::(\\d{2}))?)?$/i);\n if (r) return new FixedOffsetZone($55286cce8d5d6f71$var$signedOffset(r[1], r[2]));\n }\n return null;\n };\n function FixedOffsetZone(offset) {\n var _this;\n _this = _Zone.call(this) || this;\n /** @private **/ _this.fixed = offset;\n return _this;\n }\n /** @override **/ var _proto = FixedOffsetZone.prototype;\n /** @override **/ _proto.offsetName = function offsetName() {\n return this.name;\n } /** @override **/ ;\n _proto.formatOffset = function formatOffset$1(ts, format) {\n return $55286cce8d5d6f71$var$formatOffset(this.fixed, format);\n } /** @override **/ ;\n /** @override **/ _proto.offset = function offset() {\n return this.fixed;\n } /** @override **/ ;\n _proto.equals = function equals(otherZone) {\n return otherZone.type === \"fixed\" && otherZone.fixed === this.fixed;\n } /** @override **/ ;\n $55286cce8d5d6f71$var$_createClass(FixedOffsetZone, [\n {\n key: \"type\",\n get: function get() {\n return \"fixed\";\n }\n },\n {\n key: \"name\",\n get: function get() {\n return this.fixed === 0 ? \"UTC\" : \"UTC\" + $55286cce8d5d6f71$var$formatOffset(this.fixed, \"narrow\");\n }\n },\n {\n key: \"ianaName\",\n get: function get() {\n if (this.fixed === 0) return \"Etc/UTC\";\n else return \"Etc/GMT\" + $55286cce8d5d6f71$var$formatOffset(-this.fixed, \"narrow\");\n }\n },\n {\n key: \"isUniversal\",\n get: function get() {\n return true;\n }\n },\n {\n key: \"isValid\",\n get: function get() {\n return true;\n }\n }\n ], [\n {\n key: \"utcInstance\",\n get: /**\n * Get a singleton instance of UTC\n * @return {FixedOffsetZone}\n */ function get() {\n if ($55286cce8d5d6f71$var$singleton === null) $55286cce8d5d6f71$var$singleton = new FixedOffsetZone(0);\n return $55286cce8d5d6f71$var$singleton;\n }\n }\n ]);\n return FixedOffsetZone;\n}($55286cce8d5d6f71$var$Zone);\n/**\n * A zone that failed to parse. You should never need to instantiate this.\n * @implements {Zone}\n */ var $55286cce8d5d6f71$var$InvalidZone = /*#__PURE__*/ function(_Zone) {\n $55286cce8d5d6f71$var$_inheritsLoose(InvalidZone, _Zone);\n function InvalidZone(zoneName) {\n var _this;\n _this = _Zone.call(this) || this;\n /** @private */ _this.zoneName = zoneName;\n return _this;\n }\n /** @override **/ var _proto = InvalidZone.prototype;\n /** @override **/ _proto.offsetName = function offsetName() {\n return null;\n } /** @override **/ ;\n _proto.formatOffset = function formatOffset() {\n return \"\";\n } /** @override **/ ;\n _proto.offset = function offset() {\n return NaN;\n } /** @override **/ ;\n _proto.equals = function equals() {\n return false;\n } /** @override **/ ;\n $55286cce8d5d6f71$var$_createClass(InvalidZone, [\n {\n key: \"type\",\n get: function get() {\n return \"invalid\";\n }\n },\n {\n key: \"name\",\n get: function get() {\n return this.zoneName;\n }\n },\n {\n key: \"isUniversal\",\n get: function get() {\n return false;\n }\n },\n {\n key: \"isValid\",\n get: function get() {\n return false;\n }\n }\n ]);\n return InvalidZone;\n}($55286cce8d5d6f71$var$Zone);\n/**\n * @private\n */ function $55286cce8d5d6f71$var$normalizeZone(input, defaultZone) {\n if ($55286cce8d5d6f71$var$isUndefined(input) || input === null) return defaultZone;\n else if (input instanceof $55286cce8d5d6f71$var$Zone) return input;\n else if ($55286cce8d5d6f71$var$isString(input)) {\n var lowered = input.toLowerCase();\n if (lowered === \"default\") return defaultZone;\n else if (lowered === \"local\" || lowered === \"system\") return $55286cce8d5d6f71$var$SystemZone.instance;\n else if (lowered === \"utc\" || lowered === \"gmt\") return $55286cce8d5d6f71$var$FixedOffsetZone.utcInstance;\n else return $55286cce8d5d6f71$var$FixedOffsetZone.parseSpecifier(lowered) || $55286cce8d5d6f71$var$IANAZone.create(input);\n } else if ($55286cce8d5d6f71$var$isNumber(input)) return $55286cce8d5d6f71$var$FixedOffsetZone.instance(input);\n else if (typeof input === \"object\" && \"offset\" in input && typeof input.offset === \"function\") // This is dumb, but the instanceof check above doesn't seem to really work\n // so we're duck checking it\n return input;\n else return new $55286cce8d5d6f71$var$InvalidZone(input);\n}\nvar $55286cce8d5d6f71$var$now = function now() {\n return Date.now();\n}, $55286cce8d5d6f71$var$defaultZone = \"system\", $55286cce8d5d6f71$var$defaultLocale = null, $55286cce8d5d6f71$var$defaultNumberingSystem = null, $55286cce8d5d6f71$var$defaultOutputCalendar = null, $55286cce8d5d6f71$var$twoDigitCutoffYear = 60, $55286cce8d5d6f71$var$throwOnInvalid, $55286cce8d5d6f71$var$defaultWeekSettings = null;\n/**\n * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here.\n */ var $55286cce8d5d6f71$var$Settings = /*#__PURE__*/ function() {\n function Settings() {}\n /**\n * Reset Luxon's global caches. Should only be necessary in testing scenarios.\n * @return {void}\n */ Settings.resetCaches = function resetCaches() {\n $55286cce8d5d6f71$var$Locale.resetCache();\n $55286cce8d5d6f71$var$IANAZone.resetCache();\n };\n $55286cce8d5d6f71$var$_createClass(Settings, null, [\n {\n key: \"now\",\n get: /**\n * Get the callback for returning the current timestamp.\n * @type {function}\n */ function get() {\n return $55286cce8d5d6f71$var$now;\n },\n set: function set(n) {\n $55286cce8d5d6f71$var$now = n;\n }\n },\n {\n key: \"defaultZone\",\n get: /**\n * Get the default time zone object currently used to create DateTimes. Does not affect existing instances.\n * The default value is the system's time zone (the one set on the machine that runs this code).\n * @type {Zone}\n */ function get() {\n return $55286cce8d5d6f71$var$normalizeZone($55286cce8d5d6f71$var$defaultZone, $55286cce8d5d6f71$var$SystemZone.instance);\n },\n set: function set(zone) {\n $55286cce8d5d6f71$var$defaultZone = zone;\n }\n },\n {\n key: \"defaultLocale\",\n get: function get() {\n return $55286cce8d5d6f71$var$defaultLocale;\n },\n set: function set(locale) {\n $55286cce8d5d6f71$var$defaultLocale = locale;\n }\n },\n {\n key: \"defaultNumberingSystem\",\n get: function get() {\n return $55286cce8d5d6f71$var$defaultNumberingSystem;\n },\n set: function set(numberingSystem) {\n $55286cce8d5d6f71$var$defaultNumberingSystem = numberingSystem;\n }\n },\n {\n key: \"defaultOutputCalendar\",\n get: function get() {\n return $55286cce8d5d6f71$var$defaultOutputCalendar;\n },\n set: function set(outputCalendar) {\n $55286cce8d5d6f71$var$defaultOutputCalendar = outputCalendar;\n }\n },\n {\n key: \"defaultWeekSettings\",\n get: function get() {\n return $55286cce8d5d6f71$var$defaultWeekSettings;\n },\n set: function set(weekSettings) {\n $55286cce8d5d6f71$var$defaultWeekSettings = $55286cce8d5d6f71$var$validateWeekSettings(weekSettings);\n }\n },\n {\n key: \"twoDigitCutoffYear\",\n get: function get() {\n return $55286cce8d5d6f71$var$twoDigitCutoffYear;\n },\n set: function set(cutoffYear) {\n $55286cce8d5d6f71$var$twoDigitCutoffYear = cutoffYear % 100;\n }\n },\n {\n key: \"throwOnInvalid\",\n get: function get() {\n return $55286cce8d5d6f71$var$throwOnInvalid;\n },\n set: function set(t) {\n $55286cce8d5d6f71$var$throwOnInvalid = t;\n }\n }\n ]);\n return Settings;\n}();\nvar $55286cce8d5d6f71$var$Invalid = /*#__PURE__*/ function() {\n function Invalid(reason, explanation) {\n this.reason = reason;\n this.explanation = explanation;\n }\n var _proto = Invalid.prototype;\n _proto.toMessage = function toMessage() {\n if (this.explanation) return this.reason + \": \" + this.explanation;\n else return this.reason;\n };\n return Invalid;\n}();\nvar $55286cce8d5d6f71$var$nonLeapLadder = [\n 0,\n 31,\n 59,\n 90,\n 120,\n 151,\n 181,\n 212,\n 243,\n 273,\n 304,\n 334\n], $55286cce8d5d6f71$var$leapLadder = [\n 0,\n 31,\n 60,\n 91,\n 121,\n 152,\n 182,\n 213,\n 244,\n 274,\n 305,\n 335\n];\nfunction $55286cce8d5d6f71$var$unitOutOfRange(unit, value) {\n return new $55286cce8d5d6f71$var$Invalid(\"unit out of range\", \"you specified \" + value + \" (of type \" + typeof value + \") as a \" + unit + \", which is invalid\");\n}\nfunction $55286cce8d5d6f71$var$dayOfWeek(year, month, day) {\n var d = new Date(Date.UTC(year, month - 1, day));\n if (year < 100 && year >= 0) d.setUTCFullYear(d.getUTCFullYear() - 1900);\n var js = d.getUTCDay();\n return js === 0 ? 7 : js;\n}\nfunction $55286cce8d5d6f71$var$computeOrdinal(year, month, day) {\n return day + ($55286cce8d5d6f71$var$isLeapYear(year) ? $55286cce8d5d6f71$var$leapLadder : $55286cce8d5d6f71$var$nonLeapLadder)[month - 1];\n}\nfunction $55286cce8d5d6f71$var$uncomputeOrdinal(year, ordinal) {\n var table = $55286cce8d5d6f71$var$isLeapYear(year) ? $55286cce8d5d6f71$var$leapLadder : $55286cce8d5d6f71$var$nonLeapLadder, month0 = table.findIndex(function(i) {\n return i < ordinal;\n }), day = ordinal - table[month0];\n return {\n month: month0 + 1,\n day: day\n };\n}\nfunction $55286cce8d5d6f71$var$isoWeekdayToLocal(isoWeekday, startOfWeek) {\n return (isoWeekday - startOfWeek + 7) % 7 + 1;\n}\n/**\n * @private\n */ function $55286cce8d5d6f71$var$gregorianToWeek(gregObj, minDaysInFirstWeek, startOfWeek) {\n if (minDaysInFirstWeek === void 0) minDaysInFirstWeek = 4;\n if (startOfWeek === void 0) startOfWeek = 1;\n var year = gregObj.year, month = gregObj.month, day = gregObj.day, ordinal = $55286cce8d5d6f71$var$computeOrdinal(year, month, day), weekday = $55286cce8d5d6f71$var$isoWeekdayToLocal($55286cce8d5d6f71$var$dayOfWeek(year, month, day), startOfWeek);\n var weekNumber = Math.floor((ordinal - weekday + 14 - minDaysInFirstWeek) / 7), weekYear;\n if (weekNumber < 1) {\n weekYear = year - 1;\n weekNumber = $55286cce8d5d6f71$var$weeksInWeekYear(weekYear, minDaysInFirstWeek, startOfWeek);\n } else if (weekNumber > $55286cce8d5d6f71$var$weeksInWeekYear(year, minDaysInFirstWeek, startOfWeek)) {\n weekYear = year + 1;\n weekNumber = 1;\n } else weekYear = year;\n return $55286cce8d5d6f71$var$_extends({\n weekYear: weekYear,\n weekNumber: weekNumber,\n weekday: weekday\n }, $55286cce8d5d6f71$var$timeObject(gregObj));\n}\nfunction $55286cce8d5d6f71$var$weekToGregorian(weekData, minDaysInFirstWeek, startOfWeek) {\n if (minDaysInFirstWeek === void 0) minDaysInFirstWeek = 4;\n if (startOfWeek === void 0) startOfWeek = 1;\n var weekYear = weekData.weekYear, weekNumber = weekData.weekNumber, weekday = weekData.weekday, weekdayOfJan4 = $55286cce8d5d6f71$var$isoWeekdayToLocal($55286cce8d5d6f71$var$dayOfWeek(weekYear, 1, minDaysInFirstWeek), startOfWeek), yearInDays = $55286cce8d5d6f71$var$daysInYear(weekYear);\n var ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 7 + minDaysInFirstWeek, year;\n if (ordinal < 1) {\n year = weekYear - 1;\n ordinal += $55286cce8d5d6f71$var$daysInYear(year);\n } else if (ordinal > yearInDays) {\n year = weekYear + 1;\n ordinal -= $55286cce8d5d6f71$var$daysInYear(weekYear);\n } else year = weekYear;\n var _uncomputeOrdinal = $55286cce8d5d6f71$var$uncomputeOrdinal(year, ordinal), month = _uncomputeOrdinal.month, day = _uncomputeOrdinal.day;\n return $55286cce8d5d6f71$var$_extends({\n year: year,\n month: month,\n day: day\n }, $55286cce8d5d6f71$var$timeObject(weekData));\n}\nfunction $55286cce8d5d6f71$var$gregorianToOrdinal(gregData) {\n var year = gregData.year, month = gregData.month, day = gregData.day;\n var ordinal = $55286cce8d5d6f71$var$computeOrdinal(year, month, day);\n return $55286cce8d5d6f71$var$_extends({\n year: year,\n ordinal: ordinal\n }, $55286cce8d5d6f71$var$timeObject(gregData));\n}\nfunction $55286cce8d5d6f71$var$ordinalToGregorian(ordinalData) {\n var year = ordinalData.year, ordinal = ordinalData.ordinal;\n var _uncomputeOrdinal2 = $55286cce8d5d6f71$var$uncomputeOrdinal(year, ordinal), month = _uncomputeOrdinal2.month, day = _uncomputeOrdinal2.day;\n return $55286cce8d5d6f71$var$_extends({\n year: year,\n month: month,\n day: day\n }, $55286cce8d5d6f71$var$timeObject(ordinalData));\n}\n/**\n * Check if local week units like localWeekday are used in obj.\n * If so, validates that they are not mixed with ISO week units and then copies them to the normal week unit properties.\n * Modifies obj in-place!\n * @param obj the object values\n */ function $55286cce8d5d6f71$var$usesLocalWeekValues(obj, loc) {\n var hasLocaleWeekData = !$55286cce8d5d6f71$var$isUndefined(obj.localWeekday) || !$55286cce8d5d6f71$var$isUndefined(obj.localWeekNumber) || !$55286cce8d5d6f71$var$isUndefined(obj.localWeekYear);\n if (hasLocaleWeekData) {\n var hasIsoWeekData = !$55286cce8d5d6f71$var$isUndefined(obj.weekday) || !$55286cce8d5d6f71$var$isUndefined(obj.weekNumber) || !$55286cce8d5d6f71$var$isUndefined(obj.weekYear);\n if (hasIsoWeekData) throw new $55286cce8d5d6f71$var$ConflictingSpecificationError(\"Cannot mix locale-based week fields with ISO-based week fields\");\n if (!$55286cce8d5d6f71$var$isUndefined(obj.localWeekday)) obj.weekday = obj.localWeekday;\n if (!$55286cce8d5d6f71$var$isUndefined(obj.localWeekNumber)) obj.weekNumber = obj.localWeekNumber;\n if (!$55286cce8d5d6f71$var$isUndefined(obj.localWeekYear)) obj.weekYear = obj.localWeekYear;\n delete obj.localWeekday;\n delete obj.localWeekNumber;\n delete obj.localWeekYear;\n return {\n minDaysInFirstWeek: loc.getMinDaysInFirstWeek(),\n startOfWeek: loc.getStartOfWeek()\n };\n } else return {\n minDaysInFirstWeek: 4,\n startOfWeek: 1\n };\n}\nfunction $55286cce8d5d6f71$var$hasInvalidWeekData(obj, minDaysInFirstWeek, startOfWeek) {\n if (minDaysInFirstWeek === void 0) minDaysInFirstWeek = 4;\n if (startOfWeek === void 0) startOfWeek = 1;\n var validYear = $55286cce8d5d6f71$var$isInteger(obj.weekYear), validWeek = $55286cce8d5d6f71$var$integerBetween(obj.weekNumber, 1, $55286cce8d5d6f71$var$weeksInWeekYear(obj.weekYear, minDaysInFirstWeek, startOfWeek)), validWeekday = $55286cce8d5d6f71$var$integerBetween(obj.weekday, 1, 7);\n if (!validYear) return $55286cce8d5d6f71$var$unitOutOfRange(\"weekYear\", obj.weekYear);\n else if (!validWeek) return $55286cce8d5d6f71$var$unitOutOfRange(\"week\", obj.weekNumber);\n else if (!validWeekday) return $55286cce8d5d6f71$var$unitOutOfRange(\"weekday\", obj.weekday);\n else return false;\n}\nfunction $55286cce8d5d6f71$var$hasInvalidOrdinalData(obj) {\n var validYear = $55286cce8d5d6f71$var$isInteger(obj.year), validOrdinal = $55286cce8d5d6f71$var$integerBetween(obj.ordinal, 1, $55286cce8d5d6f71$var$daysInYear(obj.year));\n if (!validYear) return $55286cce8d5d6f71$var$unitOutOfRange(\"year\", obj.year);\n else if (!validOrdinal) return $55286cce8d5d6f71$var$unitOutOfRange(\"ordinal\", obj.ordinal);\n else return false;\n}\nfunction $55286cce8d5d6f71$var$hasInvalidGregorianData(obj) {\n var validYear = $55286cce8d5d6f71$var$isInteger(obj.year), validMonth = $55286cce8d5d6f71$var$integerBetween(obj.month, 1, 12), validDay = $55286cce8d5d6f71$var$integerBetween(obj.day, 1, $55286cce8d5d6f71$var$daysInMonth(obj.year, obj.month));\n if (!validYear) return $55286cce8d5d6f71$var$unitOutOfRange(\"year\", obj.year);\n else if (!validMonth) return $55286cce8d5d6f71$var$unitOutOfRange(\"month\", obj.month);\n else if (!validDay) return $55286cce8d5d6f71$var$unitOutOfRange(\"day\", obj.day);\n else return false;\n}\nfunction $55286cce8d5d6f71$var$hasInvalidTimeData(obj) {\n var hour = obj.hour, minute = obj.minute, second = obj.second, millisecond = obj.millisecond;\n var validHour = $55286cce8d5d6f71$var$integerBetween(hour, 0, 23) || hour === 24 && minute === 0 && second === 0 && millisecond === 0, validMinute = $55286cce8d5d6f71$var$integerBetween(minute, 0, 59), validSecond = $55286cce8d5d6f71$var$integerBetween(second, 0, 59), validMillisecond = $55286cce8d5d6f71$var$integerBetween(millisecond, 0, 999);\n if (!validHour) return $55286cce8d5d6f71$var$unitOutOfRange(\"hour\", hour);\n else if (!validMinute) return $55286cce8d5d6f71$var$unitOutOfRange(\"minute\", minute);\n else if (!validSecond) return $55286cce8d5d6f71$var$unitOutOfRange(\"second\", second);\n else if (!validMillisecond) return $55286cce8d5d6f71$var$unitOutOfRange(\"millisecond\", millisecond);\n else return false;\n}\n/**\n * @private\n */ // TYPES\nfunction $55286cce8d5d6f71$var$isUndefined(o) {\n return typeof o === \"undefined\";\n}\nfunction $55286cce8d5d6f71$var$isNumber(o) {\n return typeof o === \"number\";\n}\nfunction $55286cce8d5d6f71$var$isInteger(o) {\n return typeof o === \"number\" && o % 1 === 0;\n}\nfunction $55286cce8d5d6f71$var$isString(o) {\n return typeof o === \"string\";\n}\nfunction $55286cce8d5d6f71$var$isDate(o) {\n return Object.prototype.toString.call(o) === \"[object Date]\";\n}\n// CAPABILITIES\nfunction $55286cce8d5d6f71$var$hasRelative() {\n try {\n return typeof Intl !== \"undefined\" && !!Intl.RelativeTimeFormat;\n } catch (e) {\n return false;\n }\n}\nfunction $55286cce8d5d6f71$var$hasLocaleWeekInfo() {\n try {\n return typeof Intl !== \"undefined\" && !!Intl.Locale && (\"weekInfo\" in Intl.Locale.prototype || \"getWeekInfo\" in Intl.Locale.prototype);\n } catch (e) {\n return false;\n }\n}\n// OBJECTS AND ARRAYS\nfunction $55286cce8d5d6f71$var$maybeArray(thing) {\n return Array.isArray(thing) ? thing : [\n thing\n ];\n}\nfunction $55286cce8d5d6f71$var$bestBy(arr, by, compare) {\n if (arr.length === 0) return undefined;\n return arr.reduce(function(best, next) {\n var pair = [\n by(next),\n next\n ];\n if (!best) return pair;\n else if (compare(best[0], pair[0]) === best[0]) return best;\n else return pair;\n }, null)[1];\n}\nfunction $55286cce8d5d6f71$var$pick(obj, keys) {\n return keys.reduce(function(a, k) {\n a[k] = obj[k];\n return a;\n }, {});\n}\nfunction $55286cce8d5d6f71$var$hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nfunction $55286cce8d5d6f71$var$validateWeekSettings(settings) {\n if (settings == null) return null;\n else if (typeof settings !== \"object\") throw new $55286cce8d5d6f71$var$InvalidArgumentError(\"Week settings must be an object\");\n else {\n if (!$55286cce8d5d6f71$var$integerBetween(settings.firstDay, 1, 7) || !$55286cce8d5d6f71$var$integerBetween(settings.minimalDays, 1, 7) || !Array.isArray(settings.weekend) || settings.weekend.some(function(v) {\n return !$55286cce8d5d6f71$var$integerBetween(v, 1, 7);\n })) throw new $55286cce8d5d6f71$var$InvalidArgumentError(\"Invalid week settings\");\n return {\n firstDay: settings.firstDay,\n minimalDays: settings.minimalDays,\n weekend: Array.from(settings.weekend)\n };\n }\n}\n// NUMBERS AND STRINGS\nfunction $55286cce8d5d6f71$var$integerBetween(thing, bottom, top) {\n return $55286cce8d5d6f71$var$isInteger(thing) && thing >= bottom && thing <= top;\n}\n// x % n but takes the sign of n instead of x\nfunction $55286cce8d5d6f71$var$floorMod(x, n) {\n return x - n * Math.floor(x / n);\n}\nfunction $55286cce8d5d6f71$var$padStart(input, n) {\n if (n === void 0) n = 2;\n var isNeg = input < 0;\n var padded;\n if (isNeg) padded = \"-\" + (\"\" + -input).padStart(n, \"0\");\n else padded = (\"\" + input).padStart(n, \"0\");\n return padded;\n}\nfunction $55286cce8d5d6f71$var$parseInteger(string) {\n if ($55286cce8d5d6f71$var$isUndefined(string) || string === null || string === \"\") return undefined;\n else return parseInt(string, 10);\n}\nfunction $55286cce8d5d6f71$var$parseFloating(string) {\n if ($55286cce8d5d6f71$var$isUndefined(string) || string === null || string === \"\") return undefined;\n else return parseFloat(string);\n}\nfunction $55286cce8d5d6f71$var$parseMillis(fraction) {\n // Return undefined (instead of 0) in these cases, where fraction is not set\n if ($55286cce8d5d6f71$var$isUndefined(fraction) || fraction === null || fraction === \"\") return undefined;\n else {\n var f = parseFloat(\"0.\" + fraction) * 1000;\n return Math.floor(f);\n }\n}\nfunction $55286cce8d5d6f71$var$roundTo(number, digits, towardZero) {\n if (towardZero === void 0) towardZero = false;\n var factor = Math.pow(10, digits), rounder = towardZero ? Math.trunc : Math.round;\n return rounder(number * factor) / factor;\n}\n// DATE BASICS\nfunction $55286cce8d5d6f71$var$isLeapYear(year) {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\nfunction $55286cce8d5d6f71$var$daysInYear(year) {\n return $55286cce8d5d6f71$var$isLeapYear(year) ? 366 : 365;\n}\nfunction $55286cce8d5d6f71$var$daysInMonth(year, month) {\n var modMonth = $55286cce8d5d6f71$var$floorMod(month - 1, 12) + 1, modYear = year + (month - modMonth) / 12;\n if (modMonth === 2) return $55286cce8d5d6f71$var$isLeapYear(modYear) ? 29 : 28;\n else return [\n 31,\n null,\n 31,\n 30,\n 31,\n 30,\n 31,\n 31,\n 30,\n 31,\n 30,\n 31\n ][modMonth - 1];\n}\n// convert a calendar object to a local timestamp (epoch, but with the offset baked in)\nfunction $55286cce8d5d6f71$var$objToLocalTS(obj) {\n var d = Date.UTC(obj.year, obj.month - 1, obj.day, obj.hour, obj.minute, obj.second, obj.millisecond);\n // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that\n if (obj.year < 100 && obj.year >= 0) {\n d = new Date(d);\n // set the month and day again, this is necessary because year 2000 is a leap year, but year 100 is not\n // so if obj.year is in 99, but obj.day makes it roll over into year 100,\n // the calculations done by Date.UTC are using year 2000 - which is incorrect\n d.setUTCFullYear(obj.year, obj.month - 1, obj.day);\n }\n return +d;\n}\n// adapted from moment.js: https://github.com/moment/moment/blob/000ac1800e620f770f4eb31b5ae908f6167b0ab2/src/lib/units/week-calendar-utils.js\nfunction $55286cce8d5d6f71$var$firstWeekOffset(year, minDaysInFirstWeek, startOfWeek) {\n var fwdlw = $55286cce8d5d6f71$var$isoWeekdayToLocal($55286cce8d5d6f71$var$dayOfWeek(year, 1, minDaysInFirstWeek), startOfWeek);\n return -fwdlw + minDaysInFirstWeek - 1;\n}\nfunction $55286cce8d5d6f71$var$weeksInWeekYear(weekYear, minDaysInFirstWeek, startOfWeek) {\n if (minDaysInFirstWeek === void 0) minDaysInFirstWeek = 4;\n if (startOfWeek === void 0) startOfWeek = 1;\n var weekOffset = $55286cce8d5d6f71$var$firstWeekOffset(weekYear, minDaysInFirstWeek, startOfWeek);\n var weekOffsetNext = $55286cce8d5d6f71$var$firstWeekOffset(weekYear + 1, minDaysInFirstWeek, startOfWeek);\n return ($55286cce8d5d6f71$var$daysInYear(weekYear) - weekOffset + weekOffsetNext) / 7;\n}\nfunction $55286cce8d5d6f71$var$untruncateYear(year) {\n if (year > 99) return year;\n else return year > $55286cce8d5d6f71$var$Settings.twoDigitCutoffYear ? 1900 + year : 2000 + year;\n}\n// PARSING\nfunction $55286cce8d5d6f71$var$parseZoneInfo(ts, offsetFormat, locale, timeZone) {\n if (timeZone === void 0) timeZone = null;\n var date = new Date(ts), intlOpts = {\n hourCycle: \"h23\",\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\"\n };\n if (timeZone) intlOpts.timeZone = timeZone;\n var modified = $55286cce8d5d6f71$var$_extends({\n timeZoneName: offsetFormat\n }, intlOpts);\n var parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find(function(m) {\n return m.type.toLowerCase() === \"timezonename\";\n });\n return parsed ? parsed.value : null;\n}\n// signedOffset('-5', '30') -> -330\nfunction $55286cce8d5d6f71$var$signedOffset(offHourStr, offMinuteStr) {\n var offHour = parseInt(offHourStr, 10);\n // don't || this because we want to preserve -0\n if (Number.isNaN(offHour)) offHour = 0;\n var offMin = parseInt(offMinuteStr, 10) || 0, offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;\n return offHour * 60 + offMinSigned;\n}\n// COERCION\nfunction $55286cce8d5d6f71$var$asNumber(value) {\n var numericValue = Number(value);\n if (typeof value === \"boolean\" || value === \"\" || Number.isNaN(numericValue)) throw new $55286cce8d5d6f71$var$InvalidArgumentError(\"Invalid unit value \" + value);\n return numericValue;\n}\nfunction $55286cce8d5d6f71$var$normalizeObject(obj, normalizer) {\n var normalized = {};\n for(var u in obj)if ($55286cce8d5d6f71$var$hasOwnProperty(obj, u)) {\n var v = obj[u];\n if (v === undefined || v === null) continue;\n normalized[normalizer(u)] = $55286cce8d5d6f71$var$asNumber(v);\n }\n return normalized;\n}\nfunction $55286cce8d5d6f71$var$formatOffset(offset, format) {\n var hours = Math.trunc(Math.abs(offset / 60)), minutes = Math.trunc(Math.abs(offset % 60)), sign = offset >= 0 ? \"+\" : \"-\";\n switch(format){\n case \"short\":\n return \"\" + sign + $55286cce8d5d6f71$var$padStart(hours, 2) + \":\" + $55286cce8d5d6f71$var$padStart(minutes, 2);\n case \"narrow\":\n return \"\" + sign + hours + (minutes > 0 ? \":\" + minutes : \"\");\n case \"techie\":\n return \"\" + sign + $55286cce8d5d6f71$var$padStart(hours, 2) + $55286cce8d5d6f71$var$padStart(minutes, 2);\n default:\n throw new RangeError(\"Value format \" + format + \" is out of range for property format\");\n }\n}\nfunction $55286cce8d5d6f71$var$timeObject(obj) {\n return $55286cce8d5d6f71$var$pick(obj, [\n \"hour\",\n \"minute\",\n \"second\",\n \"millisecond\"\n ]);\n}\n/**\n * @private\n */ var $55286cce8d5d6f71$var$monthsLong = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n];\nvar $55286cce8d5d6f71$var$monthsShort = [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\"\n];\nvar $55286cce8d5d6f71$var$monthsNarrow = [\n \"J\",\n \"F\",\n \"M\",\n \"A\",\n \"M\",\n \"J\",\n \"J\",\n \"A\",\n \"S\",\n \"O\",\n \"N\",\n \"D\"\n];\nfunction $55286cce8d5d6f71$var$months(length) {\n switch(length){\n case \"narrow\":\n return [].concat($55286cce8d5d6f71$var$monthsNarrow);\n case \"short\":\n return [].concat($55286cce8d5d6f71$var$monthsShort);\n case \"long\":\n return [].concat($55286cce8d5d6f71$var$monthsLong);\n case \"numeric\":\n return [\n \"1\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"7\",\n \"8\",\n \"9\",\n \"10\",\n \"11\",\n \"12\"\n ];\n case \"2-digit\":\n return [\n \"01\",\n \"02\",\n \"03\",\n \"04\",\n \"05\",\n \"06\",\n \"07\",\n \"08\",\n \"09\",\n \"10\",\n \"11\",\n \"12\"\n ];\n default:\n return null;\n }\n}\nvar $55286cce8d5d6f71$var$weekdaysLong = [\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n \"Sunday\"\n];\nvar $55286cce8d5d6f71$var$weekdaysShort = [\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\",\n \"Sat\",\n \"Sun\"\n];\nvar $55286cce8d5d6f71$var$weekdaysNarrow = [\n \"M\",\n \"T\",\n \"W\",\n \"T\",\n \"F\",\n \"S\",\n \"S\"\n];\nfunction $55286cce8d5d6f71$var$weekdays(length) {\n switch(length){\n case \"narrow\":\n return [].concat($55286cce8d5d6f71$var$weekdaysNarrow);\n case \"short\":\n return [].concat($55286cce8d5d6f71$var$weekdaysShort);\n case \"long\":\n return [].concat($55286cce8d5d6f71$var$weekdaysLong);\n case \"numeric\":\n return [\n \"1\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"7\"\n ];\n default:\n return null;\n }\n}\nvar $55286cce8d5d6f71$var$meridiems = [\n \"AM\",\n \"PM\"\n];\nvar $55286cce8d5d6f71$var$erasLong = [\n \"Before Christ\",\n \"Anno Domini\"\n];\nvar $55286cce8d5d6f71$var$erasShort = [\n \"BC\",\n \"AD\"\n];\nvar $55286cce8d5d6f71$var$erasNarrow = [\n \"B\",\n \"A\"\n];\nfunction $55286cce8d5d6f71$var$eras(length) {\n switch(length){\n case \"narrow\":\n return [].concat($55286cce8d5d6f71$var$erasNarrow);\n case \"short\":\n return [].concat($55286cce8d5d6f71$var$erasShort);\n case \"long\":\n return [].concat($55286cce8d5d6f71$var$erasLong);\n default:\n return null;\n }\n}\nfunction $55286cce8d5d6f71$var$meridiemForDateTime(dt) {\n return $55286cce8d5d6f71$var$meridiems[dt.hour < 12 ? 0 : 1];\n}\nfunction $55286cce8d5d6f71$var$weekdayForDateTime(dt, length) {\n return $55286cce8d5d6f71$var$weekdays(length)[dt.weekday - 1];\n}\nfunction $55286cce8d5d6f71$var$monthForDateTime(dt, length) {\n return $55286cce8d5d6f71$var$months(length)[dt.month - 1];\n}\nfunction $55286cce8d5d6f71$var$eraForDateTime(dt, length) {\n return $55286cce8d5d6f71$var$eras(length)[dt.year < 0 ? 0 : 1];\n}\nfunction $55286cce8d5d6f71$var$formatRelativeTime(unit, count, numeric, narrow) {\n if (numeric === void 0) numeric = \"always\";\n if (narrow === void 0) narrow = false;\n var units = {\n years: [\n \"year\",\n \"yr.\"\n ],\n quarters: [\n \"quarter\",\n \"qtr.\"\n ],\n months: [\n \"month\",\n \"mo.\"\n ],\n weeks: [\n \"week\",\n \"wk.\"\n ],\n days: [\n \"day\",\n \"day\",\n \"days\"\n ],\n hours: [\n \"hour\",\n \"hr.\"\n ],\n minutes: [\n \"minute\",\n \"min.\"\n ],\n seconds: [\n \"second\",\n \"sec.\"\n ]\n };\n var lastable = [\n \"hours\",\n \"minutes\",\n \"seconds\"\n ].indexOf(unit) === -1;\n if (numeric === \"auto\" && lastable) {\n var isDay = unit === \"days\";\n switch(count){\n case 1:\n return isDay ? \"tomorrow\" : \"next \" + units[unit][0];\n case -1:\n return isDay ? \"yesterday\" : \"last \" + units[unit][0];\n case 0:\n return isDay ? \"today\" : \"this \" + units[unit][0];\n }\n }\n var isInPast = Object.is(count, -0) || count < 0, fmtValue = Math.abs(count), singular = fmtValue === 1, lilUnits = units[unit], fmtUnit = narrow ? singular ? lilUnits[1] : lilUnits[2] || lilUnits[1] : singular ? units[unit][0] : unit;\n return isInPast ? fmtValue + \" \" + fmtUnit + \" ago\" : \"in \" + fmtValue + \" \" + fmtUnit;\n}\nfunction $55286cce8d5d6f71$var$stringifyTokens(splits, tokenToString) {\n var s = \"\";\n for(var _iterator = $55286cce8d5d6f71$var$_createForOfIteratorHelperLoose(splits), _step; !(_step = _iterator()).done;){\n var token = _step.value;\n if (token.literal) s += token.val;\n else s += tokenToString(token.val);\n }\n return s;\n}\nvar $55286cce8d5d6f71$var$_macroTokenToFormatOpts = {\n D: $55286cce8d5d6f71$var$DATE_SHORT,\n DD: $55286cce8d5d6f71$var$DATE_MED,\n DDD: $55286cce8d5d6f71$var$DATE_FULL,\n DDDD: $55286cce8d5d6f71$var$DATE_HUGE,\n t: $55286cce8d5d6f71$var$TIME_SIMPLE,\n tt: $55286cce8d5d6f71$var$TIME_WITH_SECONDS,\n ttt: $55286cce8d5d6f71$var$TIME_WITH_SHORT_OFFSET,\n tttt: $55286cce8d5d6f71$var$TIME_WITH_LONG_OFFSET,\n T: $55286cce8d5d6f71$var$TIME_24_SIMPLE,\n TT: $55286cce8d5d6f71$var$TIME_24_WITH_SECONDS,\n TTT: $55286cce8d5d6f71$var$TIME_24_WITH_SHORT_OFFSET,\n TTTT: $55286cce8d5d6f71$var$TIME_24_WITH_LONG_OFFSET,\n f: $55286cce8d5d6f71$var$DATETIME_SHORT,\n ff: $55286cce8d5d6f71$var$DATETIME_MED,\n fff: $55286cce8d5d6f71$var$DATETIME_FULL,\n ffff: $55286cce8d5d6f71$var$DATETIME_HUGE,\n F: $55286cce8d5d6f71$var$DATETIME_SHORT_WITH_SECONDS,\n FF: $55286cce8d5d6f71$var$DATETIME_MED_WITH_SECONDS,\n FFF: $55286cce8d5d6f71$var$DATETIME_FULL_WITH_SECONDS,\n FFFF: $55286cce8d5d6f71$var$DATETIME_HUGE_WITH_SECONDS\n};\n/**\n * @private\n */ var $55286cce8d5d6f71$var$Formatter = /*#__PURE__*/ function() {\n Formatter.create = function create(locale, opts) {\n if (opts === void 0) opts = {};\n return new Formatter(locale, opts);\n };\n Formatter.parseFormat = function parseFormat(fmt) {\n // white-space is always considered a literal in user-provided formats\n // the \" \" token has a special meaning (see unitForToken)\n var current = null, currentFull = \"\", bracketed = false;\n var splits = [];\n for(var i = 0; i < fmt.length; i++){\n var c = fmt.charAt(i);\n if (c === \"'\") {\n if (currentFull.length > 0) splits.push({\n literal: bracketed || /^\\s+$/.test(currentFull),\n val: currentFull\n });\n current = null;\n currentFull = \"\";\n bracketed = !bracketed;\n } else if (bracketed) currentFull += c;\n else if (c === current) currentFull += c;\n else {\n if (currentFull.length > 0) splits.push({\n literal: /^\\s+$/.test(currentFull),\n val: currentFull\n });\n currentFull = c;\n current = c;\n }\n }\n if (currentFull.length > 0) splits.push({\n literal: bracketed || /^\\s+$/.test(currentFull),\n val: currentFull\n });\n return splits;\n };\n Formatter.macroTokenToFormatOpts = function macroTokenToFormatOpts(token) {\n return $55286cce8d5d6f71$var$_macroTokenToFormatOpts[token];\n };\n function Formatter(locale, formatOpts) {\n this.opts = formatOpts;\n this.loc = locale;\n this.systemLoc = null;\n }\n var _proto = Formatter.prototype;\n _proto.formatWithSystemDefault = function formatWithSystemDefault(dt, opts) {\n if (this.systemLoc === null) this.systemLoc = this.loc.redefaultToSystem();\n var df = this.systemLoc.dtFormatter(dt, $55286cce8d5d6f71$var$_extends({}, this.opts, opts));\n return df.format();\n };\n _proto.dtFormatter = function dtFormatter(dt, opts) {\n if (opts === void 0) opts = {};\n return this.loc.dtFormatter(dt, $55286cce8d5d6f71$var$_extends({}, this.opts, opts));\n };\n _proto.formatDateTime = function formatDateTime(dt, opts) {\n return this.dtFormatter(dt, opts).format();\n };\n _proto.formatDateTimeParts = function formatDateTimeParts(dt, opts) {\n return this.dtFormatter(dt, opts).formatToParts();\n };\n _proto.formatInterval = function formatInterval(interval, opts) {\n var df = this.dtFormatter(interval.start, opts);\n return df.dtf.formatRange(interval.start.toJSDate(), interval.end.toJSDate());\n };\n _proto.resolvedOptions = function resolvedOptions(dt, opts) {\n return this.dtFormatter(dt, opts).resolvedOptions();\n };\n _proto.num = function num(n, p) {\n if (p === void 0) p = 0;\n // we get some perf out of doing this here, annoyingly\n if (this.opts.forceSimple) return $55286cce8d5d6f71$var$padStart(n, p);\n var opts = $55286cce8d5d6f71$var$_extends({}, this.opts);\n if (p > 0) opts.padTo = p;\n return this.loc.numberFormatter(opts).format(n);\n };\n _proto.formatDateTimeFromString = function formatDateTimeFromString(dt, fmt) {\n var _this = this;\n var knownEnglish = this.loc.listingMode() === \"en\", useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== \"gregory\", string = function string(opts, extract) {\n return _this.loc.extract(dt, opts, extract);\n }, formatOffset = function formatOffset(opts) {\n if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) return \"Z\";\n return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : \"\";\n }, meridiem = function meridiem() {\n return knownEnglish ? $55286cce8d5d6f71$var$meridiemForDateTime(dt) : string({\n hour: \"numeric\",\n hourCycle: \"h12\"\n }, \"dayperiod\");\n }, month = function month(length, standalone) {\n return knownEnglish ? $55286cce8d5d6f71$var$monthForDateTime(dt, length) : string(standalone ? {\n month: length\n } : {\n month: length,\n day: \"numeric\"\n }, \"month\");\n }, weekday = function weekday(length, standalone) {\n return knownEnglish ? $55286cce8d5d6f71$var$weekdayForDateTime(dt, length) : string(standalone ? {\n weekday: length\n } : {\n weekday: length,\n month: \"long\",\n day: \"numeric\"\n }, \"weekday\");\n }, maybeMacro = function maybeMacro(token) {\n var formatOpts = Formatter.macroTokenToFormatOpts(token);\n if (formatOpts) return _this.formatWithSystemDefault(dt, formatOpts);\n else return token;\n }, era = function era(length) {\n return knownEnglish ? $55286cce8d5d6f71$var$eraForDateTime(dt, length) : string({\n era: length\n }, \"era\");\n }, tokenToString = function tokenToString(token) {\n // Where possible: https://cldr.unicode.org/translation/date-time/date-time-symbols\n switch(token){\n // ms\n case \"S\":\n return _this.num(dt.millisecond);\n case \"u\":\n // falls through\n case \"SSS\":\n return _this.num(dt.millisecond, 3);\n // seconds\n case \"s\":\n return _this.num(dt.second);\n case \"ss\":\n return _this.num(dt.second, 2);\n // fractional seconds\n case \"uu\":\n return _this.num(Math.floor(dt.millisecond / 10), 2);\n case \"uuu\":\n return _this.num(Math.floor(dt.millisecond / 100));\n // minutes\n case \"m\":\n return _this.num(dt.minute);\n case \"mm\":\n return _this.num(dt.minute, 2);\n // hours\n case \"h\":\n return _this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);\n case \"hh\":\n return _this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);\n case \"H\":\n return _this.num(dt.hour);\n case \"HH\":\n return _this.num(dt.hour, 2);\n // offset\n case \"Z\":\n // like +6\n return formatOffset({\n format: \"narrow\",\n allowZ: _this.opts.allowZ\n });\n case \"ZZ\":\n // like +06:00\n return formatOffset({\n format: \"short\",\n allowZ: _this.opts.allowZ\n });\n case \"ZZZ\":\n // like +0600\n return formatOffset({\n format: \"techie\",\n allowZ: _this.opts.allowZ\n });\n case \"ZZZZ\":\n // like EST\n return dt.zone.offsetName(dt.ts, {\n format: \"short\",\n locale: _this.loc.locale\n });\n case \"ZZZZZ\":\n // like Eastern Standard Time\n return dt.zone.offsetName(dt.ts, {\n format: \"long\",\n locale: _this.loc.locale\n });\n // zone\n case \"z\":\n // like America/New_York\n return dt.zoneName;\n // meridiems\n case \"a\":\n return meridiem();\n // dates\n case \"d\":\n return useDateTimeFormatter ? string({\n day: \"numeric\"\n }, \"day\") : _this.num(dt.day);\n case \"dd\":\n return useDateTimeFormatter ? string({\n day: \"2-digit\"\n }, \"day\") : _this.num(dt.day, 2);\n // weekdays - standalone\n case \"c\":\n // like 1\n return _this.num(dt.weekday);\n case \"ccc\":\n // like 'Tues'\n return weekday(\"short\", true);\n case \"cccc\":\n // like 'Tuesday'\n return weekday(\"long\", true);\n case \"ccccc\":\n // like 'T'\n return weekday(\"narrow\", true);\n // weekdays - format\n case \"E\":\n // like 1\n return _this.num(dt.weekday);\n case \"EEE\":\n // like 'Tues'\n return weekday(\"short\", false);\n case \"EEEE\":\n // like 'Tuesday'\n return weekday(\"long\", false);\n case \"EEEEE\":\n // like 'T'\n return weekday(\"narrow\", false);\n // months - standalone\n case \"L\":\n // like 1\n return useDateTimeFormatter ? string({\n month: \"numeric\",\n day: \"numeric\"\n }, \"month\") : _this.num(dt.month);\n case \"LL\":\n // like 01, doesn't seem to work\n return useDateTimeFormatter ? string({\n month: \"2-digit\",\n day: \"numeric\"\n }, \"month\") : _this.num(dt.month, 2);\n case \"LLL\":\n // like Jan\n return month(\"short\", true);\n case \"LLLL\":\n // like January\n return month(\"long\", true);\n case \"LLLLL\":\n // like J\n return month(\"narrow\", true);\n // months - format\n case \"M\":\n // like 1\n return useDateTimeFormatter ? string({\n month: \"numeric\"\n }, \"month\") : _this.num(dt.month);\n case \"MM\":\n // like 01\n return useDateTimeFormatter ? string({\n month: \"2-digit\"\n }, \"month\") : _this.num(dt.month, 2);\n case \"MMM\":\n // like Jan\n return month(\"short\", false);\n case \"MMMM\":\n // like January\n return month(\"long\", false);\n case \"MMMMM\":\n // like J\n return month(\"narrow\", false);\n // years\n case \"y\":\n // like 2014\n return useDateTimeFormatter ? string({\n year: \"numeric\"\n }, \"year\") : _this.num(dt.year);\n case \"yy\":\n // like 14\n return useDateTimeFormatter ? string({\n year: \"2-digit\"\n }, \"year\") : _this.num(dt.year.toString().slice(-2), 2);\n case \"yyyy\":\n // like 0012\n return useDateTimeFormatter ? string({\n year: \"numeric\"\n }, \"year\") : _this.num(dt.year, 4);\n case \"yyyyyy\":\n // like 000012\n return useDateTimeFormatter ? string({\n year: \"numeric\"\n }, \"year\") : _this.num(dt.year, 6);\n // eras\n case \"G\":\n // like AD\n return era(\"short\");\n case \"GG\":\n // like Anno Domini\n return era(\"long\");\n case \"GGGGG\":\n return era(\"narrow\");\n case \"kk\":\n return _this.num(dt.weekYear.toString().slice(-2), 2);\n case \"kkkk\":\n return _this.num(dt.weekYear, 4);\n case \"W\":\n return _this.num(dt.weekNumber);\n case \"WW\":\n return _this.num(dt.weekNumber, 2);\n case \"n\":\n return _this.num(dt.localWeekNumber);\n case \"nn\":\n return _this.num(dt.localWeekNumber, 2);\n case \"ii\":\n return _this.num(dt.localWeekYear.toString().slice(-2), 2);\n case \"iiii\":\n return _this.num(dt.localWeekYear, 4);\n case \"o\":\n return _this.num(dt.ordinal);\n case \"ooo\":\n return _this.num(dt.ordinal, 3);\n case \"q\":\n // like 1\n return _this.num(dt.quarter);\n case \"qq\":\n // like 01\n return _this.num(dt.quarter, 2);\n case \"X\":\n return _this.num(Math.floor(dt.ts / 1000));\n case \"x\":\n return _this.num(dt.ts);\n default:\n return maybeMacro(token);\n }\n };\n return $55286cce8d5d6f71$var$stringifyTokens(Formatter.parseFormat(fmt), tokenToString);\n };\n _proto.formatDurationFromString = function formatDurationFromString(dur, fmt) {\n var _this2 = this;\n var tokenToField = function tokenToField(token) {\n switch(token[0]){\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"w\":\n return \"week\";\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n default:\n return null;\n }\n }, tokenToString = function tokenToString(lildur) {\n return function(token) {\n var mapped = tokenToField(token);\n if (mapped) return _this2.num(lildur.get(mapped), token.length);\n else return token;\n };\n }, tokens = Formatter.parseFormat(fmt), realTokens = tokens.reduce(function(found, _ref) {\n var literal = _ref.literal, val = _ref.val;\n return literal ? found : found.concat(val);\n }, []), collapsed = dur.shiftTo.apply(dur, realTokens.map(tokenToField).filter(function(t) {\n return t;\n }));\n return $55286cce8d5d6f71$var$stringifyTokens(tokens, tokenToString(collapsed));\n };\n return Formatter;\n}();\n/*\n * This file handles parsing for well-specified formats. Here's how it works:\n * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match.\n * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object\n * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence.\n * Extractors can take a \"cursor\" representing the offset in the match to look at. This makes it easy to combine extractors.\n * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions.\n * Some extractions are super dumb and simpleParse and fromStrings help DRY them.\n */ var $55286cce8d5d6f71$var$ianaRegex = /[A-Za-z_+-]{1,256}(?::?\\/[A-Za-z0-9_+-]{1,256}(?:\\/[A-Za-z0-9_+-]{1,256})?)?/;\nfunction $55286cce8d5d6f71$var$combineRegexes() {\n for(var _len = arguments.length, regexes = new Array(_len), _key = 0; _key < _len; _key++)regexes[_key] = arguments[_key];\n var full = regexes.reduce(function(f, r) {\n return f + r.source;\n }, \"\");\n return RegExp(\"^\" + full + \"$\");\n}\nfunction $55286cce8d5d6f71$var$combineExtractors() {\n for(var _len2 = arguments.length, extractors = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++)extractors[_key2] = arguments[_key2];\n return function(m) {\n return extractors.reduce(function(_ref, ex) {\n var mergedVals = _ref[0], mergedZone = _ref[1], cursor = _ref[2];\n var _ex = ex(m, cursor), val = _ex[0], zone = _ex[1], next = _ex[2];\n return [\n $55286cce8d5d6f71$var$_extends({}, mergedVals, val),\n zone || mergedZone,\n next\n ];\n }, [\n {},\n null,\n 1\n ]).slice(0, 2);\n };\n}\nfunction $55286cce8d5d6f71$var$parse(s) {\n if (s == null) return [\n null,\n null\n ];\n for(var _len3 = arguments.length, patterns = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++)patterns[_key3 - 1] = arguments[_key3];\n for(var _i = 0, _patterns = patterns; _i < _patterns.length; _i++){\n var _patterns$_i = _patterns[_i], regex = _patterns$_i[0], extractor = _patterns$_i[1];\n var m = regex.exec(s);\n if (m) return extractor(m);\n }\n return [\n null,\n null\n ];\n}\nfunction $55286cce8d5d6f71$var$simpleParse() {\n for(var _len4 = arguments.length, keys = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++)keys[_key4] = arguments[_key4];\n return function(match, cursor) {\n var ret = {};\n var i;\n for(i = 0; i < keys.length; i++)ret[keys[i]] = $55286cce8d5d6f71$var$parseInteger(match[cursor + i]);\n return [\n ret,\n null,\n cursor + i\n ];\n };\n}\n// ISO and SQL parsing\nvar $55286cce8d5d6f71$var$offsetRegex = /(?:(Z)|([+-]\\d\\d)(?::?(\\d\\d))?)/;\nvar $55286cce8d5d6f71$var$isoExtendedZone = \"(?:\" + $55286cce8d5d6f71$var$offsetRegex.source + \"?(?:\\\\[(\" + $55286cce8d5d6f71$var$ianaRegex.source + \")\\\\])?)?\";\nvar $55286cce8d5d6f71$var$isoTimeBaseRegex = /(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d{1,30}))?)?)?/;\nvar $55286cce8d5d6f71$var$isoTimeRegex = RegExp(\"\" + $55286cce8d5d6f71$var$isoTimeBaseRegex.source + $55286cce8d5d6f71$var$isoExtendedZone);\nvar $55286cce8d5d6f71$var$isoTimeExtensionRegex = RegExp(\"(?:T\" + $55286cce8d5d6f71$var$isoTimeRegex.source + \")?\");\nvar $55286cce8d5d6f71$var$isoYmdRegex = /([+-]\\d{6}|\\d{4})(?:-?(\\d\\d)(?:-?(\\d\\d))?)?/;\nvar $55286cce8d5d6f71$var$isoWeekRegex = /(\\d{4})-?W(\\d\\d)(?:-?(\\d))?/;\nvar $55286cce8d5d6f71$var$isoOrdinalRegex = /(\\d{4})-?(\\d{3})/;\nvar $55286cce8d5d6f71$var$extractISOWeekData = $55286cce8d5d6f71$var$simpleParse(\"weekYear\", \"weekNumber\", \"weekDay\");\nvar $55286cce8d5d6f71$var$extractISOOrdinalData = $55286cce8d5d6f71$var$simpleParse(\"year\", \"ordinal\");\nvar $55286cce8d5d6f71$var$sqlYmdRegex = /(\\d{4})-(\\d\\d)-(\\d\\d)/; // dumbed-down version of the ISO one\nvar $55286cce8d5d6f71$var$sqlTimeRegex = RegExp($55286cce8d5d6f71$var$isoTimeBaseRegex.source + \" ?(?:\" + $55286cce8d5d6f71$var$offsetRegex.source + \"|(\" + $55286cce8d5d6f71$var$ianaRegex.source + \"))?\");\nvar $55286cce8d5d6f71$var$sqlTimeExtensionRegex = RegExp(\"(?: \" + $55286cce8d5d6f71$var$sqlTimeRegex.source + \")?\");\nfunction $55286cce8d5d6f71$var$int(match, pos, fallback) {\n var m = match[pos];\n return $55286cce8d5d6f71$var$isUndefined(m) ? fallback : $55286cce8d5d6f71$var$parseInteger(m);\n}\nfunction $55286cce8d5d6f71$var$extractISOYmd(match, cursor) {\n var item = {\n year: $55286cce8d5d6f71$var$int(match, cursor),\n month: $55286cce8d5d6f71$var$int(match, cursor + 1, 1),\n day: $55286cce8d5d6f71$var$int(match, cursor + 2, 1)\n };\n return [\n item,\n null,\n cursor + 3\n ];\n}\nfunction $55286cce8d5d6f71$var$extractISOTime(match, cursor) {\n var item = {\n hours: $55286cce8d5d6f71$var$int(match, cursor, 0),\n minutes: $55286cce8d5d6f71$var$int(match, cursor + 1, 0),\n seconds: $55286cce8d5d6f71$var$int(match, cursor + 2, 0),\n milliseconds: $55286cce8d5d6f71$var$parseMillis(match[cursor + 3])\n };\n return [\n item,\n null,\n cursor + 4\n ];\n}\nfunction $55286cce8d5d6f71$var$extractISOOffset(match, cursor) {\n var local = !match[cursor] && !match[cursor + 1], fullOffset = $55286cce8d5d6f71$var$signedOffset(match[cursor + 1], match[cursor + 2]), zone = local ? null : $55286cce8d5d6f71$var$FixedOffsetZone.instance(fullOffset);\n return [\n {},\n zone,\n cursor + 3\n ];\n}\nfunction $55286cce8d5d6f71$var$extractIANAZone(match, cursor) {\n var zone = match[cursor] ? $55286cce8d5d6f71$var$IANAZone.create(match[cursor]) : null;\n return [\n {},\n zone,\n cursor + 1\n ];\n}\n// ISO time parsing\nvar $55286cce8d5d6f71$var$isoTimeOnly = RegExp(\"^T?\" + $55286cce8d5d6f71$var$isoTimeBaseRegex.source + \"$\");\n// ISO duration parsing\nvar $55286cce8d5d6f71$var$isoDuration = /^-?P(?:(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)Y)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)W)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)D)?(?:T(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)H)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20})(?:[.,](-?\\d{1,20}))?S)?)?)$/;\nfunction $55286cce8d5d6f71$var$extractISODuration(match) {\n var s = match[0], yearStr = match[1], monthStr = match[2], weekStr = match[3], dayStr = match[4], hourStr = match[5], minuteStr = match[6], secondStr = match[7], millisecondsStr = match[8];\n var hasNegativePrefix = s[0] === \"-\";\n var negativeSeconds = secondStr && secondStr[0] === \"-\";\n var maybeNegate = function maybeNegate(num, force) {\n if (force === void 0) force = false;\n return num !== undefined && (force || num && hasNegativePrefix) ? -num : num;\n };\n return [\n {\n years: maybeNegate($55286cce8d5d6f71$var$parseFloating(yearStr)),\n months: maybeNegate($55286cce8d5d6f71$var$parseFloating(monthStr)),\n weeks: maybeNegate($55286cce8d5d6f71$var$parseFloating(weekStr)),\n days: maybeNegate($55286cce8d5d6f71$var$parseFloating(dayStr)),\n hours: maybeNegate($55286cce8d5d6f71$var$parseFloating(hourStr)),\n minutes: maybeNegate($55286cce8d5d6f71$var$parseFloating(minuteStr)),\n seconds: maybeNegate($55286cce8d5d6f71$var$parseFloating(secondStr), secondStr === \"-0\"),\n milliseconds: maybeNegate($55286cce8d5d6f71$var$parseMillis(millisecondsStr), negativeSeconds)\n }\n ];\n}\n// These are a little braindead. EDT *should* tell us that we're in, say, America/New_York\n// and not just that we're in -240 *right now*. But since I don't think these are used that often\n// I'm just going to ignore that\nvar $55286cce8d5d6f71$var$obsOffsets = {\n GMT: 0,\n EDT: -240,\n EST: -300,\n CDT: -300,\n CST: -360,\n MDT: -360,\n MST: -420,\n PDT: -420,\n PST: -480\n};\nfunction $55286cce8d5d6f71$var$fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n var result = {\n year: yearStr.length === 2 ? $55286cce8d5d6f71$var$untruncateYear($55286cce8d5d6f71$var$parseInteger(yearStr)) : $55286cce8d5d6f71$var$parseInteger(yearStr),\n month: $55286cce8d5d6f71$var$monthsShort.indexOf(monthStr) + 1,\n day: $55286cce8d5d6f71$var$parseInteger(dayStr),\n hour: $55286cce8d5d6f71$var$parseInteger(hourStr),\n minute: $55286cce8d5d6f71$var$parseInteger(minuteStr)\n };\n if (secondStr) result.second = $55286cce8d5d6f71$var$parseInteger(secondStr);\n if (weekdayStr) result.weekday = weekdayStr.length > 3 ? $55286cce8d5d6f71$var$weekdaysLong.indexOf(weekdayStr) + 1 : $55286cce8d5d6f71$var$weekdaysShort.indexOf(weekdayStr) + 1;\n return result;\n}\n// RFC 2822/5322\nvar $55286cce8d5d6f71$var$rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\\d\\d)(\\d\\d)))$/;\nfunction $55286cce8d5d6f71$var$extractRFC2822(match) {\n var weekdayStr = match[1], dayStr = match[2], monthStr = match[3], yearStr = match[4], hourStr = match[5], minuteStr = match[6], secondStr = match[7], obsOffset = match[8], milOffset = match[9], offHourStr = match[10], offMinuteStr = match[11], result = $55286cce8d5d6f71$var$fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n var offset;\n if (obsOffset) offset = $55286cce8d5d6f71$var$obsOffsets[obsOffset];\n else if (milOffset) offset = 0;\n else offset = $55286cce8d5d6f71$var$signedOffset(offHourStr, offMinuteStr);\n return [\n result,\n new $55286cce8d5d6f71$var$FixedOffsetZone(offset)\n ];\n}\nfunction $55286cce8d5d6f71$var$preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^()]*\\)|[\\n\\t]/g, \" \").replace(/(\\s\\s+)/g, \" \").trim();\n}\n// http date\nvar $55286cce8d5d6f71$var$rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d\\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/, $55286cce8d5d6f71$var$rfc850 = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d\\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/, $55286cce8d5d6f71$var$ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \\d|\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) (\\d{4})$/;\nfunction $55286cce8d5d6f71$var$extractRFC1123Or850(match) {\n var weekdayStr = match[1], dayStr = match[2], monthStr = match[3], yearStr = match[4], hourStr = match[5], minuteStr = match[6], secondStr = match[7], result = $55286cce8d5d6f71$var$fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [\n result,\n $55286cce8d5d6f71$var$FixedOffsetZone.utcInstance\n ];\n}\nfunction $55286cce8d5d6f71$var$extractASCII(match) {\n var weekdayStr = match[1], monthStr = match[2], dayStr = match[3], hourStr = match[4], minuteStr = match[5], secondStr = match[6], yearStr = match[7], result = $55286cce8d5d6f71$var$fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [\n result,\n $55286cce8d5d6f71$var$FixedOffsetZone.utcInstance\n ];\n}\nvar $55286cce8d5d6f71$var$isoYmdWithTimeExtensionRegex = $55286cce8d5d6f71$var$combineRegexes($55286cce8d5d6f71$var$isoYmdRegex, $55286cce8d5d6f71$var$isoTimeExtensionRegex);\nvar $55286cce8d5d6f71$var$isoWeekWithTimeExtensionRegex = $55286cce8d5d6f71$var$combineRegexes($55286cce8d5d6f71$var$isoWeekRegex, $55286cce8d5d6f71$var$isoTimeExtensionRegex);\nvar $55286cce8d5d6f71$var$isoOrdinalWithTimeExtensionRegex = $55286cce8d5d6f71$var$combineRegexes($55286cce8d5d6f71$var$isoOrdinalRegex, $55286cce8d5d6f71$var$isoTimeExtensionRegex);\nvar $55286cce8d5d6f71$var$isoTimeCombinedRegex = $55286cce8d5d6f71$var$combineRegexes($55286cce8d5d6f71$var$isoTimeRegex);\nvar $55286cce8d5d6f71$var$extractISOYmdTimeAndOffset = $55286cce8d5d6f71$var$combineExtractors($55286cce8d5d6f71$var$extractISOYmd, $55286cce8d5d6f71$var$extractISOTime, $55286cce8d5d6f71$var$extractISOOffset, $55286cce8d5d6f71$var$extractIANAZone);\nvar $55286cce8d5d6f71$var$extractISOWeekTimeAndOffset = $55286cce8d5d6f71$var$combineExtractors($55286cce8d5d6f71$var$extractISOWeekData, $55286cce8d5d6f71$var$extractISOTime, $55286cce8d5d6f71$var$extractISOOffset, $55286cce8d5d6f71$var$extractIANAZone);\nvar $55286cce8d5d6f71$var$extractISOOrdinalDateAndTime = $55286cce8d5d6f71$var$combineExtractors($55286cce8d5d6f71$var$extractISOOrdinalData, $55286cce8d5d6f71$var$extractISOTime, $55286cce8d5d6f71$var$extractISOOffset, $55286cce8d5d6f71$var$extractIANAZone);\nvar $55286cce8d5d6f71$var$extractISOTimeAndOffset = $55286cce8d5d6f71$var$combineExtractors($55286cce8d5d6f71$var$extractISOTime, $55286cce8d5d6f71$var$extractISOOffset, $55286cce8d5d6f71$var$extractIANAZone);\n/*\n * @private\n */ function $55286cce8d5d6f71$var$parseISODate(s) {\n return $55286cce8d5d6f71$var$parse(s, [\n $55286cce8d5d6f71$var$isoYmdWithTimeExtensionRegex,\n $55286cce8d5d6f71$var$extractISOYmdTimeAndOffset\n ], [\n $55286cce8d5d6f71$var$isoWeekWithTimeExtensionRegex,\n $55286cce8d5d6f71$var$extractISOWeekTimeAndOffset\n ], [\n $55286cce8d5d6f71$var$isoOrdinalWithTimeExtensionRegex,\n $55286cce8d5d6f71$var$extractISOOrdinalDateAndTime\n ], [\n $55286cce8d5d6f71$var$isoTimeCombinedRegex,\n $55286cce8d5d6f71$var$extractISOTimeAndOffset\n ]);\n}\nfunction $55286cce8d5d6f71$var$parseRFC2822Date(s) {\n return $55286cce8d5d6f71$var$parse($55286cce8d5d6f71$var$preprocessRFC2822(s), [\n $55286cce8d5d6f71$var$rfc2822,\n $55286cce8d5d6f71$var$extractRFC2822\n ]);\n}\nfunction $55286cce8d5d6f71$var$parseHTTPDate(s) {\n return $55286cce8d5d6f71$var$parse(s, [\n $55286cce8d5d6f71$var$rfc1123,\n $55286cce8d5d6f71$var$extractRFC1123Or850\n ], [\n $55286cce8d5d6f71$var$rfc850,\n $55286cce8d5d6f71$var$extractRFC1123Or850\n ], [\n $55286cce8d5d6f71$var$ascii,\n $55286cce8d5d6f71$var$extractASCII\n ]);\n}\nfunction $55286cce8d5d6f71$var$parseISODuration(s) {\n return $55286cce8d5d6f71$var$parse(s, [\n $55286cce8d5d6f71$var$isoDuration,\n $55286cce8d5d6f71$var$extractISODuration\n ]);\n}\nvar $55286cce8d5d6f71$var$extractISOTimeOnly = $55286cce8d5d6f71$var$combineExtractors($55286cce8d5d6f71$var$extractISOTime);\nfunction $55286cce8d5d6f71$var$parseISOTimeOnly(s) {\n return $55286cce8d5d6f71$var$parse(s, [\n $55286cce8d5d6f71$var$isoTimeOnly,\n $55286cce8d5d6f71$var$extractISOTimeOnly\n ]);\n}\nvar $55286cce8d5d6f71$var$sqlYmdWithTimeExtensionRegex = $55286cce8d5d6f71$var$combineRegexes($55286cce8d5d6f71$var$sqlYmdRegex, $55286cce8d5d6f71$var$sqlTimeExtensionRegex);\nvar $55286cce8d5d6f71$var$sqlTimeCombinedRegex = $55286cce8d5d6f71$var$combineRegexes($55286cce8d5d6f71$var$sqlTimeRegex);\nvar $55286cce8d5d6f71$var$extractISOTimeOffsetAndIANAZone = $55286cce8d5d6f71$var$combineExtractors($55286cce8d5d6f71$var$extractISOTime, $55286cce8d5d6f71$var$extractISOOffset, $55286cce8d5d6f71$var$extractIANAZone);\nfunction $55286cce8d5d6f71$var$parseSQL(s) {\n return $55286cce8d5d6f71$var$parse(s, [\n $55286cce8d5d6f71$var$sqlYmdWithTimeExtensionRegex,\n $55286cce8d5d6f71$var$extractISOYmdTimeAndOffset\n ], [\n $55286cce8d5d6f71$var$sqlTimeCombinedRegex,\n $55286cce8d5d6f71$var$extractISOTimeOffsetAndIANAZone\n ]);\n}\nvar $55286cce8d5d6f71$var$INVALID$2 = \"Invalid Duration\";\n// unit conversion constants\nvar $55286cce8d5d6f71$var$lowOrderMatrix = {\n weeks: {\n days: 7,\n hours: 168,\n minutes: 10080,\n seconds: 604800,\n milliseconds: 604800000\n },\n days: {\n hours: 24,\n minutes: 1440,\n seconds: 86400,\n milliseconds: 86400000\n },\n hours: {\n minutes: 60,\n seconds: 3600,\n milliseconds: 3600000\n },\n minutes: {\n seconds: 60,\n milliseconds: 60000\n },\n seconds: {\n milliseconds: 1000\n }\n}, $55286cce8d5d6f71$var$casualMatrix = $55286cce8d5d6f71$var$_extends({\n years: {\n quarters: 4,\n months: 12,\n weeks: 52,\n days: 365,\n hours: 8760,\n minutes: 525600,\n seconds: 31536000,\n milliseconds: 31536000000\n },\n quarters: {\n months: 3,\n weeks: 13,\n days: 91,\n hours: 2184,\n minutes: 131040,\n seconds: 7862400,\n milliseconds: 7862400000\n },\n months: {\n weeks: 4,\n days: 30,\n hours: 720,\n minutes: 43200,\n seconds: 2592000,\n milliseconds: 2592000000\n }\n}, $55286cce8d5d6f71$var$lowOrderMatrix), $55286cce8d5d6f71$var$daysInYearAccurate = 365.2425, $55286cce8d5d6f71$var$daysInMonthAccurate = 30.436875, $55286cce8d5d6f71$var$accurateMatrix = $55286cce8d5d6f71$var$_extends({\n years: {\n quarters: 4,\n months: 12,\n weeks: $55286cce8d5d6f71$var$daysInYearAccurate / 7,\n days: $55286cce8d5d6f71$var$daysInYearAccurate,\n hours: $55286cce8d5d6f71$var$daysInYearAccurate * 24,\n minutes: $55286cce8d5d6f71$var$daysInYearAccurate * 1440,\n seconds: $55286cce8d5d6f71$var$daysInYearAccurate * 86400,\n milliseconds: $55286cce8d5d6f71$var$daysInYearAccurate * 86400000\n },\n quarters: {\n months: 3,\n weeks: $55286cce8d5d6f71$var$daysInYearAccurate / 28,\n days: $55286cce8d5d6f71$var$daysInYearAccurate / 4,\n hours: $55286cce8d5d6f71$var$daysInYearAccurate * 24 / 4,\n minutes: $55286cce8d5d6f71$var$daysInYearAccurate * 1440 / 4,\n seconds: $55286cce8d5d6f71$var$daysInYearAccurate * 86400 / 4,\n milliseconds: $55286cce8d5d6f71$var$daysInYearAccurate * 86400000 / 4\n },\n months: {\n weeks: $55286cce8d5d6f71$var$daysInMonthAccurate / 7,\n days: $55286cce8d5d6f71$var$daysInMonthAccurate,\n hours: $55286cce8d5d6f71$var$daysInMonthAccurate * 24,\n minutes: $55286cce8d5d6f71$var$daysInMonthAccurate * 1440,\n seconds: $55286cce8d5d6f71$var$daysInMonthAccurate * 86400,\n milliseconds: $55286cce8d5d6f71$var$daysInMonthAccurate * 86400000\n }\n}, $55286cce8d5d6f71$var$lowOrderMatrix);\n// units ordered by size\nvar $55286cce8d5d6f71$var$orderedUnits$1 = [\n \"years\",\n \"quarters\",\n \"months\",\n \"weeks\",\n \"days\",\n \"hours\",\n \"minutes\",\n \"seconds\",\n \"milliseconds\"\n];\nvar $55286cce8d5d6f71$var$reverseUnits = $55286cce8d5d6f71$var$orderedUnits$1.slice(0).reverse();\n// clone really means \"create another instance just like this one, but with these changes\"\nfunction $55286cce8d5d6f71$var$clone$1(dur, alts, clear) {\n if (clear === void 0) clear = false;\n // deep merge for vals\n var conf = {\n values: clear ? alts.values : $55286cce8d5d6f71$var$_extends({}, dur.values, alts.values || {}),\n loc: dur.loc.clone(alts.loc),\n conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy,\n matrix: alts.matrix || dur.matrix\n };\n return new $55286cce8d5d6f71$var$Duration(conf);\n}\nfunction $55286cce8d5d6f71$var$durationToMillis(matrix, vals) {\n var _vals$milliseconds;\n var sum = (_vals$milliseconds = vals.milliseconds) != null ? _vals$milliseconds : 0;\n for(var _iterator = $55286cce8d5d6f71$var$_createForOfIteratorHelperLoose($55286cce8d5d6f71$var$reverseUnits.slice(1)), _step; !(_step = _iterator()).done;){\n var unit = _step.value;\n if (vals[unit]) sum += vals[unit] * matrix[unit][\"milliseconds\"];\n }\n return sum;\n}\n// NB: mutates parameters\nfunction $55286cce8d5d6f71$var$normalizeValues(matrix, vals) {\n // the logic below assumes the overall value of the duration is positive\n // if this is not the case, factor is used to make it so\n var factor = $55286cce8d5d6f71$var$durationToMillis(matrix, vals) < 0 ? -1 : 1;\n $55286cce8d5d6f71$var$orderedUnits$1.reduceRight(function(previous, current) {\n if (!$55286cce8d5d6f71$var$isUndefined(vals[current])) {\n if (previous) {\n var previousVal = vals[previous] * factor;\n var conv = matrix[current][previous];\n // if (previousVal < 0):\n // lower order unit is negative (e.g. { years: 2, days: -2 })\n // normalize this by reducing the higher order unit by the appropriate amount\n // and increasing the lower order unit\n // this can never make the higher order unit negative, because this function only operates\n // on positive durations, so the amount of time represented by the lower order unit cannot\n // be larger than the higher order unit\n // else:\n // lower order unit is positive (e.g. { years: 2, days: 450 } or { years: -2, days: 450 })\n // in this case we attempt to convert as much as possible from the lower order unit into\n // the higher order one\n //\n // Math.floor takes care of both of these cases, rounding away from 0\n // if previousVal < 0 it makes the absolute value larger\n // if previousVal >= it makes the absolute value smaller\n var rollUp = Math.floor(previousVal / conv);\n vals[current] += rollUp * factor;\n vals[previous] -= rollUp * conv * factor;\n }\n return current;\n } else return previous;\n }, null);\n // try to convert any decimals into smaller units if possible\n // for example for { years: 2.5, days: 0, seconds: 0 } we want to get { years: 2, days: 182, hours: 12 }\n $55286cce8d5d6f71$var$orderedUnits$1.reduce(function(previous, current) {\n if (!$55286cce8d5d6f71$var$isUndefined(vals[current])) {\n if (previous) {\n var fraction = vals[previous] % 1;\n vals[previous] -= fraction;\n vals[current] += fraction * matrix[previous][current];\n }\n return current;\n } else return previous;\n }, null);\n}\n// Remove all properties with a value of 0 from an object\nfunction $55286cce8d5d6f71$var$removeZeroes(vals) {\n var newVals = {};\n for(var _i = 0, _Object$entries = Object.entries(vals); _i < _Object$entries.length; _i++){\n var _Object$entries$_i = _Object$entries[_i], key = _Object$entries$_i[0], value = _Object$entries$_i[1];\n if (value !== 0) newVals[key] = value;\n }\n return newVals;\n}\n/**\n * A Duration object represents a period of time, like \"2 months\" or \"1 day, 1 hour\". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime#plus} to add a Duration object to a DateTime, producing another DateTime.\n *\n * Here is a brief overview of commonly used methods and getters in Duration:\n *\n * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}.\n * * **Unit values** See the {@link Duration#years}, {@link Duration#months}, {@link Duration#weeks}, {@link Duration#days}, {@link Duration#hours}, {@link Duration#minutes}, {@link Duration#seconds}, {@link Duration#milliseconds} accessors.\n * * **Configuration** See {@link Duration#locale} and {@link Duration#numberingSystem} accessors.\n * * **Transformation** To create new Durations out of old ones use {@link Duration#plus}, {@link Duration#minus}, {@link Duration#normalize}, {@link Duration#set}, {@link Duration#reconfigure}, {@link Duration#shiftTo}, and {@link Duration#negate}.\n * * **Output** To convert the Duration into other representations, see {@link Duration#as}, {@link Duration#toISO}, {@link Duration#toFormat}, and {@link Duration#toJSON}\n *\n * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation.\n */ var $55286cce8d5d6f71$var$Duration = /*#__PURE__*/ function(_Symbol$for) {\n /**\n * @private\n */ function Duration(config) {\n var accurate = config.conversionAccuracy === \"longterm\" || false;\n var matrix = accurate ? $55286cce8d5d6f71$var$accurateMatrix : $55286cce8d5d6f71$var$casualMatrix;\n if (config.matrix) matrix = config.matrix;\n /**\n * @access private\n */ this.values = config.values;\n /**\n * @access private\n */ this.loc = config.loc || $55286cce8d5d6f71$var$Locale.create();\n /**\n * @access private\n */ this.conversionAccuracy = accurate ? \"longterm\" : \"casual\";\n /**\n * @access private\n */ this.invalid = config.invalid || null;\n /**\n * @access private\n */ this.matrix = matrix;\n /**\n * @access private\n */ this.isLuxonDuration = true;\n }\n /**\n * Create Duration from a number of milliseconds.\n * @param {number} count of milliseconds\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */ Duration.fromMillis = function fromMillis(count, opts) {\n return Duration.fromObject({\n milliseconds: count\n }, opts);\n } /**\n * Create a Duration from a JavaScript object with keys like 'years' and 'hours'.\n * If this object is empty then a zero milliseconds duration is returned.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.years\n * @param {number} obj.quarters\n * @param {number} obj.months\n * @param {number} obj.weeks\n * @param {number} obj.days\n * @param {number} obj.hours\n * @param {number} obj.minutes\n * @param {number} obj.seconds\n * @param {number} obj.milliseconds\n * @param {Object} [opts=[]] - options for creating this Duration\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the custom conversion system to use\n * @return {Duration}\n */ ;\n Duration.fromObject = function fromObject(obj, opts) {\n if (opts === void 0) opts = {};\n if (obj == null || typeof obj !== \"object\") throw new $55286cce8d5d6f71$var$InvalidArgumentError(\"Duration.fromObject: argument expected to be an object, got \" + (obj === null ? \"null\" : typeof obj));\n return new Duration({\n values: $55286cce8d5d6f71$var$normalizeObject(obj, Duration.normalizeUnit),\n loc: $55286cce8d5d6f71$var$Locale.fromObject(opts),\n conversionAccuracy: opts.conversionAccuracy,\n matrix: opts.matrix\n });\n } /**\n * Create a Duration from DurationLike.\n *\n * @param {Object | number | Duration} durationLike\n * One of:\n * - object with keys like 'years' and 'hours'.\n * - number representing milliseconds\n * - Duration instance\n * @return {Duration}\n */ ;\n Duration.fromDurationLike = function fromDurationLike(durationLike) {\n if ($55286cce8d5d6f71$var$isNumber(durationLike)) return Duration.fromMillis(durationLike);\n else if (Duration.isDuration(durationLike)) return durationLike;\n else if (typeof durationLike === \"object\") return Duration.fromObject(durationLike);\n else throw new $55286cce8d5d6f71$var$InvalidArgumentError(\"Unknown duration argument \" + durationLike + \" of type \" + typeof durationLike);\n } /**\n * Create a Duration from an ISO 8601 duration string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the preset conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }\n * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }\n * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }\n * @return {Duration}\n */ ;\n Duration.fromISO = function fromISO(text, opts) {\n var _parseISODuration = $55286cce8d5d6f71$var$parseISODuration(text), parsed = _parseISODuration[0];\n if (parsed) return Duration.fromObject(parsed, opts);\n else return Duration.invalid(\"unparsable\", 'the input \"' + text + \"\\\" can't be parsed as ISO 8601\");\n } /**\n * Create a Duration from an ISO 8601 time string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 }\n * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @return {Duration}\n */ ;\n Duration.fromISOTime = function fromISOTime(text, opts) {\n var _parseISOTimeOnly = $55286cce8d5d6f71$var$parseISOTimeOnly(text), parsed = _parseISOTimeOnly[0];\n if (parsed) return Duration.fromObject(parsed, opts);\n else return Duration.invalid(\"unparsable\", 'the input \"' + text + \"\\\" can't be parsed as ISO 8601\");\n } /**\n * Create an invalid Duration.\n * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Duration}\n */ ;\n Duration.invalid = function invalid(reason, explanation) {\n if (explanation === void 0) explanation = null;\n if (!reason) throw new $55286cce8d5d6f71$var$InvalidArgumentError(\"need to specify a reason the Duration is invalid\");\n var invalid = reason instanceof $55286cce8d5d6f71$var$Invalid ? reason : new $55286cce8d5d6f71$var$Invalid(reason, explanation);\n if ($55286cce8d5d6f71$var$Settings.throwOnInvalid) throw new $55286cce8d5d6f71$var$InvalidDurationError(invalid);\n else return new Duration({\n invalid: invalid\n });\n } /**\n * @private\n */ ;\n Duration.normalizeUnit = function normalizeUnit(unit) {\n var normalized = {\n year: \"years\",\n years: \"years\",\n quarter: \"quarters\",\n quarters: \"quarters\",\n month: \"months\",\n months: \"months\",\n week: \"weeks\",\n weeks: \"weeks\",\n day: \"days\",\n days: \"days\",\n hour: \"hours\",\n hours: \"hours\",\n minute: \"minutes\",\n minutes: \"minutes\",\n second: \"seconds\",\n seconds: \"seconds\",\n millisecond: \"milliseconds\",\n milliseconds: \"milliseconds\"\n }[unit ? unit.toLowerCase() : unit];\n if (!normalized) throw new $55286cce8d5d6f71$var$InvalidUnitError(unit);\n return normalized;\n } /**\n * Check if an object is a Duration. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */ ;\n Duration.isDuration = function isDuration(o) {\n return o && o.isLuxonDuration || false;\n } /**\n * Get the locale of a Duration, such 'en-GB'\n * @type {string}\n */ ;\n var _proto = Duration.prototype;\n /**\n * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:\n * * `S` for milliseconds\n * * `s` for seconds\n * * `m` for minutes\n * * `h` for hours\n * * `d` for days\n * * `w` for weeks\n * * `M` for months\n * * `y` for years\n * Notes:\n * * Add padding by repeating the token, e.g. \"yy\" pads the years to two digits, \"hhhh\" pads the hours out to four digits\n * * Tokens can be escaped by wrapping with single quotes.\n * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.\n * @param {string} fmt - the format string\n * @param {Object} opts - options\n * @param {boolean} [opts.floor=true] - floor numerical values\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"y d s\") //=> \"1 6 2\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"yy dd sss\") //=> \"01 06 002\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"M S\") //=> \"12 518402000\"\n * @return {string}\n */ _proto.toFormat = function toFormat(fmt, opts) {\n if (opts === void 0) opts = {};\n // reverse-compat since 1.2; we always round down now, never up, and we do it by default\n var fmtOpts = $55286cce8d5d6f71$var$_extends({}, opts, {\n floor: opts.round !== false && opts.floor !== false\n });\n return this.isValid ? $55286cce8d5d6f71$var$Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : $55286cce8d5d6f71$var$INVALID$2;\n } /**\n * Returns a string representation of a Duration with all units included.\n * To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options\n * @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`.\n * @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor.\n * @example\n * ```js\n * var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 })\n * dur.toHuman() //=> '1 day, 5 hours, 6 minutes'\n * dur.toHuman({ listStyle: \"long\" }) //=> '1 day, 5 hours, and 6 minutes'\n * dur.toHuman({ unitDisplay: \"short\" }) //=> '1 day, 5 hr, 6 min'\n * ```\n */ ;\n _proto.toHuman = function toHuman(opts) {\n var _this = this;\n if (opts === void 0) opts = {};\n if (!this.isValid) return $55286cce8d5d6f71$var$INVALID$2;\n var l = $55286cce8d5d6f71$var$orderedUnits$1.map(function(unit) {\n var val = _this.values[unit];\n if ($55286cce8d5d6f71$var$isUndefined(val)) return null;\n return _this.loc.numberFormatter($55286cce8d5d6f71$var$_extends({\n style: \"unit\",\n unitDisplay: \"long\"\n }, opts, {\n unit: unit.slice(0, -1)\n })).format(val);\n }).filter(function(n) {\n return n;\n });\n return this.loc.listFormatter($55286cce8d5d6f71$var$_extends({\n type: \"conjunction\",\n style: opts.listStyle || \"narrow\"\n }, opts)).format(l);\n } /**\n * Returns a JavaScript object with this Duration's values.\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }\n * @return {Object}\n */ ;\n _proto.toObject = function toObject() {\n if (!this.isValid) return {};\n return $55286cce8d5d6f71$var$_extends({}, this.values);\n } /**\n * Returns an ISO 8601-compliant string representation of this Duration.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'\n * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'\n * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'\n * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'\n * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'\n * @return {string}\n */ ;\n _proto.toISO = function toISO() {\n // we could use the formatter, but this is an easier way to get the minimum string\n if (!this.isValid) return null;\n var s = \"P\";\n if (this.years !== 0) s += this.years + \"Y\";\n if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + \"M\";\n if (this.weeks !== 0) s += this.weeks + \"W\";\n if (this.days !== 0) s += this.days + \"D\";\n if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) s += \"T\";\n if (this.hours !== 0) s += this.hours + \"H\";\n if (this.minutes !== 0) s += this.minutes + \"M\";\n if (this.seconds !== 0 || this.milliseconds !== 0) // this will handle \"floating point madness\" by removing extra decimal places\n // https://stackoverflow.com/questions/588004/is-floating-point-math-broken\n s += $55286cce8d5d6f71$var$roundTo(this.seconds + this.milliseconds / 1000, 3) + \"S\";\n if (s === \"P\") s += \"T0S\";\n return s;\n } /**\n * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.\n * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000'\n * @return {string}\n */ ;\n _proto.toISOTime = function toISOTime(opts) {\n if (opts === void 0) opts = {};\n if (!this.isValid) return null;\n var millis = this.toMillis();\n if (millis < 0 || millis >= 86400000) return null;\n opts = $55286cce8d5d6f71$var$_extends({\n suppressMilliseconds: false,\n suppressSeconds: false,\n includePrefix: false,\n format: \"extended\"\n }, opts, {\n includeOffset: false\n });\n var dateTime = $55286cce8d5d6f71$var$DateTime.fromMillis(millis, {\n zone: \"UTC\"\n });\n return dateTime.toISOTime(opts);\n } /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in JSON.\n * @return {string}\n */ ;\n _proto.toJSON = function toJSON() {\n return this.toISO();\n } /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in debugging.\n * @return {string}\n */ ;\n _proto.toString = function toString() {\n return this.toISO();\n } /**\n * Returns a string representation of this Duration appropriate for the REPL.\n * @return {string}\n */ ;\n _proto[_Symbol$for] = function() {\n if (this.isValid) return \"Duration { values: \" + JSON.stringify(this.values) + \" }\";\n else return \"Duration { Invalid, reason: \" + this.invalidReason + \" }\";\n } /**\n * Returns an milliseconds value of this Duration.\n * @return {number}\n */ ;\n _proto.toMillis = function toMillis() {\n if (!this.isValid) return NaN;\n return $55286cce8d5d6f71$var$durationToMillis(this.matrix, this.values);\n } /**\n * Returns an milliseconds value of this Duration. Alias of {@link toMillis}\n * @return {number}\n */ ;\n _proto.valueOf = function valueOf() {\n return this.toMillis();\n } /**\n * Make this Duration longer by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */ ;\n _proto.plus = function plus(duration) {\n if (!this.isValid) return this;\n var dur = Duration.fromDurationLike(duration), result = {};\n for(var _i2 = 0, _orderedUnits = $55286cce8d5d6f71$var$orderedUnits$1; _i2 < _orderedUnits.length; _i2++){\n var k = _orderedUnits[_i2];\n if ($55286cce8d5d6f71$var$hasOwnProperty(dur.values, k) || $55286cce8d5d6f71$var$hasOwnProperty(this.values, k)) result[k] = dur.get(k) + this.get(k);\n }\n return $55286cce8d5d6f71$var$clone$1(this, {\n values: result\n }, true);\n } /**\n * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */ ;\n _proto.minus = function minus(duration) {\n if (!this.isValid) return this;\n var dur = Duration.fromDurationLike(duration);\n return this.plus(dur.negate());\n } /**\n * Scale this Duration by the specified amount. Return a newly-constructed Duration.\n * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 }\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === \"hours\" ? x * 2 : x) //=> { hours: 2, minutes: 30 }\n * @return {Duration}\n */ ;\n _proto.mapUnits = function mapUnits(fn) {\n if (!this.isValid) return this;\n var result = {};\n for(var _i3 = 0, _Object$keys = Object.keys(this.values); _i3 < _Object$keys.length; _i3++){\n var k = _Object$keys[_i3];\n result[k] = $55286cce8d5d6f71$var$asNumber(fn(this.values[k], k));\n }\n return $55286cce8d5d6f71$var$clone$1(this, {\n values: result\n }, true);\n } /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2\n * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0\n * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3\n * @return {number}\n */ ;\n _proto.get = function get(unit) {\n return this[Duration.normalizeUnit(unit)];\n } /**\n * \"Set\" the values of specified units. Return a newly-constructed Duration.\n * @param {Object} values - a mapping of units to numbers\n * @example dur.set({ years: 2017 })\n * @example dur.set({ hours: 8, minutes: 30 })\n * @return {Duration}\n */ ;\n _proto.set = function set(values) {\n if (!this.isValid) return this;\n var mixed = $55286cce8d5d6f71$var$_extends({}, this.values, $55286cce8d5d6f71$var$normalizeObject(values, Duration.normalizeUnit));\n return $55286cce8d5d6f71$var$clone$1(this, {\n values: mixed\n });\n } /**\n * \"Set\" the locale and/or numberingSystem. Returns a newly-constructed Duration.\n * @example dur.reconfigure({ locale: 'en-GB' })\n * @return {Duration}\n */ ;\n _proto.reconfigure = function reconfigure(_temp) {\n var _ref = _temp === void 0 ? {} : _temp, locale = _ref.locale, numberingSystem = _ref.numberingSystem, conversionAccuracy = _ref.conversionAccuracy, matrix = _ref.matrix;\n var loc = this.loc.clone({\n locale: locale,\n numberingSystem: numberingSystem\n });\n var opts = {\n loc: loc,\n matrix: matrix,\n conversionAccuracy: conversionAccuracy\n };\n return $55286cce8d5d6f71$var$clone$1(this, opts);\n } /**\n * Return the length of the duration in the specified unit.\n * @param {string} unit - a unit such as 'minutes' or 'days'\n * @example Duration.fromObject({years: 1}).as('days') //=> 365\n * @example Duration.fromObject({years: 1}).as('months') //=> 12\n * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5\n * @return {number}\n */ ;\n _proto.as = function as(unit) {\n return this.isValid ? this.shiftTo(unit).get(unit) : NaN;\n } /**\n * Reduce this Duration to its canonical representation in its current units.\n * Assuming the overall value of the Duration is positive, this means:\n * - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example)\n * - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise\n * the overall value would be negative, see third example)\n * - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example)\n *\n * If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`.\n * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }\n * @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 }\n * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }\n * @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 }\n * @return {Duration}\n */ ;\n _proto.normalize = function normalize() {\n if (!this.isValid) return this;\n var vals = this.toObject();\n $55286cce8d5d6f71$var$normalizeValues(this.matrix, vals);\n return $55286cce8d5d6f71$var$clone$1(this, {\n values: vals\n }, true);\n } /**\n * Rescale units to its largest representation\n * @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 }\n * @return {Duration}\n */ ;\n _proto.rescale = function rescale() {\n if (!this.isValid) return this;\n var vals = $55286cce8d5d6f71$var$removeZeroes(this.normalize().shiftToAll().toObject());\n return $55286cce8d5d6f71$var$clone$1(this, {\n values: vals\n }, true);\n } /**\n * Convert this Duration into its representation in a different set of units.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }\n * @return {Duration}\n */ ;\n _proto.shiftTo = function shiftTo() {\n for(var _len = arguments.length, units = new Array(_len), _key = 0; _key < _len; _key++)units[_key] = arguments[_key];\n if (!this.isValid) return this;\n if (units.length === 0) return this;\n units = units.map(function(u) {\n return Duration.normalizeUnit(u);\n });\n var built = {}, accumulated = {}, vals = this.toObject();\n var lastUnit;\n for(var _i4 = 0, _orderedUnits2 = $55286cce8d5d6f71$var$orderedUnits$1; _i4 < _orderedUnits2.length; _i4++){\n var k = _orderedUnits2[_i4];\n if (units.indexOf(k) >= 0) {\n lastUnit = k;\n var own = 0;\n // anything we haven't boiled down yet should get boiled to this unit\n for(var ak in accumulated){\n own += this.matrix[ak][k] * accumulated[ak];\n accumulated[ak] = 0;\n }\n // plus anything that's already in this unit\n if ($55286cce8d5d6f71$var$isNumber(vals[k])) own += vals[k];\n // only keep the integer part for now in the hopes of putting any decimal part\n // into a smaller unit later\n var i = Math.trunc(own);\n built[k] = i;\n accumulated[k] = (own * 1000 - i * 1000) / 1000;\n // otherwise, keep it in the wings to boil it later\n } else if ($55286cce8d5d6f71$var$isNumber(vals[k])) accumulated[k] = vals[k];\n }\n // anything leftover becomes the decimal for the last unit\n // lastUnit must be defined since units is not empty\n for(var key in accumulated)if (accumulated[key] !== 0) built[lastUnit] += key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key];\n $55286cce8d5d6f71$var$normalizeValues(this.matrix, built);\n return $55286cce8d5d6f71$var$clone$1(this, {\n values: built\n }, true);\n } /**\n * Shift this Duration to all available units.\n * Same as shiftTo(\"years\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", \"seconds\", \"milliseconds\")\n * @return {Duration}\n */ ;\n _proto.shiftToAll = function shiftToAll() {\n if (!this.isValid) return this;\n return this.shiftTo(\"years\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", \"seconds\", \"milliseconds\");\n } /**\n * Return the negative of this Duration.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }\n * @return {Duration}\n */ ;\n _proto.negate = function negate() {\n if (!this.isValid) return this;\n var negated = {};\n for(var _i5 = 0, _Object$keys2 = Object.keys(this.values); _i5 < _Object$keys2.length; _i5++){\n var k = _Object$keys2[_i5];\n negated[k] = this.values[k] === 0 ? 0 : -this.values[k];\n }\n return $55286cce8d5d6f71$var$clone$1(this, {\n values: negated\n }, true);\n } /**\n * Get the years.\n * @type {number}\n */ ;\n /**\n * Equality check\n * Two Durations are equal iff they have the same units and the same values for each unit.\n * @param {Duration} other\n * @return {boolean}\n */ _proto.equals = function equals(other) {\n if (!this.isValid || !other.isValid) return false;\n if (!this.loc.equals(other.loc)) return false;\n function eq(v1, v2) {\n // Consider 0 and undefined as equal\n if (v1 === undefined || v1 === 0) return v2 === undefined || v2 === 0;\n return v1 === v2;\n }\n for(var _i6 = 0, _orderedUnits3 = $55286cce8d5d6f71$var$orderedUnits$1; _i6 < _orderedUnits3.length; _i6++){\n var u = _orderedUnits3[_i6];\n if (!eq(this.values[u], other.values[u])) return false;\n }\n return true;\n };\n $55286cce8d5d6f71$var$_createClass(Duration, [\n {\n key: \"locale\",\n get: function get() {\n return this.isValid ? this.loc.locale : null;\n }\n },\n {\n key: \"numberingSystem\",\n get: function get() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n },\n {\n key: \"years\",\n get: function get() {\n return this.isValid ? this.values.years || 0 : NaN;\n }\n },\n {\n key: \"quarters\",\n get: function get() {\n return this.isValid ? this.values.quarters || 0 : NaN;\n }\n },\n {\n key: \"months\",\n get: function get() {\n return this.isValid ? this.values.months || 0 : NaN;\n }\n },\n {\n key: \"weeks\",\n get: function get() {\n return this.isValid ? this.values.weeks || 0 : NaN;\n }\n },\n {\n key: \"days\",\n get: function get() {\n return this.isValid ? this.values.days || 0 : NaN;\n }\n },\n {\n key: \"hours\",\n get: function get() {\n return this.isValid ? this.values.hours || 0 : NaN;\n }\n },\n {\n key: \"minutes\",\n get: function get() {\n return this.isValid ? this.values.minutes || 0 : NaN;\n }\n },\n {\n key: \"seconds\",\n get: function get() {\n return this.isValid ? this.values.seconds || 0 : NaN;\n }\n },\n {\n key: \"milliseconds\",\n get: function get() {\n return this.isValid ? this.values.milliseconds || 0 : NaN;\n }\n },\n {\n key: \"isValid\",\n get: function get() {\n return this.invalid === null;\n }\n },\n {\n key: \"invalidReason\",\n get: function get() {\n return this.invalid ? this.invalid.reason : null;\n }\n },\n {\n key: \"invalidExplanation\",\n get: function get() {\n return this.invalid ? this.invalid.explanation : null;\n }\n }\n ]);\n return Duration;\n}(Symbol.for(\"nodejs.util.inspect.custom\"));\nvar $55286cce8d5d6f71$var$INVALID$1 = \"Invalid Interval\";\n// checks if the start is equal to or before the end\nfunction $55286cce8d5d6f71$var$validateStartEnd(start, end) {\n if (!start || !start.isValid) return $55286cce8d5d6f71$var$Interval.invalid(\"missing or invalid start\");\n else if (!end || !end.isValid) return $55286cce8d5d6f71$var$Interval.invalid(\"missing or invalid end\");\n else if (end < start) return $55286cce8d5d6f71$var$Interval.invalid(\"end before start\", \"The end of an interval must be after its start, but you had start=\" + start.toISO() + \" and end=\" + end.toISO());\n else return null;\n}\n/**\n * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them.\n *\n * Here is a brief overview of the most commonly used methods and getters in Interval:\n *\n * * **Creation** To create an Interval, use {@link Interval.fromDateTimes}, {@link Interval.after}, {@link Interval.before}, or {@link Interval.fromISO}.\n * * **Accessors** Use {@link Interval#start} and {@link Interval#end} to get the start and end.\n * * **Interrogation** To analyze the Interval, use {@link Interval#count}, {@link Interval#length}, {@link Interval#hasSame}, {@link Interval#contains}, {@link Interval#isAfter}, or {@link Interval#isBefore}.\n * * **Transformation** To create other Intervals out of this one, use {@link Interval#set}, {@link Interval#splitAt}, {@link Interval#splitBy}, {@link Interval#divideEqually}, {@link Interval.merge}, {@link Interval.xor}, {@link Interval#union}, {@link Interval#intersection}, or {@link Interval#difference}.\n * * **Comparison** To compare this Interval to another one, use {@link Interval#equals}, {@link Interval#overlaps}, {@link Interval#abutsStart}, {@link Interval#abutsEnd}, {@link Interval#engulfs}\n * * **Output** To convert the Interval into other representations, see {@link Interval#toString}, {@link Interval#toLocaleString}, {@link Interval#toISO}, {@link Interval#toISODate}, {@link Interval#toISOTime}, {@link Interval#toFormat}, and {@link Interval#toDuration}.\n */ var $55286cce8d5d6f71$var$Interval = /*#__PURE__*/ function(_Symbol$for) {\n /**\n * @private\n */ function Interval(config) {\n /**\n * @access private\n */ this.s = config.start;\n /**\n * @access private\n */ this.e = config.end;\n /**\n * @access private\n */ this.invalid = config.invalid || null;\n /**\n * @access private\n */ this.isLuxonInterval = true;\n }\n /**\n * Create an invalid Interval.\n * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Interval}\n */ Interval.invalid = function invalid(reason, explanation) {\n if (explanation === void 0) explanation = null;\n if (!reason) throw new $55286cce8d5d6f71$var$InvalidArgumentError(\"need to specify a reason the Interval is invalid\");\n var invalid = reason instanceof $55286cce8d5d6f71$var$Invalid ? reason : new $55286cce8d5d6f71$var$Invalid(reason, explanation);\n if ($55286cce8d5d6f71$var$Settings.throwOnInvalid) throw new $55286cce8d5d6f71$var$InvalidIntervalError(invalid);\n else return new Interval({\n invalid: invalid\n });\n } /**\n * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.\n * @param {DateTime|Date|Object} start\n * @param {DateTime|Date|Object} end\n * @return {Interval}\n */ ;\n Interval.fromDateTimes = function fromDateTimes(start, end) {\n var builtStart = $55286cce8d5d6f71$var$friendlyDateTime(start), builtEnd = $55286cce8d5d6f71$var$friendlyDateTime(end);\n var validateError = $55286cce8d5d6f71$var$validateStartEnd(builtStart, builtEnd);\n if (validateError == null) return new Interval({\n start: builtStart,\n end: builtEnd\n });\n else return validateError;\n } /**\n * Create an Interval from a start DateTime and a Duration to extend to.\n * @param {DateTime|Date|Object} start\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */ ;\n Interval.after = function after(start, duration) {\n var dur = $55286cce8d5d6f71$var$Duration.fromDurationLike(duration), dt = $55286cce8d5d6f71$var$friendlyDateTime(start);\n return Interval.fromDateTimes(dt, dt.plus(dur));\n } /**\n * Create an Interval from an end DateTime and a Duration to extend backwards to.\n * @param {DateTime|Date|Object} end\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */ ;\n Interval.before = function before(end, duration) {\n var dur = $55286cce8d5d6f71$var$Duration.fromDurationLike(duration), dt = $55286cce8d5d6f71$var$friendlyDateTime(end);\n return Interval.fromDateTimes(dt.minus(dur), dt);\n } /**\n * Create an Interval from an ISO 8601 string.\n * Accepts `/`, `/`, and `/` formats.\n * @param {string} text - the ISO string to parse\n * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {Interval}\n */ ;\n Interval.fromISO = function fromISO(text, opts) {\n var _split = (text || \"\").split(\"/\", 2), s = _split[0], e = _split[1];\n if (s && e) {\n var start, startIsValid;\n try {\n start = $55286cce8d5d6f71$var$DateTime.fromISO(s, opts);\n startIsValid = start.isValid;\n } catch (e) {\n startIsValid = false;\n }\n var end, endIsValid;\n try {\n end = $55286cce8d5d6f71$var$DateTime.fromISO(e, opts);\n endIsValid = end.isValid;\n } catch (e) {\n endIsValid = false;\n }\n if (startIsValid && endIsValid) return Interval.fromDateTimes(start, end);\n if (startIsValid) {\n var dur = $55286cce8d5d6f71$var$Duration.fromISO(e, opts);\n if (dur.isValid) return Interval.after(start, dur);\n } else if (endIsValid) {\n var _dur = $55286cce8d5d6f71$var$Duration.fromISO(s, opts);\n if (_dur.isValid) return Interval.before(end, _dur);\n }\n }\n return Interval.invalid(\"unparsable\", 'the input \"' + text + \"\\\" can't be parsed as ISO 8601\");\n } /**\n * Check if an object is an Interval. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */ ;\n Interval.isInterval = function isInterval(o) {\n return o && o.isLuxonInterval || false;\n } /**\n * Returns the start of the Interval\n * @type {DateTime}\n */ ;\n var _proto = Interval.prototype;\n /**\n * Returns the length of the Interval in the specified unit.\n * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.\n * @return {number}\n */ _proto.length = function length(unit) {\n if (unit === void 0) unit = \"milliseconds\";\n return this.isValid ? this.toDuration.apply(this, [\n unit\n ]).get(unit) : NaN;\n } /**\n * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.\n * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'\n * asks 'what dates are included in this interval?', not 'how many days long is this interval?'\n * @param {string} [unit='milliseconds'] - the unit of time to count.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime\n * @return {number}\n */ ;\n _proto.count = function count(unit, opts) {\n if (unit === void 0) unit = \"milliseconds\";\n if (!this.isValid) return NaN;\n var start = this.start.startOf(unit, opts);\n var end;\n if (opts != null && opts.useLocaleWeeks) end = this.end.reconfigure({\n locale: start.locale\n });\n else end = this.end;\n end = end.startOf(unit, opts);\n return Math.floor(end.diff(start, unit).get(unit)) + (end.valueOf() !== this.end.valueOf());\n } /**\n * Returns whether this Interval's start and end are both in the same unit of time\n * @param {string} unit - the unit of time to check sameness on\n * @return {boolean}\n */ ;\n _proto.hasSame = function hasSame(unit) {\n return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;\n } /**\n * Return whether this Interval has the same start and end DateTimes.\n * @return {boolean}\n */ ;\n _proto.isEmpty = function isEmpty() {\n return this.s.valueOf() === this.e.valueOf();\n } /**\n * Return whether this Interval's start is after the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */ ;\n _proto.isAfter = function isAfter(dateTime) {\n if (!this.isValid) return false;\n return this.s > dateTime;\n } /**\n * Return whether this Interval's end is before the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */ ;\n _proto.isBefore = function isBefore(dateTime) {\n if (!this.isValid) return false;\n return this.e <= dateTime;\n } /**\n * Return whether this Interval contains the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */ ;\n _proto.contains = function contains(dateTime) {\n if (!this.isValid) return false;\n return this.s <= dateTime && this.e > dateTime;\n } /**\n * \"Sets\" the start and/or end dates. Returns a newly-constructed Interval.\n * @param {Object} values - the values to set\n * @param {DateTime} values.start - the starting DateTime\n * @param {DateTime} values.end - the ending DateTime\n * @return {Interval}\n */ ;\n _proto.set = function set(_temp) {\n var _ref = _temp === void 0 ? {} : _temp, start = _ref.start, end = _ref.end;\n if (!this.isValid) return this;\n return Interval.fromDateTimes(start || this.s, end || this.e);\n } /**\n * Split this Interval at each of the specified DateTimes\n * @param {...DateTime} dateTimes - the unit of time to count.\n * @return {Array}\n */ ;\n _proto.splitAt = function splitAt() {\n var _this = this;\n if (!this.isValid) return [];\n for(var _len = arguments.length, dateTimes = new Array(_len), _key = 0; _key < _len; _key++)dateTimes[_key] = arguments[_key];\n var sorted = dateTimes.map($55286cce8d5d6f71$var$friendlyDateTime).filter(function(d) {\n return _this.contains(d);\n }).sort(function(a, b) {\n return a.toMillis() - b.toMillis();\n }), results = [];\n var s = this.s, i = 0;\n while(s < this.e){\n var added = sorted[i] || this.e, next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n i += 1;\n }\n return results;\n } /**\n * Split this Interval into smaller Intervals, each of the specified length.\n * Left over time is grouped into a smaller interval\n * @param {Duration|Object|number} duration - The length of each resulting interval.\n * @return {Array}\n */ ;\n _proto.splitBy = function splitBy(duration) {\n var dur = $55286cce8d5d6f71$var$Duration.fromDurationLike(duration);\n if (!this.isValid || !dur.isValid || dur.as(\"milliseconds\") === 0) return [];\n var s = this.s, idx = 1, next;\n var results = [];\n while(s < this.e){\n var added = this.start.plus(dur.mapUnits(function(x) {\n return x * idx;\n }));\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n idx += 1;\n }\n return results;\n } /**\n * Split this Interval into the specified number of smaller intervals.\n * @param {number} numberOfParts - The number of Intervals to divide the Interval into.\n * @return {Array}\n */ ;\n _proto.divideEqually = function divideEqually(numberOfParts) {\n if (!this.isValid) return [];\n return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);\n } /**\n * Return whether this Interval overlaps with the specified Interval\n * @param {Interval} other\n * @return {boolean}\n */ ;\n _proto.overlaps = function overlaps(other) {\n return this.e > other.s && this.s < other.e;\n } /**\n * Return whether this Interval's end is adjacent to the specified Interval's start.\n * @param {Interval} other\n * @return {boolean}\n */ ;\n _proto.abutsStart = function abutsStart(other) {\n if (!this.isValid) return false;\n return +this.e === +other.s;\n } /**\n * Return whether this Interval's start is adjacent to the specified Interval's end.\n * @param {Interval} other\n * @return {boolean}\n */ ;\n _proto.abutsEnd = function abutsEnd(other) {\n if (!this.isValid) return false;\n return +other.e === +this.s;\n } /**\n * Return whether this Interval engulfs the start and end of the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */ ;\n _proto.engulfs = function engulfs(other) {\n if (!this.isValid) return false;\n return this.s <= other.s && this.e >= other.e;\n } /**\n * Return whether this Interval has the same start and end as the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */ ;\n _proto.equals = function equals(other) {\n if (!this.isValid || !other.isValid) return false;\n return this.s.equals(other.s) && this.e.equals(other.e);\n } /**\n * Return an Interval representing the intersection of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.\n * Returns null if the intersection is empty, meaning, the intervals don't intersect.\n * @param {Interval} other\n * @return {Interval}\n */ ;\n _proto.intersection = function intersection(other) {\n if (!this.isValid) return this;\n var s = this.s > other.s ? this.s : other.s, e = this.e < other.e ? this.e : other.e;\n if (s >= e) return null;\n else return Interval.fromDateTimes(s, e);\n } /**\n * Return an Interval representing the union of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.\n * @param {Interval} other\n * @return {Interval}\n */ ;\n _proto.union = function union(other) {\n if (!this.isValid) return this;\n var s = this.s < other.s ? this.s : other.s, e = this.e > other.e ? this.e : other.e;\n return Interval.fromDateTimes(s, e);\n } /**\n * Merge an array of Intervals into a equivalent minimal set of Intervals.\n * Combines overlapping and adjacent Intervals.\n * @param {Array} intervals\n * @return {Array}\n */ ;\n Interval.merge = function merge(intervals) {\n var _intervals$sort$reduc = intervals.sort(function(a, b) {\n return a.s - b.s;\n }).reduce(function(_ref2, item) {\n var sofar = _ref2[0], current = _ref2[1];\n if (!current) return [\n sofar,\n item\n ];\n else if (current.overlaps(item) || current.abutsStart(item)) return [\n sofar,\n current.union(item)\n ];\n else return [\n sofar.concat([\n current\n ]),\n item\n ];\n }, [\n [],\n null\n ]), found = _intervals$sort$reduc[0], final = _intervals$sort$reduc[1];\n if (final) found.push(final);\n return found;\n } /**\n * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.\n * @param {Array} intervals\n * @return {Array}\n */ ;\n Interval.xor = function xor(intervals) {\n var _Array$prototype;\n var start = null, currentCount = 0;\n var results = [], ends = intervals.map(function(i) {\n return [\n {\n time: i.s,\n type: \"s\"\n },\n {\n time: i.e,\n type: \"e\"\n }\n ];\n }), flattened = (_Array$prototype = Array.prototype).concat.apply(_Array$prototype, ends), arr = flattened.sort(function(a, b) {\n return a.time - b.time;\n });\n for(var _iterator = $55286cce8d5d6f71$var$_createForOfIteratorHelperLoose(arr), _step; !(_step = _iterator()).done;){\n var i = _step.value;\n currentCount += i.type === \"s\" ? 1 : -1;\n if (currentCount === 1) start = i.time;\n else {\n if (start && +start !== +i.time) results.push(Interval.fromDateTimes(start, i.time));\n start = null;\n }\n }\n return Interval.merge(results);\n } /**\n * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.\n * @param {...Interval} intervals\n * @return {Array}\n */ ;\n _proto.difference = function difference() {\n var _this2 = this;\n for(var _len2 = arguments.length, intervals = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++)intervals[_key2] = arguments[_key2];\n return Interval.xor([\n this\n ].concat(intervals)).map(function(i) {\n return _this2.intersection(i);\n }).filter(function(i) {\n return i && !i.isEmpty();\n });\n } /**\n * Returns a string representation of this Interval appropriate for debugging.\n * @return {string}\n */ ;\n _proto.toString = function toString() {\n if (!this.isValid) return $55286cce8d5d6f71$var$INVALID$1;\n return \"[\" + this.s.toISO() + \" \\u2013 \" + this.e.toISO() + \")\";\n } /**\n * Returns a string representation of this Interval appropriate for the REPL.\n * @return {string}\n */ ;\n _proto[_Symbol$for] = function() {\n if (this.isValid) return \"Interval { start: \" + this.s.toISO() + \", end: \" + this.e.toISO() + \" }\";\n else return \"Interval { Invalid, reason: \" + this.invalidReason + \" }\";\n } /**\n * Returns a localized string representing this Interval. Accepts the same options as the\n * Intl.DateTimeFormat constructor and any presets defined by Luxon, such as\n * {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method\n * is browser-specific, but in general it will return an appropriate representation of the\n * Interval in the assigned locale. Defaults to the system's locale if no locale has been\n * specified.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or\n * Intl.DateTimeFormat constructor options.\n * @param {Object} opts - Options to override the configuration of the start DateTime.\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 – 11/8/2022\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 – 8, 2022\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 7–8 novembre 2022\n * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 – 8:00 PM\n * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p\n * @return {string}\n */ ;\n _proto.toLocaleString = function toLocaleString(formatOpts, opts) {\n if (formatOpts === void 0) formatOpts = $55286cce8d5d6f71$var$DATE_SHORT;\n if (opts === void 0) opts = {};\n return this.isValid ? $55286cce8d5d6f71$var$Formatter.create(this.s.loc.clone(opts), formatOpts).formatInterval(this) : $55286cce8d5d6f71$var$INVALID$1;\n } /**\n * Returns an ISO 8601-compliant string representation of this Interval.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime#toISO}\n * @return {string}\n */ ;\n _proto.toISO = function toISO(opts) {\n if (!this.isValid) return $55286cce8d5d6f71$var$INVALID$1;\n return this.s.toISO(opts) + \"/\" + this.e.toISO(opts);\n } /**\n * Returns an ISO 8601-compliant string representation of date of this Interval.\n * The time components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {string}\n */ ;\n _proto.toISODate = function toISODate() {\n if (!this.isValid) return $55286cce8d5d6f71$var$INVALID$1;\n return this.s.toISODate() + \"/\" + this.e.toISODate();\n } /**\n * Returns an ISO 8601-compliant string representation of time of this Interval.\n * The date components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime#toISO}\n * @return {string}\n */ ;\n _proto.toISOTime = function toISOTime(opts) {\n if (!this.isValid) return $55286cce8d5d6f71$var$INVALID$1;\n return this.s.toISOTime(opts) + \"/\" + this.e.toISOTime(opts);\n } /**\n * Returns a string representation of this Interval formatted according to the specified format\n * string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible\n * formatting tool.\n * @param {string} dateFormat - The format string. This string formats the start and end time.\n * See {@link DateTime#toFormat} for details.\n * @param {Object} opts - Options.\n * @param {string} [opts.separator = ' – '] - A separator to place between the start and end\n * representations.\n * @return {string}\n */ ;\n _proto.toFormat = function toFormat(dateFormat, _temp2) {\n var _ref3 = _temp2 === void 0 ? {} : _temp2, _ref3$separator = _ref3.separator, separator = _ref3$separator === void 0 ? \" \\u2013 \" : _ref3$separator;\n if (!this.isValid) return $55286cce8d5d6f71$var$INVALID$1;\n return \"\" + this.s.toFormat(dateFormat) + separator + this.e.toFormat(dateFormat);\n } /**\n * Return a Duration representing the time spanned by this interval.\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }\n * @return {Duration}\n */ ;\n _proto.toDuration = function toDuration(unit, opts) {\n if (!this.isValid) return $55286cce8d5d6f71$var$Duration.invalid(this.invalidReason);\n return this.e.diff(this.s, unit, opts);\n } /**\n * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes\n * @param {function} mapFn\n * @return {Interval}\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))\n */ ;\n _proto.mapEndpoints = function mapEndpoints(mapFn) {\n return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));\n };\n $55286cce8d5d6f71$var$_createClass(Interval, [\n {\n key: \"start\",\n get: function get() {\n return this.isValid ? this.s : null;\n }\n },\n {\n key: \"end\",\n get: function get() {\n return this.isValid ? this.e : null;\n }\n },\n {\n key: \"isValid\",\n get: function get() {\n return this.invalidReason === null;\n }\n },\n {\n key: \"invalidReason\",\n get: function get() {\n return this.invalid ? this.invalid.reason : null;\n }\n },\n {\n key: \"invalidExplanation\",\n get: function get() {\n return this.invalid ? this.invalid.explanation : null;\n }\n }\n ]);\n return Interval;\n}(Symbol.for(\"nodejs.util.inspect.custom\"));\n/**\n * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment.\n */ var $55286cce8d5d6f71$var$Info = /*#__PURE__*/ function() {\n function Info() {}\n /**\n * Return whether the specified zone contains a DST.\n * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.\n * @return {boolean}\n */ Info.hasDST = function hasDST(zone) {\n if (zone === void 0) zone = $55286cce8d5d6f71$var$Settings.defaultZone;\n var proto = $55286cce8d5d6f71$var$DateTime.now().setZone(zone).set({\n month: 12\n });\n return !zone.isUniversal && proto.offset !== proto.set({\n month: 6\n }).offset;\n } /**\n * Return whether the specified zone is a valid IANA specifier.\n * @param {string} zone - Zone to check\n * @return {boolean}\n */ ;\n Info.isValidIANAZone = function isValidIANAZone(zone) {\n return $55286cce8d5d6f71$var$IANAZone.isValidZone(zone);\n } /**\n * Converts the input into a {@link Zone} instance.\n *\n * * If `input` is already a Zone instance, it is returned unchanged.\n * * If `input` is a string containing a valid time zone name, a Zone instance\n * with that name is returned.\n * * If `input` is a string that doesn't refer to a known time zone, a Zone\n * instance with {@link Zone#isValid} == false is returned.\n * * If `input is a number, a Zone instance with the specified fixed offset\n * in minutes is returned.\n * * If `input` is `null` or `undefined`, the default zone is returned.\n * @param {string|Zone|number} [input] - the value to be converted\n * @return {Zone}\n */ ;\n Info.normalizeZone = function normalizeZone$1(input) {\n return $55286cce8d5d6f71$var$normalizeZone(input, $55286cce8d5d6f71$var$Settings.defaultZone);\n } /**\n * Get the weekday on which the week starts according to the given locale.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number} the start of the week, 1 for Monday through 7 for Sunday\n */ ;\n Info.getStartOfWeek = function getStartOfWeek(_temp) {\n var _ref = _temp === void 0 ? {} : _temp, _ref$locale = _ref.locale, locale = _ref$locale === void 0 ? null : _ref$locale, _ref$locObj = _ref.locObj, locObj = _ref$locObj === void 0 ? null : _ref$locObj;\n return (locObj || $55286cce8d5d6f71$var$Locale.create(locale)).getStartOfWeek();\n } /**\n * Get the minimum number of days necessary in a week before it is considered part of the next year according\n * to the given locale.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number}\n */ ;\n Info.getMinimumDaysInFirstWeek = function getMinimumDaysInFirstWeek(_temp2) {\n var _ref2 = _temp2 === void 0 ? {} : _temp2, _ref2$locale = _ref2.locale, locale = _ref2$locale === void 0 ? null : _ref2$locale, _ref2$locObj = _ref2.locObj, locObj = _ref2$locObj === void 0 ? null : _ref2$locObj;\n return (locObj || $55286cce8d5d6f71$var$Locale.create(locale)).getMinDaysInFirstWeek();\n } /**\n * Get the weekdays, which are considered the weekend according to the given locale\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday\n */ ;\n Info.getWeekendWeekdays = function getWeekendWeekdays(_temp3) {\n var _ref3 = _temp3 === void 0 ? {} : _temp3, _ref3$locale = _ref3.locale, locale = _ref3$locale === void 0 ? null : _ref3$locale, _ref3$locObj = _ref3.locObj, locObj = _ref3$locObj === void 0 ? null : _ref3$locObj;\n // copy the array, because we cache it internally\n return (locObj || $55286cce8d5d6f71$var$Locale.create(locale)).getWeekendDays().slice();\n } /**\n * Return an array of standalone month names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @example Info.months()[0] //=> 'January'\n * @example Info.months('short')[0] //=> 'Jan'\n * @example Info.months('numeric')[0] //=> '1'\n * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'\n * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'\n * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'\n * @return {Array}\n */ ;\n Info.months = function months(length, _temp4) {\n if (length === void 0) length = \"long\";\n var _ref4 = _temp4 === void 0 ? {} : _temp4, _ref4$locale = _ref4.locale, locale = _ref4$locale === void 0 ? null : _ref4$locale, _ref4$numberingSystem = _ref4.numberingSystem, numberingSystem = _ref4$numberingSystem === void 0 ? null : _ref4$numberingSystem, _ref4$locObj = _ref4.locObj, locObj = _ref4$locObj === void 0 ? null : _ref4$locObj, _ref4$outputCalendar = _ref4.outputCalendar, outputCalendar = _ref4$outputCalendar === void 0 ? \"gregory\" : _ref4$outputCalendar;\n return (locObj || $55286cce8d5d6f71$var$Locale.create(locale, numberingSystem, outputCalendar)).months(length);\n } /**\n * Return an array of format month names.\n * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that\n * changes the string.\n * See {@link Info#months}\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @return {Array}\n */ ;\n Info.monthsFormat = function monthsFormat(length, _temp5) {\n if (length === void 0) length = \"long\";\n var _ref5 = _temp5 === void 0 ? {} : _temp5, _ref5$locale = _ref5.locale, locale = _ref5$locale === void 0 ? null : _ref5$locale, _ref5$numberingSystem = _ref5.numberingSystem, numberingSystem = _ref5$numberingSystem === void 0 ? null : _ref5$numberingSystem, _ref5$locObj = _ref5.locObj, locObj = _ref5$locObj === void 0 ? null : _ref5$locObj, _ref5$outputCalendar = _ref5.outputCalendar, outputCalendar = _ref5$outputCalendar === void 0 ? \"gregory\" : _ref5$outputCalendar;\n return (locObj || $55286cce8d5d6f71$var$Locale.create(locale, numberingSystem, outputCalendar)).months(length, true);\n } /**\n * Return an array of standalone week names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @example Info.weekdays()[0] //=> 'Monday'\n * @example Info.weekdays('short')[0] //=> 'Mon'\n * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'\n * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'\n * @return {Array}\n */ ;\n Info.weekdays = function weekdays(length, _temp6) {\n if (length === void 0) length = \"long\";\n var _ref6 = _temp6 === void 0 ? {} : _temp6, _ref6$locale = _ref6.locale, locale = _ref6$locale === void 0 ? null : _ref6$locale, _ref6$numberingSystem = _ref6.numberingSystem, numberingSystem = _ref6$numberingSystem === void 0 ? null : _ref6$numberingSystem, _ref6$locObj = _ref6.locObj, locObj = _ref6$locObj === void 0 ? null : _ref6$locObj;\n return (locObj || $55286cce8d5d6f71$var$Locale.create(locale, numberingSystem, null)).weekdays(length);\n } /**\n * Return an array of format week names.\n * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that\n * changes the string.\n * See {@link Info#weekdays}\n * @param {string} [length='long'] - the length of the month representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale=null] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @return {Array}\n */ ;\n Info.weekdaysFormat = function weekdaysFormat(length, _temp7) {\n if (length === void 0) length = \"long\";\n var _ref7 = _temp7 === void 0 ? {} : _temp7, _ref7$locale = _ref7.locale, locale = _ref7$locale === void 0 ? null : _ref7$locale, _ref7$numberingSystem = _ref7.numberingSystem, numberingSystem = _ref7$numberingSystem === void 0 ? null : _ref7$numberingSystem, _ref7$locObj = _ref7.locObj, locObj = _ref7$locObj === void 0 ? null : _ref7$locObj;\n return (locObj || $55286cce8d5d6f71$var$Locale.create(locale, numberingSystem, null)).weekdays(length, true);\n } /**\n * Return an array of meridiems.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.meridiems() //=> [ 'AM', 'PM' ]\n * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]\n * @return {Array}\n */ ;\n Info.meridiems = function meridiems(_temp8) {\n var _ref8 = _temp8 === void 0 ? {} : _temp8, _ref8$locale = _ref8.locale, locale = _ref8$locale === void 0 ? null : _ref8$locale;\n return $55286cce8d5d6f71$var$Locale.create(locale).meridiems();\n } /**\n * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.\n * @param {string} [length='short'] - the length of the era representation, such as \"short\" or \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.eras() //=> [ 'BC', 'AD' ]\n * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]\n * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]\n * @return {Array}\n */ ;\n Info.eras = function eras(length, _temp9) {\n if (length === void 0) length = \"short\";\n var _ref9 = _temp9 === void 0 ? {} : _temp9, _ref9$locale = _ref9.locale, locale = _ref9$locale === void 0 ? null : _ref9$locale;\n return $55286cce8d5d6f71$var$Locale.create(locale, null, \"gregory\").eras(length);\n } /**\n * Return the set of available features in this environment.\n * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.\n * Keys:\n * * `relative`: whether this environment supports relative time formatting\n * * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale\n * @example Info.features() //=> { relative: false, localeWeek: true }\n * @return {Object}\n */ ;\n Info.features = function features() {\n return {\n relative: $55286cce8d5d6f71$var$hasRelative(),\n localeWeek: $55286cce8d5d6f71$var$hasLocaleWeekInfo()\n };\n };\n return Info;\n}();\nfunction $55286cce8d5d6f71$var$dayDiff(earlier, later) {\n var utcDayStart = function utcDayStart(dt) {\n return dt.toUTC(0, {\n keepLocalTime: true\n }).startOf(\"day\").valueOf();\n }, ms = utcDayStart(later) - utcDayStart(earlier);\n return Math.floor($55286cce8d5d6f71$var$Duration.fromMillis(ms).as(\"days\"));\n}\nfunction $55286cce8d5d6f71$var$highOrderDiffs(cursor, later, units) {\n var differs = [\n [\n \"years\",\n function(a, b) {\n return b.year - a.year;\n }\n ],\n [\n \"quarters\",\n function(a, b) {\n return b.quarter - a.quarter + (b.year - a.year) * 4;\n }\n ],\n [\n \"months\",\n function(a, b) {\n return b.month - a.month + (b.year - a.year) * 12;\n }\n ],\n [\n \"weeks\",\n function(a, b) {\n var days = $55286cce8d5d6f71$var$dayDiff(a, b);\n return (days - days % 7) / 7;\n }\n ],\n [\n \"days\",\n $55286cce8d5d6f71$var$dayDiff\n ]\n ];\n var results = {};\n var earlier = cursor;\n var lowestOrder, highWater;\n /* This loop tries to diff using larger units first.\n If we overshoot, we backtrack and try the next smaller unit.\n \"cursor\" starts out at the earlier timestamp and moves closer and closer to \"later\"\n as we use smaller and smaller units.\n highWater keeps track of where we would be if we added one more of the smallest unit,\n this is used later to potentially convert any difference smaller than the smallest higher order unit\n into a fraction of that smallest higher order unit\n */ for(var _i = 0, _differs = differs; _i < _differs.length; _i++){\n var _differs$_i = _differs[_i], unit = _differs$_i[0], differ = _differs$_i[1];\n if (units.indexOf(unit) >= 0) {\n lowestOrder = unit;\n results[unit] = differ(cursor, later);\n highWater = earlier.plus(results);\n if (highWater > later) {\n // we overshot the end point, backtrack cursor by 1\n results[unit]--;\n cursor = earlier.plus(results);\n // if we are still overshooting now, we need to backtrack again\n // this happens in certain situations when diffing times in different zones,\n // because this calculation ignores time zones\n if (cursor > later) {\n // keep the \"overshot by 1\" around as highWater\n highWater = cursor;\n // backtrack cursor by 1\n results[unit]--;\n cursor = earlier.plus(results);\n }\n } else cursor = highWater;\n }\n }\n return [\n cursor,\n results,\n highWater,\n lowestOrder\n ];\n}\nfunction $55286cce8d5d6f71$var$_diff(earlier, later, units, opts) {\n var _highOrderDiffs = $55286cce8d5d6f71$var$highOrderDiffs(earlier, later, units), cursor = _highOrderDiffs[0], results = _highOrderDiffs[1], highWater = _highOrderDiffs[2], lowestOrder = _highOrderDiffs[3];\n var remainingMillis = later - cursor;\n var lowerOrderUnits = units.filter(function(u) {\n return [\n \"hours\",\n \"minutes\",\n \"seconds\",\n \"milliseconds\"\n ].indexOf(u) >= 0;\n });\n if (lowerOrderUnits.length === 0) {\n if (highWater < later) {\n var _cursor$plus;\n highWater = cursor.plus((_cursor$plus = {}, _cursor$plus[lowestOrder] = 1, _cursor$plus));\n }\n if (highWater !== cursor) results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);\n }\n var duration = $55286cce8d5d6f71$var$Duration.fromObject(results, opts);\n if (lowerOrderUnits.length > 0) {\n var _Duration$fromMillis;\n return (_Duration$fromMillis = $55286cce8d5d6f71$var$Duration.fromMillis(remainingMillis, opts)).shiftTo.apply(_Duration$fromMillis, lowerOrderUnits).plus(duration);\n } else return duration;\n}\nvar $55286cce8d5d6f71$var$numberingSystems = {\n arab: \"[\\u0660-\\u0669]\",\n arabext: \"[\\u06F0-\\u06F9]\",\n bali: \"[\\u1B50-\\u1B59]\",\n beng: \"[\\u09E6-\\u09EF]\",\n deva: \"[\\u0966-\\u096F]\",\n fullwide: \"[\\uFF10-\\uFF19]\",\n gujr: \"[\\u0AE6-\\u0AEF]\",\n hanidec: \"[\\u3007|\\u4E00|\\u4E8C|\\u4E09|\\u56DB|\\u4E94|\\u516D|\\u4E03|\\u516B|\\u4E5D]\",\n khmr: \"[\\u17E0-\\u17E9]\",\n knda: \"[\\u0CE6-\\u0CEF]\",\n laoo: \"[\\u0ED0-\\u0ED9]\",\n limb: \"[\\u1946-\\u194F]\",\n mlym: \"[\\u0D66-\\u0D6F]\",\n mong: \"[\\u1810-\\u1819]\",\n mymr: \"[\\u1040-\\u1049]\",\n orya: \"[\\u0B66-\\u0B6F]\",\n tamldec: \"[\\u0BE6-\\u0BEF]\",\n telu: \"[\\u0C66-\\u0C6F]\",\n thai: \"[\\u0E50-\\u0E59]\",\n tibt: \"[\\u0F20-\\u0F29]\",\n latn: \"\\\\d\"\n};\nvar $55286cce8d5d6f71$var$numberingSystemsUTF16 = {\n arab: [\n 1632,\n 1641\n ],\n arabext: [\n 1776,\n 1785\n ],\n bali: [\n 6992,\n 7001\n ],\n beng: [\n 2534,\n 2543\n ],\n deva: [\n 2406,\n 2415\n ],\n fullwide: [\n 65296,\n 65303\n ],\n gujr: [\n 2790,\n 2799\n ],\n khmr: [\n 6112,\n 6121\n ],\n knda: [\n 3302,\n 3311\n ],\n laoo: [\n 3792,\n 3801\n ],\n limb: [\n 6470,\n 6479\n ],\n mlym: [\n 3430,\n 3439\n ],\n mong: [\n 6160,\n 6169\n ],\n mymr: [\n 4160,\n 4169\n ],\n orya: [\n 2918,\n 2927\n ],\n tamldec: [\n 3046,\n 3055\n ],\n telu: [\n 3174,\n 3183\n ],\n thai: [\n 3664,\n 3673\n ],\n tibt: [\n 3872,\n 3881\n ]\n};\nvar $55286cce8d5d6f71$var$hanidecChars = $55286cce8d5d6f71$var$numberingSystems.hanidec.replace(/[\\[|\\]]/g, \"\").split(\"\");\nfunction $55286cce8d5d6f71$var$parseDigits(str) {\n var value = parseInt(str, 10);\n if (isNaN(value)) {\n value = \"\";\n for(var i = 0; i < str.length; i++){\n var code = str.charCodeAt(i);\n if (str[i].search($55286cce8d5d6f71$var$numberingSystems.hanidec) !== -1) value += $55286cce8d5d6f71$var$hanidecChars.indexOf(str[i]);\n else for(var key in $55286cce8d5d6f71$var$numberingSystemsUTF16){\n var _numberingSystemsUTF = $55286cce8d5d6f71$var$numberingSystemsUTF16[key], min = _numberingSystemsUTF[0], max = _numberingSystemsUTF[1];\n if (code >= min && code <= max) value += code - min;\n }\n }\n return parseInt(value, 10);\n } else return value;\n}\nfunction $55286cce8d5d6f71$var$digitRegex(_ref, append) {\n var numberingSystem = _ref.numberingSystem;\n if (append === void 0) append = \"\";\n return new RegExp(\"\" + $55286cce8d5d6f71$var$numberingSystems[numberingSystem || \"latn\"] + append);\n}\nvar $55286cce8d5d6f71$var$MISSING_FTP = \"missing Intl.DateTimeFormat.formatToParts support\";\nfunction $55286cce8d5d6f71$var$intUnit(regex, post) {\n if (post === void 0) post = function post(i) {\n return i;\n };\n return {\n regex: regex,\n deser: function deser(_ref) {\n var s = _ref[0];\n return post($55286cce8d5d6f71$var$parseDigits(s));\n }\n };\n}\nvar $55286cce8d5d6f71$var$NBSP = String.fromCharCode(160);\nvar $55286cce8d5d6f71$var$spaceOrNBSP = \"[ \" + $55286cce8d5d6f71$var$NBSP + \"]\";\nvar $55286cce8d5d6f71$var$spaceOrNBSPRegExp = new RegExp($55286cce8d5d6f71$var$spaceOrNBSP, \"g\");\nfunction $55286cce8d5d6f71$var$fixListRegex(s) {\n // make dots optional and also make them literal\n // make space and non breakable space characters interchangeable\n return s.replace(/\\./g, \"\\\\.?\").replace($55286cce8d5d6f71$var$spaceOrNBSPRegExp, $55286cce8d5d6f71$var$spaceOrNBSP);\n}\nfunction $55286cce8d5d6f71$var$stripInsensitivities(s) {\n return s.replace(/\\./g, \"\") // ignore dots that were made optional\n .replace($55286cce8d5d6f71$var$spaceOrNBSPRegExp, \" \") // interchange space and nbsp\n .toLowerCase();\n}\nfunction $55286cce8d5d6f71$var$oneOf(strings, startIndex) {\n if (strings === null) return null;\n else return {\n regex: RegExp(strings.map($55286cce8d5d6f71$var$fixListRegex).join(\"|\")),\n deser: function deser(_ref2) {\n var s = _ref2[0];\n return strings.findIndex(function(i) {\n return $55286cce8d5d6f71$var$stripInsensitivities(s) === $55286cce8d5d6f71$var$stripInsensitivities(i);\n }) + startIndex;\n }\n };\n}\nfunction $55286cce8d5d6f71$var$offset(regex, groups) {\n return {\n regex: regex,\n deser: function deser(_ref3) {\n var h = _ref3[1], m = _ref3[2];\n return $55286cce8d5d6f71$var$signedOffset(h, m);\n },\n groups: groups\n };\n}\nfunction $55286cce8d5d6f71$var$simple(regex) {\n return {\n regex: regex,\n deser: function deser(_ref4) {\n var s = _ref4[0];\n return s;\n }\n };\n}\nfunction $55286cce8d5d6f71$var$escapeToken(value) {\n return value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n}\n/**\n * @param token\n * @param {Locale} loc\n */ function $55286cce8d5d6f71$var$unitForToken(token, loc) {\n var one = $55286cce8d5d6f71$var$digitRegex(loc), two = $55286cce8d5d6f71$var$digitRegex(loc, \"{2}\"), three = $55286cce8d5d6f71$var$digitRegex(loc, \"{3}\"), four = $55286cce8d5d6f71$var$digitRegex(loc, \"{4}\"), six = $55286cce8d5d6f71$var$digitRegex(loc, \"{6}\"), oneOrTwo = $55286cce8d5d6f71$var$digitRegex(loc, \"{1,2}\"), oneToThree = $55286cce8d5d6f71$var$digitRegex(loc, \"{1,3}\"), oneToSix = $55286cce8d5d6f71$var$digitRegex(loc, \"{1,6}\"), oneToNine = $55286cce8d5d6f71$var$digitRegex(loc, \"{1,9}\"), twoToFour = $55286cce8d5d6f71$var$digitRegex(loc, \"{2,4}\"), fourToSix = $55286cce8d5d6f71$var$digitRegex(loc, \"{4,6}\"), literal = function literal(t) {\n return {\n regex: RegExp($55286cce8d5d6f71$var$escapeToken(t.val)),\n deser: function deser(_ref5) {\n var s = _ref5[0];\n return s;\n },\n literal: true\n };\n }, unitate = function unitate(t) {\n if (token.literal) return literal(t);\n switch(t.val){\n // era\n case \"G\":\n return $55286cce8d5d6f71$var$oneOf(loc.eras(\"short\"), 0);\n case \"GG\":\n return $55286cce8d5d6f71$var$oneOf(loc.eras(\"long\"), 0);\n // years\n case \"y\":\n return $55286cce8d5d6f71$var$intUnit(oneToSix);\n case \"yy\":\n return $55286cce8d5d6f71$var$intUnit(twoToFour, $55286cce8d5d6f71$var$untruncateYear);\n case \"yyyy\":\n return $55286cce8d5d6f71$var$intUnit(four);\n case \"yyyyy\":\n return $55286cce8d5d6f71$var$intUnit(fourToSix);\n case \"yyyyyy\":\n return $55286cce8d5d6f71$var$intUnit(six);\n // months\n case \"M\":\n return $55286cce8d5d6f71$var$intUnit(oneOrTwo);\n case \"MM\":\n return $55286cce8d5d6f71$var$intUnit(two);\n case \"MMM\":\n return $55286cce8d5d6f71$var$oneOf(loc.months(\"short\", true), 1);\n case \"MMMM\":\n return $55286cce8d5d6f71$var$oneOf(loc.months(\"long\", true), 1);\n case \"L\":\n return $55286cce8d5d6f71$var$intUnit(oneOrTwo);\n case \"LL\":\n return $55286cce8d5d6f71$var$intUnit(two);\n case \"LLL\":\n return $55286cce8d5d6f71$var$oneOf(loc.months(\"short\", false), 1);\n case \"LLLL\":\n return $55286cce8d5d6f71$var$oneOf(loc.months(\"long\", false), 1);\n // dates\n case \"d\":\n return $55286cce8d5d6f71$var$intUnit(oneOrTwo);\n case \"dd\":\n return $55286cce8d5d6f71$var$intUnit(two);\n // ordinals\n case \"o\":\n return $55286cce8d5d6f71$var$intUnit(oneToThree);\n case \"ooo\":\n return $55286cce8d5d6f71$var$intUnit(three);\n // time\n case \"HH\":\n return $55286cce8d5d6f71$var$intUnit(two);\n case \"H\":\n return $55286cce8d5d6f71$var$intUnit(oneOrTwo);\n case \"hh\":\n return $55286cce8d5d6f71$var$intUnit(two);\n case \"h\":\n return $55286cce8d5d6f71$var$intUnit(oneOrTwo);\n case \"mm\":\n return $55286cce8d5d6f71$var$intUnit(two);\n case \"m\":\n return $55286cce8d5d6f71$var$intUnit(oneOrTwo);\n case \"q\":\n return $55286cce8d5d6f71$var$intUnit(oneOrTwo);\n case \"qq\":\n return $55286cce8d5d6f71$var$intUnit(two);\n case \"s\":\n return $55286cce8d5d6f71$var$intUnit(oneOrTwo);\n case \"ss\":\n return $55286cce8d5d6f71$var$intUnit(two);\n case \"S\":\n return $55286cce8d5d6f71$var$intUnit(oneToThree);\n case \"SSS\":\n return $55286cce8d5d6f71$var$intUnit(three);\n case \"u\":\n return $55286cce8d5d6f71$var$simple(oneToNine);\n case \"uu\":\n return $55286cce8d5d6f71$var$simple(oneOrTwo);\n case \"uuu\":\n return $55286cce8d5d6f71$var$intUnit(one);\n // meridiem\n case \"a\":\n return $55286cce8d5d6f71$var$oneOf(loc.meridiems(), 0);\n // weekYear (k)\n case \"kkkk\":\n return $55286cce8d5d6f71$var$intUnit(four);\n case \"kk\":\n return $55286cce8d5d6f71$var$intUnit(twoToFour, $55286cce8d5d6f71$var$untruncateYear);\n // weekNumber (W)\n case \"W\":\n return $55286cce8d5d6f71$var$intUnit(oneOrTwo);\n case \"WW\":\n return $55286cce8d5d6f71$var$intUnit(two);\n // weekdays\n case \"E\":\n case \"c\":\n return $55286cce8d5d6f71$var$intUnit(one);\n case \"EEE\":\n return $55286cce8d5d6f71$var$oneOf(loc.weekdays(\"short\", false), 1);\n case \"EEEE\":\n return $55286cce8d5d6f71$var$oneOf(loc.weekdays(\"long\", false), 1);\n case \"ccc\":\n return $55286cce8d5d6f71$var$oneOf(loc.weekdays(\"short\", true), 1);\n case \"cccc\":\n return $55286cce8d5d6f71$var$oneOf(loc.weekdays(\"long\", true), 1);\n // offset/zone\n case \"Z\":\n case \"ZZ\":\n return $55286cce8d5d6f71$var$offset(new RegExp(\"([+-]\" + oneOrTwo.source + \")(?::(\" + two.source + \"))?\"), 2);\n case \"ZZZ\":\n return $55286cce8d5d6f71$var$offset(new RegExp(\"([+-]\" + oneOrTwo.source + \")(\" + two.source + \")?\"), 2);\n // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing\n // because we don't have any way to figure out what they are\n case \"z\":\n return $55286cce8d5d6f71$var$simple(/[a-z_+-/]{1,256}?/i);\n // this special-case \"token\" represents a place where a macro-token expanded into a white-space literal\n // in this case we accept any non-newline white-space\n case \" \":\n return $55286cce8d5d6f71$var$simple(/[^\\S\\n\\r]/);\n default:\n return literal(t);\n }\n };\n var unit = unitate(token) || {\n invalidReason: $55286cce8d5d6f71$var$MISSING_FTP\n };\n unit.token = token;\n return unit;\n}\nvar $55286cce8d5d6f71$var$partTypeStyleToTokenVal = {\n year: {\n \"2-digit\": \"yy\",\n numeric: \"yyyyy\"\n },\n month: {\n numeric: \"M\",\n \"2-digit\": \"MM\",\n short: \"MMM\",\n long: \"MMMM\"\n },\n day: {\n numeric: \"d\",\n \"2-digit\": \"dd\"\n },\n weekday: {\n short: \"EEE\",\n long: \"EEEE\"\n },\n dayperiod: \"a\",\n dayPeriod: \"a\",\n hour12: {\n numeric: \"h\",\n \"2-digit\": \"hh\"\n },\n hour24: {\n numeric: \"H\",\n \"2-digit\": \"HH\"\n },\n minute: {\n numeric: \"m\",\n \"2-digit\": \"mm\"\n },\n second: {\n numeric: \"s\",\n \"2-digit\": \"ss\"\n },\n timeZoneName: {\n long: \"ZZZZZ\",\n short: \"ZZZ\"\n }\n};\nfunction $55286cce8d5d6f71$var$tokenForPart(part, formatOpts, resolvedOpts) {\n var type = part.type, value = part.value;\n if (type === \"literal\") {\n var isSpace = /^\\s+$/.test(value);\n return {\n literal: !isSpace,\n val: isSpace ? \" \" : value\n };\n }\n var style = formatOpts[type];\n // The user might have explicitly specified hour12 or hourCycle\n // if so, respect their decision\n // if not, refer back to the resolvedOpts, which are based on the locale\n var actualType = type;\n if (type === \"hour\") {\n if (formatOpts.hour12 != null) actualType = formatOpts.hour12 ? \"hour12\" : \"hour24\";\n else if (formatOpts.hourCycle != null) {\n if (formatOpts.hourCycle === \"h11\" || formatOpts.hourCycle === \"h12\") actualType = \"hour12\";\n else actualType = \"hour24\";\n } else // tokens only differentiate between 24 hours or not,\n // so we do not need to check hourCycle here, which is less supported anyways\n actualType = resolvedOpts.hour12 ? \"hour12\" : \"hour24\";\n }\n var val = $55286cce8d5d6f71$var$partTypeStyleToTokenVal[actualType];\n if (typeof val === \"object\") val = val[style];\n if (val) return {\n literal: false,\n val: val\n };\n return undefined;\n}\nfunction $55286cce8d5d6f71$var$buildRegex(units) {\n var re = units.map(function(u) {\n return u.regex;\n }).reduce(function(f, r) {\n return f + \"(\" + r.source + \")\";\n }, \"\");\n return [\n \"^\" + re + \"$\",\n units\n ];\n}\nfunction $55286cce8d5d6f71$var$match(input, regex, handlers) {\n var matches = input.match(regex);\n if (matches) {\n var all = {};\n var matchIndex = 1;\n for(var i in handlers)if ($55286cce8d5d6f71$var$hasOwnProperty(handlers, i)) {\n var h = handlers[i], groups = h.groups ? h.groups + 1 : 1;\n if (!h.literal && h.token) all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups));\n matchIndex += groups;\n }\n return [\n matches,\n all\n ];\n } else return [\n matches,\n {}\n ];\n}\nfunction $55286cce8d5d6f71$var$dateTimeFromMatches(matches) {\n var toField = function toField(token) {\n switch(token){\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n case \"H\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"o\":\n return \"ordinal\";\n case \"L\":\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n case \"E\":\n case \"c\":\n return \"weekday\";\n case \"W\":\n return \"weekNumber\";\n case \"k\":\n return \"weekYear\";\n case \"q\":\n return \"quarter\";\n default:\n return null;\n }\n };\n var zone = null;\n var specificOffset;\n if (!$55286cce8d5d6f71$var$isUndefined(matches.z)) zone = $55286cce8d5d6f71$var$IANAZone.create(matches.z);\n if (!$55286cce8d5d6f71$var$isUndefined(matches.Z)) {\n if (!zone) zone = new $55286cce8d5d6f71$var$FixedOffsetZone(matches.Z);\n specificOffset = matches.Z;\n }\n if (!$55286cce8d5d6f71$var$isUndefined(matches.q)) matches.M = (matches.q - 1) * 3 + 1;\n if (!$55286cce8d5d6f71$var$isUndefined(matches.h)) {\n if (matches.h < 12 && matches.a === 1) matches.h += 12;\n else if (matches.h === 12 && matches.a === 0) matches.h = 0;\n }\n if (matches.G === 0 && matches.y) matches.y = -matches.y;\n if (!$55286cce8d5d6f71$var$isUndefined(matches.u)) matches.S = $55286cce8d5d6f71$var$parseMillis(matches.u);\n var vals = Object.keys(matches).reduce(function(r, k) {\n var f = toField(k);\n if (f) r[f] = matches[k];\n return r;\n }, {});\n return [\n vals,\n zone,\n specificOffset\n ];\n}\nvar $55286cce8d5d6f71$var$dummyDateTimeCache = null;\nfunction $55286cce8d5d6f71$var$getDummyDateTime() {\n if (!$55286cce8d5d6f71$var$dummyDateTimeCache) $55286cce8d5d6f71$var$dummyDateTimeCache = $55286cce8d5d6f71$var$DateTime.fromMillis(1555555555555);\n return $55286cce8d5d6f71$var$dummyDateTimeCache;\n}\nfunction $55286cce8d5d6f71$var$maybeExpandMacroToken(token, locale) {\n if (token.literal) return token;\n var formatOpts = $55286cce8d5d6f71$var$Formatter.macroTokenToFormatOpts(token.val);\n var tokens = $55286cce8d5d6f71$var$formatOptsToTokens(formatOpts, locale);\n if (tokens == null || tokens.includes(undefined)) return token;\n return tokens;\n}\nfunction $55286cce8d5d6f71$var$expandMacroTokens(tokens, locale) {\n var _Array$prototype;\n return (_Array$prototype = Array.prototype).concat.apply(_Array$prototype, tokens.map(function(t) {\n return $55286cce8d5d6f71$var$maybeExpandMacroToken(t, locale);\n }));\n}\n/**\n * @private\n */ function $55286cce8d5d6f71$var$explainFromTokens(locale, input, format) {\n var tokens = $55286cce8d5d6f71$var$expandMacroTokens($55286cce8d5d6f71$var$Formatter.parseFormat(format), locale), units = tokens.map(function(t) {\n return $55286cce8d5d6f71$var$unitForToken(t, locale);\n }), disqualifyingUnit = units.find(function(t) {\n return t.invalidReason;\n });\n if (disqualifyingUnit) return {\n input: input,\n tokens: tokens,\n invalidReason: disqualifyingUnit.invalidReason\n };\n else {\n var _buildRegex = $55286cce8d5d6f71$var$buildRegex(units), regexString = _buildRegex[0], handlers = _buildRegex[1], regex = RegExp(regexString, \"i\"), _match = $55286cce8d5d6f71$var$match(input, regex, handlers), rawMatches = _match[0], matches = _match[1], _ref6 = matches ? $55286cce8d5d6f71$var$dateTimeFromMatches(matches) : [\n null,\n null,\n undefined\n ], result = _ref6[0], zone = _ref6[1], specificOffset = _ref6[2];\n if ($55286cce8d5d6f71$var$hasOwnProperty(matches, \"a\") && $55286cce8d5d6f71$var$hasOwnProperty(matches, \"H\")) throw new $55286cce8d5d6f71$var$ConflictingSpecificationError(\"Can't include meridiem when specifying 24-hour format\");\n return {\n input: input,\n tokens: tokens,\n regex: regex,\n rawMatches: rawMatches,\n matches: matches,\n result: result,\n zone: zone,\n specificOffset: specificOffset\n };\n }\n}\nfunction $55286cce8d5d6f71$var$parseFromTokens(locale, input, format) {\n var _explainFromTokens = $55286cce8d5d6f71$var$explainFromTokens(locale, input, format), result = _explainFromTokens.result, zone = _explainFromTokens.zone, specificOffset = _explainFromTokens.specificOffset, invalidReason = _explainFromTokens.invalidReason;\n return [\n result,\n zone,\n specificOffset,\n invalidReason\n ];\n}\nfunction $55286cce8d5d6f71$var$formatOptsToTokens(formatOpts, locale) {\n if (!formatOpts) return null;\n var formatter = $55286cce8d5d6f71$var$Formatter.create(locale, formatOpts);\n var df = formatter.dtFormatter($55286cce8d5d6f71$var$getDummyDateTime());\n var parts = df.formatToParts();\n var resolvedOpts = df.resolvedOptions();\n return parts.map(function(p) {\n return $55286cce8d5d6f71$var$tokenForPart(p, formatOpts, resolvedOpts);\n });\n}\nvar $55286cce8d5d6f71$var$INVALID = \"Invalid DateTime\";\nvar $55286cce8d5d6f71$var$MAX_DATE = 8.64e15;\nfunction $55286cce8d5d6f71$var$unsupportedZone(zone) {\n return new $55286cce8d5d6f71$var$Invalid(\"unsupported zone\", 'the zone \"' + zone.name + '\" is not supported');\n}\n// we cache week data on the DT object and this intermediates the cache\n/**\n * @param {DateTime} dt\n */ function $55286cce8d5d6f71$var$possiblyCachedWeekData(dt) {\n if (dt.weekData === null) dt.weekData = $55286cce8d5d6f71$var$gregorianToWeek(dt.c);\n return dt.weekData;\n}\n/**\n * @param {DateTime} dt\n */ function $55286cce8d5d6f71$var$possiblyCachedLocalWeekData(dt) {\n if (dt.localWeekData === null) dt.localWeekData = $55286cce8d5d6f71$var$gregorianToWeek(dt.c, dt.loc.getMinDaysInFirstWeek(), dt.loc.getStartOfWeek());\n return dt.localWeekData;\n}\n// clone really means, \"make a new object with these modifications\". all \"setters\" really use this\n// to create a new object while only changing some of the properties\nfunction $55286cce8d5d6f71$var$clone(inst, alts) {\n var current = {\n ts: inst.ts,\n zone: inst.zone,\n c: inst.c,\n o: inst.o,\n loc: inst.loc,\n invalid: inst.invalid\n };\n return new $55286cce8d5d6f71$var$DateTime($55286cce8d5d6f71$var$_extends({}, current, alts, {\n old: current\n }));\n}\n// find the right offset a given local time. The o input is our guess, which determines which\n// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)\nfunction $55286cce8d5d6f71$var$fixOffset(localTS, o, tz) {\n // Our UTC time is just a guess because our offset is just a guess\n var utcGuess = localTS - o * 60000;\n // Test whether the zone matches the offset for this ts\n var o2 = tz.offset(utcGuess);\n // If so, offset didn't change and we're done\n if (o === o2) return [\n utcGuess,\n o\n ];\n // If not, change the ts by the difference in the offset\n utcGuess -= (o2 - o) * 60000;\n // If that gives us the local time we want, we're done\n var o3 = tz.offset(utcGuess);\n if (o2 === o3) return [\n utcGuess,\n o2\n ];\n // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n return [\n localTS - Math.min(o2, o3) * 60000,\n Math.max(o2, o3)\n ];\n}\n// convert an epoch timestamp into a calendar object with the given offset\nfunction $55286cce8d5d6f71$var$tsToObj(ts, offset) {\n ts += offset * 60000;\n var d = new Date(ts);\n return {\n year: d.getUTCFullYear(),\n month: d.getUTCMonth() + 1,\n day: d.getUTCDate(),\n hour: d.getUTCHours(),\n minute: d.getUTCMinutes(),\n second: d.getUTCSeconds(),\n millisecond: d.getUTCMilliseconds()\n };\n}\n// convert a calendar object to a epoch timestamp\nfunction $55286cce8d5d6f71$var$objToTS(obj, offset, zone) {\n return $55286cce8d5d6f71$var$fixOffset($55286cce8d5d6f71$var$objToLocalTS(obj), offset, zone);\n}\n// create a new DT instance by adding a duration, adjusting for DSTs\nfunction $55286cce8d5d6f71$var$adjustTime(inst, dur) {\n var oPre = inst.o, year = inst.c.year + Math.trunc(dur.years), month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, c = $55286cce8d5d6f71$var$_extends({}, inst.c, {\n year: year,\n month: month,\n day: Math.min(inst.c.day, $55286cce8d5d6f71$var$daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7\n }), millisToAdd = $55286cce8d5d6f71$var$Duration.fromObject({\n years: dur.years - Math.trunc(dur.years),\n quarters: dur.quarters - Math.trunc(dur.quarters),\n months: dur.months - Math.trunc(dur.months),\n weeks: dur.weeks - Math.trunc(dur.weeks),\n days: dur.days - Math.trunc(dur.days),\n hours: dur.hours,\n minutes: dur.minutes,\n seconds: dur.seconds,\n milliseconds: dur.milliseconds\n }).as(\"milliseconds\"), localTS = $55286cce8d5d6f71$var$objToLocalTS(c);\n var _fixOffset = $55286cce8d5d6f71$var$fixOffset(localTS, oPre, inst.zone), ts = _fixOffset[0], o = _fixOffset[1];\n if (millisToAdd !== 0) {\n ts += millisToAdd;\n // that could have changed the offset by going over a DST, but we want to keep the ts the same\n o = inst.zone.offset(ts);\n }\n return {\n ts: ts,\n o: o\n };\n}\n// helper useful in turning the results of parsing into real dates\n// by handling the zone options\nfunction $55286cce8d5d6f71$var$parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {\n var setZone = opts.setZone, zone = opts.zone;\n if (parsed && Object.keys(parsed).length !== 0 || parsedZone) {\n var interpretationZone = parsedZone || zone, inst = $55286cce8d5d6f71$var$DateTime.fromObject(parsed, $55286cce8d5d6f71$var$_extends({}, opts, {\n zone: interpretationZone,\n specificOffset: specificOffset\n }));\n return setZone ? inst : inst.setZone(zone);\n } else return $55286cce8d5d6f71$var$DateTime.invalid(new $55286cce8d5d6f71$var$Invalid(\"unparsable\", 'the input \"' + text + \"\\\" can't be parsed as \" + format));\n}\n// if you want to output a technical format (e.g. RFC 2822), this helper\n// helps handle the details\nfunction $55286cce8d5d6f71$var$toTechFormat(dt, format, allowZ) {\n if (allowZ === void 0) allowZ = true;\n return dt.isValid ? $55286cce8d5d6f71$var$Formatter.create($55286cce8d5d6f71$var$Locale.create(\"en-US\"), {\n allowZ: allowZ,\n forceSimple: true\n }).formatDateTimeFromString(dt, format) : null;\n}\nfunction $55286cce8d5d6f71$var$_toISODate(o, extended) {\n var longFormat = o.c.year > 9999 || o.c.year < 0;\n var c = \"\";\n if (longFormat && o.c.year >= 0) c += \"+\";\n c += $55286cce8d5d6f71$var$padStart(o.c.year, longFormat ? 6 : 4);\n if (extended) {\n c += \"-\";\n c += $55286cce8d5d6f71$var$padStart(o.c.month);\n c += \"-\";\n c += $55286cce8d5d6f71$var$padStart(o.c.day);\n } else {\n c += $55286cce8d5d6f71$var$padStart(o.c.month);\n c += $55286cce8d5d6f71$var$padStart(o.c.day);\n }\n return c;\n}\nfunction $55286cce8d5d6f71$var$_toISOTime(o, extended, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone) {\n var c = $55286cce8d5d6f71$var$padStart(o.c.hour);\n if (extended) {\n c += \":\";\n c += $55286cce8d5d6f71$var$padStart(o.c.minute);\n if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) c += \":\";\n } else c += $55286cce8d5d6f71$var$padStart(o.c.minute);\n if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) {\n c += $55286cce8d5d6f71$var$padStart(o.c.second);\n if (o.c.millisecond !== 0 || !suppressMilliseconds) {\n c += \".\";\n c += $55286cce8d5d6f71$var$padStart(o.c.millisecond, 3);\n }\n }\n if (includeOffset) {\n if (o.isOffsetFixed && o.offset === 0 && !extendedZone) c += \"Z\";\n else if (o.o < 0) {\n c += \"-\";\n c += $55286cce8d5d6f71$var$padStart(Math.trunc(-o.o / 60));\n c += \":\";\n c += $55286cce8d5d6f71$var$padStart(Math.trunc(-o.o % 60));\n } else {\n c += \"+\";\n c += $55286cce8d5d6f71$var$padStart(Math.trunc(o.o / 60));\n c += \":\";\n c += $55286cce8d5d6f71$var$padStart(Math.trunc(o.o % 60));\n }\n }\n if (extendedZone) c += \"[\" + o.zone.ianaName + \"]\";\n return c;\n}\n// defaults for unspecified units in the supported calendars\nvar $55286cce8d5d6f71$var$defaultUnitValues = {\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n}, $55286cce8d5d6f71$var$defaultWeekUnitValues = {\n weekNumber: 1,\n weekday: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n}, $55286cce8d5d6f71$var$defaultOrdinalUnitValues = {\n ordinal: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n};\n// Units in the supported calendars, sorted by bigness\nvar $55286cce8d5d6f71$var$orderedUnits = [\n \"year\",\n \"month\",\n \"day\",\n \"hour\",\n \"minute\",\n \"second\",\n \"millisecond\"\n], $55286cce8d5d6f71$var$orderedWeekUnits = [\n \"weekYear\",\n \"weekNumber\",\n \"weekday\",\n \"hour\",\n \"minute\",\n \"second\",\n \"millisecond\"\n], $55286cce8d5d6f71$var$orderedOrdinalUnits = [\n \"year\",\n \"ordinal\",\n \"hour\",\n \"minute\",\n \"second\",\n \"millisecond\"\n];\n// standardize case and plurality in units\nfunction $55286cce8d5d6f71$var$normalizeUnit(unit) {\n var normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit.toLowerCase()];\n if (!normalized) throw new $55286cce8d5d6f71$var$InvalidUnitError(unit);\n return normalized;\n}\nfunction $55286cce8d5d6f71$var$normalizeUnitWithLocalWeeks(unit) {\n switch(unit.toLowerCase()){\n case \"localweekday\":\n case \"localweekdays\":\n return \"localWeekday\";\n case \"localweeknumber\":\n case \"localweeknumbers\":\n return \"localWeekNumber\";\n case \"localweekyear\":\n case \"localweekyears\":\n return \"localWeekYear\";\n default:\n return $55286cce8d5d6f71$var$normalizeUnit(unit);\n }\n}\n// this is a dumbed down version of fromObject() that runs about 60% faster\n// but doesn't do any validation, makes a bunch of assumptions about what units\n// are present, and so on.\nfunction $55286cce8d5d6f71$var$quickDT(obj, opts) {\n var zone = $55286cce8d5d6f71$var$normalizeZone(opts.zone, $55286cce8d5d6f71$var$Settings.defaultZone), loc = $55286cce8d5d6f71$var$Locale.fromObject(opts), tsNow = $55286cce8d5d6f71$var$Settings.now();\n var ts, o;\n // assume we have the higher-order units\n if (!$55286cce8d5d6f71$var$isUndefined(obj.year)) {\n for(var _i = 0, _orderedUnits = $55286cce8d5d6f71$var$orderedUnits; _i < _orderedUnits.length; _i++){\n var u = _orderedUnits[_i];\n if ($55286cce8d5d6f71$var$isUndefined(obj[u])) obj[u] = $55286cce8d5d6f71$var$defaultUnitValues[u];\n }\n var invalid = $55286cce8d5d6f71$var$hasInvalidGregorianData(obj) || $55286cce8d5d6f71$var$hasInvalidTimeData(obj);\n if (invalid) return $55286cce8d5d6f71$var$DateTime.invalid(invalid);\n var offsetProvis = zone.offset(tsNow);\n var _objToTS = $55286cce8d5d6f71$var$objToTS(obj, offsetProvis, zone);\n ts = _objToTS[0];\n o = _objToTS[1];\n } else ts = tsNow;\n return new $55286cce8d5d6f71$var$DateTime({\n ts: ts,\n zone: zone,\n loc: loc,\n o: o\n });\n}\nfunction $55286cce8d5d6f71$var$diffRelative(start, end, opts) {\n var round = $55286cce8d5d6f71$var$isUndefined(opts.round) ? true : opts.round, format = function format(c, unit) {\n c = $55286cce8d5d6f71$var$roundTo(c, round || opts.calendary ? 0 : 2, true);\n var formatter = end.loc.clone(opts).relFormatter(opts);\n return formatter.format(c, unit);\n }, differ = function differ(unit) {\n if (opts.calendary) {\n if (!end.hasSame(start, unit)) return end.startOf(unit).diff(start.startOf(unit), unit).get(unit);\n else return 0;\n } else return end.diff(start, unit).get(unit);\n };\n if (opts.unit) return format(differ(opts.unit), opts.unit);\n for(var _iterator = $55286cce8d5d6f71$var$_createForOfIteratorHelperLoose(opts.units), _step; !(_step = _iterator()).done;){\n var unit = _step.value;\n var count = differ(unit);\n if (Math.abs(count) >= 1) return format(count, unit);\n }\n return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]);\n}\nfunction $55286cce8d5d6f71$var$lastOpts(argList) {\n var opts = {}, args;\n if (argList.length > 0 && typeof argList[argList.length - 1] === \"object\") {\n opts = argList[argList.length - 1];\n args = Array.from(argList).slice(0, argList.length - 1);\n } else args = Array.from(argList);\n return [\n opts,\n args\n ];\n}\n/**\n * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them.\n *\n * A DateTime comprises of:\n * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch.\n * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone).\n * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`.\n *\n * Here is a brief overview of the most commonly used functionality it provides:\n *\n * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link DateTime.local}, {@link DateTime.utc}, and (most flexibly) {@link DateTime.fromObject}. To create one from a standard string format, use {@link DateTime.fromISO}, {@link DateTime.fromHTTP}, and {@link DateTime.fromRFC2822}. To create one from a custom string format, use {@link DateTime.fromFormat}. To create one from a native JS date, use {@link DateTime.fromJSDate}.\n * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link DateTime#toObject}), use the {@link DateTime#year}, {@link DateTime#month},\n * {@link DateTime#day}, {@link DateTime#hour}, {@link DateTime#minute}, {@link DateTime#second}, {@link DateTime#millisecond} accessors.\n * * **Week calendar**: For ISO week calendar attributes, see the {@link DateTime#weekYear}, {@link DateTime#weekNumber}, and {@link DateTime#weekday} accessors.\n * * **Configuration** See the {@link DateTime#locale} and {@link DateTime#numberingSystem} accessors.\n * * **Transformation**: To transform the DateTime into other DateTimes, use {@link DateTime#set}, {@link DateTime#reconfigure}, {@link DateTime#setZone}, {@link DateTime#setLocale}, {@link DateTime.plus}, {@link DateTime#minus}, {@link DateTime#endOf}, {@link DateTime#startOf}, {@link DateTime#toUTC}, and {@link DateTime#toLocal}.\n * * **Output**: To convert the DateTime to other representations, use the {@link DateTime#toRelative}, {@link DateTime#toRelativeCalendar}, {@link DateTime#toJSON}, {@link DateTime#toISO}, {@link DateTime#toHTTP}, {@link DateTime#toObject}, {@link DateTime#toRFC2822}, {@link DateTime#toString}, {@link DateTime#toLocaleString}, {@link DateTime#toFormat}, {@link DateTime#toMillis} and {@link DateTime#toJSDate}.\n *\n * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation.\n */ var $55286cce8d5d6f71$var$DateTime = /*#__PURE__*/ function(_Symbol$for) {\n /**\n * @access private\n */ function DateTime(config) {\n var zone = config.zone || $55286cce8d5d6f71$var$Settings.defaultZone;\n var invalid = config.invalid || (Number.isNaN(config.ts) ? new $55286cce8d5d6f71$var$Invalid(\"invalid input\") : null) || (!zone.isValid ? $55286cce8d5d6f71$var$unsupportedZone(zone) : null);\n /**\n * @access private\n */ this.ts = $55286cce8d5d6f71$var$isUndefined(config.ts) ? $55286cce8d5d6f71$var$Settings.now() : config.ts;\n var c = null, o = null;\n if (!invalid) {\n var unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);\n if (unchanged) {\n var _ref = [\n config.old.c,\n config.old.o\n ];\n c = _ref[0];\n o = _ref[1];\n } else {\n var ot = zone.offset(this.ts);\n c = $55286cce8d5d6f71$var$tsToObj(this.ts, ot);\n invalid = Number.isNaN(c.year) ? new $55286cce8d5d6f71$var$Invalid(\"invalid input\") : null;\n c = invalid ? null : c;\n o = invalid ? null : ot;\n }\n }\n /**\n * @access private\n */ this._zone = zone;\n /**\n * @access private\n */ this.loc = config.loc || $55286cce8d5d6f71$var$Locale.create();\n /**\n * @access private\n */ this.invalid = invalid;\n /**\n * @access private\n */ this.weekData = null;\n /**\n * @access private\n */ this.localWeekData = null;\n /**\n * @access private\n */ this.c = c;\n /**\n * @access private\n */ this.o = o;\n /**\n * @access private\n */ this.isLuxonDateTime = true;\n }\n // CONSTRUCT\n /**\n * Create a DateTime for the current instant, in the system's time zone.\n *\n * Use Settings to override these default values if needed.\n * @example DateTime.now().toISO() //~> now in the ISO format\n * @return {DateTime}\n */ DateTime.now = function now() {\n return new DateTime({});\n } /**\n * Create a local DateTime\n * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month, 1-indexed\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @example DateTime.local() //~> now\n * @example DateTime.local({ zone: \"America/New_York\" }) //~> now, in US east coast time\n * @example DateTime.local(2017) //~> 2017-01-01T00:00:00\n * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00\n * @example DateTime.local(2017, 3, 12, { locale: \"fr\" }) //~> 2017-03-12T00:00:00, with a French locale\n * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00\n * @example DateTime.local(2017, 3, 12, 5, { zone: \"utc\" }) //~> 2017-03-12T05:00:00, in UTC\n * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00\n * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10\n * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765\n * @return {DateTime}\n */ ;\n DateTime.local = function local() {\n var _lastOpts = $55286cce8d5d6f71$var$lastOpts(arguments), opts = _lastOpts[0], args = _lastOpts[1], year = args[0], month = args[1], day = args[2], hour = args[3], minute = args[4], second = args[5], millisecond = args[6];\n return $55286cce8d5d6f71$var$quickDT({\n year: year,\n month: month,\n day: day,\n hour: hour,\n minute: minute,\n second: second,\n millisecond: millisecond\n }, opts);\n } /**\n * Create a DateTime in UTC\n * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @param {Object} options - configuration options for the DateTime\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance\n * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance\n * @example DateTime.utc() //~> now\n * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z\n * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z\n * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: \"fr\" }) //~> 2017-03-12T05:45:00Z with a French locale\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: \"fr\" }) //~> 2017-03-12T05:45:10.765Z with a French locale\n * @return {DateTime}\n */ ;\n DateTime.utc = function utc() {\n var _lastOpts2 = $55286cce8d5d6f71$var$lastOpts(arguments), opts = _lastOpts2[0], args = _lastOpts2[1], year = args[0], month = args[1], day = args[2], hour = args[3], minute = args[4], second = args[5], millisecond = args[6];\n opts.zone = $55286cce8d5d6f71$var$FixedOffsetZone.utcInstance;\n return $55286cce8d5d6f71$var$quickDT({\n year: year,\n month: month,\n day: day,\n hour: hour,\n minute: minute,\n second: second,\n millisecond: millisecond\n }, opts);\n } /**\n * Create a DateTime from a JavaScript Date object. Uses the default zone.\n * @param {Date} date - a JavaScript Date object\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @return {DateTime}\n */ ;\n DateTime.fromJSDate = function fromJSDate(date, options) {\n if (options === void 0) options = {};\n var ts = $55286cce8d5d6f71$var$isDate(date) ? date.valueOf() : NaN;\n if (Number.isNaN(ts)) return DateTime.invalid(\"invalid input\");\n var zoneToUse = $55286cce8d5d6f71$var$normalizeZone(options.zone, $55286cce8d5d6f71$var$Settings.defaultZone);\n if (!zoneToUse.isValid) return DateTime.invalid($55286cce8d5d6f71$var$unsupportedZone(zoneToUse));\n return new DateTime({\n ts: ts,\n zone: zoneToUse,\n loc: $55286cce8d5d6f71$var$Locale.fromObject(options)\n });\n } /**\n * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} milliseconds - a number of milliseconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @return {DateTime}\n */ ;\n DateTime.fromMillis = function fromMillis(milliseconds, options) {\n if (options === void 0) options = {};\n if (!$55286cce8d5d6f71$var$isNumber(milliseconds)) throw new $55286cce8d5d6f71$var$InvalidArgumentError(\"fromMillis requires a numerical input, but received a \" + typeof milliseconds + \" with value \" + milliseconds);\n else if (milliseconds < -$55286cce8d5d6f71$var$MAX_DATE || milliseconds > $55286cce8d5d6f71$var$MAX_DATE) // this isn't perfect because because we can still end up out of range because of additional shifting, but it's a start\n return DateTime.invalid(\"Timestamp out of range\");\n else return new DateTime({\n ts: milliseconds,\n zone: $55286cce8d5d6f71$var$normalizeZone(options.zone, $55286cce8d5d6f71$var$Settings.defaultZone),\n loc: $55286cce8d5d6f71$var$Locale.fromObject(options)\n });\n } /**\n * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} seconds - a number of seconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @return {DateTime}\n */ ;\n DateTime.fromSeconds = function fromSeconds(seconds, options) {\n if (options === void 0) options = {};\n if (!$55286cce8d5d6f71$var$isNumber(seconds)) throw new $55286cce8d5d6f71$var$InvalidArgumentError(\"fromSeconds requires a numerical input\");\n else return new DateTime({\n ts: seconds * 1000,\n zone: $55286cce8d5d6f71$var$normalizeZone(options.zone, $55286cce8d5d6f71$var$Settings.defaultZone),\n loc: $55286cce8d5d6f71$var$Locale.fromObject(options)\n });\n } /**\n * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.year - a year, such as 1987\n * @param {number} obj.month - a month, 1-12\n * @param {number} obj.day - a day of the month, 1-31, depending on the month\n * @param {number} obj.ordinal - day of the year, 1-365 or 366\n * @param {number} obj.weekYear - an ISO week year\n * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year\n * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday\n * @param {number} obj.localWeekYear - a week year, according to the locale\n * @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale\n * @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale\n * @param {number} obj.hour - hour of the day, 0-23\n * @param {number} obj.minute - minute of the hour, 0-59\n * @param {number} obj.second - second of the minute, 0-59\n * @param {number} obj.millisecond - millisecond of the second, 0-999\n * @param {Object} opts - options for creating this DateTime\n * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()\n * @param {string} [opts.locale='system\\'s locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'\n * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }),\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' })\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' })\n * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'\n * @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: \"en-US\" }).toISODate() //=> '2021-12-26'\n * @return {DateTime}\n */ ;\n DateTime.fromObject = function fromObject(obj, opts) {\n if (opts === void 0) opts = {};\n obj = obj || {};\n var zoneToUse = $55286cce8d5d6f71$var$normalizeZone(opts.zone, $55286cce8d5d6f71$var$Settings.defaultZone);\n if (!zoneToUse.isValid) return DateTime.invalid($55286cce8d5d6f71$var$unsupportedZone(zoneToUse));\n var loc = $55286cce8d5d6f71$var$Locale.fromObject(opts);\n var normalized = $55286cce8d5d6f71$var$normalizeObject(obj, $55286cce8d5d6f71$var$normalizeUnitWithLocalWeeks);\n var _usesLocalWeekValues = $55286cce8d5d6f71$var$usesLocalWeekValues(normalized, loc), minDaysInFirstWeek = _usesLocalWeekValues.minDaysInFirstWeek, startOfWeek = _usesLocalWeekValues.startOfWeek;\n var tsNow = $55286cce8d5d6f71$var$Settings.now(), offsetProvis = !$55286cce8d5d6f71$var$isUndefined(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow), containsOrdinal = !$55286cce8d5d6f71$var$isUndefined(normalized.ordinal), containsGregorYear = !$55286cce8d5d6f71$var$isUndefined(normalized.year), containsGregorMD = !$55286cce8d5d6f71$var$isUndefined(normalized.month) || !$55286cce8d5d6f71$var$isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n // cases:\n // just a weekday -> this week's instance of that weekday, no worries\n // (gregorian data or ordinal) + (weekYear or weekNumber) -> error\n // (gregorian month or day) + ordinal -> error\n // otherwise just use weeks or ordinals or gregorian, depending on what's specified\n if ((containsGregor || containsOrdinal) && definiteWeekDef) throw new $55286cce8d5d6f71$var$ConflictingSpecificationError(\"Can't mix weekYear/weekNumber units with year/month/day or ordinals\");\n if (containsGregorMD && containsOrdinal) throw new $55286cce8d5d6f71$var$ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n var useWeekData = definiteWeekDef || normalized.weekday && !containsGregor;\n // configure ourselves to deal with gregorian dates or week stuff\n var units, defaultValues, objNow = $55286cce8d5d6f71$var$tsToObj(tsNow, offsetProvis);\n if (useWeekData) {\n units = $55286cce8d5d6f71$var$orderedWeekUnits;\n defaultValues = $55286cce8d5d6f71$var$defaultWeekUnitValues;\n objNow = $55286cce8d5d6f71$var$gregorianToWeek(objNow, minDaysInFirstWeek, startOfWeek);\n } else if (containsOrdinal) {\n units = $55286cce8d5d6f71$var$orderedOrdinalUnits;\n defaultValues = $55286cce8d5d6f71$var$defaultOrdinalUnitValues;\n objNow = $55286cce8d5d6f71$var$gregorianToOrdinal(objNow);\n } else {\n units = $55286cce8d5d6f71$var$orderedUnits;\n defaultValues = $55286cce8d5d6f71$var$defaultUnitValues;\n }\n // set default values for missing stuff\n var foundFirst = false;\n for(var _iterator2 = $55286cce8d5d6f71$var$_createForOfIteratorHelperLoose(units), _step2; !(_step2 = _iterator2()).done;){\n var u = _step2.value;\n var v = normalized[u];\n if (!$55286cce8d5d6f71$var$isUndefined(v)) foundFirst = true;\n else if (foundFirst) normalized[u] = defaultValues[u];\n else normalized[u] = objNow[u];\n }\n // make sure the values we have are in range\n var higherOrderInvalid = useWeekData ? $55286cce8d5d6f71$var$hasInvalidWeekData(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? $55286cce8d5d6f71$var$hasInvalidOrdinalData(normalized) : $55286cce8d5d6f71$var$hasInvalidGregorianData(normalized), invalid = higherOrderInvalid || $55286cce8d5d6f71$var$hasInvalidTimeData(normalized);\n if (invalid) return DateTime.invalid(invalid);\n // compute the actual time\n var gregorian = useWeekData ? $55286cce8d5d6f71$var$weekToGregorian(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? $55286cce8d5d6f71$var$ordinalToGregorian(normalized) : normalized, _objToTS2 = $55286cce8d5d6f71$var$objToTS(gregorian, offsetProvis, zoneToUse), tsFinal = _objToTS2[0], offsetFinal = _objToTS2[1], inst = new DateTime({\n ts: tsFinal,\n zone: zoneToUse,\n o: offsetFinal,\n loc: loc\n });\n // gregorian data + weekday serves only to validate\n if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) return DateTime.invalid(\"mismatched weekday\", \"you can't specify both a weekday of \" + normalized.weekday + \" and a date of \" + inst.toISO());\n return inst;\n } /**\n * Create a DateTime from an ISO 8601 string\n * @param {string} text - the ISO string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance\n * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromISO('2016-05-25T09:08:34.123')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})\n * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})\n * @example DateTime.fromISO('2016-W05-4')\n * @return {DateTime}\n */ ;\n DateTime.fromISO = function fromISO(text, opts) {\n if (opts === void 0) opts = {};\n var _parseISODate = $55286cce8d5d6f71$var$parseISODate(text), vals = _parseISODate[0], parsedZone = _parseISODate[1];\n return $55286cce8d5d6f71$var$parseDataToDateTime(vals, parsedZone, opts, \"ISO 8601\", text);\n } /**\n * Create a DateTime from an RFC 2822 string\n * @param {string} text - the RFC 2822 string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')\n * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')\n * @return {DateTime}\n */ ;\n DateTime.fromRFC2822 = function fromRFC2822(text, opts) {\n if (opts === void 0) opts = {};\n var _parseRFC2822Date = $55286cce8d5d6f71$var$parseRFC2822Date(text), vals = _parseRFC2822Date[0], parsedZone = _parseRFC2822Date[1];\n return $55286cce8d5d6f71$var$parseDataToDateTime(vals, parsedZone, opts, \"RFC 2822\", text);\n } /**\n * Create a DateTime from an HTTP header date\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @param {string} text - the HTTP header date\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994')\n * @return {DateTime}\n */ ;\n DateTime.fromHTTP = function fromHTTP(text, opts) {\n if (opts === void 0) opts = {};\n var _parseHTTPDate = $55286cce8d5d6f71$var$parseHTTPDate(text), vals = _parseHTTPDate[0], parsedZone = _parseHTTPDate[1];\n return $55286cce8d5d6f71$var$parseDataToDateTime(vals, parsedZone, opts, \"HTTP\", opts);\n } /**\n * Create a DateTime from an input string and format string.\n * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens).\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @return {DateTime}\n */ ;\n DateTime.fromFormat = function fromFormat(text, fmt, opts) {\n if (opts === void 0) opts = {};\n if ($55286cce8d5d6f71$var$isUndefined(text) || $55286cce8d5d6f71$var$isUndefined(fmt)) throw new $55286cce8d5d6f71$var$InvalidArgumentError(\"fromFormat requires an input string and a format\");\n var _opts = opts, _opts$locale = _opts.locale, locale = _opts$locale === void 0 ? null : _opts$locale, _opts$numberingSystem = _opts.numberingSystem, numberingSystem = _opts$numberingSystem === void 0 ? null : _opts$numberingSystem, localeToUse = $55286cce8d5d6f71$var$Locale.fromOpts({\n locale: locale,\n numberingSystem: numberingSystem,\n defaultToEN: true\n }), _parseFromTokens = $55286cce8d5d6f71$var$parseFromTokens(localeToUse, text, fmt), vals = _parseFromTokens[0], parsedZone = _parseFromTokens[1], specificOffset = _parseFromTokens[2], invalid = _parseFromTokens[3];\n if (invalid) return DateTime.invalid(invalid);\n else return $55286cce8d5d6f71$var$parseDataToDateTime(vals, parsedZone, opts, \"format \" + fmt, text, specificOffset);\n } /**\n * @deprecated use fromFormat instead\n */ ;\n DateTime.fromString = function fromString(text, fmt, opts) {\n if (opts === void 0) opts = {};\n return DateTime.fromFormat(text, fmt, opts);\n } /**\n * Create a DateTime from a SQL date, time, or datetime\n * Defaults to en-US if no locale has been specified, regardless of the system's locale\n * @param {string} text - the string to parse\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @example DateTime.fromSQL('2017-05-15')\n * @example DateTime.fromSQL('2017-05-15 09:12:34')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })\n * @example DateTime.fromSQL('09:12:34.342')\n * @return {DateTime}\n */ ;\n DateTime.fromSQL = function fromSQL(text, opts) {\n if (opts === void 0) opts = {};\n var _parseSQL = $55286cce8d5d6f71$var$parseSQL(text), vals = _parseSQL[0], parsedZone = _parseSQL[1];\n return $55286cce8d5d6f71$var$parseDataToDateTime(vals, parsedZone, opts, \"SQL\", text);\n } /**\n * Create an invalid DateTime.\n * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent.\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {DateTime}\n */ ;\n DateTime.invalid = function invalid(reason, explanation) {\n if (explanation === void 0) explanation = null;\n if (!reason) throw new $55286cce8d5d6f71$var$InvalidArgumentError(\"need to specify a reason the DateTime is invalid\");\n var invalid = reason instanceof $55286cce8d5d6f71$var$Invalid ? reason : new $55286cce8d5d6f71$var$Invalid(reason, explanation);\n if ($55286cce8d5d6f71$var$Settings.throwOnInvalid) throw new $55286cce8d5d6f71$var$InvalidDateTimeError(invalid);\n else return new DateTime({\n invalid: invalid\n });\n } /**\n * Check if an object is an instance of DateTime. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */ ;\n DateTime.isDateTime = function isDateTime(o) {\n return o && o.isLuxonDateTime || false;\n } /**\n * Produce the format string for a set of options\n * @param formatOpts\n * @param localeOpts\n * @returns {string}\n */ ;\n DateTime.parseFormatForOpts = function parseFormatForOpts(formatOpts, localeOpts) {\n if (localeOpts === void 0) localeOpts = {};\n var tokenList = $55286cce8d5d6f71$var$formatOptsToTokens(formatOpts, $55286cce8d5d6f71$var$Locale.fromObject(localeOpts));\n return !tokenList ? null : tokenList.map(function(t) {\n return t ? t.val : null;\n }).join(\"\");\n } /**\n * Produce the the fully expanded format token for the locale\n * Does NOT quote characters, so quoted tokens will not round trip correctly\n * @param fmt\n * @param localeOpts\n * @returns {string}\n */ ;\n DateTime.expandFormat = function expandFormat(fmt, localeOpts) {\n if (localeOpts === void 0) localeOpts = {};\n var expanded = $55286cce8d5d6f71$var$expandMacroTokens($55286cce8d5d6f71$var$Formatter.parseFormat(fmt), $55286cce8d5d6f71$var$Locale.fromObject(localeOpts));\n return expanded.map(function(t) {\n return t.val;\n }).join(\"\");\n } /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example DateTime.local(2017, 7, 4).get('month'); //=> 7\n * @example DateTime.local(2017, 7, 4).get('day'); //=> 4\n * @return {number}\n */ ;\n var _proto = DateTime.prototype;\n _proto.get = function get(unit) {\n return this[unit];\n } /**\n * Returns whether the DateTime is valid. Invalid DateTimes occur when:\n * * The DateTime was created from invalid calendar information, such as the 13th month or February 30\n * * The DateTime was created by an operation on another invalid date\n * @type {boolean}\n */ ;\n /**\n * Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC\n * in this DateTime's zone. During DST changes local time can be ambiguous, for example\n * `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`.\n * This method will return both possible DateTimes if this DateTime's local time is ambiguous.\n * @returns {DateTime[]}\n */ _proto.getPossibleOffsets = function getPossibleOffsets() {\n if (!this.isValid || this.isOffsetFixed) return [\n this\n ];\n var dayMs = 86400000;\n var minuteMs = 60000;\n var localTS = $55286cce8d5d6f71$var$objToLocalTS(this.c);\n var oEarlier = this.zone.offset(localTS - dayMs);\n var oLater = this.zone.offset(localTS + dayMs);\n var o1 = this.zone.offset(localTS - oEarlier * minuteMs);\n var o2 = this.zone.offset(localTS - oLater * minuteMs);\n if (o1 === o2) return [\n this\n ];\n var ts1 = localTS - o1 * minuteMs;\n var ts2 = localTS - o2 * minuteMs;\n var c1 = $55286cce8d5d6f71$var$tsToObj(ts1, o1);\n var c2 = $55286cce8d5d6f71$var$tsToObj(ts2, o2);\n if (c1.hour === c2.hour && c1.minute === c2.minute && c1.second === c2.second && c1.millisecond === c2.millisecond) return [\n $55286cce8d5d6f71$var$clone(this, {\n ts: ts1\n }),\n $55286cce8d5d6f71$var$clone(this, {\n ts: ts2\n })\n ];\n return [\n this\n ];\n } /**\n * Returns true if this DateTime is in a leap year, false otherwise\n * @example DateTime.local(2016).isInLeapYear //=> true\n * @example DateTime.local(2013).isInLeapYear //=> false\n * @type {boolean}\n */ ;\n /**\n * Returns the resolved Intl options for this DateTime.\n * This is useful in understanding the behavior of formatting methods\n * @param {Object} opts - the same options as toLocaleString\n * @return {Object}\n */ _proto.resolvedLocaleOptions = function resolvedLocaleOptions(opts) {\n if (opts === void 0) opts = {};\n var _Formatter$create$res = $55286cce8d5d6f71$var$Formatter.create(this.loc.clone(opts), opts).resolvedOptions(this), locale = _Formatter$create$res.locale, numberingSystem = _Formatter$create$res.numberingSystem, calendar = _Formatter$create$res.calendar;\n return {\n locale: locale,\n numberingSystem: numberingSystem,\n outputCalendar: calendar\n };\n } /**\n * \"Set\" the DateTime's zone to UTC. Returns a newly-constructed DateTime.\n *\n * Equivalent to {@link DateTime#setZone}('utc')\n * @param {number} [offset=0] - optionally, an offset from UTC in minutes\n * @param {Object} [opts={}] - options to pass to `setZone()`\n * @return {DateTime}\n */ ;\n _proto.toUTC = function toUTC(offset, opts) {\n if (offset === void 0) offset = 0;\n if (opts === void 0) opts = {};\n return this.setZone($55286cce8d5d6f71$var$FixedOffsetZone.instance(offset), opts);\n } /**\n * \"Set\" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.\n *\n * Equivalent to `setZone('local')`\n * @return {DateTime}\n */ ;\n _proto.toLocal = function toLocal() {\n return this.setZone($55286cce8d5d6f71$var$Settings.defaultZone);\n } /**\n * \"Set\" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.\n *\n * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.\n * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.\n * @param {Object} opts - options\n * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.\n * @return {DateTime}\n */ ;\n _proto.setZone = function setZone(zone, _temp) {\n var _ref2 = _temp === void 0 ? {} : _temp, _ref2$keepLocalTime = _ref2.keepLocalTime, keepLocalTime = _ref2$keepLocalTime === void 0 ? false : _ref2$keepLocalTime, _ref2$keepCalendarTim = _ref2.keepCalendarTime, keepCalendarTime = _ref2$keepCalendarTim === void 0 ? false : _ref2$keepCalendarTim;\n zone = $55286cce8d5d6f71$var$normalizeZone(zone, $55286cce8d5d6f71$var$Settings.defaultZone);\n if (zone.equals(this.zone)) return this;\n else if (!zone.isValid) return DateTime.invalid($55286cce8d5d6f71$var$unsupportedZone(zone));\n else {\n var newTS = this.ts;\n if (keepLocalTime || keepCalendarTime) {\n var offsetGuess = zone.offset(this.ts);\n var asObj = this.toObject();\n var _objToTS3 = $55286cce8d5d6f71$var$objToTS(asObj, offsetGuess, zone);\n newTS = _objToTS3[0];\n }\n return $55286cce8d5d6f71$var$clone(this, {\n ts: newTS,\n zone: zone\n });\n }\n } /**\n * \"Set\" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.\n * @param {Object} properties - the properties to set\n * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })\n * @return {DateTime}\n */ ;\n _proto.reconfigure = function reconfigure(_temp2) {\n var _ref3 = _temp2 === void 0 ? {} : _temp2, locale = _ref3.locale, numberingSystem = _ref3.numberingSystem, outputCalendar = _ref3.outputCalendar;\n var loc = this.loc.clone({\n locale: locale,\n numberingSystem: numberingSystem,\n outputCalendar: outputCalendar\n });\n return $55286cce8d5d6f71$var$clone(this, {\n loc: loc\n });\n } /**\n * \"Set\" the locale. Returns a newly-constructed DateTime.\n * Just a convenient alias for reconfigure({ locale })\n * @example DateTime.local(2017, 5, 25).setLocale('en-GB')\n * @return {DateTime}\n */ ;\n _proto.setLocale = function setLocale(locale) {\n return this.reconfigure({\n locale: locale\n });\n } /**\n * \"Set\" the values of specified units. Returns a newly-constructed DateTime.\n * You can only set units with this method; for \"setting\" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.\n *\n * This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`.\n * They cannot be mixed with ISO-week units like `weekday`.\n * @param {Object} values - a mapping of units to numbers\n * @example dt.set({ year: 2017 })\n * @example dt.set({ hour: 8, minute: 30 })\n * @example dt.set({ weekday: 5 })\n * @example dt.set({ year: 2005, ordinal: 234 })\n * @return {DateTime}\n */ ;\n _proto.set = function set(values) {\n if (!this.isValid) return this;\n var normalized = $55286cce8d5d6f71$var$normalizeObject(values, $55286cce8d5d6f71$var$normalizeUnitWithLocalWeeks);\n var _usesLocalWeekValues2 = $55286cce8d5d6f71$var$usesLocalWeekValues(normalized, this.loc), minDaysInFirstWeek = _usesLocalWeekValues2.minDaysInFirstWeek, startOfWeek = _usesLocalWeekValues2.startOfWeek;\n var settingWeekStuff = !$55286cce8d5d6f71$var$isUndefined(normalized.weekYear) || !$55286cce8d5d6f71$var$isUndefined(normalized.weekNumber) || !$55286cce8d5d6f71$var$isUndefined(normalized.weekday), containsOrdinal = !$55286cce8d5d6f71$var$isUndefined(normalized.ordinal), containsGregorYear = !$55286cce8d5d6f71$var$isUndefined(normalized.year), containsGregorMD = !$55286cce8d5d6f71$var$isUndefined(normalized.month) || !$55286cce8d5d6f71$var$isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n if ((containsGregor || containsOrdinal) && definiteWeekDef) throw new $55286cce8d5d6f71$var$ConflictingSpecificationError(\"Can't mix weekYear/weekNumber units with year/month/day or ordinals\");\n if (containsGregorMD && containsOrdinal) throw new $55286cce8d5d6f71$var$ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n var mixed;\n if (settingWeekStuff) mixed = $55286cce8d5d6f71$var$weekToGregorian($55286cce8d5d6f71$var$_extends({}, $55286cce8d5d6f71$var$gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), normalized), minDaysInFirstWeek, startOfWeek);\n else if (!$55286cce8d5d6f71$var$isUndefined(normalized.ordinal)) mixed = $55286cce8d5d6f71$var$ordinalToGregorian($55286cce8d5d6f71$var$_extends({}, $55286cce8d5d6f71$var$gregorianToOrdinal(this.c), normalized));\n else {\n mixed = $55286cce8d5d6f71$var$_extends({}, this.toObject(), normalized);\n // if we didn't set the day but we ended up on an overflow date,\n // use the last day of the right month\n if ($55286cce8d5d6f71$var$isUndefined(normalized.day)) mixed.day = Math.min($55286cce8d5d6f71$var$daysInMonth(mixed.year, mixed.month), mixed.day);\n }\n var _objToTS4 = $55286cce8d5d6f71$var$objToTS(mixed, this.o, this.zone), ts = _objToTS4[0], o = _objToTS4[1];\n return $55286cce8d5d6f71$var$clone(this, {\n ts: ts,\n o: o\n });\n } /**\n * Add a period of time to this DateTime and return the resulting DateTime\n *\n * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @example DateTime.now().plus(123) //~> in 123 milliseconds\n * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes\n * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow\n * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday\n * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min\n * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min\n * @return {DateTime}\n */ ;\n _proto.plus = function plus(duration) {\n if (!this.isValid) return this;\n var dur = $55286cce8d5d6f71$var$Duration.fromDurationLike(duration);\n return $55286cce8d5d6f71$var$clone(this, $55286cce8d5d6f71$var$adjustTime(this, dur));\n } /**\n * Subtract a period of time to this DateTime and return the resulting DateTime\n * See {@link DateTime#plus}\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n @return {DateTime}\n */ ;\n _proto.minus = function minus(duration) {\n if (!this.isValid) return this;\n var dur = $55286cce8d5d6f71$var$Duration.fromDurationLike(duration).negate();\n return $55286cce8d5d6f71$var$clone(this, $55286cce8d5d6f71$var$adjustTime(this, dur));\n } /**\n * \"Set\" this DateTime to the beginning of a unit of time.\n * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week\n * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'\n * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'\n * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'\n * @return {DateTime}\n */ ;\n _proto.startOf = function startOf(unit, _temp3) {\n var _ref4 = _temp3 === void 0 ? {} : _temp3, _ref4$useLocaleWeeks = _ref4.useLocaleWeeks, useLocaleWeeks = _ref4$useLocaleWeeks === void 0 ? false : _ref4$useLocaleWeeks;\n if (!this.isValid) return this;\n var o = {}, normalizedUnit = $55286cce8d5d6f71$var$Duration.normalizeUnit(unit);\n switch(normalizedUnit){\n case \"years\":\n o.month = 1;\n // falls through\n case \"quarters\":\n case \"months\":\n o.day = 1;\n // falls through\n case \"weeks\":\n case \"days\":\n o.hour = 0;\n // falls through\n case \"hours\":\n o.minute = 0;\n // falls through\n case \"minutes\":\n o.second = 0;\n // falls through\n case \"seconds\":\n o.millisecond = 0;\n break;\n }\n if (normalizedUnit === \"weeks\") {\n if (useLocaleWeeks) {\n var startOfWeek = this.loc.getStartOfWeek();\n var weekday = this.weekday;\n if (weekday < startOfWeek) o.weekNumber = this.weekNumber - 1;\n o.weekday = startOfWeek;\n } else o.weekday = 1;\n }\n if (normalizedUnit === \"quarters\") {\n var q = Math.ceil(this.month / 3);\n o.month = (q - 1) * 3 + 1;\n }\n return this.set(o);\n } /**\n * \"Set\" this DateTime to the end (meaning the last millisecond) of a unit of time\n * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week\n * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'\n * @return {DateTime}\n */ ;\n _proto.endOf = function endOf(unit, opts) {\n var _this$plus;\n return this.isValid ? this.plus((_this$plus = {}, _this$plus[unit] = 1, _this$plus)).startOf(unit, opts).minus(1) : this;\n } /**\n * Returns a string representation of this DateTime formatted according to the specified format string.\n * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).\n * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n * @param {string} fmt - the format string\n * @param {Object} opts - opts to override the configuration options on this DateTime\n * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22'\n * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'\n * @example DateTime.now().toFormat('yyyy LLL dd', { locale: \"fr\" }) //=> '2017 avr. 22'\n * @example DateTime.now().toFormat(\"HH 'hours and' mm 'minutes'\") //=> '20 hours and 55 minutes'\n * @return {string}\n */ ;\n _proto.toFormat = function toFormat(fmt, opts) {\n if (opts === void 0) opts = {};\n return this.isValid ? $55286cce8d5d6f71$var$Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : $55286cce8d5d6f71$var$INVALID;\n } /**\n * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.\n * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation\n * of the DateTime in the assigned locale.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options\n * @param {Object} opts - opts to override the configuration options on this DateTime\n * @example DateTime.now().toLocaleString(); //=> 4/20/2017\n * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'\n * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'\n * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022'\n * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'\n * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'\n * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'\n * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'\n * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'\n * @return {string}\n */ ;\n _proto.toLocaleString = function toLocaleString(formatOpts, opts) {\n if (formatOpts === void 0) formatOpts = $55286cce8d5d6f71$var$DATE_SHORT;\n if (opts === void 0) opts = {};\n return this.isValid ? $55286cce8d5d6f71$var$Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this) : $55286cce8d5d6f71$var$INVALID;\n } /**\n * Returns an array of format \"parts\", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts\n * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.\n * @example DateTime.now().toLocaleParts(); //=> [\n * //=> { type: 'day', value: '25' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'month', value: '05' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'year', value: '1982' }\n * //=> ]\n */ ;\n _proto.toLocaleParts = function toLocaleParts(opts) {\n if (opts === void 0) opts = {};\n return this.isValid ? $55286cce8d5d6f71$var$Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : [];\n } /**\n * Returns an ISO 8601-compliant string representation of this DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.extendedZone=false] - add the time zone format extension\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'\n * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'\n * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'\n * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'\n * @return {string}\n */ ;\n _proto.toISO = function toISO(_temp4) {\n var _ref5 = _temp4 === void 0 ? {} : _temp4, _ref5$format = _ref5.format, format = _ref5$format === void 0 ? \"extended\" : _ref5$format, _ref5$suppressSeconds = _ref5.suppressSeconds, suppressSeconds = _ref5$suppressSeconds === void 0 ? false : _ref5$suppressSeconds, _ref5$suppressMillise = _ref5.suppressMilliseconds, suppressMilliseconds = _ref5$suppressMillise === void 0 ? false : _ref5$suppressMillise, _ref5$includeOffset = _ref5.includeOffset, includeOffset = _ref5$includeOffset === void 0 ? true : _ref5$includeOffset, _ref5$extendedZone = _ref5.extendedZone, extendedZone = _ref5$extendedZone === void 0 ? false : _ref5$extendedZone;\n if (!this.isValid) return null;\n var ext = format === \"extended\";\n var c = $55286cce8d5d6f71$var$_toISODate(this, ext);\n c += \"T\";\n c += $55286cce8d5d6f71$var$_toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone);\n return c;\n } /**\n * Returns an ISO 8601-compliant string representation of this DateTime's date component\n * @param {Object} opts - options\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'\n * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'\n * @return {string}\n */ ;\n _proto.toISODate = function toISODate(_temp5) {\n var _ref6 = _temp5 === void 0 ? {} : _temp5, _ref6$format = _ref6.format, format = _ref6$format === void 0 ? \"extended\" : _ref6$format;\n if (!this.isValid) return null;\n return $55286cce8d5d6f71$var$_toISODate(this, format === \"extended\");\n } /**\n * Returns an ISO 8601-compliant string representation of this DateTime's week date\n * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'\n * @return {string}\n */ ;\n _proto.toISOWeekDate = function toISOWeekDate() {\n return $55286cce8d5d6f71$var$toTechFormat(this, \"kkkk-'W'WW-c\");\n } /**\n * Returns an ISO 8601-compliant string representation of this DateTime's time component\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.extendedZone=true] - add the time zone format extension\n * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z'\n * @return {string}\n */ ;\n _proto.toISOTime = function toISOTime(_temp6) {\n var _ref7 = _temp6 === void 0 ? {} : _temp6, _ref7$suppressMillise = _ref7.suppressMilliseconds, suppressMilliseconds = _ref7$suppressMillise === void 0 ? false : _ref7$suppressMillise, _ref7$suppressSeconds = _ref7.suppressSeconds, suppressSeconds = _ref7$suppressSeconds === void 0 ? false : _ref7$suppressSeconds, _ref7$includeOffset = _ref7.includeOffset, includeOffset = _ref7$includeOffset === void 0 ? true : _ref7$includeOffset, _ref7$includePrefix = _ref7.includePrefix, includePrefix = _ref7$includePrefix === void 0 ? false : _ref7$includePrefix, _ref7$extendedZone = _ref7.extendedZone, extendedZone = _ref7$extendedZone === void 0 ? false : _ref7$extendedZone, _ref7$format = _ref7.format, format = _ref7$format === void 0 ? \"extended\" : _ref7$format;\n if (!this.isValid) return null;\n var c = includePrefix ? \"T\" : \"\";\n return c + $55286cce8d5d6f71$var$_toISOTime(this, format === \"extended\", suppressSeconds, suppressMilliseconds, includeOffset, extendedZone);\n } /**\n * Returns an RFC 2822-compatible string representation of this DateTime\n * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'\n * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'\n * @return {string}\n */ ;\n _proto.toRFC2822 = function toRFC2822() {\n return $55286cce8d5d6f71$var$toTechFormat(this, \"EEE, dd LLL yyyy HH:mm:ss ZZZ\", false);\n } /**\n * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.\n * Specifically, the string conforms to RFC 1123.\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'\n * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'\n * @return {string}\n */ ;\n _proto.toHTTP = function toHTTP() {\n return $55286cce8d5d6f71$var$toTechFormat(this.toUTC(), \"EEE, dd LLL yyyy HH:mm:ss 'GMT'\");\n } /**\n * Returns a string representation of this DateTime appropriate for use in SQL Date\n * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'\n * @return {string}\n */ ;\n _proto.toSQLDate = function toSQLDate() {\n if (!this.isValid) return null;\n return $55286cce8d5d6f71$var$_toISODate(this, true);\n } /**\n * Returns a string representation of this DateTime appropriate for use in SQL Time\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n * @example DateTime.utc().toSQL() //=> '05:15:16.345'\n * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00'\n * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345'\n * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'\n * @return {string}\n */ ;\n _proto.toSQLTime = function toSQLTime(_temp7) {\n var _ref8 = _temp7 === void 0 ? {} : _temp7, _ref8$includeOffset = _ref8.includeOffset, includeOffset = _ref8$includeOffset === void 0 ? true : _ref8$includeOffset, _ref8$includeZone = _ref8.includeZone, includeZone = _ref8$includeZone === void 0 ? false : _ref8$includeZone, _ref8$includeOffsetSp = _ref8.includeOffsetSpace, includeOffsetSpace = _ref8$includeOffsetSp === void 0 ? true : _ref8$includeOffsetSp;\n var fmt = \"HH:mm:ss.SSS\";\n if (includeZone || includeOffset) {\n if (includeOffsetSpace) fmt += \" \";\n if (includeZone) fmt += \"z\";\n else if (includeOffset) fmt += \"ZZ\";\n }\n return $55286cce8d5d6f71$var$toTechFormat(this, fmt, true);\n } /**\n * Returns a string representation of this DateTime appropriate for use in SQL DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'\n * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'\n * @return {string}\n */ ;\n _proto.toSQL = function toSQL(opts) {\n if (opts === void 0) opts = {};\n if (!this.isValid) return null;\n return this.toSQLDate() + \" \" + this.toSQLTime(opts);\n } /**\n * Returns a string representation of this DateTime appropriate for debugging\n * @return {string}\n */ ;\n _proto.toString = function toString() {\n return this.isValid ? this.toISO() : $55286cce8d5d6f71$var$INVALID;\n } /**\n * Returns a string representation of this DateTime appropriate for the REPL.\n * @return {string}\n */ ;\n _proto[_Symbol$for] = function() {\n if (this.isValid) return \"DateTime { ts: \" + this.toISO() + \", zone: \" + this.zone.name + \", locale: \" + this.locale + \" }\";\n else return \"DateTime { Invalid, reason: \" + this.invalidReason + \" }\";\n } /**\n * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}\n * @return {number}\n */ ;\n _proto.valueOf = function valueOf() {\n return this.toMillis();\n } /**\n * Returns the epoch milliseconds of this DateTime.\n * @return {number}\n */ ;\n _proto.toMillis = function toMillis() {\n return this.isValid ? this.ts : NaN;\n } /**\n * Returns the epoch seconds of this DateTime.\n * @return {number}\n */ ;\n _proto.toSeconds = function toSeconds() {\n return this.isValid ? this.ts / 1000 : NaN;\n } /**\n * Returns the epoch seconds (as a whole number) of this DateTime.\n * @return {number}\n */ ;\n _proto.toUnixInteger = function toUnixInteger() {\n return this.isValid ? Math.floor(this.ts / 1000) : NaN;\n } /**\n * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.\n * @return {string}\n */ ;\n _proto.toJSON = function toJSON() {\n return this.toISO();\n } /**\n * Returns a BSON serializable equivalent to this DateTime.\n * @return {Date}\n */ ;\n _proto.toBSON = function toBSON() {\n return this.toJSDate();\n } /**\n * Returns a JavaScript object with this DateTime's year, month, day, and so on.\n * @param opts - options for generating the object\n * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }\n * @return {Object}\n */ ;\n _proto.toObject = function toObject(opts) {\n if (opts === void 0) opts = {};\n if (!this.isValid) return {};\n var base = $55286cce8d5d6f71$var$_extends({}, this.c);\n if (opts.includeConfig) {\n base.outputCalendar = this.outputCalendar;\n base.numberingSystem = this.loc.numberingSystem;\n base.locale = this.loc.locale;\n }\n return base;\n } /**\n * Returns a JavaScript Date equivalent to this DateTime.\n * @return {Date}\n */ ;\n _proto.toJSDate = function toJSDate() {\n return new Date(this.isValid ? this.ts : NaN);\n } /**\n * Return the difference between two DateTimes as a Duration.\n * @param {DateTime} otherDateTime - the DateTime to compare this one to\n * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example\n * var i1 = DateTime.fromISO('1982-05-25T09:45'),\n * i2 = DateTime.fromISO('1983-10-14T10:30');\n * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }\n * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }\n * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }\n * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }\n * @return {Duration}\n */ ;\n _proto.diff = function diff(otherDateTime, unit, opts) {\n if (unit === void 0) unit = \"milliseconds\";\n if (opts === void 0) opts = {};\n if (!this.isValid || !otherDateTime.isValid) return $55286cce8d5d6f71$var$Duration.invalid(\"created by diffing an invalid DateTime\");\n var durOpts = $55286cce8d5d6f71$var$_extends({\n locale: this.locale,\n numberingSystem: this.numberingSystem\n }, opts);\n var units = $55286cce8d5d6f71$var$maybeArray(unit).map($55286cce8d5d6f71$var$Duration.normalizeUnit), otherIsLater = otherDateTime.valueOf() > this.valueOf(), earlier = otherIsLater ? this : otherDateTime, later = otherIsLater ? otherDateTime : this, diffed = $55286cce8d5d6f71$var$_diff(earlier, later, units, durOpts);\n return otherIsLater ? diffed.negate() : diffed;\n } /**\n * Return the difference between this DateTime and right now.\n * See {@link DateTime#diff}\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */ ;\n _proto.diffNow = function diffNow(unit, opts) {\n if (unit === void 0) unit = \"milliseconds\";\n if (opts === void 0) opts = {};\n return this.diff(DateTime.now(), unit, opts);\n } /**\n * Return an Interval spanning between this DateTime and another DateTime\n * @param {DateTime} otherDateTime - the other end point of the Interval\n * @return {Interval}\n */ ;\n _proto.until = function until(otherDateTime) {\n return this.isValid ? $55286cce8d5d6f71$var$Interval.fromDateTimes(this, otherDateTime) : this;\n } /**\n * Return whether this DateTime is in the same unit of time as another DateTime.\n * Higher-order units must also be identical for this function to return `true`.\n * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.\n * @param {DateTime} otherDateTime - the other DateTime\n * @param {string} unit - the unit of time to check sameness on\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used\n * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day\n * @return {boolean}\n */ ;\n _proto.hasSame = function hasSame(otherDateTime, unit, opts) {\n if (!this.isValid) return false;\n var inputMs = otherDateTime.valueOf();\n var adjustedToZone = this.setZone(otherDateTime.zone, {\n keepLocalTime: true\n });\n return adjustedToZone.startOf(unit, opts) <= inputMs && inputMs <= adjustedToZone.endOf(unit, opts);\n } /**\n * Equality check\n * Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid.\n * To compare just the millisecond values, use `+dt1 === +dt2`.\n * @param {DateTime} other - the other DateTime\n * @return {boolean}\n */ ;\n _proto.equals = function equals(other) {\n return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc);\n } /**\n * Returns a string representation of a this time relative to now, such as \"in two days\". Can only internationalize if your\n * platform supports Intl.RelativeTimeFormat. Rounds down by default.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} [options.style=\"long\"] - the style of units, must be \"long\", \"short\", or \"narrow\"\n * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of \"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", or \"seconds\"\n * @param {boolean} [options.round=true] - whether to round the numbers in the output.\n * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.now().plus({ days: 1 }).toRelative() //=> \"in 1 day\"\n * @example DateTime.now().setLocale(\"es\").toRelative({ days: 1 }) //=> \"dentro de 1 día\"\n * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: \"fr\" }) //=> \"dans 23 heures\"\n * @example DateTime.now().minus({ days: 2 }).toRelative() //=> \"2 days ago\"\n * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: \"hours\" }) //=> \"48 hours ago\"\n * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> \"1.5 days ago\"\n */ ;\n _proto.toRelative = function toRelative(options) {\n if (options === void 0) options = {};\n if (!this.isValid) return null;\n var base = options.base || DateTime.fromObject({}, {\n zone: this.zone\n }), padding = options.padding ? this < base ? -options.padding : options.padding : 0;\n var units = [\n \"years\",\n \"months\",\n \"days\",\n \"hours\",\n \"minutes\",\n \"seconds\"\n ];\n var unit = options.unit;\n if (Array.isArray(options.unit)) {\n units = options.unit;\n unit = undefined;\n }\n return $55286cce8d5d6f71$var$diffRelative(base, this.plus(padding), $55286cce8d5d6f71$var$_extends({}, options, {\n numeric: \"always\",\n units: units,\n unit: unit\n }));\n } /**\n * Returns a string representation of this date relative to today, such as \"yesterday\" or \"next month\".\n * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", or \"days\"\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> \"tomorrow\"\n * @example DateTime.now().setLocale(\"es\").plus({ days: 1 }).toRelative() //=> \"\"mañana\"\n * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: \"fr\" }) //=> \"demain\"\n * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> \"2 days ago\"\n */ ;\n _proto.toRelativeCalendar = function toRelativeCalendar(options) {\n if (options === void 0) options = {};\n if (!this.isValid) return null;\n return $55286cce8d5d6f71$var$diffRelative(options.base || DateTime.fromObject({}, {\n zone: this.zone\n }), this, $55286cce8d5d6f71$var$_extends({}, options, {\n numeric: \"auto\",\n units: [\n \"years\",\n \"months\",\n \"days\"\n ],\n calendary: true\n }));\n } /**\n * Return the min of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum\n * @return {DateTime} the min DateTime, or undefined if called with no argument\n */ ;\n DateTime.min = function min() {\n for(var _len = arguments.length, dateTimes = new Array(_len), _key = 0; _key < _len; _key++)dateTimes[_key] = arguments[_key];\n if (!dateTimes.every(DateTime.isDateTime)) throw new $55286cce8d5d6f71$var$InvalidArgumentError(\"min requires all arguments be DateTimes\");\n return $55286cce8d5d6f71$var$bestBy(dateTimes, function(i) {\n return i.valueOf();\n }, Math.min);\n } /**\n * Return the max of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum\n * @return {DateTime} the max DateTime, or undefined if called with no argument\n */ ;\n DateTime.max = function max() {\n for(var _len2 = arguments.length, dateTimes = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++)dateTimes[_key2] = arguments[_key2];\n if (!dateTimes.every(DateTime.isDateTime)) throw new $55286cce8d5d6f71$var$InvalidArgumentError(\"max requires all arguments be DateTimes\");\n return $55286cce8d5d6f71$var$bestBy(dateTimes, function(i) {\n return i.valueOf();\n }, Math.max);\n } /**\n * Explain how a string would be parsed by fromFormat()\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see description)\n * @param {Object} options - options taken by fromFormat()\n * @return {Object}\n */ ;\n DateTime.fromFormatExplain = function fromFormatExplain(text, fmt, options) {\n if (options === void 0) options = {};\n var _options = options, _options$locale = _options.locale, locale = _options$locale === void 0 ? null : _options$locale, _options$numberingSys = _options.numberingSystem, numberingSystem = _options$numberingSys === void 0 ? null : _options$numberingSys, localeToUse = $55286cce8d5d6f71$var$Locale.fromOpts({\n locale: locale,\n numberingSystem: numberingSystem,\n defaultToEN: true\n });\n return $55286cce8d5d6f71$var$explainFromTokens(localeToUse, text, fmt);\n } /**\n * @deprecated use fromFormatExplain instead\n */ ;\n DateTime.fromStringExplain = function fromStringExplain(text, fmt, options) {\n if (options === void 0) options = {};\n return DateTime.fromFormatExplain(text, fmt, options);\n } /**\n * {@link DateTime#toLocaleString} format like 10/14/1983\n * @type {Object}\n */ ;\n $55286cce8d5d6f71$var$_createClass(DateTime, [\n {\n key: \"isValid\",\n get: function get() {\n return this.invalid === null;\n }\n },\n {\n key: \"invalidReason\",\n get: function get() {\n return this.invalid ? this.invalid.reason : null;\n }\n },\n {\n key: \"invalidExplanation\",\n get: function get() {\n return this.invalid ? this.invalid.explanation : null;\n }\n },\n {\n key: \"locale\",\n get: function get() {\n return this.isValid ? this.loc.locale : null;\n }\n },\n {\n key: \"numberingSystem\",\n get: function get() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n },\n {\n key: \"outputCalendar\",\n get: function get() {\n return this.isValid ? this.loc.outputCalendar : null;\n }\n },\n {\n key: \"zone\",\n get: function get() {\n return this._zone;\n }\n },\n {\n key: \"zoneName\",\n get: function get() {\n return this.isValid ? this.zone.name : null;\n }\n },\n {\n key: \"year\",\n get: function get() {\n return this.isValid ? this.c.year : NaN;\n }\n },\n {\n key: \"quarter\",\n get: function get() {\n return this.isValid ? Math.ceil(this.c.month / 3) : NaN;\n }\n },\n {\n key: \"month\",\n get: function get() {\n return this.isValid ? this.c.month : NaN;\n }\n },\n {\n key: \"day\",\n get: function get() {\n return this.isValid ? this.c.day : NaN;\n }\n },\n {\n key: \"hour\",\n get: function get() {\n return this.isValid ? this.c.hour : NaN;\n }\n },\n {\n key: \"minute\",\n get: function get() {\n return this.isValid ? this.c.minute : NaN;\n }\n },\n {\n key: \"second\",\n get: function get() {\n return this.isValid ? this.c.second : NaN;\n }\n },\n {\n key: \"millisecond\",\n get: function get() {\n return this.isValid ? this.c.millisecond : NaN;\n }\n },\n {\n key: \"weekYear\",\n get: function get() {\n return this.isValid ? $55286cce8d5d6f71$var$possiblyCachedWeekData(this).weekYear : NaN;\n }\n },\n {\n key: \"weekNumber\",\n get: function get() {\n return this.isValid ? $55286cce8d5d6f71$var$possiblyCachedWeekData(this).weekNumber : NaN;\n }\n },\n {\n key: \"weekday\",\n get: function get() {\n return this.isValid ? $55286cce8d5d6f71$var$possiblyCachedWeekData(this).weekday : NaN;\n }\n },\n {\n key: \"isWeekend\",\n get: function get() {\n return this.isValid && this.loc.getWeekendDays().includes(this.weekday);\n }\n },\n {\n key: \"localWeekday\",\n get: function get() {\n return this.isValid ? $55286cce8d5d6f71$var$possiblyCachedLocalWeekData(this).weekday : NaN;\n }\n },\n {\n key: \"localWeekNumber\",\n get: function get() {\n return this.isValid ? $55286cce8d5d6f71$var$possiblyCachedLocalWeekData(this).weekNumber : NaN;\n }\n },\n {\n key: \"localWeekYear\",\n get: function get() {\n return this.isValid ? $55286cce8d5d6f71$var$possiblyCachedLocalWeekData(this).weekYear : NaN;\n }\n },\n {\n key: \"ordinal\",\n get: function get() {\n return this.isValid ? $55286cce8d5d6f71$var$gregorianToOrdinal(this.c).ordinal : NaN;\n }\n },\n {\n key: \"monthShort\",\n get: function get() {\n return this.isValid ? $55286cce8d5d6f71$var$Info.months(\"short\", {\n locObj: this.loc\n })[this.month - 1] : null;\n }\n },\n {\n key: \"monthLong\",\n get: function get() {\n return this.isValid ? $55286cce8d5d6f71$var$Info.months(\"long\", {\n locObj: this.loc\n })[this.month - 1] : null;\n }\n },\n {\n key: \"weekdayShort\",\n get: function get() {\n return this.isValid ? $55286cce8d5d6f71$var$Info.weekdays(\"short\", {\n locObj: this.loc\n })[this.weekday - 1] : null;\n }\n },\n {\n key: \"weekdayLong\",\n get: function get() {\n return this.isValid ? $55286cce8d5d6f71$var$Info.weekdays(\"long\", {\n locObj: this.loc\n })[this.weekday - 1] : null;\n }\n },\n {\n key: \"offset\",\n get: function get() {\n return this.isValid ? +this.o : NaN;\n }\n },\n {\n key: \"offsetNameShort\",\n get: function get() {\n if (this.isValid) return this.zone.offsetName(this.ts, {\n format: \"short\",\n locale: this.locale\n });\n else return null;\n }\n },\n {\n key: \"offsetNameLong\",\n get: function get() {\n if (this.isValid) return this.zone.offsetName(this.ts, {\n format: \"long\",\n locale: this.locale\n });\n else return null;\n }\n },\n {\n key: \"isOffsetFixed\",\n get: function get() {\n return this.isValid ? this.zone.isUniversal : null;\n }\n },\n {\n key: \"isInDST\",\n get: function get() {\n if (this.isOffsetFixed) return false;\n else return this.offset > this.set({\n month: 1,\n day: 1\n }).offset || this.offset > this.set({\n month: 5\n }).offset;\n }\n },\n {\n key: \"isInLeapYear\",\n get: function get() {\n return $55286cce8d5d6f71$var$isLeapYear(this.year);\n }\n },\n {\n key: \"daysInMonth\",\n get: function get() {\n return $55286cce8d5d6f71$var$daysInMonth(this.year, this.month);\n }\n },\n {\n key: \"daysInYear\",\n get: function get() {\n return this.isValid ? $55286cce8d5d6f71$var$daysInYear(this.year) : NaN;\n }\n },\n {\n key: \"weeksInWeekYear\",\n get: function get() {\n return this.isValid ? $55286cce8d5d6f71$var$weeksInWeekYear(this.weekYear) : NaN;\n }\n },\n {\n key: \"weeksInLocalWeekYear\",\n get: function get() {\n return this.isValid ? $55286cce8d5d6f71$var$weeksInWeekYear(this.localWeekYear, this.loc.getMinDaysInFirstWeek(), this.loc.getStartOfWeek()) : NaN;\n }\n }\n ], [\n {\n key: \"DATE_SHORT\",\n get: function get() {\n return $55286cce8d5d6f71$var$DATE_SHORT;\n }\n },\n {\n key: \"DATE_MED\",\n get: function get() {\n return $55286cce8d5d6f71$var$DATE_MED;\n }\n },\n {\n key: \"DATE_MED_WITH_WEEKDAY\",\n get: function get() {\n return $55286cce8d5d6f71$var$DATE_MED_WITH_WEEKDAY;\n }\n },\n {\n key: \"DATE_FULL\",\n get: function get() {\n return $55286cce8d5d6f71$var$DATE_FULL;\n }\n },\n {\n key: \"DATE_HUGE\",\n get: function get() {\n return $55286cce8d5d6f71$var$DATE_HUGE;\n }\n },\n {\n key: \"TIME_SIMPLE\",\n get: function get() {\n return $55286cce8d5d6f71$var$TIME_SIMPLE;\n }\n },\n {\n key: \"TIME_WITH_SECONDS\",\n get: function get() {\n return $55286cce8d5d6f71$var$TIME_WITH_SECONDS;\n }\n },\n {\n key: \"TIME_WITH_SHORT_OFFSET\",\n get: function get() {\n return $55286cce8d5d6f71$var$TIME_WITH_SHORT_OFFSET;\n }\n },\n {\n key: \"TIME_WITH_LONG_OFFSET\",\n get: function get() {\n return $55286cce8d5d6f71$var$TIME_WITH_LONG_OFFSET;\n }\n },\n {\n key: \"TIME_24_SIMPLE\",\n get: function get() {\n return $55286cce8d5d6f71$var$TIME_24_SIMPLE;\n }\n },\n {\n key: \"TIME_24_WITH_SECONDS\",\n get: function get() {\n return $55286cce8d5d6f71$var$TIME_24_WITH_SECONDS;\n }\n },\n {\n key: \"TIME_24_WITH_SHORT_OFFSET\",\n get: function get() {\n return $55286cce8d5d6f71$var$TIME_24_WITH_SHORT_OFFSET;\n }\n },\n {\n key: \"TIME_24_WITH_LONG_OFFSET\",\n get: function get() {\n return $55286cce8d5d6f71$var$TIME_24_WITH_LONG_OFFSET;\n }\n },\n {\n key: \"DATETIME_SHORT\",\n get: function get() {\n return $55286cce8d5d6f71$var$DATETIME_SHORT;\n }\n },\n {\n key: \"DATETIME_SHORT_WITH_SECONDS\",\n get: function get() {\n return $55286cce8d5d6f71$var$DATETIME_SHORT_WITH_SECONDS;\n }\n },\n {\n key: \"DATETIME_MED\",\n get: function get() {\n return $55286cce8d5d6f71$var$DATETIME_MED;\n }\n },\n {\n key: \"DATETIME_MED_WITH_SECONDS\",\n get: function get() {\n return $55286cce8d5d6f71$var$DATETIME_MED_WITH_SECONDS;\n }\n },\n {\n key: \"DATETIME_MED_WITH_WEEKDAY\",\n get: function get() {\n return $55286cce8d5d6f71$var$DATETIME_MED_WITH_WEEKDAY;\n }\n },\n {\n key: \"DATETIME_FULL\",\n get: function get() {\n return $55286cce8d5d6f71$var$DATETIME_FULL;\n }\n },\n {\n key: \"DATETIME_FULL_WITH_SECONDS\",\n get: function get() {\n return $55286cce8d5d6f71$var$DATETIME_FULL_WITH_SECONDS;\n }\n },\n {\n key: \"DATETIME_HUGE\",\n get: function get() {\n return $55286cce8d5d6f71$var$DATETIME_HUGE;\n }\n },\n {\n key: \"DATETIME_HUGE_WITH_SECONDS\",\n get: function get() {\n return $55286cce8d5d6f71$var$DATETIME_HUGE_WITH_SECONDS;\n }\n }\n ]);\n return DateTime;\n}(Symbol.for(\"nodejs.util.inspect.custom\"));\nfunction $55286cce8d5d6f71$var$friendlyDateTime(dateTimeish) {\n if ($55286cce8d5d6f71$var$DateTime.isDateTime(dateTimeish)) return dateTimeish;\n else if (dateTimeish && dateTimeish.valueOf && $55286cce8d5d6f71$var$isNumber(dateTimeish.valueOf())) return $55286cce8d5d6f71$var$DateTime.fromJSDate(dateTimeish);\n else if (dateTimeish && typeof dateTimeish === \"object\") return $55286cce8d5d6f71$var$DateTime.fromObject(dateTimeish);\n else throw new $55286cce8d5d6f71$var$InvalidArgumentError(\"Unknown datetime argument: \" + dateTimeish + \", of type \" + typeof dateTimeish);\n}\nvar $55286cce8d5d6f71$var$VERSION = \"3.4.4\";\nmodule.exports.DateTime = $55286cce8d5d6f71$var$DateTime;\nmodule.exports.Duration = $55286cce8d5d6f71$var$Duration;\nmodule.exports.FixedOffsetZone = $55286cce8d5d6f71$var$FixedOffsetZone;\nmodule.exports.IANAZone = $55286cce8d5d6f71$var$IANAZone;\nmodule.exports.Info = $55286cce8d5d6f71$var$Info;\nmodule.exports.Interval = $55286cce8d5d6f71$var$Interval;\nmodule.exports.InvalidZone = $55286cce8d5d6f71$var$InvalidZone;\nmodule.exports.Settings = $55286cce8d5d6f71$var$Settings;\nmodule.exports.SystemZone = $55286cce8d5d6f71$var$SystemZone;\nmodule.exports.VERSION = $55286cce8d5d6f71$var$VERSION;\nmodule.exports.Zone = $55286cce8d5d6f71$var$Zone;\n\n});\n\n\nparcelRegister(\"3jat5\", function(module, exports) {\n\n$parcel$export(module.exports, \"FormatDateRelativeController\", () => $23343a2e2faa5665$export$a51b1932d3e09d8d);\n$parcel$export(module.exports, \"FormatInputDateController\", () => $23343a2e2faa5665$export$2fcc7e4077f77255);\n\nvar $gffAK = parcelRequire(\"gffAK\");\n\nvar $7jicr = parcelRequire(\"7jicr\");\n\nvar $ixn3l = parcelRequire(\"ixn3l\");\n// In order to be backward compatible,\n// is equivalent to\n// \n// To suppress time, specify data-date-time-style as an empty attribute.\nconst $23343a2e2faa5665$var$DATE_TYPES = [\n \"relative\",\n \"absolute\",\n \"luxon-relative-duration\"\n];\nconst $23343a2e2faa5665$var$DATE_STYLES = [\n \"full\",\n \"long\",\n \"medium\",\n \"short\"\n];\nconst $23343a2e2faa5665$var$TIME_STYLES = [\n \"full\",\n \"long\",\n \"medium\",\n \"short\"\n];\nfunction $23343a2e2faa5665$var$parseDateType(s) {\n for (const variant of $23343a2e2faa5665$var$DATE_TYPES){\n if (variant === s) return variant;\n }\n return \"relative\";\n}\nfunction $23343a2e2faa5665$var$parseDateStyle(s) {\n if (s === \"\") return undefined;\n for (const variant of $23343a2e2faa5665$var$DATE_STYLES){\n if (variant === s) return variant;\n }\n return \"medium\";\n}\nfunction $23343a2e2faa5665$var$parseTimeStyle(s) {\n if (s === \"\") return undefined;\n for (const variant of $23343a2e2faa5665$var$TIME_STYLES){\n if (variant === s) return variant;\n }\n return \"short\";\n}\nclass $23343a2e2faa5665$export$a51b1932d3e09d8d extends (0, $ixn3l.Controller) {\n static #_ = this.values = {\n relativeBase: String\n };\n formatLuxonRelativeDuration(lang, dt, base) {\n let duration = dt.diff(base);\n duration = (0, $7jicr.Duration).fromMillis(// Trim to seconds\n Math.trunc(duration.toMillis() / 1000) * 1000, {\n locale: lang\n }).rescale();\n const opts = {\n unitDisplay: \"narrow\",\n listStyle: \"narrow\",\n type: \"unit\"\n };\n return duration.reconfigure({\n locale: lang\n }).toHuman(opts);\n }\n connect() {\n const dateSpans = document.documentElement.querySelectorAll(\"[data-date]\");\n const render = ()=>{\n const lang = document.documentElement.lang;\n if (lang == null || lang === \"\") return;\n const hasAbs = (0, $gffAK.intlDateTimeFormatIsSupported)();\n const hasRel = (0, $gffAK.intlRelativeTimeFormatIsSupported)();\n let relativeBase = (0, $7jicr.DateTime).now();\n if (this.relativeBaseValue) relativeBase = (0, $7jicr.DateTime).fromISO(this.relativeBaseValue);\n for(let i = 0; i < dateSpans.length; i++){\n const dateSpan = dateSpans[i];\n const rfc3339 = dateSpan.getAttribute(\"data-date\");\n const dateType = $23343a2e2faa5665$var$parseDateType(dateSpan.getAttribute(\"data-date-type\"));\n const dateStyle = $23343a2e2faa5665$var$parseDateStyle(dateSpan.getAttribute(\"data-date-date-style\"));\n const timeStyle = $23343a2e2faa5665$var$parseTimeStyle(dateSpan.getAttribute(\"data-date-time-style\"));\n if (typeof rfc3339 === \"string\") {\n const luxonDatetime = (0, $7jicr.DateTime).fromISO(rfc3339);\n const abs = hasAbs ? luxonDatetime.toLocaleString({\n dateStyle: dateStyle,\n timeStyle: timeStyle\n }, {\n locale: lang\n }) : null;\n const rel = hasRel ? luxonDatetime.toRelative({\n locale: lang,\n base: relativeBase\n }) : null;\n if (dateSpan instanceof HTMLElement) // Display the absolute date time as title (tooltip).\n // This is how GitHub shows date time.\n {\n if (abs != null) dateSpan.title = abs;\n }\n if (dateType === \"relative\") {\n // Prefer showing relative date time,\n // and fallback to absolute date time.\n if (rel != null) dateSpan.textContent = rel;\n else if (abs != null) dateSpan.textContent = abs;\n } else if (dateType === \"luxon-relative-duration\") dateSpan.textContent = this.formatLuxonRelativeDuration(lang, luxonDatetime, relativeBase);\n else if (abs != null) dateSpan.textContent = abs;\n }\n }\n };\n this.render = render.bind(this);\n this.render();\n }\n relativeBaseValueChanged() {\n this.render();\n }\n constructor(...args){\n super(...args);\n this.render = ()=>{};\n }\n}\nclass $23343a2e2faa5665$export$2fcc7e4077f77255 extends (0, $ixn3l.Controller) {\n static #_ = this.values = {\n date: String\n };\n connect() {\n const hasAbs = (0, $gffAK.intlDateTimeFormatIsSupported)();\n if (!hasAbs) return;\n const dateSpan = this.element;\n const rfc3339 = this.dateValue;\n if (rfc3339 !== \"\") {\n const jsDate = new Date(rfc3339);\n if (!isNaN(jsDate.getTime())) dateSpan.textContent = new Intl.DateTimeFormat().format(jsDate);\n }\n }\n}\n\n});\nparcelRegister(\"gffAK\", function(module, exports) {\n\n$parcel$export(module.exports, \"intlDateTimeFormatIsSupported\", () => $e91199fecf823e37$export$69a877e843b1c75d);\n$parcel$export(module.exports, \"intlRelativeTimeFormatIsSupported\", () => $e91199fecf823e37$export$abe7027f27563b68);\nfunction $e91199fecf823e37$export$69a877e843b1c75d() {\n if (\"Intl\" in window && \"DateTimeFormat\" in Intl) {\n const testDate = new Date(\"2006-01-02T03:04:05Z\");\n const testFormat = new Intl.DateTimeFormat(\"en\", {\n dateStyle: \"long\",\n timeStyle: \"long\",\n timeZone: \"UTC\"\n });\n const actual = testFormat.format(testDate);\n const expected = \"January 2, 2006 at 3:04:05 AM UTC\";\n return actual === expected;\n }\n return false;\n}\nfunction $e91199fecf823e37$export$abe7027f27563b68() {\n if (\"Intl\" in window && \"RelativeTimeFormat\" in Intl) return true;\n return false;\n}\n\n});\n\n\nparcelRegister(\"hCQVB\", function(module, exports) {\n\n$parcel$export(module.exports, \"ResendButtonController\", () => $e96299560cefa6ab$export$98bde2dca13b978c);\n\nvar $ixn3l = parcelRequire(\"ixn3l\");\nclass $e96299560cefa6ab$export$98bde2dca13b978c extends (0, $ixn3l.Controller) {\n static #_ = this.values = {\n cooldown: Number,\n label: String,\n labelUnit: String\n };\n connect() {\n const button = this.element;\n const scheduledAt = new Date();\n const cooldown = this.cooldownValue * 1000;\n const label = this.labelValue;\n const labelUnit = this.labelUnitValue;\n const tick = ()=>{\n const now = new Date();\n const timeElapsed = now.getTime() - scheduledAt.getTime();\n let displaySeconds = 0;\n if (timeElapsed <= cooldown) displaySeconds = Math.round((cooldown - timeElapsed) / 1000);\n if (displaySeconds === 0) {\n button.disabled = false;\n button.textContent = label;\n this.animHandle = null;\n } else {\n button.disabled = true;\n button.textContent = labelUnit.replace(\"%d\", String(displaySeconds));\n this.animHandle = requestAnimationFrame(tick);\n }\n };\n this.animHandle = requestAnimationFrame(tick);\n }\n disconnect() {\n if (this.animHandle != null) {\n cancelAnimationFrame(this.animHandle);\n this.animHandle = null;\n }\n }\n}\n\n});\n\nparcelRegister(\"fyuVR\", function(module, exports) {\n\n$parcel$export(module.exports, \"PasswordVisibilityToggleController\", () => $d4ca369f1dba308a$export$df777343f2132381);\n\nvar $ixn3l = parcelRequire(\"ixn3l\");\nclass $d4ca369f1dba308a$export$df777343f2132381 extends (0, $ixn3l.Controller) {\n static #_ = this.targets = [\n \"input\",\n \"showButton\",\n \"hideButton\"\n ];\n show(e) {\n e.preventDefault();\n e.stopImmediatePropagation();\n this.inputTarget.type = \"text\";\n this.showButtonTarget.classList.add(\"hidden\");\n this.hideButtonTarget.classList.remove(\"hidden\");\n }\n hide(e) {\n e.preventDefault();\n e.stopImmediatePropagation();\n this.inputTarget.type = \"password\";\n this.showButtonTarget.classList.remove(\"hidden\");\n this.hideButtonTarget.classList.add(\"hidden\");\n }\n}\n\n});\n\nparcelRegister(\"1NoGS\", function(module, exports) {\n\n$parcel$export(module.exports, \"CopyButtonController\", () => $2acfa7b89ddfb395$export$606a7a71a8f20197);\n\nvar $ixn3l = parcelRequire(\"ixn3l\");\nfunction $2acfa7b89ddfb395$var$copyToClipboard(str) {\n const el = document.createElement(\"textarea\");\n el.value = str;\n // Set non-editable to avoid focus and move outside of view\n el.setAttribute(\"readonly\", \"\");\n el.setAttribute(\"style\", \"position: absolute; left: -9999px\");\n document.body.appendChild(el);\n // Select text inside element\n el.select();\n el.setSelectionRange(0, el.value.length); // for mobile device\n document.execCommand(\"copy\");\n // Remove temporary element\n document.body.removeChild(el);\n}\nclass $2acfa7b89ddfb395$export$606a7a71a8f20197 extends (0, $ixn3l.Controller) {\n static #_ = this.values = {\n source: String,\n copyLabel: String,\n copiedLabel: String\n };\n copy(e) {\n e.preventDefault();\n e.stopPropagation();\n const button = this.element;\n const copyLabel = this.copyLabelValue;\n const copiedLabel = this.copiedLabelValue;\n const target = document.querySelector(this.sourceValue);\n if (target == null) return;\n const textContent = target.textContent;\n if (textContent == null) return;\n $2acfa7b89ddfb395$var$copyToClipboard(textContent);\n // Show feedback\n let currentHandle = this.timeoutHandle;\n // Clear scheduled timeout if the timeout function has NOT been executed yet.\n if (currentHandle != null) {\n window.clearTimeout(currentHandle);\n this.timeoutHandle = null;\n }\n // Changing label as feedback is optional\n if (this.hasCopyLabelValue && this.hasCopiedLabelValue) button.textContent = copiedLabel;\n button.classList.add(\"outline\");\n const newHandle = window.setTimeout(()=>{\n // Changing label as feedback is optional\n if (this.hasCopyLabelValue && this.hasCopiedLabelValue) button.textContent = copyLabel;\n button.classList.remove(\"outline\");\n this.timeoutHandle = null;\n }, 1000);\n this.timeoutHandle = newHandle;\n }\n}\n\n});\n\n\n//# sourceMappingURL=build-authflowv2.861662bd.js.map\n","import { Integrations, getIntegrationsToSetup, initAndBind, getReportDialogEndpoint, getCurrentHub } from '@sentry/core';\nimport { stackParserFromStackParserOptions, supportsFetch, logger, addInstrumentationHandler } from '@sentry/utils';\nimport { BrowserClient } from './client.js';\nimport { WINDOW, wrap as wrap$1 } from './helpers.js';\nimport { GlobalHandlers } from './integrations/globalhandlers.js';\nimport { TryCatch } from './integrations/trycatch.js';\nimport { Breadcrumbs } from './integrations/breadcrumbs.js';\nimport { LinkedErrors } from './integrations/linkederrors.js';\nimport { HttpContext } from './integrations/httpcontext.js';\nimport { Dedupe } from './integrations/dedupe.js';\nimport { defaultStackParser } from './stack-parsers.js';\nimport { makeFetchTransport } from './transports/fetch.js';\nimport { makeXHRTransport } from './transports/xhr.js';\n\nconst defaultIntegrations = [\n new Integrations.InboundFilters(),\n new Integrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new Dedupe(),\n new HttpContext(),\n];\n\n/**\n * A magic string that build tooling can leverage in order to inject a release value into the SDK.\n */\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nfunction init(options = {}) {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value\n if (typeof __SENTRY_RELEASE__ === 'string') {\n options.release = __SENTRY_RELEASE__;\n }\n\n // This supports the variable that sentry-webpack-plugin injects\n if (WINDOW.SENTRY_RELEASE && WINDOW.SENTRY_RELEASE.id) {\n options.release = WINDOW.SENTRY_RELEASE.id;\n }\n }\n if (options.autoSessionTracking === undefined) {\n options.autoSessionTracking = true;\n }\n if (options.sendClientReports === undefined) {\n options.sendClientReports = true;\n }\n\n const clientOptions = {\n ...options,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup(options),\n transport: options.transport || (supportsFetch() ? makeFetchTransport : makeXHRTransport),\n };\n\n initAndBind(BrowserClient, clientOptions);\n\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nfunction showReportDialog(options = {}, hub = getCurrentHub()) {\n // doesn't work without a document (React Native)\n if (!WINDOW.document) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Global document not defined in showReportDialog call');\n return;\n }\n\n const { client, scope } = hub.getStackTop();\n const dsn = options.dsn || (client && client.getDsn());\n if (!dsn) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('DSN not configured for showReportDialog call');\n return;\n }\n\n if (scope) {\n options.user = {\n ...scope.getUser(),\n ...options.user,\n };\n }\n\n if (!options.eventId) {\n options.eventId = hub.lastEventId();\n }\n\n const script = WINDOW.document.createElement('script');\n script.async = true;\n script.crossOrigin = 'anonymous';\n script.src = getReportDialogEndpoint(dsn, options);\n\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n\n const injectionPoint = WINDOW.document.head || WINDOW.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Not injecting report dialog. No injection point found in HTML');\n }\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nfunction forceLoad() {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nfunction onLoad(callback) {\n callback();\n}\n\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @deprecated This function will be removed in v8.\n * It is not part of Sentry's official API and it's easily replaceable by using a try/catch block\n * and calling Sentry.captureException.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\n// TODO(v8): Remove this function\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction wrap(fn) {\n return wrap$1(fn)();\n}\n\nfunction startSessionOnHub(hub) {\n hub.startSession({ ignoreDuration: true });\n hub.captureSession();\n}\n\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\nfunction startSessionTracking() {\n if (typeof WINDOW.document === 'undefined') {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');\n return;\n }\n\n const hub = getCurrentHub();\n\n // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and\n // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are\n // pinned at the same version in package.json, but there are edge cases where it's possible. See\n // https://github.com/getsentry/sentry-javascript/issues/3207 and\n // https://github.com/getsentry/sentry-javascript/issues/3234 and\n // https://github.com/getsentry/sentry-javascript/issues/3278.\n if (!hub.captureSession) {\n return;\n }\n\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n startSessionOnHub(hub);\n\n // We want to create a session for every navigation as well\n addInstrumentationHandler('history', ({ from, to }) => {\n // Don't create an additional session for the initial route or if the location did not change\n if (!(from === undefined || from === to)) {\n startSessionOnHub(getCurrentHub());\n }\n });\n}\n\n/**\n * Captures user feedback and sends it to Sentry.\n */\nfunction captureUserFeedback(feedback) {\n const client = getCurrentHub().getClient();\n if (client) {\n client.captureUserFeedback(feedback);\n }\n}\n\nexport { captureUserFeedback, defaultIntegrations, forceLoad, init, onLoad, showReportDialog, wrap };\n//# sourceMappingURL=sdk.js.map\n","import type { Hub } from '@sentry/core';\nimport {\n getCurrentHub,\n getIntegrationsToSetup,\n getReportDialogEndpoint,\n initAndBind,\n Integrations as CoreIntegrations,\n} from '@sentry/core';\nimport type { UserFeedback } from '@sentry/types';\nimport { addInstrumentationHandler, logger, stackParserFromStackParserOptions, supportsFetch } from '@sentry/utils';\n\nimport type { BrowserClientOptions, BrowserOptions } from './client';\nimport { BrowserClient } from './client';\nimport type { ReportDialogOptions } from './helpers';\nimport { WINDOW, wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, Dedupe, GlobalHandlers, HttpContext, LinkedErrors, TryCatch } from './integrations';\nimport { defaultStackParser } from './stack-parsers';\nimport { makeFetchTransport, makeXHRTransport } from './transports';\n\nexport const defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new Dedupe(),\n new HttpContext(),\n];\n\n/**\n * A magic string that build tooling can leverage in order to inject a release value into the SDK.\n */\ndeclare const __SENTRY_RELEASE__: string | undefined;\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options: BrowserOptions = {}): void {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value\n if (typeof __SENTRY_RELEASE__ === 'string') {\n options.release = __SENTRY_RELEASE__;\n }\n\n // This supports the variable that sentry-webpack-plugin injects\n if (WINDOW.SENTRY_RELEASE && WINDOW.SENTRY_RELEASE.id) {\n options.release = WINDOW.SENTRY_RELEASE.id;\n }\n }\n if (options.autoSessionTracking === undefined) {\n options.autoSessionTracking = true;\n }\n if (options.sendClientReports === undefined) {\n options.sendClientReports = true;\n }\n\n const clientOptions: BrowserClientOptions = {\n ...options,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup(options),\n transport: options.transport || (supportsFetch() ? makeFetchTransport : makeXHRTransport),\n };\n\n initAndBind(BrowserClient, clientOptions);\n\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options: ReportDialogOptions = {}, hub: Hub = getCurrentHub()): void {\n // doesn't work without a document (React Native)\n if (!WINDOW.document) {\n __DEBUG_BUILD__ && logger.error('Global document not defined in showReportDialog call');\n return;\n }\n\n const { client, scope } = hub.getStackTop();\n const dsn = options.dsn || (client && client.getDsn());\n if (!dsn) {\n __DEBUG_BUILD__ && logger.error('DSN not configured for showReportDialog call');\n return;\n }\n\n if (scope) {\n options.user = {\n ...scope.getUser(),\n ...options.user,\n };\n }\n\n if (!options.eventId) {\n options.eventId = hub.lastEventId();\n }\n\n const script = WINDOW.document.createElement('script');\n script.async = true;\n script.crossOrigin = 'anonymous';\n script.src = getReportDialogEndpoint(dsn, options);\n\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n\n const injectionPoint = WINDOW.document.head || WINDOW.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n } else {\n __DEBUG_BUILD__ && logger.error('Not injecting report dialog. No injection point found in HTML');\n }\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n callback();\n}\n\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @deprecated This function will be removed in v8.\n * It is not part of Sentry's official API and it's easily replaceable by using a try/catch block\n * and calling Sentry.captureException.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\n// TODO(v8): Remove this function\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function wrap(fn: (...args: any) => any): any {\n return internalWrap(fn)();\n}\n\nfunction startSessionOnHub(hub: Hub): void {\n hub.startSession({ ignoreDuration: true });\n hub.captureSession();\n}\n\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\nfunction startSessionTracking(): void {\n if (typeof WINDOW.document === 'undefined') {\n __DEBUG_BUILD__ &&\n logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');\n return;\n }\n\n const hub = getCurrentHub();\n\n // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and\n // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are\n // pinned at the same version in package.json, but there are edge cases where it's possible. See\n // https://github.com/getsentry/sentry-javascript/issues/3207 and\n // https://github.com/getsentry/sentry-javascript/issues/3234 and\n // https://github.com/getsentry/sentry-javascript/issues/3278.\n if (!hub.captureSession) {\n return;\n }\n\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n startSessionOnHub(hub);\n\n // We want to create a session for every navigation as well\n addInstrumentationHandler('history', ({ from, to }) => {\n // Don't create an additional session for the initial route or if the location did not change\n if (!(from === undefined || from === to)) {\n startSessionOnHub(getCurrentHub());\n }\n });\n}\n\n/**\n * Captures user feedback and sends it to Sentry.\n */\nexport function captureUserFeedback(feedback: UserFeedback): void {\n const client = getCurrentHub().getClient();\n if (client) {\n client.captureUserFeedback(feedback);\n }\n}\n","import { uuid4, dateTimestampInSeconds, consoleSandbox, logger, GLOBAL_OBJ, getGlobalSingleton } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { Scope } from './scope.js';\nimport { closeSession, makeSession, updateSession } from './session.js';\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\nconst API_VERSION = 4;\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * @inheritDoc\n */\nclass Hub {\n /** Is a {@link Layer}[] containing the client and scope */\n\n /** Contains the last event id of a captured event. */\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n constructor(client, scope = new Scope(), _version = API_VERSION) {this._version = _version;\n this._stack = [{ scope }];\n if (client) {\n this.bindClient(client);\n }\n }\n\n /**\n * @inheritDoc\n */\n isOlderThan(version) {\n return this._version < version;\n }\n\n /**\n * @inheritDoc\n */\n bindClient(client) {\n const top = this.getStackTop();\n top.client = client;\n if (client && client.setupIntegrations) {\n client.setupIntegrations();\n }\n }\n\n /**\n * @inheritDoc\n */\n pushScope() {\n // We want to clone the content of prev scope\n const scope = Scope.clone(this.getScope());\n this.getStack().push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n */\n popScope() {\n if (this.getStack().length <= 1) return false;\n return !!this.getStack().pop();\n }\n\n /**\n * @inheritDoc\n */\n withScope(callback) {\n const scope = this.pushScope();\n try {\n callback(scope);\n } finally {\n this.popScope();\n }\n }\n\n /**\n * @inheritDoc\n */\n getClient() {\n return this.getStackTop().client ;\n }\n\n /** Returns the scope of the top stack. */\n getScope() {\n return this.getStackTop().scope;\n }\n\n /** Returns the scope stack for domains or the process. */\n getStack() {\n return this._stack;\n }\n\n /** Returns the topmost scope layer in the order domain > local > process. */\n getStackTop() {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n captureException(exception, hint) {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n const syntheticException = new Error('Sentry syntheticException');\n this._withClient((client, scope) => {\n client.captureException(\n exception,\n {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n scope,\n );\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n level,\n hint,\n ) {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n const syntheticException = new Error(message);\n this._withClient((client, scope) => {\n client.captureMessage(\n message,\n level,\n {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n scope,\n );\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureEvent(event, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n if (!event.type) {\n this._lastEventId = eventId;\n }\n\n this._withClient((client, scope) => {\n client.captureEvent(event, { ...hint, event_id: eventId }, scope);\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n lastEventId() {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n addBreadcrumb(breadcrumb, hint) {\n const { scope, client } = this.getStackTop();\n\n if (!client) return;\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (client.getOptions && client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) return;\n\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) )\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) return;\n\n if (client.emit) {\n client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n }\n\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n }\n\n /**\n * @inheritDoc\n */\n setUser(user) {\n this.getScope().setUser(user);\n }\n\n /**\n * @inheritDoc\n */\n setTags(tags) {\n this.getScope().setTags(tags);\n }\n\n /**\n * @inheritDoc\n */\n setExtras(extras) {\n this.getScope().setExtras(extras);\n }\n\n /**\n * @inheritDoc\n */\n setTag(key, value) {\n this.getScope().setTag(key, value);\n }\n\n /**\n * @inheritDoc\n */\n setExtra(key, extra) {\n this.getScope().setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setContext(name, context) {\n this.getScope().setContext(name, context);\n }\n\n /**\n * @inheritDoc\n */\n configureScope(callback) {\n const { scope, client } = this.getStackTop();\n if (client) {\n callback(scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n run(callback) {\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n */\n getIntegration(integration) {\n const client = this.getClient();\n if (!client) return null;\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n startTransaction(context, customSamplingContext) {\n const result = this._callExtensionMethod('startTransaction', context, customSamplingContext);\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && !result) {\n const client = this.getClient();\n if (!client) {\n // eslint-disable-next-line no-console\n console.warn(\n \"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'\",\n );\n } else {\n // eslint-disable-next-line no-console\n console.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n`);\n }\n }\n\n return result;\n }\n\n /**\n * @inheritDoc\n */\n traceHeaders() {\n return this._callExtensionMethod('traceHeaders');\n }\n\n /**\n * @inheritDoc\n */\n captureSession(endSession = false) {\n // both send the update and pull the session from the scope\n if (endSession) {\n return this.endSession();\n }\n\n // only send the update\n this._sendSessionUpdate();\n }\n\n /**\n * @inheritDoc\n */\n endSession() {\n const layer = this.getStackTop();\n const scope = layer.scope;\n const session = scope.getSession();\n if (session) {\n closeSession(session);\n }\n this._sendSessionUpdate();\n\n // the session is over; take it off of the scope\n scope.setSession();\n }\n\n /**\n * @inheritDoc\n */\n startSession(context) {\n const { scope, client } = this.getStackTop();\n const { release, environment = DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n const session = makeSession({\n release,\n environment,\n user: scope.getUser(),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n // End existing session if there's one\n const currentSession = scope.getSession && scope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n updateSession(currentSession, { status: 'exited' });\n }\n this.endSession();\n\n // Afterwards we set the new session on the scope\n scope.setSession(session);\n\n return session;\n }\n\n /**\n * Returns if default PII should be sent to Sentry and propagated in ourgoing requests\n * when Tracing is used.\n */\n shouldSendDefaultPii() {\n const client = this.getClient();\n const options = client && client.getOptions();\n return Boolean(options && options.sendDefaultPii);\n }\n\n /**\n * Sends the current Session on the scope\n */\n _sendSessionUpdate() {\n const { scope, client } = this.getStackTop();\n\n const session = scope.getSession();\n if (session && client && client.captureSession) {\n client.captureSession(session);\n }\n }\n\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n _withClient(callback) {\n const { scope, client } = this.getStackTop();\n if (client) {\n callback(client, scope);\n }\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-expect-error Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _callExtensionMethod(method, ...args) {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nfunction getMainCarrier() {\n GLOBAL_OBJ.__SENTRY__ = GLOBAL_OBJ.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return GLOBAL_OBJ;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nfunction makeMain(hub) {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nfunction getCurrentHub() {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n const hub = registry.__SENTRY__.acs.getCurrentHub();\n\n if (hub) {\n return hub;\n }\n }\n\n // Return hub that lives on a global object\n return getGlobalHub(registry);\n}\n\nfunction getGlobalHub(registry = getMainCarrier()) {\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * If the carrier does not contain a hub, a new hub is created with the global hub client and scope.\n */\nfunction ensureHubOnCarrier(carrier, parent = getGlobalHub()) {\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(carrier) || getHubFromCarrier(carrier).isOlderThan(API_VERSION)) {\n const globalHubTopStack = parent.getStackTop();\n setHubOnCarrier(carrier, new Hub(globalHubTopStack.client, Scope.clone(globalHubTopStack.scope)));\n }\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */\nfunction setAsyncContextStrategy(strategy) {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n registry.__SENTRY__ = registry.__SENTRY__ || {};\n registry.__SENTRY__.acs = strategy;\n}\n\n/**\n * Runs the supplied callback in its own async context. Async Context strategies are defined per SDK.\n *\n * @param callback The callback to run in its own async context\n * @param options Options to pass to the async context strategy\n * @returns The result of the callback\n */\nfunction runWithAsyncContext(callback, options = {}) {\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n return registry.__SENTRY__.acs.runWithAsyncContext(callback, options);\n }\n\n // if there was no strategy, fallback to just calling the callback\n return callback();\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nfunction getHubFromCarrier(carrier) {\n return getGlobalSingleton('hub', () => new Hub(), carrier);\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n * @returns A boolean indicating success or failure\n */\nfunction setHubOnCarrier(carrier, hub) {\n if (!carrier) return false;\n const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n __SENTRY__.hub = hub;\n return true;\n}\n\nexport { API_VERSION, Hub, ensureHubOnCarrier, getCurrentHub, getHubFromCarrier, getMainCarrier, makeMain, runWithAsyncContext, setAsyncContextStrategy, setHubOnCarrier };\n//# sourceMappingURL=hub.js.map\n","/* eslint-disable max-lines */\nimport type {\n Breadcrumb,\n BreadcrumbHint,\n Client,\n CustomSamplingContext,\n Event,\n EventHint,\n Extra,\n Extras,\n Hub as HubInterface,\n Integration,\n IntegrationClass,\n Primitive,\n Session,\n SessionContext,\n Severity,\n SeverityLevel,\n Transaction,\n TransactionContext,\n User,\n} from '@sentry/types';\nimport { consoleSandbox, dateTimestampInSeconds, getGlobalSingleton, GLOBAL_OBJ, logger, uuid4 } from '@sentry/utils';\n\nimport { DEFAULT_ENVIRONMENT } from './constants';\nimport { Scope } from './scope';\nimport { closeSession, makeSession, updateSession } from './session';\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\nexport const API_VERSION = 4;\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\nexport interface RunWithAsyncContextOptions {\n /** Whether to reuse an existing async context if one exists. Defaults to false. */\n reuseExisting?: boolean;\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Strategy used to track async context.\n */\nexport interface AsyncContextStrategy {\n /**\n * Gets the current async context. Returns undefined if there is no current async context.\n */\n getCurrentHub: () => Hub | undefined;\n /**\n * Runs the supplied callback in its own async context.\n */\n runWithAsyncContext(callback: () => T, options: RunWithAsyncContextOptions): T;\n}\n\n/**\n * A layer in the process stack.\n * @hidden\n */\nexport interface Layer {\n client?: Client;\n scope: Scope;\n}\n\n/**\n * An object that contains a hub and maintains a scope stack.\n * @hidden\n */\nexport interface Carrier {\n __SENTRY__?: {\n hub?: Hub;\n acs?: AsyncContextStrategy;\n /**\n * Extra Hub properties injected by various SDKs\n */\n integrations?: Integration[];\n extensions?: {\n /** Extension methods for the hub, which are bound to the current Hub instance */\n // eslint-disable-next-line @typescript-eslint/ban-types\n [key: string]: Function;\n };\n };\n}\n\n/**\n * @inheritDoc\n */\nexport class Hub implements HubInterface {\n /** Is a {@link Layer}[] containing the client and scope */\n private readonly _stack: Layer[];\n\n /** Contains the last event id of a captured event. */\n private _lastEventId?: string;\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n public constructor(client?: Client, scope: Scope = new Scope(), private readonly _version: number = API_VERSION) {\n this._stack = [{ scope }];\n if (client) {\n this.bindClient(client);\n }\n }\n\n /**\n * @inheritDoc\n */\n public isOlderThan(version: number): boolean {\n return this._version < version;\n }\n\n /**\n * @inheritDoc\n */\n public bindClient(client?: Client): void {\n const top = this.getStackTop();\n top.client = client;\n if (client && client.setupIntegrations) {\n client.setupIntegrations();\n }\n }\n\n /**\n * @inheritDoc\n */\n public pushScope(): Scope {\n // We want to clone the content of prev scope\n const scope = Scope.clone(this.getScope());\n this.getStack().push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n */\n public popScope(): boolean {\n if (this.getStack().length <= 1) return false;\n return !!this.getStack().pop();\n }\n\n /**\n * @inheritDoc\n */\n public withScope(callback: (scope: Scope) => void): void {\n const scope = this.pushScope();\n try {\n callback(scope);\n } finally {\n this.popScope();\n }\n }\n\n /**\n * @inheritDoc\n */\n public getClient(): C | undefined {\n return this.getStackTop().client as C;\n }\n\n /** Returns the scope of the top stack. */\n public getScope(): Scope {\n return this.getStackTop().scope;\n }\n\n /** Returns the scope stack for domains or the process. */\n public getStack(): Layer[] {\n return this._stack;\n }\n\n /** Returns the topmost scope layer in the order domain > local > process. */\n public getStackTop(): Layer {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n public captureException(exception: unknown, hint?: EventHint): string {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n const syntheticException = new Error('Sentry syntheticException');\n this._withClient((client, scope) => {\n client.captureException(\n exception,\n {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n scope,\n );\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(\n message: string,\n // eslint-disable-next-line deprecation/deprecation\n level?: Severity | SeverityLevel,\n hint?: EventHint,\n ): string {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n const syntheticException = new Error(message);\n this._withClient((client, scope) => {\n client.captureMessage(\n message,\n level,\n {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n scope,\n );\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint): string {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n if (!event.type) {\n this._lastEventId = eventId;\n }\n\n this._withClient((client, scope) => {\n client.captureEvent(event, { ...hint, event_id: eventId }, scope);\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public lastEventId(): string | undefined {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void {\n const { scope, client } = this.getStackTop();\n\n if (!client) return;\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (client.getOptions && client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) return;\n\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) as Breadcrumb | null)\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) return;\n\n if (client.emit) {\n client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n }\n\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): void {\n this.getScope().setUser(user);\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: Primitive }): void {\n this.getScope().setTags(tags);\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: Extras): void {\n this.getScope().setExtras(extras);\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: Primitive): void {\n this.getScope().setTag(key, value);\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: Extra): void {\n this.getScope().setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public setContext(name: string, context: { [key: string]: any } | null): void {\n this.getScope().setContext(name, context);\n }\n\n /**\n * @inheritDoc\n */\n public configureScope(callback: (scope: Scope) => void): void {\n const { scope, client } = this.getStackTop();\n if (client) {\n callback(scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n public run(callback: (hub: Hub) => void): void {\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n const client = this.getClient();\n if (!client) return null;\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n __DEBUG_BUILD__ && logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n public startTransaction(context: TransactionContext, customSamplingContext?: CustomSamplingContext): Transaction {\n const result = this._callExtensionMethod('startTransaction', context, customSamplingContext);\n\n if (__DEBUG_BUILD__ && !result) {\n const client = this.getClient();\n if (!client) {\n // eslint-disable-next-line no-console\n console.warn(\n \"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'\",\n );\n } else {\n // eslint-disable-next-line no-console\n console.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n`);\n }\n }\n\n return result;\n }\n\n /**\n * @inheritDoc\n */\n public traceHeaders(): { [key: string]: string } {\n return this._callExtensionMethod<{ [key: string]: string }>('traceHeaders');\n }\n\n /**\n * @inheritDoc\n */\n public captureSession(endSession: boolean = false): void {\n // both send the update and pull the session from the scope\n if (endSession) {\n return this.endSession();\n }\n\n // only send the update\n this._sendSessionUpdate();\n }\n\n /**\n * @inheritDoc\n */\n public endSession(): void {\n const layer = this.getStackTop();\n const scope = layer.scope;\n const session = scope.getSession();\n if (session) {\n closeSession(session);\n }\n this._sendSessionUpdate();\n\n // the session is over; take it off of the scope\n scope.setSession();\n }\n\n /**\n * @inheritDoc\n */\n public startSession(context?: SessionContext): Session {\n const { scope, client } = this.getStackTop();\n const { release, environment = DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n const session = makeSession({\n release,\n environment,\n user: scope.getUser(),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n // End existing session if there's one\n const currentSession = scope.getSession && scope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n updateSession(currentSession, { status: 'exited' });\n }\n this.endSession();\n\n // Afterwards we set the new session on the scope\n scope.setSession(session);\n\n return session;\n }\n\n /**\n * Returns if default PII should be sent to Sentry and propagated in ourgoing requests\n * when Tracing is used.\n */\n public shouldSendDefaultPii(): boolean {\n const client = this.getClient();\n const options = client && client.getOptions();\n return Boolean(options && options.sendDefaultPii);\n }\n\n /**\n * Sends the current Session on the scope\n */\n private _sendSessionUpdate(): void {\n const { scope, client } = this.getStackTop();\n\n const session = scope.getSession();\n if (session && client && client.captureSession) {\n client.captureSession(session);\n }\n }\n\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n private _withClient(callback: (client: Client, scope: Scope) => void): void {\n const { scope, client } = this.getStackTop();\n if (client) {\n callback(client, scope);\n }\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-expect-error Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _callExtensionMethod(method: string, ...args: any[]): T {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n __DEBUG_BUILD__ && logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nexport function getMainCarrier(): Carrier {\n GLOBAL_OBJ.__SENTRY__ = GLOBAL_OBJ.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return GLOBAL_OBJ;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nexport function makeMain(hub: Hub): Hub {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nexport function getCurrentHub(): Hub {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n const hub = registry.__SENTRY__.acs.getCurrentHub();\n\n if (hub) {\n return hub;\n }\n }\n\n // Return hub that lives on a global object\n return getGlobalHub(registry);\n}\n\nfunction getGlobalHub(registry: Carrier = getMainCarrier()): Hub {\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * If the carrier does not contain a hub, a new hub is created with the global hub client and scope.\n */\nexport function ensureHubOnCarrier(carrier: Carrier, parent: Hub = getGlobalHub()): void {\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(carrier) || getHubFromCarrier(carrier).isOlderThan(API_VERSION)) {\n const globalHubTopStack = parent.getStackTop();\n setHubOnCarrier(carrier, new Hub(globalHubTopStack.client, Scope.clone(globalHubTopStack.scope)));\n }\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */\nexport function setAsyncContextStrategy(strategy: AsyncContextStrategy | undefined): void {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n registry.__SENTRY__ = registry.__SENTRY__ || {};\n registry.__SENTRY__.acs = strategy;\n}\n\n/**\n * Runs the supplied callback in its own async context. Async Context strategies are defined per SDK.\n *\n * @param callback The callback to run in its own async context\n * @param options Options to pass to the async context strategy\n * @returns The result of the callback\n */\nexport function runWithAsyncContext(callback: () => T, options: RunWithAsyncContextOptions = {}): T {\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n return registry.__SENTRY__.acs.runWithAsyncContext(callback, options);\n }\n\n // if there was no strategy, fallback to just calling the callback\n return callback();\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier: Carrier): boolean {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nexport function getHubFromCarrier(carrier: Carrier): Hub {\n return getGlobalSingleton('hub', () => new Hub(), carrier);\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n * @returns A boolean indicating success or failure\n */\nexport function setHubOnCarrier(carrier: Carrier, hub: Hub): boolean {\n if (!carrier) return false;\n const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n __SENTRY__.hub = hub;\n return true;\n}\n","import { GLOBAL_OBJ } from './worldwide.js';\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\nconst CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'] ;\n\n/** This may be mutated by the console instrumentation. */\nconst originalConsoleMethods\n\n = {};\n\n/** JSDoc */\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nfunction consoleSandbox(callback) {\n if (!('console' in GLOBAL_OBJ)) {\n return callback();\n }\n\n const console = GLOBAL_OBJ.console ;\n const wrappedFuncs = {};\n\n const wrappedLevels = Object.keys(originalConsoleMethods) ;\n\n // Restore all wrapped console methods\n wrappedLevels.forEach(level => {\n const originalConsoleMethod = originalConsoleMethods[level] ;\n wrappedFuncs[level] = console[level] ;\n console[level] = originalConsoleMethod;\n });\n\n try {\n return callback();\n } finally {\n // Revert restoration to wrapped state\n wrappedLevels.forEach(level => {\n console[level] = wrappedFuncs[level] ;\n });\n }\n}\n\nfunction makeLogger() {\n let enabled = false;\n const logger = {\n enable: () => {\n enabled = true;\n },\n disable: () => {\n enabled = false;\n },\n isEnabled: () => enabled,\n };\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n CONSOLE_LEVELS.forEach(name => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logger[name] = (...args) => {\n if (enabled) {\n consoleSandbox(() => {\n GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);\n });\n }\n };\n });\n } else {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = () => undefined;\n });\n }\n\n return logger ;\n}\n\nconst logger = makeLogger();\n\nexport { CONSOLE_LEVELS, consoleSandbox, logger, originalConsoleMethods };\n//# sourceMappingURL=logger.js.map\n","import { GLOBAL_OBJ } from './worldwide';\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\nexport const CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'] as const;\nexport type ConsoleLevel = (typeof CONSOLE_LEVELS)[number];\n\ntype LoggerMethod = (...args: unknown[]) => void;\ntype LoggerConsoleMethods = Record;\n\n/** This may be mutated by the console instrumentation. */\nexport const originalConsoleMethods: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key in ConsoleLevel]?: (...args: any[]) => void;\n} = {};\n\n/** JSDoc */\ninterface Logger extends LoggerConsoleMethods {\n disable(): void;\n enable(): void;\n isEnabled(): boolean;\n}\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nexport function consoleSandbox(callback: () => T): T {\n if (!('console' in GLOBAL_OBJ)) {\n return callback();\n }\n\n const console = GLOBAL_OBJ.console as Console;\n const wrappedFuncs: Partial = {};\n\n const wrappedLevels = Object.keys(originalConsoleMethods) as ConsoleLevel[];\n\n // Restore all wrapped console methods\n wrappedLevels.forEach(level => {\n const originalConsoleMethod = originalConsoleMethods[level] as LoggerMethod;\n wrappedFuncs[level] = console[level] as LoggerMethod | undefined;\n console[level] = originalConsoleMethod;\n });\n\n try {\n return callback();\n } finally {\n // Revert restoration to wrapped state\n wrappedLevels.forEach(level => {\n console[level] = wrappedFuncs[level] as LoggerMethod;\n });\n }\n}\n\nfunction makeLogger(): Logger {\n let enabled = false;\n const logger: Partial = {\n enable: () => {\n enabled = true;\n },\n disable: () => {\n enabled = false;\n },\n isEnabled: () => enabled,\n };\n\n if (__DEBUG_BUILD__) {\n CONSOLE_LEVELS.forEach(name => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logger[name] = (...args: any[]) => {\n if (enabled) {\n consoleSandbox(() => {\n GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);\n });\n }\n };\n });\n } else {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = () => undefined;\n });\n }\n\n return logger as Logger;\n}\n\nexport const logger = makeLogger();\n","/** Internal global with common properties and Sentry extensions */\n\n// The code below for 'isGlobalObj' and 'GLOBAL_OBJ' was copied from core-js before modification\n// https://github.com/zloirock/core-js/blob/1b944df55282cdc99c90db5f49eb0b6eda2cc0a3/packages/core-js/internals/global.js\n// core-js has the following licence:\n//\n// Copyright (c) 2014-2022 Denis Pushkarev\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/** Returns 'obj' if it's the global object, otherwise returns undefined */\nfunction isGlobalObj(obj) {\n return obj && obj.Math == Math ? obj : undefined;\n}\n\n/** Get's the global object for the current JavaScript runtime */\nconst GLOBAL_OBJ =\n (typeof globalThis == 'object' && isGlobalObj(globalThis)) ||\n // eslint-disable-next-line no-restricted-globals\n (typeof window == 'object' && isGlobalObj(window)) ||\n (typeof self == 'object' && isGlobalObj(self)) ||\n (typeof global == 'object' && isGlobalObj(global)) ||\n (function () {\n return this;\n })() ||\n {};\n\n/**\n * @deprecated Use GLOBAL_OBJ instead or WINDOW from @sentry/browser. This will be removed in v8\n */\nfunction getGlobalObject() {\n return GLOBAL_OBJ ;\n}\n\n/**\n * Returns a global singleton contained in the global `__SENTRY__` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value\n * @returns the singleton\n */\nfunction getGlobalSingleton(name, creator, obj) {\n const gbl = (obj || GLOBAL_OBJ) ;\n const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n}\n\nexport { GLOBAL_OBJ, getGlobalObject, getGlobalSingleton };\n//# sourceMappingURL=worldwide.js.map\n","/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n *\n * Note: This file was originally called `global.ts`, but was changed to unblock users which might be doing\n * string replaces with bundlers like Vite for `global` (would break imports that rely on importing from utils/src/global).\n *\n * Why worldwide?\n *\n * Why not?\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { Integration } from '@sentry/types';\n\nimport type { SdkSource } from './env';\n\n/** Internal global with common properties and Sentry extensions */\nexport interface InternalGlobal {\n navigator?: { userAgent?: string };\n console: Console;\n Sentry?: {\n Integrations?: Integration[];\n };\n onerror?: {\n (msg: unknown, url: unknown, line: unknown, column: unknown, error: unknown): boolean;\n __SENTRY_INSTRUMENTED__?: true;\n __SENTRY_LOADER__?: true;\n };\n onunhandledrejection?: {\n (event: unknown): boolean;\n __SENTRY_INSTRUMENTED__?: true;\n __SENTRY_LOADER__?: true;\n };\n SENTRY_ENVIRONMENT?: string;\n SENTRY_DSN?: string;\n SENTRY_RELEASE?: {\n id?: string;\n };\n SENTRY_SDK_SOURCE?: SdkSource;\n /**\n * Debug IDs are indirectly injected by Sentry CLI or bundler plugins to directly reference a particular source map\n * for resolving of a source file. The injected code will place an entry into the record for each loaded bundle/JS\n * file.\n */\n _sentryDebugIds?: Record;\n __SENTRY__: {\n globalEventProcessors: any;\n hub: any;\n logger: any;\n extensions?: {\n /** Extension methods for the hub, which are bound to the current Hub instance */\n // eslint-disable-next-line @typescript-eslint/ban-types\n [key: string]: Function;\n };\n };\n /**\n * Raw module metadata that is injected by bundler plugins.\n *\n * Keys are `error.stack` strings, values are the metadata.\n */\n _sentryModuleMetadata?: Record;\n}\n\n// The code below for 'isGlobalObj' and 'GLOBAL_OBJ' was copied from core-js before modification\n// https://github.com/zloirock/core-js/blob/1b944df55282cdc99c90db5f49eb0b6eda2cc0a3/packages/core-js/internals/global.js\n// core-js has the following licence:\n//\n// Copyright (c) 2014-2022 Denis Pushkarev\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/** Returns 'obj' if it's the global object, otherwise returns undefined */\nfunction isGlobalObj(obj: { Math?: Math }): any | undefined {\n return obj && obj.Math == Math ? obj : undefined;\n}\n\n/** Get's the global object for the current JavaScript runtime */\nexport const GLOBAL_OBJ: InternalGlobal =\n (typeof globalThis == 'object' && isGlobalObj(globalThis)) ||\n // eslint-disable-next-line no-restricted-globals\n (typeof window == 'object' && isGlobalObj(window)) ||\n (typeof self == 'object' && isGlobalObj(self)) ||\n (typeof global == 'object' && isGlobalObj(global)) ||\n (function (this: any) {\n return this;\n })() ||\n {};\n\n/**\n * @deprecated Use GLOBAL_OBJ instead or WINDOW from @sentry/browser. This will be removed in v8\n */\nexport function getGlobalObject(): T & InternalGlobal {\n return GLOBAL_OBJ as T & InternalGlobal;\n}\n\n/**\n * Returns a global singleton contained in the global `__SENTRY__` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value\n * @returns the singleton\n */\nexport function getGlobalSingleton(name: keyof InternalGlobal['__SENTRY__'], creator: () => T, obj?: unknown): T {\n const gbl = (obj || GLOBAL_OBJ) as InternalGlobal;\n const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n}\n","import { isNodeEnv, dynamicRequire } from './node.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\n/**\n * An object that can return the current timestamp in seconds since the UNIX epoch.\n */\n\n/**\n * A TimestampSource implementation for environments that do not support the Performance Web API natively.\n *\n * Note that this TimestampSource does not use a monotonic clock. A call to `nowSeconds` may return a timestamp earlier\n * than a previously returned value. We do not try to emulate a monotonic behavior in order to facilitate debugging. It\n * is more obvious to explain \"why does my span have negative duration\" than \"why my spans have zero duration\".\n */\nconst dateTimestampSource = {\n nowSeconds: () => Date.now() / 1000,\n};\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\n\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction getBrowserPerformance() {\n const { performance } = WINDOW;\n if (!performance || !performance.now) {\n return undefined;\n }\n\n // Replace performance.timeOrigin with our own timeOrigin based on Date.now().\n //\n // This is a partial workaround for browsers reporting performance.timeOrigin such that performance.timeOrigin +\n // performance.now() gives a date arbitrarily in the past.\n //\n // Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is\n // undefined.\n //\n // The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to\n // interact with data coming out of performance entries.\n //\n // Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that\n // might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes\n // performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have\n // observed skews that can be as long as days, weeks or months.\n //\n // See https://github.com/getsentry/sentry-javascript/issues/2590.\n //\n // BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload\n // transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation\n // transactions of long-lived web pages.\n const timeOrigin = Date.now() - performance.now();\n\n return {\n now: () => performance.now(),\n timeOrigin,\n };\n}\n\n/**\n * Returns the native Performance API implementation from Node.js. Returns undefined in old Node.js versions that don't\n * implement the API.\n */\nfunction getNodePerformance() {\n try {\n const perfHooks = dynamicRequire(module, 'perf_hooks') ;\n return perfHooks.performance;\n } catch (_) {\n return undefined;\n }\n}\n\n/**\n * The Performance API implementation for the current platform, if available.\n */\nconst platformPerformance = isNodeEnv() ? getNodePerformance() : getBrowserPerformance();\n\nconst timestampSource =\n platformPerformance === undefined\n ? dateTimestampSource\n : {\n nowSeconds: () => (platformPerformance.timeOrigin + platformPerformance.now()) / 1000,\n };\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n */\nconst dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSource);\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * See `usingPerformanceAPI` to test whether the Performance API is used.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nconst timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource);\n\n/**\n * Re-exported with an old name for backwards-compatibility.\n * TODO (v8): Remove this\n *\n * @deprecated Use `timestampInSeconds` instead.\n */\nconst timestampWithMs = timestampInSeconds;\n\n/**\n * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.\n */\nconst usingPerformanceAPI = platformPerformance !== undefined;\n\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n */\nlet _browserPerformanceTimeOriginMode;\n\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nconst browserPerformanceTimeOrigin = (() => {\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n\n const { performance } = WINDOW;\n if (!performance || !performance.now) {\n _browserPerformanceTimeOriginMode = 'none';\n return undefined;\n }\n\n const threshold = 3600 * 1000;\n const performanceNow = performance.now();\n const dateNow = Date.now();\n\n // if timeOrigin isn't available set delta to threshold so it isn't used\n const timeOriginDelta = performance.timeOrigin\n ? Math.abs(performance.timeOrigin + performanceNow - dateNow)\n : threshold;\n const timeOriginIsReliable = timeOriginDelta < threshold;\n\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n const navigationStart = performance.timing && performance.timing.navigationStart;\n const hasNavigationStart = typeof navigationStart === 'number';\n // if navigationStart isn't available set delta to threshold so it isn't used\n const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n const navigationStartIsReliable = navigationStartDelta < threshold;\n\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n _browserPerformanceTimeOriginMode = 'timeOrigin';\n return performance.timeOrigin;\n } else {\n _browserPerformanceTimeOriginMode = 'navigationStart';\n return navigationStart;\n }\n }\n\n // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n _browserPerformanceTimeOriginMode = 'dateNow';\n return dateNow;\n})();\n\nexport { _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds, timestampWithMs, usingPerformanceAPI };\n//# sourceMappingURL=time.js.map\n","import { dynamicRequire, isNodeEnv } from './node';\nimport { getGlobalObject } from './worldwide';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\n/**\n * An object that can return the current timestamp in seconds since the UNIX epoch.\n */\ninterface TimestampSource {\n nowSeconds(): number;\n}\n\n/**\n * A TimestampSource implementation for environments that do not support the Performance Web API natively.\n *\n * Note that this TimestampSource does not use a monotonic clock. A call to `nowSeconds` may return a timestamp earlier\n * than a previously returned value. We do not try to emulate a monotonic behavior in order to facilitate debugging. It\n * is more obvious to explain \"why does my span have negative duration\" than \"why my spans have zero duration\".\n */\nconst dateTimestampSource: TimestampSource = {\n nowSeconds: () => Date.now() / 1000,\n};\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\ninterface Performance {\n /**\n * The millisecond timestamp at which measurement began, measured in Unix time.\n */\n timeOrigin: number;\n /**\n * Returns the current millisecond timestamp, where 0 represents the start of measurement.\n */\n now(): number;\n}\n\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction getBrowserPerformance(): Performance | undefined {\n const { performance } = WINDOW;\n if (!performance || !performance.now) {\n return undefined;\n }\n\n // Replace performance.timeOrigin with our own timeOrigin based on Date.now().\n //\n // This is a partial workaround for browsers reporting performance.timeOrigin such that performance.timeOrigin +\n // performance.now() gives a date arbitrarily in the past.\n //\n // Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is\n // undefined.\n //\n // The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to\n // interact with data coming out of performance entries.\n //\n // Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that\n // might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes\n // performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have\n // observed skews that can be as long as days, weeks or months.\n //\n // See https://github.com/getsentry/sentry-javascript/issues/2590.\n //\n // BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload\n // transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation\n // transactions of long-lived web pages.\n const timeOrigin = Date.now() - performance.now();\n\n return {\n now: () => performance.now(),\n timeOrigin,\n };\n}\n\n/**\n * Returns the native Performance API implementation from Node.js. Returns undefined in old Node.js versions that don't\n * implement the API.\n */\nfunction getNodePerformance(): Performance | undefined {\n try {\n const perfHooks = dynamicRequire(module, 'perf_hooks') as { performance: Performance };\n return perfHooks.performance;\n } catch (_) {\n return undefined;\n }\n}\n\n/**\n * The Performance API implementation for the current platform, if available.\n */\nconst platformPerformance: Performance | undefined = isNodeEnv() ? getNodePerformance() : getBrowserPerformance();\n\nconst timestampSource: TimestampSource =\n platformPerformance === undefined\n ? dateTimestampSource\n : {\n nowSeconds: () => (platformPerformance.timeOrigin + platformPerformance.now()) / 1000,\n };\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n */\nexport const dateTimestampInSeconds: () => number = dateTimestampSource.nowSeconds.bind(dateTimestampSource);\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * See `usingPerformanceAPI` to test whether the Performance API is used.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nexport const timestampInSeconds: () => number = timestampSource.nowSeconds.bind(timestampSource);\n\n/**\n * Re-exported with an old name for backwards-compatibility.\n * TODO (v8): Remove this\n *\n * @deprecated Use `timestampInSeconds` instead.\n */\nexport const timestampWithMs = timestampInSeconds;\n\n/**\n * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.\n */\nexport const usingPerformanceAPI = platformPerformance !== undefined;\n\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n */\nexport let _browserPerformanceTimeOriginMode: string;\n\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nexport const browserPerformanceTimeOrigin = ((): number | undefined => {\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n\n const { performance } = WINDOW;\n if (!performance || !performance.now) {\n _browserPerformanceTimeOriginMode = 'none';\n return undefined;\n }\n\n const threshold = 3600 * 1000;\n const performanceNow = performance.now();\n const dateNow = Date.now();\n\n // if timeOrigin isn't available set delta to threshold so it isn't used\n const timeOriginDelta = performance.timeOrigin\n ? Math.abs(performance.timeOrigin + performanceNow - dateNow)\n : threshold;\n const timeOriginIsReliable = timeOriginDelta < threshold;\n\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n const navigationStart = performance.timing && performance.timing.navigationStart;\n const hasNavigationStart = typeof navigationStart === 'number';\n // if navigationStart isn't available set delta to threshold so it isn't used\n const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n const navigationStartIsReliable = navigationStartDelta < threshold;\n\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n _browserPerformanceTimeOriginMode = 'timeOrigin';\n return performance.timeOrigin;\n } else {\n _browserPerformanceTimeOriginMode = 'navigationStart';\n return navigationStart;\n }\n }\n\n // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n _browserPerformanceTimeOriginMode = 'dateNow';\n return dateNow;\n})();\n","import { isBrowserBundle } from './env.js';\n\n/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n */\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nfunction isNodeEnv() {\n // explicitly check for browser bundles as those can be optimized statically\n // by terser/rollup.\n return (\n !isBrowserBundle() &&\n Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'\n );\n}\n\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\nfunction dynamicRequire(mod, request) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\n}\n\n/**\n * Helper for dynamically loading module that should work with linked dependencies.\n * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`\n * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during\n * build time. `require.resolve` is also not available in any other way, so we cannot create,\n * a fake helper like we do with `dynamicRequire`.\n *\n * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.\n * That is to mimic the behavior of `require.resolve` exactly.\n *\n * @param moduleName module name to require\n * @returns possibly required module\n */\nfunction loadModule(moduleName) {\n let mod;\n\n try {\n mod = dynamicRequire(module, moduleName);\n } catch (e) {\n // no-empty\n }\n\n try {\n const { cwd } = dynamicRequire(module, 'process');\n mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`) ;\n } catch (e) {\n // no-empty\n }\n\n return mod;\n}\n\nexport { dynamicRequire, isNodeEnv, loadModule };\n//# sourceMappingURL=node.js.map\n","/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n */\n\nimport { isBrowserBundle } from './env';\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv(): boolean {\n // explicitly check for browser bundles as those can be optimized statically\n // by terser/rollup.\n return (\n !isBrowserBundle() &&\n Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'\n );\n}\n\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\nexport function dynamicRequire(mod: any, request: string): any {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\n}\n\n/**\n * Helper for dynamically loading module that should work with linked dependencies.\n * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`\n * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during\n * build time. `require.resolve` is also not available in any other way, so we cannot create,\n * a fake helper like we do with `dynamicRequire`.\n *\n * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.\n * That is to mimic the behavior of `require.resolve` exactly.\n *\n * @param moduleName module name to require\n * @returns possibly required module\n */\nexport function loadModule(moduleName: string): T | undefined {\n let mod: T | undefined;\n\n try {\n mod = dynamicRequire(module, moduleName);\n } catch (e) {\n // no-empty\n }\n\n try {\n const { cwd } = dynamicRequire(module, 'process');\n mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`) as T;\n } catch (e) {\n // no-empty\n }\n\n return mod;\n}\n","/*\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `logger` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nfunction isBrowserBundle() {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nfunction getSDKSource() {\n // @ts-expect-error \"npm\" is injected by rollup during build process\n return \"npm\";\n}\n\nexport { getSDKSource, isBrowserBundle };\n//# sourceMappingURL=env.js.map\n","/*\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `logger` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\ndeclare const __SENTRY_BROWSER_BUNDLE__: boolean | undefined;\n\nexport type SdkSource = 'npm' | 'cdn' | 'loader';\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nexport function isBrowserBundle(): boolean {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nexport function getSDKSource(): SdkSource {\n // @ts-expect-error __SENTRY_SDK_SOURCE__ is injected by rollup during build process\n return __SENTRY_SDK_SOURCE__;\n}\n","import { addNonEnumerableProperty } from './object.js';\nimport { snipLine } from './string.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nfunction uuid4() {\n const gbl = GLOBAL_OBJ ;\n const crypto = gbl.crypto || gbl.msCrypto;\n\n let getRandomByte = () => Math.random() * 16;\n try {\n if (crypto && crypto.randomUUID) {\n return crypto.randomUUID().replace(/-/g, '');\n }\n if (crypto && crypto.getRandomValues) {\n getRandomByte = () => crypto.getRandomValues(new Uint8Array(1))[0];\n }\n } catch (_) {\n // some runtimes can crash invoking crypto\n // https://github.com/getsentry/sentry-javascript/issues/8935\n }\n\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n return (([1e7] ) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c =>\n // eslint-disable-next-line no-bitwise\n ((c ) ^ ((getRandomByte() & 15) >> ((c ) / 4))).toString(16),\n );\n}\n\nfunction getFirstException(event) {\n return event.exception && event.exception.values ? event.exception.values[0] : undefined;\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nfunction getEventDescription(event) {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '';\n }\n return eventId || '';\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nfunction addExceptionTypeValue(event, value, type) {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}\n\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nfunction addExceptionMechanism(event, newMechanism) {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n\n const defaultMechanism = { type: 'generic', handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nfunction parseSemver(input) {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nfunction addContextToFrame(lines, frame, linesOfContext = 5) {\n // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n if (frame.lineno === undefined) {\n return;\n }\n\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line) => snipLine(line, 0));\n\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line) => snipLine(line, 0));\n}\n\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nfunction checkOrSetAlreadyCaught(exception) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (exception && (exception ).__sentry_captured__) {\n return true;\n }\n\n try {\n // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n // `ExtraErrorData` integration\n addNonEnumerableProperty(exception , '__sentry_captured__', true);\n } catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n\n return false;\n}\n\n/**\n * Checks whether the given input is already an array, and if it isn't, wraps it in one.\n *\n * @param maybeArray Input to turn into an array, if necessary\n * @returns The input, if already an array, or an array with the input as the only element, if not\n */\nfunction arrayify(maybeArray) {\n return Array.isArray(maybeArray) ? maybeArray : [maybeArray];\n}\n\nexport { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, arrayify, checkOrSetAlreadyCaught, getEventDescription, parseSemver, uuid4 };\n//# sourceMappingURL=misc.js.map\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { Event, Exception, Mechanism, StackFrame } from '@sentry/types';\n\nimport { addNonEnumerableProperty } from './object';\nimport { snipLine } from './string';\nimport { GLOBAL_OBJ } from './worldwide';\n\ninterface CryptoInternal {\n getRandomValues(array: Uint8Array): Uint8Array;\n randomUUID?(): string;\n}\n\n/** An interface for common properties on global */\ninterface CryptoGlobal {\n msCrypto?: CryptoInternal;\n crypto?: CryptoInternal;\n}\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nexport function uuid4(): string {\n const gbl = GLOBAL_OBJ as typeof GLOBAL_OBJ & CryptoGlobal;\n const crypto = gbl.crypto || gbl.msCrypto;\n\n let getRandomByte = (): number => Math.random() * 16;\n try {\n if (crypto && crypto.randomUUID) {\n return crypto.randomUUID().replace(/-/g, '');\n }\n if (crypto && crypto.getRandomValues) {\n getRandomByte = () => crypto.getRandomValues(new Uint8Array(1))[0];\n }\n } catch (_) {\n // some runtimes can crash invoking crypto\n // https://github.com/getsentry/sentry-javascript/issues/8935\n }\n\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n return (([1e7] as unknown as string) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c =>\n // eslint-disable-next-line no-bitwise\n ((c as unknown as number) ^ ((getRandomByte() & 15) >> ((c as unknown as number) / 4))).toString(16),\n );\n}\n\nfunction getFirstException(event: Event): Exception | undefined {\n return event.exception && event.exception.values ? event.exception.values[0] : undefined;\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nexport function getEventDescription(event: Event): string {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '';\n }\n return eventId || '';\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nexport function addExceptionTypeValue(event: Event, value?: string, type?: string): void {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}\n\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nexport function addExceptionMechanism(event: Event, newMechanism?: Partial): void {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n\n const defaultMechanism = { type: 'generic', handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\ninterface SemVer {\n major?: number;\n minor?: number;\n patch?: number;\n prerelease?: string;\n buildmetadata?: string;\n}\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input: string): SemVer {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nexport function addContextToFrame(lines: string[], frame: StackFrame, linesOfContext: number = 5): void {\n // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n if (frame.lineno === undefined) {\n return;\n }\n\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line: string) => snipLine(line, 0));\n\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line: string) => snipLine(line, 0));\n}\n\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nexport function checkOrSetAlreadyCaught(exception: unknown): boolean {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (exception && (exception as any).__sentry_captured__) {\n return true;\n }\n\n try {\n // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n // `ExtraErrorData` integration\n addNonEnumerableProperty(exception as { [key: string]: unknown }, '__sentry_captured__', true);\n } catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n\n return false;\n}\n\n/**\n * Checks whether the given input is already an array, and if it isn't, wraps it in one.\n *\n * @param maybeArray Input to turn into an array, if necessary\n * @returns The input, if already an array, or an array with the input as the only element, if not\n */\nexport function arrayify(maybeArray: T | T[]): T[] {\n return Array.isArray(maybeArray) ? maybeArray : [maybeArray];\n}\n","import { htmlTreeAsString } from './browser.js';\nimport { isError, isEvent, isInstanceOf, isElement, isPlainObject, isPrimitive } from './is.js';\nimport { logger } from './logger.js';\nimport { truncate } from './string.js';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, )` or `origMethod.apply(this, [])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nfunction fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] ;\n const wrapped = replacementFactory(original) ;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n markFunctionWrapped(wrapped, original);\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nfunction addNonEnumerableProperty(obj, name, value) {\n try {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true,\n });\n } catch (o_O) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Failed to add non-enumerable property \"${name}\" to object`, obj);\n }\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nfunction markFunctionWrapped(wrapped, original) {\n try {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n } catch (o_O) {} // eslint-disable-line no-empty\n}\n\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\nfunction getOriginalFunction(func) {\n return func.__sentry_original__;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nfunction urlEncode(object) {\n return Object.keys(object)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`)\n .join('&');\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor\n * an Error.\n */\nfunction convertToPlainObject(value)\n\n {\n if (isError(value)) {\n return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...getOwnProperties(value),\n };\n } else if (isEvent(value)) {\n const newObj\n\n = {\n type: value.type,\n target: serializeEventTarget(value.target),\n currentTarget: serializeEventTarget(value.currentTarget),\n ...getOwnProperties(value),\n };\n\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n newObj.detail = value.detail;\n }\n\n return newObj;\n } else {\n return value;\n }\n}\n\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target) {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return '';\n }\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj) {\n if (typeof obj === 'object' && obj !== null) {\n const extractedProps = {};\n for (const property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = (obj )[property];\n }\n }\n return extractedProps;\n } else {\n return {};\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nfunction extractExceptionKeysForMessage(exception, maxLength = 40) {\n const keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */\nfunction dropUndefinedKeys(inputValue) {\n // This map keeps track of what already visited nodes map to.\n // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n // references as the input object.\n const memoizationMap = new Map();\n\n // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys(inputValue, memoizationMap) {\n if (isPlainObject(inputValue)) {\n // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = {};\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n for (const key of Object.keys(inputValue)) {\n if (typeof inputValue[key] !== 'undefined') {\n returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);\n }\n }\n\n return returnValue ;\n }\n\n if (Array.isArray(inputValue)) {\n // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = [];\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n inputValue.forEach((item) => {\n returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n });\n\n return returnValue ;\n }\n\n return inputValue;\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nfunction objectify(wat) {\n let objectified;\n switch (true) {\n case wat === undefined || wat === null:\n objectified = new String(wat);\n break;\n\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new (wat ).constructor(wat);\n break;\n\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n\nexport { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, urlEncode };\n//# sourceMappingURL=object.js.map\n","/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { WrappedFunction } from '@sentry/types';\n\nimport { htmlTreeAsString } from './browser';\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive } from './is';\nimport { logger } from './logger';\nimport { truncate } from './string';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, )` or `origMethod.apply(this, [])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nexport function fill(source: { [key: string]: any }, name: string, replacementFactory: (...args: any[]) => any): void {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] as () => any;\n const wrapped = replacementFactory(original) as WrappedFunction;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n markFunctionWrapped(wrapped, original);\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nexport function addNonEnumerableProperty(obj: object, name: string, value: unknown): void {\n try {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true,\n });\n } catch (o_O) {\n __DEBUG_BUILD__ && logger.log(`Failed to add non-enumerable property \"${name}\" to object`, obj);\n }\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nexport function markFunctionWrapped(wrapped: WrappedFunction, original: WrappedFunction): void {\n try {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n } catch (o_O) {} // eslint-disable-line no-empty\n}\n\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\nexport function getOriginalFunction(func: WrappedFunction): WrappedFunction | undefined {\n return func.__sentry_original__;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nexport function urlEncode(object: { [key: string]: any }): string {\n return Object.keys(object)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`)\n .join('&');\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor\n * an Error.\n */\nexport function convertToPlainObject(value: V):\n | {\n [ownProps: string]: unknown;\n type: string;\n target: string;\n currentTarget: string;\n detail?: unknown;\n }\n | {\n [ownProps: string]: unknown;\n message: string;\n name: string;\n stack?: string;\n }\n | V {\n if (isError(value)) {\n return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...getOwnProperties(value),\n };\n } else if (isEvent(value)) {\n const newObj: {\n [ownProps: string]: unknown;\n type: string;\n target: string;\n currentTarget: string;\n detail?: unknown;\n } = {\n type: value.type,\n target: serializeEventTarget(value.target),\n currentTarget: serializeEventTarget(value.currentTarget),\n ...getOwnProperties(value),\n };\n\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n newObj.detail = value.detail;\n }\n\n return newObj;\n } else {\n return value;\n }\n}\n\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target: unknown): string {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return '';\n }\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj: unknown): { [key: string]: unknown } {\n if (typeof obj === 'object' && obj !== null) {\n const extractedProps: { [key: string]: unknown } = {};\n for (const property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = (obj as Record)[property];\n }\n }\n return extractedProps;\n } else {\n return {};\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nexport function extractExceptionKeysForMessage(exception: Record, maxLength: number = 40): string {\n const keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */\nexport function dropUndefinedKeys(inputValue: T): T {\n // This map keeps track of what already visited nodes map to.\n // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n // references as the input object.\n const memoizationMap = new Map();\n\n // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys(inputValue: T, memoizationMap: Map): T {\n if (isPlainObject(inputValue)) {\n // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal as T;\n }\n\n const returnValue: { [key: string]: any } = {};\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n for (const key of Object.keys(inputValue)) {\n if (typeof inputValue[key] !== 'undefined') {\n returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);\n }\n }\n\n return returnValue as T;\n }\n\n if (Array.isArray(inputValue)) {\n // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal as T;\n }\n\n const returnValue: unknown[] = [];\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n inputValue.forEach((item: unknown) => {\n returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n });\n\n return returnValue as unknown as T;\n }\n\n return inputValue;\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nexport function objectify(wat: unknown): typeof Object {\n let objectified;\n switch (true) {\n case wat === undefined || wat === null:\n objectified = new String(wat);\n break;\n\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new (wat as any).constructor(wat);\n break;\n\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n","import { isString } from './is.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(\n elem,\n options = {},\n) {\n\n if (!elem) {\n return '';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n;\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existance of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getDomElement(selector) {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) ;\n }\n return null;\n}\n\nexport { getDomElement, getLocationHref, htmlTreeAsString };\n//# sourceMappingURL=browser.js.map\n","import { isString } from './is';\nimport { getGlobalObject } from './worldwide';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(\n elem: unknown,\n options: string[] | { keyAttrs?: string[]; maxStringLength?: number } = {},\n): string {\n type SimpleNode = {\n parentNode: SimpleNode;\n } | null;\n\n if (!elem) {\n return '';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem as SimpleNode;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el: unknown, keyAttrs?: string[]): string {\n const elem = el as {\n tagName?: string;\n id?: string;\n className?: string;\n getAttribute(key: string): string;\n };\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nexport function getLocationHref(): string {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existance of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getDomElement(selector: string): E | null {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) as unknown as E;\n }\n return null;\n}\n","// eslint-disable-next-line @typescript-eslint/unbound-method\nconst objectToString = Object.prototype.toString;\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isError(wat) {\n switch (objectToString.call(wat)) {\n case '[object Error]':\n case '[object Exception]':\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */\nfunction isBuiltin(wat, className) {\n return objectToString.call(wat) === `[object ${className}]`;\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isErrorEvent(wat) {\n return isBuiltin(wat, 'ErrorEvent');\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMError(wat) {\n return isBuiltin(wat, 'DOMError');\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMException(wat) {\n return isBuiltin(wat, 'DOMException');\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isString(wat) {\n return isBuiltin(wat, 'String');\n}\n\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPrimitive(wat) {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPlainObject(wat) {\n return isBuiltin(wat, 'Object');\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isEvent(wat) {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isElement(wat) {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isRegExp(wat) {\n return isBuiltin(wat, 'RegExp');\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nfunction isThenable(wat) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isSyntheticEvent(wat) {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n\n/**\n * Checks whether given value is NaN\n * {@link isNaN}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isNaN(wat) {\n return typeof wat === 'number' && wat !== wat;\n}\n\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nfunction isInstanceOf(wat, base) {\n try {\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n\n/**\n * Checks whether given value's type is a Vue ViewModel.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isVueViewModel(wat) {\n // Not using Object.prototype.toString because in Vue 3 it would read the instance's Symbol(Symbol.toStringTag) property.\n return !!(typeof wat === 'object' && wat !== null && ((wat ).__isVue || (wat )._isVue));\n}\n\nexport { isDOMError, isDOMException, isElement, isError, isErrorEvent, isEvent, isInstanceOf, isNaN, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable, isVueViewModel };\n//# sourceMappingURL=is.js.map\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\nimport type { PolymorphicEvent, Primitive } from '@sentry/types';\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst objectToString = Object.prototype.toString;\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat: unknown): wat is Error {\n switch (objectToString.call(wat)) {\n case '[object Error]':\n case '[object Exception]':\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */\nfunction isBuiltin(wat: unknown, className: string): boolean {\n return objectToString.call(wat) === `[object ${className}]`;\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isErrorEvent(wat: unknown): boolean {\n return isBuiltin(wat, 'ErrorEvent');\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMError(wat: unknown): boolean {\n return isBuiltin(wat, 'DOMError');\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMException(wat: unknown): boolean {\n return isBuiltin(wat, 'DOMException');\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isString(wat: unknown): wat is string {\n return isBuiltin(wat, 'String');\n}\n\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPrimitive(wat: unknown): wat is Primitive {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPlainObject(wat: unknown): wat is Record {\n return isBuiltin(wat, 'Object');\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isEvent(wat: unknown): wat is PolymorphicEvent {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isElement(wat: unknown): boolean {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isRegExp(wat: unknown): wat is RegExp {\n return isBuiltin(wat, 'RegExp');\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function isThenable(wat: any): wat is PromiseLike {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isSyntheticEvent(wat: unknown): boolean {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n\n/**\n * Checks whether given value is NaN\n * {@link isNaN}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isNaN(wat: unknown): boolean {\n return typeof wat === 'number' && wat !== wat;\n}\n\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nexport function isInstanceOf(wat: any, base: any): boolean {\n try {\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n\ninterface VueViewModel {\n // Vue3\n __isVue?: boolean;\n // Vue2\n _isVue?: boolean;\n}\n/**\n * Checks whether given value's type is a Vue ViewModel.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isVueViewModel(wat: unknown): boolean {\n // Not using Object.prototype.toString because in Vue 3 it would read the instance's Symbol(Symbol.toStringTag) property.\n return !!(typeof wat === 'object' && wat !== null && ((wat as VueViewModel).__isVue || (wat as VueViewModel)._isVue));\n}\n","import { isVueViewModel, isString, isRegExp } from './is.js';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nfunction truncate(str, max = 0) {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nfunction snipLine(line, colno) {\n let newLine = line;\n const lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction safeJoin(input, delimiter) {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n // This is a hack to fix a Vue3-specific bug that causes an infinite loop of\n // console warnings. This happens when a Vue template is rendered with\n // an undeclared variable, which we try to stringify, ultimately causing\n // Vue to issue another warning which repeats indefinitely.\n // see: https://github.com/getsentry/sentry-javascript/pull/8981\n if (isVueViewModel(value)) {\n output.push('[VueViewModel]');\n } else {\n output.push(String(value));\n }\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the given value matches a regex or string\n *\n * @param value The string to test\n * @param pattern Either a regex or a string against which `value` will be matched\n * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match\n * `pattern` if it contains `pattern`. Only applies to string-type patterns.\n */\nfunction isMatchingPattern(\n value,\n pattern,\n requireExactStringMatch = false,\n) {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (isString(pattern)) {\n return requireExactStringMatch ? value === pattern : value.includes(pattern);\n }\n\n return false;\n}\n\n/**\n * Test the given string against an array of strings and regexes. By default, string matching is done on a\n * substring-inclusion basis rather than a strict equality basis\n *\n * @param testString The string to test\n * @param patterns The patterns against which to test the string\n * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to\n * count. If false, `testString` will match a string pattern if it contains that pattern.\n * @returns\n */\nfunction stringMatchesSomePattern(\n testString,\n patterns = [],\n requireExactStringMatch = false,\n) {\n return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch));\n}\n\nexport { isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate };\n//# sourceMappingURL=string.js.map\n","import { isRegExp, isString, isVueViewModel } from './is';\n\nexport { escapeStringForRegex } from './vendor/escapeStringForRegex';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nexport function truncate(str: string, max: number = 0): string {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function snipLine(line: string, colno: number): string {\n let newLine = line;\n const lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function safeJoin(input: any[], delimiter?: string): string {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n // This is a hack to fix a Vue3-specific bug that causes an infinite loop of\n // console warnings. This happens when a Vue template is rendered with\n // an undeclared variable, which we try to stringify, ultimately causing\n // Vue to issue another warning which repeats indefinitely.\n // see: https://github.com/getsentry/sentry-javascript/pull/8981\n if (isVueViewModel(value)) {\n output.push('[VueViewModel]');\n } else {\n output.push(String(value));\n }\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the given value matches a regex or string\n *\n * @param value The string to test\n * @param pattern Either a regex or a string against which `value` will be matched\n * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match\n * `pattern` if it contains `pattern`. Only applies to string-type patterns.\n */\nexport function isMatchingPattern(\n value: string,\n pattern: RegExp | string,\n requireExactStringMatch: boolean = false,\n): boolean {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (isString(pattern)) {\n return requireExactStringMatch ? value === pattern : value.includes(pattern);\n }\n\n return false;\n}\n\n/**\n * Test the given string against an array of strings and regexes. By default, string matching is done on a\n * substring-inclusion basis rather than a strict equality basis\n *\n * @param testString The string to test\n * @param patterns The patterns against which to test the string\n * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to\n * count. If false, `testString` will match a string pattern if it contains that pattern.\n * @returns\n */\nexport function stringMatchesSomePattern(\n testString: string,\n patterns: Array = [],\n requireExactStringMatch: boolean = false,\n): boolean {\n return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch));\n}\n","const DEFAULT_ENVIRONMENT = 'production';\n\nexport { DEFAULT_ENVIRONMENT };\n//# sourceMappingURL=constants.js.map\n","export const DEFAULT_ENVIRONMENT = 'production';\n","import { isPlainObject, dateTimestampInSeconds, arrayify, uuid4 } from '@sentry/utils';\nimport { notifyEventProcessors, getGlobalEventProcessors } from './eventProcessors.js';\nimport { updateSession } from './session.js';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nclass Scope {\n /** Flag if notifying is happening. */\n\n /** Callback for client to receive scope changes. */\n\n /** Callback list that will be called after {@link applyToEvent}. */\n\n /** Array of breadcrumbs. */\n\n /** User */\n\n /** Tags */\n\n /** Extra */\n\n /** Contexts */\n\n /** Attachments */\n\n /** Propagation Context for distributed tracing */\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n\n /** Fingerprint */\n\n /** Severity */\n // eslint-disable-next-line deprecation/deprecation\n\n /** Transaction Name */\n\n /** Span */\n\n /** Session */\n\n /** Request Mode Session Status */\n\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = generatePropagationContext();\n }\n\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n static clone(scope) {\n const newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = [...scope._breadcrumbs];\n newScope._tags = { ...scope._tags };\n newScope._extra = { ...scope._extra };\n newScope._contexts = { ...scope._contexts };\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._session = scope._session;\n newScope._transactionName = scope._transactionName;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = [...scope._eventProcessors];\n newScope._requestSession = scope._requestSession;\n newScope._attachments = [...scope._attachments];\n newScope._sdkProcessingMetadata = { ...scope._sdkProcessingMetadata };\n newScope._propagationContext = { ...scope._propagationContext };\n }\n return newScope;\n }\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n addScopeListener(callback) {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n addEventProcessor(callback) {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setUser(user) {\n this._user = user || {};\n if (this._session) {\n updateSession(this._session, { user });\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getUser() {\n return this._user;\n }\n\n /**\n * @inheritDoc\n */\n getRequestSession() {\n return this._requestSession;\n }\n\n /**\n * @inheritDoc\n */\n setRequestSession(requestSession) {\n this._requestSession = requestSession;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTags(tags) {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTag(key, value) {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtras(extras) {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtra(key, extra) {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setFingerprint(fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setLevel(\n // eslint-disable-next-line deprecation/deprecation\n level,\n ) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTransactionName(name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setContext(key, context) {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setSpan(span) {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getSpan() {\n return this._span;\n }\n\n /**\n * @inheritDoc\n */\n getTransaction() {\n // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will\n // have a pointer to the currently-active transaction.\n const span = this.getSpan();\n return span && span.transaction;\n }\n\n /**\n * @inheritDoc\n */\n setSession(session) {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getSession() {\n return this._session;\n }\n\n /**\n * @inheritDoc\n */\n update(captureContext) {\n if (!captureContext) {\n return this;\n }\n\n if (typeof captureContext === 'function') {\n const updatedScope = (captureContext )(this);\n return updatedScope instanceof Scope ? updatedScope : this;\n }\n\n if (captureContext instanceof Scope) {\n this._tags = { ...this._tags, ...captureContext._tags };\n this._extra = { ...this._extra, ...captureContext._extra };\n this._contexts = { ...this._contexts, ...captureContext._contexts };\n if (captureContext._user && Object.keys(captureContext._user).length) {\n this._user = captureContext._user;\n }\n if (captureContext._level) {\n this._level = captureContext._level;\n }\n if (captureContext._fingerprint) {\n this._fingerprint = captureContext._fingerprint;\n }\n if (captureContext._requestSession) {\n this._requestSession = captureContext._requestSession;\n }\n if (captureContext._propagationContext) {\n this._propagationContext = captureContext._propagationContext;\n }\n } else if (isPlainObject(captureContext)) {\n // eslint-disable-next-line no-param-reassign\n captureContext = captureContext ;\n this._tags = { ...this._tags, ...captureContext.tags };\n this._extra = { ...this._extra, ...captureContext.extra };\n this._contexts = { ...this._contexts, ...captureContext.contexts };\n if (captureContext.user) {\n this._user = captureContext.user;\n }\n if (captureContext.level) {\n this._level = captureContext.level;\n }\n if (captureContext.fingerprint) {\n this._fingerprint = captureContext.fingerprint;\n }\n if (captureContext.requestSession) {\n this._requestSession = captureContext.requestSession;\n }\n if (captureContext.propagationContext) {\n this._propagationContext = captureContext.propagationContext;\n }\n }\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n clear() {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n this._attachments = [];\n this._propagationContext = generatePropagationContext();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addBreadcrumb(breadcrumb, maxBreadcrumbs) {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n };\n\n const breadcrumbs = this._breadcrumbs;\n breadcrumbs.push(mergedBreadcrumb);\n this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs;\n\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getLastBreadcrumb() {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n clearBreadcrumbs() {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addAttachment(attachment) {\n this._attachments.push(attachment);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getAttachments() {\n return this._attachments;\n }\n\n /**\n * @inheritDoc\n */\n clearAttachments() {\n this._attachments = [];\n return this;\n }\n\n /**\n * Applies data from the scope to the event and runs all event processors on it.\n *\n * @param event Event\n * @param hint Object containing additional information about the original exception, for use by the event processors.\n * @hidden\n */\n applyToEvent(\n event,\n hint = {},\n additionalEventProcessors,\n ) {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = { ...this._contexts, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transactionName) {\n event.transaction = this._transactionName;\n }\n\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n const transaction = this._span.transaction;\n if (transaction) {\n event.sdkProcessingMetadata = {\n dynamicSamplingContext: transaction.getDynamicSamplingContext(),\n ...event.sdkProcessingMetadata,\n };\n const transactionName = transaction.name;\n if (transactionName) {\n event.tags = { transaction: transactionName, ...event.tags };\n }\n }\n }\n\n this._applyFingerprint(event);\n\n const scopeBreadcrumbs = this._getBreadcrumbs();\n const breadcrumbs = [...(event.breadcrumbs || []), ...scopeBreadcrumbs];\n event.breadcrumbs = breadcrumbs.length > 0 ? breadcrumbs : undefined;\n\n event.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n ...this._sdkProcessingMetadata,\n propagationContext: this._propagationContext,\n };\n\n // TODO (v8): Update this order to be: Global > Client > Scope\n return notifyEventProcessors(\n [...(additionalEventProcessors || []), ...getGlobalEventProcessors(), ...this._eventProcessors],\n event,\n hint,\n );\n }\n\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry\n */\n setSDKProcessingMetadata(newData) {\n this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData };\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setPropagationContext(context) {\n this._propagationContext = context;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getPropagationContext() {\n return this._propagationContext;\n }\n\n /**\n * Get the breadcrumbs for this scope.\n */\n _getBreadcrumbs() {\n return this._breadcrumbs;\n }\n\n /**\n * This will be called on every set call.\n */\n _notifyScopeListeners() {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n _applyFingerprint(event) {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint ? arrayify(event.fingerprint) : [];\n\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n }\n}\n\nfunction generatePropagationContext() {\n return {\n traceId: uuid4(),\n spanId: uuid4().substring(16),\n };\n}\n\nexport { Scope };\n//# sourceMappingURL=scope.js.map\n","/* eslint-disable max-lines */\nimport type {\n Attachment,\n Breadcrumb,\n CaptureContext,\n Context,\n Contexts,\n Event,\n EventHint,\n EventProcessor,\n Extra,\n Extras,\n Primitive,\n PropagationContext,\n RequestSession,\n Scope as ScopeInterface,\n ScopeContext,\n Session,\n Severity,\n SeverityLevel,\n Span,\n Transaction,\n User,\n} from '@sentry/types';\nimport { arrayify, dateTimestampInSeconds, isPlainObject, uuid4 } from '@sentry/utils';\n\nimport { getGlobalEventProcessors, notifyEventProcessors } from './eventProcessors';\nimport { updateSession } from './session';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport class Scope implements ScopeInterface {\n /** Flag if notifying is happening. */\n protected _notifyingListeners: boolean;\n\n /** Callback for client to receive scope changes. */\n protected _scopeListeners: Array<(scope: Scope) => void>;\n\n /** Callback list that will be called after {@link applyToEvent}. */\n protected _eventProcessors: EventProcessor[];\n\n /** Array of breadcrumbs. */\n protected _breadcrumbs: Breadcrumb[];\n\n /** User */\n protected _user: User;\n\n /** Tags */\n protected _tags: { [key: string]: Primitive };\n\n /** Extra */\n protected _extra: Extras;\n\n /** Contexts */\n protected _contexts: Contexts;\n\n /** Attachments */\n protected _attachments: Attachment[];\n\n /** Propagation Context for distributed tracing */\n protected _propagationContext: PropagationContext;\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n protected _sdkProcessingMetadata: { [key: string]: unknown };\n\n /** Fingerprint */\n protected _fingerprint?: string[];\n\n /** Severity */\n // eslint-disable-next-line deprecation/deprecation\n protected _level?: Severity | SeverityLevel;\n\n /** Transaction Name */\n protected _transactionName?: string;\n\n /** Span */\n protected _span?: Span;\n\n /** Session */\n protected _session?: Session;\n\n /** Request Mode Session Status */\n protected _requestSession?: RequestSession;\n\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n public constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = generatePropagationContext();\n }\n\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n public static clone(scope?: Scope): Scope {\n const newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = [...scope._breadcrumbs];\n newScope._tags = { ...scope._tags };\n newScope._extra = { ...scope._extra };\n newScope._contexts = { ...scope._contexts };\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._session = scope._session;\n newScope._transactionName = scope._transactionName;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = [...scope._eventProcessors];\n newScope._requestSession = scope._requestSession;\n newScope._attachments = [...scope._attachments];\n newScope._sdkProcessingMetadata = { ...scope._sdkProcessingMetadata };\n newScope._propagationContext = { ...scope._propagationContext };\n }\n return newScope;\n }\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n public addScopeListener(callback: (scope: Scope) => void): void {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n public addEventProcessor(callback: EventProcessor): this {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): this {\n this._user = user || {};\n if (this._session) {\n updateSession(this._session, { user });\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getUser(): User | undefined {\n return this._user;\n }\n\n /**\n * @inheritDoc\n */\n public getRequestSession(): RequestSession | undefined {\n return this._requestSession;\n }\n\n /**\n * @inheritDoc\n */\n public setRequestSession(requestSession?: RequestSession): this {\n this._requestSession = requestSession;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: Primitive }): this {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: Primitive): this {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: Extras): this {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: Extra): this {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setFingerprint(fingerprint: string[]): this {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setLevel(\n // eslint-disable-next-line deprecation/deprecation\n level: Severity | SeverityLevel,\n ): this {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTransactionName(name?: string): this {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setContext(key: string, context: Context | null): this {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setSpan(span?: Span): this {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getSpan(): Span | undefined {\n return this._span;\n }\n\n /**\n * @inheritDoc\n */\n public getTransaction(): Transaction | undefined {\n // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will\n // have a pointer to the currently-active transaction.\n const span = this.getSpan();\n return span && span.transaction;\n }\n\n /**\n * @inheritDoc\n */\n public setSession(session?: Session): this {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getSession(): Session | undefined {\n return this._session;\n }\n\n /**\n * @inheritDoc\n */\n public update(captureContext?: CaptureContext): this {\n if (!captureContext) {\n return this;\n }\n\n if (typeof captureContext === 'function') {\n const updatedScope = (captureContext as (scope: T) => T)(this);\n return updatedScope instanceof Scope ? updatedScope : this;\n }\n\n if (captureContext instanceof Scope) {\n this._tags = { ...this._tags, ...captureContext._tags };\n this._extra = { ...this._extra, ...captureContext._extra };\n this._contexts = { ...this._contexts, ...captureContext._contexts };\n if (captureContext._user && Object.keys(captureContext._user).length) {\n this._user = captureContext._user;\n }\n if (captureContext._level) {\n this._level = captureContext._level;\n }\n if (captureContext._fingerprint) {\n this._fingerprint = captureContext._fingerprint;\n }\n if (captureContext._requestSession) {\n this._requestSession = captureContext._requestSession;\n }\n if (captureContext._propagationContext) {\n this._propagationContext = captureContext._propagationContext;\n }\n } else if (isPlainObject(captureContext)) {\n // eslint-disable-next-line no-param-reassign\n captureContext = captureContext as ScopeContext;\n this._tags = { ...this._tags, ...captureContext.tags };\n this._extra = { ...this._extra, ...captureContext.extra };\n this._contexts = { ...this._contexts, ...captureContext.contexts };\n if (captureContext.user) {\n this._user = captureContext.user;\n }\n if (captureContext.level) {\n this._level = captureContext.level;\n }\n if (captureContext.fingerprint) {\n this._fingerprint = captureContext.fingerprint;\n }\n if (captureContext.requestSession) {\n this._requestSession = captureContext.requestSession;\n }\n if (captureContext.propagationContext) {\n this._propagationContext = captureContext.propagationContext;\n }\n }\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clear(): this {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n this._attachments = [];\n this._propagationContext = generatePropagationContext();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n };\n\n const breadcrumbs = this._breadcrumbs;\n breadcrumbs.push(mergedBreadcrumb);\n this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs;\n\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getLastBreadcrumb(): Breadcrumb | undefined {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n public clearBreadcrumbs(): this {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public addAttachment(attachment: Attachment): this {\n this._attachments.push(attachment);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getAttachments(): Attachment[] {\n return this._attachments;\n }\n\n /**\n * @inheritDoc\n */\n public clearAttachments(): this {\n this._attachments = [];\n return this;\n }\n\n /**\n * Applies data from the scope to the event and runs all event processors on it.\n *\n * @param event Event\n * @param hint Object containing additional information about the original exception, for use by the event processors.\n * @hidden\n */\n public applyToEvent(\n event: Event,\n hint: EventHint = {},\n additionalEventProcessors?: EventProcessor[],\n ): PromiseLike {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = { ...this._contexts, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transactionName) {\n event.transaction = this._transactionName;\n }\n\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n const transaction = this._span.transaction;\n if (transaction) {\n event.sdkProcessingMetadata = {\n dynamicSamplingContext: transaction.getDynamicSamplingContext(),\n ...event.sdkProcessingMetadata,\n };\n const transactionName = transaction.name;\n if (transactionName) {\n event.tags = { transaction: transactionName, ...event.tags };\n }\n }\n }\n\n this._applyFingerprint(event);\n\n const scopeBreadcrumbs = this._getBreadcrumbs();\n const breadcrumbs = [...(event.breadcrumbs || []), ...scopeBreadcrumbs];\n event.breadcrumbs = breadcrumbs.length > 0 ? breadcrumbs : undefined;\n\n event.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n ...this._sdkProcessingMetadata,\n propagationContext: this._propagationContext,\n };\n\n // TODO (v8): Update this order to be: Global > Client > Scope\n return notifyEventProcessors(\n [...(additionalEventProcessors || []), ...getGlobalEventProcessors(), ...this._eventProcessors],\n event,\n hint,\n );\n }\n\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry\n */\n public setSDKProcessingMetadata(newData: { [key: string]: unknown }): this {\n this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData };\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setPropagationContext(context: PropagationContext): this {\n this._propagationContext = context;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getPropagationContext(): PropagationContext {\n return this._propagationContext;\n }\n\n /**\n * Get the breadcrumbs for this scope.\n */\n protected _getBreadcrumbs(): Breadcrumb[] {\n return this._breadcrumbs;\n }\n\n /**\n * This will be called on every set call.\n */\n protected _notifyScopeListeners(): void {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n private _applyFingerprint(event: Event): void {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint ? arrayify(event.fingerprint) : [];\n\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n }\n}\n\nfunction generatePropagationContext(): PropagationContext {\n return {\n traceId: uuid4(),\n spanId: uuid4().substring(16),\n };\n}\n","import { getGlobalSingleton, SyncPromise, logger, isThenable } from '@sentry/utils';\n\n/**\n * Returns the global event processors.\n */\nfunction getGlobalEventProcessors() {\n return getGlobalSingleton('globalEventProcessors', () => []);\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nfunction addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n}\n\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\nfunction notifyEventProcessors(\n processors,\n event,\n hint,\n index = 0,\n) {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) ;\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n processor.id &&\n result === null &&\n logger.log(`Event processor \"${processor.id}\" dropped event`);\n\n if (isThenable(result)) {\n void result\n .then(final => notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n void notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n}\n\nexport { addGlobalEventProcessor, getGlobalEventProcessors, notifyEventProcessors };\n//# sourceMappingURL=eventProcessors.js.map\n","import type { Event, EventHint, EventProcessor } from '@sentry/types';\nimport { getGlobalSingleton, isThenable, logger, SyncPromise } from '@sentry/utils';\n\n/**\n * Returns the global event processors.\n */\nexport function getGlobalEventProcessors(): EventProcessor[] {\n return getGlobalSingleton('globalEventProcessors', () => []);\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nexport function addGlobalEventProcessor(callback: EventProcessor): void {\n getGlobalEventProcessors().push(callback);\n}\n\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\nexport function notifyEventProcessors(\n processors: EventProcessor[],\n event: Event | null,\n hint: EventHint,\n index: number = 0,\n): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) as Event | null;\n\n __DEBUG_BUILD__ &&\n processor.id &&\n result === null &&\n logger.log(`Event processor \"${processor.id}\" dropped event`);\n\n if (isThenable(result)) {\n void result\n .then(final => notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n void notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n}\n","import { isThenable } from './is.js';\n\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\n/** SyncPromise internal states */\nvar States; (function (States) {\n /** Pending */\n const PENDING = 0; States[States[\"PENDING\"] = PENDING] = \"PENDING\";\n /** Resolved / OK */\n const RESOLVED = 1; States[States[\"RESOLVED\"] = RESOLVED] = \"RESOLVED\";\n /** Rejected / Error */\n const REJECTED = 2; States[States[\"REJECTED\"] = REJECTED] = \"REJECTED\";\n})(States || (States = {}));\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nfunction resolvedSyncPromise(value) {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nfunction rejectedSyncPromise(reason) {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise {\n\n constructor(\n executor,\n ) {SyncPromise.prototype.__init.call(this);SyncPromise.prototype.__init2.call(this);SyncPromise.prototype.__init3.call(this);SyncPromise.prototype.__init4.call(this);\n this._state = States.PENDING;\n this._handlers = [];\n\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n then(\n onfulfilled,\n onrejected,\n ) {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result );\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n },\n ]);\n this._executeHandlers();\n });\n }\n\n /** JSDoc */\n catch(\n onrejected,\n ) {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n finally(onfinally) {\n return new SyncPromise((resolve, reject) => {\n let val;\n let isRejected;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val );\n });\n });\n }\n\n /** JSDoc */\n __init() {this._resolve = (value) => {\n this._setResult(States.RESOLVED, value);\n };}\n\n /** JSDoc */\n __init2() {this._reject = (reason) => {\n this._setResult(States.REJECTED, reason);\n };}\n\n /** JSDoc */\n __init3() {this._setResult = (state, value) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value ).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };}\n\n /** JSDoc */\n __init4() {this._executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](this._value );\n }\n\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n\n handler[0] = true;\n });\n };}\n}\n\nexport { SyncPromise, rejectedSyncPromise, resolvedSyncPromise };\n//# sourceMappingURL=syncpromise.js.map\n","/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/typedef */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isThenable } from './is';\n\n/** SyncPromise internal states */\nconst enum States {\n /** Pending */\n PENDING = 0,\n /** Resolved / OK */\n RESOLVED = 1,\n /** Rejected / Error */\n REJECTED = 2,\n}\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\nexport function resolvedSyncPromise(): PromiseLike;\nexport function resolvedSyncPromise(value: T | PromiseLike): PromiseLike;\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nexport function resolvedSyncPromise(value?: T | PromiseLike): PromiseLike {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nexport function rejectedSyncPromise(reason?: any): PromiseLike {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise implements PromiseLike {\n private _state: States;\n private _handlers: Array<[boolean, (value: T) => void, (reason: any) => any]>;\n private _value: any;\n\n public constructor(\n executor: (resolve: (value?: T | PromiseLike | null) => void, reject: (reason?: any) => void) => void,\n ) {\n this._state = States.PENDING;\n this._handlers = [];\n\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n public then(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike) | null,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result as any);\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n },\n ]);\n this._executeHandlers();\n });\n }\n\n /** JSDoc */\n public catch(\n onrejected?: ((reason: any) => TResult | PromiseLike) | null,\n ): PromiseLike {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n public finally(onfinally?: (() => void) | null): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let val: TResult | any;\n let isRejected: boolean;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val as unknown as any);\n });\n });\n }\n\n /** JSDoc */\n private readonly _resolve = (value?: T | PromiseLike | null) => {\n this._setResult(States.RESOLVED, value);\n };\n\n /** JSDoc */\n private readonly _reject = (reason?: any) => {\n this._setResult(States.REJECTED, reason);\n };\n\n /** JSDoc */\n private readonly _setResult = (state: States, value?: T | PromiseLike | any) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value as PromiseLike).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };\n\n /** JSDoc */\n private readonly _executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](this._value as unknown as any);\n }\n\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n\n handler[0] = true;\n });\n };\n}\n\nexport { SyncPromise };\n","import { timestampInSeconds, uuid4, dropUndefinedKeys } from '@sentry/utils';\n\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */\nfunction makeSession(context) {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = timestampInSeconds();\n\n const session = {\n sid: uuid4(),\n init: true,\n timestamp: startingTime,\n started: startingTime,\n duration: 0,\n status: 'ok',\n errors: 0,\n ignoreDuration: false,\n toJSON: () => sessionToJSON(session),\n };\n\n if (context) {\n updateSession(session, context);\n }\n\n return session;\n}\n\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see BaseClient.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */\n// eslint-disable-next-line complexity\nfunction updateSession(session, context = {}) {\n if (context.user) {\n if (!session.ipAddress && context.user.ip_address) {\n session.ipAddress = context.user.ip_address;\n }\n\n if (!session.did && !context.did) {\n session.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n session.timestamp = context.timestamp || timestampInSeconds();\n\n if (context.abnormal_mechanism) {\n session.abnormal_mechanism = context.abnormal_mechanism;\n }\n\n if (context.ignoreDuration) {\n session.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n session.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n session.init = context.init;\n }\n if (!session.did && context.did) {\n session.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n session.started = context.started;\n }\n if (session.ignoreDuration) {\n session.duration = undefined;\n } else if (typeof context.duration === 'number') {\n session.duration = context.duration;\n } else {\n const duration = session.timestamp - session.started;\n session.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n session.release = context.release;\n }\n if (context.environment) {\n session.environment = context.environment;\n }\n if (!session.ipAddress && context.ipAddress) {\n session.ipAddress = context.ipAddress;\n }\n if (!session.userAgent && context.userAgent) {\n session.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n session.errors = context.errors;\n }\n if (context.status) {\n session.status = context.status;\n }\n}\n\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n * this function will keep the previously set status, unless it was `'ok'` in which case\n * it is changed to `'exited'`.\n */\nfunction closeSession(session, status) {\n let context = {};\n if (status) {\n context = { status };\n } else if (session.status === 'ok') {\n context = { status: 'exited' };\n }\n\n updateSession(session, context);\n}\n\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */\nfunction sessionToJSON(session) {\n return dropUndefinedKeys({\n sid: `${session.sid}`,\n init: session.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(session.started * 1000).toISOString(),\n timestamp: new Date(session.timestamp * 1000).toISOString(),\n status: session.status,\n errors: session.errors,\n did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,\n duration: session.duration,\n abnormal_mechanism: session.abnormal_mechanism,\n attrs: {\n release: session.release,\n environment: session.environment,\n ip_address: session.ipAddress,\n user_agent: session.userAgent,\n },\n });\n}\n\nexport { closeSession, makeSession, updateSession };\n//# sourceMappingURL=session.js.map\n","import type { SerializedSession, Session, SessionContext, SessionStatus } from '@sentry/types';\nimport { dropUndefinedKeys, timestampInSeconds, uuid4 } from '@sentry/utils';\n\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */\nexport function makeSession(context?: Omit): Session {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = timestampInSeconds();\n\n const session: Session = {\n sid: uuid4(),\n init: true,\n timestamp: startingTime,\n started: startingTime,\n duration: 0,\n status: 'ok',\n errors: 0,\n ignoreDuration: false,\n toJSON: () => sessionToJSON(session),\n };\n\n if (context) {\n updateSession(session, context);\n }\n\n return session;\n}\n\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see BaseClient.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */\n// eslint-disable-next-line complexity\nexport function updateSession(session: Session, context: SessionContext = {}): void {\n if (context.user) {\n if (!session.ipAddress && context.user.ip_address) {\n session.ipAddress = context.user.ip_address;\n }\n\n if (!session.did && !context.did) {\n session.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n session.timestamp = context.timestamp || timestampInSeconds();\n\n if (context.abnormal_mechanism) {\n session.abnormal_mechanism = context.abnormal_mechanism;\n }\n\n if (context.ignoreDuration) {\n session.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n session.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n session.init = context.init;\n }\n if (!session.did && context.did) {\n session.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n session.started = context.started;\n }\n if (session.ignoreDuration) {\n session.duration = undefined;\n } else if (typeof context.duration === 'number') {\n session.duration = context.duration;\n } else {\n const duration = session.timestamp - session.started;\n session.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n session.release = context.release;\n }\n if (context.environment) {\n session.environment = context.environment;\n }\n if (!session.ipAddress && context.ipAddress) {\n session.ipAddress = context.ipAddress;\n }\n if (!session.userAgent && context.userAgent) {\n session.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n session.errors = context.errors;\n }\n if (context.status) {\n session.status = context.status;\n }\n}\n\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n * this function will keep the previously set status, unless it was `'ok'` in which case\n * it is changed to `'exited'`.\n */\nexport function closeSession(session: Session, status?: Exclude): void {\n let context = {};\n if (status) {\n context = { status };\n } else if (session.status === 'ok') {\n context = { status: 'exited' };\n }\n\n updateSession(session, context);\n}\n\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */\nfunction sessionToJSON(session: Session): SerializedSession {\n return dropUndefinedKeys({\n sid: `${session.sid}`,\n init: session.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(session.started * 1000).toISOString(),\n timestamp: new Date(session.timestamp * 1000).toISOString(),\n status: session.status,\n errors: session.errors,\n did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,\n duration: session.duration,\n abnormal_mechanism: session.abnormal_mechanism,\n attrs: {\n release: session.release,\n environment: session.environment,\n ip_address: session.ipAddress,\n user_agent: session.userAgent,\n },\n });\n}\n","import { arrayify, logger } from '@sentry/utils';\nimport { addGlobalEventProcessor } from './eventProcessors.js';\nimport { getCurrentHub } from './hub.js';\n\nconst installedIntegrations = [];\n\n/** Map of integrations assigned to a client */\n\n/**\n * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to\n * preseve the order of integrations in the array.\n *\n * @private\n */\nfunction filterDuplicates(integrations) {\n const integrationsByName = {};\n\n integrations.forEach(currentInstance => {\n const { name } = currentInstance;\n\n const existingInstance = integrationsByName[name];\n\n // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n // default instance to overwrite an existing user instance\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n\n integrationsByName[name] = currentInstance;\n });\n\n return Object.keys(integrationsByName).map(k => integrationsByName[k]);\n}\n\n/** Gets integrations to install */\nfunction getIntegrationsToSetup(options) {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach(integration => {\n integration.isDefaultInstance = true;\n });\n\n let integrations;\n\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === 'function') {\n integrations = arrayify(userIntegrations(defaultIntegrations));\n } else {\n integrations = defaultIntegrations;\n }\n\n const finalIntegrations = filterDuplicates(integrations);\n\n // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n const debugIndex = findIndex(finalIntegrations, integration => integration.name === 'Debug');\n if (debugIndex !== -1) {\n const [debugInstance] = finalIntegrations.splice(debugIndex, 1);\n finalIntegrations.push(debugInstance);\n }\n\n return finalIntegrations;\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nfunction setupIntegrations(client, integrations) {\n const integrationIndex = {};\n\n integrations.forEach(integration => {\n // guard against empty provided integrations\n if (integration) {\n setupIntegration(client, integration, integrationIndex);\n }\n });\n\n return integrationIndex;\n}\n\n/** Setup a single integration. */\nfunction setupIntegration(client, integration, integrationIndex) {\n integrationIndex[integration.name] = integration;\n\n if (installedIntegrations.indexOf(integration.name) === -1) {\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n }\n\n if (client.on && typeof integration.preprocessEvent === 'function') {\n const callback = integration.preprocessEvent.bind(integration) ;\n client.on('preprocessEvent', (event, hint) => callback(event, hint, client));\n }\n\n if (client.addEventProcessor && typeof integration.processEvent === 'function') {\n const callback = integration.processEvent.bind(integration) ;\n\n const processor = Object.assign((event, hint) => callback(event, hint, client), {\n id: integration.name,\n });\n\n client.addEventProcessor(processor);\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Integration installed: ${integration.name}`);\n}\n\n/** Add an integration to the current hub's client. */\nfunction addIntegration(integration) {\n const client = getCurrentHub().getClient();\n\n if (!client || !client.addIntegration) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n return;\n }\n\n client.addIntegration(integration);\n}\n\n// Polyfill for Array.findIndex(), which is not supported in ES5\nfunction findIndex(arr, callback) {\n for (let i = 0; i < arr.length; i++) {\n if (callback(arr[i]) === true) {\n return i;\n }\n }\n\n return -1;\n}\n\nexport { addIntegration, getIntegrationsToSetup, installedIntegrations, setupIntegration, setupIntegrations };\n//# sourceMappingURL=integration.js.map\n","import type { Client, Event, EventHint, Integration, Options } from '@sentry/types';\nimport { arrayify, logger } from '@sentry/utils';\n\nimport { addGlobalEventProcessor } from './eventProcessors';\nimport { getCurrentHub } from './hub';\n\ndeclare module '@sentry/types' {\n interface Integration {\n isDefaultInstance?: boolean;\n }\n}\n\nexport const installedIntegrations: string[] = [];\n\n/** Map of integrations assigned to a client */\nexport type IntegrationIndex = {\n [key: string]: Integration;\n};\n\n/**\n * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to\n * preseve the order of integrations in the array.\n *\n * @private\n */\nfunction filterDuplicates(integrations: Integration[]): Integration[] {\n const integrationsByName: { [key: string]: Integration } = {};\n\n integrations.forEach(currentInstance => {\n const { name } = currentInstance;\n\n const existingInstance = integrationsByName[name];\n\n // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n // default instance to overwrite an existing user instance\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n\n integrationsByName[name] = currentInstance;\n });\n\n return Object.keys(integrationsByName).map(k => integrationsByName[k]);\n}\n\n/** Gets integrations to install */\nexport function getIntegrationsToSetup(options: Options): Integration[] {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach(integration => {\n integration.isDefaultInstance = true;\n });\n\n let integrations: Integration[];\n\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === 'function') {\n integrations = arrayify(userIntegrations(defaultIntegrations));\n } else {\n integrations = defaultIntegrations;\n }\n\n const finalIntegrations = filterDuplicates(integrations);\n\n // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n const debugIndex = findIndex(finalIntegrations, integration => integration.name === 'Debug');\n if (debugIndex !== -1) {\n const [debugInstance] = finalIntegrations.splice(debugIndex, 1);\n finalIntegrations.push(debugInstance);\n }\n\n return finalIntegrations;\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(client: Client, integrations: Integration[]): IntegrationIndex {\n const integrationIndex: IntegrationIndex = {};\n\n integrations.forEach(integration => {\n // guard against empty provided integrations\n if (integration) {\n setupIntegration(client, integration, integrationIndex);\n }\n });\n\n return integrationIndex;\n}\n\n/** Setup a single integration. */\nexport function setupIntegration(client: Client, integration: Integration, integrationIndex: IntegrationIndex): void {\n integrationIndex[integration.name] = integration;\n\n if (installedIntegrations.indexOf(integration.name) === -1) {\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n }\n\n if (client.on && typeof integration.preprocessEvent === 'function') {\n const callback = integration.preprocessEvent.bind(integration) as typeof integration.preprocessEvent;\n client.on('preprocessEvent', (event, hint) => callback(event, hint, client));\n }\n\n if (client.addEventProcessor && typeof integration.processEvent === 'function') {\n const callback = integration.processEvent.bind(integration) as typeof integration.processEvent;\n\n const processor = Object.assign((event: Event, hint: EventHint) => callback(event, hint, client), {\n id: integration.name,\n });\n\n client.addEventProcessor(processor);\n }\n\n __DEBUG_BUILD__ && logger.log(`Integration installed: ${integration.name}`);\n}\n\n/** Add an integration to the current hub's client. */\nexport function addIntegration(integration: Integration): void {\n const client = getCurrentHub().getClient();\n\n if (!client || !client.addIntegration) {\n __DEBUG_BUILD__ && logger.warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n return;\n }\n\n client.addIntegration(integration);\n}\n\n// Polyfill for Array.findIndex(), which is not supported in ES5\nfunction findIndex(arr: T[], callback: (item: T) => boolean): number {\n for (let i = 0; i < arr.length; i++) {\n if (callback(arr[i]) === true) {\n return i;\n }\n }\n\n return -1;\n}\n","import { makeDsn, dsnToString, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn) {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn) {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn, sdkInfo) {\n return urlEncode({\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n ...(sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` }),\n });\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nfunction getEnvelopeEndpointWithUrlEncodedAuth(\n dsn,\n // TODO (v8): Remove `tunnelOrOptions` in favor of `options`, and use the substitute code below\n // options: ClientOptions = {} as ClientOptions,\n tunnelOrOptions = {} ,\n) {\n // TODO (v8): Use this code instead\n // const { tunnel, _metadata = {} } = options;\n // return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, _metadata.sdk)}`;\n\n const tunnel = typeof tunnelOrOptions === 'string' ? tunnelOrOptions : tunnelOrOptions.tunnel;\n const sdkInfo =\n typeof tunnelOrOptions === 'string' || !tunnelOrOptions._metadata ? undefined : tunnelOrOptions._metadata.sdk;\n\n return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\n\n/** Returns the url to the report dialog endpoint. */\nfunction getReportDialogEndpoint(\n dsnLike,\n dialogOptions\n\n,\n) {\n const dsn = makeDsn(dsnLike);\n if (!dsn) {\n return '';\n }\n\n const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n\n let encodedOptions = `dsn=${dsnToString(dsn)}`;\n for (const key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'user') {\n const user = dialogOptions.user;\n if (!user) {\n continue;\n }\n if (user.name) {\n encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n }\n if (user.email) {\n encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] )}`;\n }\n }\n\n return `${endpoint}?${encodedOptions}`;\n}\n\nexport { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint };\n//# sourceMappingURL=api.js.map\n","import type { ClientOptions, DsnComponents, DsnLike, SdkInfo } from '@sentry/types';\nimport { dsnToString, makeDsn, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn: DsnComponents): string {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn: DsnComponents): string {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn: DsnComponents, sdkInfo: SdkInfo | undefined): string {\n return urlEncode({\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n ...(sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` }),\n });\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nexport function getEnvelopeEndpointWithUrlEncodedAuth(\n dsn: DsnComponents,\n // TODO (v8): Remove `tunnelOrOptions` in favor of `options`, and use the substitute code below\n // options: ClientOptions = {} as ClientOptions,\n tunnelOrOptions: string | ClientOptions = {} as ClientOptions,\n): string {\n // TODO (v8): Use this code instead\n // const { tunnel, _metadata = {} } = options;\n // return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, _metadata.sdk)}`;\n\n const tunnel = typeof tunnelOrOptions === 'string' ? tunnelOrOptions : tunnelOrOptions.tunnel;\n const sdkInfo =\n typeof tunnelOrOptions === 'string' || !tunnelOrOptions._metadata ? undefined : tunnelOrOptions._metadata.sdk;\n\n return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\n\n/** Returns the url to the report dialog endpoint. */\nexport function getReportDialogEndpoint(\n dsnLike: DsnLike,\n dialogOptions: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n user?: { name?: string; email?: string };\n },\n): string {\n const dsn = makeDsn(dsnLike);\n if (!dsn) {\n return '';\n }\n\n const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n\n let encodedOptions = `dsn=${dsnToString(dsn)}`;\n for (const key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'user') {\n const user = dialogOptions.user;\n if (!user) {\n continue;\n }\n if (user.name) {\n encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n }\n if (user.email) {\n encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`;\n }\n }\n\n return `${endpoint}?${encodedOptions}`;\n}\n","import { logger } from './logger.js';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol) {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nfunction dsnToString(dsn, withPassword = false) {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nfunction dsnFromString(str) {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() ;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });\n}\n\nfunction dsnFromComponents(components) {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn) {\n if (!(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n return true;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n logger.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n\n if (hasMissingRequiredComponent) {\n return false;\n }\n\n if (!projectId.match(/^\\d+$/)) {\n logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n\n return true;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nfunction makeDsn(from) {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\n\nexport { dsnFromString, dsnToString, makeDsn };\n//# sourceMappingURL=dsn.js.map\n","import type { DsnComponents, DsnLike, DsnProtocol } from '@sentry/types';\n\nimport { logger } from './logger';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol?: string): protocol is DsnProtocol {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nexport function dsnToString(dsn: DsnComponents, withPassword: boolean = false): string {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nexport function dsnFromString(str: string): DsnComponents | undefined {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() as string;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, publicKey });\n}\n\nfunction dsnFromComponents(components: DsnComponents): DsnComponents {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn: DsnComponents): boolean {\n if (!__DEBUG_BUILD__) {\n return true;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents: ReadonlyArray = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n logger.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n\n if (hasMissingRequiredComponent) {\n return false;\n }\n\n if (!projectId.match(/^\\d+$/)) {\n logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n\n return true;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nexport function makeDsn(from: DsnLike): DsnComponents | undefined {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\n","import { logger } from '@sentry/utils';\nimport { getCurrentHub } from './hub.js';\n\n/** A class object that can instantiate Client objects. */\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nfunction initAndBind(\n clientClass,\n options,\n) {\n if (options.debug === true) {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n logger.enable();\n } else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n }\n }\n const hub = getCurrentHub();\n const scope = hub.getScope();\n scope.update(options.initialScope);\n\n const client = new clientClass(options);\n hub.bindClient(client);\n}\n\nexport { initAndBind };\n//# sourceMappingURL=sdk.js.map\n","import type { Client, ClientOptions } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { getCurrentHub } from './hub';\n\n/** A class object that can instantiate Client objects. */\nexport type ClientClass = new (options: O) => F;\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind(\n clientClass: ClientClass,\n options: O,\n): void {\n if (options.debug === true) {\n if (__DEBUG_BUILD__) {\n logger.enable();\n } else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n }\n }\n const hub = getCurrentHub();\n const scope = hub.getScope();\n scope.update(options.initialScope);\n\n const client = new clientClass(options);\n hub.bindClient(client);\n}\n","import { getOriginalFunction } from '@sentry/utils';\n\nlet originalFunctionToString;\n\n/** Patch toString calls to return proper name for wrapped functions */\nclass FunctionToString {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'FunctionToString';}\n\n /**\n * @inheritDoc\n */\n\n constructor() {\n this.name = FunctionToString.id;\n }\n\n /**\n * @inheritDoc\n */\n setupOnce() {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n\n // intrinsics (like Function.prototype) might be immutable in some environments\n // e.g. Node with --frozen-intrinsics, XS (an embedded JavaScript engine) or SES (a JavaScript proposal)\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function ( ...args) {\n const context = getOriginalFunction(this) || this;\n return originalFunctionToString.apply(context, args);\n };\n } catch (e) {\n // ignore errors here, just don't patch this\n }\n }\n} FunctionToString.__initStatic();\n\nexport { FunctionToString };\n//# sourceMappingURL=functiontostring.js.map\n","import type { Integration, WrappedFunction } from '@sentry/types';\nimport { getOriginalFunction } from '@sentry/utils';\n\nlet originalFunctionToString: () => void;\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class FunctionToString implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'FunctionToString';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n public constructor() {\n this.name = FunctionToString.id;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n\n // intrinsics (like Function.prototype) might be immutable in some environments\n // e.g. Node with --frozen-intrinsics, XS (an embedded JavaScript engine) or SES (a JavaScript proposal)\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function (this: WrappedFunction, ...args: any[]): string {\n const context = getOriginalFunction(this) || this;\n return originalFunctionToString.apply(context, args);\n };\n } catch {\n // ignore errors here, just don't patch this\n }\n }\n}\n","import { logger, getEventDescription, stringMatchesSomePattern } from '@sentry/utils';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\nconst DEFAULT_IGNORE_TRANSACTIONS = [\n /^.*\\/healthcheck$/,\n /^.*\\/healthy$/,\n /^.*\\/live$/,\n /^.*\\/ready$/,\n /^.*\\/heartbeat$/,\n /^.*\\/health$/,\n /^.*\\/healthz$/,\n];\n\n/** Options for the InboundFilters integration */\n\n/** Inbound filters configurable by the user */\nclass InboundFilters {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'InboundFilters';}\n\n /**\n * @inheritDoc\n */\n\n constructor(options = {}) {\n this.name = InboundFilters.id;\n this._options = options;\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_addGlobaleventProcessor, _getCurrentHub) {\n // noop\n }\n\n /** @inheritDoc */\n processEvent(event, _eventHint, client) {\n const clientOptions = client.getOptions();\n const options = _mergeOptions(this._options, clientOptions);\n return _shouldDropEvent(event, options) ? null : event;\n }\n} InboundFilters.__initStatic();\n\n/** JSDoc */\nfunction _mergeOptions(\n internalOptions = {},\n clientOptions = {},\n) {\n return {\n allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])],\n denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])],\n ignoreErrors: [\n ...(internalOptions.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...(internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS),\n ],\n ignoreTransactions: [\n ...(internalOptions.ignoreTransactions || []),\n ...(clientOptions.ignoreTransactions || []),\n ...(internalOptions.disableTransactionDefaults ? [] : DEFAULT_IGNORE_TRANSACTIONS),\n ],\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,\n };\n}\n\n/** JSDoc */\nfunction _shouldDropEvent(event, options) {\n if (options.ignoreInternal && _isSentryError(event)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (_isIgnoredError(event, options.ignoreErrors)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isIgnoredTransaction(event, options.ignoreTransactions)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreTransactions\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isDeniedUrl(event, options.denyUrls)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!_isAllowedUrl(event, options.allowUrls)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n}\n\nfunction _isIgnoredError(event, ignoreErrors) {\n // If event.type, this is not an error\n if (event.type || !ignoreErrors || !ignoreErrors.length) {\n return false;\n }\n\n return _getPossibleEventMessages(event).some(message => stringMatchesSomePattern(message, ignoreErrors));\n}\n\nfunction _isIgnoredTransaction(event, ignoreTransactions) {\n if (event.type !== 'transaction' || !ignoreTransactions || !ignoreTransactions.length) {\n return false;\n }\n\n const name = event.transaction;\n return name ? stringMatchesSomePattern(name, ignoreTransactions) : false;\n}\n\nfunction _isDeniedUrl(event, denyUrls) {\n // TODO: Use Glob instead?\n if (!denyUrls || !denyUrls.length) {\n return false;\n }\n const url = _getEventFilterUrl(event);\n return !url ? false : stringMatchesSomePattern(url, denyUrls);\n}\n\nfunction _isAllowedUrl(event, allowUrls) {\n // TODO: Use Glob instead?\n if (!allowUrls || !allowUrls.length) {\n return true;\n }\n const url = _getEventFilterUrl(event);\n return !url ? true : stringMatchesSomePattern(url, allowUrls);\n}\n\nfunction _getPossibleEventMessages(event) {\n const possibleMessages = [];\n\n if (event.message) {\n possibleMessages.push(event.message);\n }\n\n let lastException;\n try {\n // @ts-expect-error Try catching to save bundle size\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n lastException = event.exception.values[event.exception.values.length - 1];\n } catch (e) {\n // try catching to save bundle size checking existence of variables\n }\n\n if (lastException) {\n if (lastException.value) {\n possibleMessages.push(lastException.value);\n if (lastException.type) {\n possibleMessages.push(`${lastException.type}: ${lastException.value}`);\n }\n }\n }\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && possibleMessages.length === 0) {\n logger.error(`Could not extract message for event ${getEventDescription(event)}`);\n }\n\n return possibleMessages;\n}\n\nfunction _isSentryError(event) {\n try {\n // @ts-expect-error can't be a sentry error if undefined\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return event.exception.values[0].type === 'SentryError';\n } catch (e) {\n // ignore\n }\n return false;\n}\n\nfunction _getLastValidUrl(frames = []) {\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame && frame.filename !== '' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n\n return null;\n}\n\nfunction _getEventFilterUrl(event) {\n try {\n let frames;\n try {\n // @ts-expect-error we only care about frames if the whole thing here is defined\n frames = event.exception.values[0].stacktrace.frames;\n } catch (e) {\n // ignore\n }\n return frames ? _getLastValidUrl(frames) : null;\n } catch (oO) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n}\n\nexport { InboundFilters, _mergeOptions, _shouldDropEvent };\n//# sourceMappingURL=inboundfilters.js.map\n","import type { Client, Event, EventHint, Integration, StackFrame } from '@sentry/types';\nimport { getEventDescription, logger, stringMatchesSomePattern } from '@sentry/utils';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\nconst DEFAULT_IGNORE_TRANSACTIONS = [\n /^.*\\/healthcheck$/,\n /^.*\\/healthy$/,\n /^.*\\/live$/,\n /^.*\\/ready$/,\n /^.*\\/heartbeat$/,\n /^.*\\/health$/,\n /^.*\\/healthz$/,\n];\n\n/** Options for the InboundFilters integration */\nexport interface InboundFiltersOptions {\n allowUrls: Array;\n denyUrls: Array;\n ignoreErrors: Array;\n ignoreTransactions: Array;\n ignoreInternal: boolean;\n disableErrorDefaults: boolean;\n disableTransactionDefaults: boolean;\n}\n\n/** Inbound filters configurable by the user */\nexport class InboundFilters implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'InboundFilters';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n private readonly _options: Partial;\n\n public constructor(options: Partial = {}) {\n this.name = InboundFilters.id;\n this._options = options;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_addGlobaleventProcessor: unknown, _getCurrentHub: unknown): void {\n // noop\n }\n\n /** @inheritDoc */\n public processEvent(event: Event, _eventHint: EventHint, client: Client): Event | null {\n const clientOptions = client.getOptions();\n const options = _mergeOptions(this._options, clientOptions);\n return _shouldDropEvent(event, options) ? null : event;\n }\n}\n\n/** JSDoc */\nexport function _mergeOptions(\n internalOptions: Partial = {},\n clientOptions: Partial = {},\n): Partial {\n return {\n allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])],\n denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])],\n ignoreErrors: [\n ...(internalOptions.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...(internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS),\n ],\n ignoreTransactions: [\n ...(internalOptions.ignoreTransactions || []),\n ...(clientOptions.ignoreTransactions || []),\n ...(internalOptions.disableTransactionDefaults ? [] : DEFAULT_IGNORE_TRANSACTIONS),\n ],\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,\n };\n}\n\n/** JSDoc */\nexport function _shouldDropEvent(event: Event, options: Partial): boolean {\n if (options.ignoreInternal && _isSentryError(event)) {\n __DEBUG_BUILD__ &&\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (_isIgnoredError(event, options.ignoreErrors)) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isIgnoredTransaction(event, options.ignoreTransactions)) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreTransactions\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isDeniedUrl(event, options.denyUrls)) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!_isAllowedUrl(event, options.allowUrls)) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n}\n\nfunction _isIgnoredError(event: Event, ignoreErrors?: Array): boolean {\n // If event.type, this is not an error\n if (event.type || !ignoreErrors || !ignoreErrors.length) {\n return false;\n }\n\n return _getPossibleEventMessages(event).some(message => stringMatchesSomePattern(message, ignoreErrors));\n}\n\nfunction _isIgnoredTransaction(event: Event, ignoreTransactions?: Array): boolean {\n if (event.type !== 'transaction' || !ignoreTransactions || !ignoreTransactions.length) {\n return false;\n }\n\n const name = event.transaction;\n return name ? stringMatchesSomePattern(name, ignoreTransactions) : false;\n}\n\nfunction _isDeniedUrl(event: Event, denyUrls?: Array): boolean {\n // TODO: Use Glob instead?\n if (!denyUrls || !denyUrls.length) {\n return false;\n }\n const url = _getEventFilterUrl(event);\n return !url ? false : stringMatchesSomePattern(url, denyUrls);\n}\n\nfunction _isAllowedUrl(event: Event, allowUrls?: Array): boolean {\n // TODO: Use Glob instead?\n if (!allowUrls || !allowUrls.length) {\n return true;\n }\n const url = _getEventFilterUrl(event);\n return !url ? true : stringMatchesSomePattern(url, allowUrls);\n}\n\nfunction _getPossibleEventMessages(event: Event): string[] {\n const possibleMessages: string[] = [];\n\n if (event.message) {\n possibleMessages.push(event.message);\n }\n\n let lastException;\n try {\n // @ts-expect-error Try catching to save bundle size\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n lastException = event.exception.values[event.exception.values.length - 1];\n } catch (e) {\n // try catching to save bundle size checking existence of variables\n }\n\n if (lastException) {\n if (lastException.value) {\n possibleMessages.push(lastException.value);\n if (lastException.type) {\n possibleMessages.push(`${lastException.type}: ${lastException.value}`);\n }\n }\n }\n\n if (__DEBUG_BUILD__ && possibleMessages.length === 0) {\n logger.error(`Could not extract message for event ${getEventDescription(event)}`);\n }\n\n return possibleMessages;\n}\n\nfunction _isSentryError(event: Event): boolean {\n try {\n // @ts-expect-error can't be a sentry error if undefined\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return event.exception.values[0].type === 'SentryError';\n } catch (e) {\n // ignore\n }\n return false;\n}\n\nfunction _getLastValidUrl(frames: StackFrame[] = []): string | null {\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame && frame.filename !== '' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n\n return null;\n}\n\nfunction _getEventFilterUrl(event: Event): string | null {\n try {\n let frames;\n try {\n // @ts-expect-error we only care about frames if the whole thing here is defined\n frames = event.exception.values[0].stacktrace.frames;\n } catch (e) {\n // ignore\n }\n return frames ? _getLastValidUrl(frames) : null;\n } catch (oO) {\n __DEBUG_BUILD__ && logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n}\n","import { applyAggregateErrorsToEvent, exceptionFromError } from '@sentry/utils';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nclass LinkedErrors {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'LinkedErrors';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n this.name = LinkedErrors.id;\n }\n\n /** @inheritdoc */\n setupOnce() {\n // noop\n }\n\n /**\n * @inheritDoc\n */\n preprocessEvent(event, hint, client) {\n const options = client.getOptions();\n\n applyAggregateErrorsToEvent(\n exceptionFromError,\n options.stackParser,\n options.maxValueLength,\n this._key,\n this._limit,\n event,\n hint,\n );\n }\n} LinkedErrors.__initStatic();\n\nexport { LinkedErrors };\n//# sourceMappingURL=linkederrors.js.map\n","import type { Client, Event, EventHint, Integration } from '@sentry/types';\nimport { applyAggregateErrorsToEvent, exceptionFromError } from '@sentry/utils';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'LinkedErrors';\n\n /**\n * @inheritDoc\n */\n public readonly name: string;\n\n /**\n * @inheritDoc\n */\n private readonly _key: string;\n\n /**\n * @inheritDoc\n */\n private readonly _limit: number;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { key?: string; limit?: number } = {}) {\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n this.name = LinkedErrors.id;\n }\n\n /** @inheritdoc */\n public setupOnce(): void {\n // noop\n }\n\n /**\n * @inheritDoc\n */\n public preprocessEvent(event: Event, hint: EventHint | undefined, client: Client): void {\n const options = client.getOptions();\n\n applyAggregateErrorsToEvent(\n exceptionFromError,\n options.stackParser,\n options.maxValueLength,\n this._key,\n this._limit,\n event,\n hint,\n );\n }\n}\n","import { isInstanceOf } from './is.js';\nimport { truncate } from './string.js';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nfunction applyAggregateErrorsToEvent(\n exceptionFromErrorImplementation,\n parser,\n maxValueLimit = 250,\n key,\n limit,\n event,\n hint,\n) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException =\n event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(\n aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException ,\n key,\n event.exception.values,\n originalException,\n 0,\n ),\n maxValueLimit,\n );\n }\n}\n\nfunction aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error,\n key,\n prevExceptions,\n exception,\n exceptionId,\n) {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n\n let newExceptions = [...prevExceptions];\n\n if (isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n });\n }\n\n return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception, exceptionId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n is_exception_group: true,\n exception_id: exceptionId,\n };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n exception,\n source,\n exceptionId,\n parentId,\n) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId,\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions, maxValueLength) {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\n\nexport { applyAggregateErrorsToEvent };\n//# sourceMappingURL=aggregate-errors.js.map\n","import type { Event, EventHint, Exception, ExtendedError, StackParser } from '@sentry/types';\n\nimport { isInstanceOf } from './is';\nimport { truncate } from './string';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nexport function applyAggregateErrorsToEvent(\n exceptionFromErrorImplementation: (stackParser: StackParser, ex: Error) => Exception,\n parser: StackParser,\n maxValueLimit: number = 250,\n key: string,\n limit: number,\n event: Event,\n hint?: EventHint,\n): void {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException: Exception | undefined =\n event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(\n aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException as ExtendedError,\n key,\n event.exception.values,\n originalException,\n 0,\n ),\n maxValueLimit,\n );\n }\n}\n\nfunction aggregateExceptionsFromError(\n exceptionFromErrorImplementation: (stackParser: StackParser, ex: Error) => Exception,\n parser: StackParser,\n limit: number,\n error: ExtendedError,\n key: string,\n prevExceptions: Exception[],\n exception: Exception,\n exceptionId: number,\n): Exception[] {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n\n let newExceptions = [...prevExceptions];\n\n if (isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n });\n }\n\n return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception: Exception, exceptionId: number): void {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n is_exception_group: true,\n exception_id: exceptionId,\n };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n exception: Exception,\n source: string,\n exceptionId: number,\n parentId: number | undefined,\n): void {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId,\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions: Exception[], maxValueLength: number): Exception[] {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\n","import { isError, isPlainObject } from './is.js';\nimport { addExceptionTypeValue, addExceptionMechanism } from './misc.js';\nimport { normalizeToSize } from './normalize.js';\nimport { extractExceptionKeysForMessage } from './object.js';\n\n/**\n * Extracts stack frames from the error.stack string\n */\nfunction parseStackFrames(stackParser, error) {\n return stackParser(error.stack || '', 1);\n}\n\n/**\n * Extracts stack frames from the error and builds a Sentry Exception\n */\nfunction exceptionFromError(stackParser, error) {\n const exception = {\n type: error.name || error.constructor.name,\n value: error.message,\n };\n\n const frames = parseStackFrames(stackParser, error);\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n\n return exception;\n}\n\nfunction getMessageForObject(exception) {\n if ('name' in exception && typeof exception.name === 'string') {\n let message = `'${exception.name}' captured as exception`;\n\n if ('message' in exception && typeof exception.message === 'string') {\n message += ` with message '${exception.message}'`;\n }\n\n return message;\n } else if ('message' in exception && typeof exception.message === 'string') {\n return exception.message;\n } else {\n // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n return `Object captured as exception with keys: ${extractExceptionKeysForMessage(\n exception ,\n )}`;\n }\n}\n\n/**\n * Builds and Event from a Exception\n * @hidden\n */\nfunction eventFromUnknownInput(\n getCurrentHub,\n stackParser,\n exception,\n hint,\n) {\n let ex = exception;\n const providedMechanism =\n hint && hint.data && (hint.data ).mechanism;\n const mechanism = providedMechanism || {\n handled: true,\n type: 'generic',\n };\n\n if (!isError(exception)) {\n if (isPlainObject(exception)) {\n const hub = getCurrentHub();\n const client = hub.getClient();\n const normalizeDepth = client && client.getOptions().normalizeDepth;\n hub.configureScope(scope => {\n scope.setExtra('__serialized__', normalizeToSize(exception, normalizeDepth));\n });\n\n const message = getMessageForObject(exception);\n ex = (hint && hint.syntheticException) || new Error(message);\n (ex ).message = message;\n } else {\n // This handles when someone does: `throw \"something awesome\";`\n // We use synthesized Error here so we can extract a (rough) stack trace.\n ex = (hint && hint.syntheticException) || new Error(exception );\n (ex ).message = exception ;\n }\n mechanism.synthetic = true;\n }\n\n const event = {\n exception: {\n values: [exceptionFromError(stackParser, ex )],\n },\n };\n\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, mechanism);\n\n return {\n ...event,\n event_id: hint && hint.event_id,\n };\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nfunction eventFromMessage(\n stackParser,\n message,\n // eslint-disable-next-line deprecation/deprecation\n level = 'info',\n hint,\n attachStacktrace,\n) {\n const event = {\n event_id: hint && hint.event_id,\n level,\n message,\n };\n\n if (attachStacktrace && hint && hint.syntheticException) {\n const frames = parseStackFrames(stackParser, hint.syntheticException);\n if (frames.length) {\n event.exception = {\n values: [\n {\n value: message,\n stacktrace: { frames },\n },\n ],\n };\n }\n }\n\n return event;\n}\n\nexport { eventFromMessage, eventFromUnknownInput, exceptionFromError, parseStackFrames };\n//# sourceMappingURL=eventbuilder.js.map\n","import type {\n Event,\n EventHint,\n Exception,\n Hub,\n Mechanism,\n Severity,\n SeverityLevel,\n StackFrame,\n StackParser,\n} from '@sentry/types';\n\nimport { isError, isPlainObject } from './is';\nimport { addExceptionMechanism, addExceptionTypeValue } from './misc';\nimport { normalizeToSize } from './normalize';\nimport { extractExceptionKeysForMessage } from './object';\n\n/**\n * Extracts stack frames from the error.stack string\n */\nexport function parseStackFrames(stackParser: StackParser, error: Error): StackFrame[] {\n return stackParser(error.stack || '', 1);\n}\n\n/**\n * Extracts stack frames from the error and builds a Sentry Exception\n */\nexport function exceptionFromError(stackParser: StackParser, error: Error): Exception {\n const exception: Exception = {\n type: error.name || error.constructor.name,\n value: error.message,\n };\n\n const frames = parseStackFrames(stackParser, error);\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n\n return exception;\n}\n\nfunction getMessageForObject(exception: object): string {\n if ('name' in exception && typeof exception.name === 'string') {\n let message = `'${exception.name}' captured as exception`;\n\n if ('message' in exception && typeof exception.message === 'string') {\n message += ` with message '${exception.message}'`;\n }\n\n return message;\n } else if ('message' in exception && typeof exception.message === 'string') {\n return exception.message;\n } else {\n // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n return `Object captured as exception with keys: ${extractExceptionKeysForMessage(\n exception as Record,\n )}`;\n }\n}\n\n/**\n * Builds and Event from a Exception\n * @hidden\n */\nexport function eventFromUnknownInput(\n getCurrentHub: () => Hub,\n stackParser: StackParser,\n exception: unknown,\n hint?: EventHint,\n): Event {\n let ex: unknown = exception;\n const providedMechanism: Mechanism | undefined =\n hint && hint.data && (hint.data as { mechanism: Mechanism }).mechanism;\n const mechanism: Mechanism = providedMechanism || {\n handled: true,\n type: 'generic',\n };\n\n if (!isError(exception)) {\n if (isPlainObject(exception)) {\n const hub = getCurrentHub();\n const client = hub.getClient();\n const normalizeDepth = client && client.getOptions().normalizeDepth;\n hub.configureScope(scope => {\n scope.setExtra('__serialized__', normalizeToSize(exception, normalizeDepth));\n });\n\n const message = getMessageForObject(exception);\n ex = (hint && hint.syntheticException) || new Error(message);\n (ex as Error).message = message;\n } else {\n // This handles when someone does: `throw \"something awesome\";`\n // We use synthesized Error here so we can extract a (rough) stack trace.\n ex = (hint && hint.syntheticException) || new Error(exception as string);\n (ex as Error).message = exception as string;\n }\n mechanism.synthetic = true;\n }\n\n const event = {\n exception: {\n values: [exceptionFromError(stackParser, ex as Error)],\n },\n };\n\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, mechanism);\n\n return {\n ...event,\n event_id: hint && hint.event_id,\n };\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(\n stackParser: StackParser,\n message: string,\n // eslint-disable-next-line deprecation/deprecation\n level: Severity | SeverityLevel = 'info',\n hint?: EventHint,\n attachStacktrace?: boolean,\n): Event {\n const event: Event = {\n event_id: hint && hint.event_id,\n level,\n message,\n };\n\n if (attachStacktrace && hint && hint.syntheticException) {\n const frames = parseStackFrames(stackParser, hint.syntheticException);\n if (frames.length) {\n event.exception = {\n values: [\n {\n value: message,\n stacktrace: { frames },\n },\n ],\n };\n }\n }\n\n return event;\n}\n","import { isNaN, isVueViewModel, isSyntheticEvent } from './is.js';\nimport { memoBuilder } from './memo.js';\nimport { convertToPlainObject } from './object.js';\nimport { getFunctionName } from './stacktrace.js';\n\n/**\n * Recursively normalizes the given object.\n *\n * - Creates a copy to prevent original input mutation\n * - Skips non-enumerable properties\n * - When stringifying, calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format\n * - Translates known global objects/classes to a string representations\n * - Takes care of `Error` object serialization\n * - Optionally limits depth of final output\n * - Optionally limits number of properties/elements included in any single object/array\n *\n * @param input The object to be normalized.\n * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)\n * @param maxProperties The max number of elements or properties to be included in any single array or\n * object in the normallized output.\n * @returns A normalized version of the object, or `\"**non-serializable**\"` if any errors are thrown during normalization.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction normalize(input, depth = 100, maxProperties = +Infinity) {\n try {\n // since we're at the outermost level, we don't provide a key\n return visit('', input, depth, maxProperties);\n } catch (err) {\n return { ERROR: `**non-serializable** (${err})` };\n }\n}\n\n/** JSDoc */\nfunction normalizeToSize(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n object,\n // Default Node.js REPL depth\n depth = 3,\n // 100kB, as 200kB is max payload size, so half sounds reasonable\n maxSize = 100 * 1024,\n) {\n const normalized = normalize(object, depth);\n\n if (jsonSize(normalized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n\n return normalized ;\n}\n\n/**\n * Visits a node to perform normalization on it\n *\n * @param key The key corresponding to the given node\n * @param value The node to be visited\n * @param depth Optional number indicating the maximum recursion depth\n * @param maxProperties Optional maximum number of properties/elements included in any single object/array\n * @param memo Optional Memo class handling decycling\n */\nfunction visit(\n key,\n value,\n depth = +Infinity,\n maxProperties = +Infinity,\n memo = memoBuilder(),\n) {\n const [memoize, unmemoize] = memo;\n\n // Get the simple cases out of the way first\n if (\n value == null || // this matches null and undefined -> eqeq not eqeqeq\n (['number', 'boolean', 'string'].includes(typeof value) && !isNaN(value))\n ) {\n return value ;\n }\n\n const stringified = stringifyValue(key, value);\n\n // Anything we could potentially dig into more (objects or arrays) will have come back as `\"[object XXXX]\"`.\n // Everything else will have already been serialized, so if we don't see that pattern, we're done.\n if (!stringified.startsWith('[object ')) {\n return stringified;\n }\n\n // From here on, we can assert that `value` is either an object or an array.\n\n // Do not normalize objects that we know have already been normalized. As a general rule, the\n // \"__sentry_skip_normalization__\" property should only be used sparingly and only should only be set on objects that\n // have already been normalized.\n if ((value )['__sentry_skip_normalization__']) {\n return value ;\n }\n\n // We can set `__sentry_override_normalization_depth__` on an object to ensure that from there\n // We keep a certain amount of depth.\n // This should be used sparingly, e.g. we use it for the redux integration to ensure we get a certain amount of state.\n const remainingDepth =\n typeof (value )['__sentry_override_normalization_depth__'] === 'number'\n ? ((value )['__sentry_override_normalization_depth__'] )\n : depth;\n\n // We're also done if we've reached the max depth\n if (remainingDepth === 0) {\n // At this point we know `serialized` is a string of the form `\"[object XXXX]\"`. Clean it up so it's just `\"[XXXX]\"`.\n return stringified.replace('object ', '');\n }\n\n // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n if (memoize(value)) {\n return '[Circular ~]';\n }\n\n // If the value has a `toJSON` method, we call it to extract more information\n const valueWithToJSON = value ;\n if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {\n try {\n const jsonValue = valueWithToJSON.toJSON();\n // We need to normalize the return value of `.toJSON()` in case it has circular references\n return visit('', jsonValue, remainingDepth - 1, maxProperties, memo);\n } catch (err) {\n // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)\n }\n }\n\n // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse\n // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each\n // property/entry, and keep track of the number of items we add to it.\n const normalized = (Array.isArray(value) ? [] : {}) ;\n let numAdded = 0;\n\n // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant\n // properties are non-enumerable and otherwise would get missed.\n const visitable = convertToPlainObject(value );\n\n for (const visitKey in visitable) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {\n continue;\n }\n\n if (numAdded >= maxProperties) {\n normalized[visitKey] = '[MaxProperties ~]';\n break;\n }\n\n // Recursively visit all the child nodes\n const visitValue = visitable[visitKey];\n normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo);\n\n numAdded++;\n }\n\n // Once we've visited all the branches, remove the parent from memo storage\n unmemoize(value);\n\n // Return accumulated values\n return normalized;\n}\n\n/* eslint-disable complexity */\n/**\n * Stringify the given value. Handles various known special values and types.\n *\n * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn\n * the number 1231 into \"[Object Number]\", nor on `null`, as it will throw.\n *\n * @param value The value to stringify\n * @returns A stringified representation of the given value\n */\nfunction stringifyValue(\n key,\n // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n // our internal use, it'll do\n value,\n) {\n try {\n if (key === 'domain' && value && typeof value === 'object' && (value )._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first\n // which won't throw if they are not present.\n\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n\n if (isVueViewModel(value)) {\n return '[VueViewModel]';\n }\n\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n\n if (typeof value === 'function') {\n return `[Function: ${getFunctionName(value)}]`;\n }\n\n if (typeof value === 'symbol') {\n return `[${String(value)}]`;\n }\n\n // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n if (typeof value === 'bigint') {\n return `[BigInt: ${String(value)}]`;\n }\n\n // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n // we can make sure that only plain objects come out that way.\n const objName = getConstructorName(value);\n\n // Handle HTML Elements\n if (/^HTML(\\w*)Element$/.test(objName)) {\n return `[HTMLElement: ${objName}]`;\n }\n\n return `[object ${objName}]`;\n } catch (err) {\n return `**non-serializable** (${err})`;\n }\n}\n/* eslint-enable complexity */\n\nfunction getConstructorName(value) {\n const prototype = Object.getPrototypeOf(value);\n\n return prototype ? prototype.constructor.name : 'null prototype';\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value) {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction jsonSize(value) {\n return utf8Length(JSON.stringify(value));\n}\n\nexport { normalize, normalizeToSize, visit as walk };\n//# sourceMappingURL=normalize.js.map\n","import type { Primitive } from '@sentry/types';\n\nimport { isNaN, isSyntheticEvent, isVueViewModel } from './is';\nimport type { MemoFunc } from './memo';\nimport { memoBuilder } from './memo';\nimport { convertToPlainObject } from './object';\nimport { getFunctionName } from './stacktrace';\n\ntype Prototype = { constructor: (...args: unknown[]) => unknown };\n// This is a hack to placate TS, relying on the fact that technically, arrays are objects with integer keys. Normally we\n// think of those keys as actual numbers, but `arr['0']` turns out to work just as well as `arr[0]`, and doing it this\n// way lets us use a single type in the places where behave as if we are only dealing with objects, even if some of them\n// might be arrays.\ntype ObjOrArray = { [key: string]: T };\n\n/**\n * Recursively normalizes the given object.\n *\n * - Creates a copy to prevent original input mutation\n * - Skips non-enumerable properties\n * - When stringifying, calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format\n * - Translates known global objects/classes to a string representations\n * - Takes care of `Error` object serialization\n * - Optionally limits depth of final output\n * - Optionally limits number of properties/elements included in any single object/array\n *\n * @param input The object to be normalized.\n * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)\n * @param maxProperties The max number of elements or properties to be included in any single array or\n * object in the normallized output.\n * @returns A normalized version of the object, or `\"**non-serializable**\"` if any errors are thrown during normalization.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function normalize(input: unknown, depth: number = 100, maxProperties: number = +Infinity): any {\n try {\n // since we're at the outermost level, we don't provide a key\n return visit('', input, depth, maxProperties);\n } catch (err) {\n return { ERROR: `**non-serializable** (${err})` };\n }\n}\n\n/** JSDoc */\nexport function normalizeToSize(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n object: { [key: string]: any },\n // Default Node.js REPL depth\n depth: number = 3,\n // 100kB, as 200kB is max payload size, so half sounds reasonable\n maxSize: number = 100 * 1024,\n): T {\n const normalized = normalize(object, depth);\n\n if (jsonSize(normalized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n\n return normalized as T;\n}\n\n/**\n * Visits a node to perform normalization on it\n *\n * @param key The key corresponding to the given node\n * @param value The node to be visited\n * @param depth Optional number indicating the maximum recursion depth\n * @param maxProperties Optional maximum number of properties/elements included in any single object/array\n * @param memo Optional Memo class handling decycling\n */\nfunction visit(\n key: string,\n value: unknown,\n depth: number = +Infinity,\n maxProperties: number = +Infinity,\n memo: MemoFunc = memoBuilder(),\n): Primitive | ObjOrArray {\n const [memoize, unmemoize] = memo;\n\n // Get the simple cases out of the way first\n if (\n value == null || // this matches null and undefined -> eqeq not eqeqeq\n (['number', 'boolean', 'string'].includes(typeof value) && !isNaN(value))\n ) {\n return value as Primitive;\n }\n\n const stringified = stringifyValue(key, value);\n\n // Anything we could potentially dig into more (objects or arrays) will have come back as `\"[object XXXX]\"`.\n // Everything else will have already been serialized, so if we don't see that pattern, we're done.\n if (!stringified.startsWith('[object ')) {\n return stringified;\n }\n\n // From here on, we can assert that `value` is either an object or an array.\n\n // Do not normalize objects that we know have already been normalized. As a general rule, the\n // \"__sentry_skip_normalization__\" property should only be used sparingly and only should only be set on objects that\n // have already been normalized.\n if ((value as ObjOrArray)['__sentry_skip_normalization__']) {\n return value as ObjOrArray;\n }\n\n // We can set `__sentry_override_normalization_depth__` on an object to ensure that from there\n // We keep a certain amount of depth.\n // This should be used sparingly, e.g. we use it for the redux integration to ensure we get a certain amount of state.\n const remainingDepth =\n typeof (value as ObjOrArray)['__sentry_override_normalization_depth__'] === 'number'\n ? ((value as ObjOrArray)['__sentry_override_normalization_depth__'] as number)\n : depth;\n\n // We're also done if we've reached the max depth\n if (remainingDepth === 0) {\n // At this point we know `serialized` is a string of the form `\"[object XXXX]\"`. Clean it up so it's just `\"[XXXX]\"`.\n return stringified.replace('object ', '');\n }\n\n // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n if (memoize(value)) {\n return '[Circular ~]';\n }\n\n // If the value has a `toJSON` method, we call it to extract more information\n const valueWithToJSON = value as unknown & { toJSON?: () => unknown };\n if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {\n try {\n const jsonValue = valueWithToJSON.toJSON();\n // We need to normalize the return value of `.toJSON()` in case it has circular references\n return visit('', jsonValue, remainingDepth - 1, maxProperties, memo);\n } catch (err) {\n // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)\n }\n }\n\n // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse\n // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each\n // property/entry, and keep track of the number of items we add to it.\n const normalized = (Array.isArray(value) ? [] : {}) as ObjOrArray;\n let numAdded = 0;\n\n // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant\n // properties are non-enumerable and otherwise would get missed.\n const visitable = convertToPlainObject(value as ObjOrArray);\n\n for (const visitKey in visitable) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {\n continue;\n }\n\n if (numAdded >= maxProperties) {\n normalized[visitKey] = '[MaxProperties ~]';\n break;\n }\n\n // Recursively visit all the child nodes\n const visitValue = visitable[visitKey];\n normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo);\n\n numAdded++;\n }\n\n // Once we've visited all the branches, remove the parent from memo storage\n unmemoize(value);\n\n // Return accumulated values\n return normalized;\n}\n\n/**\n * @deprecated This export will be removed in v8.\n */\nexport { visit as walk };\n\n/* eslint-disable complexity */\n/**\n * Stringify the given value. Handles various known special values and types.\n *\n * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn\n * the number 1231 into \"[Object Number]\", nor on `null`, as it will throw.\n *\n * @param value The value to stringify\n * @returns A stringified representation of the given value\n */\nfunction stringifyValue(\n key: unknown,\n // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n // our internal use, it'll do\n value: Exclude,\n): string {\n try {\n if (key === 'domain' && value && typeof value === 'object' && (value as { _events: unknown })._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first\n // which won't throw if they are not present.\n\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n\n if (isVueViewModel(value)) {\n return '[VueViewModel]';\n }\n\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n\n if (typeof value === 'function') {\n return `[Function: ${getFunctionName(value)}]`;\n }\n\n if (typeof value === 'symbol') {\n return `[${String(value)}]`;\n }\n\n // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n if (typeof value === 'bigint') {\n return `[BigInt: ${String(value)}]`;\n }\n\n // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n // we can make sure that only plain objects come out that way.\n const objName = getConstructorName(value);\n\n // Handle HTML Elements\n if (/^HTML(\\w*)Element$/.test(objName)) {\n return `[HTMLElement: ${objName}]`;\n }\n\n return `[object ${objName}]`;\n } catch (err) {\n return `**non-serializable** (${err})`;\n }\n}\n/* eslint-enable complexity */\n\nfunction getConstructorName(value: unknown): string {\n const prototype: Prototype | null = Object.getPrototypeOf(value);\n\n return prototype ? prototype.constructor.name : 'null prototype';\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value: string): number {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction jsonSize(value: any): number {\n return utf8Length(JSON.stringify(value));\n}\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Helper to decycle json objects\n */\nfunction memoBuilder() {\n const hasWeakSet = typeof WeakSet === 'function';\n const inner = hasWeakSet ? new WeakSet() : [];\n function memoize(obj) {\n if (hasWeakSet) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < inner.length; i++) {\n const value = inner[i];\n if (value === obj) {\n return true;\n }\n }\n inner.push(obj);\n return false;\n }\n\n function unmemoize(obj) {\n if (hasWeakSet) {\n inner.delete(obj);\n } else {\n for (let i = 0; i < inner.length; i++) {\n if (inner[i] === obj) {\n inner.splice(i, 1);\n break;\n }\n }\n }\n }\n return [memoize, unmemoize];\n}\n\nexport { memoBuilder };\n//# sourceMappingURL=memo.js.map\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport type MemoFunc = [\n // memoize\n (obj: any) => boolean,\n // unmemoize\n (obj: any) => void,\n];\n\n/**\n * Helper to decycle json objects\n */\nexport function memoBuilder(): MemoFunc {\n const hasWeakSet = typeof WeakSet === 'function';\n const inner: any = hasWeakSet ? new WeakSet() : [];\n function memoize(obj: any): boolean {\n if (hasWeakSet) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < inner.length; i++) {\n const value = inner[i];\n if (value === obj) {\n return true;\n }\n }\n inner.push(obj);\n return false;\n }\n\n function unmemoize(obj: any): void {\n if (hasWeakSet) {\n inner.delete(obj);\n } else {\n for (let i = 0; i < inner.length; i++) {\n if (inner[i] === obj) {\n inner.splice(i, 1);\n break;\n }\n }\n }\n }\n return [memoize, unmemoize];\n}\n","import { node } from './node-stack-trace.js';\nexport { filenameIsInApp } from './node-stack-trace.js';\n\nconst STACKTRACE_FRAME_LIMIT = 50;\n// Used to sanitize webpack (error: *) wrapped stack errors\nconst WEBPACK_ERROR_REGEXP = /\\(error: (.*)\\)/;\nconst STRIP_FRAME_REGEXP = /captureMessage|captureException/;\n\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */\nfunction createStackParser(...parsers) {\n const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]);\n\n return (stack, skipFirst = 0) => {\n const frames = [];\n const lines = stack.split('\\n');\n\n for (let i = skipFirst; i < lines.length; i++) {\n const line = lines[i];\n // Ignore lines over 1kb as they are unlikely to be stack frames.\n // Many of the regular expressions use backtracking which results in run time that increases exponentially with\n // input size. Huge strings can result in hangs/Denial of Service:\n // https://github.com/getsentry/sentry-javascript/issues/2286\n if (line.length > 1024) {\n continue;\n }\n\n // https://github.com/getsentry/sentry-javascript/issues/5459\n // Remove webpack (error: *) wrappers\n const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, '$1') : line;\n\n // https://github.com/getsentry/sentry-javascript/issues/7813\n // Skip Error: lines\n if (cleanedLine.match(/\\S*Error: /)) {\n continue;\n }\n\n for (const parser of sortedParsers) {\n const frame = parser(cleanedLine);\n\n if (frame) {\n frames.push(frame);\n break;\n }\n }\n\n if (frames.length >= STACKTRACE_FRAME_LIMIT) {\n break;\n }\n }\n\n return stripSentryFramesAndReverse(frames);\n };\n}\n\n/**\n * Gets a stack parser implementation from Options.stackParser\n * @see Options\n *\n * If options contains an array of line parsers, it is converted into a parser\n */\nfunction stackParserFromStackParserOptions(stackParser) {\n if (Array.isArray(stackParser)) {\n return createStackParser(...stackParser);\n }\n return stackParser;\n}\n\n/**\n * Removes Sentry frames from the top and bottom of the stack if present and enforces a limit of max number of frames.\n * Assumes stack input is ordered from top to bottom and returns the reverse representation so call site of the\n * function that caused the crash is the last frame in the array.\n * @hidden\n */\nfunction stripSentryFramesAndReverse(stack) {\n if (!stack.length) {\n return [];\n }\n\n const localStack = Array.from(stack);\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (/sentryWrapped/.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n }\n\n // Reversing in the middle of the procedure allows us to just pop the values off the stack\n localStack.reverse();\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n\n // When using synthetic events, we will have a 2 levels deep stack, as `new Error('Sentry syntheticException')`\n // is produced within the hub itself, making it:\n //\n // Sentry.captureException()\n // getCurrentHub().captureException()\n //\n // instead of just the top `Sentry` call itself.\n // This forces us to possibly strip an additional frame in the exact same was as above.\n if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n }\n }\n\n return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map(frame => ({\n ...frame,\n filename: frame.filename || localStack[localStack.length - 1].filename,\n function: frame.function || '?',\n }));\n}\n\nconst defaultFunctionName = '';\n\n/**\n * Safely extract function name from itself\n */\nfunction getFunctionName(fn) {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n\n/**\n * Node.js stack line parser\n *\n * This is in @sentry/utils so it can be used from the Electron SDK in the browser for when `nodeIntegration == true`.\n * This allows it to be used without referencing or importing any node specific code which causes bundlers to complain\n */\nfunction nodeStackLineParser(getModule) {\n return [90, node(getModule)];\n}\n\nexport { createStackParser, getFunctionName, nodeStackLineParser, stackParserFromStackParserOptions, stripSentryFramesAndReverse };\n//# sourceMappingURL=stacktrace.js.map\n","import type { StackFrame, StackLineParser, StackParser } from '@sentry/types';\n\nimport type { GetModuleFn } from './node-stack-trace';\nimport { filenameIsInApp, node } from './node-stack-trace';\n\nexport { filenameIsInApp };\n\nconst STACKTRACE_FRAME_LIMIT = 50;\n// Used to sanitize webpack (error: *) wrapped stack errors\nconst WEBPACK_ERROR_REGEXP = /\\(error: (.*)\\)/;\nconst STRIP_FRAME_REGEXP = /captureMessage|captureException/;\n\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */\nexport function createStackParser(...parsers: StackLineParser[]): StackParser {\n const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]);\n\n return (stack: string, skipFirst: number = 0): StackFrame[] => {\n const frames: StackFrame[] = [];\n const lines = stack.split('\\n');\n\n for (let i = skipFirst; i < lines.length; i++) {\n const line = lines[i];\n // Ignore lines over 1kb as they are unlikely to be stack frames.\n // Many of the regular expressions use backtracking which results in run time that increases exponentially with\n // input size. Huge strings can result in hangs/Denial of Service:\n // https://github.com/getsentry/sentry-javascript/issues/2286\n if (line.length > 1024) {\n continue;\n }\n\n // https://github.com/getsentry/sentry-javascript/issues/5459\n // Remove webpack (error: *) wrappers\n const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, '$1') : line;\n\n // https://github.com/getsentry/sentry-javascript/issues/7813\n // Skip Error: lines\n if (cleanedLine.match(/\\S*Error: /)) {\n continue;\n }\n\n for (const parser of sortedParsers) {\n const frame = parser(cleanedLine);\n\n if (frame) {\n frames.push(frame);\n break;\n }\n }\n\n if (frames.length >= STACKTRACE_FRAME_LIMIT) {\n break;\n }\n }\n\n return stripSentryFramesAndReverse(frames);\n };\n}\n\n/**\n * Gets a stack parser implementation from Options.stackParser\n * @see Options\n *\n * If options contains an array of line parsers, it is converted into a parser\n */\nexport function stackParserFromStackParserOptions(stackParser: StackParser | StackLineParser[]): StackParser {\n if (Array.isArray(stackParser)) {\n return createStackParser(...stackParser);\n }\n return stackParser;\n}\n\n/**\n * Removes Sentry frames from the top and bottom of the stack if present and enforces a limit of max number of frames.\n * Assumes stack input is ordered from top to bottom and returns the reverse representation so call site of the\n * function that caused the crash is the last frame in the array.\n * @hidden\n */\nexport function stripSentryFramesAndReverse(stack: ReadonlyArray): StackFrame[] {\n if (!stack.length) {\n return [];\n }\n\n const localStack = Array.from(stack);\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (/sentryWrapped/.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n }\n\n // Reversing in the middle of the procedure allows us to just pop the values off the stack\n localStack.reverse();\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n\n // When using synthetic events, we will have a 2 levels deep stack, as `new Error('Sentry syntheticException')`\n // is produced within the hub itself, making it:\n //\n // Sentry.captureException()\n // getCurrentHub().captureException()\n //\n // instead of just the top `Sentry` call itself.\n // This forces us to possibly strip an additional frame in the exact same was as above.\n if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n }\n }\n\n return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map(frame => ({\n ...frame,\n filename: frame.filename || localStack[localStack.length - 1].filename,\n function: frame.function || '?',\n }));\n}\n\nconst defaultFunctionName = '';\n\n/**\n * Safely extract function name from itself\n */\nexport function getFunctionName(fn: unknown): string {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n\n/**\n * Node.js stack line parser\n *\n * This is in @sentry/utils so it can be used from the Electron SDK in the browser for when `nodeIntegration == true`.\n * This allows it to be used without referencing or importing any node specific code which causes bundlers to complain\n */\nexport function nodeStackLineParser(getModule?: GetModuleFn): StackLineParser {\n return [90, node(getModule)];\n}\n","/**\n * Does this filename look like it's part of the app code?\n */\nfunction filenameIsInApp(filename, isNative = false) {\n const isInternal =\n isNative ||\n (filename &&\n // It's not internal if it's an absolute linux path\n !filename.startsWith('/') &&\n // It's not internal if it's an absolute windows path\n !filename.includes(':\\\\') &&\n // It's not internal if the path is starting with a dot\n !filename.startsWith('.') &&\n // It's not internal if the frame has a protocol. In node, this is usually the case if the file got pre-processed with a bundler like webpack\n !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\\-+])*:\\/\\//)); // Schema from: https://stackoverflow.com/a/3641782\n\n // in_app is all that's not an internal Node function or a module within node_modules\n // note that isNative appears to return true even for node core libraries\n // see https://github.com/getsentry/raven-node/issues/176\n\n return !isInternal && filename !== undefined && !filename.includes('node_modules/');\n}\n\n/** Node Stack line parser */\n// eslint-disable-next-line complexity\nfunction node(getModule) {\n const FILENAME_MATCH = /^\\s*[-]{4,}$/;\n const FULL_MATCH = /at (?:async )?(?:(.+?)\\s+\\()?(?:(.+):(\\d+):(\\d+)?|([^)]+))\\)?/;\n\n // eslint-disable-next-line complexity\n return (line) => {\n const lineMatch = line.match(FULL_MATCH);\n\n if (lineMatch) {\n let object;\n let method;\n let functionName;\n let typeName;\n let methodName;\n\n if (lineMatch[1]) {\n functionName = lineMatch[1];\n\n let methodStart = functionName.lastIndexOf('.');\n if (functionName[methodStart - 1] === '.') {\n methodStart--;\n }\n\n if (methodStart > 0) {\n object = functionName.slice(0, methodStart);\n method = functionName.slice(methodStart + 1);\n const objectEnd = object.indexOf('.Module');\n if (objectEnd > 0) {\n functionName = functionName.slice(objectEnd + 1);\n object = object.slice(0, objectEnd);\n }\n }\n typeName = undefined;\n }\n\n if (method) {\n typeName = object;\n methodName = method;\n }\n\n if (method === '') {\n methodName = undefined;\n functionName = undefined;\n }\n\n if (functionName === undefined) {\n methodName = methodName || '';\n functionName = typeName ? `${typeName}.${methodName}` : methodName;\n }\n\n let filename = lineMatch[2] && lineMatch[2].startsWith('file://') ? lineMatch[2].slice(7) : lineMatch[2];\n const isNative = lineMatch[5] === 'native';\n\n if (!filename && lineMatch[5] && !isNative) {\n filename = lineMatch[5];\n }\n\n return {\n filename,\n module: getModule ? getModule(filename) : undefined,\n function: functionName,\n lineno: parseInt(lineMatch[3], 10) || undefined,\n colno: parseInt(lineMatch[4], 10) || undefined,\n in_app: filenameIsInApp(filename, isNative),\n };\n }\n\n if (line.match(FILENAME_MATCH)) {\n return {\n filename: line,\n };\n }\n\n return undefined;\n };\n}\n\nexport { filenameIsInApp, node };\n//# sourceMappingURL=node-stack-trace.js.map\n","// This code was originally forked from https://github.com/felixge/node-stack-trace\n// Since then it has been highly modified to fit our needs.\n\n// Copyright (c) 2011 Felix Geisendörfer (felix@debuggable.com)//\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions://\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.//\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport type { StackLineParserFn } from '@sentry/types';\n\nexport type GetModuleFn = (filename: string | undefined) => string | undefined;\n\n/**\n * Does this filename look like it's part of the app code?\n */\nexport function filenameIsInApp(filename: string, isNative: boolean = false): boolean {\n const isInternal =\n isNative ||\n (filename &&\n // It's not internal if it's an absolute linux path\n !filename.startsWith('/') &&\n // It's not internal if it's an absolute windows path\n !filename.includes(':\\\\') &&\n // It's not internal if the path is starting with a dot\n !filename.startsWith('.') &&\n // It's not internal if the frame has a protocol. In node, this is usually the case if the file got pre-processed with a bundler like webpack\n !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\\-+])*:\\/\\//)); // Schema from: https://stackoverflow.com/a/3641782\n\n // in_app is all that's not an internal Node function or a module within node_modules\n // note that isNative appears to return true even for node core libraries\n // see https://github.com/getsentry/raven-node/issues/176\n\n return !isInternal && filename !== undefined && !filename.includes('node_modules/');\n}\n\n/** Node Stack line parser */\n// eslint-disable-next-line complexity\nexport function node(getModule?: GetModuleFn): StackLineParserFn {\n const FILENAME_MATCH = /^\\s*[-]{4,}$/;\n const FULL_MATCH = /at (?:async )?(?:(.+?)\\s+\\()?(?:(.+):(\\d+):(\\d+)?|([^)]+))\\)?/;\n\n // eslint-disable-next-line complexity\n return (line: string) => {\n const lineMatch = line.match(FULL_MATCH);\n\n if (lineMatch) {\n let object: string | undefined;\n let method: string | undefined;\n let functionName: string | undefined;\n let typeName: string | undefined;\n let methodName: string | undefined;\n\n if (lineMatch[1]) {\n functionName = lineMatch[1];\n\n let methodStart = functionName.lastIndexOf('.');\n if (functionName[methodStart - 1] === '.') {\n methodStart--;\n }\n\n if (methodStart > 0) {\n object = functionName.slice(0, methodStart);\n method = functionName.slice(methodStart + 1);\n const objectEnd = object.indexOf('.Module');\n if (objectEnd > 0) {\n functionName = functionName.slice(objectEnd + 1);\n object = object.slice(0, objectEnd);\n }\n }\n typeName = undefined;\n }\n\n if (method) {\n typeName = object;\n methodName = method;\n }\n\n if (method === '') {\n methodName = undefined;\n functionName = undefined;\n }\n\n if (functionName === undefined) {\n methodName = methodName || '';\n functionName = typeName ? `${typeName}.${methodName}` : methodName;\n }\n\n let filename = lineMatch[2] && lineMatch[2].startsWith('file://') ? lineMatch[2].slice(7) : lineMatch[2];\n const isNative = lineMatch[5] === 'native';\n\n if (!filename && lineMatch[5] && !isNative) {\n filename = lineMatch[5];\n }\n\n return {\n filename,\n module: getModule ? getModule(filename) : undefined,\n function: functionName,\n lineno: parseInt(lineMatch[3], 10) || undefined,\n colno: parseInt(lineMatch[4], 10) || undefined,\n in_app: filenameIsInApp(filename, isNative),\n };\n }\n\n if (line.match(FILENAME_MATCH)) {\n return {\n filename: line,\n };\n }\n\n return undefined;\n };\n}\n","import { isString } from './is.js';\nimport { logger, CONSOLE_LEVELS, originalConsoleMethods } from './logger.js';\nimport { uuid4 } from './misc.js';\nimport { fill, addNonEnumerableProperty } from './object.js';\nimport { getFunctionName } from './stacktrace.js';\nimport { supportsNativeFetch } from './supports.js';\nimport { getGlobalObject, GLOBAL_OBJ } from './worldwide.js';\nimport { supportsHistory } from './vendor/supportsHistory.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nconst SENTRY_XHR_DATA_KEY = '__sentry_xhr_v2__';\n\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nconst handlers = {};\nconst instrumented = {};\n\n/** Instruments given API */\nfunction instrument(type) {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('unknown instrumentation type:', type);\n return;\n }\n}\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addInstrumentationHandler(type, callback) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(callback);\n instrument(type);\n}\n\n/**\n * Reset all instrumentation handlers.\n * This can be used by tests to ensure we have a clean slate of instrumentation handlers.\n */\nfunction resetInstrumentationHandlers() {\n Object.keys(handlers).forEach(key => {\n handlers[key ] = undefined;\n });\n}\n\n/** JSDoc */\nfunction triggerHandlers(type, data) {\n if (!type || !handlers[type]) {\n return;\n }\n\n for (const handler of handlers[type] || []) {\n try {\n handler(data);\n } catch (e) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\n/** JSDoc */\nfunction instrumentConsole() {\n if (!('console' in GLOBAL_OBJ)) {\n return;\n }\n\n CONSOLE_LEVELS.forEach(function (level) {\n if (!(level in GLOBAL_OBJ.console)) {\n return;\n }\n\n fill(GLOBAL_OBJ.console, level, function (originalConsoleMethod) {\n originalConsoleMethods[level] = originalConsoleMethod;\n\n return function (...args) {\n triggerHandlers('console', { args, level });\n\n const log = originalConsoleMethods[level];\n log && log.apply(GLOBAL_OBJ.console, args);\n };\n });\n });\n}\n\n/** JSDoc */\nfunction instrumentFetch() {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(GLOBAL_OBJ, 'fetch', function (originalFetch) {\n return function (...args) {\n const { method, url } = parseFetchArgs(args);\n\n const handlerData = {\n args,\n fetchData: {\n method,\n url,\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...handlerData,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(GLOBAL_OBJ, args).then(\n (response) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n response,\n });\n return response;\n },\n (error) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n error,\n });\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n },\n );\n };\n });\n}\n\nfunction hasProp(obj, prop) {\n return !!obj && typeof obj === 'object' && !!(obj )[prop];\n}\n\nfunction getUrlFromResource(resource) {\n if (typeof resource === 'string') {\n return resource;\n }\n\n if (!resource) {\n return '';\n }\n\n if (hasProp(resource, 'url')) {\n return resource.url;\n }\n\n if (resource.toString) {\n return resource.toString();\n }\n\n return '';\n}\n\n/**\n * Parses the fetch arguments to find the used Http method and the url of the request\n */\nfunction parseFetchArgs(fetchArgs) {\n if (fetchArgs.length === 0) {\n return { method: 'GET', url: '' };\n }\n\n if (fetchArgs.length === 2) {\n const [url, options] = fetchArgs ;\n\n return {\n url: getUrlFromResource(url),\n method: hasProp(options, 'method') ? String(options.method).toUpperCase() : 'GET',\n };\n }\n\n const arg = fetchArgs[0];\n return {\n url: getUrlFromResource(arg ),\n method: hasProp(arg, 'method') ? String(arg.method).toUpperCase() : 'GET',\n };\n}\n\n/** JSDoc */\nfunction instrumentXHR() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (!(WINDOW ).XMLHttpRequest) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function (originalOpen) {\n return function ( ...args) {\n const startTimestamp = Date.now();\n\n const url = args[1];\n const xhrInfo = (this[SENTRY_XHR_DATA_KEY] = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n request_headers: {},\n });\n\n // if Sentry key appears in URL, don't capture it as a request\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (isString(url) && xhrInfo.method === 'POST' && url.match(/sentry_key/)) {\n this.__sentry_own_request__ = true;\n }\n\n const onreadystatechangeHandler = () => {\n // For whatever reason, this is not the same instance here as from the outer method\n const xhrInfo = this[SENTRY_XHR_DATA_KEY];\n\n if (!xhrInfo) {\n return;\n }\n\n if (this.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = this.status;\n } catch (e) {\n /* do nothing */\n }\n\n triggerHandlers('xhr', {\n args: args ,\n endTimestamp: Date.now(),\n startTimestamp,\n xhr: this,\n } );\n }\n };\n\n if ('onreadystatechange' in this && typeof this.onreadystatechange === 'function') {\n fill(this, 'onreadystatechange', function (original) {\n return function ( ...readyStateArgs) {\n onreadystatechangeHandler();\n return original.apply(this, readyStateArgs);\n };\n });\n } else {\n this.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n // Intercepting `setRequestHeader` to access the request headers of XHR instance.\n // This will only work for user/library defined headers, not for the default/browser-assigned headers.\n // Request cookies are also unavailable for XHR, as `Cookie` header can't be defined by `setRequestHeader`.\n fill(this, 'setRequestHeader', function (original) {\n return function ( ...setRequestHeaderArgs) {\n const [header, value] = setRequestHeaderArgs ;\n\n const xhrInfo = this[SENTRY_XHR_DATA_KEY];\n\n if (xhrInfo) {\n xhrInfo.request_headers[header.toLowerCase()] = value;\n }\n\n return original.apply(this, setRequestHeaderArgs);\n };\n });\n\n return originalOpen.apply(this, args);\n };\n });\n\n fill(xhrproto, 'send', function (originalSend) {\n return function ( ...args) {\n const sentryXhrData = this[SENTRY_XHR_DATA_KEY];\n if (sentryXhrData && args[0] !== undefined) {\n sentryXhrData.body = args[0];\n }\n\n triggerHandlers('xhr', {\n args,\n startTimestamp: Date.now(),\n xhr: this,\n });\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nlet lastHref;\n\n/** JSDoc */\nfunction instrumentHistory() {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = WINDOW.onpopstate;\n WINDOW.onpopstate = function ( ...args) {\n const to = WINDOW.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n if (oldOnPopState) {\n // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n } catch (_oO) {\n // no-empty\n }\n }\n };\n\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction) {\n return function ( ...args) {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(WINDOW.history, 'pushState', historyReplacementFunction);\n fill(WINDOW.history, 'replaceState', historyReplacementFunction);\n}\n\nconst DEBOUNCE_DURATION = 1000;\nlet debounceTimerID;\nlet lastCapturedEventType;\nlet lastCapturedEventTargetId;\n\n/**\n * Check whether the event is similar to the last captured one. For example, two click events on the same button.\n */\nfunction isSimilarToLastCapturedEvent(event) {\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (event.type !== lastCapturedEventType) {\n return false;\n }\n\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (!event.target || (event.target )._sentryId !== lastCapturedEventTargetId) {\n return false;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return true;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(eventType, target) {\n // We are only interested in filtering `keypress` events for now.\n if (eventType !== 'keypress') {\n return false;\n }\n\n if (!target || !target.tagName) {\n return true;\n }\n\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n\n return true;\n}\n\nfunction getEventTarget(event) {\n try {\n return event.target ;\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n return null;\n }\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param handler function that will be triggered\n * @param globalListener indicates whether event was captured by the global event listener\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction makeDOMEventHandler(handler, globalListener = false) {\n return (event) => {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || event['_sentryCaptured']) {\n return;\n }\n\n const target = getEventTarget(event);\n\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event.type, target)) {\n return;\n }\n\n // Mark event as \"seen\"\n addNonEnumerableProperty(event, '_sentryCaptured', true);\n\n if (target && !target._sentryId) {\n // Add UUID to event target so we can identify if\n addNonEnumerableProperty(target, '_sentryId', uuid4());\n }\n\n const name = event.type === 'keypress' ? 'input' : event.type;\n\n // If there is no last captured event, it means that we can safely capture the new event and store it for future comparisons.\n // If there is a last captured event, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n if (!isSimilarToLastCapturedEvent(event)) {\n handler({\n event: event,\n name,\n global: globalListener,\n });\n lastCapturedEventType = event.type;\n lastCapturedEventTargetId = target ? target._sentryId : undefined;\n }\n\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = WINDOW.setTimeout(() => {\n lastCapturedEventTargetId = undefined;\n lastCapturedEventType = undefined;\n }, DEBOUNCE_DURATION);\n };\n}\n\n/** JSDoc */\nfunction instrumentDOM() {\n if (!WINDOW.document) {\n return;\n }\n\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n WINDOW.document.addEventListener('click', globalDOMEventHandler, false);\n WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach((target) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = (WINDOW )[target] && (WINDOW )[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (originalAddEventListener) {\n return function (\n\n type,\n listener,\n options,\n ) {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this ;\n const handlers = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});\n const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n if (!handlerForType.handler) {\n const handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n\n handlerForType.refCount++;\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (originalRemoveEventListener) {\n return function (\n\n type,\n listener,\n options,\n ) {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this ;\n const handlers = el.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n\n if (handlerForType) {\n handlerForType.refCount--;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers).length === 0) {\n delete el.__sentry_instrumentation_handlers__;\n }\n }\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n },\n );\n });\n}\n\nlet _oldOnErrorHandler = null;\n/** JSDoc */\nfunction instrumentError() {\n _oldOnErrorHandler = WINDOW.onerror;\n\n WINDOW.onerror = function (msg, url, line, column, error) {\n triggerHandlers('error', {\n column,\n error,\n line,\n msg,\n url,\n });\n\n if (_oldOnErrorHandler && !_oldOnErrorHandler.__SENTRY_LOADER__) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n\n WINDOW.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\n\nlet _oldOnUnhandledRejectionHandler = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection() {\n _oldOnUnhandledRejectionHandler = WINDOW.onunhandledrejection;\n\n WINDOW.onunhandledrejection = function (e) {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler && !_oldOnUnhandledRejectionHandler.__SENTRY_LOADER__) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n\n WINDOW.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexport { SENTRY_XHR_DATA_KEY, addInstrumentationHandler, instrumentDOM, instrumentXHR, parseFetchArgs, resetInstrumentationHandlers };\n//# sourceMappingURL=instrument.js.map\n","/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-types */\nimport type {\n HandlerDataFetch,\n HandlerDataXhr,\n SentryWrappedXMLHttpRequest,\n SentryXhrData,\n WrappedFunction,\n} from '@sentry/types';\n\nimport { isString } from './is';\nimport type { ConsoleLevel } from './logger';\nimport { CONSOLE_LEVELS, logger, originalConsoleMethods } from './logger';\nimport { uuid4 } from './misc';\nimport { addNonEnumerableProperty, fill } from './object';\nimport { getFunctionName } from './stacktrace';\nimport { supportsHistory, supportsNativeFetch } from './supports';\nimport { getGlobalObject, GLOBAL_OBJ } from './worldwide';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nexport const SENTRY_XHR_DATA_KEY = '__sentry_xhr_v2__';\n\nexport type InstrumentHandlerType =\n | 'console'\n | 'dom'\n | 'fetch'\n | 'history'\n | 'sentry'\n | 'xhr'\n | 'error'\n | 'unhandledrejection';\nexport type InstrumentHandlerCallback = (data: any) => void;\n\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\n/** Instruments given API */\nfunction instrument(type: InstrumentHandlerType): void {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n __DEBUG_BUILD__ && logger.warn('unknown instrumentation type:', type);\n return;\n }\n}\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(type: InstrumentHandlerType, callback: InstrumentHandlerCallback): void {\n handlers[type] = handlers[type] || [];\n (handlers[type] as InstrumentHandlerCallback[]).push(callback);\n instrument(type);\n}\n\n/**\n * Reset all instrumentation handlers.\n * This can be used by tests to ensure we have a clean slate of instrumentation handlers.\n */\nexport function resetInstrumentationHandlers(): void {\n Object.keys(handlers).forEach(key => {\n handlers[key as InstrumentHandlerType] = undefined;\n });\n}\n\n/** JSDoc */\nfunction triggerHandlers(type: InstrumentHandlerType, data: any): void {\n if (!type || !handlers[type]) {\n return;\n }\n\n for (const handler of handlers[type] || []) {\n try {\n handler(data);\n } catch (e) {\n __DEBUG_BUILD__ &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\n/** JSDoc */\nfunction instrumentConsole(): void {\n if (!('console' in GLOBAL_OBJ)) {\n return;\n }\n\n CONSOLE_LEVELS.forEach(function (level: ConsoleLevel): void {\n if (!(level in GLOBAL_OBJ.console)) {\n return;\n }\n\n fill(GLOBAL_OBJ.console, level, function (originalConsoleMethod: () => any): Function {\n originalConsoleMethods[level] = originalConsoleMethod;\n\n return function (...args: any[]): void {\n triggerHandlers('console', { args, level });\n\n const log = originalConsoleMethods[level];\n log && log.apply(GLOBAL_OBJ.console, args);\n };\n });\n });\n}\n\n/** JSDoc */\nfunction instrumentFetch(): void {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(GLOBAL_OBJ, 'fetch', function (originalFetch: () => void): () => void {\n return function (...args: any[]): void {\n const { method, url } = parseFetchArgs(args);\n\n const handlerData: HandlerDataFetch = {\n args,\n fetchData: {\n method,\n url,\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...handlerData,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(GLOBAL_OBJ, args).then(\n (response: Response) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n response,\n });\n return response;\n },\n (error: Error) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n error,\n });\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n },\n );\n };\n });\n}\n\nfunction hasProp(obj: unknown, prop: T): obj is Record {\n return !!obj && typeof obj === 'object' && !!(obj as Record)[prop];\n}\n\ntype FetchResource = string | { toString(): string } | { url: string };\n\nfunction getUrlFromResource(resource: FetchResource): string {\n if (typeof resource === 'string') {\n return resource;\n }\n\n if (!resource) {\n return '';\n }\n\n if (hasProp(resource, 'url')) {\n return resource.url;\n }\n\n if (resource.toString) {\n return resource.toString();\n }\n\n return '';\n}\n\n/**\n * Parses the fetch arguments to find the used Http method and the url of the request\n */\nexport function parseFetchArgs(fetchArgs: unknown[]): { method: string; url: string } {\n if (fetchArgs.length === 0) {\n return { method: 'GET', url: '' };\n }\n\n if (fetchArgs.length === 2) {\n const [url, options] = fetchArgs as [FetchResource, object];\n\n return {\n url: getUrlFromResource(url),\n method: hasProp(options, 'method') ? String(options.method).toUpperCase() : 'GET',\n };\n }\n\n const arg = fetchArgs[0];\n return {\n url: getUrlFromResource(arg as FetchResource),\n method: hasProp(arg, 'method') ? String(arg.method).toUpperCase() : 'GET',\n };\n}\n\n/** JSDoc */\nexport function instrumentXHR(): void {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (!(WINDOW as any).XMLHttpRequest) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function (originalOpen: () => void): () => void {\n return function (this: XMLHttpRequest & SentryWrappedXMLHttpRequest, ...args: any[]): void {\n const startTimestamp = Date.now();\n\n const url = args[1];\n const xhrInfo: SentryXhrData = (this[SENTRY_XHR_DATA_KEY] = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n request_headers: {},\n });\n\n // if Sentry key appears in URL, don't capture it as a request\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (isString(url) && xhrInfo.method === 'POST' && url.match(/sentry_key/)) {\n this.__sentry_own_request__ = true;\n }\n\n const onreadystatechangeHandler: () => void = () => {\n // For whatever reason, this is not the same instance here as from the outer method\n const xhrInfo = this[SENTRY_XHR_DATA_KEY];\n\n if (!xhrInfo) {\n return;\n }\n\n if (this.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = this.status;\n } catch (e) {\n /* do nothing */\n }\n\n triggerHandlers('xhr', {\n args: args as [string, string],\n endTimestamp: Date.now(),\n startTimestamp,\n xhr: this,\n } as HandlerDataXhr);\n }\n };\n\n if ('onreadystatechange' in this && typeof this.onreadystatechange === 'function') {\n fill(this, 'onreadystatechange', function (original: WrappedFunction): Function {\n return function (this: SentryWrappedXMLHttpRequest, ...readyStateArgs: any[]): void {\n onreadystatechangeHandler();\n return original.apply(this, readyStateArgs);\n };\n });\n } else {\n this.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n // Intercepting `setRequestHeader` to access the request headers of XHR instance.\n // This will only work for user/library defined headers, not for the default/browser-assigned headers.\n // Request cookies are also unavailable for XHR, as `Cookie` header can't be defined by `setRequestHeader`.\n fill(this, 'setRequestHeader', function (original: WrappedFunction): Function {\n return function (this: SentryWrappedXMLHttpRequest, ...setRequestHeaderArgs: unknown[]): void {\n const [header, value] = setRequestHeaderArgs as [string, string];\n\n const xhrInfo = this[SENTRY_XHR_DATA_KEY];\n\n if (xhrInfo) {\n xhrInfo.request_headers[header.toLowerCase()] = value;\n }\n\n return original.apply(this, setRequestHeaderArgs);\n };\n });\n\n return originalOpen.apply(this, args);\n };\n });\n\n fill(xhrproto, 'send', function (originalSend: () => void): () => void {\n return function (this: XMLHttpRequest & SentryWrappedXMLHttpRequest, ...args: any[]): void {\n const sentryXhrData = this[SENTRY_XHR_DATA_KEY];\n if (sentryXhrData && args[0] !== undefined) {\n sentryXhrData.body = args[0];\n }\n\n triggerHandlers('xhr', {\n args,\n startTimestamp: Date.now(),\n xhr: this,\n });\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nlet lastHref: string;\n\n/** JSDoc */\nfunction instrumentHistory(): void {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = WINDOW.onpopstate;\n WINDOW.onpopstate = function (this: WindowEventHandlers, ...args: any[]): any {\n const to = WINDOW.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n if (oldOnPopState) {\n // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n } catch (_oO) {\n // no-empty\n }\n }\n };\n\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction: () => void): () => void {\n return function (this: History, ...args: any[]): void {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(WINDOW.history, 'pushState', historyReplacementFunction);\n fill(WINDOW.history, 'replaceState', historyReplacementFunction);\n}\n\nconst DEBOUNCE_DURATION = 1000;\nlet debounceTimerID: number | undefined;\nlet lastCapturedEventType: string | undefined;\nlet lastCapturedEventTargetId: string | undefined;\n\ntype SentryWrappedTarget = HTMLElement & { _sentryId?: string };\n\n/**\n * Check whether the event is similar to the last captured one. For example, two click events on the same button.\n */\nfunction isSimilarToLastCapturedEvent(event: Event): boolean {\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (event.type !== lastCapturedEventType) {\n return false;\n }\n\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (!event.target || (event.target as SentryWrappedTarget)._sentryId !== lastCapturedEventTargetId) {\n return false;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return true;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(eventType: string, target: SentryWrappedTarget | null): boolean {\n // We are only interested in filtering `keypress` events for now.\n if (eventType !== 'keypress') {\n return false;\n }\n\n if (!target || !target.tagName) {\n return true;\n }\n\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n\n return true;\n}\n\nfunction getEventTarget(event: Event): SentryWrappedTarget | null {\n try {\n return event.target as SentryWrappedTarget | null;\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n return null;\n }\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param handler function that will be triggered\n * @param globalListener indicates whether event was captured by the global event listener\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction makeDOMEventHandler(handler: Function, globalListener: boolean = false): (event: Event) => void {\n return (event: Event & { _sentryCaptured?: true }): void => {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || event['_sentryCaptured']) {\n return;\n }\n\n const target = getEventTarget(event);\n\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event.type, target)) {\n return;\n }\n\n // Mark event as \"seen\"\n addNonEnumerableProperty(event, '_sentryCaptured', true);\n\n if (target && !target._sentryId) {\n // Add UUID to event target so we can identify if\n addNonEnumerableProperty(target, '_sentryId', uuid4());\n }\n\n const name = event.type === 'keypress' ? 'input' : event.type;\n\n // If there is no last captured event, it means that we can safely capture the new event and store it for future comparisons.\n // If there is a last captured event, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n if (!isSimilarToLastCapturedEvent(event)) {\n handler({\n event: event,\n name,\n global: globalListener,\n });\n lastCapturedEventType = event.type;\n lastCapturedEventTargetId = target ? target._sentryId : undefined;\n }\n\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = WINDOW.setTimeout(() => {\n lastCapturedEventTargetId = undefined;\n lastCapturedEventType = undefined;\n }, DEBOUNCE_DURATION);\n };\n}\n\ntype AddEventListener = (\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n) => void;\ntype RemoveEventListener = (\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n) => void;\n\ntype InstrumentedElement = Element & {\n __sentry_instrumentation_handlers__?: {\n [key in 'click' | 'keypress']?: {\n handler?: Function;\n /** The number of custom listeners attached to this element */\n refCount: number;\n };\n };\n};\n\n/** JSDoc */\nexport function instrumentDOM(): void {\n if (!WINDOW.document) {\n return;\n }\n\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n WINDOW.document.addEventListener('click', globalDOMEventHandler, false);\n WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach((target: string) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = (WINDOW as any)[target] && (WINDOW as any)[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (originalAddEventListener: AddEventListener): AddEventListener {\n return function (\n this: Element,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): AddEventListener {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this as InstrumentedElement;\n const handlers = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});\n const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n if (!handlerForType.handler) {\n const handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n\n handlerForType.refCount++;\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (originalRemoveEventListener: RemoveEventListener): RemoveEventListener {\n return function (\n this: Element,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this as InstrumentedElement;\n const handlers = el.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n\n if (handlerForType) {\n handlerForType.refCount--;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers).length === 0) {\n delete el.__sentry_instrumentation_handlers__;\n }\n }\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n },\n );\n });\n}\n\nlet _oldOnErrorHandler: (typeof WINDOW)['onerror'] | null = null;\n/** JSDoc */\nfunction instrumentError(): void {\n _oldOnErrorHandler = WINDOW.onerror;\n\n WINDOW.onerror = function (msg: unknown, url: unknown, line: unknown, column: unknown, error: unknown): boolean {\n triggerHandlers('error', {\n column,\n error,\n line,\n msg,\n url,\n });\n\n if (_oldOnErrorHandler && !_oldOnErrorHandler.__SENTRY_LOADER__) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n\n WINDOW.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\n\nlet _oldOnUnhandledRejectionHandler: (typeof WINDOW)['onunhandledrejection'] | null = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection(): void {\n _oldOnUnhandledRejectionHandler = WINDOW.onunhandledrejection;\n\n WINDOW.onunhandledrejection = function (e: any): boolean {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler && !_oldOnUnhandledRejectionHandler.__SENTRY_LOADER__) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n\n WINDOW.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;\n}\n","import { logger } from './logger.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsErrorEvent() {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMError() {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-expect-error It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMException() {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsFetch() {\n if (!('fetch' in WINDOW)) {\n return false;\n }\n\n try {\n new Headers();\n new Request('http://www.example.com');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isNativeFetch(func) {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nfunction supportsNativeFetch() {\n if (!supportsFetch()) {\n return false;\n }\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFetch(WINDOW.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof (doc.createElement ) === 'function') {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReportingObserver() {\n return 'ReportingObserver' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReferrerPolicy() {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin' ,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\nexport { isNativeFetch, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver };\n//# sourceMappingURL=supports.js.map\n","import { logger } from './logger';\nimport { getGlobalObject } from './worldwide';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nexport { supportsHistory } from './vendor/supportsHistory';\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent(): boolean {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError(): boolean {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-expect-error It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException(): boolean {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch(): boolean {\n if (!('fetch' in WINDOW)) {\n return false;\n }\n\n try {\n new Headers();\n new Request('http://www.example.com');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isNativeFetch(func: Function): boolean {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch(): boolean {\n if (!supportsFetch()) {\n return false;\n }\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFetch(WINDOW.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof (doc.createElement as unknown) === 'function') {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n __DEBUG_BUILD__ &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver(): boolean {\n return 'ReportingObserver' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy(): boolean {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin' as ReferrerPolicy,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n","import { getGlobalObject } from '../worldwide.js';\n\n// Based on https://github.com/angular/angular.js/pull/13945/files\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsHistory() {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const chrome = (WINDOW ).chrome;\n const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n const hasHistoryApi = 'history' in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n\nexport { supportsHistory };\n//# sourceMappingURL=supportsHistory.js.map\n","// Based on https://github.com/angular/angular.js/pull/13945/files\n// The MIT License\n\n// Copyright (c) 2010-2016 Google, Inc. http://angularjs.org\n\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { getGlobalObject } from '../worldwide';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory(): boolean {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const chrome = (WINDOW as any).chrome;\n const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n const hasHistoryApi = 'history' in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n","import { BaseClient, SDK_VERSION } from '@sentry/core';\nimport { getSDKSource, logger, createClientReportEnvelope, dsnToString } from '@sentry/utils';\nimport { eventFromException, eventFromMessage } from './eventbuilder.js';\nimport { WINDOW } from './helpers.js';\nimport { createUserFeedbackEnvelope } from './userfeedback.js';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see @sentry/types Options for more information.\n */\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nclass BrowserClient extends BaseClient {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n constructor(options) {\n const sdkSource = WINDOW.SENTRY_SDK_SOURCE || getSDKSource();\n\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: 'sentry.javascript.browser',\n packages: [\n {\n name: `${sdkSource}:@sentry/browser`,\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n super(options);\n\n if (options.sendClientReports && WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n if (WINDOW.document.visibilityState === 'hidden') {\n this._flushOutcomes();\n }\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n eventFromException(exception, hint) {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n eventFromMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n level = 'info',\n hint,\n ) {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n\n /**\n * Sends user feedback to Sentry.\n */\n captureUserFeedback(feedback) {\n if (!this._isEnabled()) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('SDK not enabled, will not capture user feedback.');\n return;\n }\n\n const envelope = createUserFeedbackEnvelope(feedback, {\n metadata: this.getSdkMetadata(),\n dsn: this.getDsn(),\n tunnel: this.getOptions().tunnel,\n });\n void this._sendEnvelope(envelope);\n }\n\n /**\n * @inheritDoc\n */\n _prepareEvent(event, hint, scope) {\n event.platform = event.platform || 'javascript';\n return super._prepareEvent(event, hint, scope);\n }\n\n /**\n * Sends client reports as an envelope.\n */\n _flushOutcomes() {\n const outcomes = this._clearOutcomes();\n\n if (outcomes.length === 0) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('No outcomes to send');\n return;\n }\n\n // This is really the only place where we want to check for a DSN and only send outcomes then\n if (!this._dsn) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('No dsn provided, will not send outcomes');\n return;\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Sending outcomes:', outcomes);\n\n const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));\n void this._sendEnvelope(envelope);\n }\n}\n\nexport { BrowserClient };\n//# sourceMappingURL=client.js.map\n","import type { Scope } from '@sentry/core';\nimport { BaseClient, SDK_VERSION } from '@sentry/core';\nimport type {\n BrowserClientProfilingOptions,\n BrowserClientReplayOptions,\n ClientOptions,\n Event,\n EventHint,\n Options,\n Severity,\n SeverityLevel,\n UserFeedback,\n} from '@sentry/types';\nimport { createClientReportEnvelope, dsnToString, getSDKSource, logger } from '@sentry/utils';\n\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { WINDOW } from './helpers';\nimport type { BrowserTransportOptions } from './transports/types';\nimport { createUserFeedbackEnvelope } from './userfeedback';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see @sentry/types Options for more information.\n */\nexport type BrowserOptions = Options &\n BrowserClientReplayOptions &\n BrowserClientProfilingOptions;\n\n/**\n * Configuration options for the Sentry Browser SDK Client class\n * @see BrowserClient for more information.\n */\nexport type BrowserClientOptions = ClientOptions &\n BrowserClientReplayOptions &\n BrowserClientProfilingOptions;\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class BrowserClient extends BaseClient {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n public constructor(options: BrowserClientOptions) {\n const sdkSource = WINDOW.SENTRY_SDK_SOURCE || getSDKSource();\n\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: 'sentry.javascript.browser',\n packages: [\n {\n name: `${sdkSource}:@sentry/browser`,\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n super(options);\n\n if (options.sendClientReports && WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n if (WINDOW.document.visibilityState === 'hidden') {\n this._flushOutcomes();\n }\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint?: EventHint): PromiseLike {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(\n message: string,\n // eslint-disable-next-line deprecation/deprecation\n level: Severity | SeverityLevel = 'info',\n hint?: EventHint,\n ): PromiseLike {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n\n /**\n * Sends user feedback to Sentry.\n */\n public captureUserFeedback(feedback: UserFeedback): void {\n if (!this._isEnabled()) {\n __DEBUG_BUILD__ && logger.warn('SDK not enabled, will not capture user feedback.');\n return;\n }\n\n const envelope = createUserFeedbackEnvelope(feedback, {\n metadata: this.getSdkMetadata(),\n dsn: this.getDsn(),\n tunnel: this.getOptions().tunnel,\n });\n void this._sendEnvelope(envelope);\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(event: Event, hint: EventHint, scope?: Scope): PromiseLike {\n event.platform = event.platform || 'javascript';\n return super._prepareEvent(event, hint, scope);\n }\n\n /**\n * Sends client reports as an envelope.\n */\n private _flushOutcomes(): void {\n const outcomes = this._clearOutcomes();\n\n if (outcomes.length === 0) {\n __DEBUG_BUILD__ && logger.log('No outcomes to send');\n return;\n }\n\n // This is really the only place where we want to check for a DSN and only send outcomes then\n if (!this._dsn) {\n __DEBUG_BUILD__ && logger.log('No dsn provided, will not send outcomes');\n return;\n }\n\n __DEBUG_BUILD__ && logger.log('Sending outcomes:', outcomes);\n\n const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));\n void this._sendEnvelope(envelope);\n }\n}\n","import { makeDsn, logger, checkOrSetAlreadyCaught, isPrimitive, resolvedSyncPromise, addItemToEnvelope, createAttachmentEnvelopeItem, SyncPromise, rejectedSyncPromise, SentryError, isThenable, isPlainObject } from '@sentry/utils';\nimport { getEnvelopeEndpointWithUrlEncodedAuth } from './api.js';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope.js';\nimport { setupIntegrations, setupIntegration } from './integration.js';\nimport { updateSession } from './session.js';\nimport { getDynamicSamplingContextFromClient } from './tracing/dynamicSamplingContext.js';\nimport { prepareEvent } from './utils/prepareEvent.js';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(options);\n * }\n *\n * // ...\n * }\n */\nclass BaseClient {\n /** Options passed to the SDK. */\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n\n /** Array of set up integrations. */\n\n /** Indicates whether this client's integrations have been set up. */\n\n /** Number of calls being processed */\n\n /** Holds flushable */\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n\n /**\n * Initializes this client instance.\n *\n * @param options Options for the client.\n */\n constructor(options) {\n this._options = options;\n this._integrations = {};\n this._integrationsInitialized = false;\n this._numProcessing = 0;\n this._outcomes = {};\n this._hooks = {};\n this._eventProcessors = [];\n\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('No DSN provided, client will not send events.');\n }\n\n if (this._dsn) {\n const url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options);\n this._transport = options.transport({\n recordDroppedEvent: this.recordDroppedEvent.bind(this),\n ...options.transportOptions,\n url,\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n captureException(exception, hint, scope) {\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId = hint && hint.event_id;\n\n this._process(\n this.eventFromException(exception, hint)\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n level,\n hint,\n scope,\n ) {\n let eventId = hint && hint.event_id;\n\n const promisedEvent = isPrimitive(message)\n ? this.eventFromMessage(String(message), level, hint)\n : this.eventFromException(message, hint);\n\n this._process(\n promisedEvent\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureEvent(event, hint, scope) {\n // ensure we haven't captured this very object before\n if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId = hint && hint.event_id;\n\n this._process(\n this._captureEvent(event, hint, scope).then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureSession(session) {\n if (!(typeof session.release === 'string')) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Discarded session because of missing or non-string release');\n } else {\n this.sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n updateSession(session, { init: false });\n }\n }\n\n /**\n * @inheritDoc\n */\n getDsn() {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n getOptions() {\n return this._options;\n }\n\n /**\n * @see SdkMetadata in @sentry/types\n *\n * @return The metadata of the SDK\n */\n getSdkMetadata() {\n return this._options._metadata;\n }\n\n /**\n * @inheritDoc\n */\n getTransport() {\n return this._transport;\n }\n\n /**\n * @inheritDoc\n */\n flush(timeout) {\n const transport = this._transport;\n if (transport) {\n return this._isClientDoneProcessing(timeout).then(clientFinished => {\n return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed);\n });\n } else {\n return resolvedSyncPromise(true);\n }\n }\n\n /**\n * @inheritDoc\n */\n close(timeout) {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n return result;\n });\n }\n\n /** Get all installed event processors. */\n getEventProcessors() {\n return this._eventProcessors;\n }\n\n /** @inheritDoc */\n addEventProcessor(eventProcessor) {\n this._eventProcessors.push(eventProcessor);\n }\n\n /**\n * Sets up the integrations\n */\n setupIntegrations(forceInitialize) {\n if ((forceInitialize && !this._integrationsInitialized) || (this._isEnabled() && !this._integrationsInitialized)) {\n this._integrations = setupIntegrations(this, this._options.integrations);\n this._integrationsInitialized = true;\n }\n }\n\n /**\n * Gets an installed integration by its `id`.\n *\n * @returns The installed integration or `undefined` if no integration with that `id` was installed.\n */\n getIntegrationById(integrationId) {\n return this._integrations[integrationId];\n }\n\n /**\n * @inheritDoc\n */\n getIntegration(integration) {\n try {\n return (this._integrations[integration.id] ) || null;\n } catch (_oO) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n addIntegration(integration) {\n setupIntegration(this, integration, this._integrations);\n }\n\n /**\n * @inheritDoc\n */\n sendEvent(event, hint = {}) {\n this.emit('beforeSendEvent', event, hint);\n\n let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n\n for (const attachment of hint.attachments || []) {\n env = addItemToEnvelope(\n env,\n createAttachmentEnvelopeItem(\n attachment,\n this._options.transportOptions && this._options.transportOptions.textEncoder,\n ),\n );\n }\n\n const promise = this._sendEnvelope(env);\n if (promise) {\n promise.then(sendResponse => this.emit('afterSendEvent', event, sendResponse), null);\n }\n }\n\n /**\n * @inheritDoc\n */\n sendSession(session) {\n const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);\n void this._sendEnvelope(env);\n }\n\n /**\n * @inheritDoc\n */\n recordDroppedEvent(reason, category, _event) {\n // Note: we use `event` in replay, where we overwrite this hook.\n\n if (this._options.sendClientReports) {\n // We want to track each category (error, transaction, session, replay_event) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial>>>`\n // With typescript 4.1 we could even use template literal types\n const key = `${reason}:${category}`;\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Adding outcome: \"${key}\"`);\n\n // The following works because undefined + 1 === NaN and NaN is falsy\n this._outcomes[key] = this._outcomes[key] + 1 || 1;\n }\n }\n\n // Keep on() & emit() signatures in sync with types' client.ts interface\n /* eslint-disable @typescript-eslint/unified-signatures */\n\n /** @inheritdoc */\n\n /** @inheritdoc */\n on(hook, callback) {\n if (!this._hooks[hook]) {\n this._hooks[hook] = [];\n }\n\n // @ts-expect-error We assue the types are correct\n this._hooks[hook].push(callback);\n }\n\n /** @inheritdoc */\n\n /** @inheritdoc */\n emit(hook, ...rest) {\n if (this._hooks[hook]) {\n this._hooks[hook].forEach(callback => callback(...rest));\n }\n }\n\n /* eslint-enable @typescript-eslint/unified-signatures */\n\n /** Updates existing session based on the provided event */\n _updateSessionFromEvent(session, event) {\n let crashed = false;\n let errored = false;\n const exceptions = event.exception && event.exception.values;\n\n if (exceptions) {\n errored = true;\n\n for (const ex of exceptions) {\n const mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n const sessionNonTerminal = session.status === 'ok';\n const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n\n if (shouldUpdateAndSend) {\n updateSession(session, {\n ...(crashed && { status: 'crashed' }),\n errors: session.errors || Number(errored || crashed),\n });\n this.captureSession(session);\n }\n }\n\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n _isClientDoneProcessing(timeout) {\n return new SyncPromise(resolve => {\n let ticked = 0;\n const tick = 1;\n\n const interval = setInterval(() => {\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n\n /** Determines whether this SDK is enabled and a transport is present. */\n _isEnabled() {\n return this.getOptions().enabled !== false && this._transport !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n _prepareEvent(event, hint, scope) {\n const options = this.getOptions();\n const integrations = Object.keys(this._integrations);\n if (!hint.integrations && integrations.length > 0) {\n hint.integrations = integrations;\n }\n\n this.emit('preprocessEvent', event, hint);\n\n return prepareEvent(options, event, hint, scope, this).then(evt => {\n if (evt === null) {\n return evt;\n }\n\n // If a trace context is not set on the event, we use the propagationContext set on the event to\n // generate a trace context. If the propagationContext does not have a dynamic sampling context, we\n // also generate one for it.\n const { propagationContext } = evt.sdkProcessingMetadata || {};\n const trace = evt.contexts && evt.contexts.trace;\n if (!trace && propagationContext) {\n const { traceId: trace_id, spanId, parentSpanId, dsc } = propagationContext ;\n evt.contexts = {\n trace: {\n trace_id,\n span_id: spanId,\n parent_span_id: parentSpanId,\n },\n ...evt.contexts,\n };\n\n const dynamicSamplingContext = dsc ? dsc : getDynamicSamplingContextFromClient(trace_id, this, scope);\n\n evt.sdkProcessingMetadata = {\n dynamicSamplingContext,\n ...evt.sdkProcessingMetadata,\n };\n }\n return evt;\n });\n }\n\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n _captureEvent(event, hint = {}, scope) {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n const sentryError = reason ;\n if (sentryError.logLevel === 'log') {\n logger.log(sentryError.message);\n } else {\n logger.warn(sentryError);\n }\n }\n return undefined;\n },\n );\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n _processEvent(event, hint, scope) {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || 'error';\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (isError && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n this.recordDroppedEvent('sample_rate', 'error', event);\n return rejectedSyncPromise(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n const dataCategory = eventType === 'replay_event' ? 'replay' : eventType;\n\n return this._prepareEvent(event, hint, scope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', dataCategory, event);\n throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n\n const result = processBeforeSend(options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', dataCategory, event);\n throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = scope && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }\n\n /**\n * Occupies the client with processing and event\n */\n _process(promise) {\n this._numProcessing++;\n void promise.then(\n value => {\n this._numProcessing--;\n return value;\n },\n reason => {\n this._numProcessing--;\n return reason;\n },\n );\n }\n\n /**\n * @inheritdoc\n */\n _sendEnvelope(envelope) {\n this.emit('beforeEnvelope', envelope);\n\n if (this._isEnabled() && this._transport) {\n return this._transport.send(envelope).then(null, reason => {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Error while sending event:', reason);\n });\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Transport disabled');\n }\n }\n\n /**\n * Clears outcomes on this client and returns them.\n */\n _clearOutcomes() {\n const outcomes = this._outcomes;\n this._outcomes = {};\n return Object.keys(outcomes).map(key => {\n const [reason, category] = key.split(':') ;\n return {\n reason,\n category,\n quantity: outcomes[key],\n };\n });\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n\n}\n\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */\nfunction _validateBeforeSendResult(\n beforeSendResult,\n beforeSendLabel,\n) {\n const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n if (isThenable(beforeSendResult)) {\n return beforeSendResult.then(\n event => {\n if (!isPlainObject(event) && event !== null) {\n throw new SentryError(invalidValueError);\n }\n return event;\n },\n e => {\n throw new SentryError(`${beforeSendLabel} rejected with ${e}`);\n },\n );\n } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n throw new SentryError(invalidValueError);\n }\n return beforeSendResult;\n}\n\n/**\n * Process the matching `beforeSendXXX` callback.\n */\nfunction processBeforeSend(\n options,\n event,\n hint,\n) {\n const { beforeSend, beforeSendTransaction } = options;\n\n if (isErrorEvent(event) && beforeSend) {\n return beforeSend(event, hint);\n }\n\n if (isTransactionEvent(event) && beforeSendTransaction) {\n return beforeSendTransaction(event, hint);\n }\n\n return event;\n}\n\nfunction isErrorEvent(event) {\n return event.type === undefined;\n}\n\nfunction isTransactionEvent(event) {\n return event.type === 'transaction';\n}\n\nexport { BaseClient };\n//# sourceMappingURL=baseclient.js.map\n","/* eslint-disable max-lines */\nimport type {\n Breadcrumb,\n BreadcrumbHint,\n Client,\n ClientOptions,\n DataCategory,\n DsnComponents,\n DynamicSamplingContext,\n Envelope,\n ErrorEvent,\n Event,\n EventDropReason,\n EventHint,\n EventProcessor,\n Integration,\n IntegrationClass,\n Outcome,\n PropagationContext,\n SdkMetadata,\n Session,\n SessionAggregates,\n Severity,\n SeverityLevel,\n Transaction,\n TransactionEvent,\n Transport,\n TransportMakeRequestResponse,\n} from '@sentry/types';\nimport {\n addItemToEnvelope,\n checkOrSetAlreadyCaught,\n createAttachmentEnvelopeItem,\n isPlainObject,\n isPrimitive,\n isThenable,\n logger,\n makeDsn,\n rejectedSyncPromise,\n resolvedSyncPromise,\n SentryError,\n SyncPromise,\n} from '@sentry/utils';\n\nimport { getEnvelopeEndpointWithUrlEncodedAuth } from './api';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope';\nimport type { IntegrationIndex } from './integration';\nimport { setupIntegration, setupIntegrations } from './integration';\nimport type { Scope } from './scope';\nimport { updateSession } from './session';\nimport { getDynamicSamplingContextFromClient } from './tracing/dynamicSamplingContext';\nimport { prepareEvent } from './utils/prepareEvent';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(options);\n * }\n *\n * // ...\n * }\n */\nexport abstract class BaseClient implements Client {\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n protected readonly _dsn?: DsnComponents;\n\n protected readonly _transport?: Transport;\n\n /** Array of set up integrations. */\n protected _integrations: IntegrationIndex;\n\n /** Indicates whether this client's integrations have been set up. */\n protected _integrationsInitialized: boolean;\n\n /** Number of calls being processed */\n protected _numProcessing: number;\n\n /** Holds flushable */\n private _outcomes: { [key: string]: number };\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n private _hooks: Record;\n\n private _eventProcessors: EventProcessor[];\n\n /**\n * Initializes this client instance.\n *\n * @param options Options for the client.\n */\n protected constructor(options: O) {\n this._options = options;\n this._integrations = {};\n this._integrationsInitialized = false;\n this._numProcessing = 0;\n this._outcomes = {};\n this._hooks = {};\n this._eventProcessors = [];\n\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n } else {\n __DEBUG_BUILD__ && logger.warn('No DSN provided, client will not send events.');\n }\n\n if (this._dsn) {\n const url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options);\n this._transport = options.transport({\n recordDroppedEvent: this.recordDroppedEvent.bind(this),\n ...options.transportOptions,\n url,\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n __DEBUG_BUILD__ && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId: string | undefined = hint && hint.event_id;\n\n this._process(\n this.eventFromException(exception, hint)\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(\n message: string,\n // eslint-disable-next-line deprecation/deprecation\n level?: Severity | SeverityLevel,\n hint?: EventHint,\n scope?: Scope,\n ): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n\n const promisedEvent = isPrimitive(message)\n ? this.eventFromMessage(String(message), level, hint)\n : this.eventFromException(message, hint);\n\n this._process(\n promisedEvent\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined {\n // ensure we haven't captured this very object before\n if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n __DEBUG_BUILD__ && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId: string | undefined = hint && hint.event_id;\n\n this._process(\n this._captureEvent(event, hint, scope).then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureSession(session: Session): void {\n if (!(typeof session.release === 'string')) {\n __DEBUG_BUILD__ && logger.warn('Discarded session because of missing or non-string release');\n } else {\n this.sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n updateSession(session, { init: false });\n }\n }\n\n /**\n * @inheritDoc\n */\n public getDsn(): DsnComponents | undefined {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n public getOptions(): O {\n return this._options;\n }\n\n /**\n * @see SdkMetadata in @sentry/types\n *\n * @return The metadata of the SDK\n */\n public getSdkMetadata(): SdkMetadata | undefined {\n return this._options._metadata;\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport | undefined {\n return this._transport;\n }\n\n /**\n * @inheritDoc\n */\n public flush(timeout?: number): PromiseLike {\n const transport = this._transport;\n if (transport) {\n return this._isClientDoneProcessing(timeout).then(clientFinished => {\n return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed);\n });\n } else {\n return resolvedSyncPromise(true);\n }\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n return result;\n });\n }\n\n /** Get all installed event processors. */\n public getEventProcessors(): EventProcessor[] {\n return this._eventProcessors;\n }\n\n /** @inheritDoc */\n public addEventProcessor(eventProcessor: EventProcessor): void {\n this._eventProcessors.push(eventProcessor);\n }\n\n /**\n * Sets up the integrations\n */\n public setupIntegrations(forceInitialize?: boolean): void {\n if ((forceInitialize && !this._integrationsInitialized) || (this._isEnabled() && !this._integrationsInitialized)) {\n this._integrations = setupIntegrations(this, this._options.integrations);\n this._integrationsInitialized = true;\n }\n }\n\n /**\n * Gets an installed integration by its `id`.\n *\n * @returns The installed integration or `undefined` if no integration with that `id` was installed.\n */\n public getIntegrationById(integrationId: string): Integration | undefined {\n return this._integrations[integrationId];\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n try {\n return (this._integrations[integration.id] as T) || null;\n } catch (_oO) {\n __DEBUG_BUILD__ && logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n public addIntegration(integration: Integration): void {\n setupIntegration(this, integration, this._integrations);\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event, hint: EventHint = {}): void {\n this.emit('beforeSendEvent', event, hint);\n\n let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n\n for (const attachment of hint.attachments || []) {\n env = addItemToEnvelope(\n env,\n createAttachmentEnvelopeItem(\n attachment,\n this._options.transportOptions && this._options.transportOptions.textEncoder,\n ),\n );\n }\n\n const promise = this._sendEnvelope(env);\n if (promise) {\n promise.then(sendResponse => this.emit('afterSendEvent', event, sendResponse), null);\n }\n }\n\n /**\n * @inheritDoc\n */\n public sendSession(session: Session | SessionAggregates): void {\n const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);\n void this._sendEnvelope(env);\n }\n\n /**\n * @inheritDoc\n */\n public recordDroppedEvent(reason: EventDropReason, category: DataCategory, _event?: Event): void {\n // Note: we use `event` in replay, where we overwrite this hook.\n\n if (this._options.sendClientReports) {\n // We want to track each category (error, transaction, session, replay_event) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial>>>`\n // With typescript 4.1 we could even use template literal types\n const key = `${reason}:${category}`;\n __DEBUG_BUILD__ && logger.log(`Adding outcome: \"${key}\"`);\n\n // The following works because undefined + 1 === NaN and NaN is falsy\n this._outcomes[key] = this._outcomes[key] + 1 || 1;\n }\n }\n\n // Keep on() & emit() signatures in sync with types' client.ts interface\n /* eslint-disable @typescript-eslint/unified-signatures */\n\n /** @inheritdoc */\n public on(hook: 'startTransaction', callback: (transaction: Transaction) => void): void;\n\n /** @inheritdoc */\n public on(hook: 'finishTransaction', callback: (transaction: Transaction) => void): void;\n\n /** @inheritdoc */\n public on(hook: 'beforeEnvelope', callback: (envelope: Envelope) => void): void;\n\n /** @inheritdoc */\n public on(hook: 'beforeSendEvent', callback: (event: Event, hint?: EventHint) => void): void;\n\n /** @inheritdoc */\n public on(hook: 'preprocessEvent', callback: (event: Event, hint?: EventHint) => void): void;\n\n /** @inheritdoc */\n public on(\n hook: 'afterSendEvent',\n callback: (event: Event, sendResponse: TransportMakeRequestResponse | void) => void,\n ): void;\n\n /** @inheritdoc */\n public on(hook: 'beforeAddBreadcrumb', callback: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => void): void;\n\n /** @inheritdoc */\n public on(hook: 'createDsc', callback: (dsc: DynamicSamplingContext) => void): void;\n\n /** @inheritdoc */\n public on(hook: 'otelSpanEnd', callback: (otelSpan: unknown, mutableOptions: { drop: boolean }) => void): void;\n\n /** @inheritdoc */\n public on(hook: string, callback: unknown): void {\n if (!this._hooks[hook]) {\n this._hooks[hook] = [];\n }\n\n // @ts-expect-error We assue the types are correct\n this._hooks[hook].push(callback);\n }\n\n /** @inheritdoc */\n public emit(hook: 'startTransaction', transaction: Transaction): void;\n\n /** @inheritdoc */\n public emit(hook: 'finishTransaction', transaction: Transaction): void;\n\n /** @inheritdoc */\n public emit(hook: 'beforeEnvelope', envelope: Envelope): void;\n\n /** @inheritdoc */\n public emit(hook: 'beforeSendEvent', event: Event, hint?: EventHint): void;\n\n /** @inheritdoc */\n public emit(hook: 'preprocessEvent', event: Event, hint?: EventHint): void;\n\n /** @inheritdoc */\n public emit(hook: 'afterSendEvent', event: Event, sendResponse: TransportMakeRequestResponse | void): void;\n\n /** @inheritdoc */\n public emit(hook: 'beforeAddBreadcrumb', breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;\n\n /** @inheritdoc */\n public emit(hook: 'createDsc', dsc: DynamicSamplingContext): void;\n\n /** @inheritdoc */\n public emit(hook: 'otelSpanEnd', otelSpan: unknown, mutableOptions: { drop: boolean }): void;\n\n /** @inheritdoc */\n public emit(hook: string, ...rest: unknown[]): void {\n if (this._hooks[hook]) {\n this._hooks[hook].forEach(callback => callback(...rest));\n }\n }\n\n /* eslint-enable @typescript-eslint/unified-signatures */\n\n /** Updates existing session based on the provided event */\n protected _updateSessionFromEvent(session: Session, event: Event): void {\n let crashed = false;\n let errored = false;\n const exceptions = event.exception && event.exception.values;\n\n if (exceptions) {\n errored = true;\n\n for (const ex of exceptions) {\n const mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n const sessionNonTerminal = session.status === 'ok';\n const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n\n if (shouldUpdateAndSend) {\n updateSession(session, {\n ...(crashed && { status: 'crashed' }),\n errors: session.errors || Number(errored || crashed),\n });\n this.captureSession(session);\n }\n }\n\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n protected _isClientDoneProcessing(timeout?: number): PromiseLike {\n return new SyncPromise(resolve => {\n let ticked: number = 0;\n const tick: number = 1;\n\n const interval = setInterval(() => {\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n\n /** Determines whether this SDK is enabled and a transport is present. */\n protected _isEnabled(): boolean {\n return this.getOptions().enabled !== false && this._transport !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n protected _prepareEvent(event: Event, hint: EventHint, scope?: Scope): PromiseLike {\n const options = this.getOptions();\n const integrations = Object.keys(this._integrations);\n if (!hint.integrations && integrations.length > 0) {\n hint.integrations = integrations;\n }\n\n this.emit('preprocessEvent', event, hint);\n\n return prepareEvent(options, event, hint, scope, this).then(evt => {\n if (evt === null) {\n return evt;\n }\n\n // If a trace context is not set on the event, we use the propagationContext set on the event to\n // generate a trace context. If the propagationContext does not have a dynamic sampling context, we\n // also generate one for it.\n const { propagationContext } = evt.sdkProcessingMetadata || {};\n const trace = evt.contexts && evt.contexts.trace;\n if (!trace && propagationContext) {\n const { traceId: trace_id, spanId, parentSpanId, dsc } = propagationContext as PropagationContext;\n evt.contexts = {\n trace: {\n trace_id,\n span_id: spanId,\n parent_span_id: parentSpanId,\n },\n ...evt.contexts,\n };\n\n const dynamicSamplingContext = dsc ? dsc : getDynamicSamplingContextFromClient(trace_id, this, scope);\n\n evt.sdkProcessingMetadata = {\n dynamicSamplingContext,\n ...evt.sdkProcessingMetadata,\n };\n }\n return evt;\n });\n }\n\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n protected _captureEvent(event: Event, hint: EventHint = {}, scope?: Scope): PromiseLike {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if (__DEBUG_BUILD__) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n const sentryError = reason as SentryError;\n if (sentryError.logLevel === 'log') {\n logger.log(sentryError.message);\n } else {\n logger.warn(sentryError);\n }\n }\n return undefined;\n },\n );\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n protected _processEvent(event: Event, hint: EventHint, scope?: Scope): PromiseLike {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || 'error';\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (isError && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n this.recordDroppedEvent('sample_rate', 'error', event);\n return rejectedSyncPromise(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n const dataCategory: DataCategory = eventType === 'replay_event' ? 'replay' : eventType;\n\n return this._prepareEvent(event, hint, scope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', dataCategory, event);\n throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data as { __sentry__: boolean }).__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n\n const result = processBeforeSend(options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', dataCategory, event);\n throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = scope && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }\n\n /**\n * Occupies the client with processing and event\n */\n protected _process(promise: PromiseLike): void {\n this._numProcessing++;\n void promise.then(\n value => {\n this._numProcessing--;\n return value;\n },\n reason => {\n this._numProcessing--;\n return reason;\n },\n );\n }\n\n /**\n * @inheritdoc\n */\n protected _sendEnvelope(envelope: Envelope): PromiseLike | void {\n this.emit('beforeEnvelope', envelope);\n\n if (this._isEnabled() && this._transport) {\n return this._transport.send(envelope).then(null, reason => {\n __DEBUG_BUILD__ && logger.error('Error while sending event:', reason);\n });\n } else {\n __DEBUG_BUILD__ && logger.error('Transport disabled');\n }\n }\n\n /**\n * Clears outcomes on this client and returns them.\n */\n protected _clearOutcomes(): Outcome[] {\n const outcomes = this._outcomes;\n this._outcomes = {};\n return Object.keys(outcomes).map(key => {\n const [reason, category] = key.split(':') as [EventDropReason, DataCategory];\n return {\n reason,\n category,\n quantity: outcomes[key],\n };\n });\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public abstract eventFromException(_exception: any, _hint?: EventHint): PromiseLike;\n\n /**\n * @inheritDoc\n */\n public abstract eventFromMessage(\n _message: string,\n // eslint-disable-next-line deprecation/deprecation\n _level?: Severity | SeverityLevel,\n _hint?: EventHint,\n ): PromiseLike;\n}\n\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */\nfunction _validateBeforeSendResult(\n beforeSendResult: PromiseLike | Event | null,\n beforeSendLabel: string,\n): PromiseLike | Event | null {\n const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n if (isThenable(beforeSendResult)) {\n return beforeSendResult.then(\n event => {\n if (!isPlainObject(event) && event !== null) {\n throw new SentryError(invalidValueError);\n }\n return event;\n },\n e => {\n throw new SentryError(`${beforeSendLabel} rejected with ${e}`);\n },\n );\n } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n throw new SentryError(invalidValueError);\n }\n return beforeSendResult;\n}\n\n/**\n * Process the matching `beforeSendXXX` callback.\n */\nfunction processBeforeSend(\n options: ClientOptions,\n event: Event,\n hint: EventHint,\n): PromiseLike | Event | null {\n const { beforeSend, beforeSendTransaction } = options;\n\n if (isErrorEvent(event) && beforeSend) {\n return beforeSend(event, hint);\n }\n\n if (isTransactionEvent(event) && beforeSendTransaction) {\n return beforeSendTransaction(event, hint);\n }\n\n return event;\n}\n\nfunction isErrorEvent(event: Event): event is ErrorEvent {\n return event.type === undefined;\n}\n\nfunction isTransactionEvent(event: Event): event is TransactionEvent {\n return event.type === 'transaction';\n}\n","import { dsnToString } from './dsn.js';\nimport { normalize } from './normalize.js';\nimport { dropUndefinedKeys } from './object.js';\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction createEnvelope(headers, items = []) {\n return [headers, items] ;\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction addItemToEnvelope(envelope, newItem) {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]] ;\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nfunction forEachEnvelopeItem(\n envelope,\n callback,\n) {\n const envelopeItems = envelope[1];\n\n for (const envelopeItem of envelopeItems) {\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n\n if (result) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nfunction envelopeContainsItemType(envelope, types) {\n return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8.\n */\nfunction encodeUTF8(input, textEncoder) {\n const utf8 = textEncoder || new TextEncoder();\n return utf8.encode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nfunction serializeEnvelope(envelope, textEncoder) {\n const [envHeaders, items] = envelope;\n\n // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n let parts = JSON.stringify(envHeaders);\n\n function append(next) {\n if (typeof parts === 'string') {\n parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts, textEncoder), next];\n } else {\n parts.push(typeof next === 'string' ? encodeUTF8(next, textEncoder) : next);\n }\n }\n\n for (const item of items) {\n const [itemHeaders, payload] = item;\n\n append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n\n if (typeof payload === 'string' || payload instanceof Uint8Array) {\n append(payload);\n } else {\n let stringifiedPayload;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch (e) {\n // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.strinify()` still\n // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n // performance impact but in this case a performance hit is better than throwing.\n stringifiedPayload = JSON.stringify(normalize(payload));\n }\n append(stringifiedPayload);\n }\n }\n\n return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\n\nfunction concatBuffers(buffers) {\n const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers) {\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n\n return merged;\n}\n\n/**\n * Parses an envelope\n */\nfunction parseEnvelope(\n env,\n textEncoder,\n textDecoder,\n) {\n let buffer = typeof env === 'string' ? textEncoder.encode(env) : env;\n\n function readBinary(length) {\n const bin = buffer.subarray(0, length);\n // Replace the buffer with the remaining data excluding trailing newline\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n\n function readJson() {\n let i = buffer.indexOf(0xa);\n // If we couldn't find a newline, we must have found the end of the buffer\n if (i < 0) {\n i = buffer.length;\n }\n\n return JSON.parse(textDecoder.decode(readBinary(i))) ;\n }\n\n const envelopeHeader = readJson();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const items = [];\n\n while (buffer.length) {\n const itemHeader = readJson();\n const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n\n items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n }\n\n return [envelopeHeader, items];\n}\n\n/**\n * Creates attachment envelope items\n */\nfunction createAttachmentEnvelopeItem(\n attachment,\n textEncoder,\n) {\n const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data, textEncoder) : attachment.data;\n\n return [\n dropUndefinedKeys({\n type: 'attachment',\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType,\n }),\n buffer,\n ];\n}\n\nconst ITEM_TYPE_TO_DATA_CATEGORY_MAP = {\n session: 'session',\n sessions: 'session',\n attachment: 'attachment',\n transaction: 'transaction',\n event: 'error',\n client_report: 'internal',\n user_report: 'default',\n profile: 'profile',\n replay_event: 'replay',\n replay_recording: 'replay',\n check_in: 'monitor',\n feedback: 'feedback',\n // TODO: This is a temporary workaround until we have a proper data category for metrics\n statsd: 'unknown',\n};\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nfunction envelopeItemTypeToDataCategory(type) {\n return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];\n}\n\n/** Extracts the minimal SDK info from from the metadata or an events */\nfunction getSdkMetadataForEnvelopeHeader(metadataOrEvent) {\n if (!metadataOrEvent || !metadataOrEvent.sdk) {\n return;\n }\n const { name, version } = metadataOrEvent.sdk;\n return { name, version };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nfunction createEventEnvelopeHeaders(\n event,\n sdkInfo,\n tunnel,\n dsn,\n) {\n const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext;\n return {\n event_id: event.event_id ,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n ...(dynamicSamplingContext && {\n trace: dropUndefinedKeys({ ...dynamicSamplingContext }),\n }),\n };\n}\n\nexport { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import type {\n DsnComponents,\n Event,\n EventEnvelope,\n EventItem,\n SdkInfo,\n SdkMetadata,\n Session,\n SessionAggregates,\n SessionEnvelope,\n SessionItem,\n} from '@sentry/types';\nimport {\n createEnvelope,\n createEventEnvelopeHeaders,\n dsnToString,\n getSdkMetadataForEnvelopeHeader,\n} from '@sentry/utils';\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event: Event, sdkInfo?: SdkInfo): Event {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];\n event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];\n return event;\n}\n\n/** Creates an envelope from a Session */\nexport function createSessionEnvelope(\n session: Session | SessionAggregates,\n dsn?: DsnComponents,\n metadata?: SdkMetadata,\n tunnel?: string,\n): SessionEnvelope {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n const envelopeHeaders = {\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const envelopeItem: SessionItem =\n 'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session.toJSON()];\n\n return createEnvelope(envelopeHeaders, [envelopeItem]);\n}\n\n/**\n * Create an Envelope from an event.\n */\nexport function createEventEnvelope(\n event: Event,\n dsn?: DsnComponents,\n metadata?: SdkMetadata,\n tunnel?: string,\n): EventEnvelope {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n\n /*\n Note: Due to TS, event.type may be `replay_event`, theoretically.\n In practice, we never call `createEventEnvelope` with `replay_event` type,\n and we'd have to adjut a looot of types to make this work properly.\n We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)\n So the safe choice is to really guard against the replay_event type here.\n */\n const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';\n\n enhanceEventWithSdkInfo(event, metadata && metadata.sdk);\n\n const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete event.sdkProcessingMetadata;\n\n const eventItem: EventItem = [{ type: eventType }, event];\n return createEnvelope(envelopeHeaders, [eventItem]);\n}\n","/** An error emitted by Sentry SDKs and related utilities. */\nclass SentryError extends Error {\n /** Display name of this error instance. */\n\n constructor( message, logLevel = 'warn') {\n super(message);this.message = message;\n this.name = new.target.prototype.constructor.name;\n // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line\n // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes\n // instances of `SentryError` fail `obj instanceof SentryError` checks.\n Object.setPrototypeOf(this, new.target.prototype);\n this.logLevel = logLevel;\n }\n}\n\nexport { SentryError };\n//# sourceMappingURL=error.js.map\n","import type { ConsoleLevel } from './logger';\n\n/** An error emitted by Sentry SDKs and related utilities. */\nexport class SentryError extends Error {\n /** Display name of this error instance. */\n public name: string;\n\n public logLevel: ConsoleLevel;\n\n public constructor(public message: string, logLevel: ConsoleLevel = 'warn') {\n super(message);\n\n this.name = new.target.prototype.constructor.name;\n // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line\n // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes\n // instances of `SentryError` fail `obj instanceof SentryError` checks.\n Object.setPrototypeOf(this, new.target.prototype);\n this.logLevel = logLevel;\n }\n}\n","import { getSdkMetadataForEnvelopeHeader, createEventEnvelopeHeaders, createEnvelope, dsnToString } from '@sentry/utils';\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event, sdkInfo) {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];\n event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];\n return event;\n}\n\n/** Creates an envelope from a Session */\nfunction createSessionEnvelope(\n session,\n dsn,\n metadata,\n tunnel,\n) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n const envelopeHeaders = {\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const envelopeItem =\n 'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session.toJSON()];\n\n return createEnvelope(envelopeHeaders, [envelopeItem]);\n}\n\n/**\n * Create an Envelope from an event.\n */\nfunction createEventEnvelope(\n event,\n dsn,\n metadata,\n tunnel,\n) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n\n /*\n Note: Due to TS, event.type may be `replay_event`, theoretically.\n In practice, we never call `createEventEnvelope` with `replay_event` type,\n and we'd have to adjut a looot of types to make this work properly.\n We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)\n So the safe choice is to really guard against the replay_event type here.\n */\n const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';\n\n enhanceEventWithSdkInfo(event, metadata && metadata.sdk);\n\n const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete event.sdkProcessingMetadata;\n\n const eventItem = [{ type: eventType }, event];\n return createEnvelope(envelopeHeaders, [eventItem]);\n}\n\nexport { createEventEnvelope, createSessionEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { dropUndefinedKeys } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from '../constants.js';\n\n/**\n * Creates a dynamic sampling context from a client.\n *\n * Dispatchs the `createDsc` lifecycle hook as a side effect.\n */\nfunction getDynamicSamplingContextFromClient(\n trace_id,\n client,\n scope,\n) {\n const options = client.getOptions();\n\n const { publicKey: public_key } = client.getDsn() || {};\n const { segment: user_segment } = (scope && scope.getUser()) || {};\n\n const dsc = dropUndefinedKeys({\n environment: options.environment || DEFAULT_ENVIRONMENT,\n release: options.release,\n user_segment,\n public_key,\n trace_id,\n }) ;\n\n client.emit && client.emit('createDsc', dsc);\n\n return dsc;\n}\n\nexport { getDynamicSamplingContextFromClient };\n//# sourceMappingURL=dynamicSamplingContext.js.map\n","import type { Client, DynamicSamplingContext, Scope } from '@sentry/types';\nimport { dropUndefinedKeys } from '@sentry/utils';\n\nimport { DEFAULT_ENVIRONMENT } from '../constants';\n\n/**\n * Creates a dynamic sampling context from a client.\n *\n * Dispatchs the `createDsc` lifecycle hook as a side effect.\n */\nexport function getDynamicSamplingContextFromClient(\n trace_id: string,\n client: Client,\n scope?: Scope,\n): DynamicSamplingContext {\n const options = client.getOptions();\n\n const { publicKey: public_key } = client.getDsn() || {};\n const { segment: user_segment } = (scope && scope.getUser()) || {};\n\n const dsc = dropUndefinedKeys({\n environment: options.environment || DEFAULT_ENVIRONMENT,\n release: options.release,\n user_segment,\n public_key,\n trace_id,\n }) as DynamicSamplingContext;\n\n client.emit && client.emit('createDsc', dsc);\n\n return dsc;\n}\n","import { uuid4, dateTimestampInSeconds, resolvedSyncPromise, truncate, GLOBAL_OBJ, normalize } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { notifyEventProcessors, getGlobalEventProcessors } from '../eventProcessors.js';\nimport { Scope } from '../scope.js';\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * Note: This also triggers callbacks for `addGlobalEventProcessor`, but not `beforeSend`.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nfunction prepareEvent(\n options,\n event,\n hint,\n scope,\n client,\n) {\n const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = options;\n const prepared = {\n ...event,\n event_id: event.event_id || hint.event_id || uuid4(),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations);\n\n // Only put debug IDs onto frames for error events.\n if (event.type === undefined) {\n applyDebugIds(prepared, options.stackParser);\n }\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n let finalScope = scope;\n if (hint.captureContext) {\n finalScope = Scope.clone(finalScope).update(hint.captureContext);\n }\n\n // We prepare the result here with a resolved Event.\n let result = resolvedSyncPromise(prepared);\n\n const clientEventProcessors = client && client.getEventProcessors ? client.getEventProcessors() : [];\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n //\n // We need to check for the existence of `finalScope.getAttachments`\n // because `getAttachments` can be undefined if users are using an older version\n // of `@sentry/core` that does not have the `getAttachments` method.\n // See: https://github.com/getsentry/sentry-javascript/issues/5229\n if (finalScope) {\n // Collect attachments from the hint and scope\n if (finalScope.getAttachments) {\n const attachments = [...(hint.attachments || []), ...finalScope.getAttachments()];\n\n if (attachments.length) {\n hint.attachments = attachments;\n }\n }\n\n // In case we have a hub we reassign it.\n result = finalScope.applyToEvent(prepared, hint, clientEventProcessors);\n } else {\n // Apply client & global event processors even if there is no scope\n // TODO (v8): Update the order to be Global > Client\n result = notifyEventProcessors([...clientEventProcessors, ...getGlobalEventProcessors()], prepared, hint);\n }\n\n return result.then(evt => {\n if (evt) {\n // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n // any new data\n applyDebugMeta(evt);\n }\n\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\nfunction applyClientOptions(event, options) {\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : DEFAULT_ENVIRONMENT;\n }\n\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n}\n\nconst debugIdStackParserCache = new WeakMap();\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nfunction applyDebugIds(event, stackParser) {\n const debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n\n if (!debugIdMap) {\n return;\n }\n\n let debugIdStackFramesCache;\n const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser);\n if (cachedDebugIdStackFrameCache) {\n debugIdStackFramesCache = cachedDebugIdStackFrameCache;\n } else {\n debugIdStackFramesCache = new Map();\n debugIdStackParserCache.set(stackParser, debugIdStackFramesCache);\n }\n\n // Build a map of filename -> debug_id\n const filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => {\n let parsedStack;\n const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);\n if (cachedParsedStack) {\n parsedStack = cachedParsedStack;\n } else {\n parsedStack = stackParser(debugIdStackTrace);\n debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);\n }\n\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n if (stackFrame.filename) {\n acc[stackFrame.filename] = debugIdMap[debugIdStackTrace];\n break;\n }\n }\n return acc;\n }, {});\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.filename) {\n frame.debug_id = filenameDebugIdMap[frame.filename];\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nfunction applyDebugMeta(event) {\n // Extract debug IDs and filenames from the stack frames on the event.\n const filenameDebugIdMap = {};\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.debug_id) {\n if (frame.abs_path) {\n filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n } else if (frame.filename) {\n filenameDebugIdMap[frame.filename] = frame.debug_id;\n }\n delete frame.debug_id;\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n\n if (Object.keys(filenameDebugIdMap).length === 0) {\n return;\n }\n\n // Fill debug_meta information\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n const images = event.debug_meta.images;\n Object.keys(filenameDebugIdMap).forEach(filename => {\n images.push({\n type: 'sourcemap',\n code_file: filename,\n debug_id: filenameDebugIdMap[filename],\n });\n });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event, integrationNames) {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event, depth, maxBreadth) {\n if (!event) {\n return null;\n }\n\n const normalized = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth, maxBreadth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth, maxBreadth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth, maxBreadth),\n }),\n };\n\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace;\n\n // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n if (event.contexts.trace.data) {\n normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n }\n }\n\n // event.spans[].data may contain circular/dangerous data so we need to normalize it\n if (event.spans) {\n normalized.spans = event.spans.map(span => {\n // We cannot use the spread operator here because `toJSON` on `span` is non-enumerable\n if (span.data) {\n span.data = normalize(span.data, depth, maxBreadth);\n }\n return span;\n });\n }\n\n return normalized;\n}\n\nexport { applyDebugIds, applyDebugMeta, prepareEvent };\n//# sourceMappingURL=prepareEvent.js.map\n","import type { Client, ClientOptions, Event, EventHint, StackFrame, StackParser } from '@sentry/types';\nimport { dateTimestampInSeconds, GLOBAL_OBJ, normalize, resolvedSyncPromise, truncate, uuid4 } from '@sentry/utils';\n\nimport { DEFAULT_ENVIRONMENT } from '../constants';\nimport { getGlobalEventProcessors, notifyEventProcessors } from '../eventProcessors';\nimport { Scope } from '../scope';\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * Note: This also triggers callbacks for `addGlobalEventProcessor`, but not `beforeSend`.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nexport function prepareEvent(\n options: ClientOptions,\n event: Event,\n hint: EventHint,\n scope?: Scope,\n client?: Client,\n): PromiseLike {\n const { normalizeDepth = 3, normalizeMaxBreadth = 1_000 } = options;\n const prepared: Event = {\n ...event,\n event_id: event.event_id || hint.event_id || uuid4(),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations);\n\n // Only put debug IDs onto frames for error events.\n if (event.type === undefined) {\n applyDebugIds(prepared, options.stackParser);\n }\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n let finalScope = scope;\n if (hint.captureContext) {\n finalScope = Scope.clone(finalScope).update(hint.captureContext);\n }\n\n // We prepare the result here with a resolved Event.\n let result = resolvedSyncPromise(prepared);\n\n const clientEventProcessors = client && client.getEventProcessors ? client.getEventProcessors() : [];\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n //\n // We need to check for the existence of `finalScope.getAttachments`\n // because `getAttachments` can be undefined if users are using an older version\n // of `@sentry/core` that does not have the `getAttachments` method.\n // See: https://github.com/getsentry/sentry-javascript/issues/5229\n if (finalScope) {\n // Collect attachments from the hint and scope\n if (finalScope.getAttachments) {\n const attachments = [...(hint.attachments || []), ...finalScope.getAttachments()];\n\n if (attachments.length) {\n hint.attachments = attachments;\n }\n }\n\n // In case we have a hub we reassign it.\n result = finalScope.applyToEvent(prepared, hint, clientEventProcessors);\n } else {\n // Apply client & global event processors even if there is no scope\n // TODO (v8): Update the order to be Global > Client\n result = notifyEventProcessors([...clientEventProcessors, ...getGlobalEventProcessors()], prepared, hint);\n }\n\n return result.then(evt => {\n if (evt) {\n // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n // any new data\n applyDebugMeta(evt);\n }\n\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\nfunction applyClientOptions(event: Event, options: ClientOptions): void {\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : DEFAULT_ENVIRONMENT;\n }\n\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n}\n\nconst debugIdStackParserCache = new WeakMap>();\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nexport function applyDebugIds(event: Event, stackParser: StackParser): void {\n const debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n\n if (!debugIdMap) {\n return;\n }\n\n let debugIdStackFramesCache: Map;\n const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser);\n if (cachedDebugIdStackFrameCache) {\n debugIdStackFramesCache = cachedDebugIdStackFrameCache;\n } else {\n debugIdStackFramesCache = new Map();\n debugIdStackParserCache.set(stackParser, debugIdStackFramesCache);\n }\n\n // Build a map of filename -> debug_id\n const filenameDebugIdMap = Object.keys(debugIdMap).reduce>((acc, debugIdStackTrace) => {\n let parsedStack: StackFrame[];\n const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);\n if (cachedParsedStack) {\n parsedStack = cachedParsedStack;\n } else {\n parsedStack = stackParser(debugIdStackTrace);\n debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);\n }\n\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n if (stackFrame.filename) {\n acc[stackFrame.filename] = debugIdMap[debugIdStackTrace];\n break;\n }\n }\n return acc;\n }, {});\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event!.exception!.values!.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace!.frames!.forEach(frame => {\n if (frame.filename) {\n frame.debug_id = filenameDebugIdMap[frame.filename];\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nexport function applyDebugMeta(event: Event): void {\n // Extract debug IDs and filenames from the stack frames on the event.\n const filenameDebugIdMap: Record = {};\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception!.values!.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace!.frames!.forEach(frame => {\n if (frame.debug_id) {\n if (frame.abs_path) {\n filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n } else if (frame.filename) {\n filenameDebugIdMap[frame.filename] = frame.debug_id;\n }\n delete frame.debug_id;\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n\n if (Object.keys(filenameDebugIdMap).length === 0) {\n return;\n }\n\n // Fill debug_meta information\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n const images = event.debug_meta.images;\n Object.keys(filenameDebugIdMap).forEach(filename => {\n images.push({\n type: 'sourcemap',\n code_file: filename,\n debug_id: filenameDebugIdMap[filename],\n });\n });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event: Event, integrationNames: string[]): void {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event: Event | null, depth: number, maxBreadth: number): Event | null {\n if (!event) {\n return null;\n }\n\n const normalized: Event = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth, maxBreadth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth, maxBreadth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth, maxBreadth),\n }),\n };\n\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace;\n\n // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n if (event.contexts.trace.data) {\n normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n }\n }\n\n // event.spans[].data may contain circular/dangerous data so we need to normalize it\n if (event.spans) {\n normalized.spans = event.spans.map(span => {\n // We cannot use the spread operator here because `toJSON` on `span` is non-enumerable\n if (span.data) {\n span.data = normalize(span.data, depth, maxBreadth);\n }\n return span;\n });\n }\n\n return normalized;\n}\n","const SDK_VERSION = '7.80.0';\n\nexport { SDK_VERSION };\n//# sourceMappingURL=version.js.map\n","export const SDK_VERSION = '7.80.0';\n","import { createEnvelope } from './envelope.js';\nimport { dateTimestampInSeconds } from './time.js';\n\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */\nfunction createClientReportEnvelope(\n discarded_events,\n dsn,\n timestamp,\n) {\n const clientReportItem = [\n { type: 'client_report' },\n {\n timestamp: timestamp || dateTimestampInSeconds(),\n discarded_events,\n },\n ];\n return createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);\n}\n\nexport { createClientReportEnvelope };\n//# sourceMappingURL=clientreport.js.map\n","import type { ClientReport, ClientReportEnvelope, ClientReportItem } from '@sentry/types';\n\nimport { createEnvelope } from './envelope';\nimport { dateTimestampInSeconds } from './time';\n\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */\nexport function createClientReportEnvelope(\n discarded_events: ClientReport['discarded_events'],\n dsn?: string,\n timestamp?: number,\n): ClientReportEnvelope {\n const clientReportItem: ClientReportItem = [\n { type: 'client_report' },\n {\n timestamp: timestamp || dateTimestampInSeconds(),\n discarded_events,\n },\n ];\n return createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);\n}\n","import { getCurrentHub } from '@sentry/core';\nimport { addExceptionMechanism, resolvedSyncPromise, isErrorEvent, isDOMError, isDOMException, addExceptionTypeValue, isError, isPlainObject, isEvent, normalizeToSize, extractExceptionKeysForMessage } from '@sentry/utils';\n\n/**\n * This function creates an exception from a JavaScript Error\n */\nfunction exceptionFromError(stackParser, ex) {\n // Get the frames first since Opera can lose the stack if we touch anything else first\n const frames = parseStackFrames(stackParser, ex);\n\n const exception = {\n type: ex && ex.name,\n value: extractMessage(ex),\n };\n\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\n/**\n * @hidden\n */\nfunction eventFromPlainObject(\n stackParser,\n exception,\n syntheticException,\n isUnhandledRejection,\n) {\n const hub = getCurrentHub();\n const client = hub.getClient();\n const normalizeDepth = client && client.getOptions().normalizeDepth;\n\n const event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }),\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception, normalizeDepth),\n },\n };\n\n if (syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n // event.exception.values[0] has been set above\n (event.exception ).values[0].stacktrace = { frames };\n }\n }\n\n return event;\n}\n\n/**\n * @hidden\n */\nfunction eventFromError(stackParser, ex) {\n return {\n exception: {\n values: [exceptionFromError(stackParser, ex)],\n },\n };\n}\n\n/** Parses stack frames from an error */\nfunction parseStackFrames(\n stackParser,\n ex,\n) {\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace || ex.stack || '';\n\n const popSize = getPopSize(ex);\n\n try {\n return stackParser(stacktrace, popSize);\n } catch (e) {\n // no-empty\n }\n\n return [];\n}\n\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\nfunction getPopSize(ex) {\n if (ex) {\n if (typeof ex.framesToPop === 'number') {\n return ex.framesToPop;\n }\n\n if (reactMinifiedRegexp.test(ex.message)) {\n return 1;\n }\n }\n\n return 0;\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex) {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nfunction eventFromException(\n stackParser,\n exception,\n hint,\n attachStacktrace,\n) {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = 'error';\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nfunction eventFromMessage(\n stackParser,\n message,\n // eslint-disable-next-line deprecation/deprecation\n level = 'info',\n hint,\n attachStacktrace,\n) {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * @hidden\n */\nfunction eventFromUnknownInput(\n stackParser,\n exception,\n syntheticException,\n attachStacktrace,\n isUnhandledRejection,\n) {\n let event;\n\n if (isErrorEvent(exception ) && (exception ).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception ;\n return eventFromError(stackParser, errorEvent.error );\n }\n\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if (isDOMError(exception) || isDOMException(exception )) {\n const domException = exception ;\n\n if ('stack' in (exception )) {\n event = eventFromError(stackParser, exception );\n } else {\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n // eslint-disable-next-line deprecation/deprecation\n event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };\n }\n\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n return eventFromError(stackParser, exception);\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n // group on any key/value change.\n const objectException = exception ;\n event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(stackParser, exception , syntheticException, attachStacktrace);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\n/**\n * @hidden\n */\nfunction eventFromString(\n stackParser,\n input,\n syntheticException,\n attachStacktrace,\n) {\n const event = {\n message: input,\n };\n\n if (attachStacktrace && syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n event.exception = {\n values: [{ value: input, stacktrace: { frames } }],\n };\n }\n }\n\n return event;\n}\n\nfunction getNonErrorObjectExceptionValue(\n exception,\n { isUnhandledRejection },\n) {\n const keys = extractExceptionKeysForMessage(exception);\n const captureType = isUnhandledRejection ? 'promise rejection' : 'exception';\n\n // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before\n // We still want to try to get a decent message for these cases\n if (isErrorEvent(exception)) {\n return `Event \\`ErrorEvent\\` captured as ${captureType} with message \\`${exception.message}\\``;\n }\n\n if (isEvent(exception)) {\n const className = getObjectClassName(exception);\n return `Event \\`${className}\\` (type=${exception.type}) captured as ${captureType}`;\n }\n\n return `Object captured as ${captureType} with keys: ${keys}`;\n}\n\nfunction getObjectClassName(obj) {\n try {\n const prototype = Object.getPrototypeOf(obj);\n return prototype ? prototype.constructor.name : undefined;\n } catch (e) {\n // ignore errors here\n }\n}\n\nexport { eventFromError, eventFromException, eventFromMessage, eventFromPlainObject, eventFromString, eventFromUnknownInput, exceptionFromError, parseStackFrames };\n//# sourceMappingURL=eventbuilder.js.map\n","import { getCurrentHub } from '@sentry/core';\nimport type { Event, EventHint, Exception, Severity, SeverityLevel, StackFrame, StackParser } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n extractExceptionKeysForMessage,\n isDOMError,\n isDOMException,\n isError,\n isErrorEvent,\n isEvent,\n isPlainObject,\n normalizeToSize,\n resolvedSyncPromise,\n} from '@sentry/utils';\n\ntype Prototype = { constructor: (...args: unknown[]) => unknown };\n\n/**\n * This function creates an exception from a JavaScript Error\n */\nexport function exceptionFromError(stackParser: StackParser, ex: Error): Exception {\n // Get the frames first since Opera can lose the stack if we touch anything else first\n const frames = parseStackFrames(stackParser, ex);\n\n const exception: Exception = {\n type: ex && ex.name,\n value: extractMessage(ex),\n };\n\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\n/**\n * @hidden\n */\nexport function eventFromPlainObject(\n stackParser: StackParser,\n exception: Record,\n syntheticException?: Error,\n isUnhandledRejection?: boolean,\n): Event {\n const hub = getCurrentHub();\n const client = hub.getClient();\n const normalizeDepth = client && client.getOptions().normalizeDepth;\n\n const event: Event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }),\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception, normalizeDepth),\n },\n };\n\n if (syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n // event.exception.values[0] has been set above\n (event.exception as { values: Exception[] }).values[0].stacktrace = { frames };\n }\n }\n\n return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromError(stackParser: StackParser, ex: Error): Event {\n return {\n exception: {\n values: [exceptionFromError(stackParser, ex)],\n },\n };\n}\n\n/** Parses stack frames from an error */\nexport function parseStackFrames(\n stackParser: StackParser,\n ex: Error & { framesToPop?: number; stacktrace?: string },\n): StackFrame[] {\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace || ex.stack || '';\n\n const popSize = getPopSize(ex);\n\n try {\n return stackParser(stacktrace, popSize);\n } catch (e) {\n // no-empty\n }\n\n return [];\n}\n\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\nfunction getPopSize(ex: Error & { framesToPop?: number }): number {\n if (ex) {\n if (typeof ex.framesToPop === 'number') {\n return ex.framesToPop;\n }\n\n if (reactMinifiedRegexp.test(ex.message)) {\n return 1;\n }\n }\n\n return 0;\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex: Error & { message: { error?: Error } }): string {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nexport function eventFromException(\n stackParser: StackParser,\n exception: unknown,\n hint?: EventHint,\n attachStacktrace?: boolean,\n): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = 'error';\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(\n stackParser: StackParser,\n message: string,\n // eslint-disable-next-line deprecation/deprecation\n level: Severity | SeverityLevel = 'info',\n hint?: EventHint,\n attachStacktrace?: boolean,\n): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * @hidden\n */\nexport function eventFromUnknownInput(\n stackParser: StackParser,\n exception: unknown,\n syntheticException?: Error,\n attachStacktrace?: boolean,\n isUnhandledRejection?: boolean,\n): Event {\n let event: Event;\n\n if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception as ErrorEvent;\n return eventFromError(stackParser, errorEvent.error as Error);\n }\n\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if (isDOMError(exception) || isDOMException(exception as DOMException)) {\n const domException = exception as DOMException;\n\n if ('stack' in (exception as Error)) {\n event = eventFromError(stackParser, exception as Error);\n } else {\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n // eslint-disable-next-line deprecation/deprecation\n event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };\n }\n\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n return eventFromError(stackParser, exception);\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n // group on any key/value change.\n const objectException = exception as Record;\n event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(stackParser, exception as string, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromString(\n stackParser: StackParser,\n input: string,\n syntheticException?: Error,\n attachStacktrace?: boolean,\n): Event {\n const event: Event = {\n message: input,\n };\n\n if (attachStacktrace && syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n event.exception = {\n values: [{ value: input, stacktrace: { frames } }],\n };\n }\n }\n\n return event;\n}\n\nfunction getNonErrorObjectExceptionValue(\n exception: Record,\n { isUnhandledRejection }: { isUnhandledRejection?: boolean },\n): string {\n const keys = extractExceptionKeysForMessage(exception);\n const captureType = isUnhandledRejection ? 'promise rejection' : 'exception';\n\n // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before\n // We still want to try to get a decent message for these cases\n if (isErrorEvent(exception)) {\n return `Event \\`ErrorEvent\\` captured as ${captureType} with message \\`${exception.message}\\``;\n }\n\n if (isEvent(exception)) {\n const className = getObjectClassName(exception);\n return `Event \\`${className}\\` (type=${exception.type}) captured as ${captureType}`;\n }\n\n return `Object captured as ${captureType} with keys: ${keys}`;\n}\n\nfunction getObjectClassName(obj: unknown): string | undefined | void {\n try {\n const prototype: Prototype | null = Object.getPrototypeOf(obj);\n return prototype ? prototype.constructor.name : undefined;\n } catch (e) {\n // ignore errors here\n }\n}\n","import { withScope, captureException } from '@sentry/core';\nimport { GLOBAL_OBJ, getOriginalFunction, markFunctionWrapped, addNonEnumerableProperty, addExceptionTypeValue, addExceptionMechanism } from '@sentry/utils';\n\nconst WINDOW = GLOBAL_OBJ ;\n\nlet ignoreOnError = 0;\n\n/**\n * @hidden\n */\nfunction shouldIgnoreOnError() {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nfunction ignoreNextOnError() {\n // onerror should trigger before setTimeout\n ignoreOnError++;\n setTimeout(() => {\n ignoreOnError--;\n });\n}\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap. It is generally safe to pass an unbound function, because the returned wrapper always\n * has a correct `this` context.\n * @returns The wrapped function.\n * @hidden\n */\nfunction wrap(\n fn,\n options\n\n = {},\n before,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n) {\n // for future readers what this does is wrap a function and then create\n // a bi-directional wrapping between them.\n //\n // example: wrapped = wrap(original);\n // original.__sentry_wrapped__ -> wrapped\n // wrapped.__sentry_original__ -> original\n\n if (typeof fn !== 'function') {\n return fn;\n }\n\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n const wrapper = fn.__sentry_wrapped__;\n if (wrapper) {\n return wrapper;\n }\n\n // We don't wanna wrap it twice\n if (getOriginalFunction(fn)) {\n return fn;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n /* eslint-disable prefer-rest-params */\n // It is important that `sentryWrapped` is not an arrow function to preserve the context of `this`\n const sentryWrapped = function () {\n const args = Array.prototype.slice.call(arguments);\n\n try {\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n const wrappedArguments = args.map((arg) => wrap(arg, options));\n\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n } catch (ex) {\n ignoreNextOnError();\n\n withScope((scope) => {\n scope.addEventProcessor((event) => {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n\n event.extra = {\n ...event.extra,\n arguments: args,\n };\n\n return event;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n };\n /* eslint-enable prefer-rest-params */\n\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n markFunctionWrapped(sentryWrapped, fn);\n\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n\n // Restore original function name (not all browsers allow that)\n try {\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') ;\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get() {\n return fn.name;\n },\n });\n }\n // eslint-disable-next-line no-empty\n } catch (_oO) {}\n\n return sentryWrapped;\n}\n\n/**\n * All properties the report dialog supports\n */\n\nexport { WINDOW, ignoreNextOnError, shouldIgnoreOnError, wrap };\n//# sourceMappingURL=helpers.js.map\n","import { captureException, withScope } from '@sentry/core';\nimport type { DsnLike, Event as SentryEvent, Mechanism, Scope, WrappedFunction } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n addNonEnumerableProperty,\n getOriginalFunction,\n GLOBAL_OBJ,\n markFunctionWrapped,\n} from '@sentry/utils';\n\nexport const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;\n\nlet ignoreOnError: number = 0;\n\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError(): boolean {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nexport function ignoreNextOnError(): void {\n // onerror should trigger before setTimeout\n ignoreOnError++;\n setTimeout(() => {\n ignoreOnError--;\n });\n}\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap. It is generally safe to pass an unbound function, because the returned wrapper always\n * has a correct `this` context.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(\n fn: WrappedFunction,\n options: {\n mechanism?: Mechanism;\n } = {},\n before?: WrappedFunction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): any {\n // for future readers what this does is wrap a function and then create\n // a bi-directional wrapping between them.\n //\n // example: wrapped = wrap(original);\n // original.__sentry_wrapped__ -> wrapped\n // wrapped.__sentry_original__ -> original\n\n if (typeof fn !== 'function') {\n return fn;\n }\n\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n const wrapper = fn.__sentry_wrapped__;\n if (wrapper) {\n return wrapper;\n }\n\n // We don't wanna wrap it twice\n if (getOriginalFunction(fn)) {\n return fn;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n /* eslint-disable prefer-rest-params */\n // It is important that `sentryWrapped` is not an arrow function to preserve the context of `this`\n const sentryWrapped: WrappedFunction = function (this: unknown): void {\n const args = Array.prototype.slice.call(arguments);\n\n try {\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n const wrappedArguments = args.map((arg: any) => wrap(arg, options));\n\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n } catch (ex) {\n ignoreNextOnError();\n\n withScope((scope: Scope) => {\n scope.addEventProcessor((event: SentryEvent) => {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n\n event.extra = {\n ...event.extra,\n arguments: args,\n };\n\n return event;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n };\n /* eslint-enable prefer-rest-params */\n\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n markFunctionWrapped(sentryWrapped, fn);\n\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n\n // Restore original function name (not all browsers allow that)\n try {\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') as PropertyDescriptor;\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get(): string {\n return fn.name;\n },\n });\n }\n // eslint-disable-next-line no-empty\n } catch (_oO) {}\n\n return sentryWrapped;\n}\n\n/**\n * All properties the report dialog supports\n */\nexport interface ReportDialogOptions {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n eventId?: string;\n dsn?: DsnLike;\n user?: {\n email?: string;\n name?: string;\n };\n lang?: string;\n title?: string;\n subtitle?: string;\n subtitle2?: string;\n labelName?: string;\n labelEmail?: string;\n labelComments?: string;\n labelClose?: string;\n labelSubmit?: string;\n errorGeneric?: string;\n errorFormEntry?: string;\n successMessage?: string;\n /** Callback after reportDialog showed up */\n onLoad?(this: void): void;\n}\n","import { logger, uuid4, timestampInSeconds, isThenable } from '@sentry/utils';\nimport { getCurrentHub } from './hub.js';\n\n// Note: All functions in this file are typed with a return value of `ReturnType`,\n// where HUB_FUNCTION is some method on the Hub class.\n//\n// This is done to make sure the top level SDK methods stay in sync with the hub methods.\n// Although every method here has an explicit return type, some of them (that map to void returns) do not\n// contain `return` keywords. This is done to save on bundle size, as `return` is not minifiable.\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param captureContext Additional scope data to apply to exception event.\n * @returns The generated eventId.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nfunction captureException(exception, captureContext) {\n return getCurrentHub().captureException(exception, { captureContext });\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param Severity Define the level of the message.\n * @returns The generated eventId.\n */\nfunction captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n captureContext,\n) {\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n const level = typeof captureContext === 'string' ? captureContext : undefined;\n const context = typeof captureContext !== 'string' ? { captureContext } : undefined;\n return getCurrentHub().captureMessage(message, level, context);\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nfunction captureEvent(event, hint) {\n return getCurrentHub().captureEvent(event, hint);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nfunction configureScope(callback) {\n getCurrentHub().configureScope(callback);\n}\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nfunction addBreadcrumb(breadcrumb) {\n getCurrentHub().addBreadcrumb(breadcrumb);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setContext(name, context) {\n getCurrentHub().setContext(name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nfunction setExtras(extras) {\n getCurrentHub().setExtras(extras);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nfunction setExtra(key, extra) {\n getCurrentHub().setExtra(key, extra);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nfunction setTags(tags) {\n getCurrentHub().setTags(tags);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nfunction setTag(key, value) {\n getCurrentHub().setTag(key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nfunction setUser(user) {\n getCurrentHub().setUser(user);\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nfunction withScope(callback) {\n getCurrentHub().withScope(callback);\n}\n\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * NOTE: This function should only be used for *manual* instrumentation. Auto-instrumentation should call\n * `startTransaction` directly on the hub.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n */\nfunction startTransaction(\n context,\n customSamplingContext,\n) {\n return getCurrentHub().startTransaction({ ...context }, customSamplingContext);\n}\n\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction captureCheckIn(checkIn, upsertMonitorConfig) {\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const client = hub.getClient();\n if (!client) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot capture check-in. No client defined.');\n } else if (!client.captureCheckIn) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot capture check-in. Client does not support sending check-ins.');\n } else {\n return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n }\n\n return uuid4();\n}\n\n/**\n * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.\n *\n * @param monitorSlug The distinct slug of the monitor.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction withMonitor(\n monitorSlug,\n callback,\n upsertMonitorConfig,\n) {\n const checkInId = captureCheckIn({ monitorSlug, status: 'in_progress' }, upsertMonitorConfig);\n const now = timestampInSeconds();\n\n function finishCheckIn(status) {\n captureCheckIn({ monitorSlug, status, checkInId, duration: timestampInSeconds() - now });\n }\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback();\n } catch (e) {\n finishCheckIn('error');\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(\n () => {\n finishCheckIn('ok');\n },\n () => {\n finishCheckIn('error');\n },\n );\n } else {\n finishCheckIn('ok');\n }\n\n return maybePromiseResult;\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function flush(timeout) {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot flush events. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function close(timeout) {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot flush events and disable SDK. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nfunction lastEventId() {\n return getCurrentHub().lastEventId();\n}\n\nexport { addBreadcrumb, captureCheckIn, captureEvent, captureException, captureMessage, close, configureScope, flush, lastEventId, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withMonitor, withScope };\n//# sourceMappingURL=exports.js.map\n","import type {\n Breadcrumb,\n CaptureContext,\n CheckIn,\n CustomSamplingContext,\n Event,\n EventHint,\n Extra,\n Extras,\n FinishedCheckIn,\n MonitorConfig,\n Primitive,\n Severity,\n SeverityLevel,\n TransactionContext,\n User,\n} from '@sentry/types';\nimport { isThenable, logger, timestampInSeconds, uuid4 } from '@sentry/utils';\n\nimport type { Hub } from './hub';\nimport { getCurrentHub } from './hub';\nimport type { Scope } from './scope';\n\n// Note: All functions in this file are typed with a return value of `ReturnType`,\n// where HUB_FUNCTION is some method on the Hub class.\n//\n// This is done to make sure the top level SDK methods stay in sync with the hub methods.\n// Although every method here has an explicit return type, some of them (that map to void returns) do not\n// contain `return` keywords. This is done to save on bundle size, as `return` is not minifiable.\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param captureContext Additional scope data to apply to exception event.\n * @returns The generated eventId.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nexport function captureException(exception: any, captureContext?: CaptureContext): ReturnType {\n return getCurrentHub().captureException(exception, { captureContext });\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param Severity Define the level of the message.\n * @returns The generated eventId.\n */\nexport function captureMessage(\n message: string,\n // eslint-disable-next-line deprecation/deprecation\n captureContext?: CaptureContext | Severity | SeverityLevel,\n): ReturnType {\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n const level = typeof captureContext === 'string' ? captureContext : undefined;\n const context = typeof captureContext !== 'string' ? { captureContext } : undefined;\n return getCurrentHub().captureMessage(message, level, context);\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nexport function captureEvent(event: Event, hint?: EventHint): ReturnType {\n return getCurrentHub().captureEvent(event, hint);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nexport function configureScope(callback: (scope: Scope) => void): ReturnType {\n getCurrentHub().configureScope(callback);\n}\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nexport function addBreadcrumb(breadcrumb: Breadcrumb): ReturnType {\n getCurrentHub().addBreadcrumb(breadcrumb);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function setContext(name: string, context: { [key: string]: any } | null): ReturnType {\n getCurrentHub().setContext(name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nexport function setExtras(extras: Extras): ReturnType {\n getCurrentHub().setExtras(extras);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nexport function setExtra(key: string, extra: Extra): ReturnType {\n getCurrentHub().setExtra(key, extra);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nexport function setTags(tags: { [key: string]: Primitive }): ReturnType {\n getCurrentHub().setTags(tags);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nexport function setTag(key: string, value: Primitive): ReturnType {\n getCurrentHub().setTag(key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nexport function setUser(user: User | null): ReturnType {\n getCurrentHub().setUser(user);\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nexport function withScope(callback: (scope: Scope) => void): ReturnType {\n getCurrentHub().withScope(callback);\n}\n\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * NOTE: This function should only be used for *manual* instrumentation. Auto-instrumentation should call\n * `startTransaction` directly on the hub.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n */\nexport function startTransaction(\n context: TransactionContext,\n customSamplingContext?: CustomSamplingContext,\n): ReturnType {\n return getCurrentHub().startTransaction({ ...context }, customSamplingContext);\n}\n\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nexport function captureCheckIn(checkIn: CheckIn, upsertMonitorConfig?: MonitorConfig): string {\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const client = hub.getClient();\n if (!client) {\n __DEBUG_BUILD__ && logger.warn('Cannot capture check-in. No client defined.');\n } else if (!client.captureCheckIn) {\n __DEBUG_BUILD__ && logger.warn('Cannot capture check-in. Client does not support sending check-ins.');\n } else {\n return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n }\n\n return uuid4();\n}\n\n/**\n * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.\n *\n * @param monitorSlug The distinct slug of the monitor.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nexport function withMonitor(\n monitorSlug: CheckIn['monitorSlug'],\n callback: () => T,\n upsertMonitorConfig?: MonitorConfig,\n): T {\n const checkInId = captureCheckIn({ monitorSlug, status: 'in_progress' }, upsertMonitorConfig);\n const now = timestampInSeconds();\n\n function finishCheckIn(status: FinishedCheckIn['status']): void {\n captureCheckIn({ monitorSlug, status, checkInId, duration: timestampInSeconds() - now });\n }\n\n let maybePromiseResult: T;\n try {\n maybePromiseResult = callback();\n } catch (e) {\n finishCheckIn('error');\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(\n () => {\n finishCheckIn('ok');\n },\n () => {\n finishCheckIn('error');\n },\n );\n } else {\n finishCheckIn('ok');\n }\n\n return maybePromiseResult;\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport async function flush(timeout?: number): Promise {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n __DEBUG_BUILD__ && logger.warn('Cannot flush events. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport async function close(timeout?: number): Promise {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n __DEBUG_BUILD__ && logger.warn('Cannot flush events and disable SDK. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId(): string | undefined {\n return getCurrentHub().lastEventId();\n}\n","import { dsnToString, createEnvelope } from '@sentry/utils';\n\n/**\n * Creates an envelope from a user feedback.\n */\nfunction createUserFeedbackEnvelope(\n feedback,\n {\n metadata,\n tunnel,\n dsn,\n }\n\n,\n) {\n const headers = {\n event_id: feedback.event_id,\n sent_at: new Date().toISOString(),\n ...(metadata &&\n metadata.sdk && {\n sdk: {\n name: metadata.sdk.name,\n version: metadata.sdk.version,\n },\n }),\n ...(!!tunnel && !!dsn && { dsn: dsnToString(dsn) }),\n };\n const item = createUserFeedbackEnvelopeItem(feedback);\n\n return createEnvelope(headers, [item]);\n}\n\nfunction createUserFeedbackEnvelopeItem(feedback) {\n const feedbackHeaders = {\n type: 'user_report',\n };\n return [feedbackHeaders, feedback];\n}\n\nexport { createUserFeedbackEnvelope };\n//# sourceMappingURL=userfeedback.js.map\n","import type { DsnComponents, EventEnvelope, SdkMetadata, UserFeedback, UserFeedbackItem } from '@sentry/types';\nimport { createEnvelope, dsnToString } from '@sentry/utils';\n\n/**\n * Creates an envelope from a user feedback.\n */\nexport function createUserFeedbackEnvelope(\n feedback: UserFeedback,\n {\n metadata,\n tunnel,\n dsn,\n }: {\n metadata: SdkMetadata | undefined;\n tunnel: string | undefined;\n dsn: DsnComponents | undefined;\n },\n): EventEnvelope {\n const headers: EventEnvelope[0] = {\n event_id: feedback.event_id,\n sent_at: new Date().toISOString(),\n ...(metadata &&\n metadata.sdk && {\n sdk: {\n name: metadata.sdk.name,\n version: metadata.sdk.version,\n },\n }),\n ...(!!tunnel && !!dsn && { dsn: dsnToString(dsn) }),\n };\n const item = createUserFeedbackEnvelopeItem(feedback);\n\n return createEnvelope(headers, [item]);\n}\n\nfunction createUserFeedbackEnvelopeItem(feedback: UserFeedback): UserFeedbackItem {\n const feedbackHeaders: UserFeedbackItem[0] = {\n type: 'user_report',\n };\n return [feedbackHeaders, feedback];\n}\n","import { getCurrentHub } from '@sentry/core';\nimport { addInstrumentationHandler, isString, isPrimitive, isErrorEvent, getLocationHref, logger, addExceptionMechanism } from '@sentry/utils';\nimport { eventFromUnknownInput } from '../eventbuilder.js';\nimport { shouldIgnoreOnError } from '../helpers.js';\n\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n\n/** Global handlers */\nclass GlobalHandlers {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'GlobalHandlers';}\n\n /**\n * @inheritDoc\n */\n\n /** JSDoc */\n\n /**\n * Stores references functions to installing handlers. Will set to undefined\n * after they have been run so that they are not used twice.\n */\n\n /** JSDoc */\n constructor(options) {\n this.name = GlobalHandlers.id;\n this._options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n\n this._installFunc = {\n onerror: _installGlobalOnErrorHandler,\n onunhandledrejection: _installGlobalOnUnhandledRejectionHandler,\n };\n }\n /**\n * @inheritDoc\n */\n setupOnce() {\n Error.stackTraceLimit = 50;\n const options = this._options;\n\n // We can disable guard-for-in as we construct the options object above + do checks against\n // `this._installFunc` for the property.\n // eslint-disable-next-line guard-for-in\n for (const key in options) {\n const installFunc = this._installFunc[key ];\n if (installFunc && options[key ]) {\n globalHandlerLog(key);\n installFunc();\n this._installFunc[key ] = undefined;\n }\n }\n }\n} GlobalHandlers.__initStatic();\n\n/** JSDoc */\nfunction _installGlobalOnErrorHandler() {\n addInstrumentationHandler(\n 'error',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (data) => {\n const [hub, stackParser, attachStacktrace] = getHubAndOptions();\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n const { msg, url, line, column, error } = data;\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return;\n }\n\n const event =\n error === undefined && isString(msg)\n ? _eventFromIncompleteOnError(msg, url, line, column)\n : _enhanceEventWithInitialFrame(\n eventFromUnknownInput(stackParser, error || msg, undefined, attachStacktrace, false),\n url,\n line,\n column,\n );\n\n event.level = 'error';\n\n addMechanismAndCapture(hub, error, event, 'onerror');\n },\n );\n}\n\n/** JSDoc */\nfunction _installGlobalOnUnhandledRejectionHandler() {\n addInstrumentationHandler(\n 'unhandledrejection',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (e) => {\n const [hub, stackParser, attachStacktrace] = getHubAndOptions();\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n let error = e;\n\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n } catch (_oO) {\n // no-empty\n }\n\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return true;\n }\n\n const event = isPrimitive(error)\n ? _eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);\n\n event.level = 'error';\n\n addMechanismAndCapture(hub, error, event, 'onunhandledrejection');\n return;\n },\n );\n}\n\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\nfunction _eventFromRejectionWithPrimitive(reason) {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: `Non-Error promise rejection captured with value: ${String(reason)}`,\n },\n ],\n },\n };\n}\n\n/**\n * This function creates a stack from an old, error-less onerror handler.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _eventFromIncompleteOnError(msg, url, line, column) {\n const ERROR_TYPES_RE =\n /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = isErrorEvent(msg) ? msg.message : msg;\n let name = 'Error';\n\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name,\n value: message,\n },\n ],\n },\n };\n\n return _enhanceEventWithInitialFrame(event, url, line, column);\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _enhanceEventWithInitialFrame(event, url, line, column) {\n // event.exception\n const e = (event.exception = event.exception || {});\n // event.exception.values\n const ev = (e.values = e.values || []);\n // event.exception.values[0]\n const ev0 = (ev[0] = ev[0] || {});\n // event.exception.values[0].stacktrace\n const ev0s = (ev0.stacktrace = ev0.stacktrace || {});\n // event.exception.values[0].stacktrace.frames\n const ev0sf = (ev0s.frames = ev0s.frames || []);\n\n const colno = isNaN(parseInt(column, 10)) ? undefined : column;\n const lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n // event.exception.values[0].stacktrace.frames\n if (ev0sf.length === 0) {\n ev0sf.push({\n colno,\n filename,\n function: '?',\n in_app: true,\n lineno,\n });\n }\n\n return event;\n}\n\nfunction globalHandlerLog(type) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Global Handler attached: ${type}`);\n}\n\nfunction addMechanismAndCapture(hub, error, event, type) {\n addExceptionMechanism(event, {\n handled: false,\n type,\n });\n hub.captureEvent(event, {\n originalException: error,\n });\n}\n\nfunction getHubAndOptions() {\n const hub = getCurrentHub();\n const client = hub.getClient();\n const options = (client && client.getOptions()) || {\n stackParser: () => [],\n attachStacktrace: false,\n };\n return [hub, options.stackParser, options.attachStacktrace];\n}\n\nexport { GlobalHandlers };\n//# sourceMappingURL=globalhandlers.js.map\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport { getCurrentHub } from '@sentry/core';\nimport type { Event, EventHint, Hub, Integration, Primitive, StackParser } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addInstrumentationHandler,\n getLocationHref,\n isErrorEvent,\n isPrimitive,\n isString,\n logger,\n} from '@sentry/utils';\n\nimport type { BrowserClient } from '../client';\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n\ntype GlobalHandlersIntegrationsOptionKeys = 'onerror' | 'onunhandledrejection';\n\n/** JSDoc */\ntype GlobalHandlersIntegrations = Record;\n\n/** Global handlers */\nexport class GlobalHandlers implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'GlobalHandlers';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n /** JSDoc */\n private readonly _options: GlobalHandlersIntegrations;\n\n /**\n * Stores references functions to installing handlers. Will set to undefined\n * after they have been run so that they are not used twice.\n */\n private _installFunc: Record void) | undefined>;\n\n /** JSDoc */\n public constructor(options?: GlobalHandlersIntegrations) {\n this.name = GlobalHandlers.id;\n this._options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n\n this._installFunc = {\n onerror: _installGlobalOnErrorHandler,\n onunhandledrejection: _installGlobalOnUnhandledRejectionHandler,\n };\n }\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n Error.stackTraceLimit = 50;\n const options = this._options;\n\n // We can disable guard-for-in as we construct the options object above + do checks against\n // `this._installFunc` for the property.\n // eslint-disable-next-line guard-for-in\n for (const key in options) {\n const installFunc = this._installFunc[key as GlobalHandlersIntegrationsOptionKeys];\n if (installFunc && options[key as GlobalHandlersIntegrationsOptionKeys]) {\n globalHandlerLog(key);\n installFunc();\n this._installFunc[key as GlobalHandlersIntegrationsOptionKeys] = undefined;\n }\n }\n }\n}\n\n/** JSDoc */\nfunction _installGlobalOnErrorHandler(): void {\n addInstrumentationHandler(\n 'error',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (data: { msg: any; url: any; line: any; column: any; error: any }) => {\n const [hub, stackParser, attachStacktrace] = getHubAndOptions();\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n const { msg, url, line, column, error } = data;\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return;\n }\n\n const event =\n error === undefined && isString(msg)\n ? _eventFromIncompleteOnError(msg, url, line, column)\n : _enhanceEventWithInitialFrame(\n eventFromUnknownInput(stackParser, error || msg, undefined, attachStacktrace, false),\n url,\n line,\n column,\n );\n\n event.level = 'error';\n\n addMechanismAndCapture(hub, error, event, 'onerror');\n },\n );\n}\n\n/** JSDoc */\nfunction _installGlobalOnUnhandledRejectionHandler(): void {\n addInstrumentationHandler(\n 'unhandledrejection',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (e: any) => {\n const [hub, stackParser, attachStacktrace] = getHubAndOptions();\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n let error = e;\n\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n } catch (_oO) {\n // no-empty\n }\n\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return true;\n }\n\n const event = isPrimitive(error)\n ? _eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);\n\n event.level = 'error';\n\n addMechanismAndCapture(hub, error, event, 'onunhandledrejection');\n return;\n },\n );\n}\n\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\nfunction _eventFromRejectionWithPrimitive(reason: Primitive): Event {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: `Non-Error promise rejection captured with value: ${String(reason)}`,\n },\n ],\n },\n };\n}\n\n/**\n * This function creates a stack from an old, error-less onerror handler.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _eventFromIncompleteOnError(msg: any, url: any, line: any, column: any): Event {\n const ERROR_TYPES_RE =\n /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = isErrorEvent(msg) ? msg.message : msg;\n let name = 'Error';\n\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name,\n value: message,\n },\n ],\n },\n };\n\n return _enhanceEventWithInitialFrame(event, url, line, column);\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _enhanceEventWithInitialFrame(event: Event, url: any, line: any, column: any): Event {\n // event.exception\n const e = (event.exception = event.exception || {});\n // event.exception.values\n const ev = (e.values = e.values || []);\n // event.exception.values[0]\n const ev0 = (ev[0] = ev[0] || {});\n // event.exception.values[0].stacktrace\n const ev0s = (ev0.stacktrace = ev0.stacktrace || {});\n // event.exception.values[0].stacktrace.frames\n const ev0sf = (ev0s.frames = ev0s.frames || []);\n\n const colno = isNaN(parseInt(column, 10)) ? undefined : column;\n const lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n // event.exception.values[0].stacktrace.frames\n if (ev0sf.length === 0) {\n ev0sf.push({\n colno,\n filename,\n function: '?',\n in_app: true,\n lineno,\n });\n }\n\n return event;\n}\n\nfunction globalHandlerLog(type: string): void {\n __DEBUG_BUILD__ && logger.log(`Global Handler attached: ${type}`);\n}\n\nfunction addMechanismAndCapture(hub: Hub, error: EventHint['originalException'], event: Event, type: string): void {\n addExceptionMechanism(event, {\n handled: false,\n type,\n });\n hub.captureEvent(event, {\n originalException: error,\n });\n}\n\nfunction getHubAndOptions(): [Hub, StackParser, boolean | undefined] {\n const hub = getCurrentHub();\n const client = hub.getClient();\n const options = (client && client.getOptions()) || {\n stackParser: () => [],\n attachStacktrace: false,\n };\n return [hub, options.stackParser, options.attachStacktrace];\n}\n","import { fill, getFunctionName, getOriginalFunction } from '@sentry/utils';\nimport { WINDOW, wrap } from '../helpers.js';\n\nconst DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'BroadcastChannel',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'SharedWorker',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nclass TryCatch {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'TryCatch';}\n\n /**\n * @inheritDoc\n */\n\n /** JSDoc */\n\n /**\n * @inheritDoc\n */\n constructor(options) {\n this.name = TryCatch.id;\n this._options = {\n XMLHttpRequest: true,\n eventTarget: true,\n requestAnimationFrame: true,\n setInterval: true,\n setTimeout: true,\n ...options,\n };\n }\n\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n setupOnce() {\n if (this._options.setTimeout) {\n fill(WINDOW, 'setTimeout', _wrapTimeFunction);\n }\n\n if (this._options.setInterval) {\n fill(WINDOW, 'setInterval', _wrapTimeFunction);\n }\n\n if (this._options.requestAnimationFrame) {\n fill(WINDOW, 'requestAnimationFrame', _wrapRAF);\n }\n\n if (this._options.XMLHttpRequest && 'XMLHttpRequest' in WINDOW) {\n fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n }\n\n const eventTargetOption = this._options.eventTarget;\n if (eventTargetOption) {\n const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(_wrapEventTarget);\n }\n }\n} TryCatch.__initStatic();\n\n/** JSDoc */\nfunction _wrapTimeFunction(original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function ( ...args) {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: false,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _wrapRAF(original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function ( callback) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return original.apply(this, [\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: false,\n type: 'instrument',\n },\n }),\n ]);\n };\n}\n\n/** JSDoc */\nfunction _wrapXHR(originalSend) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function ( ...args) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(xhr, prop, function (original) {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: false,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before TryCatch, get the name of original function\n const originalFunction = getOriginalFunction(original);\n if (originalFunction) {\n wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n}\n\n/** JSDoc */\nfunction _wrapEventTarget(target) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const globalObject = WINDOW ;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = globalObject[target] && globalObject[target].prototype;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (original)\n\n {\n return function (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n eventName,\n fn,\n options,\n ) {\n try {\n if (typeof fn.handleEvent === 'function') {\n // ESlint disable explanation:\n // First, it is generally safe to call `wrap` with an unbound function. Furthermore, using `.bind()` would\n // introduce a bug here, because bind returns a new function that doesn't have our\n // flags(like __sentry_original__) attached. `wrap` checks for those flags to avoid unnecessary wrapping.\n // Without those flags, every call to addEventListener wraps the function again, causing a memory leak.\n // eslint-disable-next-line @typescript-eslint/unbound-method\n fn.handleEvent = wrap(fn.handleEvent, {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: false,\n type: 'instrument',\n },\n });\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.apply(this, [\n eventName,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wrap(fn , {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: false,\n type: 'instrument',\n },\n }),\n options,\n ]);\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (\n originalRemoveEventListener,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) {\n return function (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n eventName,\n fn,\n options,\n ) {\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n const wrappedEventHandler = fn ;\n try {\n const originalEventHandler = wrappedEventHandler && wrappedEventHandler.__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);\n };\n },\n );\n}\n\nexport { TryCatch };\n//# sourceMappingURL=trycatch.js.map\n","import type { Integration, WrappedFunction } from '@sentry/types';\nimport { fill, getFunctionName, getOriginalFunction } from '@sentry/utils';\n\nimport { WINDOW, wrap } from '../helpers';\n\nconst DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'BroadcastChannel',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'SharedWorker',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n\ntype XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatechange';\n\n/** JSDoc */\ninterface TryCatchOptions {\n setTimeout: boolean;\n setInterval: boolean;\n requestAnimationFrame: boolean;\n XMLHttpRequest: boolean;\n eventTarget: boolean | string[];\n}\n\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nexport class TryCatch implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'TryCatch';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n /** JSDoc */\n private readonly _options: TryCatchOptions;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: Partial) {\n this.name = TryCatch.id;\n this._options = {\n XMLHttpRequest: true,\n eventTarget: true,\n requestAnimationFrame: true,\n setInterval: true,\n setTimeout: true,\n ...options,\n };\n }\n\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n public setupOnce(): void {\n if (this._options.setTimeout) {\n fill(WINDOW, 'setTimeout', _wrapTimeFunction);\n }\n\n if (this._options.setInterval) {\n fill(WINDOW, 'setInterval', _wrapTimeFunction);\n }\n\n if (this._options.requestAnimationFrame) {\n fill(WINDOW, 'requestAnimationFrame', _wrapRAF);\n }\n\n if (this._options.XMLHttpRequest && 'XMLHttpRequest' in WINDOW) {\n fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n }\n\n const eventTargetOption = this._options.eventTarget;\n if (eventTargetOption) {\n const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(_wrapEventTarget);\n }\n }\n}\n\n/** JSDoc */\nfunction _wrapTimeFunction(original: () => void): () => number {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (this: any, ...args: any[]): number {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: false,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _wrapRAF(original: any): (callback: () => void) => any {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (this: any, callback: () => void): () => void {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return original.apply(this, [\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: false,\n type: 'instrument',\n },\n }),\n ]);\n };\n}\n\n/** JSDoc */\nfunction _wrapXHR(originalSend: () => void): () => void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (this: XMLHttpRequest, ...args: any[]): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const xmlHttpRequestProps: XMLHttpRequestProp[] = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(xhr, prop, function (original: WrappedFunction): () => any {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: false,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before TryCatch, get the name of original function\n const originalFunction = getOriginalFunction(original);\n if (originalFunction) {\n wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n}\n\n/** JSDoc */\nfunction _wrapEventTarget(target: string): void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const globalObject = WINDOW as { [key: string]: any };\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = globalObject[target] && globalObject[target].prototype;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (original: () => void): (\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) => void {\n return function (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): (eventName: string, fn: EventListenerObject, capture?: boolean, secure?: boolean) => void {\n try {\n if (typeof fn.handleEvent === 'function') {\n // ESlint disable explanation:\n // First, it is generally safe to call `wrap` with an unbound function. Furthermore, using `.bind()` would\n // introduce a bug here, because bind returns a new function that doesn't have our\n // flags(like __sentry_original__) attached. `wrap` checks for those flags to avoid unnecessary wrapping.\n // Without those flags, every call to addEventListener wraps the function again, causing a memory leak.\n // eslint-disable-next-line @typescript-eslint/unbound-method\n fn.handleEvent = wrap(fn.handleEvent, {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: false,\n type: 'instrument',\n },\n });\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.apply(this, [\n eventName,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wrap(fn as any as WrappedFunction, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: false,\n type: 'instrument',\n },\n }),\n options,\n ]);\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (\n originalRemoveEventListener: () => void,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): (this: any, eventName: string, fn: EventListenerObject, options?: boolean | EventListenerOptions) => () => void {\n return function (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n const wrappedEventHandler = fn as unknown as WrappedFunction;\n try {\n const originalEventHandler = wrappedEventHandler && wrappedEventHandler.__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);\n };\n },\n );\n}\n","import { getCurrentHub } from '@sentry/core';\nimport { addInstrumentationHandler, getEventDescription, severityLevelFromString, safeJoin, SENTRY_XHR_DATA_KEY, parseUrl, logger, htmlTreeAsString } from '@sentry/utils';\nimport { WINDOW } from '../helpers.js';\n\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n\n/** maxStringLength gets capped to prevent 100 breadcrumbs exceeding 1MB event payload size */\nconst MAX_ALLOWED_STRING_LENGTH = 1024;\n\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nclass Breadcrumbs {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Breadcrumbs';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * Options of the breadcrumbs integration.\n */\n // This field is public, because we use it in the browser client to check if the `sentry` option is enabled.\n\n /**\n * @inheritDoc\n */\n constructor(options) {\n this.name = Breadcrumbs.id;\n this.options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n }\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n setupOnce() {\n if (this.options.console) {\n addInstrumentationHandler('console', _consoleBreadcrumb);\n }\n if (this.options.dom) {\n addInstrumentationHandler('dom', _domBreadcrumb(this.options.dom));\n }\n if (this.options.xhr) {\n addInstrumentationHandler('xhr', _xhrBreadcrumb);\n }\n if (this.options.fetch) {\n addInstrumentationHandler('fetch', _fetchBreadcrumb);\n }\n if (this.options.history) {\n addInstrumentationHandler('history', _historyBreadcrumb);\n }\n if (this.options.sentry) {\n const client = getCurrentHub().getClient();\n client && client.on && client.on('beforeSendEvent', addSentryBreadcrumb);\n }\n }\n} Breadcrumbs.__initStatic();\n\n/**\n * Adds a breadcrumb for Sentry events or transactions if this option is enabled.\n */\nfunction addSentryBreadcrumb(event) {\n getCurrentHub().addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n}\n\n/**\n * A HOC that creaes a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */\nfunction _domBreadcrumb(dom) {\n function _innerDomBreadcrumb(handlerData) {\n let target;\n let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n let maxStringLength =\n typeof dom === 'object' && typeof dom.maxStringLength === 'number' ? dom.maxStringLength : undefined;\n if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `\\`dom.maxStringLength\\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`,\n );\n maxStringLength = MAX_ALLOWED_STRING_LENGTH;\n }\n\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n const event = handlerData.event ;\n target = _isEvent(event)\n ? htmlTreeAsString(event.target, { keyAttrs, maxStringLength })\n : htmlTreeAsString(event, { keyAttrs, maxStringLength });\n } catch (e) {\n target = '';\n }\n\n if (target.length === 0) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: `ui.${handlerData.name}`,\n message: target,\n },\n {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n },\n );\n }\n\n return _innerDomBreadcrumb;\n}\n\n/**\n * Creates breadcrumbs from console API calls\n */\nfunction _consoleBreadcrumb(handlerData) {\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: severityLevelFromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n}\n\n/**\n * Creates breadcrumbs from XHR API calls\n */\nfunction _xhrBreadcrumb(handlerData) {\n const { startTimestamp, endTimestamp } = handlerData;\n\n const sentryXhrData = handlerData.xhr[SENTRY_XHR_DATA_KEY];\n\n // We only capture complete, non-sentry requests\n if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n return;\n }\n\n const { method, url, status_code, body } = sentryXhrData;\n\n const data = {\n method,\n url,\n status_code,\n };\n\n const hint = {\n xhr: handlerData.xhr,\n input: body,\n startTimestamp,\n endTimestamp,\n };\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'xhr',\n data,\n type: 'http',\n },\n hint,\n );\n}\n\n/**\n * Creates breadcrumbs from fetch API calls\n */\nfunction _fetchBreadcrumb(handlerData) {\n const { startTimestamp, endTimestamp } = handlerData;\n\n // We only capture complete fetch requests\n if (!endTimestamp) {\n return;\n }\n\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n\n if (handlerData.error) {\n const data = handlerData.fetchData;\n const hint = {\n data: handlerData.error,\n input: handlerData.args,\n startTimestamp,\n endTimestamp,\n };\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data,\n level: 'error',\n type: 'http',\n },\n hint,\n );\n } else {\n const data = {\n ...handlerData.fetchData,\n status_code: handlerData.response && handlerData.response.status,\n };\n const hint = {\n input: handlerData.args,\n response: handlerData.response,\n startTimestamp,\n endTimestamp,\n };\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data,\n type: 'http',\n },\n hint,\n );\n }\n}\n\n/**\n * Creates breadcrumbs from history API calls\n */\nfunction _historyBreadcrumb(handlerData) {\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(WINDOW.location.href);\n let parsedFrom = parseUrl(from);\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n}\n\nfunction _isEvent(event) {\n return !!event && !!(event ).target;\n}\n\nexport { Breadcrumbs };\n//# sourceMappingURL=breadcrumbs.js.map\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable max-lines */\nimport { getCurrentHub } from '@sentry/core';\nimport type { Event as SentryEvent, HandlerDataFetch, HandlerDataXhr, Integration } from '@sentry/types';\nimport type {\n FetchBreadcrumbData,\n FetchBreadcrumbHint,\n XhrBreadcrumbData,\n XhrBreadcrumbHint,\n} from '@sentry/types/build/types/breadcrumb';\nimport {\n addInstrumentationHandler,\n getEventDescription,\n htmlTreeAsString,\n logger,\n parseUrl,\n safeJoin,\n SENTRY_XHR_DATA_KEY,\n severityLevelFromString,\n} from '@sentry/utils';\n\nimport { WINDOW } from '../helpers';\n\ntype HandlerData = Record;\n\n/** JSDoc */\ninterface BreadcrumbsOptions {\n console: boolean;\n dom:\n | boolean\n | {\n serializeAttribute?: string | string[];\n maxStringLength?: number;\n };\n fetch: boolean;\n history: boolean;\n sentry: boolean;\n xhr: boolean;\n}\n\n/** maxStringLength gets capped to prevent 100 breadcrumbs exceeding 1MB event payload size */\nconst MAX_ALLOWED_STRING_LENGTH = 1024;\n\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nexport class Breadcrumbs implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Breadcrumbs';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n /**\n * Options of the breadcrumbs integration.\n */\n // This field is public, because we use it in the browser client to check if the `sentry` option is enabled.\n public readonly options: Readonly;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: Partial) {\n this.name = Breadcrumbs.id;\n this.options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n }\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n public setupOnce(): void {\n if (this.options.console) {\n addInstrumentationHandler('console', _consoleBreadcrumb);\n }\n if (this.options.dom) {\n addInstrumentationHandler('dom', _domBreadcrumb(this.options.dom));\n }\n if (this.options.xhr) {\n addInstrumentationHandler('xhr', _xhrBreadcrumb);\n }\n if (this.options.fetch) {\n addInstrumentationHandler('fetch', _fetchBreadcrumb);\n }\n if (this.options.history) {\n addInstrumentationHandler('history', _historyBreadcrumb);\n }\n if (this.options.sentry) {\n const client = getCurrentHub().getClient();\n client && client.on && client.on('beforeSendEvent', addSentryBreadcrumb);\n }\n }\n}\n\n/**\n * Adds a breadcrumb for Sentry events or transactions if this option is enabled.\n */\nfunction addSentryBreadcrumb(event: SentryEvent): void {\n getCurrentHub().addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n}\n\n/**\n * A HOC that creaes a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */\nfunction _domBreadcrumb(dom: BreadcrumbsOptions['dom']): (handlerData: HandlerData) => void {\n function _innerDomBreadcrumb(handlerData: HandlerData): void {\n let target;\n let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n let maxStringLength =\n typeof dom === 'object' && typeof dom.maxStringLength === 'number' ? dom.maxStringLength : undefined;\n if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `\\`dom.maxStringLength\\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`,\n );\n maxStringLength = MAX_ALLOWED_STRING_LENGTH;\n }\n\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n const event = handlerData.event as Event | Node;\n target = _isEvent(event)\n ? htmlTreeAsString(event.target, { keyAttrs, maxStringLength })\n : htmlTreeAsString(event, { keyAttrs, maxStringLength });\n } catch (e) {\n target = '';\n }\n\n if (target.length === 0) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: `ui.${handlerData.name}`,\n message: target,\n },\n {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n },\n );\n }\n\n return _innerDomBreadcrumb;\n}\n\n/**\n * Creates breadcrumbs from console API calls\n */\nfunction _consoleBreadcrumb(handlerData: HandlerData & { args: unknown[]; level: string }): void {\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: severityLevelFromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n}\n\n/**\n * Creates breadcrumbs from XHR API calls\n */\nfunction _xhrBreadcrumb(handlerData: HandlerData & HandlerDataXhr): void {\n const { startTimestamp, endTimestamp } = handlerData;\n\n const sentryXhrData = handlerData.xhr[SENTRY_XHR_DATA_KEY];\n\n // We only capture complete, non-sentry requests\n if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n return;\n }\n\n const { method, url, status_code, body } = sentryXhrData;\n\n const data: XhrBreadcrumbData = {\n method,\n url,\n status_code,\n };\n\n const hint: XhrBreadcrumbHint = {\n xhr: handlerData.xhr,\n input: body,\n startTimestamp,\n endTimestamp,\n };\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'xhr',\n data,\n type: 'http',\n },\n hint,\n );\n}\n\n/**\n * Creates breadcrumbs from fetch API calls\n */\nfunction _fetchBreadcrumb(handlerData: HandlerData & HandlerDataFetch & { response?: Response }): void {\n const { startTimestamp, endTimestamp } = handlerData;\n\n // We only capture complete fetch requests\n if (!endTimestamp) {\n return;\n }\n\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n\n if (handlerData.error) {\n const data: FetchBreadcrumbData = handlerData.fetchData;\n const hint: FetchBreadcrumbHint = {\n data: handlerData.error,\n input: handlerData.args,\n startTimestamp,\n endTimestamp,\n };\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data,\n level: 'error',\n type: 'http',\n },\n hint,\n );\n } else {\n const data: FetchBreadcrumbData = {\n ...handlerData.fetchData,\n status_code: handlerData.response && handlerData.response.status,\n };\n const hint: FetchBreadcrumbHint = {\n input: handlerData.args,\n response: handlerData.response,\n startTimestamp,\n endTimestamp,\n };\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data,\n type: 'http',\n },\n hint,\n );\n }\n}\n\n/**\n * Creates breadcrumbs from history API calls\n */\nfunction _historyBreadcrumb(handlerData: HandlerData & { from: string; to: string }): void {\n let from: string | undefined = handlerData.from;\n let to: string | undefined = handlerData.to;\n const parsedLoc = parseUrl(WINDOW.location.href);\n let parsedFrom = parseUrl(from);\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n}\n\nfunction _isEvent(event: unknown): event is Event {\n return !!event && !!(event as Record).target;\n}\n","/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nfunction parseUrl(url) {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n search: query,\n hash: fragment,\n relative: match[5] + query + fragment, // everything minus origin\n };\n}\n\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\nfunction stripUrlQueryAndFragment(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n}\n\n/**\n * Returns number of URL segments of a passed string URL.\n */\nfunction getNumberOfUrlSegments(url) {\n // split at '/' or at '\\/' to split regex urls correctly\n return url.split(/\\\\?\\//).filter(s => s.length > 0 && s !== ',').length;\n}\n\n/**\n * Takes a URL object and returns a sanitized string which is safe to use as span description\n * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data\n */\nfunction getSanitizedUrlString(url) {\n const { protocol, host, path } = url;\n\n const filteredHost =\n (host &&\n host\n // Always filter out authority\n .replace(/^.*@/, '[filtered]:[filtered]@')\n // Don't show standard :80 (http) and :443 (https) ports to reduce the noise\n .replace(':80', '')\n .replace(':443', '')) ||\n '';\n\n return `${protocol ? `${protocol}://` : ''}${filteredHost}${path}`;\n}\n\nexport { getNumberOfUrlSegments, getSanitizedUrlString, parseUrl, stripUrlQueryAndFragment };\n//# sourceMappingURL=url.js.map\n","type PartialURL = {\n host?: string;\n path?: string;\n protocol?: string;\n relative?: string;\n search?: string;\n hash?: string;\n};\n\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nexport function parseUrl(url: string): PartialURL {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n search: query,\n hash: fragment,\n relative: match[5] + query + fragment, // everything minus origin\n };\n}\n\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\nexport function stripUrlQueryAndFragment(urlPath: string): string {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n}\n\n/**\n * Returns number of URL segments of a passed string URL.\n */\nexport function getNumberOfUrlSegments(url: string): number {\n // split at '/' or at '\\/' to split regex urls correctly\n return url.split(/\\\\?\\//).filter(s => s.length > 0 && s !== ',').length;\n}\n\n/**\n * Takes a URL object and returns a sanitized string which is safe to use as span description\n * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data\n */\nexport function getSanitizedUrlString(url: PartialURL): string {\n const { protocol, host, path } = url;\n\n const filteredHost =\n (host &&\n host\n // Always filter out authority\n .replace(/^.*@/, '[filtered]:[filtered]@')\n // Don't show standard :80 (http) and :443 (https) ports to reduce the noise\n .replace(':80', '')\n .replace(':443', '')) ||\n '';\n\n return `${protocol ? `${protocol}://` : ''}${filteredHost}${path}`;\n}\n","// Note: Ideally the `SeverityLevel` type would be derived from `validSeverityLevels`, but that would mean either\n//\n// a) moving `validSeverityLevels` to `@sentry/types`,\n// b) moving the`SeverityLevel` type here, or\n// c) importing `validSeverityLevels` from here into `@sentry/types`.\n//\n// Option A would make `@sentry/types` a runtime dependency of `@sentry/utils` (not good), and options B and C would\n// create a circular dependency between `@sentry/types` and `@sentry/utils` (also not good). So a TODO accompanying the\n// type, reminding anyone who changes it to change this list also, will have to do.\n\nconst validSeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug'];\n\n/**\n * Converts a string-based level into a member of the deprecated {@link Severity} enum.\n *\n * @deprecated `severityFromString` is deprecated. Please use `severityLevelFromString` instead.\n *\n * @param level String representation of Severity\n * @returns Severity\n */\nfunction severityFromString(level) {\n return severityLevelFromString(level) ;\n}\n\n/**\n * Converts a string-based level into a `SeverityLevel`, normalizing it along the way.\n *\n * @param level String representation of desired `SeverityLevel`.\n * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level.\n */\nfunction severityLevelFromString(level) {\n return (level === 'warn' ? 'warning' : validSeverityLevels.includes(level) ? level : 'log') ;\n}\n\nexport { severityFromString, severityLevelFromString, validSeverityLevels };\n//# sourceMappingURL=severity.js.map\n","/* eslint-disable deprecation/deprecation */\nimport type { Severity, SeverityLevel } from '@sentry/types';\n\n// Note: Ideally the `SeverityLevel` type would be derived from `validSeverityLevels`, but that would mean either\n//\n// a) moving `validSeverityLevels` to `@sentry/types`,\n// b) moving the`SeverityLevel` type here, or\n// c) importing `validSeverityLevels` from here into `@sentry/types`.\n//\n// Option A would make `@sentry/types` a runtime dependency of `@sentry/utils` (not good), and options B and C would\n// create a circular dependency between `@sentry/types` and `@sentry/utils` (also not good). So a TODO accompanying the\n// type, reminding anyone who changes it to change this list also, will have to do.\n\nexport const validSeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug'];\n\n/**\n * Converts a string-based level into a member of the deprecated {@link Severity} enum.\n *\n * @deprecated `severityFromString` is deprecated. Please use `severityLevelFromString` instead.\n *\n * @param level String representation of Severity\n * @returns Severity\n */\nexport function severityFromString(level: Severity | SeverityLevel | string): Severity {\n return severityLevelFromString(level) as Severity;\n}\n\n/**\n * Converts a string-based level into a `SeverityLevel`, normalizing it along the way.\n *\n * @param level String representation of desired `SeverityLevel`.\n * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level.\n */\nexport function severityLevelFromString(level: SeverityLevel | string): SeverityLevel {\n return (level === 'warn' ? 'warning' : validSeverityLevels.includes(level) ? level : 'log') as SeverityLevel;\n}\n","import { applyAggregateErrorsToEvent } from '@sentry/utils';\nimport { exceptionFromError } from '../eventbuilder.js';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nclass LinkedErrors {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'LinkedErrors';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {\n this.name = LinkedErrors.id;\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /** @inheritdoc */\n setupOnce() {\n // noop\n }\n\n /**\n * @inheritDoc\n */\n preprocessEvent(event, hint, client) {\n const options = client.getOptions();\n\n applyAggregateErrorsToEvent(\n exceptionFromError,\n options.stackParser,\n options.maxValueLength,\n this._key,\n this._limit,\n event,\n hint,\n );\n }\n} LinkedErrors.__initStatic();\n\nexport { LinkedErrors };\n//# sourceMappingURL=linkederrors.js.map\n","import type { Client, Event, EventHint, Integration } from '@sentry/types';\nimport { applyAggregateErrorsToEvent } from '@sentry/utils';\n\nimport { exceptionFromError } from '../eventbuilder';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\ninterface LinkedErrorsOptions {\n key: string;\n limit: number;\n}\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'LinkedErrors';\n\n /**\n * @inheritDoc\n */\n public readonly name: string;\n\n /**\n * @inheritDoc\n */\n private readonly _key: LinkedErrorsOptions['key'];\n\n /**\n * @inheritDoc\n */\n private readonly _limit: LinkedErrorsOptions['limit'];\n\n /**\n * @inheritDoc\n */\n public constructor(options: Partial = {}) {\n this.name = LinkedErrors.id;\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /** @inheritdoc */\n public setupOnce(): void {\n // noop\n }\n\n /**\n * @inheritDoc\n */\n public preprocessEvent(event: Event, hint: EventHint | undefined, client: Client): void {\n const options = client.getOptions();\n\n applyAggregateErrorsToEvent(\n exceptionFromError,\n options.stackParser,\n options.maxValueLength,\n this._key,\n this._limit,\n event,\n hint,\n );\n }\n}\n","import { WINDOW } from '../helpers.js';\n\n/** HttpContext integration collects information about HTTP request headers */\nclass HttpContext {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'HttpContext';}\n\n /**\n * @inheritDoc\n */\n\n constructor() {\n this.name = HttpContext.id;\n }\n\n /**\n * @inheritDoc\n */\n setupOnce() {\n // noop\n }\n\n /** @inheritDoc */\n preprocessEvent(event) {\n // if none of the information we want exists, don't bother\n if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {\n return;\n }\n\n // grab as much info as exists and add it to the event\n const url = (event.request && event.request.url) || (WINDOW.location && WINDOW.location.href);\n const { referrer } = WINDOW.document || {};\n const { userAgent } = WINDOW.navigator || {};\n\n const headers = {\n ...(event.request && event.request.headers),\n ...(referrer && { Referer: referrer }),\n ...(userAgent && { 'User-Agent': userAgent }),\n };\n const request = { ...event.request, ...(url && { url }), headers };\n\n event.request = request;\n }\n} HttpContext.__initStatic();\n\nexport { HttpContext };\n//# sourceMappingURL=httpcontext.js.map\n","import type { Event, Integration } from '@sentry/types';\n\nimport { WINDOW } from '../helpers';\n\n/** HttpContext integration collects information about HTTP request headers */\nexport class HttpContext implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'HttpContext';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n public constructor() {\n this.name = HttpContext.id;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n // noop\n }\n\n /** @inheritDoc */\n public preprocessEvent(event: Event): void {\n // if none of the information we want exists, don't bother\n if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {\n return;\n }\n\n // grab as much info as exists and add it to the event\n const url = (event.request && event.request.url) || (WINDOW.location && WINDOW.location.href);\n const { referrer } = WINDOW.document || {};\n const { userAgent } = WINDOW.navigator || {};\n\n const headers = {\n ...(event.request && event.request.headers),\n ...(referrer && { Referer: referrer }),\n ...(userAgent && { 'User-Agent': userAgent }),\n };\n const request = { ...event.request, ...(url && { url }), headers };\n\n event.request = request;\n }\n}\n","import { logger } from '@sentry/utils';\n\n/** Deduplication filter */\nclass Dedupe {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Dedupe';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n constructor() {\n this.name = Dedupe.id;\n }\n\n /** @inheritDoc */\n setupOnce(_addGlobaleventProcessor, _getCurrentHub) {\n // noop\n }\n\n /**\n * @inheritDoc\n */\n processEvent(currentEvent) {\n // We want to ignore any non-error type events, e.g. transactions or replays\n // These should never be deduped, and also not be compared against as _previousEvent.\n if (currentEvent.type) {\n return currentEvent;\n }\n\n // Juuust in case something goes wrong\n try {\n if (_shouldDropEvent(currentEvent, this._previousEvent)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Event dropped due to being a duplicate of previously captured event.');\n return null;\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n return (this._previousEvent = currentEvent);\n }\n} Dedupe.__initStatic();\n\n/** JSDoc */\nfunction _shouldDropEvent(currentEvent, previousEvent) {\n if (!previousEvent) {\n return false;\n }\n\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n return false;\n}\n\n/** JSDoc */\nfunction _isSameMessageEvent(currentEvent, previousEvent) {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n\n if (currentMessage !== previousMessage) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameExceptionEvent(currentEvent, previousEvent) {\n const previousException = _getExceptionFromEvent(previousEvent);\n const currentException = _getExceptionFromEvent(currentEvent);\n\n if (!previousException || !currentException) {\n return false;\n }\n\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameStacktrace(currentEvent, previousEvent) {\n let currentFrames = _getFramesFromEvent(currentEvent);\n let previousFrames = _getFramesFromEvent(previousEvent);\n\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n\n currentFrames = currentFrames ;\n previousFrames = previousFrames ;\n\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n\n // Otherwise, compare the two\n for (let i = 0; i < previousFrames.length; i++) {\n const frameA = previousFrames[i];\n const frameB = currentFrames[i];\n\n if (\n frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function\n ) {\n return false;\n }\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameFingerprint(currentEvent, previousEvent) {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n\n currentFingerprint = currentFingerprint ;\n previousFingerprint = previousFingerprint ;\n\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n}\n\n/** JSDoc */\nfunction _getExceptionFromEvent(event) {\n return event.exception && event.exception.values && event.exception.values[0];\n}\n\n/** JSDoc */\nfunction _getFramesFromEvent(event) {\n const exception = event.exception;\n\n if (exception) {\n try {\n // @ts-expect-error Object could be undefined\n return exception.values[0].stacktrace.frames;\n } catch (_oO) {\n return undefined;\n }\n }\n return undefined;\n}\n\nexport { Dedupe };\n//# sourceMappingURL=dedupe.js.map\n","import type { Event, Exception, Integration, StackFrame } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\n/** Deduplication filter */\nexport class Dedupe implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Dedupe';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n /**\n * @inheritDoc\n */\n private _previousEvent?: Event;\n\n public constructor() {\n this.name = Dedupe.id;\n }\n\n /** @inheritDoc */\n public setupOnce(_addGlobaleventProcessor: unknown, _getCurrentHub: unknown): void {\n // noop\n }\n\n /**\n * @inheritDoc\n */\n public processEvent(currentEvent: Event): Event | null {\n // We want to ignore any non-error type events, e.g. transactions or replays\n // These should never be deduped, and also not be compared against as _previousEvent.\n if (currentEvent.type) {\n return currentEvent;\n }\n\n // Juuust in case something goes wrong\n try {\n if (_shouldDropEvent(currentEvent, this._previousEvent)) {\n __DEBUG_BUILD__ && logger.warn('Event dropped due to being a duplicate of previously captured event.');\n return null;\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n return (this._previousEvent = currentEvent);\n }\n}\n\n/** JSDoc */\nfunction _shouldDropEvent(currentEvent: Event, previousEvent?: Event): boolean {\n if (!previousEvent) {\n return false;\n }\n\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n return false;\n}\n\n/** JSDoc */\nfunction _isSameMessageEvent(currentEvent: Event, previousEvent: Event): boolean {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n\n if (currentMessage !== previousMessage) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameExceptionEvent(currentEvent: Event, previousEvent: Event): boolean {\n const previousException = _getExceptionFromEvent(previousEvent);\n const currentException = _getExceptionFromEvent(currentEvent);\n\n if (!previousException || !currentException) {\n return false;\n }\n\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameStacktrace(currentEvent: Event, previousEvent: Event): boolean {\n let currentFrames = _getFramesFromEvent(currentEvent);\n let previousFrames = _getFramesFromEvent(previousEvent);\n\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n\n currentFrames = currentFrames as StackFrame[];\n previousFrames = previousFrames as StackFrame[];\n\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n\n // Otherwise, compare the two\n for (let i = 0; i < previousFrames.length; i++) {\n const frameA = previousFrames[i];\n const frameB = currentFrames[i];\n\n if (\n frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function\n ) {\n return false;\n }\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameFingerprint(currentEvent: Event, previousEvent: Event): boolean {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n\n currentFingerprint = currentFingerprint as string[];\n previousFingerprint = previousFingerprint as string[];\n\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n}\n\n/** JSDoc */\nfunction _getExceptionFromEvent(event: Event): Exception | undefined {\n return event.exception && event.exception.values && event.exception.values[0];\n}\n\n/** JSDoc */\nfunction _getFramesFromEvent(event: Event): StackFrame[] | undefined {\n const exception = event.exception;\n\n if (exception) {\n try {\n // @ts-expect-error Object could be undefined\n return exception.values[0].stacktrace.frames;\n } catch (_oO) {\n return undefined;\n }\n }\n return undefined;\n}\n","import { createStackParser } from '@sentry/utils';\n\n// global reference to slice\nconst UNKNOWN_FUNCTION = '?';\n\nconst OPERA10_PRIORITY = 10;\nconst OPERA11_PRIORITY = 20;\nconst CHROME_PRIORITY = 30;\nconst WINJS_PRIORITY = 40;\nconst GECKO_PRIORITY = 50;\n\nfunction createFrame(filename, func, lineno, colno) {\n const frame = {\n filename,\n function: func,\n in_app: true, // All browser frames are considered in_app\n };\n\n if (lineno !== undefined) {\n frame.lineno = lineno;\n }\n\n if (colno !== undefined) {\n frame.colno = colno;\n }\n\n return frame;\n}\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nconst chromeRegex =\n /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nconst chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\nconst chrome = line => {\n const parts = chromeRegex.exec(line);\n\n if (parts) {\n const isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n\n if (isEval) {\n const subMatch = chromeEvalRegex.exec(parts[2]);\n\n if (subMatch) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = subMatch[1]; // url\n parts[3] = subMatch[2]; // line\n parts[4] = subMatch[3]; // column\n }\n }\n\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n\n return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n }\n\n return;\n};\n\nconst chromeStackLineParser = [CHROME_PRIORITY, chrome];\n\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst geckoREgex =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nconst gecko = line => {\n const parts = geckoREgex.exec(line);\n\n if (parts) {\n const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval) {\n const subMatch = geckoEvalRegex.exec(parts[3]);\n\n if (subMatch) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || 'eval';\n parts[3] = subMatch[1];\n parts[4] = subMatch[2];\n parts[5] = ''; // no column when eval\n }\n }\n\n let filename = parts[3];\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, filename] = extractSafariExtensionDetails(func, filename);\n\n return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n }\n\n return;\n};\n\nconst geckoStackLineParser = [GECKO_PRIORITY, gecko];\n\nconst winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nconst winjs = line => {\n const parts = winjsRegex.exec(line);\n\n return parts\n ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)\n : undefined;\n};\n\nconst winjsStackLineParser = [WINJS_PRIORITY, winjs];\n\nconst opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n\nconst opera10 = line => {\n const parts = opera10Regex.exec(line);\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\n\nconst opera10StackLineParser = [OPERA10_PRIORITY, opera10];\n\nconst opera11Regex =\n / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\n\nconst opera11 = line => {\n const parts = opera11Regex.exec(line);\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\n\nconst opera11StackLineParser = [OPERA11_PRIORITY, opera11];\n\nconst defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser, winjsStackLineParser];\n\nconst defaultStackParser = createStackParser(...defaultStackLineParsers);\n\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nconst extractSafariExtensionDetails = (func, filename) => {\n const isSafariExtension = func.indexOf('safari-extension') !== -1;\n const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION,\n isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`,\n ]\n : [func, filename];\n};\n\nexport { chromeStackLineParser, defaultStackLineParsers, defaultStackParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser };\n//# sourceMappingURL=stack-parsers.js.map\n","// This was originally forked from https://github.com/csnover/TraceKit, and was largely\n// re - written as part of raven - js.\n//\n// This code was later copied to the JavaScript mono - repo and further modified and\n// refactored over the years.\n\n// Copyright (c) 2013 Onur Can Cakmak onur.cakmak@gmail.com and all TraceKit contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of this\n// software and associated documentation files(the 'Software'), to deal in the Software\n// without restriction, including without limitation the rights to use, copy, modify,\n// merge, publish, distribute, sublicense, and / or sell copies of the Software, and to\n// permit persons to whom the Software is furnished to do so, subject to the following\n// conditions:\n//\n// The above copyright notice and this permission notice shall be included in all copies\n// or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE\n// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport type { StackFrame, StackLineParser, StackLineParserFn } from '@sentry/types';\nimport { createStackParser } from '@sentry/utils';\n\n// global reference to slice\nconst UNKNOWN_FUNCTION = '?';\n\nconst OPERA10_PRIORITY = 10;\nconst OPERA11_PRIORITY = 20;\nconst CHROME_PRIORITY = 30;\nconst WINJS_PRIORITY = 40;\nconst GECKO_PRIORITY = 50;\n\nfunction createFrame(filename: string, func: string, lineno?: number, colno?: number): StackFrame {\n const frame: StackFrame = {\n filename,\n function: func,\n in_app: true, // All browser frames are considered in_app\n };\n\n if (lineno !== undefined) {\n frame.lineno = lineno;\n }\n\n if (colno !== undefined) {\n frame.colno = colno;\n }\n\n return frame;\n}\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nconst chromeRegex =\n /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nconst chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\nconst chrome: StackLineParserFn = line => {\n const parts = chromeRegex.exec(line);\n\n if (parts) {\n const isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n\n if (isEval) {\n const subMatch = chromeEvalRegex.exec(parts[2]);\n\n if (subMatch) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = subMatch[1]; // url\n parts[3] = subMatch[2]; // line\n parts[4] = subMatch[3]; // column\n }\n }\n\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n\n return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n }\n\n return;\n};\n\nexport const chromeStackLineParser: StackLineParser = [CHROME_PRIORITY, chrome];\n\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst geckoREgex =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nconst gecko: StackLineParserFn = line => {\n const parts = geckoREgex.exec(line);\n\n if (parts) {\n const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval) {\n const subMatch = geckoEvalRegex.exec(parts[3]);\n\n if (subMatch) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || 'eval';\n parts[3] = subMatch[1];\n parts[4] = subMatch[2];\n parts[5] = ''; // no column when eval\n }\n }\n\n let filename = parts[3];\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, filename] = extractSafariExtensionDetails(func, filename);\n\n return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n }\n\n return;\n};\n\nexport const geckoStackLineParser: StackLineParser = [GECKO_PRIORITY, gecko];\n\nconst winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nconst winjs: StackLineParserFn = line => {\n const parts = winjsRegex.exec(line);\n\n return parts\n ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)\n : undefined;\n};\n\nexport const winjsStackLineParser: StackLineParser = [WINJS_PRIORITY, winjs];\n\nconst opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n\nconst opera10: StackLineParserFn = line => {\n const parts = opera10Regex.exec(line);\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\n\nexport const opera10StackLineParser: StackLineParser = [OPERA10_PRIORITY, opera10];\n\nconst opera11Regex =\n / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\n\nconst opera11: StackLineParserFn = line => {\n const parts = opera11Regex.exec(line);\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\n\nexport const opera11StackLineParser: StackLineParser = [OPERA11_PRIORITY, opera11];\n\nexport const defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser, winjsStackLineParser];\n\nexport const defaultStackParser = createStackParser(...defaultStackLineParsers);\n\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nconst extractSafariExtensionDetails = (func: string, filename: string): [string, string] => {\n const isSafariExtension = func.indexOf('safari-extension') !== -1;\n const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION,\n isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`,\n ]\n : [func, filename];\n};\n","import { createTransport } from '@sentry/core';\nimport { rejectedSyncPromise } from '@sentry/utils';\nimport { getNativeFetchImplementation, clearCachedFetchImplementation } from './utils.js';\n\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nfunction makeFetchTransport(\n options,\n nativeFetch = getNativeFetchImplementation(),\n) {\n let pendingBodySize = 0;\n let pendingCount = 0;\n\n function makeRequest(request) {\n const requestSize = request.body.length;\n pendingBodySize += requestSize;\n pendingCount++;\n\n const requestOptions = {\n body: request.body,\n method: 'POST',\n referrerPolicy: 'origin',\n headers: options.headers,\n // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n // frequently sending events right before the user is switching pages (eg. whenfinishing navigation transactions).\n // Gotchas:\n // - `keepalive` isn't supported by Firefox\n // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):\n // If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.\n // We will therefore only activate the flag when we're below that limit.\n // There is also a limit of requests that can be open at the same time, so we also limit this to 15\n // See https://github.com/getsentry/sentry-javascript/pull/7553 for details\n keepalive: pendingBodySize <= 60000 && pendingCount < 15,\n ...options.fetchOptions,\n };\n\n try {\n return nativeFetch(options.url, requestOptions).then(response => {\n pendingBodySize -= requestSize;\n pendingCount--;\n return {\n statusCode: response.status,\n headers: {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n },\n };\n });\n } catch (e) {\n clearCachedFetchImplementation();\n pendingBodySize -= requestSize;\n pendingCount--;\n return rejectedSyncPromise(e);\n }\n }\n\n return createTransport(options, makeRequest);\n}\n\nexport { makeFetchTransport };\n//# sourceMappingURL=fetch.js.map\n","import { createTransport } from '@sentry/core';\nimport type { Transport, TransportMakeRequestResponse, TransportRequest } from '@sentry/types';\nimport { rejectedSyncPromise } from '@sentry/utils';\n\nimport type { BrowserTransportOptions } from './types';\nimport type { FetchImpl } from './utils';\nimport { clearCachedFetchImplementation, getNativeFetchImplementation } from './utils';\n\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nexport function makeFetchTransport(\n options: BrowserTransportOptions,\n nativeFetch: FetchImpl = getNativeFetchImplementation(),\n): Transport {\n let pendingBodySize = 0;\n let pendingCount = 0;\n\n function makeRequest(request: TransportRequest): PromiseLike {\n const requestSize = request.body.length;\n pendingBodySize += requestSize;\n pendingCount++;\n\n const requestOptions: RequestInit = {\n body: request.body,\n method: 'POST',\n referrerPolicy: 'origin',\n headers: options.headers,\n // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n // frequently sending events right before the user is switching pages (eg. whenfinishing navigation transactions).\n // Gotchas:\n // - `keepalive` isn't supported by Firefox\n // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):\n // If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.\n // We will therefore only activate the flag when we're below that limit.\n // There is also a limit of requests that can be open at the same time, so we also limit this to 15\n // See https://github.com/getsentry/sentry-javascript/pull/7553 for details\n keepalive: pendingBodySize <= 60_000 && pendingCount < 15,\n ...options.fetchOptions,\n };\n\n try {\n return nativeFetch(options.url, requestOptions).then(response => {\n pendingBodySize -= requestSize;\n pendingCount--;\n return {\n statusCode: response.status,\n headers: {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n },\n };\n });\n } catch (e) {\n clearCachedFetchImplementation();\n pendingBodySize -= requestSize;\n pendingCount--;\n return rejectedSyncPromise(e);\n }\n }\n\n return createTransport(options, makeRequest);\n}\n","import { makePromiseBuffer, forEachEnvelopeItem, envelopeItemTypeToDataCategory, isRateLimited, resolvedSyncPromise, createEnvelope, SentryError, logger, serializeEnvelope, updateRateLimits } from '@sentry/utils';\n\nconst DEFAULT_TRANSPORT_BUFFER_SIZE = 30;\n\n/**\n * Creates an instance of a Sentry `Transport`\n *\n * @param options\n * @param makeRequest\n */\nfunction createTransport(\n options,\n makeRequest,\n buffer = makePromiseBuffer(\n options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE,\n ),\n) {\n let rateLimits = {};\n const flush = (timeout) => buffer.drain(timeout);\n\n function send(envelope) {\n const filteredEnvelopeItems = [];\n\n // Drop rate limited items from envelope\n forEachEnvelopeItem(envelope, (item, type) => {\n const envelopeItemDataCategory = envelopeItemTypeToDataCategory(type);\n if (isRateLimited(rateLimits, envelopeItemDataCategory)) {\n const event = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent('ratelimit_backoff', envelopeItemDataCategory, event);\n } else {\n filteredEnvelopeItems.push(item);\n }\n });\n\n // Skip sending if envelope is empty after filtering out rate limited events\n if (filteredEnvelopeItems.length === 0) {\n return resolvedSyncPromise();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const filteredEnvelope = createEnvelope(envelope[0], filteredEnvelopeItems );\n\n // Creates client report for each item in an envelope\n const recordEnvelopeLoss = (reason) => {\n forEachEnvelopeItem(filteredEnvelope, (item, type) => {\n const event = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type), event);\n });\n };\n\n const requestTask = () =>\n makeRequest({ body: serializeEnvelope(filteredEnvelope, options.textEncoder) }).then(\n response => {\n // We don't want to throw on NOK responses, but we want to at least log them\n if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n }\n\n rateLimits = updateRateLimits(rateLimits, response);\n return response;\n },\n error => {\n recordEnvelopeLoss('network_error');\n throw error;\n },\n );\n\n return buffer.add(requestTask).then(\n result => result,\n error => {\n if (error instanceof SentryError) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Skipped sending event because buffer is full.');\n recordEnvelopeLoss('queue_overflow');\n return resolvedSyncPromise();\n } else {\n throw error;\n }\n },\n );\n }\n\n // We use this to identifify if the transport is the base transport\n // TODO (v8): Remove this again as we'll no longer need it\n send.__sentry__baseTransport__ = true;\n\n return {\n send,\n flush,\n };\n}\n\nfunction getEventForEnvelopeItem(item, type) {\n if (type !== 'event' && type !== 'transaction') {\n return undefined;\n }\n\n return Array.isArray(item) ? (item )[1] : undefined;\n}\n\nexport { DEFAULT_TRANSPORT_BUFFER_SIZE, createTransport };\n//# sourceMappingURL=base.js.map\n","import type {\n Envelope,\n EnvelopeItem,\n EnvelopeItemType,\n Event,\n EventDropReason,\n EventItem,\n InternalBaseTransportOptions,\n Transport,\n TransportMakeRequestResponse,\n TransportRequestExecutor,\n} from '@sentry/types';\nimport type { PromiseBuffer, RateLimits } from '@sentry/utils';\nimport {\n createEnvelope,\n envelopeItemTypeToDataCategory,\n forEachEnvelopeItem,\n isRateLimited,\n logger,\n makePromiseBuffer,\n resolvedSyncPromise,\n SentryError,\n serializeEnvelope,\n updateRateLimits,\n} from '@sentry/utils';\n\nexport const DEFAULT_TRANSPORT_BUFFER_SIZE = 30;\n\n/**\n * Creates an instance of a Sentry `Transport`\n *\n * @param options\n * @param makeRequest\n */\nexport function createTransport(\n options: InternalBaseTransportOptions,\n makeRequest: TransportRequestExecutor,\n buffer: PromiseBuffer = makePromiseBuffer(\n options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE,\n ),\n): Transport {\n let rateLimits: RateLimits = {};\n const flush = (timeout?: number): PromiseLike => buffer.drain(timeout);\n\n function send(envelope: Envelope): PromiseLike {\n const filteredEnvelopeItems: EnvelopeItem[] = [];\n\n // Drop rate limited items from envelope\n forEachEnvelopeItem(envelope, (item, type) => {\n const envelopeItemDataCategory = envelopeItemTypeToDataCategory(type);\n if (isRateLimited(rateLimits, envelopeItemDataCategory)) {\n const event: Event | undefined = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent('ratelimit_backoff', envelopeItemDataCategory, event);\n } else {\n filteredEnvelopeItems.push(item);\n }\n });\n\n // Skip sending if envelope is empty after filtering out rate limited events\n if (filteredEnvelopeItems.length === 0) {\n return resolvedSyncPromise();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const filteredEnvelope: Envelope = createEnvelope(envelope[0], filteredEnvelopeItems as any);\n\n // Creates client report for each item in an envelope\n const recordEnvelopeLoss = (reason: EventDropReason): void => {\n forEachEnvelopeItem(filteredEnvelope, (item, type) => {\n const event: Event | undefined = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type), event);\n });\n };\n\n const requestTask = (): PromiseLike =>\n makeRequest({ body: serializeEnvelope(filteredEnvelope, options.textEncoder) }).then(\n response => {\n // We don't want to throw on NOK responses, but we want to at least log them\n if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) {\n __DEBUG_BUILD__ && logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n }\n\n rateLimits = updateRateLimits(rateLimits, response);\n return response;\n },\n error => {\n recordEnvelopeLoss('network_error');\n throw error;\n },\n );\n\n return buffer.add(requestTask).then(\n result => result,\n error => {\n if (error instanceof SentryError) {\n __DEBUG_BUILD__ && logger.error('Skipped sending event because buffer is full.');\n recordEnvelopeLoss('queue_overflow');\n return resolvedSyncPromise();\n } else {\n throw error;\n }\n },\n );\n }\n\n // We use this to identifify if the transport is the base transport\n // TODO (v8): Remove this again as we'll no longer need it\n send.__sentry__baseTransport__ = true;\n\n return {\n send,\n flush,\n };\n}\n\nfunction getEventForEnvelopeItem(item: Envelope[1][number], type: EnvelopeItemType): Event | undefined {\n if (type !== 'event' && type !== 'transaction') {\n return undefined;\n }\n\n return Array.isArray(item) ? (item as EventItem)[1] : undefined;\n}\n","// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend\n\nconst DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param header string representation of 'Retry-After' header\n * @param now current unix timestamp\n *\n */\nfunction parseRetryAfterHeader(header, now = Date.now()) {\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return DEFAULT_RETRY_AFTER;\n}\n\n/**\n * Gets the time that the given category is disabled until for rate limiting.\n * In case no category-specific limit is set but a general rate limit across all categories is active,\n * that time is returned.\n *\n * @return the time in ms that the category is disabled until or 0 if there's no active rate limit.\n */\nfunction disabledUntil(limits, category) {\n return limits[category] || limits.all || 0;\n}\n\n/**\n * Checks if a category is rate limited\n */\nfunction isRateLimited(limits, category, now = Date.now()) {\n return disabledUntil(limits, category) > now;\n}\n\n/**\n * Update ratelimits from incoming headers.\n *\n * @return the updated RateLimits object.\n */\nfunction updateRateLimits(\n limits,\n { statusCode, headers },\n now = Date.now(),\n) {\n const updatedRateLimits = {\n ...limits,\n };\n\n // \"The name is case-insensitive.\"\n // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n const rateLimitHeader = headers && headers['x-sentry-rate-limits'];\n const retryAfterHeader = headers && headers['retry-after'];\n\n if (rateLimitHeader) {\n /**\n * rate limit headers are of the form\n *
,
,..\n * where each
is of the form\n * : : : \n * where\n * is a delay in seconds\n * is the event type(s) (error, transaction, etc) being rate limited and is of the form\n * ;;...\n * is what's being limited (org, project, or key) - ignored by SDK\n * is an arbitrary string like \"org_quota\" - ignored by SDK\n */\n for (const limit of rateLimitHeader.trim().split(',')) {\n const [retryAfter, categories] = limit.split(':', 2);\n const headerDelay = parseInt(retryAfter, 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n if (!categories) {\n updatedRateLimits.all = now + delay;\n } else {\n for (const category of categories.split(';')) {\n updatedRateLimits[category] = now + delay;\n }\n }\n }\n } else if (retryAfterHeader) {\n updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n } else if (statusCode === 429) {\n updatedRateLimits.all = now + 60 * 1000;\n }\n\n return updatedRateLimits;\n}\n\nexport { DEFAULT_RETRY_AFTER, disabledUntil, isRateLimited, parseRetryAfterHeader, updateRateLimits };\n//# sourceMappingURL=ratelimit.js.map\n","import type { TransportMakeRequestResponse } from '@sentry/types';\n\n// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend\nexport type RateLimits = Record;\n\nexport const DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param header string representation of 'Retry-After' header\n * @param now current unix timestamp\n *\n */\nexport function parseRetryAfterHeader(header: string, now: number = Date.now()): number {\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return DEFAULT_RETRY_AFTER;\n}\n\n/**\n * Gets the time that the given category is disabled until for rate limiting.\n * In case no category-specific limit is set but a general rate limit across all categories is active,\n * that time is returned.\n *\n * @return the time in ms that the category is disabled until or 0 if there's no active rate limit.\n */\nexport function disabledUntil(limits: RateLimits, category: string): number {\n return limits[category] || limits.all || 0;\n}\n\n/**\n * Checks if a category is rate limited\n */\nexport function isRateLimited(limits: RateLimits, category: string, now: number = Date.now()): boolean {\n return disabledUntil(limits, category) > now;\n}\n\n/**\n * Update ratelimits from incoming headers.\n *\n * @return the updated RateLimits object.\n */\nexport function updateRateLimits(\n limits: RateLimits,\n { statusCode, headers }: TransportMakeRequestResponse,\n now: number = Date.now(),\n): RateLimits {\n const updatedRateLimits: RateLimits = {\n ...limits,\n };\n\n // \"The name is case-insensitive.\"\n // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n const rateLimitHeader = headers && headers['x-sentry-rate-limits'];\n const retryAfterHeader = headers && headers['retry-after'];\n\n if (rateLimitHeader) {\n /**\n * rate limit headers are of the form\n *
,
,..\n * where each
is of the form\n * : : : \n * where\n * is a delay in seconds\n * is the event type(s) (error, transaction, etc) being rate limited and is of the form\n * ;;...\n * is what's being limited (org, project, or key) - ignored by SDK\n * is an arbitrary string like \"org_quota\" - ignored by SDK\n */\n for (const limit of rateLimitHeader.trim().split(',')) {\n const [retryAfter, categories] = limit.split(':', 2);\n const headerDelay = parseInt(retryAfter, 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n if (!categories) {\n updatedRateLimits.all = now + delay;\n } else {\n for (const category of categories.split(';')) {\n updatedRateLimits[category] = now + delay;\n }\n }\n }\n } else if (retryAfterHeader) {\n updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n } else if (statusCode === 429) {\n updatedRateLimits.all = now + 60 * 1000;\n }\n\n return updatedRateLimits;\n}\n","import { SentryError } from './error.js';\nimport { rejectedSyncPromise, SyncPromise, resolvedSyncPromise } from './syncpromise.js';\n\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nfunction makePromiseBuffer(limit) {\n const buffer = [];\n\n function isReady() {\n return limit === undefined || buffer.length < limit;\n }\n\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n function remove(task) {\n return buffer.splice(buffer.indexOf(task), 1)[0];\n }\n\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task:\n * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n function add(taskProducer) {\n if (!isReady()) {\n return rejectedSyncPromise(new SentryError('Not adding Promise because buffer limit was reached.'));\n }\n\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n void task\n .then(() => remove(task))\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, () =>\n remove(task).then(null, () => {\n // We have to add another catch here because `remove()` starts a new promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n function drain(timeout) {\n return new SyncPromise((resolve, reject) => {\n let counter = buffer.length;\n\n if (!counter) {\n return resolve(true);\n }\n\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach(item => {\n void resolvedSyncPromise(item).then(() => {\n if (!--counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n\n return {\n $: buffer,\n add,\n drain,\n };\n}\n\nexport { makePromiseBuffer };\n//# sourceMappingURL=promisebuffer.js.map\n","import { SentryError } from './error';\nimport { rejectedSyncPromise, resolvedSyncPromise, SyncPromise } from './syncpromise';\n\nexport interface PromiseBuffer {\n // exposes the internal array so tests can assert on the state of it.\n // XXX: this really should not be public api.\n $: Array>;\n add(taskProducer: () => PromiseLike): PromiseLike;\n drain(timeout?: number): PromiseLike;\n}\n\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nexport function makePromiseBuffer(limit?: number): PromiseBuffer {\n const buffer: Array> = [];\n\n function isReady(): boolean {\n return limit === undefined || buffer.length < limit;\n }\n\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n function remove(task: PromiseLike): PromiseLike {\n return buffer.splice(buffer.indexOf(task), 1)[0];\n }\n\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task:\n * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n function add(taskProducer: () => PromiseLike): PromiseLike {\n if (!isReady()) {\n return rejectedSyncPromise(new SentryError('Not adding Promise because buffer limit was reached.'));\n }\n\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n void task\n .then(() => remove(task))\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, () =>\n remove(task).then(null, () => {\n // We have to add another catch here because `remove()` starts a new promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n function drain(timeout?: number): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let counter = buffer.length;\n\n if (!counter) {\n return resolve(true);\n }\n\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach(item => {\n void resolvedSyncPromise(item).then(() => {\n if (!--counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n\n return {\n $: buffer,\n add,\n drain,\n };\n}\n","import { isNativeFetch, logger } from '@sentry/utils';\nimport { WINDOW } from '../helpers.js';\n\nlet cachedFetchImpl = undefined;\n\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nfunction getNativeFetchImplementation() {\n if (cachedFetchImpl) {\n return cachedFetchImpl;\n }\n\n /* eslint-disable @typescript-eslint/unbound-method */\n\n // Fast path to avoid DOM I/O\n if (isNativeFetch(WINDOW.fetch)) {\n return (cachedFetchImpl = WINDOW.fetch.bind(WINDOW));\n }\n\n const document = WINDOW.document;\n let fetchImpl = WINDOW.fetch;\n // eslint-disable-next-line deprecation/deprecation\n if (document && typeof document.createElement === 'function') {\n try {\n const sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow.fetch) {\n fetchImpl = contentWindow.fetch;\n }\n document.head.removeChild(sandbox);\n } catch (e) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);\n }\n }\n\n return (cachedFetchImpl = fetchImpl.bind(WINDOW));\n /* eslint-enable @typescript-eslint/unbound-method */\n}\n\n/** Clears cached fetch impl */\nfunction clearCachedFetchImplementation() {\n cachedFetchImpl = undefined;\n}\n\nexport { clearCachedFetchImplementation, getNativeFetchImplementation };\n//# sourceMappingURL=utils.js.map\n","import { isNativeFetch, logger } from '@sentry/utils';\n\nimport { WINDOW } from '../helpers';\n\nlet cachedFetchImpl: FetchImpl | undefined = undefined;\n\nexport type FetchImpl = typeof fetch;\n\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nexport function getNativeFetchImplementation(): FetchImpl {\n if (cachedFetchImpl) {\n return cachedFetchImpl;\n }\n\n /* eslint-disable @typescript-eslint/unbound-method */\n\n // Fast path to avoid DOM I/O\n if (isNativeFetch(WINDOW.fetch)) {\n return (cachedFetchImpl = WINDOW.fetch.bind(WINDOW));\n }\n\n const document = WINDOW.document;\n let fetchImpl = WINDOW.fetch;\n // eslint-disable-next-line deprecation/deprecation\n if (document && typeof document.createElement === 'function') {\n try {\n const sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow.fetch) {\n fetchImpl = contentWindow.fetch;\n }\n document.head.removeChild(sandbox);\n } catch (e) {\n __DEBUG_BUILD__ &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);\n }\n }\n\n return (cachedFetchImpl = fetchImpl.bind(WINDOW));\n /* eslint-enable @typescript-eslint/unbound-method */\n}\n\n/** Clears cached fetch impl */\nexport function clearCachedFetchImplementation(): void {\n cachedFetchImpl = undefined;\n}\n","import { createTransport } from '@sentry/core';\nimport { SyncPromise } from '@sentry/utils';\n\n/**\n * The DONE ready state for XmlHttpRequest\n *\n * Defining it here as a constant b/c XMLHttpRequest.DONE is not always defined\n * (e.g. during testing, it is `undefined`)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState}\n */\nconst XHR_READYSTATE_DONE = 4;\n\n/**\n * Creates a Transport that uses the XMLHttpRequest API to send events to Sentry.\n */\nfunction makeXHRTransport(options) {\n function makeRequest(request) {\n return new SyncPromise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n\n xhr.onerror = reject;\n\n xhr.onreadystatechange = () => {\n if (xhr.readyState === XHR_READYSTATE_DONE) {\n resolve({\n statusCode: xhr.status,\n headers: {\n 'x-sentry-rate-limits': xhr.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': xhr.getResponseHeader('Retry-After'),\n },\n });\n }\n };\n\n xhr.open('POST', options.url);\n\n for (const header in options.headers) {\n if (Object.prototype.hasOwnProperty.call(options.headers, header)) {\n xhr.setRequestHeader(header, options.headers[header]);\n }\n }\n\n xhr.send(request.body);\n });\n }\n\n return createTransport(options, makeRequest);\n}\n\nexport { makeXHRTransport };\n//# sourceMappingURL=xhr.js.map\n","import { createTransport } from '@sentry/core';\nimport type { Transport, TransportMakeRequestResponse, TransportRequest } from '@sentry/types';\nimport { SyncPromise } from '@sentry/utils';\n\nimport type { BrowserTransportOptions } from './types';\n\n/**\n * The DONE ready state for XmlHttpRequest\n *\n * Defining it here as a constant b/c XMLHttpRequest.DONE is not always defined\n * (e.g. during testing, it is `undefined`)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState}\n */\nconst XHR_READYSTATE_DONE = 4;\n\n/**\n * Creates a Transport that uses the XMLHttpRequest API to send events to Sentry.\n */\nexport function makeXHRTransport(options: BrowserTransportOptions): Transport {\n function makeRequest(request: TransportRequest): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n\n xhr.onerror = reject;\n\n xhr.onreadystatechange = (): void => {\n if (xhr.readyState === XHR_READYSTATE_DONE) {\n resolve({\n statusCode: xhr.status,\n headers: {\n 'x-sentry-rate-limits': xhr.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': xhr.getResponseHeader('Retry-After'),\n },\n });\n }\n };\n\n xhr.open('POST', options.url);\n\n for (const header in options.headers) {\n if (Object.prototype.hasOwnProperty.call(options.headers, header)) {\n xhr.setRequestHeader(header, options.headers[header]);\n }\n }\n\n xhr.send(request.body);\n });\n }\n\n return createTransport(options, makeRequest);\n}\n","import { addExtensionMethods as addExtensionMethods$1, BrowserTracing as BrowserTracing$1, getActiveTransaction as getActiveTransaction$1, extractTraceparentData as extractTraceparentData$1, spanStatusfromHttpCode as spanStatusfromHttpCode$1, Transaction as Transaction$1, Span as Span$1, BROWSER_TRACING_INTEGRATION_ID as BROWSER_TRACING_INTEGRATION_ID$1, defaultRequestInstrumentationOptions as defaultRequestInstrumentationOptions$1, hasTracingEnabled as hasTracingEnabled$1, stripUrlQueryAndFragment as stripUrlQueryAndFragment$1, TRACEPARENT_REGEXP as TRACEPARENT_REGEXP$1, IdleTransaction as IdleTransaction$1, instrumentOutgoingRequests as instrumentOutgoingRequests$1, startIdleTransaction as startIdleTransaction$1, SpanStatus as SpanStatus$1, Apollo, Express, GraphQL, Mongo, Mysql, Postgres, Prisma } from '@sentry-internal/tracing';\n\n// BrowserTracing is already exported as part of `Integrations` below (and for the moment will remain so for\n// backwards compatibility), but that interferes with treeshaking, so we also export it separately\n// here.\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `BrowserTracing` can be imported from `@sentry/browser` or your framework SDK\n *\n * import { BrowserTracing } from '@sentry/browser';\n * new BrowserTracing()\n */\nconst BrowserTracing = BrowserTracing$1;\n\n// BrowserTracing is already exported as part of `Integrations` below (and for the moment will remain so for\n// backwards compatibility), but that interferes with treeshaking, so we also export it separately\n// here.\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `BrowserTracing` can be imported from `@sentry/browser` or your framework SDK\n *\n * import { BrowserTracing } from '@sentry/browser';\n * new BrowserTracing()\n */\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */\nconst addExtensionMethods = addExtensionMethods$1;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `getActiveTransaction` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */\nconst getActiveTransaction = getActiveTransaction$1;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `extractTraceparentData` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */\nconst extractTraceparentData = extractTraceparentData$1;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `spanStatusfromHttpCode` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */\nconst spanStatusfromHttpCode = spanStatusfromHttpCode$1;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `SpanStatusType` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `Transaction` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */\nconst Transaction = Transaction$1;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `Transaction` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `Span` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */\nconst Span = Span$1;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `Span` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */\nconst BROWSER_TRACING_INTEGRATION_ID = BROWSER_TRACING_INTEGRATION_ID$1;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `defaultRequestInstrumentationOptions` can be imported from `@sentry/browser`, or your framework SDK\n */\nconst defaultRequestInstrumentationOptions = defaultRequestInstrumentationOptions$1;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `hasTracingEnabled` can be imported from `@sentry/utils`\n */\nconst hasTracingEnabled = hasTracingEnabled$1;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `stripUrlQueryAndFragment` can be imported from `@sentry/utils`\n */\nconst stripUrlQueryAndFragment = stripUrlQueryAndFragment$1;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `TRACEPARENT_REGEXP` can be imported from `@sentry/utils`\n */\nconst TRACEPARENT_REGEXP = TRACEPARENT_REGEXP$1;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */\nconst IdleTransaction = IdleTransaction$1;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */\nconst instrumentOutgoingRequests = instrumentOutgoingRequests$1;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */\nconst startIdleTransaction = startIdleTransaction$1;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst SpanStatus = SpanStatus$1;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */\n// eslint-disable-next-line deprecation/deprecation\n\nconst Integrations = {\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `BrowserTracing` can be imported from `@sentry/browser` or your framework SDK\n *\n * import { BrowserTracing } from '@sentry/browser';\n * new BrowserTracing()\n */\n // eslint-disable-next-line deprecation/deprecation\n BrowserTracing: BrowserTracing,\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `Apollo` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.Apollo({ ... })\n */\n // eslint-disable-next-line deprecation/deprecation\n Apollo: Apollo,\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `Express` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.Express({ ... })\n */\n // eslint-disable-next-line deprecation/deprecation\n Express: Express,\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `GraphQL` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.GraphQL({ ... })\n */\n // eslint-disable-next-line deprecation/deprecation\n GraphQL: GraphQL,\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `Mongo` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.Mongo({ ... })\n */\n // eslint-disable-next-line deprecation/deprecation\n Mongo: Mongo,\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `Mysql` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.Mysql({ ... })\n */\n // eslint-disable-next-line deprecation/deprecation\n Mysql: Mysql,\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `Postgres` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.Postgres({ ... })\n */\n // eslint-disable-next-line deprecation/deprecation\n Postgres: Postgres,\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `Prisma` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.Prisma({ ... })\n */\n // eslint-disable-next-line deprecation/deprecation\n Prisma: Prisma,\n};\n\n// Treeshakable guard to remove all code related to tracing\n\n// Guard for tree\nif (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {\n // We are patching the global object with our hub extension methods\n addExtensionMethods$1();\n}\n\nexport { BROWSER_TRACING_INTEGRATION_ID, BrowserTracing, IdleTransaction, Integrations, Span, SpanStatus, TRACEPARENT_REGEXP, Transaction, addExtensionMethods, defaultRequestInstrumentationOptions, extractTraceparentData, getActiveTransaction, hasTracingEnabled, instrumentOutgoingRequests, spanStatusfromHttpCode, startIdleTransaction, stripUrlQueryAndFragment };\n//# sourceMappingURL=index.js.map\n","import type {\n RequestInstrumentationOptions as RequestInstrumentationOptionsT,\n SpanStatusType as SpanStatusTypeT,\n} from '@sentry-internal/tracing';\nimport {\n addExtensionMethods as addExtensionMethodsT,\n Apollo,\n BROWSER_TRACING_INTEGRATION_ID as BROWSER_TRACING_INTEGRATION_ID_T,\n BrowserTracing as BrowserTracingT,\n defaultRequestInstrumentationOptions as defaultRequestInstrumentationOptionsT,\n Express,\n extractTraceparentData as extractTraceparentDataT,\n getActiveTransaction as getActiveTransactionT,\n GraphQL,\n hasTracingEnabled as hasTracingEnabledT,\n IdleTransaction as IdleTransactionT,\n instrumentOutgoingRequests as instrumentOutgoingRequestsT,\n Mongo,\n Mysql,\n Postgres,\n Prisma,\n Span as SpanT,\n // eslint-disable-next-line deprecation/deprecation\n SpanStatus as SpanStatusT,\n spanStatusfromHttpCode as spanStatusfromHttpCodeT,\n startIdleTransaction as startIdleTransactionT,\n stripUrlQueryAndFragment as stripUrlQueryAndFragmentT,\n TRACEPARENT_REGEXP as TRACEPARENT_REGEXP_T,\n Transaction as TransactionT,\n} from '@sentry-internal/tracing';\n\n// BrowserTracing is already exported as part of `Integrations` below (and for the moment will remain so for\n// backwards compatibility), but that interferes with treeshaking, so we also export it separately\n// here.\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `BrowserTracing` can be imported from `@sentry/browser` or your framework SDK\n *\n * import { BrowserTracing } from '@sentry/browser';\n * new BrowserTracing()\n */\nexport const BrowserTracing = BrowserTracingT;\n\n// BrowserTracing is already exported as part of `Integrations` below (and for the moment will remain so for\n// backwards compatibility), but that interferes with treeshaking, so we also export it separately\n// here.\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `BrowserTracing` can be imported from `@sentry/browser` or your framework SDK\n *\n * import { BrowserTracing } from '@sentry/browser';\n * new BrowserTracing()\n */\nexport type BrowserTracing = BrowserTracingT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */\nexport const addExtensionMethods = addExtensionMethodsT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `getActiveTransaction` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */\nexport const getActiveTransaction = getActiveTransactionT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `extractTraceparentData` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */\nexport const extractTraceparentData = extractTraceparentDataT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `spanStatusfromHttpCode` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */\nexport const spanStatusfromHttpCode = spanStatusfromHttpCodeT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `SpanStatusType` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */\nexport type SpanStatusType = SpanStatusTypeT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `Transaction` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */\nexport const Transaction = TransactionT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `Transaction` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */\nexport type Transaction = TransactionT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `Span` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */\nexport const Span = SpanT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `Span` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK\n */\nexport type Span = SpanT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */\nexport const BROWSER_TRACING_INTEGRATION_ID = BROWSER_TRACING_INTEGRATION_ID_T;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `defaultRequestInstrumentationOptions` can be imported from `@sentry/browser`, or your framework SDK\n */\nexport const defaultRequestInstrumentationOptions = defaultRequestInstrumentationOptionsT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `hasTracingEnabled` can be imported from `@sentry/utils`\n */\nexport const hasTracingEnabled = hasTracingEnabledT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `stripUrlQueryAndFragment` can be imported from `@sentry/utils`\n */\nexport const stripUrlQueryAndFragment = stripUrlQueryAndFragmentT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n *\n * `TRACEPARENT_REGEXP` can be imported from `@sentry/utils`\n */\nexport const TRACEPARENT_REGEXP = TRACEPARENT_REGEXP_T;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */\nexport const IdleTransaction = IdleTransactionT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */\nexport type IdleTransaction = IdleTransactionT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */\nexport const instrumentOutgoingRequests = instrumentOutgoingRequestsT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */\nexport const startIdleTransaction = startIdleTransactionT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport const SpanStatus = SpanStatusT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport type SpanStatus = SpanStatusT;\n\n/**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n */\nexport type RequestInstrumentationOptions = RequestInstrumentationOptionsT;\n\nexport const Integrations = {\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `BrowserTracing` can be imported from `@sentry/browser` or your framework SDK\n *\n * import { BrowserTracing } from '@sentry/browser';\n * new BrowserTracing()\n */\n // eslint-disable-next-line deprecation/deprecation\n BrowserTracing: BrowserTracing,\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `Apollo` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.Apollo({ ... })\n */\n // eslint-disable-next-line deprecation/deprecation\n Apollo: Apollo,\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `Express` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.Express({ ... })\n */\n // eslint-disable-next-line deprecation/deprecation\n Express: Express,\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `GraphQL` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.GraphQL({ ... })\n */\n // eslint-disable-next-line deprecation/deprecation\n GraphQL: GraphQL,\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `Mongo` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.Mongo({ ... })\n */\n // eslint-disable-next-line deprecation/deprecation\n Mongo: Mongo,\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `Mysql` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.Mysql({ ... })\n */\n // eslint-disable-next-line deprecation/deprecation\n Mysql: Mysql,\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `Postgres` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.Postgres({ ... })\n */\n // eslint-disable-next-line deprecation/deprecation\n Postgres: Postgres,\n /**\n * @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.\n * `Prisma` can be imported from `@sentry/node`\n *\n * import { Integrations } from '@sentry/node';\n * new Integrations.Prisma({ ... })\n */\n // eslint-disable-next-line deprecation/deprecation\n Prisma: Prisma,\n};\n\n// Treeshakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean;\n\n// Guard for tree\nif (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {\n // We are patching the global object with our hub extension methods\n addExtensionMethodsT();\n}\n","import { addTracingExtensions, getMainCarrier } from '@sentry/core';\nimport { isNodeEnv, loadModule, dynamicRequire } from '@sentry/utils';\n\n/**\n * @private\n */\nfunction _autoloadDatabaseIntegrations() {\n const carrier = getMainCarrier();\n if (!carrier.__SENTRY__) {\n return;\n }\n\n const packageToIntegrationMapping = {\n mongodb() {\n const integration = dynamicRequire(module, './node/integrations/mongo')\n\n;\n return new integration.Mongo();\n },\n mongoose() {\n const integration = dynamicRequire(module, './node/integrations/mongo')\n\n;\n return new integration.Mongo();\n },\n mysql() {\n const integration = dynamicRequire(module, './node/integrations/mysql')\n\n;\n return new integration.Mysql();\n },\n pg() {\n const integration = dynamicRequire(module, './node/integrations/postgres')\n\n;\n return new integration.Postgres();\n },\n };\n\n const mappedPackages = Object.keys(packageToIntegrationMapping)\n .filter(moduleName => !!loadModule(moduleName))\n .map(pkg => {\n try {\n return packageToIntegrationMapping[pkg]();\n } catch (e) {\n return undefined;\n }\n })\n .filter(p => p) ;\n\n if (mappedPackages.length > 0) {\n carrier.__SENTRY__.integrations = [...(carrier.__SENTRY__.integrations || []), ...mappedPackages];\n }\n}\n\n/**\n * This patches the global object and injects the Tracing extensions methods\n */\nfunction addExtensionMethods() {\n addTracingExtensions();\n\n // Detect and automatically load specified integrations.\n if (isNodeEnv()) {\n _autoloadDatabaseIntegrations();\n }\n}\n\nexport { addExtensionMethods };\n//# sourceMappingURL=extensions.js.map\n","import { addTracingExtensions, getMainCarrier } from '@sentry/core';\nimport type { Integration, IntegrationClass } from '@sentry/types';\nimport { dynamicRequire, isNodeEnv, loadModule } from '@sentry/utils';\n\n/**\n * @private\n */\nfunction _autoloadDatabaseIntegrations(): void {\n const carrier = getMainCarrier();\n if (!carrier.__SENTRY__) {\n return;\n }\n\n const packageToIntegrationMapping: Record Integration> = {\n mongodb() {\n const integration = dynamicRequire(module, './node/integrations/mongo') as {\n Mongo: IntegrationClass;\n };\n return new integration.Mongo();\n },\n mongoose() {\n const integration = dynamicRequire(module, './node/integrations/mongo') as {\n Mongo: IntegrationClass;\n };\n return new integration.Mongo();\n },\n mysql() {\n const integration = dynamicRequire(module, './node/integrations/mysql') as {\n Mysql: IntegrationClass;\n };\n return new integration.Mysql();\n },\n pg() {\n const integration = dynamicRequire(module, './node/integrations/postgres') as {\n Postgres: IntegrationClass;\n };\n return new integration.Postgres();\n },\n };\n\n const mappedPackages = Object.keys(packageToIntegrationMapping)\n .filter(moduleName => !!loadModule(moduleName))\n .map(pkg => {\n try {\n return packageToIntegrationMapping[pkg]();\n } catch (e) {\n return undefined;\n }\n })\n .filter(p => p) as Integration[];\n\n if (mappedPackages.length > 0) {\n carrier.__SENTRY__.integrations = [...(carrier.__SENTRY__.integrations || []), ...mappedPackages];\n }\n}\n\n/**\n * This patches the global object and injects the Tracing extensions methods\n */\nexport function addExtensionMethods(): void {\n addTracingExtensions();\n\n // Detect and automatically load specified integrations.\n if (isNodeEnv()) {\n _autoloadDatabaseIntegrations();\n }\n}\n","import { logger } from '@sentry/utils';\nimport { getMainCarrier } from '../hub.js';\nimport { registerErrorInstrumentation } from './errors.js';\nimport { IdleTransaction } from './idletransaction.js';\nimport { sampleTransaction } from './sampling.js';\nimport { Transaction } from './transaction.js';\n\n/** Returns all trace headers that are currently on the top scope. */\nfunction traceHeaders() {\n const scope = this.getScope();\n const span = scope.getSpan();\n\n return span\n ? {\n 'sentry-trace': span.toTraceparent(),\n }\n : {};\n}\n\n/**\n * Creates a new transaction and adds a sampling decision if it doesn't yet have one.\n *\n * The Hub.startTransaction method delegates to this method to do its work, passing the Hub instance in as `this`, as if\n * it had been called on the hub directly. Exists as a separate function so that it can be injected into the class as an\n * \"extension method.\"\n *\n * @param this: The Hub starting the transaction\n * @param transactionContext: Data used to configure the transaction\n * @param CustomSamplingContext: Optional data to be provided to the `tracesSampler` function (if any)\n *\n * @returns The new transaction\n *\n * @see {@link Hub.startTransaction}\n */\nfunction _startTransaction(\n\n transactionContext,\n customSamplingContext,\n) {\n const client = this.getClient();\n const options = (client && client.getOptions()) || {};\n\n const configInstrumenter = options.instrumenter || 'sentry';\n const transactionInstrumenter = transactionContext.instrumenter || 'sentry';\n\n if (configInstrumenter !== transactionInstrumenter) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.error(\n `A transaction was started with instrumenter=\\`${transactionInstrumenter}\\`, but the SDK is configured with the \\`${configInstrumenter}\\` instrumenter.\nThe transaction will not be sampled. Please use the ${configInstrumenter} instrumentation to start transactions.`,\n );\n\n transactionContext.sampled = false;\n }\n\n let transaction = new Transaction(transactionContext, this);\n transaction = sampleTransaction(transaction, options, {\n parentSampled: transactionContext.parentSampled,\n transactionContext,\n ...customSamplingContext,\n });\n if (transaction.sampled) {\n transaction.initSpanRecorder(options._experiments && (options._experiments.maxSpans ));\n }\n if (client && client.emit) {\n client.emit('startTransaction', transaction);\n }\n return transaction;\n}\n\n/**\n * Create new idle transaction.\n */\nfunction startIdleTransaction(\n hub,\n transactionContext,\n idleTimeout,\n finalTimeout,\n onScope,\n customSamplingContext,\n heartbeatInterval,\n) {\n const client = hub.getClient();\n const options = (client && client.getOptions()) || {};\n\n let transaction = new IdleTransaction(transactionContext, hub, idleTimeout, finalTimeout, heartbeatInterval, onScope);\n transaction = sampleTransaction(transaction, options, {\n parentSampled: transactionContext.parentSampled,\n transactionContext,\n ...customSamplingContext,\n });\n if (transaction.sampled) {\n transaction.initSpanRecorder(options._experiments && (options._experiments.maxSpans ));\n }\n if (client && client.emit) {\n client.emit('startTransaction', transaction);\n }\n return transaction;\n}\n\n/**\n * Adds tracing extensions to the global hub.\n */\nfunction addTracingExtensions() {\n const carrier = getMainCarrier();\n if (!carrier.__SENTRY__) {\n return;\n }\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n if (!carrier.__SENTRY__.extensions.startTransaction) {\n carrier.__SENTRY__.extensions.startTransaction = _startTransaction;\n }\n if (!carrier.__SENTRY__.extensions.traceHeaders) {\n carrier.__SENTRY__.extensions.traceHeaders = traceHeaders;\n }\n\n registerErrorInstrumentation();\n}\n\nexport { addTracingExtensions, startIdleTransaction };\n//# sourceMappingURL=hubextensions.js.map\n","import type { ClientOptions, CustomSamplingContext, TransactionContext } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport type { Hub } from '../hub';\nimport { getMainCarrier } from '../hub';\nimport { registerErrorInstrumentation } from './errors';\nimport { IdleTransaction } from './idletransaction';\nimport { sampleTransaction } from './sampling';\nimport { Transaction } from './transaction';\n\n/** Returns all trace headers that are currently on the top scope. */\nfunction traceHeaders(this: Hub): { [key: string]: string } {\n const scope = this.getScope();\n const span = scope.getSpan();\n\n return span\n ? {\n 'sentry-trace': span.toTraceparent(),\n }\n : {};\n}\n\n/**\n * Creates a new transaction and adds a sampling decision if it doesn't yet have one.\n *\n * The Hub.startTransaction method delegates to this method to do its work, passing the Hub instance in as `this`, as if\n * it had been called on the hub directly. Exists as a separate function so that it can be injected into the class as an\n * \"extension method.\"\n *\n * @param this: The Hub starting the transaction\n * @param transactionContext: Data used to configure the transaction\n * @param CustomSamplingContext: Optional data to be provided to the `tracesSampler` function (if any)\n *\n * @returns The new transaction\n *\n * @see {@link Hub.startTransaction}\n */\nfunction _startTransaction(\n this: Hub,\n transactionContext: TransactionContext,\n customSamplingContext?: CustomSamplingContext,\n): Transaction {\n const client = this.getClient();\n const options: Partial = (client && client.getOptions()) || {};\n\n const configInstrumenter = options.instrumenter || 'sentry';\n const transactionInstrumenter = transactionContext.instrumenter || 'sentry';\n\n if (configInstrumenter !== transactionInstrumenter) {\n __DEBUG_BUILD__ &&\n logger.error(\n `A transaction was started with instrumenter=\\`${transactionInstrumenter}\\`, but the SDK is configured with the \\`${configInstrumenter}\\` instrumenter.\nThe transaction will not be sampled. Please use the ${configInstrumenter} instrumentation to start transactions.`,\n );\n\n transactionContext.sampled = false;\n }\n\n let transaction = new Transaction(transactionContext, this);\n transaction = sampleTransaction(transaction, options, {\n parentSampled: transactionContext.parentSampled,\n transactionContext,\n ...customSamplingContext,\n });\n if (transaction.sampled) {\n transaction.initSpanRecorder(options._experiments && (options._experiments.maxSpans as number));\n }\n if (client && client.emit) {\n client.emit('startTransaction', transaction);\n }\n return transaction;\n}\n\n/**\n * Create new idle transaction.\n */\nexport function startIdleTransaction(\n hub: Hub,\n transactionContext: TransactionContext,\n idleTimeout: number,\n finalTimeout: number,\n onScope?: boolean,\n customSamplingContext?: CustomSamplingContext,\n heartbeatInterval?: number,\n): IdleTransaction {\n const client = hub.getClient();\n const options: Partial = (client && client.getOptions()) || {};\n\n let transaction = new IdleTransaction(transactionContext, hub, idleTimeout, finalTimeout, heartbeatInterval, onScope);\n transaction = sampleTransaction(transaction, options, {\n parentSampled: transactionContext.parentSampled,\n transactionContext,\n ...customSamplingContext,\n });\n if (transaction.sampled) {\n transaction.initSpanRecorder(options._experiments && (options._experiments.maxSpans as number));\n }\n if (client && client.emit) {\n client.emit('startTransaction', transaction);\n }\n return transaction;\n}\n\n/**\n * Adds tracing extensions to the global hub.\n */\nexport function addTracingExtensions(): void {\n const carrier = getMainCarrier();\n if (!carrier.__SENTRY__) {\n return;\n }\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n if (!carrier.__SENTRY__.extensions.startTransaction) {\n carrier.__SENTRY__.extensions.startTransaction = _startTransaction;\n }\n if (!carrier.__SENTRY__.extensions.traceHeaders) {\n carrier.__SENTRY__.extensions.traceHeaders = traceHeaders;\n }\n\n registerErrorInstrumentation();\n}\n","import { addInstrumentationHandler, logger } from '@sentry/utils';\nimport { getActiveTransaction } from './utils.js';\n\nlet errorsInstrumented = false;\n\n/**\n * Configures global error listeners\n */\nfunction registerErrorInstrumentation() {\n if (errorsInstrumented) {\n return;\n }\n\n errorsInstrumented = true;\n addInstrumentationHandler('error', errorCallback);\n addInstrumentationHandler('unhandledrejection', errorCallback);\n}\n\n/**\n * If an error or unhandled promise occurs, we mark the active transaction as failed\n */\nfunction errorCallback() {\n const activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n const status = 'internal_error';\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] Transaction: ${status} -> Global error occured`);\n activeTransaction.setStatus(status);\n }\n}\n\n// The function name will be lost when bundling but we need to be able to identify this listener later to maintain the\n// node.js default exit behaviour\nerrorCallback.tag = 'sentry_tracingErrorCallback';\n\nexport { registerErrorInstrumentation };\n//# sourceMappingURL=errors.js.map\n","import { addInstrumentationHandler, logger } from '@sentry/utils';\n\nimport type { SpanStatusType } from './span';\nimport { getActiveTransaction } from './utils';\n\nlet errorsInstrumented = false;\n\n/**\n * Configures global error listeners\n */\nexport function registerErrorInstrumentation(): void {\n if (errorsInstrumented) {\n return;\n }\n\n errorsInstrumented = true;\n addInstrumentationHandler('error', errorCallback);\n addInstrumentationHandler('unhandledrejection', errorCallback);\n}\n\n/**\n * If an error or unhandled promise occurs, we mark the active transaction as failed\n */\nfunction errorCallback(): void {\n const activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n const status: SpanStatusType = 'internal_error';\n __DEBUG_BUILD__ && logger.log(`[Tracing] Transaction: ${status} -> Global error occured`);\n activeTransaction.setStatus(status);\n }\n}\n\n// The function name will be lost when bundling but we need to be able to identify this listener later to maintain the\n// node.js default exit behaviour\nerrorCallback.tag = 'sentry_tracingErrorCallback';\n","import { getCurrentHub } from '../hub.js';\nexport { TRACEPARENT_REGEXP, extractTraceparentData, stripUrlQueryAndFragment } from '@sentry/utils';\n\n/** Grabs active transaction off scope, if any */\nfunction getActiveTransaction(maybeHub) {\n const hub = maybeHub || getCurrentHub();\n const scope = hub.getScope();\n return scope.getTransaction() ;\n}\n\nexport { getActiveTransaction };\n//# sourceMappingURL=utils.js.map\n","import type { Transaction } from '@sentry/types';\n\nimport type { Hub } from '../hub';\nimport { getCurrentHub } from '../hub';\n\n/**\n * The `extractTraceparentData` function and `TRACEPARENT_REGEXP` constant used\n * to be declared in this file. It was later moved into `@sentry/utils` as part of a\n * move to remove `@sentry/tracing` dependencies from `@sentry/node` (`extractTraceparentData`\n * is the only tracing function used by `@sentry/node`).\n *\n * These exports are kept here for backwards compatability's sake.\n *\n * TODO(v7): Reorganize these exports\n *\n * See https://github.com/getsentry/sentry-javascript/issues/4642 for more details.\n */\nexport { TRACEPARENT_REGEXP, extractTraceparentData } from '@sentry/utils';\n\n/** Grabs active transaction off scope, if any */\nexport function getActiveTransaction(maybeHub?: Hub): T | undefined {\n const hub = maybeHub || getCurrentHub();\n const scope = hub.getScope();\n return scope.getTransaction() as T | undefined;\n}\n\n// so it can be used in manual instrumentation without necessitating a hard dependency on @sentry/utils\nexport { stripUrlQueryAndFragment } from '@sentry/utils';\n","import { logger, timestampInSeconds } from '@sentry/utils';\nimport { SpanRecorder } from './span.js';\nimport { Transaction } from './transaction.js';\n\nconst TRACING_DEFAULTS = {\n idleTimeout: 1000,\n finalTimeout: 30000,\n heartbeatInterval: 5000,\n};\n\nconst FINISH_REASON_TAG = 'finishReason';\n\nconst IDLE_TRANSACTION_FINISH_REASONS = [\n 'heartbeatFailed',\n 'idleTimeout',\n 'documentHidden',\n 'finalTimeout',\n 'externalFinish',\n 'cancelled',\n];\n\n/**\n * @inheritDoc\n */\nclass IdleTransactionSpanRecorder extends SpanRecorder {\n constructor(\n _pushActivity,\n _popActivity,\n transactionSpanId,\n maxlen,\n ) {\n super(maxlen);this._pushActivity = _pushActivity;this._popActivity = _popActivity;this.transactionSpanId = transactionSpanId; }\n\n /**\n * @inheritDoc\n */\n add(span) {\n // We should make sure we do not push and pop activities for\n // the transaction that this span recorder belongs to.\n if (span.spanId !== this.transactionSpanId) {\n // We patch span.finish() to pop an activity after setting an endTimestamp.\n span.finish = (endTimestamp) => {\n span.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : timestampInSeconds();\n this._popActivity(span.spanId);\n };\n\n // We should only push new activities if the span does not have an end timestamp.\n if (span.endTimestamp === undefined) {\n this._pushActivity(span.spanId);\n }\n }\n\n super.add(span);\n }\n}\n\n/**\n * An IdleTransaction is a transaction that automatically finishes. It does this by tracking child spans as activities.\n * You can have multiple IdleTransactions active, but if the `onScope` option is specified, the idle transaction will\n * put itself on the scope on creation.\n */\nclass IdleTransaction extends Transaction {\n // Activities store a list of active spans\n\n // Track state of activities in previous heartbeat\n\n // Amount of times heartbeat has counted. Will cause transaction to finish after 3 beats.\n\n // We should not use heartbeat if we finished a transaction\n\n // Idle timeout was canceled and we should finish the transaction with the last span end.\n\n /**\n * Timer that tracks Transaction idleTimeout\n */\n\n constructor(\n transactionContext,\n _idleHub,\n /**\n * The time to wait in ms until the idle transaction will be finished. This timer is started each time\n * there are no active spans on this transaction.\n */\n _idleTimeout = TRACING_DEFAULTS.idleTimeout,\n /**\n * The final value in ms that a transaction cannot exceed\n */\n _finalTimeout = TRACING_DEFAULTS.finalTimeout,\n _heartbeatInterval = TRACING_DEFAULTS.heartbeatInterval,\n // Whether or not the transaction should put itself on the scope when it starts and pop itself off when it ends\n _onScope = false,\n ) {\n super(transactionContext, _idleHub);this._idleHub = _idleHub;this._idleTimeout = _idleTimeout;this._finalTimeout = _finalTimeout;this._heartbeatInterval = _heartbeatInterval;this._onScope = _onScope;\n this.activities = {};\n this._heartbeatCounter = 0;\n this._finished = false;\n this._idleTimeoutCanceledPermanently = false;\n this._beforeFinishCallbacks = [];\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[4];\n\n if (_onScope) {\n // We set the transaction here on the scope so error events pick up the trace\n // context and attach it to the error.\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`);\n _idleHub.configureScope(scope => scope.setSpan(this));\n }\n\n this._restartIdleTimeout();\n setTimeout(() => {\n if (!this._finished) {\n this.setStatus('deadline_exceeded');\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[3];\n this.finish();\n }\n }, this._finalTimeout);\n }\n\n /** {@inheritDoc} */\n finish(endTimestamp = timestampInSeconds()) {\n this._finished = true;\n this.activities = {};\n\n if (this.op === 'ui.action.click') {\n this.setTag(FINISH_REASON_TAG, this._finishReason);\n }\n\n if (this.spanRecorder) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log('[Tracing] finishing IdleTransaction', new Date(endTimestamp * 1000).toISOString(), this.op);\n\n for (const callback of this._beforeFinishCallbacks) {\n callback(this, endTimestamp);\n }\n\n this.spanRecorder.spans = this.spanRecorder.spans.filter((span) => {\n // If we are dealing with the transaction itself, we just return it\n if (span.spanId === this.spanId) {\n return true;\n }\n\n // We cancel all pending spans with status \"cancelled\" to indicate the idle transaction was finished early\n if (!span.endTimestamp) {\n span.endTimestamp = endTimestamp;\n span.setStatus('cancelled');\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log('[Tracing] cancelling span since transaction ended early', JSON.stringify(span, undefined, 2));\n }\n\n const spanStartedBeforeTransactionFinish = span.startTimestamp < endTimestamp;\n\n // Add a delta with idle timeout so that we prevent false positives\n const timeoutWithMarginOfError = (this._finalTimeout + this._idleTimeout) / 1000;\n const spanEndedBeforeFinalTimeout = span.endTimestamp - this.startTimestamp < timeoutWithMarginOfError;\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n const stringifiedSpan = JSON.stringify(span, undefined, 2);\n if (!spanStartedBeforeTransactionFinish) {\n logger.log('[Tracing] discarding Span since it happened after Transaction was finished', stringifiedSpan);\n } else if (!spanEndedBeforeFinalTimeout) {\n logger.log('[Tracing] discarding Span since it finished after Transaction final timeout', stringifiedSpan);\n }\n }\n\n return spanStartedBeforeTransactionFinish && spanEndedBeforeFinalTimeout;\n });\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] flushing IdleTransaction');\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] No active IdleTransaction');\n }\n\n // if `this._onScope` is `true`, the transaction put itself on the scope when it started\n if (this._onScope) {\n const scope = this._idleHub.getScope();\n if (scope.getTransaction() === this) {\n scope.setSpan(undefined);\n }\n }\n\n return super.finish(endTimestamp);\n }\n\n /**\n * Register a callback function that gets excecuted before the transaction finishes.\n * Useful for cleanup or if you want to add any additional spans based on current context.\n *\n * This is exposed because users have no other way of running something before an idle transaction\n * finishes.\n */\n registerBeforeFinishCallback(callback) {\n this._beforeFinishCallbacks.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n initSpanRecorder(maxlen) {\n if (!this.spanRecorder) {\n const pushActivity = (id) => {\n if (this._finished) {\n return;\n }\n this._pushActivity(id);\n };\n const popActivity = (id) => {\n if (this._finished) {\n return;\n }\n this._popActivity(id);\n };\n\n this.spanRecorder = new IdleTransactionSpanRecorder(pushActivity, popActivity, this.spanId, maxlen);\n\n // Start heartbeat so that transactions do not run forever.\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Starting heartbeat');\n this._pingHeartbeat();\n }\n this.spanRecorder.add(this);\n }\n\n /**\n * Cancels the existing idle timeout, if there is one.\n * @param restartOnChildSpanChange Default is `true`.\n * If set to false the transaction will end\n * with the last child span.\n */\n cancelIdleTimeout(\n endTimestamp,\n {\n restartOnChildSpanChange,\n }\n\n = {\n restartOnChildSpanChange: true,\n },\n ) {\n this._idleTimeoutCanceledPermanently = restartOnChildSpanChange === false;\n if (this._idleTimeoutID) {\n clearTimeout(this._idleTimeoutID);\n this._idleTimeoutID = undefined;\n\n if (Object.keys(this.activities).length === 0 && this._idleTimeoutCanceledPermanently) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];\n this.finish(endTimestamp);\n }\n }\n }\n\n /**\n * Temporary method used to externally set the transaction's `finishReason`\n *\n * ** WARNING**\n * This is for the purpose of experimentation only and will be removed in the near future, do not use!\n *\n * @internal\n *\n */\n setFinishReason(reason) {\n this._finishReason = reason;\n }\n\n /**\n * Restarts idle timeout, if there is no running idle timeout it will start one.\n */\n _restartIdleTimeout(endTimestamp) {\n this.cancelIdleTimeout();\n this._idleTimeoutID = setTimeout(() => {\n if (!this._finished && Object.keys(this.activities).length === 0) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[1];\n this.finish(endTimestamp);\n }\n }, this._idleTimeout);\n }\n\n /**\n * Start tracking a specific activity.\n * @param spanId The span id that represents the activity\n */\n _pushActivity(spanId) {\n this.cancelIdleTimeout(undefined, { restartOnChildSpanChange: !this._idleTimeoutCanceledPermanently });\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] pushActivity: ${spanId}`);\n this.activities[spanId] = true;\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n }\n\n /**\n * Remove an activity from usage\n * @param spanId The span id that represents the activity\n */\n _popActivity(spanId) {\n if (this.activities[spanId]) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] popActivity ${spanId}`);\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this.activities[spanId];\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n }\n\n if (Object.keys(this.activities).length === 0) {\n const endTimestamp = timestampInSeconds();\n if (this._idleTimeoutCanceledPermanently) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];\n this.finish(endTimestamp);\n } else {\n // We need to add the timeout here to have the real endtimestamp of the transaction\n // Remember timestampInSeconds is in seconds, timeout is in ms\n this._restartIdleTimeout(endTimestamp + this._idleTimeout / 1000);\n }\n }\n }\n\n /**\n * Checks when entries of this.activities are not changing for 3 beats.\n * If this occurs we finish the transaction.\n */\n _beat() {\n // We should not be running heartbeat if the idle transaction is finished.\n if (this._finished) {\n return;\n }\n\n const heartbeatString = Object.keys(this.activities).join('');\n\n if (heartbeatString === this._prevHeartbeatString) {\n this._heartbeatCounter++;\n } else {\n this._heartbeatCounter = 1;\n }\n\n this._prevHeartbeatString = heartbeatString;\n\n if (this._heartbeatCounter >= 3) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] Transaction finished because of no change for 3 heart beats');\n this.setStatus('deadline_exceeded');\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[0];\n this.finish();\n } else {\n this._pingHeartbeat();\n }\n }\n\n /**\n * Pings the heartbeat\n */\n _pingHeartbeat() {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`);\n setTimeout(() => {\n this._beat();\n }, this._heartbeatInterval);\n }\n}\n\nexport { IdleTransaction, IdleTransactionSpanRecorder, TRACING_DEFAULTS };\n//# sourceMappingURL=idletransaction.js.map\n","/* eslint-disable max-lines */\nimport type { TransactionContext } from '@sentry/types';\nimport { logger, timestampInSeconds } from '@sentry/utils';\n\nimport type { Hub } from '../hub';\nimport type { Span } from './span';\nimport { SpanRecorder } from './span';\nimport { Transaction } from './transaction';\n\nexport const TRACING_DEFAULTS = {\n idleTimeout: 1000,\n finalTimeout: 30000,\n heartbeatInterval: 5000,\n};\n\nconst FINISH_REASON_TAG = 'finishReason';\n\nconst IDLE_TRANSACTION_FINISH_REASONS = [\n 'heartbeatFailed',\n 'idleTimeout',\n 'documentHidden',\n 'finalTimeout',\n 'externalFinish',\n 'cancelled',\n];\n\n/**\n * @inheritDoc\n */\nexport class IdleTransactionSpanRecorder extends SpanRecorder {\n public constructor(\n private readonly _pushActivity: (id: string) => void,\n private readonly _popActivity: (id: string) => void,\n public transactionSpanId: string,\n maxlen?: number,\n ) {\n super(maxlen);\n }\n\n /**\n * @inheritDoc\n */\n public add(span: Span): void {\n // We should make sure we do not push and pop activities for\n // the transaction that this span recorder belongs to.\n if (span.spanId !== this.transactionSpanId) {\n // We patch span.finish() to pop an activity after setting an endTimestamp.\n span.finish = (endTimestamp?: number) => {\n span.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : timestampInSeconds();\n this._popActivity(span.spanId);\n };\n\n // We should only push new activities if the span does not have an end timestamp.\n if (span.endTimestamp === undefined) {\n this._pushActivity(span.spanId);\n }\n }\n\n super.add(span);\n }\n}\n\nexport type BeforeFinishCallback = (transactionSpan: IdleTransaction, endTimestamp: number) => void;\n\n/**\n * An IdleTransaction is a transaction that automatically finishes. It does this by tracking child spans as activities.\n * You can have multiple IdleTransactions active, but if the `onScope` option is specified, the idle transaction will\n * put itself on the scope on creation.\n */\nexport class IdleTransaction extends Transaction {\n // Activities store a list of active spans\n public activities: Record;\n // Track state of activities in previous heartbeat\n private _prevHeartbeatString: string | undefined;\n\n // Amount of times heartbeat has counted. Will cause transaction to finish after 3 beats.\n private _heartbeatCounter: number;\n\n // We should not use heartbeat if we finished a transaction\n private _finished: boolean;\n\n // Idle timeout was canceled and we should finish the transaction with the last span end.\n private _idleTimeoutCanceledPermanently: boolean;\n\n private readonly _beforeFinishCallbacks: BeforeFinishCallback[];\n\n /**\n * Timer that tracks Transaction idleTimeout\n */\n private _idleTimeoutID: ReturnType | undefined;\n\n private _finishReason: (typeof IDLE_TRANSACTION_FINISH_REASONS)[number];\n\n public constructor(\n transactionContext: TransactionContext,\n private readonly _idleHub: Hub,\n /**\n * The time to wait in ms until the idle transaction will be finished. This timer is started each time\n * there are no active spans on this transaction.\n */\n private readonly _idleTimeout: number = TRACING_DEFAULTS.idleTimeout,\n /**\n * The final value in ms that a transaction cannot exceed\n */\n private readonly _finalTimeout: number = TRACING_DEFAULTS.finalTimeout,\n private readonly _heartbeatInterval: number = TRACING_DEFAULTS.heartbeatInterval,\n // Whether or not the transaction should put itself on the scope when it starts and pop itself off when it ends\n private readonly _onScope: boolean = false,\n ) {\n super(transactionContext, _idleHub);\n\n this.activities = {};\n this._heartbeatCounter = 0;\n this._finished = false;\n this._idleTimeoutCanceledPermanently = false;\n this._beforeFinishCallbacks = [];\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[4];\n\n if (_onScope) {\n // We set the transaction here on the scope so error events pick up the trace\n // context and attach it to the error.\n __DEBUG_BUILD__ && logger.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`);\n _idleHub.configureScope(scope => scope.setSpan(this));\n }\n\n this._restartIdleTimeout();\n setTimeout(() => {\n if (!this._finished) {\n this.setStatus('deadline_exceeded');\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[3];\n this.finish();\n }\n }, this._finalTimeout);\n }\n\n /** {@inheritDoc} */\n public finish(endTimestamp: number = timestampInSeconds()): string | undefined {\n this._finished = true;\n this.activities = {};\n\n if (this.op === 'ui.action.click') {\n this.setTag(FINISH_REASON_TAG, this._finishReason);\n }\n\n if (this.spanRecorder) {\n __DEBUG_BUILD__ &&\n logger.log('[Tracing] finishing IdleTransaction', new Date(endTimestamp * 1000).toISOString(), this.op);\n\n for (const callback of this._beforeFinishCallbacks) {\n callback(this, endTimestamp);\n }\n\n this.spanRecorder.spans = this.spanRecorder.spans.filter((span: Span) => {\n // If we are dealing with the transaction itself, we just return it\n if (span.spanId === this.spanId) {\n return true;\n }\n\n // We cancel all pending spans with status \"cancelled\" to indicate the idle transaction was finished early\n if (!span.endTimestamp) {\n span.endTimestamp = endTimestamp;\n span.setStatus('cancelled');\n __DEBUG_BUILD__ &&\n logger.log('[Tracing] cancelling span since transaction ended early', JSON.stringify(span, undefined, 2));\n }\n\n const spanStartedBeforeTransactionFinish = span.startTimestamp < endTimestamp;\n\n // Add a delta with idle timeout so that we prevent false positives\n const timeoutWithMarginOfError = (this._finalTimeout + this._idleTimeout) / 1000;\n const spanEndedBeforeFinalTimeout = span.endTimestamp - this.startTimestamp < timeoutWithMarginOfError;\n\n if (__DEBUG_BUILD__) {\n const stringifiedSpan = JSON.stringify(span, undefined, 2);\n if (!spanStartedBeforeTransactionFinish) {\n logger.log('[Tracing] discarding Span since it happened after Transaction was finished', stringifiedSpan);\n } else if (!spanEndedBeforeFinalTimeout) {\n logger.log('[Tracing] discarding Span since it finished after Transaction final timeout', stringifiedSpan);\n }\n }\n\n return spanStartedBeforeTransactionFinish && spanEndedBeforeFinalTimeout;\n });\n\n __DEBUG_BUILD__ && logger.log('[Tracing] flushing IdleTransaction');\n } else {\n __DEBUG_BUILD__ && logger.log('[Tracing] No active IdleTransaction');\n }\n\n // if `this._onScope` is `true`, the transaction put itself on the scope when it started\n if (this._onScope) {\n const scope = this._idleHub.getScope();\n if (scope.getTransaction() === this) {\n scope.setSpan(undefined);\n }\n }\n\n return super.finish(endTimestamp);\n }\n\n /**\n * Register a callback function that gets excecuted before the transaction finishes.\n * Useful for cleanup or if you want to add any additional spans based on current context.\n *\n * This is exposed because users have no other way of running something before an idle transaction\n * finishes.\n */\n public registerBeforeFinishCallback(callback: BeforeFinishCallback): void {\n this._beforeFinishCallbacks.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n public initSpanRecorder(maxlen?: number): void {\n if (!this.spanRecorder) {\n const pushActivity = (id: string): void => {\n if (this._finished) {\n return;\n }\n this._pushActivity(id);\n };\n const popActivity = (id: string): void => {\n if (this._finished) {\n return;\n }\n this._popActivity(id);\n };\n\n this.spanRecorder = new IdleTransactionSpanRecorder(pushActivity, popActivity, this.spanId, maxlen);\n\n // Start heartbeat so that transactions do not run forever.\n __DEBUG_BUILD__ && logger.log('Starting heartbeat');\n this._pingHeartbeat();\n }\n this.spanRecorder.add(this);\n }\n\n /**\n * Cancels the existing idle timeout, if there is one.\n * @param restartOnChildSpanChange Default is `true`.\n * If set to false the transaction will end\n * with the last child span.\n */\n public cancelIdleTimeout(\n endTimestamp?: Parameters[0],\n {\n restartOnChildSpanChange,\n }: {\n restartOnChildSpanChange?: boolean;\n } = {\n restartOnChildSpanChange: true,\n },\n ): void {\n this._idleTimeoutCanceledPermanently = restartOnChildSpanChange === false;\n if (this._idleTimeoutID) {\n clearTimeout(this._idleTimeoutID);\n this._idleTimeoutID = undefined;\n\n if (Object.keys(this.activities).length === 0 && this._idleTimeoutCanceledPermanently) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];\n this.finish(endTimestamp);\n }\n }\n }\n\n /**\n * Temporary method used to externally set the transaction's `finishReason`\n *\n * ** WARNING**\n * This is for the purpose of experimentation only and will be removed in the near future, do not use!\n *\n * @internal\n *\n */\n public setFinishReason(reason: string): void {\n this._finishReason = reason;\n }\n\n /**\n * Restarts idle timeout, if there is no running idle timeout it will start one.\n */\n private _restartIdleTimeout(endTimestamp?: Parameters[0]): void {\n this.cancelIdleTimeout();\n this._idleTimeoutID = setTimeout(() => {\n if (!this._finished && Object.keys(this.activities).length === 0) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[1];\n this.finish(endTimestamp);\n }\n }, this._idleTimeout);\n }\n\n /**\n * Start tracking a specific activity.\n * @param spanId The span id that represents the activity\n */\n private _pushActivity(spanId: string): void {\n this.cancelIdleTimeout(undefined, { restartOnChildSpanChange: !this._idleTimeoutCanceledPermanently });\n __DEBUG_BUILD__ && logger.log(`[Tracing] pushActivity: ${spanId}`);\n this.activities[spanId] = true;\n __DEBUG_BUILD__ && logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n }\n\n /**\n * Remove an activity from usage\n * @param spanId The span id that represents the activity\n */\n private _popActivity(spanId: string): void {\n if (this.activities[spanId]) {\n __DEBUG_BUILD__ && logger.log(`[Tracing] popActivity ${spanId}`);\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this.activities[spanId];\n __DEBUG_BUILD__ && logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n }\n\n if (Object.keys(this.activities).length === 0) {\n const endTimestamp = timestampInSeconds();\n if (this._idleTimeoutCanceledPermanently) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];\n this.finish(endTimestamp);\n } else {\n // We need to add the timeout here to have the real endtimestamp of the transaction\n // Remember timestampInSeconds is in seconds, timeout is in ms\n this._restartIdleTimeout(endTimestamp + this._idleTimeout / 1000);\n }\n }\n }\n\n /**\n * Checks when entries of this.activities are not changing for 3 beats.\n * If this occurs we finish the transaction.\n */\n private _beat(): void {\n // We should not be running heartbeat if the idle transaction is finished.\n if (this._finished) {\n return;\n }\n\n const heartbeatString = Object.keys(this.activities).join('');\n\n if (heartbeatString === this._prevHeartbeatString) {\n this._heartbeatCounter++;\n } else {\n this._heartbeatCounter = 1;\n }\n\n this._prevHeartbeatString = heartbeatString;\n\n if (this._heartbeatCounter >= 3) {\n __DEBUG_BUILD__ && logger.log('[Tracing] Transaction finished because of no change for 3 heart beats');\n this.setStatus('deadline_exceeded');\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[0];\n this.finish();\n } else {\n this._pingHeartbeat();\n }\n }\n\n /**\n * Pings the heartbeat\n */\n private _pingHeartbeat(): void {\n __DEBUG_BUILD__ && logger.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`);\n setTimeout(() => {\n this._beat();\n }, this._heartbeatInterval);\n }\n}\n","import { uuid4, timestampInSeconds, logger, generateSentryTraceHeader, dropUndefinedKeys } from '@sentry/utils';\n\n/**\n * Keeps track of finished spans for a given transaction\n * @internal\n * @hideconstructor\n * @hidden\n */\nclass SpanRecorder {\n\n constructor(maxlen = 1000) {\n this._maxlen = maxlen;\n this.spans = [];\n }\n\n /**\n * This is just so that we don't run out of memory while recording a lot\n * of spans. At some point we just stop and flush out the start of the\n * trace tree (i.e.the first n spans with the smallest\n * start_timestamp).\n */\n add(span) {\n if (this.spans.length > this._maxlen) {\n span.spanRecorder = undefined;\n } else {\n this.spans.push(span);\n }\n }\n}\n\n/**\n * Span contains all data about a span\n */\nclass Span {\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * Internal keeper of the status\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * Timestamp in seconds when the span was created.\n */\n\n /**\n * Timestamp in seconds when the span ended.\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n /**\n * List of spans that were finalized\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * The instrumenter that created this span.\n */\n\n /**\n * The origin of the span, giving context about what created the span.\n */\n\n /**\n * You should never call the constructor manually, always use `Sentry.startTransaction()`\n * or call `startChild()` on an existing span.\n * @internal\n * @hideconstructor\n * @hidden\n */\n constructor(spanContext = {}) {\n this.traceId = spanContext.traceId || uuid4();\n this.spanId = spanContext.spanId || uuid4().substring(16);\n this.startTimestamp = spanContext.startTimestamp || timestampInSeconds();\n this.tags = spanContext.tags || {};\n this.data = spanContext.data || {};\n this.instrumenter = spanContext.instrumenter || 'sentry';\n this.origin = spanContext.origin || 'manual';\n\n if (spanContext.parentSpanId) {\n this.parentSpanId = spanContext.parentSpanId;\n }\n // We want to include booleans as well here\n if ('sampled' in spanContext) {\n this.sampled = spanContext.sampled;\n }\n if (spanContext.op) {\n this.op = spanContext.op;\n }\n if (spanContext.description) {\n this.description = spanContext.description;\n }\n if (spanContext.name) {\n this.description = spanContext.name;\n }\n if (spanContext.status) {\n this.status = spanContext.status;\n }\n if (spanContext.endTimestamp) {\n this.endTimestamp = spanContext.endTimestamp;\n }\n }\n\n /** An alias for `description` of the Span. */\n get name() {\n return this.description || '';\n }\n /** Update the name of the span. */\n set name(name) {\n this.setName(name);\n }\n\n /**\n * @inheritDoc\n */\n startChild(\n spanContext,\n ) {\n const childSpan = new Span({\n ...spanContext,\n parentSpanId: this.spanId,\n sampled: this.sampled,\n traceId: this.traceId,\n });\n\n childSpan.spanRecorder = this.spanRecorder;\n if (childSpan.spanRecorder) {\n childSpan.spanRecorder.add(childSpan);\n }\n\n childSpan.transaction = this.transaction;\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && childSpan.transaction) {\n const opStr = (spanContext && spanContext.op) || '< unknown op >';\n const nameStr = childSpan.transaction.name || '< unknown name >';\n const idStr = childSpan.transaction.spanId;\n\n const logMessage = `[Tracing] Starting '${opStr}' span on transaction '${nameStr}' (${idStr}).`;\n childSpan.transaction.metadata.spanMetadata[childSpan.spanId] = { logMessage };\n logger.log(logMessage);\n }\n\n return childSpan;\n }\n\n /**\n * @inheritDoc\n */\n setTag(key, value) {\n this.tags = { ...this.tags, [key]: value };\n return this;\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n setData(key, value) {\n this.data = { ...this.data, [key]: value };\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setStatus(value) {\n this.status = value;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setHttpStatus(httpStatus) {\n this.setTag('http.status_code', String(httpStatus));\n this.setData('http.response.status_code', httpStatus);\n const spanStatus = spanStatusfromHttpCode(httpStatus);\n if (spanStatus !== 'unknown_error') {\n this.setStatus(spanStatus);\n }\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setName(name) {\n this.description = name;\n }\n\n /**\n * @inheritDoc\n */\n isSuccess() {\n return this.status === 'ok';\n }\n\n /**\n * @inheritDoc\n */\n finish(endTimestamp) {\n if (\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n // Don't call this for transactions\n this.transaction &&\n this.transaction.spanId !== this.spanId\n ) {\n const { logMessage } = this.transaction.metadata.spanMetadata[this.spanId];\n if (logMessage) {\n logger.log((logMessage ).replace('Starting', 'Finishing'));\n }\n }\n\n this.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : timestampInSeconds();\n }\n\n /**\n * @inheritDoc\n */\n toTraceparent() {\n return generateSentryTraceHeader(this.traceId, this.spanId, this.sampled);\n }\n\n /**\n * @inheritDoc\n */\n toContext() {\n return dropUndefinedKeys({\n data: this.data,\n description: this.description,\n endTimestamp: this.endTimestamp,\n op: this.op,\n parentSpanId: this.parentSpanId,\n sampled: this.sampled,\n spanId: this.spanId,\n startTimestamp: this.startTimestamp,\n status: this.status,\n tags: this.tags,\n traceId: this.traceId,\n });\n }\n\n /**\n * @inheritDoc\n */\n updateWithContext(spanContext) {\n this.data = spanContext.data || {};\n this.description = spanContext.description;\n this.endTimestamp = spanContext.endTimestamp;\n this.op = spanContext.op;\n this.parentSpanId = spanContext.parentSpanId;\n this.sampled = spanContext.sampled;\n this.spanId = spanContext.spanId || this.spanId;\n this.startTimestamp = spanContext.startTimestamp || this.startTimestamp;\n this.status = spanContext.status;\n this.tags = spanContext.tags || {};\n this.traceId = spanContext.traceId || this.traceId;\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getTraceContext() {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n trace_id: this.traceId,\n origin: this.origin,\n });\n }\n\n /**\n * @inheritDoc\n */\n toJSON()\n\n {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n start_timestamp: this.startTimestamp,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n timestamp: this.endTimestamp,\n trace_id: this.traceId,\n origin: this.origin,\n });\n }\n}\n\n/**\n * Converts a HTTP status code into a {@link SpanStatusType}.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or unknown_error.\n */\nfunction spanStatusfromHttpCode(httpStatus) {\n if (httpStatus < 400 && httpStatus >= 100) {\n return 'ok';\n }\n\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return 'unauthenticated';\n case 403:\n return 'permission_denied';\n case 404:\n return 'not_found';\n case 409:\n return 'already_exists';\n case 413:\n return 'failed_precondition';\n case 429:\n return 'resource_exhausted';\n default:\n return 'invalid_argument';\n }\n }\n\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return 'unimplemented';\n case 503:\n return 'unavailable';\n case 504:\n return 'deadline_exceeded';\n default:\n return 'internal_error';\n }\n }\n\n return 'unknown_error';\n}\n\nexport { Span, SpanRecorder, spanStatusfromHttpCode };\n//# sourceMappingURL=span.js.map\n","/* eslint-disable max-lines */\nimport type {\n Instrumenter,\n Primitive,\n Span as SpanInterface,\n SpanContext,\n SpanOrigin,\n TraceContext,\n Transaction,\n} from '@sentry/types';\nimport { dropUndefinedKeys, generateSentryTraceHeader, logger, timestampInSeconds, uuid4 } from '@sentry/utils';\n\n/**\n * Keeps track of finished spans for a given transaction\n * @internal\n * @hideconstructor\n * @hidden\n */\nexport class SpanRecorder {\n public spans: Span[];\n\n private readonly _maxlen: number;\n\n public constructor(maxlen: number = 1000) {\n this._maxlen = maxlen;\n this.spans = [];\n }\n\n /**\n * This is just so that we don't run out of memory while recording a lot\n * of spans. At some point we just stop and flush out the start of the\n * trace tree (i.e.the first n spans with the smallest\n * start_timestamp).\n */\n public add(span: Span): void {\n if (this.spans.length > this._maxlen) {\n span.spanRecorder = undefined;\n } else {\n this.spans.push(span);\n }\n }\n}\n\n/**\n * Span contains all data about a span\n */\nexport class Span implements SpanInterface {\n /**\n * @inheritDoc\n */\n public traceId: string;\n\n /**\n * @inheritDoc\n */\n public spanId: string;\n\n /**\n * @inheritDoc\n */\n public parentSpanId?: string;\n\n /**\n * Internal keeper of the status\n */\n public status?: SpanStatusType | string;\n\n /**\n * @inheritDoc\n */\n public sampled?: boolean;\n\n /**\n * Timestamp in seconds when the span was created.\n */\n public startTimestamp: number;\n\n /**\n * Timestamp in seconds when the span ended.\n */\n public endTimestamp?: number;\n\n /**\n * @inheritDoc\n */\n public op?: string;\n\n /**\n * @inheritDoc\n */\n public description?: string;\n\n /**\n * @inheritDoc\n */\n public tags: { [key: string]: Primitive };\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public data: { [key: string]: any };\n\n /**\n * List of spans that were finalized\n */\n public spanRecorder?: SpanRecorder;\n\n /**\n * @inheritDoc\n */\n public transaction?: Transaction;\n\n /**\n * The instrumenter that created this span.\n */\n public instrumenter: Instrumenter;\n\n /**\n * The origin of the span, giving context about what created the span.\n */\n public origin?: SpanOrigin;\n\n /**\n * You should never call the constructor manually, always use `Sentry.startTransaction()`\n * or call `startChild()` on an existing span.\n * @internal\n * @hideconstructor\n * @hidden\n */\n public constructor(spanContext: SpanContext = {}) {\n this.traceId = spanContext.traceId || uuid4();\n this.spanId = spanContext.spanId || uuid4().substring(16);\n this.startTimestamp = spanContext.startTimestamp || timestampInSeconds();\n this.tags = spanContext.tags || {};\n this.data = spanContext.data || {};\n this.instrumenter = spanContext.instrumenter || 'sentry';\n this.origin = spanContext.origin || 'manual';\n\n if (spanContext.parentSpanId) {\n this.parentSpanId = spanContext.parentSpanId;\n }\n // We want to include booleans as well here\n if ('sampled' in spanContext) {\n this.sampled = spanContext.sampled;\n }\n if (spanContext.op) {\n this.op = spanContext.op;\n }\n if (spanContext.description) {\n this.description = spanContext.description;\n }\n if (spanContext.name) {\n this.description = spanContext.name;\n }\n if (spanContext.status) {\n this.status = spanContext.status;\n }\n if (spanContext.endTimestamp) {\n this.endTimestamp = spanContext.endTimestamp;\n }\n }\n\n /** An alias for `description` of the Span. */\n public get name(): string {\n return this.description || '';\n }\n /** Update the name of the span. */\n public set name(name: string) {\n this.setName(name);\n }\n\n /**\n * @inheritDoc\n */\n public startChild(\n spanContext?: Pick>,\n ): Span {\n const childSpan = new Span({\n ...spanContext,\n parentSpanId: this.spanId,\n sampled: this.sampled,\n traceId: this.traceId,\n });\n\n childSpan.spanRecorder = this.spanRecorder;\n if (childSpan.spanRecorder) {\n childSpan.spanRecorder.add(childSpan);\n }\n\n childSpan.transaction = this.transaction;\n\n if (__DEBUG_BUILD__ && childSpan.transaction) {\n const opStr = (spanContext && spanContext.op) || '< unknown op >';\n const nameStr = childSpan.transaction.name || '< unknown name >';\n const idStr = childSpan.transaction.spanId;\n\n const logMessage = `[Tracing] Starting '${opStr}' span on transaction '${nameStr}' (${idStr}).`;\n childSpan.transaction.metadata.spanMetadata[childSpan.spanId] = { logMessage };\n logger.log(logMessage);\n }\n\n return childSpan;\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: Primitive): this {\n this.tags = { ...this.tags, [key]: value };\n return this;\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public setData(key: string, value: any): this {\n this.data = { ...this.data, [key]: value };\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setStatus(value: SpanStatusType): this {\n this.status = value;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setHttpStatus(httpStatus: number): this {\n this.setTag('http.status_code', String(httpStatus));\n this.setData('http.response.status_code', httpStatus);\n const spanStatus = spanStatusfromHttpCode(httpStatus);\n if (spanStatus !== 'unknown_error') {\n this.setStatus(spanStatus);\n }\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setName(name: string): void {\n this.description = name;\n }\n\n /**\n * @inheritDoc\n */\n public isSuccess(): boolean {\n return this.status === 'ok';\n }\n\n /**\n * @inheritDoc\n */\n public finish(endTimestamp?: number): void {\n if (\n __DEBUG_BUILD__ &&\n // Don't call this for transactions\n this.transaction &&\n this.transaction.spanId !== this.spanId\n ) {\n const { logMessage } = this.transaction.metadata.spanMetadata[this.spanId];\n if (logMessage) {\n logger.log((logMessage as string).replace('Starting', 'Finishing'));\n }\n }\n\n this.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : timestampInSeconds();\n }\n\n /**\n * @inheritDoc\n */\n public toTraceparent(): string {\n return generateSentryTraceHeader(this.traceId, this.spanId, this.sampled);\n }\n\n /**\n * @inheritDoc\n */\n public toContext(): SpanContext {\n return dropUndefinedKeys({\n data: this.data,\n description: this.description,\n endTimestamp: this.endTimestamp,\n op: this.op,\n parentSpanId: this.parentSpanId,\n sampled: this.sampled,\n spanId: this.spanId,\n startTimestamp: this.startTimestamp,\n status: this.status,\n tags: this.tags,\n traceId: this.traceId,\n });\n }\n\n /**\n * @inheritDoc\n */\n public updateWithContext(spanContext: SpanContext): this {\n this.data = spanContext.data || {};\n this.description = spanContext.description;\n this.endTimestamp = spanContext.endTimestamp;\n this.op = spanContext.op;\n this.parentSpanId = spanContext.parentSpanId;\n this.sampled = spanContext.sampled;\n this.spanId = spanContext.spanId || this.spanId;\n this.startTimestamp = spanContext.startTimestamp || this.startTimestamp;\n this.status = spanContext.status;\n this.tags = spanContext.tags || {};\n this.traceId = spanContext.traceId || this.traceId;\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getTraceContext(): TraceContext {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n trace_id: this.traceId,\n origin: this.origin,\n });\n }\n\n /**\n * @inheritDoc\n */\n public toJSON(): {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: { [key: string]: any };\n description?: string;\n op?: string;\n parent_span_id?: string;\n span_id: string;\n start_timestamp: number;\n status?: string;\n tags?: { [key: string]: Primitive };\n timestamp?: number;\n trace_id: string;\n origin?: SpanOrigin;\n } {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n start_timestamp: this.startTimestamp,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n timestamp: this.endTimestamp,\n trace_id: this.traceId,\n origin: this.origin,\n });\n }\n}\n\nexport type SpanStatusType =\n /** The operation completed successfully. */\n | 'ok'\n /** Deadline expired before operation could complete. */\n | 'deadline_exceeded'\n /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */\n | 'unauthenticated'\n /** 403 Forbidden */\n | 'permission_denied'\n /** 404 Not Found. Some requested entity (file or directory) was not found. */\n | 'not_found'\n /** 429 Too Many Requests */\n | 'resource_exhausted'\n /** Client specified an invalid argument. 4xx. */\n | 'invalid_argument'\n /** 501 Not Implemented */\n | 'unimplemented'\n /** 503 Service Unavailable */\n | 'unavailable'\n /** Other/generic 5xx. */\n | 'internal_error'\n /** Unknown. Any non-standard HTTP status code. */\n | 'unknown_error'\n /** The operation was cancelled (typically by the user). */\n | 'cancelled'\n /** Already exists (409) */\n | 'already_exists'\n /** Operation was rejected because the system is not in a state required for the operation's */\n | 'failed_precondition'\n /** The operation was aborted, typically due to a concurrency issue. */\n | 'aborted'\n /** Operation was attempted past the valid range. */\n | 'out_of_range'\n /** Unrecoverable data loss or corruption */\n | 'data_loss';\n\n/**\n * Converts a HTTP status code into a {@link SpanStatusType}.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or unknown_error.\n */\nexport function spanStatusfromHttpCode(httpStatus: number): SpanStatusType {\n if (httpStatus < 400 && httpStatus >= 100) {\n return 'ok';\n }\n\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return 'unauthenticated';\n case 403:\n return 'permission_denied';\n case 404:\n return 'not_found';\n case 409:\n return 'already_exists';\n case 413:\n return 'failed_precondition';\n case 429:\n return 'resource_exhausted';\n default:\n return 'invalid_argument';\n }\n }\n\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return 'unimplemented';\n case 503:\n return 'unavailable';\n case 504:\n return 'deadline_exceeded';\n default:\n return 'internal_error';\n }\n }\n\n return 'unknown_error';\n}\n","import { baggageHeaderToDynamicSamplingContext } from './baggage.js';\nimport { uuid4 } from './misc.js';\n\nconst TRACEPARENT_REGEXP = new RegExp(\n '^[ \\\\t]*' + // whitespace\n '([0-9a-f]{32})?' + // trace_id\n '-?([0-9a-f]{16})?' + // span_id\n '-?([01])?' + // sampled\n '[ \\\\t]*$', // whitespace\n);\n\n/**\n * Extract transaction context data from a `sentry-trace` header.\n *\n * @param traceparent Traceparent string\n *\n * @returns Object containing data from the header, or undefined if traceparent string is malformed\n */\nfunction extractTraceparentData(traceparent) {\n if (!traceparent) {\n return undefined;\n }\n\n const matches = traceparent.match(TRACEPARENT_REGEXP);\n if (!matches) {\n return undefined;\n }\n\n let parentSampled;\n if (matches[3] === '1') {\n parentSampled = true;\n } else if (matches[3] === '0') {\n parentSampled = false;\n }\n\n return {\n traceId: matches[1],\n parentSampled,\n parentSpanId: matches[2],\n };\n}\n\n/**\n * Create tracing context from incoming headers.\n */\nfunction tracingContextFromHeaders(\n sentryTrace,\n baggage,\n)\n\n {\n const traceparentData = extractTraceparentData(sentryTrace);\n const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage);\n\n const { traceId, parentSpanId, parentSampled } = traceparentData || {};\n\n const propagationContext = {\n traceId: traceId || uuid4(),\n spanId: uuid4().substring(16),\n sampled: parentSampled,\n };\n\n if (parentSpanId) {\n propagationContext.parentSpanId = parentSpanId;\n }\n\n if (dynamicSamplingContext) {\n propagationContext.dsc = dynamicSamplingContext ;\n }\n\n return {\n traceparentData,\n dynamicSamplingContext,\n propagationContext,\n };\n}\n\n/**\n * Create sentry-trace header from span context values.\n */\nfunction generateSentryTraceHeader(\n traceId = uuid4(),\n spanId = uuid4().substring(16),\n sampled,\n) {\n let sampledString = '';\n if (sampled !== undefined) {\n sampledString = sampled ? '-1' : '-0';\n }\n return `${traceId}-${spanId}${sampledString}`;\n}\n\nexport { TRACEPARENT_REGEXP, extractTraceparentData, generateSentryTraceHeader, tracingContextFromHeaders };\n//# sourceMappingURL=tracing.js.map\n","import type { DynamicSamplingContext, PropagationContext, TraceparentData } from '@sentry/types';\n\nimport { baggageHeaderToDynamicSamplingContext } from './baggage';\nimport { uuid4 } from './misc';\n\nexport const TRACEPARENT_REGEXP = new RegExp(\n '^[ \\\\t]*' + // whitespace\n '([0-9a-f]{32})?' + // trace_id\n '-?([0-9a-f]{16})?' + // span_id\n '-?([01])?' + // sampled\n '[ \\\\t]*$', // whitespace\n);\n\n/**\n * Extract transaction context data from a `sentry-trace` header.\n *\n * @param traceparent Traceparent string\n *\n * @returns Object containing data from the header, or undefined if traceparent string is malformed\n */\nexport function extractTraceparentData(traceparent?: string): TraceparentData | undefined {\n if (!traceparent) {\n return undefined;\n }\n\n const matches = traceparent.match(TRACEPARENT_REGEXP);\n if (!matches) {\n return undefined;\n }\n\n let parentSampled: boolean | undefined;\n if (matches[3] === '1') {\n parentSampled = true;\n } else if (matches[3] === '0') {\n parentSampled = false;\n }\n\n return {\n traceId: matches[1],\n parentSampled,\n parentSpanId: matches[2],\n };\n}\n\n/**\n * Create tracing context from incoming headers.\n */\nexport function tracingContextFromHeaders(\n sentryTrace: Parameters[0],\n baggage: Parameters[0],\n): {\n traceparentData: ReturnType;\n dynamicSamplingContext: ReturnType;\n propagationContext: PropagationContext;\n} {\n const traceparentData = extractTraceparentData(sentryTrace);\n const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage);\n\n const { traceId, parentSpanId, parentSampled } = traceparentData || {};\n\n const propagationContext: PropagationContext = {\n traceId: traceId || uuid4(),\n spanId: uuid4().substring(16),\n sampled: parentSampled,\n };\n\n if (parentSpanId) {\n propagationContext.parentSpanId = parentSpanId;\n }\n\n if (dynamicSamplingContext) {\n propagationContext.dsc = dynamicSamplingContext as DynamicSamplingContext;\n }\n\n return {\n traceparentData,\n dynamicSamplingContext,\n propagationContext,\n };\n}\n\n/**\n * Create sentry-trace header from span context values.\n */\nexport function generateSentryTraceHeader(\n traceId: string = uuid4(),\n spanId: string = uuid4().substring(16),\n sampled?: boolean,\n): string {\n let sampledString = '';\n if (sampled !== undefined) {\n sampledString = sampled ? '-1' : '-0';\n }\n return `${traceId}-${spanId}${sampledString}`;\n}\n","import { isString } from './is.js';\nimport { logger } from './logger.js';\n\nconst BAGGAGE_HEADER_NAME = 'baggage';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nconst MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nfunction baggageHeaderToDynamicSamplingContext(\n // Very liberal definition of what any incoming header might look like\n baggageHeader,\n) {\n if (!isString(baggageHeader) && !Array.isArray(baggageHeader)) {\n return undefined;\n }\n\n // Intermediary object to store baggage key value pairs of incoming baggage headers on.\n // It is later used to read Sentry-DSC-values from.\n let baggageObject = {};\n\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n baggageObject = baggageHeader.reduce((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n return {\n ...acc,\n ...currBaggageObject,\n };\n }, {});\n } else {\n // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but\n // this is how we choose to handle it)\n if (!baggageHeader) {\n return undefined;\n }\n\n baggageObject = baggageHeaderToObject(baggageHeader);\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext ;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nfunction dynamicSamplingContextToSentryBaggageHeader(\n // this also takes undefined for convenience and bundle size in other places\n dynamicSamplingContext,\n) {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {},\n );\n\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader) {\n return baggageHeader\n .split(',')\n .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n .reduce((acc, [key, value]) => {\n acc[key] = value;\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object) {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\n\nexport { BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader };\n//# sourceMappingURL=baggage.js.map\n","import type { DynamicSamplingContext } from '@sentry/types';\n\nimport { isString } from './is';\nimport { logger } from './logger';\n\nexport const BAGGAGE_HEADER_NAME = 'baggage';\n\nexport const SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nexport const SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nexport const MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nexport function baggageHeaderToDynamicSamplingContext(\n // Very liberal definition of what any incoming header might look like\n baggageHeader: string | string[] | number | null | undefined | boolean,\n): Partial | undefined {\n if (!isString(baggageHeader) && !Array.isArray(baggageHeader)) {\n return undefined;\n }\n\n // Intermediary object to store baggage key value pairs of incoming baggage headers on.\n // It is later used to read Sentry-DSC-values from.\n let baggageObject: Readonly> = {};\n\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n baggageObject = baggageHeader.reduce>((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n return {\n ...acc,\n ...currBaggageObject,\n };\n }, {});\n } else {\n // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but\n // this is how we choose to handle it)\n if (!baggageHeader) {\n return undefined;\n }\n\n baggageObject = baggageHeaderToObject(baggageHeader);\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce>((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext as Partial;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nexport function dynamicSamplingContextToSentryBaggageHeader(\n // this also takes undefined for convenience and bundle size in other places\n dynamicSamplingContext?: Partial,\n): string | undefined {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce>(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {},\n );\n\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader: string): Record {\n return baggageHeader\n .split(',')\n .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n .reduce>((acc, [key, value]) => {\n acc[key] = value;\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object: Record): string | undefined {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\n","import { dropUndefinedKeys, logger } from '@sentry/utils';\nimport { getCurrentHub } from '../hub.js';\nimport { getDynamicSamplingContextFromClient } from './dynamicSamplingContext.js';\nimport { Span, SpanRecorder } from './span.js';\n\n/** JSDoc */\nclass Transaction extends Span {\n\n /**\n * The reference to the current hub.\n */\n\n /**\n * This constructor should never be called manually. Those instrumenting tracing should use\n * `Sentry.startTransaction()`, and internal methods should use `hub.startTransaction()`.\n * @internal\n * @hideconstructor\n * @hidden\n */\n constructor(transactionContext, hub) {\n super(transactionContext);\n // We need to delete description since it's set by the Span class constructor\n // but not needed for transactions.\n delete this.description;\n\n this._measurements = {};\n this._contexts = {};\n\n this._hub = hub || getCurrentHub();\n\n this._name = transactionContext.name || '';\n\n this.metadata = {\n source: 'custom',\n ...transactionContext.metadata,\n spanMetadata: {},\n };\n\n this._trimEnd = transactionContext.trimEnd;\n\n // this is because transactions are also spans, and spans have a transaction pointer\n this.transaction = this;\n\n // If Dynamic Sampling Context is provided during the creation of the transaction, we freeze it as it usually means\n // there is incoming Dynamic Sampling Context. (Either through an incoming request, a baggage meta-tag, or other means)\n const incomingDynamicSamplingContext = this.metadata.dynamicSamplingContext;\n if (incomingDynamicSamplingContext) {\n // We shallow copy this in case anything writes to the original reference of the passed in `dynamicSamplingContext`\n this._frozenDynamicSamplingContext = { ...incomingDynamicSamplingContext };\n }\n }\n\n /** Getter for `name` property */\n get name() {\n return this._name;\n }\n\n /** Setter for `name` property, which also sets `source` as custom */\n set name(newName) {\n this.setName(newName);\n }\n\n /**\n * JSDoc\n */\n setName(name, source = 'custom') {\n this._name = name;\n this.metadata.source = source;\n }\n\n /**\n * Attaches SpanRecorder to the span itself\n * @param maxlen maximum number of spans that can be recorded\n */\n initSpanRecorder(maxlen = 1000) {\n if (!this.spanRecorder) {\n this.spanRecorder = new SpanRecorder(maxlen);\n }\n this.spanRecorder.add(this);\n }\n\n /**\n * @inheritDoc\n */\n setContext(key, context) {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n }\n\n /**\n * @inheritDoc\n */\n setMeasurement(name, value, unit = '') {\n this._measurements[name] = { value, unit };\n }\n\n /**\n * @inheritDoc\n */\n setMetadata(newMetadata) {\n this.metadata = { ...this.metadata, ...newMetadata };\n }\n\n /**\n * @inheritDoc\n */\n finish(endTimestamp) {\n const transaction = this._finishTransaction(endTimestamp);\n if (!transaction) {\n return undefined;\n }\n return this._hub.captureEvent(transaction);\n }\n\n /**\n * @inheritDoc\n */\n toContext() {\n const spanContext = super.toContext();\n\n return dropUndefinedKeys({\n ...spanContext,\n name: this.name,\n trimEnd: this._trimEnd,\n });\n }\n\n /**\n * @inheritDoc\n */\n updateWithContext(transactionContext) {\n super.updateWithContext(transactionContext);\n\n this.name = transactionContext.name || '';\n\n this._trimEnd = transactionContext.trimEnd;\n\n return this;\n }\n\n /**\n * @inheritdoc\n *\n * @experimental\n */\n getDynamicSamplingContext() {\n if (this._frozenDynamicSamplingContext) {\n return this._frozenDynamicSamplingContext;\n }\n\n const hub = this._hub || getCurrentHub();\n const client = hub.getClient();\n\n if (!client) return {};\n\n const scope = hub.getScope();\n const dsc = getDynamicSamplingContextFromClient(this.traceId, client, scope);\n\n const maybeSampleRate = this.metadata.sampleRate;\n if (maybeSampleRate !== undefined) {\n dsc.sample_rate = `${maybeSampleRate}`;\n }\n\n // We don't want to have a transaction name in the DSC if the source is \"url\" because URLs might contain PII\n const source = this.metadata.source;\n if (source && source !== 'url') {\n dsc.transaction = this.name;\n }\n\n if (this.sampled !== undefined) {\n dsc.sampled = String(this.sampled);\n }\n\n // Uncomment if we want to make DSC immutable\n // this._frozenDynamicSamplingContext = dsc;\n\n return dsc;\n }\n\n /**\n * Override the current hub with a new one.\n * Used if you want another hub to finish the transaction.\n *\n * @internal\n */\n setHub(hub) {\n this._hub = hub;\n }\n\n /**\n * Finish the transaction & prepare the event to send to Sentry.\n */\n _finishTransaction(endTimestamp) {\n // This transaction is already finished, so we should not flush it again.\n if (this.endTimestamp !== undefined) {\n return undefined;\n }\n\n if (!this.name) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Transaction has no name, falling back to ``.');\n this.name = '';\n }\n\n // just sets the end timestamp\n super.finish(endTimestamp);\n\n const client = this._hub.getClient();\n if (client && client.emit) {\n client.emit('finishTransaction', this);\n }\n\n if (this.sampled !== true) {\n // At this point if `sampled !== true` we want to discard the transaction.\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');\n\n if (client) {\n client.recordDroppedEvent('sample_rate', 'transaction');\n }\n\n return undefined;\n }\n\n const finishedSpans = this.spanRecorder ? this.spanRecorder.spans.filter(s => s !== this && s.endTimestamp) : [];\n\n if (this._trimEnd && finishedSpans.length > 0) {\n this.endTimestamp = finishedSpans.reduce((prev, current) => {\n if (prev.endTimestamp && current.endTimestamp) {\n return prev.endTimestamp > current.endTimestamp ? prev : current;\n }\n return prev;\n }).endTimestamp;\n }\n\n const metadata = this.metadata;\n\n const transaction = {\n contexts: {\n ...this._contexts,\n // We don't want to override trace context\n trace: this.getTraceContext(),\n },\n spans: finishedSpans,\n start_timestamp: this.startTimestamp,\n tags: this.tags,\n timestamp: this.endTimestamp,\n transaction: this.name,\n type: 'transaction',\n sdkProcessingMetadata: {\n ...metadata,\n dynamicSamplingContext: this.getDynamicSamplingContext(),\n },\n ...(metadata.source && {\n transaction_info: {\n source: metadata.source,\n },\n }),\n };\n\n const hasMeasurements = Object.keys(this._measurements).length > 0;\n\n if (hasMeasurements) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(\n '[Measurements] Adding measurements to transaction',\n JSON.stringify(this._measurements, undefined, 2),\n );\n transaction.measurements = this._measurements;\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`);\n\n return transaction;\n }\n}\n\nexport { Transaction };\n//# sourceMappingURL=transaction.js.map\n","import type {\n Context,\n Contexts,\n DynamicSamplingContext,\n Measurements,\n MeasurementUnit,\n Transaction as TransactionInterface,\n TransactionContext,\n TransactionEvent,\n TransactionMetadata,\n} from '@sentry/types';\nimport { dropUndefinedKeys, logger } from '@sentry/utils';\n\nimport type { Hub } from '../hub';\nimport { getCurrentHub } from '../hub';\nimport { getDynamicSamplingContextFromClient } from './dynamicSamplingContext';\nimport { Span as SpanClass, SpanRecorder } from './span';\n\n/** JSDoc */\nexport class Transaction extends SpanClass implements TransactionInterface {\n public metadata: TransactionMetadata;\n\n /**\n * The reference to the current hub.\n */\n public _hub: Hub;\n\n private _name: string;\n\n private _measurements: Measurements;\n\n private _contexts: Contexts;\n\n private _trimEnd?: boolean;\n\n private _frozenDynamicSamplingContext: Readonly> | undefined;\n\n /**\n * This constructor should never be called manually. Those instrumenting tracing should use\n * `Sentry.startTransaction()`, and internal methods should use `hub.startTransaction()`.\n * @internal\n * @hideconstructor\n * @hidden\n */\n public constructor(transactionContext: TransactionContext, hub?: Hub) {\n super(transactionContext);\n // We need to delete description since it's set by the Span class constructor\n // but not needed for transactions.\n delete this.description;\n\n this._measurements = {};\n this._contexts = {};\n\n this._hub = hub || getCurrentHub();\n\n this._name = transactionContext.name || '';\n\n this.metadata = {\n source: 'custom',\n ...transactionContext.metadata,\n spanMetadata: {},\n };\n\n this._trimEnd = transactionContext.trimEnd;\n\n // this is because transactions are also spans, and spans have a transaction pointer\n this.transaction = this;\n\n // If Dynamic Sampling Context is provided during the creation of the transaction, we freeze it as it usually means\n // there is incoming Dynamic Sampling Context. (Either through an incoming request, a baggage meta-tag, or other means)\n const incomingDynamicSamplingContext = this.metadata.dynamicSamplingContext;\n if (incomingDynamicSamplingContext) {\n // We shallow copy this in case anything writes to the original reference of the passed in `dynamicSamplingContext`\n this._frozenDynamicSamplingContext = { ...incomingDynamicSamplingContext };\n }\n }\n\n /** Getter for `name` property */\n public get name(): string {\n return this._name;\n }\n\n /** Setter for `name` property, which also sets `source` as custom */\n public set name(newName: string) {\n this.setName(newName);\n }\n\n /**\n * JSDoc\n */\n public setName(name: string, source: TransactionMetadata['source'] = 'custom'): void {\n this._name = name;\n this.metadata.source = source;\n }\n\n /**\n * Attaches SpanRecorder to the span itself\n * @param maxlen maximum number of spans that can be recorded\n */\n public initSpanRecorder(maxlen: number = 1000): void {\n if (!this.spanRecorder) {\n this.spanRecorder = new SpanRecorder(maxlen);\n }\n this.spanRecorder.add(this);\n }\n\n /**\n * @inheritDoc\n */\n public setContext(key: string, context: Context | null): void {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n }\n\n /**\n * @inheritDoc\n */\n public setMeasurement(name: string, value: number, unit: MeasurementUnit = ''): void {\n this._measurements[name] = { value, unit };\n }\n\n /**\n * @inheritDoc\n */\n public setMetadata(newMetadata: Partial): void {\n this.metadata = { ...this.metadata, ...newMetadata };\n }\n\n /**\n * @inheritDoc\n */\n public finish(endTimestamp?: number): string | undefined {\n const transaction = this._finishTransaction(endTimestamp);\n if (!transaction) {\n return undefined;\n }\n return this._hub.captureEvent(transaction);\n }\n\n /**\n * @inheritDoc\n */\n public toContext(): TransactionContext {\n const spanContext = super.toContext();\n\n return dropUndefinedKeys({\n ...spanContext,\n name: this.name,\n trimEnd: this._trimEnd,\n });\n }\n\n /**\n * @inheritDoc\n */\n public updateWithContext(transactionContext: TransactionContext): this {\n super.updateWithContext(transactionContext);\n\n this.name = transactionContext.name || '';\n\n this._trimEnd = transactionContext.trimEnd;\n\n return this;\n }\n\n /**\n * @inheritdoc\n *\n * @experimental\n */\n public getDynamicSamplingContext(): Readonly> {\n if (this._frozenDynamicSamplingContext) {\n return this._frozenDynamicSamplingContext;\n }\n\n const hub = this._hub || getCurrentHub();\n const client = hub.getClient();\n\n if (!client) return {};\n\n const scope = hub.getScope();\n const dsc = getDynamicSamplingContextFromClient(this.traceId, client, scope);\n\n const maybeSampleRate = this.metadata.sampleRate;\n if (maybeSampleRate !== undefined) {\n dsc.sample_rate = `${maybeSampleRate}`;\n }\n\n // We don't want to have a transaction name in the DSC if the source is \"url\" because URLs might contain PII\n const source = this.metadata.source;\n if (source && source !== 'url') {\n dsc.transaction = this.name;\n }\n\n if (this.sampled !== undefined) {\n dsc.sampled = String(this.sampled);\n }\n\n // Uncomment if we want to make DSC immutable\n // this._frozenDynamicSamplingContext = dsc;\n\n return dsc;\n }\n\n /**\n * Override the current hub with a new one.\n * Used if you want another hub to finish the transaction.\n *\n * @internal\n */\n public setHub(hub: Hub): void {\n this._hub = hub;\n }\n\n /**\n * Finish the transaction & prepare the event to send to Sentry.\n */\n protected _finishTransaction(endTimestamp?: number): TransactionEvent | undefined {\n // This transaction is already finished, so we should not flush it again.\n if (this.endTimestamp !== undefined) {\n return undefined;\n }\n\n if (!this.name) {\n __DEBUG_BUILD__ && logger.warn('Transaction has no name, falling back to ``.');\n this.name = '';\n }\n\n // just sets the end timestamp\n super.finish(endTimestamp);\n\n const client = this._hub.getClient();\n if (client && client.emit) {\n client.emit('finishTransaction', this);\n }\n\n if (this.sampled !== true) {\n // At this point if `sampled !== true` we want to discard the transaction.\n __DEBUG_BUILD__ && logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');\n\n if (client) {\n client.recordDroppedEvent('sample_rate', 'transaction');\n }\n\n return undefined;\n }\n\n const finishedSpans = this.spanRecorder ? this.spanRecorder.spans.filter(s => s !== this && s.endTimestamp) : [];\n\n if (this._trimEnd && finishedSpans.length > 0) {\n this.endTimestamp = finishedSpans.reduce((prev: SpanClass, current: SpanClass) => {\n if (prev.endTimestamp && current.endTimestamp) {\n return prev.endTimestamp > current.endTimestamp ? prev : current;\n }\n return prev;\n }).endTimestamp;\n }\n\n const metadata = this.metadata;\n\n const transaction: TransactionEvent = {\n contexts: {\n ...this._contexts,\n // We don't want to override trace context\n trace: this.getTraceContext(),\n },\n spans: finishedSpans,\n start_timestamp: this.startTimestamp,\n tags: this.tags,\n timestamp: this.endTimestamp,\n transaction: this.name,\n type: 'transaction',\n sdkProcessingMetadata: {\n ...metadata,\n dynamicSamplingContext: this.getDynamicSamplingContext(),\n },\n ...(metadata.source && {\n transaction_info: {\n source: metadata.source,\n },\n }),\n };\n\n const hasMeasurements = Object.keys(this._measurements).length > 0;\n\n if (hasMeasurements) {\n __DEBUG_BUILD__ &&\n logger.log(\n '[Measurements] Adding measurements to transaction',\n JSON.stringify(this._measurements, undefined, 2),\n );\n transaction.measurements = this._measurements;\n }\n\n __DEBUG_BUILD__ && logger.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`);\n\n return transaction;\n }\n}\n","import { logger, isNaN } from '@sentry/utils';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\n\n/**\n * Makes a sampling decision for the given transaction and stores it on the transaction.\n *\n * Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n *\n * This method muttes the given `transaction` and will set the `sampled` value on it.\n * It returns the same transaction, for convenience.\n */\nfunction sampleTransaction(\n transaction,\n options,\n samplingContext,\n) {\n // nothing to do if tracing is not enabled\n if (!hasTracingEnabled(options)) {\n transaction.sampled = false;\n return transaction;\n }\n\n // if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that\n if (transaction.sampled !== undefined) {\n transaction.setMetadata({\n sampleRate: Number(transaction.sampled),\n });\n return transaction;\n }\n\n // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` nor `enableTracing` were defined, so one of these should\n // work; prefer the hook if so\n let sampleRate;\n if (typeof options.tracesSampler === 'function') {\n sampleRate = options.tracesSampler(samplingContext);\n transaction.setMetadata({\n sampleRate: Number(sampleRate),\n });\n } else if (samplingContext.parentSampled !== undefined) {\n sampleRate = samplingContext.parentSampled;\n } else if (typeof options.tracesSampleRate !== 'undefined') {\n sampleRate = options.tracesSampleRate;\n transaction.setMetadata({\n sampleRate: Number(sampleRate),\n });\n } else {\n // When `enableTracing === true`, we use a sample rate of 100%\n sampleRate = 1;\n transaction.setMetadata({\n sampleRate,\n });\n }\n\n // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The\n // only valid values are booleans or numbers between 0 and 1.)\n if (!isValidSampleRate(sampleRate)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('[Tracing] Discarding transaction because of invalid sample rate.');\n transaction.sampled = false;\n return transaction;\n }\n\n // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n if (!sampleRate) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(\n `[Tracing] Discarding transaction because ${\n typeof options.tracesSampler === 'function'\n ? 'tracesSampler returned 0 or false'\n : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'\n }`,\n );\n transaction.sampled = false;\n return transaction;\n }\n\n // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is\n // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.\n transaction.sampled = Math.random() < (sampleRate );\n\n // if we're not going to keep it, we're done\n if (!transaction.sampled) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(\n `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(\n sampleRate,\n )})`,\n );\n return transaction;\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] starting ${transaction.op} transaction - ${transaction.name}`);\n return transaction;\n}\n\n/**\n * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).\n */\nfunction isValidSampleRate(rate) {\n // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isNaN(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(\n rate,\n )} of type ${JSON.stringify(typeof rate)}.`,\n );\n return false;\n }\n\n // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false\n if (rate < 0 || rate > 1) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${rate}.`);\n return false;\n }\n return true;\n}\n\nexport { sampleTransaction };\n//# sourceMappingURL=sampling.js.map\n","import type { Options, SamplingContext } from '@sentry/types';\nimport { isNaN, logger } from '@sentry/utils';\n\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled';\nimport type { Transaction } from './transaction';\n\n/**\n * Makes a sampling decision for the given transaction and stores it on the transaction.\n *\n * Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n *\n * This method muttes the given `transaction` and will set the `sampled` value on it.\n * It returns the same transaction, for convenience.\n */\nexport function sampleTransaction(\n transaction: T,\n options: Pick,\n samplingContext: SamplingContext,\n): T {\n // nothing to do if tracing is not enabled\n if (!hasTracingEnabled(options)) {\n transaction.sampled = false;\n return transaction;\n }\n\n // if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that\n if (transaction.sampled !== undefined) {\n transaction.setMetadata({\n sampleRate: Number(transaction.sampled),\n });\n return transaction;\n }\n\n // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` nor `enableTracing` were defined, so one of these should\n // work; prefer the hook if so\n let sampleRate;\n if (typeof options.tracesSampler === 'function') {\n sampleRate = options.tracesSampler(samplingContext);\n transaction.setMetadata({\n sampleRate: Number(sampleRate),\n });\n } else if (samplingContext.parentSampled !== undefined) {\n sampleRate = samplingContext.parentSampled;\n } else if (typeof options.tracesSampleRate !== 'undefined') {\n sampleRate = options.tracesSampleRate;\n transaction.setMetadata({\n sampleRate: Number(sampleRate),\n });\n } else {\n // When `enableTracing === true`, we use a sample rate of 100%\n sampleRate = 1;\n transaction.setMetadata({\n sampleRate,\n });\n }\n\n // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The\n // only valid values are booleans or numbers between 0 and 1.)\n if (!isValidSampleRate(sampleRate)) {\n __DEBUG_BUILD__ && logger.warn('[Tracing] Discarding transaction because of invalid sample rate.');\n transaction.sampled = false;\n return transaction;\n }\n\n // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n if (!sampleRate) {\n __DEBUG_BUILD__ &&\n logger.log(\n `[Tracing] Discarding transaction because ${\n typeof options.tracesSampler === 'function'\n ? 'tracesSampler returned 0 or false'\n : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'\n }`,\n );\n transaction.sampled = false;\n return transaction;\n }\n\n // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is\n // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.\n transaction.sampled = Math.random() < (sampleRate as number | boolean);\n\n // if we're not going to keep it, we're done\n if (!transaction.sampled) {\n __DEBUG_BUILD__ &&\n logger.log(\n `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(\n sampleRate,\n )})`,\n );\n return transaction;\n }\n\n __DEBUG_BUILD__ && logger.log(`[Tracing] starting ${transaction.op} transaction - ${transaction.name}`);\n return transaction;\n}\n\n/**\n * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).\n */\nfunction isValidSampleRate(rate: unknown): boolean {\n // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isNaN(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(\n rate,\n )} of type ${JSON.stringify(typeof rate)}.`,\n );\n return false;\n }\n\n // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false\n if (rate < 0 || rate > 1) {\n __DEBUG_BUILD__ &&\n logger.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${rate}.`);\n return false;\n }\n return true;\n}\n","import { getCurrentHub } from '../hub.js';\n\n// Treeshakable guard to remove all code related to tracing\n\n/**\n * Determines if tracing is currently enabled.\n *\n * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.\n */\nfunction hasTracingEnabled(\n maybeOptions,\n) {\n if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) {\n return false;\n }\n\n const client = getCurrentHub().getClient();\n const options = maybeOptions || (client && client.getOptions());\n return !!options && (options.enableTracing || 'tracesSampleRate' in options || 'tracesSampler' in options);\n}\n\nexport { hasTracingEnabled };\n//# sourceMappingURL=hasTracingEnabled.js.map\n","import type { Options } from '@sentry/types';\n\nimport { getCurrentHub } from '../hub';\n\n// Treeshakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean | undefined;\n\n/**\n * Determines if tracing is currently enabled.\n *\n * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.\n */\nexport function hasTracingEnabled(\n maybeOptions?: Pick | undefined,\n): boolean {\n if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) {\n return false;\n }\n\n const client = getCurrentHub().getClient();\n const options = maybeOptions || (client && client.getOptions());\n return !!options && (options.enableTracing || 'tracesSampleRate' in options || 'tracesSampler' in options);\n}\n","import { _optionalChain } from '@sentry/utils';\nimport { loadModule, logger, fill, arrayify, isThenable } from '@sentry/utils';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils.js';\n\n/** Tracing integration for Apollo */\nclass Apollo {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Apollo';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n constructor(\n options = {\n useNestjs: false,\n },\n ) {\n this.name = Apollo.id;\n this._useNest = !!options.useNestjs;\n }\n\n /** @inheritdoc */\n loadDependency() {\n if (this._useNest) {\n this._module = this._module || loadModule('@nestjs/graphql');\n } else {\n this._module = this._module || loadModule('apollo-server-core');\n }\n\n return this._module;\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Apollo Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n if (this._useNest) {\n const pkg = this.loadDependency();\n\n if (!pkg) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Apollo-NestJS Integration was unable to require @nestjs/graphql package.');\n return;\n }\n\n /**\n * Iterate over resolvers of NestJS ResolversExplorerService before schemas are constructed.\n */\n fill(\n pkg.GraphQLFactory.prototype,\n 'mergeWithSchema',\n function (orig) {\n return function (\n\n ...args\n ) {\n fill(this.resolversExplorerService, 'explore', function (orig) {\n return function () {\n const resolvers = arrayify(orig.call(this));\n\n const instrumentedResolvers = instrumentResolvers(resolvers, getCurrentHub);\n\n return instrumentedResolvers;\n };\n });\n\n return orig.call(this, ...args);\n };\n },\n );\n } else {\n const pkg = this.loadDependency();\n\n if (!pkg) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Apollo Integration was unable to require apollo-server-core package.');\n return;\n }\n\n /**\n * Iterate over resolvers of the ApolloServer instance before schemas are constructed.\n */\n fill(pkg.ApolloServerBase.prototype, 'constructSchema', function (orig) {\n return function (\n\n) {\n if (!this.config.resolvers) {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n if (this.config.schema) {\n logger.warn(\n 'Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.' +\n 'If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead.',\n );\n logger.warn();\n } else if (this.config.modules) {\n logger.warn(\n 'Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property.',\n );\n }\n\n logger.error('Skipping tracing as no resolvers found on the `ApolloServer` instance.');\n }\n\n return orig.call(this);\n }\n\n const resolvers = arrayify(this.config.resolvers);\n\n this.config.resolvers = instrumentResolvers(resolvers, getCurrentHub);\n\n return orig.call(this);\n };\n });\n }\n }\n}Apollo.__initStatic();\n\nfunction instrumentResolvers(resolvers, getCurrentHub) {\n return resolvers.map(model => {\n Object.keys(model).forEach(resolverGroupName => {\n Object.keys(model[resolverGroupName]).forEach(resolverName => {\n if (typeof model[resolverGroupName][resolverName] !== 'function') {\n return;\n }\n\n wrapResolver(model, resolverGroupName, resolverName, getCurrentHub);\n });\n });\n\n return model;\n });\n}\n\n/**\n * Wrap a single resolver which can be a parent of other resolvers and/or db operations.\n */\nfunction wrapResolver(\n model,\n resolverGroupName,\n resolverName,\n getCurrentHub,\n) {\n fill(model[resolverGroupName], resolverName, function (orig) {\n return function ( ...args) {\n const scope = getCurrentHub().getScope();\n const parentSpan = scope.getSpan();\n const span = _optionalChain([parentSpan, 'optionalAccess', _2 => _2.startChild, 'call', _3 => _3({\n description: `${resolverGroupName}.${resolverName}`,\n op: 'graphql.resolve',\n origin: 'auto.graphql.apollo',\n })]);\n\n const rv = orig.call(this, ...args);\n\n if (isThenable(rv)) {\n return rv.then((res) => {\n _optionalChain([span, 'optionalAccess', _4 => _4.finish, 'call', _5 => _5()]);\n return res;\n });\n }\n\n _optionalChain([span, 'optionalAccess', _6 => _6.finish, 'call', _7 => _7()]);\n\n return rv;\n };\n });\n}\n\nexport { Apollo };\n//# sourceMappingURL=apollo.js.map\n","import type { Hub } from '@sentry/core';\nimport type { EventProcessor } from '@sentry/types';\nimport { arrayify, fill, isThenable, loadModule, logger } from '@sentry/utils';\n\nimport type { LazyLoadedIntegration } from './lazy';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils';\n\ninterface ApolloOptions {\n useNestjs?: boolean;\n}\n\ntype ApolloResolverGroup = {\n [key: string]: () => unknown;\n};\n\ntype ApolloModelResolvers = {\n [key: string]: ApolloResolverGroup;\n};\n\ntype GraphQLModule = {\n GraphQLFactory: {\n prototype: {\n create: (resolvers: ApolloModelResolvers[]) => unknown;\n };\n };\n};\n\ntype ApolloModule = {\n ApolloServerBase: {\n prototype: {\n constructSchema: (config: unknown) => unknown;\n };\n };\n};\n\n/** Tracing integration for Apollo */\nexport class Apollo implements LazyLoadedIntegration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Apollo';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n private readonly _useNest: boolean;\n\n private _module?: GraphQLModule & ApolloModule;\n\n /**\n * @inheritDoc\n */\n public constructor(\n options: ApolloOptions = {\n useNestjs: false,\n },\n ) {\n this.name = Apollo.id;\n this._useNest = !!options.useNestjs;\n }\n\n /** @inheritdoc */\n public loadDependency(): (GraphQLModule & ApolloModule) | undefined {\n if (this._useNest) {\n this._module = this._module || loadModule('@nestjs/graphql');\n } else {\n this._module = this._module || loadModule('apollo-server-core');\n }\n\n return this._module;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n __DEBUG_BUILD__ && logger.log('Apollo Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n if (this._useNest) {\n const pkg = this.loadDependency();\n\n if (!pkg) {\n __DEBUG_BUILD__ && logger.error('Apollo-NestJS Integration was unable to require @nestjs/graphql package.');\n return;\n }\n\n /**\n * Iterate over resolvers of NestJS ResolversExplorerService before schemas are constructed.\n */\n fill(\n pkg.GraphQLFactory.prototype,\n 'mergeWithSchema',\n function (orig: (this: unknown, ...args: unknown[]) => unknown) {\n return function (\n this: { resolversExplorerService: { explore: () => ApolloModelResolvers[] } },\n ...args: unknown[]\n ) {\n fill(this.resolversExplorerService, 'explore', function (orig: () => ApolloModelResolvers[]) {\n return function (this: unknown) {\n const resolvers = arrayify(orig.call(this));\n\n const instrumentedResolvers = instrumentResolvers(resolvers, getCurrentHub);\n\n return instrumentedResolvers;\n };\n });\n\n return orig.call(this, ...args);\n };\n },\n );\n } else {\n const pkg = this.loadDependency();\n\n if (!pkg) {\n __DEBUG_BUILD__ && logger.error('Apollo Integration was unable to require apollo-server-core package.');\n return;\n }\n\n /**\n * Iterate over resolvers of the ApolloServer instance before schemas are constructed.\n */\n fill(pkg.ApolloServerBase.prototype, 'constructSchema', function (orig: (config: unknown) => unknown) {\n return function (this: {\n config: { resolvers?: ApolloModelResolvers[]; schema?: unknown; modules?: unknown };\n }) {\n if (!this.config.resolvers) {\n if (__DEBUG_BUILD__) {\n if (this.config.schema) {\n logger.warn(\n 'Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.' +\n 'If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead.',\n );\n logger.warn();\n } else if (this.config.modules) {\n logger.warn(\n 'Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property.',\n );\n }\n\n logger.error('Skipping tracing as no resolvers found on the `ApolloServer` instance.');\n }\n\n return orig.call(this);\n }\n\n const resolvers = arrayify(this.config.resolvers);\n\n this.config.resolvers = instrumentResolvers(resolvers, getCurrentHub);\n\n return orig.call(this);\n };\n });\n }\n }\n}\n\nfunction instrumentResolvers(resolvers: ApolloModelResolvers[], getCurrentHub: () => Hub): ApolloModelResolvers[] {\n return resolvers.map(model => {\n Object.keys(model).forEach(resolverGroupName => {\n Object.keys(model[resolverGroupName]).forEach(resolverName => {\n if (typeof model[resolverGroupName][resolverName] !== 'function') {\n return;\n }\n\n wrapResolver(model, resolverGroupName, resolverName, getCurrentHub);\n });\n });\n\n return model;\n });\n}\n\n/**\n * Wrap a single resolver which can be a parent of other resolvers and/or db operations.\n */\nfunction wrapResolver(\n model: ApolloModelResolvers,\n resolverGroupName: string,\n resolverName: string,\n getCurrentHub: () => Hub,\n): void {\n fill(model[resolverGroupName], resolverName, function (orig: () => unknown | Promise) {\n return function (this: unknown, ...args: unknown[]) {\n const scope = getCurrentHub().getScope();\n const parentSpan = scope.getSpan();\n const span = parentSpan?.startChild({\n description: `${resolverGroupName}.${resolverName}`,\n op: 'graphql.resolve',\n origin: 'auto.graphql.apollo',\n });\n\n const rv = orig.call(this, ...args);\n\n if (isThenable(rv)) {\n return rv.then((res: unknown) => {\n span?.finish();\n return res;\n });\n }\n\n span?.finish();\n\n return rv;\n };\n });\n}\n","/**\n * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values,\n * descriptors, and functions.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase)\n * See https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15\n *\n * @param ops Array result of expression conversion\n * @returns The value of the expression\n */\nfunction _optionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i] ;\n const fn = ops[i + 1] ;\n i += 2;\n // by checking for loose equality to `null`, we catch both `null` and `undefined`\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n // really we're meaning to return `undefined` as an actual value here, but it saves bytes not to write it\n return;\n }\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn((...args) => (value ).call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n}\n\n// Sucrase version\n// function _optionalChain(ops) {\n// let lastAccessLHS = undefined;\n// let value = ops[0];\n// let i = 1;\n// while (i < ops.length) {\n// const op = ops[i];\n// const fn = ops[i + 1];\n// i += 2;\n// if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n// return undefined;\n// }\n// if (op === 'access' || op === 'optionalAccess') {\n// lastAccessLHS = value;\n// value = fn(value);\n// } else if (op === 'call' || op === 'optionalCall') {\n// value = fn((...args) => value.call(lastAccessLHS, ...args));\n// lastAccessLHS = undefined;\n// }\n// }\n// return value;\n// }\n\nexport { _optionalChain };\n//# sourceMappingURL=_optionalChain.js.map\n","// https://github.com/alangpierce/sucrase/tree/265887868966917f3b924ce38dfad01fbab1329f\n//\n// The MIT License (MIT)\n//\n// Copyright (c) 2012-2018 various contributors (see AUTHORS)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\nimport type { GenericFunction } from './types';\n\n/**\n * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values,\n * descriptors, and functions.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase)\n * See https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15\n *\n * @param ops Array result of expression conversion\n * @returns The value of the expression\n */\nexport function _optionalChain(ops: unknown[]): unknown {\n let lastAccessLHS: unknown = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i] as string;\n const fn = ops[i + 1] as (intermediateValue: unknown) => unknown;\n i += 2;\n // by checking for loose equality to `null`, we catch both `null` and `undefined`\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n // really we're meaning to return `undefined` as an actual value here, but it saves bytes not to write it\n return;\n }\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn((...args: unknown[]) => (value as GenericFunction).call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n}\n\n// Sucrase version\n// function _optionalChain(ops) {\n// let lastAccessLHS = undefined;\n// let value = ops[0];\n// let i = 1;\n// while (i < ops.length) {\n// const op = ops[i];\n// const fn = ops[i + 1];\n// i += 2;\n// if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n// return undefined;\n// }\n// if (op === 'access' || op === 'optionalAccess') {\n// lastAccessLHS = value;\n// value = fn(value);\n// } else if (op === 'call' || op === 'optionalCall') {\n// value = fn((...args) => value.call(lastAccessLHS, ...args));\n// lastAccessLHS = undefined;\n// }\n// }\n// return value;\n// }\n","import { _optionalChain } from '@sentry/utils';\n\n/**\n * Check if Sentry auto-instrumentation should be disabled.\n *\n * @param getCurrentHub A method to fetch the current hub\n * @returns boolean\n */\nfunction shouldDisableAutoInstrumentation(getCurrentHub) {\n const clientOptions = _optionalChain([getCurrentHub, 'call', _ => _(), 'access', _2 => _2.getClient, 'call', _3 => _3(), 'optionalAccess', _4 => _4.getOptions, 'call', _5 => _5()]);\n const instrumenter = _optionalChain([clientOptions, 'optionalAccess', _6 => _6.instrumenter]) || 'sentry';\n\n return instrumenter !== 'sentry';\n}\n\nexport { shouldDisableAutoInstrumentation };\n//# sourceMappingURL=node-utils.js.map\n","import type { Hub } from '@sentry/types';\n\n/**\n * Check if Sentry auto-instrumentation should be disabled.\n *\n * @param getCurrentHub A method to fetch the current hub\n * @returns boolean\n */\nexport function shouldDisableAutoInstrumentation(getCurrentHub: () => Hub): boolean {\n const clientOptions = getCurrentHub().getClient()?.getOptions();\n const instrumenter = clientOptions?.instrumenter || 'sentry';\n\n return instrumenter !== 'sentry';\n}\n","import { TRACING_DEFAULTS, addTracingExtensions, startIdleTransaction, getActiveTransaction } from '@sentry/core';\nimport { logger, tracingContextFromHeaders, getDomElement } from '@sentry/utils';\nimport { registerBackgroundTabDetection } from './backgroundtab.js';\nimport { startTrackingWebVitals, startTrackingLongTasks, startTrackingInteractions, addPerformanceEntries } from './metrics/index.js';\nimport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './request.js';\nimport { instrumentRoutingWithDefaults } from './router.js';\nimport { WINDOW } from './types.js';\n\nconst BROWSER_TRACING_INTEGRATION_ID = 'BrowserTracing';\n\n/** Options for Browser Tracing integration */\n\nconst DEFAULT_BROWSER_TRACING_OPTIONS = {\n ...TRACING_DEFAULTS,\n markBackgroundTransactions: true,\n routingInstrumentation: instrumentRoutingWithDefaults,\n startTransactionOnLocationChange: true,\n startTransactionOnPageLoad: true,\n enableLongTask: true,\n _experiments: {},\n ...defaultRequestInstrumentationOptions,\n};\n\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library. This integration uses {@see IdleTransaction} to create transactions.\n */\nclass BrowserTracing {\n // This class currently doesn't have a static `id` field like the other integration classes, because it prevented\n // @sentry/tracing from being treeshaken. Tree shakers do not like static fields, because they behave like side effects.\n // TODO: Come up with a better plan, than using static fields on integration classes, and use that plan on all\n // integrations.\n\n /** Browser Tracing integration options */\n\n /**\n * @inheritDoc\n */\n\n constructor(_options) {\n this.name = BROWSER_TRACING_INTEGRATION_ID;\n this._hasSetTracePropagationTargets = false;\n\n addTracingExtensions();\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n this._hasSetTracePropagationTargets = !!(\n _options &&\n // eslint-disable-next-line deprecation/deprecation\n (_options.tracePropagationTargets || _options.tracingOrigins)\n );\n }\n\n this.options = {\n ...DEFAULT_BROWSER_TRACING_OPTIONS,\n ..._options,\n };\n\n // Special case: enableLongTask can be set in _experiments\n // TODO (v8): Remove this in v8\n if (this.options._experiments.enableLongTask !== undefined) {\n this.options.enableLongTask = this.options._experiments.enableLongTask;\n }\n\n // TODO (v8): remove this block after tracingOrigins is removed\n // Set tracePropagationTargets to tracingOrigins if specified by the user\n // In case both are specified, tracePropagationTargets takes precedence\n // eslint-disable-next-line deprecation/deprecation\n if (_options && !_options.tracePropagationTargets && _options.tracingOrigins) {\n // eslint-disable-next-line deprecation/deprecation\n this.options.tracePropagationTargets = _options.tracingOrigins;\n }\n\n this._collectWebVitals = startTrackingWebVitals();\n if (this.options.enableLongTask) {\n startTrackingLongTasks();\n }\n if (this.options._experiments.enableInteractions) {\n startTrackingInteractions();\n }\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n this._getCurrentHub = getCurrentHub;\n const hub = getCurrentHub();\n const client = hub.getClient();\n const clientOptions = client && client.getOptions();\n\n const {\n routingInstrumentation: instrumentRouting,\n startTransactionOnLocationChange,\n startTransactionOnPageLoad,\n markBackgroundTransactions,\n traceFetch,\n traceXHR,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n _experiments,\n } = this.options;\n\n const clientOptionsTracePropagationTargets = clientOptions && clientOptions.tracePropagationTargets;\n // There are three ways to configure tracePropagationTargets:\n // 1. via top level client option `tracePropagationTargets`\n // 2. via BrowserTracing option `tracePropagationTargets`\n // 3. via BrowserTracing option `tracingOrigins` (deprecated)\n //\n // To avoid confusion, favour top level client option `tracePropagationTargets`, and fallback to\n // BrowserTracing option `tracePropagationTargets` and then `tracingOrigins` (deprecated).\n // This is done as it minimizes bundle size (we don't have to have undefined checks).\n //\n // If both 1 and either one of 2 or 3 are set (from above), we log out a warning.\n // eslint-disable-next-line deprecation/deprecation\n const tracePropagationTargets = clientOptionsTracePropagationTargets || this.options.tracePropagationTargets;\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && this._hasSetTracePropagationTargets && clientOptionsTracePropagationTargets) {\n logger.warn(\n '[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.',\n );\n }\n\n instrumentRouting(\n (context) => {\n const transaction = this._createRouteTransaction(context);\n\n this.options._experiments.onStartRouteTransaction &&\n this.options._experiments.onStartRouteTransaction(transaction, context, getCurrentHub);\n\n return transaction;\n },\n startTransactionOnPageLoad,\n startTransactionOnLocationChange,\n );\n\n if (markBackgroundTransactions) {\n registerBackgroundTabDetection();\n }\n\n if (_experiments.enableInteractions) {\n this._registerInteractionListener();\n }\n\n instrumentOutgoingRequests({\n traceFetch,\n traceXHR,\n tracePropagationTargets,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n });\n }\n\n /** Create routing idle transaction. */\n _createRouteTransaction(context) {\n if (!this._getCurrentHub) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(`[Tracing] Did not create ${context.op} transaction because _getCurrentHub is invalid.`);\n return undefined;\n }\n\n const hub = this._getCurrentHub();\n\n const { beforeNavigate, idleTimeout, finalTimeout, heartbeatInterval } = this.options;\n\n const isPageloadTransaction = context.op === 'pageload';\n\n const sentryTrace = isPageloadTransaction ? getMetaContent('sentry-trace') : '';\n const baggage = isPageloadTransaction ? getMetaContent('baggage') : '';\n const { traceparentData, dynamicSamplingContext, propagationContext } = tracingContextFromHeaders(\n sentryTrace,\n baggage,\n );\n\n const expandedContext = {\n ...context,\n ...traceparentData,\n metadata: {\n ...context.metadata,\n dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext,\n },\n trimEnd: true,\n };\n\n const modifiedContext = typeof beforeNavigate === 'function' ? beforeNavigate(expandedContext) : expandedContext;\n\n // For backwards compatibility reasons, beforeNavigate can return undefined to \"drop\" the transaction (prevent it\n // from being sent to Sentry).\n const finalContext = modifiedContext === undefined ? { ...expandedContext, sampled: false } : modifiedContext;\n\n // If `beforeNavigate` set a custom name, record that fact\n finalContext.metadata =\n finalContext.name !== expandedContext.name\n ? { ...finalContext.metadata, source: 'custom' }\n : finalContext.metadata;\n\n this._latestRouteName = finalContext.name;\n this._latestRouteSource = finalContext.metadata && finalContext.metadata.source;\n\n if (finalContext.sampled === false) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(`[Tracing] Will not send ${finalContext.op} transaction because of beforeNavigate.`);\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] Starting ${finalContext.op} transaction on scope`);\n\n const { location } = WINDOW;\n\n const idleTransaction = startIdleTransaction(\n hub,\n finalContext,\n idleTimeout,\n finalTimeout,\n true,\n { location }, // for use in the tracesSampler\n heartbeatInterval,\n );\n\n const scope = hub.getScope();\n\n // If it's a pageload and there is a meta tag set\n // use the traceparentData as the propagation context\n if (isPageloadTransaction && traceparentData) {\n scope.setPropagationContext(propagationContext);\n } else {\n // Navigation transactions should set a new propagation context based on the\n // created idle transaction.\n scope.setPropagationContext({\n traceId: idleTransaction.traceId,\n spanId: idleTransaction.spanId,\n parentSpanId: idleTransaction.parentSpanId,\n sampled: idleTransaction.sampled,\n });\n }\n\n idleTransaction.registerBeforeFinishCallback(transaction => {\n this._collectWebVitals();\n addPerformanceEntries(transaction);\n });\n\n return idleTransaction ;\n }\n\n /** Start listener for interaction transactions */\n _registerInteractionListener() {\n let inflightInteractionTransaction;\n const registerInteractionTransaction = () => {\n const { idleTimeout, finalTimeout, heartbeatInterval } = this.options;\n const op = 'ui.action.click';\n\n const currentTransaction = getActiveTransaction();\n if (currentTransaction && currentTransaction.op && ['navigation', 'pageload'].includes(currentTransaction.op)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `[Tracing] Did not create ${op} transaction because a pageload or navigation transaction is in progress.`,\n );\n return undefined;\n }\n\n if (inflightInteractionTransaction) {\n inflightInteractionTransaction.setFinishReason('interactionInterrupted');\n inflightInteractionTransaction.finish();\n inflightInteractionTransaction = undefined;\n }\n\n if (!this._getCurrentHub) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`[Tracing] Did not create ${op} transaction because _getCurrentHub is invalid.`);\n return undefined;\n }\n\n if (!this._latestRouteName) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(`[Tracing] Did not create ${op} transaction because _latestRouteName is missing.`);\n return undefined;\n }\n\n const hub = this._getCurrentHub();\n const { location } = WINDOW;\n\n const context = {\n name: this._latestRouteName,\n op,\n trimEnd: true,\n metadata: {\n source: this._latestRouteSource || 'url',\n },\n };\n\n inflightInteractionTransaction = startIdleTransaction(\n hub,\n context,\n idleTimeout,\n finalTimeout,\n true,\n { location }, // for use in the tracesSampler\n heartbeatInterval,\n );\n };\n\n ['click'].forEach(type => {\n addEventListener(type, registerInteractionTransaction, { once: false, capture: true });\n });\n }\n}\n\n/** Returns the value of a meta tag */\nfunction getMetaContent(metaName) {\n // Can't specify generic to `getDomElement` because tracing can be used\n // in a variety of environments, have to disable `no-unsafe-member-access`\n // as a result.\n const metaTag = getDomElement(`meta[name=${metaName}]`);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return metaTag ? metaTag.getAttribute('content') : undefined;\n}\n\nexport { BROWSER_TRACING_INTEGRATION_ID, BrowserTracing, getMetaContent };\n//# sourceMappingURL=browsertracing.js.map\n","/* eslint-disable max-lines */\nimport type { Hub, IdleTransaction } from '@sentry/core';\nimport { addTracingExtensions, getActiveTransaction, startIdleTransaction, TRACING_DEFAULTS } from '@sentry/core';\nimport type { EventProcessor, Integration, Transaction, TransactionContext, TransactionSource } from '@sentry/types';\nimport { getDomElement, logger, tracingContextFromHeaders } from '@sentry/utils';\n\nimport { registerBackgroundTabDetection } from './backgroundtab';\nimport {\n addPerformanceEntries,\n startTrackingInteractions,\n startTrackingLongTasks,\n startTrackingWebVitals,\n} from './metrics';\nimport type { RequestInstrumentationOptions } from './request';\nimport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './request';\nimport { instrumentRoutingWithDefaults } from './router';\nimport { WINDOW } from './types';\n\nexport const BROWSER_TRACING_INTEGRATION_ID = 'BrowserTracing';\n\n/** Options for Browser Tracing integration */\nexport interface BrowserTracingOptions extends RequestInstrumentationOptions {\n /**\n * The time to wait in ms until the transaction will be finished during an idle state. An idle state is defined\n * by a moment where there are no in-progress spans.\n *\n * The transaction will use the end timestamp of the last finished span as the endtime for the transaction.\n * If there are still active spans when this the `idleTimeout` is set, the `idleTimeout` will get reset.\n * Time is in ms.\n *\n * Default: 1000\n */\n idleTimeout: number;\n\n /**\n * The max duration for a transaction. If a transaction duration hits the `finalTimeout` value, it\n * will be finished.\n * Time is in ms.\n *\n * Default: 30000\n */\n finalTimeout: number;\n\n /**\n * The heartbeat interval. If no new spans are started or open spans are finished within 3 heartbeats,\n * the transaction will be finished.\n * Time is in ms.\n *\n * Default: 5000\n */\n heartbeatInterval: number;\n\n /**\n * Flag to enable/disable creation of `navigation` transaction on history changes.\n *\n * Default: true\n */\n startTransactionOnLocationChange: boolean;\n\n /**\n * Flag to enable/disable creation of `pageload` transaction on first pageload.\n *\n * Default: true\n */\n startTransactionOnPageLoad: boolean;\n\n /**\n * Flag Transactions where tabs moved to background with \"cancelled\". Browser background tab timing is\n * not suited towards doing precise measurements of operations. By default, we recommend that this option\n * be enabled as background transactions can mess up your statistics in nondeterministic ways.\n *\n * Default: true\n */\n markBackgroundTransactions: boolean;\n\n /**\n * If true, Sentry will capture long tasks and add them to the corresponding transaction.\n *\n * Default: true\n */\n enableLongTask: boolean;\n\n /**\n * _metricOptions allows the user to send options to change how metrics are collected.\n *\n * _metricOptions is currently experimental.\n *\n * Default: undefined\n */\n _metricOptions?: Partial<{\n /**\n * @deprecated This property no longer has any effect and will be removed in v8.\n */\n _reportAllChanges: boolean;\n }>;\n\n /**\n * _experiments allows the user to send options to define how this integration works.\n * Note that the `enableLongTask` options is deprecated in favor of the option at the top level, and will be removed in v8.\n *\n * TODO (v8): Remove enableLongTask\n *\n * Default: undefined\n */\n _experiments: Partial<{\n enableLongTask: boolean;\n enableInteractions: boolean;\n onStartRouteTransaction: (t: Transaction | undefined, ctx: TransactionContext, getCurrentHub: () => Hub) => void;\n }>;\n\n /**\n * beforeNavigate is called before a pageload/navigation transaction is created and allows users to modify transaction\n * context data, or drop the transaction entirely (by setting `sampled = false` in the context).\n *\n * Note: For legacy reasons, transactions can also be dropped by returning `undefined`.\n *\n * @param context: The context data which will be passed to `startTransaction` by default\n *\n * @returns A (potentially) modified context object, with `sampled = false` if the transaction should be dropped.\n */\n beforeNavigate?(this: void, context: TransactionContext): TransactionContext | undefined;\n\n /**\n * Instrumentation that creates routing change transactions. By default creates\n * pageload and navigation transactions.\n */\n routingInstrumentation(\n this: void,\n customStartTransaction: (context: TransactionContext) => T | undefined,\n startTransactionOnPageLoad?: boolean,\n startTransactionOnLocationChange?: boolean,\n ): void;\n}\n\nconst DEFAULT_BROWSER_TRACING_OPTIONS: BrowserTracingOptions = {\n ...TRACING_DEFAULTS,\n markBackgroundTransactions: true,\n routingInstrumentation: instrumentRoutingWithDefaults,\n startTransactionOnLocationChange: true,\n startTransactionOnPageLoad: true,\n enableLongTask: true,\n _experiments: {},\n ...defaultRequestInstrumentationOptions,\n};\n\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library. This integration uses {@see IdleTransaction} to create transactions.\n */\nexport class BrowserTracing implements Integration {\n // This class currently doesn't have a static `id` field like the other integration classes, because it prevented\n // @sentry/tracing from being treeshaken. Tree shakers do not like static fields, because they behave like side effects.\n // TODO: Come up with a better plan, than using static fields on integration classes, and use that plan on all\n // integrations.\n\n /** Browser Tracing integration options */\n public options: BrowserTracingOptions;\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n private _getCurrentHub?: () => Hub;\n\n private _latestRouteName?: string;\n private _latestRouteSource?: TransactionSource;\n\n private _collectWebVitals: () => void;\n\n private _hasSetTracePropagationTargets: boolean;\n\n public constructor(_options?: Partial) {\n this.name = BROWSER_TRACING_INTEGRATION_ID;\n this._hasSetTracePropagationTargets = false;\n\n addTracingExtensions();\n\n if (__DEBUG_BUILD__) {\n this._hasSetTracePropagationTargets = !!(\n _options &&\n // eslint-disable-next-line deprecation/deprecation\n (_options.tracePropagationTargets || _options.tracingOrigins)\n );\n }\n\n this.options = {\n ...DEFAULT_BROWSER_TRACING_OPTIONS,\n ..._options,\n };\n\n // Special case: enableLongTask can be set in _experiments\n // TODO (v8): Remove this in v8\n if (this.options._experiments.enableLongTask !== undefined) {\n this.options.enableLongTask = this.options._experiments.enableLongTask;\n }\n\n // TODO (v8): remove this block after tracingOrigins is removed\n // Set tracePropagationTargets to tracingOrigins if specified by the user\n // In case both are specified, tracePropagationTargets takes precedence\n // eslint-disable-next-line deprecation/deprecation\n if (_options && !_options.tracePropagationTargets && _options.tracingOrigins) {\n // eslint-disable-next-line deprecation/deprecation\n this.options.tracePropagationTargets = _options.tracingOrigins;\n }\n\n this._collectWebVitals = startTrackingWebVitals();\n if (this.options.enableLongTask) {\n startTrackingLongTasks();\n }\n if (this.options._experiments.enableInteractions) {\n startTrackingInteractions();\n }\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n this._getCurrentHub = getCurrentHub;\n const hub = getCurrentHub();\n const client = hub.getClient();\n const clientOptions = client && client.getOptions();\n\n const {\n routingInstrumentation: instrumentRouting,\n startTransactionOnLocationChange,\n startTransactionOnPageLoad,\n markBackgroundTransactions,\n traceFetch,\n traceXHR,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n _experiments,\n } = this.options;\n\n const clientOptionsTracePropagationTargets = clientOptions && clientOptions.tracePropagationTargets;\n // There are three ways to configure tracePropagationTargets:\n // 1. via top level client option `tracePropagationTargets`\n // 2. via BrowserTracing option `tracePropagationTargets`\n // 3. via BrowserTracing option `tracingOrigins` (deprecated)\n //\n // To avoid confusion, favour top level client option `tracePropagationTargets`, and fallback to\n // BrowserTracing option `tracePropagationTargets` and then `tracingOrigins` (deprecated).\n // This is done as it minimizes bundle size (we don't have to have undefined checks).\n //\n // If both 1 and either one of 2 or 3 are set (from above), we log out a warning.\n // eslint-disable-next-line deprecation/deprecation\n const tracePropagationTargets = clientOptionsTracePropagationTargets || this.options.tracePropagationTargets;\n if (__DEBUG_BUILD__ && this._hasSetTracePropagationTargets && clientOptionsTracePropagationTargets) {\n logger.warn(\n '[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.',\n );\n }\n\n instrumentRouting(\n (context: TransactionContext) => {\n const transaction = this._createRouteTransaction(context);\n\n this.options._experiments.onStartRouteTransaction &&\n this.options._experiments.onStartRouteTransaction(transaction, context, getCurrentHub);\n\n return transaction;\n },\n startTransactionOnPageLoad,\n startTransactionOnLocationChange,\n );\n\n if (markBackgroundTransactions) {\n registerBackgroundTabDetection();\n }\n\n if (_experiments.enableInteractions) {\n this._registerInteractionListener();\n }\n\n instrumentOutgoingRequests({\n traceFetch,\n traceXHR,\n tracePropagationTargets,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n });\n }\n\n /** Create routing idle transaction. */\n private _createRouteTransaction(context: TransactionContext): Transaction | undefined {\n if (!this._getCurrentHub) {\n __DEBUG_BUILD__ &&\n logger.warn(`[Tracing] Did not create ${context.op} transaction because _getCurrentHub is invalid.`);\n return undefined;\n }\n\n const hub = this._getCurrentHub();\n\n const { beforeNavigate, idleTimeout, finalTimeout, heartbeatInterval } = this.options;\n\n const isPageloadTransaction = context.op === 'pageload';\n\n const sentryTrace = isPageloadTransaction ? getMetaContent('sentry-trace') : '';\n const baggage = isPageloadTransaction ? getMetaContent('baggage') : '';\n const { traceparentData, dynamicSamplingContext, propagationContext } = tracingContextFromHeaders(\n sentryTrace,\n baggage,\n );\n\n const expandedContext: TransactionContext = {\n ...context,\n ...traceparentData,\n metadata: {\n ...context.metadata,\n dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext,\n },\n trimEnd: true,\n };\n\n const modifiedContext = typeof beforeNavigate === 'function' ? beforeNavigate(expandedContext) : expandedContext;\n\n // For backwards compatibility reasons, beforeNavigate can return undefined to \"drop\" the transaction (prevent it\n // from being sent to Sentry).\n const finalContext = modifiedContext === undefined ? { ...expandedContext, sampled: false } : modifiedContext;\n\n // If `beforeNavigate` set a custom name, record that fact\n finalContext.metadata =\n finalContext.name !== expandedContext.name\n ? { ...finalContext.metadata, source: 'custom' }\n : finalContext.metadata;\n\n this._latestRouteName = finalContext.name;\n this._latestRouteSource = finalContext.metadata && finalContext.metadata.source;\n\n if (finalContext.sampled === false) {\n __DEBUG_BUILD__ &&\n logger.log(`[Tracing] Will not send ${finalContext.op} transaction because of beforeNavigate.`);\n }\n\n __DEBUG_BUILD__ && logger.log(`[Tracing] Starting ${finalContext.op} transaction on scope`);\n\n const { location } = WINDOW;\n\n const idleTransaction = startIdleTransaction(\n hub,\n finalContext,\n idleTimeout,\n finalTimeout,\n true,\n { location }, // for use in the tracesSampler\n heartbeatInterval,\n );\n\n const scope = hub.getScope();\n\n // If it's a pageload and there is a meta tag set\n // use the traceparentData as the propagation context\n if (isPageloadTransaction && traceparentData) {\n scope.setPropagationContext(propagationContext);\n } else {\n // Navigation transactions should set a new propagation context based on the\n // created idle transaction.\n scope.setPropagationContext({\n traceId: idleTransaction.traceId,\n spanId: idleTransaction.spanId,\n parentSpanId: idleTransaction.parentSpanId,\n sampled: idleTransaction.sampled,\n });\n }\n\n idleTransaction.registerBeforeFinishCallback(transaction => {\n this._collectWebVitals();\n addPerformanceEntries(transaction);\n });\n\n return idleTransaction as Transaction;\n }\n\n /** Start listener for interaction transactions */\n private _registerInteractionListener(): void {\n let inflightInteractionTransaction: IdleTransaction | undefined;\n const registerInteractionTransaction = (): void => {\n const { idleTimeout, finalTimeout, heartbeatInterval } = this.options;\n const op = 'ui.action.click';\n\n const currentTransaction = getActiveTransaction();\n if (currentTransaction && currentTransaction.op && ['navigation', 'pageload'].includes(currentTransaction.op)) {\n __DEBUG_BUILD__ &&\n logger.warn(\n `[Tracing] Did not create ${op} transaction because a pageload or navigation transaction is in progress.`,\n );\n return undefined;\n }\n\n if (inflightInteractionTransaction) {\n inflightInteractionTransaction.setFinishReason('interactionInterrupted');\n inflightInteractionTransaction.finish();\n inflightInteractionTransaction = undefined;\n }\n\n if (!this._getCurrentHub) {\n __DEBUG_BUILD__ && logger.warn(`[Tracing] Did not create ${op} transaction because _getCurrentHub is invalid.`);\n return undefined;\n }\n\n if (!this._latestRouteName) {\n __DEBUG_BUILD__ &&\n logger.warn(`[Tracing] Did not create ${op} transaction because _latestRouteName is missing.`);\n return undefined;\n }\n\n const hub = this._getCurrentHub();\n const { location } = WINDOW;\n\n const context: TransactionContext = {\n name: this._latestRouteName,\n op,\n trimEnd: true,\n metadata: {\n source: this._latestRouteSource || 'url',\n },\n };\n\n inflightInteractionTransaction = startIdleTransaction(\n hub,\n context,\n idleTimeout,\n finalTimeout,\n true,\n { location }, // for use in the tracesSampler\n heartbeatInterval,\n );\n };\n\n ['click'].forEach(type => {\n addEventListener(type, registerInteractionTransaction, { once: false, capture: true });\n });\n }\n}\n\n/** Returns the value of a meta tag */\nexport function getMetaContent(metaName: string): string | undefined {\n // Can't specify generic to `getDomElement` because tracing can be used\n // in a variety of environments, have to disable `no-unsafe-member-access`\n // as a result.\n const metaTag = getDomElement(`meta[name=${metaName}]`);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return metaTag ? metaTag.getAttribute('content') : undefined;\n}\n","import { getActiveTransaction } from '@sentry/core';\nimport { logger } from '@sentry/utils';\nimport { WINDOW } from './types.js';\n\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\nfunction registerBackgroundTabDetection() {\n if (WINDOW && WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n const activeTransaction = getActiveTransaction() ;\n if (WINDOW.document.hidden && activeTransaction) {\n const statusType = 'cancelled';\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(\n `[Tracing] Transaction: ${statusType} -> since tab moved to the background, op: ${activeTransaction.op}`,\n );\n // We should not set status if it is already set, this prevent important statuses like\n // error or data loss from being overwritten on transaction.\n if (!activeTransaction.status) {\n activeTransaction.setStatus(statusType);\n }\n activeTransaction.setTag('visibilitychange', 'document.hidden');\n activeTransaction.finish();\n }\n });\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n }\n}\n\nexport { registerBackgroundTabDetection };\n//# sourceMappingURL=backgroundtab.js.map\n","import type { IdleTransaction, SpanStatusType } from '@sentry/core';\nimport { getActiveTransaction } from '@sentry/core';\nimport { logger } from '@sentry/utils';\n\nimport { WINDOW } from './types';\n\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\nexport function registerBackgroundTabDetection(): void {\n if (WINDOW && WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n const activeTransaction = getActiveTransaction() as IdleTransaction;\n if (WINDOW.document.hidden && activeTransaction) {\n const statusType: SpanStatusType = 'cancelled';\n\n __DEBUG_BUILD__ &&\n logger.log(\n `[Tracing] Transaction: ${statusType} -> since tab moved to the background, op: ${activeTransaction.op}`,\n );\n // We should not set status if it is already set, this prevent important statuses like\n // error or data loss from being overwritten on transaction.\n if (!activeTransaction.status) {\n activeTransaction.setStatus(statusType);\n }\n activeTransaction.setTag('visibilitychange', 'document.hidden');\n activeTransaction.finish();\n }\n });\n } else {\n __DEBUG_BUILD__ &&\n logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n }\n}\n","import { GLOBAL_OBJ } from '@sentry/utils';\n\nconst WINDOW = GLOBAL_OBJ ;\n\nexport { WINDOW };\n//# sourceMappingURL=types.js.map\n","import { GLOBAL_OBJ } from '@sentry/utils';\n\nexport const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;\n","import { getActiveTransaction } from '@sentry/core';\nimport { browserPerformanceTimeOrigin, htmlTreeAsString, logger } from '@sentry/utils';\nimport { addPerformanceInstrumentationHandler, addClsInstrumentationHandler, addLcpInstrumentationHandler, addFidInstrumentationHandler } from '../instrument.js';\nimport { WINDOW } from '../types.js';\nimport { getVisibilityWatcher } from '../web-vitals/lib/getVisibilityWatcher.js';\nimport { _startChild, isMeasurementValue } from './utils.js';\n\n/**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\nfunction msToSec(time) {\n return time / 1000;\n}\n\nfunction getBrowserPerformanceAPI() {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n return WINDOW && WINDOW.addEventListener && WINDOW.performance;\n}\n\nlet _performanceCursor = 0;\n\nlet _measurements = {};\nlet _lcpEntry;\nlet _clsEntry;\n\n/**\n * Start tracking web vitals\n *\n * @returns A function that forces web vitals collection\n */\nfunction startTrackingWebVitals() {\n const performance = getBrowserPerformanceAPI();\n if (performance && browserPerformanceTimeOrigin) {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n if (performance.mark) {\n WINDOW.performance.mark('sentry-tracing-init');\n }\n const fidCallback = _trackFID();\n const clsCallback = _trackCLS();\n const lcpCallback = _trackLCP();\n\n return () => {\n fidCallback();\n clsCallback();\n lcpCallback();\n };\n }\n\n return () => undefined;\n}\n\n/**\n * Start tracking long tasks.\n */\nfunction startTrackingLongTasks() {\n addPerformanceInstrumentationHandler('longtask', ({ entries }) => {\n for (const entry of entries) {\n const transaction = getActiveTransaction() ;\n if (!transaction) {\n return;\n }\n const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n transaction.startChild({\n description: 'Main UI thread blocked',\n op: 'ui.long-task',\n origin: 'auto.ui.browser.metrics',\n startTimestamp: startTime,\n endTimestamp: startTime + duration,\n });\n }\n });\n}\n\n/**\n * Start tracking interaction events.\n */\nfunction startTrackingInteractions() {\n addPerformanceInstrumentationHandler('event', ({ entries }) => {\n for (const entry of entries) {\n const transaction = getActiveTransaction() ;\n if (!transaction) {\n return;\n }\n\n if (entry.name === 'click') {\n const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n transaction.startChild({\n description: htmlTreeAsString(entry.target),\n op: `ui.interaction.${entry.name}`,\n origin: 'auto.ui.browser.metrics',\n startTimestamp: startTime,\n endTimestamp: startTime + duration,\n });\n }\n }\n });\n}\n\n/** Starts tracking the Cumulative Layout Shift on the current page. */\nfunction _trackCLS() {\n return addClsInstrumentationHandler(({ metric }) => {\n const entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding CLS');\n _measurements['cls'] = { value: metric.value, unit: '' };\n _clsEntry = entry ;\n });\n}\n\n/** Starts tracking the Largest Contentful Paint on the current page. */\nfunction _trackLCP() {\n return addLcpInstrumentationHandler(({ metric }) => {\n const entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding LCP');\n _measurements['lcp'] = { value: metric.value, unit: 'millisecond' };\n _lcpEntry = entry ;\n });\n}\n\n/** Starts tracking the First Input Delay on the current page. */\nfunction _trackFID() {\n return addFidInstrumentationHandler(({ metric }) => {\n const entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n\n const timeOrigin = msToSec(browserPerformanceTimeOrigin );\n const startTime = msToSec(entry.startTime);\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding FID');\n _measurements['fid'] = { value: metric.value, unit: 'millisecond' };\n _measurements['mark.fid'] = { value: timeOrigin + startTime, unit: 'second' };\n });\n}\n\n/** Add performance related spans to a transaction */\nfunction addPerformanceEntries(transaction) {\n const performance = getBrowserPerformanceAPI();\n if (!performance || !WINDOW.performance.getEntries || !browserPerformanceTimeOrigin) {\n // Gatekeeper if performance API not available\n return;\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] Adding & adjusting spans using Performance API');\n const timeOrigin = msToSec(browserPerformanceTimeOrigin);\n\n const performanceEntries = performance.getEntries();\n\n let responseStartTimestamp;\n let requestStartTimestamp;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n performanceEntries.slice(_performanceCursor).forEach((entry) => {\n const startTime = msToSec(entry.startTime);\n const duration = msToSec(entry.duration);\n\n if (transaction.op === 'navigation' && timeOrigin + startTime < transaction.startTimestamp) {\n return;\n }\n\n switch (entry.entryType) {\n case 'navigation': {\n _addNavigationSpans(transaction, entry, timeOrigin);\n responseStartTimestamp = timeOrigin + msToSec(entry.responseStart);\n requestStartTimestamp = timeOrigin + msToSec(entry.requestStart);\n break;\n }\n case 'mark':\n case 'paint':\n case 'measure': {\n _addMeasureSpans(transaction, entry, startTime, duration, timeOrigin);\n\n // capture web vitals\n const firstHidden = getVisibilityWatcher();\n // Only report if the page wasn't hidden prior to the web vital.\n const shouldRecord = entry.startTime < firstHidden.firstHiddenTime;\n\n if (entry.name === 'first-paint' && shouldRecord) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding FP');\n _measurements['fp'] = { value: entry.startTime, unit: 'millisecond' };\n }\n if (entry.name === 'first-contentful-paint' && shouldRecord) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding FCP');\n _measurements['fcp'] = { value: entry.startTime, unit: 'millisecond' };\n }\n break;\n }\n case 'resource': {\n const resourceName = (entry.name ).replace(WINDOW.location.origin, '');\n _addResourceSpans(transaction, entry, resourceName, startTime, duration, timeOrigin);\n break;\n }\n // Ignore other entry types.\n }\n });\n\n _performanceCursor = Math.max(performanceEntries.length - 1, 0);\n\n _trackNavigator(transaction);\n\n // Measurements are only available for pageload transactions\n if (transaction.op === 'pageload') {\n // Generate TTFB (Time to First Byte), which measured as the time between the beginning of the transaction and the\n // start of the response in milliseconds\n if (typeof responseStartTimestamp === 'number') {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding TTFB');\n _measurements['ttfb'] = {\n value: (responseStartTimestamp - transaction.startTimestamp) * 1000,\n unit: 'millisecond',\n };\n\n if (typeof requestStartTimestamp === 'number' && requestStartTimestamp <= responseStartTimestamp) {\n // Capture the time spent making the request and receiving the first byte of the response.\n // This is the time between the start of the request and the start of the response in milliseconds.\n _measurements['ttfb.requestTime'] = {\n value: (responseStartTimestamp - requestStartTimestamp) * 1000,\n unit: 'millisecond',\n };\n }\n }\n\n ['fcp', 'fp', 'lcp'].forEach(name => {\n if (!_measurements[name] || timeOrigin >= transaction.startTimestamp) {\n return;\n }\n // The web vitals, fcp, fp, lcp, and ttfb, all measure relative to timeOrigin.\n // Unfortunately, timeOrigin is not captured within the transaction span data, so these web vitals will need\n // to be adjusted to be relative to transaction.startTimestamp.\n const oldValue = _measurements[name].value;\n const measurementTimestamp = timeOrigin + msToSec(oldValue);\n\n // normalizedValue should be in milliseconds\n const normalizedValue = Math.abs((measurementTimestamp - transaction.startTimestamp) * 1000);\n const delta = normalizedValue - oldValue;\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(`[Measurements] Normalized ${name} from ${oldValue} to ${normalizedValue} (${delta})`);\n _measurements[name].value = normalizedValue;\n });\n\n const fidMark = _measurements['mark.fid'];\n if (fidMark && _measurements['fid']) {\n // create span for FID\n _startChild(transaction, {\n description: 'first input delay',\n endTimestamp: fidMark.value + msToSec(_measurements['fid'].value),\n op: 'ui.action',\n origin: 'auto.ui.browser.metrics',\n startTimestamp: fidMark.value,\n });\n\n // Delete mark.fid as we don't want it to be part of final payload\n delete _measurements['mark.fid'];\n }\n\n // If FCP is not recorded we should not record the cls value\n // according to the new definition of CLS.\n if (!('fcp' in _measurements)) {\n delete _measurements.cls;\n }\n\n Object.keys(_measurements).forEach(measurementName => {\n transaction.setMeasurement(\n measurementName,\n _measurements[measurementName].value,\n _measurements[measurementName].unit,\n );\n });\n\n _tagMetricInfo(transaction);\n }\n\n _lcpEntry = undefined;\n _clsEntry = undefined;\n _measurements = {};\n}\n\n/** Create measure related spans */\nfunction _addMeasureSpans(\n transaction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n entry,\n startTime,\n duration,\n timeOrigin,\n) {\n const measureStartTimestamp = timeOrigin + startTime;\n const measureEndTimestamp = measureStartTimestamp + duration;\n\n _startChild(transaction, {\n description: entry.name ,\n endTimestamp: measureEndTimestamp,\n op: entry.entryType ,\n origin: 'auto.resource.browser.metrics',\n startTimestamp: measureStartTimestamp,\n });\n\n return measureStartTimestamp;\n}\n\n/** Instrument navigation entries */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _addNavigationSpans(transaction, entry, timeOrigin) {\n ['unloadEvent', 'redirect', 'domContentLoadedEvent', 'loadEvent', 'connect'].forEach(event => {\n _addPerformanceNavigationTiming(transaction, entry, event, timeOrigin);\n });\n _addPerformanceNavigationTiming(transaction, entry, 'secureConnection', timeOrigin, 'TLS/SSL', 'connectEnd');\n _addPerformanceNavigationTiming(transaction, entry, 'fetch', timeOrigin, 'cache', 'domainLookupStart');\n _addPerformanceNavigationTiming(transaction, entry, 'domainLookup', timeOrigin, 'DNS');\n _addRequest(transaction, entry, timeOrigin);\n}\n\n/** Create performance navigation related spans */\nfunction _addPerformanceNavigationTiming(\n transaction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n entry,\n event,\n timeOrigin,\n description,\n eventEnd,\n) {\n const end = eventEnd ? (entry[eventEnd] ) : (entry[`${event}End`] );\n const start = entry[`${event}Start`] ;\n if (!start || !end) {\n return;\n }\n _startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: description || event,\n startTimestamp: timeOrigin + msToSec(start),\n endTimestamp: timeOrigin + msToSec(end),\n });\n}\n\n/** Create request and response related spans */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _addRequest(transaction, entry, timeOrigin) {\n _startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: 'request',\n startTimestamp: timeOrigin + msToSec(entry.requestStart ),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd ),\n });\n\n _startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: 'response',\n startTimestamp: timeOrigin + msToSec(entry.responseStart ),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd ),\n });\n}\n\n/** Create resource-related spans */\nfunction _addResourceSpans(\n transaction,\n entry,\n resourceName,\n startTime,\n duration,\n timeOrigin,\n) {\n // we already instrument based on fetch and xhr, so we don't need to\n // duplicate spans here.\n if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const data = {};\n if ('transferSize' in entry) {\n data['http.response_transfer_size'] = entry.transferSize;\n }\n if ('encodedBodySize' in entry) {\n data['http.response_content_length'] = entry.encodedBodySize;\n }\n if ('decodedBodySize' in entry) {\n data['http.decoded_response_content_length'] = entry.decodedBodySize;\n }\n if ('renderBlockingStatus' in entry) {\n data['resource.render_blocking_status'] = entry.renderBlockingStatus;\n }\n\n const startTimestamp = timeOrigin + startTime;\n const endTimestamp = startTimestamp + duration;\n\n _startChild(transaction, {\n description: resourceName,\n endTimestamp,\n op: entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource.other',\n origin: 'auto.resource.browser.metrics',\n startTimestamp,\n data,\n });\n}\n\n/**\n * Capture the information of the user agent.\n */\nfunction _trackNavigator(transaction) {\n const navigator = WINDOW.navigator ;\n if (!navigator) {\n return;\n }\n\n // track network connectivity\n const connection = navigator.connection;\n if (connection) {\n if (connection.effectiveType) {\n transaction.setTag('effectiveConnectionType', connection.effectiveType);\n }\n\n if (connection.type) {\n transaction.setTag('connectionType', connection.type);\n }\n\n if (isMeasurementValue(connection.rtt)) {\n _measurements['connection.rtt'] = { value: connection.rtt, unit: 'millisecond' };\n }\n }\n\n if (isMeasurementValue(navigator.deviceMemory)) {\n transaction.setTag('deviceMemory', `${navigator.deviceMemory} GB`);\n }\n\n if (isMeasurementValue(navigator.hardwareConcurrency)) {\n transaction.setTag('hardwareConcurrency', String(navigator.hardwareConcurrency));\n }\n}\n\n/** Add LCP / CLS data to transaction to allow debugging */\nfunction _tagMetricInfo(transaction) {\n if (_lcpEntry) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding LCP Data');\n\n // Capture Properties of the LCP element that contributes to the LCP.\n\n if (_lcpEntry.element) {\n transaction.setTag('lcp.element', htmlTreeAsString(_lcpEntry.element));\n }\n\n if (_lcpEntry.id) {\n transaction.setTag('lcp.id', _lcpEntry.id);\n }\n\n if (_lcpEntry.url) {\n // Trim URL to the first 200 characters.\n transaction.setTag('lcp.url', _lcpEntry.url.trim().slice(0, 200));\n }\n\n transaction.setTag('lcp.size', _lcpEntry.size);\n }\n\n // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift\n if (_clsEntry && _clsEntry.sources) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding CLS Data');\n _clsEntry.sources.forEach((source, index) =>\n transaction.setTag(`cls.source.${index + 1}`, htmlTreeAsString(source.node)),\n );\n }\n}\n\nexport { _addMeasureSpans, _addResourceSpans, addPerformanceEntries, startTrackingInteractions, startTrackingLongTasks, startTrackingWebVitals };\n//# sourceMappingURL=index.js.map\n","/* eslint-disable max-lines */\nimport type { IdleTransaction, Transaction } from '@sentry/core';\nimport { getActiveTransaction } from '@sentry/core';\nimport type { Measurements } from '@sentry/types';\nimport { browserPerformanceTimeOrigin, htmlTreeAsString, logger } from '@sentry/utils';\n\nimport {\n addClsInstrumentationHandler,\n addFidInstrumentationHandler,\n addLcpInstrumentationHandler,\n addPerformanceInstrumentationHandler,\n} from '../instrument';\nimport { WINDOW } from '../types';\nimport { getVisibilityWatcher } from '../web-vitals/lib/getVisibilityWatcher';\nimport type { NavigatorDeviceMemory, NavigatorNetworkInformation } from '../web-vitals/types';\nimport { _startChild, isMeasurementValue } from './utils';\n\n/**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\nfunction msToSec(time: number): number {\n return time / 1000;\n}\n\nfunction getBrowserPerformanceAPI(): Performance | undefined {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n return WINDOW && WINDOW.addEventListener && WINDOW.performance;\n}\n\nlet _performanceCursor: number = 0;\n\nlet _measurements: Measurements = {};\nlet _lcpEntry: LargestContentfulPaint | undefined;\nlet _clsEntry: LayoutShift | undefined;\n\n/**\n * Start tracking web vitals\n *\n * @returns A function that forces web vitals collection\n */\nexport function startTrackingWebVitals(): () => void {\n const performance = getBrowserPerformanceAPI();\n if (performance && browserPerformanceTimeOrigin) {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n if (performance.mark) {\n WINDOW.performance.mark('sentry-tracing-init');\n }\n const fidCallback = _trackFID();\n const clsCallback = _trackCLS();\n const lcpCallback = _trackLCP();\n\n return (): void => {\n fidCallback();\n clsCallback();\n lcpCallback();\n };\n }\n\n return () => undefined;\n}\n\n/**\n * Start tracking long tasks.\n */\nexport function startTrackingLongTasks(): void {\n addPerformanceInstrumentationHandler('longtask', ({ entries }) => {\n for (const entry of entries) {\n const transaction = getActiveTransaction() as IdleTransaction | undefined;\n if (!transaction) {\n return;\n }\n const startTime = msToSec((browserPerformanceTimeOrigin as number) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n transaction.startChild({\n description: 'Main UI thread blocked',\n op: 'ui.long-task',\n origin: 'auto.ui.browser.metrics',\n startTimestamp: startTime,\n endTimestamp: startTime + duration,\n });\n }\n });\n}\n\n/**\n * Start tracking interaction events.\n */\nexport function startTrackingInteractions(): void {\n addPerformanceInstrumentationHandler('event', ({ entries }) => {\n for (const entry of entries) {\n const transaction = getActiveTransaction() as IdleTransaction | undefined;\n if (!transaction) {\n return;\n }\n\n if (entry.name === 'click') {\n const startTime = msToSec((browserPerformanceTimeOrigin as number) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n transaction.startChild({\n description: htmlTreeAsString(entry.target),\n op: `ui.interaction.${entry.name}`,\n origin: 'auto.ui.browser.metrics',\n startTimestamp: startTime,\n endTimestamp: startTime + duration,\n });\n }\n }\n });\n}\n\n/** Starts tracking the Cumulative Layout Shift on the current page. */\nfunction _trackCLS(): () => void {\n return addClsInstrumentationHandler(({ metric }) => {\n const entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n\n __DEBUG_BUILD__ && logger.log('[Measurements] Adding CLS');\n _measurements['cls'] = { value: metric.value, unit: '' };\n _clsEntry = entry as LayoutShift;\n });\n}\n\n/** Starts tracking the Largest Contentful Paint on the current page. */\nfunction _trackLCP(): () => void {\n return addLcpInstrumentationHandler(({ metric }) => {\n const entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n\n __DEBUG_BUILD__ && logger.log('[Measurements] Adding LCP');\n _measurements['lcp'] = { value: metric.value, unit: 'millisecond' };\n _lcpEntry = entry as LargestContentfulPaint;\n });\n}\n\n/** Starts tracking the First Input Delay on the current page. */\nfunction _trackFID(): () => void {\n return addFidInstrumentationHandler(({ metric }) => {\n const entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n\n const timeOrigin = msToSec(browserPerformanceTimeOrigin as number);\n const startTime = msToSec(entry.startTime);\n __DEBUG_BUILD__ && logger.log('[Measurements] Adding FID');\n _measurements['fid'] = { value: metric.value, unit: 'millisecond' };\n _measurements['mark.fid'] = { value: timeOrigin + startTime, unit: 'second' };\n });\n}\n\n/** Add performance related spans to a transaction */\nexport function addPerformanceEntries(transaction: Transaction): void {\n const performance = getBrowserPerformanceAPI();\n if (!performance || !WINDOW.performance.getEntries || !browserPerformanceTimeOrigin) {\n // Gatekeeper if performance API not available\n return;\n }\n\n __DEBUG_BUILD__ && logger.log('[Tracing] Adding & adjusting spans using Performance API');\n const timeOrigin = msToSec(browserPerformanceTimeOrigin);\n\n const performanceEntries = performance.getEntries();\n\n let responseStartTimestamp: number | undefined;\n let requestStartTimestamp: number | undefined;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n performanceEntries.slice(_performanceCursor).forEach((entry: Record) => {\n const startTime = msToSec(entry.startTime);\n const duration = msToSec(entry.duration);\n\n if (transaction.op === 'navigation' && timeOrigin + startTime < transaction.startTimestamp) {\n return;\n }\n\n switch (entry.entryType) {\n case 'navigation': {\n _addNavigationSpans(transaction, entry, timeOrigin);\n responseStartTimestamp = timeOrigin + msToSec(entry.responseStart);\n requestStartTimestamp = timeOrigin + msToSec(entry.requestStart);\n break;\n }\n case 'mark':\n case 'paint':\n case 'measure': {\n _addMeasureSpans(transaction, entry, startTime, duration, timeOrigin);\n\n // capture web vitals\n const firstHidden = getVisibilityWatcher();\n // Only report if the page wasn't hidden prior to the web vital.\n const shouldRecord = entry.startTime < firstHidden.firstHiddenTime;\n\n if (entry.name === 'first-paint' && shouldRecord) {\n __DEBUG_BUILD__ && logger.log('[Measurements] Adding FP');\n _measurements['fp'] = { value: entry.startTime, unit: 'millisecond' };\n }\n if (entry.name === 'first-contentful-paint' && shouldRecord) {\n __DEBUG_BUILD__ && logger.log('[Measurements] Adding FCP');\n _measurements['fcp'] = { value: entry.startTime, unit: 'millisecond' };\n }\n break;\n }\n case 'resource': {\n const resourceName = (entry.name as string).replace(WINDOW.location.origin, '');\n _addResourceSpans(transaction, entry, resourceName, startTime, duration, timeOrigin);\n break;\n }\n default:\n // Ignore other entry types.\n }\n });\n\n _performanceCursor = Math.max(performanceEntries.length - 1, 0);\n\n _trackNavigator(transaction);\n\n // Measurements are only available for pageload transactions\n if (transaction.op === 'pageload') {\n // Generate TTFB (Time to First Byte), which measured as the time between the beginning of the transaction and the\n // start of the response in milliseconds\n if (typeof responseStartTimestamp === 'number') {\n __DEBUG_BUILD__ && logger.log('[Measurements] Adding TTFB');\n _measurements['ttfb'] = {\n value: (responseStartTimestamp - transaction.startTimestamp) * 1000,\n unit: 'millisecond',\n };\n\n if (typeof requestStartTimestamp === 'number' && requestStartTimestamp <= responseStartTimestamp) {\n // Capture the time spent making the request and receiving the first byte of the response.\n // This is the time between the start of the request and the start of the response in milliseconds.\n _measurements['ttfb.requestTime'] = {\n value: (responseStartTimestamp - requestStartTimestamp) * 1000,\n unit: 'millisecond',\n };\n }\n }\n\n ['fcp', 'fp', 'lcp'].forEach(name => {\n if (!_measurements[name] || timeOrigin >= transaction.startTimestamp) {\n return;\n }\n // The web vitals, fcp, fp, lcp, and ttfb, all measure relative to timeOrigin.\n // Unfortunately, timeOrigin is not captured within the transaction span data, so these web vitals will need\n // to be adjusted to be relative to transaction.startTimestamp.\n const oldValue = _measurements[name].value;\n const measurementTimestamp = timeOrigin + msToSec(oldValue);\n\n // normalizedValue should be in milliseconds\n const normalizedValue = Math.abs((measurementTimestamp - transaction.startTimestamp) * 1000);\n const delta = normalizedValue - oldValue;\n\n __DEBUG_BUILD__ &&\n logger.log(`[Measurements] Normalized ${name} from ${oldValue} to ${normalizedValue} (${delta})`);\n _measurements[name].value = normalizedValue;\n });\n\n const fidMark = _measurements['mark.fid'];\n if (fidMark && _measurements['fid']) {\n // create span for FID\n _startChild(transaction, {\n description: 'first input delay',\n endTimestamp: fidMark.value + msToSec(_measurements['fid'].value),\n op: 'ui.action',\n origin: 'auto.ui.browser.metrics',\n startTimestamp: fidMark.value,\n });\n\n // Delete mark.fid as we don't want it to be part of final payload\n delete _measurements['mark.fid'];\n }\n\n // If FCP is not recorded we should not record the cls value\n // according to the new definition of CLS.\n if (!('fcp' in _measurements)) {\n delete _measurements.cls;\n }\n\n Object.keys(_measurements).forEach(measurementName => {\n transaction.setMeasurement(\n measurementName,\n _measurements[measurementName].value,\n _measurements[measurementName].unit,\n );\n });\n\n _tagMetricInfo(transaction);\n }\n\n _lcpEntry = undefined;\n _clsEntry = undefined;\n _measurements = {};\n}\n\n/** Create measure related spans */\nexport function _addMeasureSpans(\n transaction: Transaction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n entry: Record,\n startTime: number,\n duration: number,\n timeOrigin: number,\n): number {\n const measureStartTimestamp = timeOrigin + startTime;\n const measureEndTimestamp = measureStartTimestamp + duration;\n\n _startChild(transaction, {\n description: entry.name as string,\n endTimestamp: measureEndTimestamp,\n op: entry.entryType as string,\n origin: 'auto.resource.browser.metrics',\n startTimestamp: measureStartTimestamp,\n });\n\n return measureStartTimestamp;\n}\n\n/** Instrument navigation entries */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _addNavigationSpans(transaction: Transaction, entry: Record, timeOrigin: number): void {\n ['unloadEvent', 'redirect', 'domContentLoadedEvent', 'loadEvent', 'connect'].forEach(event => {\n _addPerformanceNavigationTiming(transaction, entry, event, timeOrigin);\n });\n _addPerformanceNavigationTiming(transaction, entry, 'secureConnection', timeOrigin, 'TLS/SSL', 'connectEnd');\n _addPerformanceNavigationTiming(transaction, entry, 'fetch', timeOrigin, 'cache', 'domainLookupStart');\n _addPerformanceNavigationTiming(transaction, entry, 'domainLookup', timeOrigin, 'DNS');\n _addRequest(transaction, entry, timeOrigin);\n}\n\n/** Create performance navigation related spans */\nfunction _addPerformanceNavigationTiming(\n transaction: Transaction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n entry: Record,\n event: string,\n timeOrigin: number,\n description?: string,\n eventEnd?: string,\n): void {\n const end = eventEnd ? (entry[eventEnd] as number | undefined) : (entry[`${event}End`] as number | undefined);\n const start = entry[`${event}Start`] as number | undefined;\n if (!start || !end) {\n return;\n }\n _startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: description || event,\n startTimestamp: timeOrigin + msToSec(start),\n endTimestamp: timeOrigin + msToSec(end),\n });\n}\n\n/** Create request and response related spans */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _addRequest(transaction: Transaction, entry: Record, timeOrigin: number): void {\n _startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: 'request',\n startTimestamp: timeOrigin + msToSec(entry.requestStart as number),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd as number),\n });\n\n _startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: 'response',\n startTimestamp: timeOrigin + msToSec(entry.responseStart as number),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd as number),\n });\n}\n\nexport interface ResourceEntry extends Record {\n initiatorType?: string;\n transferSize?: number;\n encodedBodySize?: number;\n decodedBodySize?: number;\n renderBlockingStatus?: string;\n}\n\n/** Create resource-related spans */\nexport function _addResourceSpans(\n transaction: Transaction,\n entry: ResourceEntry,\n resourceName: string,\n startTime: number,\n duration: number,\n timeOrigin: number,\n): void {\n // we already instrument based on fetch and xhr, so we don't need to\n // duplicate spans here.\n if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const data: Record = {};\n if ('transferSize' in entry) {\n data['http.response_transfer_size'] = entry.transferSize;\n }\n if ('encodedBodySize' in entry) {\n data['http.response_content_length'] = entry.encodedBodySize;\n }\n if ('decodedBodySize' in entry) {\n data['http.decoded_response_content_length'] = entry.decodedBodySize;\n }\n if ('renderBlockingStatus' in entry) {\n data['resource.render_blocking_status'] = entry.renderBlockingStatus;\n }\n\n const startTimestamp = timeOrigin + startTime;\n const endTimestamp = startTimestamp + duration;\n\n _startChild(transaction, {\n description: resourceName,\n endTimestamp,\n op: entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource.other',\n origin: 'auto.resource.browser.metrics',\n startTimestamp,\n data,\n });\n}\n\n/**\n * Capture the information of the user agent.\n */\nfunction _trackNavigator(transaction: Transaction): void {\n const navigator = WINDOW.navigator as null | (Navigator & NavigatorNetworkInformation & NavigatorDeviceMemory);\n if (!navigator) {\n return;\n }\n\n // track network connectivity\n const connection = navigator.connection;\n if (connection) {\n if (connection.effectiveType) {\n transaction.setTag('effectiveConnectionType', connection.effectiveType);\n }\n\n if (connection.type) {\n transaction.setTag('connectionType', connection.type);\n }\n\n if (isMeasurementValue(connection.rtt)) {\n _measurements['connection.rtt'] = { value: connection.rtt, unit: 'millisecond' };\n }\n }\n\n if (isMeasurementValue(navigator.deviceMemory)) {\n transaction.setTag('deviceMemory', `${navigator.deviceMemory} GB`);\n }\n\n if (isMeasurementValue(navigator.hardwareConcurrency)) {\n transaction.setTag('hardwareConcurrency', String(navigator.hardwareConcurrency));\n }\n}\n\n/** Add LCP / CLS data to transaction to allow debugging */\nfunction _tagMetricInfo(transaction: Transaction): void {\n if (_lcpEntry) {\n __DEBUG_BUILD__ && logger.log('[Measurements] Adding LCP Data');\n\n // Capture Properties of the LCP element that contributes to the LCP.\n\n if (_lcpEntry.element) {\n transaction.setTag('lcp.element', htmlTreeAsString(_lcpEntry.element));\n }\n\n if (_lcpEntry.id) {\n transaction.setTag('lcp.id', _lcpEntry.id);\n }\n\n if (_lcpEntry.url) {\n // Trim URL to the first 200 characters.\n transaction.setTag('lcp.url', _lcpEntry.url.trim().slice(0, 200));\n }\n\n transaction.setTag('lcp.size', _lcpEntry.size);\n }\n\n // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift\n if (_clsEntry && _clsEntry.sources) {\n __DEBUG_BUILD__ && logger.log('[Measurements] Adding CLS Data');\n _clsEntry.sources.forEach((source, index) =>\n transaction.setTag(`cls.source.${index + 1}`, htmlTreeAsString(source.node)),\n );\n }\n}\n","import { logger, getFunctionName } from '@sentry/utils';\nimport { onCLS } from './web-vitals/getCLS.js';\nimport { onFID } from './web-vitals/getFID.js';\nimport { onLCP } from './web-vitals/getLCP.js';\nimport { observe } from './web-vitals/lib/observe.js';\n\nconst handlers = {};\nconst instrumented = {};\n\nlet _previousCls;\nlet _previousFid;\nlet _previousLcp;\n\n/**\n * Add a callback that will be triggered when a CLS metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addClsInstrumentationHandler(callback) {\n return addMetricObserver('cls', callback, instrumentCls, _previousCls);\n}\n\n/**\n * Add a callback that will be triggered when a LCP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addLcpInstrumentationHandler(callback) {\n return addMetricObserver('lcp', callback, instrumentLcp, _previousLcp);\n}\n\n/**\n * Add a callback that will be triggered when a FID metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addFidInstrumentationHandler(callback) {\n return addMetricObserver('fid', callback, instrumentFid, _previousFid);\n}\n\n/**\n * Add a callback that will be triggered when a performance observer is triggered,\n * and receives the entries of the observer.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addPerformanceInstrumentationHandler(\n type,\n callback,\n) {\n addHandler(type, callback);\n\n if (!instrumented[type]) {\n instrumentPerformanceObserver(type);\n instrumented[type] = true;\n }\n\n return getCleanupCallback(type, callback);\n}\n\n/** Trigger all handlers of a given type. */\nfunction triggerHandlers(type, data) {\n const typeHandlers = handlers[type];\n\n if (!typeHandlers || !typeHandlers.length) {\n return;\n }\n\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\nfunction instrumentCls() {\n onCLS(metric => {\n triggerHandlers('cls', {\n metric,\n });\n _previousCls = metric;\n });\n}\n\nfunction instrumentFid() {\n onFID(metric => {\n triggerHandlers('fid', {\n metric,\n });\n _previousFid = metric;\n });\n}\n\nfunction instrumentLcp() {\n onLCP(metric => {\n triggerHandlers('lcp', {\n metric,\n });\n _previousLcp = metric;\n });\n}\n\nfunction addMetricObserver(\n type,\n callback,\n instrumentFn,\n previousValue,\n) {\n addHandler(type, callback);\n\n if (!instrumented[type]) {\n instrumentFn();\n instrumented[type] = true;\n }\n\n if (previousValue) {\n callback({ metric: previousValue });\n }\n\n return getCleanupCallback(type, callback);\n}\n\nfunction instrumentPerformanceObserver(type) {\n const options = {};\n\n // Special per-type options we want to use\n if (type === 'event') {\n options.durationThreshold = 0;\n }\n\n observe(\n type,\n entries => {\n triggerHandlers(type, { entries });\n },\n options,\n );\n}\n\nfunction addHandler(type, handler) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(handler);\n}\n\n// Get a callback which can be called to remove the instrumentation handler\nfunction getCleanupCallback(type, callback) {\n return () => {\n const typeHandlers = handlers[type];\n\n if (!typeHandlers) {\n return;\n }\n\n const index = typeHandlers.indexOf(callback);\n if (index !== -1) {\n typeHandlers.splice(index, 1);\n }\n };\n}\n\nexport { addClsInstrumentationHandler, addFidInstrumentationHandler, addLcpInstrumentationHandler, addPerformanceInstrumentationHandler };\n//# sourceMappingURL=instrument.js.map\n","import { getFunctionName, logger } from '@sentry/utils';\n\nimport { onCLS } from './web-vitals/getCLS';\nimport { onFID } from './web-vitals/getFID';\nimport { onLCP } from './web-vitals/getLCP';\nimport { observe } from './web-vitals/lib/observe';\n\ntype InstrumentHandlerTypePerformanceObserver = 'longtask' | 'event' | 'navigation' | 'paint' | 'resource';\n\ntype InstrumentHandlerTypeMetric = 'cls' | 'lcp' | 'fid';\n\n// We provide this here manually instead of relying on a global, as this is not available in non-browser environements\n// And we do not want to expose such types\ninterface PerformanceEntry {\n readonly duration: number;\n readonly entryType: string;\n readonly name: string;\n readonly startTime: number;\n toJSON(): Record;\n}\n\ninterface Metric {\n /**\n * The name of the metric (in acronym form).\n */\n name: 'CLS' | 'FCP' | 'FID' | 'INP' | 'LCP' | 'TTFB';\n\n /**\n * The current value of the metric.\n */\n value: number;\n\n /**\n * The rating as to whether the metric value is within the \"good\",\n * \"needs improvement\", or \"poor\" thresholds of the metric.\n */\n rating: 'good' | 'needs-improvement' | 'poor';\n\n /**\n * The delta between the current value and the last-reported value.\n * On the first report, `delta` and `value` will always be the same.\n */\n delta: number;\n\n /**\n * A unique ID representing this particular metric instance. This ID can\n * be used by an analytics tool to dedupe multiple values sent for the same\n * metric instance, or to group multiple deltas together and calculate a\n * total. It can also be used to differentiate multiple different metric\n * instances sent from the same page, which can happen if the page is\n * restored from the back/forward cache (in that case new metrics object\n * get created).\n */\n id: string;\n\n /**\n * Any performance entries relevant to the metric value calculation.\n * The array may also be empty if the metric value was not based on any\n * entries (e.g. a CLS value of 0 given no layout shifts).\n */\n entries: PerformanceEntry[];\n\n /**\n * The type of navigation\n *\n * Navigation Timing API (or `undefined` if the browser doesn't\n * support that API). For pages that are restored from the bfcache, this\n * value will be 'back-forward-cache'.\n */\n navigationType: 'navigate' | 'reload' | 'back-forward' | 'back-forward-cache' | 'prerender';\n}\n\ntype InstrumentHandlerType = InstrumentHandlerTypeMetric | InstrumentHandlerTypePerformanceObserver;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype InstrumentHandlerCallback = (data: any) => void;\n\ntype CleanupHandlerCallback = () => void;\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\nlet _previousCls: Metric | undefined;\nlet _previousFid: Metric | undefined;\nlet _previousLcp: Metric | undefined;\n\n/**\n * Add a callback that will be triggered when a CLS metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nexport function addClsInstrumentationHandler(callback: (data: { metric: Metric }) => void): CleanupHandlerCallback {\n return addMetricObserver('cls', callback, instrumentCls, _previousCls);\n}\n\n/**\n * Add a callback that will be triggered when a LCP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nexport function addLcpInstrumentationHandler(callback: (data: { metric: Metric }) => void): CleanupHandlerCallback {\n return addMetricObserver('lcp', callback, instrumentLcp, _previousLcp);\n}\n\n/**\n * Add a callback that will be triggered when a FID metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nexport function addFidInstrumentationHandler(callback: (data: { metric: Metric }) => void): CleanupHandlerCallback {\n return addMetricObserver('fid', callback, instrumentFid, _previousFid);\n}\n\nexport function addPerformanceInstrumentationHandler(\n type: 'event',\n callback: (data: { entries: (PerformanceEntry & { target?: unknown | null })[] }) => void,\n): CleanupHandlerCallback;\nexport function addPerformanceInstrumentationHandler(\n type: InstrumentHandlerTypePerformanceObserver,\n callback: (data: { entries: PerformanceEntry[] }) => void,\n): CleanupHandlerCallback;\n\n/**\n * Add a callback that will be triggered when a performance observer is triggered,\n * and receives the entries of the observer.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nexport function addPerformanceInstrumentationHandler(\n type: InstrumentHandlerTypePerformanceObserver,\n callback: (data: { entries: PerformanceEntry[] }) => void,\n): CleanupHandlerCallback {\n addHandler(type, callback);\n\n if (!instrumented[type]) {\n instrumentPerformanceObserver(type);\n instrumented[type] = true;\n }\n\n return getCleanupCallback(type, callback);\n}\n\n/** Trigger all handlers of a given type. */\nfunction triggerHandlers(type: InstrumentHandlerType, data: unknown): void {\n const typeHandlers = handlers[type];\n\n if (!typeHandlers || !typeHandlers.length) {\n return;\n }\n\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n __DEBUG_BUILD__ &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\nfunction instrumentCls(): void {\n onCLS(metric => {\n triggerHandlers('cls', {\n metric,\n });\n _previousCls = metric;\n });\n}\n\nfunction instrumentFid(): void {\n onFID(metric => {\n triggerHandlers('fid', {\n metric,\n });\n _previousFid = metric;\n });\n}\n\nfunction instrumentLcp(): void {\n onLCP(metric => {\n triggerHandlers('lcp', {\n metric,\n });\n _previousLcp = metric;\n });\n}\n\nfunction addMetricObserver(\n type: InstrumentHandlerTypeMetric,\n callback: InstrumentHandlerCallback,\n instrumentFn: () => void,\n previousValue: Metric | undefined,\n): CleanupHandlerCallback {\n addHandler(type, callback);\n\n if (!instrumented[type]) {\n instrumentFn();\n instrumented[type] = true;\n }\n\n if (previousValue) {\n callback({ metric: previousValue });\n }\n\n return getCleanupCallback(type, callback);\n}\n\nfunction instrumentPerformanceObserver(type: InstrumentHandlerTypePerformanceObserver): void {\n const options: PerformanceObserverInit = {};\n\n // Special per-type options we want to use\n if (type === 'event') {\n options.durationThreshold = 0;\n }\n\n observe(\n type,\n entries => {\n triggerHandlers(type, { entries });\n },\n options,\n );\n}\n\nfunction addHandler(type: InstrumentHandlerType, handler: InstrumentHandlerCallback): void {\n handlers[type] = handlers[type] || [];\n (handlers[type] as InstrumentHandlerCallback[]).push(handler);\n}\n\n// Get a callback which can be called to remove the instrumentation handler\nfunction getCleanupCallback(type: InstrumentHandlerType, callback: InstrumentHandlerCallback): CleanupHandlerCallback {\n return () => {\n const typeHandlers = handlers[type];\n\n if (!typeHandlers) {\n return;\n }\n\n const index = typeHandlers.indexOf(callback);\n if (index !== -1) {\n typeHandlers.splice(index, 1);\n }\n };\n}\n","import { bindReporter } from './lib/bindReporter.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Calculates the [CLS](https://web.dev/cls/) value for the current page and\n * calls the `callback` function once the value is ready to be reported, along\n * with all `layout-shift` performance entries that were used in the metric\n * value calculation. The reported value is a `double` (corresponding to a\n * [layout shift score](https://web.dev/cls/#layout-shift-score)).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** CLS should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nconst onCLS = (onReport) => {\n const metric = initMetric('CLS', 0);\n let report;\n\n let sessionValue = 0;\n let sessionEntries = [];\n\n // const handleEntries = (entries: Metric['entries']) => {\n const handleEntries = (entries) => {\n entries.forEach(entry => {\n // Only count layout shifts without recent user input.\n if (!entry.hadRecentInput) {\n const firstSessionEntry = sessionEntries[0];\n const lastSessionEntry = sessionEntries[sessionEntries.length - 1];\n\n // If the entry occurred less than 1 second after the previous entry and\n // less than 5 seconds after the first entry in the session, include the\n // entry in the current session. Otherwise, start a new session.\n if (\n sessionValue &&\n sessionEntries.length !== 0 &&\n entry.startTime - lastSessionEntry.startTime < 1000 &&\n entry.startTime - firstSessionEntry.startTime < 5000\n ) {\n sessionValue += entry.value;\n sessionEntries.push(entry);\n } else {\n sessionValue = entry.value;\n sessionEntries = [entry];\n }\n\n // If the current session value is larger than the current CLS value,\n // update CLS and the entries contributing to it.\n if (sessionValue > metric.value) {\n metric.value = sessionValue;\n metric.entries = sessionEntries;\n if (report) {\n report();\n }\n }\n }\n });\n };\n\n const po = observe('layout-shift', handleEntries);\n if (po) {\n report = bindReporter(onReport, metric);\n\n const stopListening = () => {\n handleEntries(po.takeRecords() );\n report(true);\n };\n\n onHidden(stopListening);\n\n return stopListening;\n }\n\n return;\n};\n\nexport { onCLS };\n//# sourceMappingURL=getCLS.js.map\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { bindReporter } from './lib/bindReporter';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nimport type { CLSMetric, ReportCallback, StopListening } from './types';\n\n/**\n * Calculates the [CLS](https://web.dev/cls/) value for the current page and\n * calls the `callback` function once the value is ready to be reported, along\n * with all `layout-shift` performance entries that were used in the metric\n * value calculation. The reported value is a `double` (corresponding to a\n * [layout shift score](https://web.dev/cls/#layout-shift-score)).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** CLS should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nexport const onCLS = (onReport: ReportCallback): StopListening | undefined => {\n const metric = initMetric('CLS', 0);\n let report: ReturnType;\n\n let sessionValue = 0;\n let sessionEntries: PerformanceEntry[] = [];\n\n // const handleEntries = (entries: Metric['entries']) => {\n const handleEntries = (entries: LayoutShift[]): void => {\n entries.forEach(entry => {\n // Only count layout shifts without recent user input.\n if (!entry.hadRecentInput) {\n const firstSessionEntry = sessionEntries[0];\n const lastSessionEntry = sessionEntries[sessionEntries.length - 1];\n\n // If the entry occurred less than 1 second after the previous entry and\n // less than 5 seconds after the first entry in the session, include the\n // entry in the current session. Otherwise, start a new session.\n if (\n sessionValue &&\n sessionEntries.length !== 0 &&\n entry.startTime - lastSessionEntry.startTime < 1000 &&\n entry.startTime - firstSessionEntry.startTime < 5000\n ) {\n sessionValue += entry.value;\n sessionEntries.push(entry);\n } else {\n sessionValue = entry.value;\n sessionEntries = [entry];\n }\n\n // If the current session value is larger than the current CLS value,\n // update CLS and the entries contributing to it.\n if (sessionValue > metric.value) {\n metric.value = sessionValue;\n metric.entries = sessionEntries;\n if (report) {\n report();\n }\n }\n }\n });\n };\n\n const po = observe('layout-shift', handleEntries);\n if (po) {\n report = bindReporter(onReport, metric);\n\n const stopListening = (): void => {\n handleEntries(po.takeRecords() as CLSMetric['entries']);\n report(true);\n };\n\n onHidden(stopListening);\n\n return stopListening;\n }\n\n return;\n};\n","const bindReporter = (\n callback,\n metric,\n reportAllChanges,\n) => {\n let prevValue;\n let delta;\n return (forceReport) => {\n if (metric.value >= 0) {\n if (forceReport || reportAllChanges) {\n delta = metric.value - (prevValue || 0);\n\n // Report the metric if there's a non-zero delta or if no previous\n // value exists (which can happen in the case of the document becoming\n // hidden when the metric value is 0).\n // See: https://github.com/GoogleChrome/web-vitals/issues/14\n if (delta || prevValue === undefined) {\n prevValue = metric.value;\n metric.delta = delta;\n callback(metric);\n }\n }\n }\n };\n};\n\nexport { bindReporter };\n//# sourceMappingURL=bindReporter.js.map\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Metric, ReportCallback } from '../types';\n\nexport const bindReporter = (\n callback: ReportCallback,\n metric: Metric,\n reportAllChanges?: boolean,\n): ((forceReport?: boolean) => void) => {\n let prevValue: number;\n let delta: number;\n return (forceReport?: boolean) => {\n if (metric.value >= 0) {\n if (forceReport || reportAllChanges) {\n delta = metric.value - (prevValue || 0);\n\n // Report the metric if there's a non-zero delta or if no previous\n // value exists (which can happen in the case of the document becoming\n // hidden when the metric value is 0).\n // See: https://github.com/GoogleChrome/web-vitals/issues/14\n if (delta || prevValue === undefined) {\n prevValue = metric.value;\n metric.delta = delta;\n callback(metric);\n }\n }\n }\n };\n};\n","import { WINDOW } from '../../types.js';\nimport { generateUniqueID } from './generateUniqueID.js';\nimport { getActivationStart } from './getActivationStart.js';\nimport { getNavigationEntry } from './getNavigationEntry.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst initMetric = (name, value) => {\n const navEntry = getNavigationEntry();\n let navigationType = 'navigate';\n\n if (navEntry) {\n if (WINDOW.document.prerendering || getActivationStart() > 0) {\n navigationType = 'prerender';\n } else {\n navigationType = navEntry.type.replace(/_/g, '-') ;\n }\n }\n\n return {\n name,\n value: typeof value === 'undefined' ? -1 : value,\n rating: 'good', // Will be updated if the value changes.\n delta: 0,\n entries: [],\n id: generateUniqueID(),\n navigationType,\n };\n};\n\nexport { initMetric };\n//# sourceMappingURL=initMetric.js.map\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../types';\nimport type { Metric } from '../types';\nimport { generateUniqueID } from './generateUniqueID';\nimport { getActivationStart } from './getActivationStart';\nimport { getNavigationEntry } from './getNavigationEntry';\n\nexport const initMetric = (name: Metric['name'], value?: number): Metric => {\n const navEntry = getNavigationEntry();\n let navigationType: Metric['navigationType'] = 'navigate';\n\n if (navEntry) {\n if (WINDOW.document.prerendering || getActivationStart() > 0) {\n navigationType = 'prerender';\n } else {\n navigationType = navEntry.type.replace(/_/g, '-') as Metric['navigationType'];\n }\n }\n\n return {\n name,\n value: typeof value === 'undefined' ? -1 : value,\n rating: 'good', // Will be updated if the value changes.\n delta: 0,\n entries: [],\n id: generateUniqueID(),\n navigationType,\n };\n};\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Performantly generate a unique, 30-char string by combining a version\n * number, the current timestamp with a 13-digit number integer.\n * @return {string}\n */\nconst generateUniqueID = () => {\n return `v3-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;\n};\n\nexport { generateUniqueID };\n//# sourceMappingURL=generateUniqueID.js.map\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Performantly generate a unique, 30-char string by combining a version\n * number, the current timestamp with a 13-digit number integer.\n * @return {string}\n */\nexport const generateUniqueID = (): string => {\n return `v3-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;\n};\n","import { getNavigationEntry } from './getNavigationEntry.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst getActivationStart = () => {\n const navEntry = getNavigationEntry();\n return (navEntry && navEntry.activationStart) || 0;\n};\n\nexport { getActivationStart };\n//# sourceMappingURL=getActivationStart.js.map\n","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getNavigationEntry } from './getNavigationEntry';\n\nexport const getActivationStart = (): number => {\n const navEntry = getNavigationEntry();\n return (navEntry && navEntry.activationStart) || 0;\n};\n","import { WINDOW } from '../../types.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst getNavigationEntryFromPerformanceTiming = () => {\n // eslint-disable-next-line deprecation/deprecation\n const timing = WINDOW.performance.timing;\n // eslint-disable-next-line deprecation/deprecation\n const type = WINDOW.performance.navigation.type;\n\n const navigationEntry = {\n entryType: 'navigation',\n startTime: 0,\n type: type == 2 ? 'back_forward' : type === 1 ? 'reload' : 'navigate',\n };\n\n for (const key in timing) {\n if (key !== 'navigationStart' && key !== 'toJSON') {\n // eslint-disable-next-line deprecation/deprecation\n navigationEntry[key] = Math.max((timing[key ] ) - timing.navigationStart, 0);\n }\n }\n return navigationEntry ;\n};\n\nconst getNavigationEntry = () => {\n if (WINDOW.__WEB_VITALS_POLYFILL__) {\n return (\n WINDOW.performance &&\n ((performance.getEntriesByType && performance.getEntriesByType('navigation')[0]) ||\n getNavigationEntryFromPerformanceTiming())\n );\n } else {\n return WINDOW.performance && performance.getEntriesByType && performance.getEntriesByType('navigation')[0];\n }\n};\n\nexport { getNavigationEntry };\n//# sourceMappingURL=getNavigationEntry.js.map\n","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../types';\nimport type { NavigationTimingPolyfillEntry } from '../types';\n\nconst getNavigationEntryFromPerformanceTiming = (): NavigationTimingPolyfillEntry => {\n // eslint-disable-next-line deprecation/deprecation\n const timing = WINDOW.performance.timing;\n // eslint-disable-next-line deprecation/deprecation\n const type = WINDOW.performance.navigation.type;\n\n const navigationEntry: { [key: string]: number | string } = {\n entryType: 'navigation',\n startTime: 0,\n type: type == 2 ? 'back_forward' : type === 1 ? 'reload' : 'navigate',\n };\n\n for (const key in timing) {\n if (key !== 'navigationStart' && key !== 'toJSON') {\n // eslint-disable-next-line deprecation/deprecation\n navigationEntry[key] = Math.max((timing[key as keyof PerformanceTiming] as number) - timing.navigationStart, 0);\n }\n }\n return navigationEntry as unknown as NavigationTimingPolyfillEntry;\n};\n\nexport const getNavigationEntry = (): PerformanceNavigationTiming | NavigationTimingPolyfillEntry | undefined => {\n if (WINDOW.__WEB_VITALS_POLYFILL__) {\n return (\n WINDOW.performance &&\n ((performance.getEntriesByType && performance.getEntriesByType('navigation')[0]) ||\n getNavigationEntryFromPerformanceTiming())\n );\n } else {\n return WINDOW.performance && performance.getEntriesByType && performance.getEntriesByType('navigation')[0];\n }\n};\n","/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */\nconst observe = (\n type,\n callback,\n opts,\n) => {\n try {\n if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n const po = new PerformanceObserver(list => {\n callback(list.getEntries() );\n });\n po.observe(\n Object.assign(\n {\n type,\n buffered: true,\n },\n opts || {},\n ) ,\n );\n return po;\n }\n } catch (e) {\n // Do nothing.\n }\n return;\n};\n\nexport { observe };\n//# sourceMappingURL=observe.js.map\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { FirstInputPolyfillEntry, NavigationTimingPolyfillEntry, PerformancePaintTiming } from '../types';\n\nexport interface PerformanceEntryHandler {\n (entry: PerformanceEntry): void;\n}\n\ninterface PerformanceEntryMap {\n event: PerformanceEventTiming[];\n paint: PerformancePaintTiming[];\n 'layout-shift': LayoutShift[];\n 'largest-contentful-paint': LargestContentfulPaint[];\n 'first-input': PerformanceEventTiming[] | FirstInputPolyfillEntry[];\n navigation: PerformanceNavigationTiming[] | NavigationTimingPolyfillEntry[];\n resource: PerformanceResourceTiming[];\n longtask: PerformanceEntry[];\n}\n\n/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */\nexport const observe = (\n type: K,\n callback: (entries: PerformanceEntryMap[K]) => void,\n opts?: PerformanceObserverInit,\n): PerformanceObserver | undefined => {\n try {\n if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n const po = new PerformanceObserver(list => {\n callback(list.getEntries() as PerformanceEntryMap[K]);\n });\n po.observe(\n Object.assign(\n {\n type,\n buffered: true,\n },\n opts || {},\n ) as PerformanceObserverInit,\n );\n return po;\n }\n } catch (e) {\n // Do nothing.\n }\n return;\n};\n","import { WINDOW } from '../../types.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst onHidden = (cb, once) => {\n const onHiddenOrPageHide = (event) => {\n if (event.type === 'pagehide' || WINDOW.document.visibilityState === 'hidden') {\n cb(event);\n if (once) {\n removeEventListener('visibilitychange', onHiddenOrPageHide, true);\n removeEventListener('pagehide', onHiddenOrPageHide, true);\n }\n }\n };\n addEventListener('visibilitychange', onHiddenOrPageHide, true);\n // Some browsers have buggy implementations of visibilitychange,\n // so we use pagehide in addition, just to be safe.\n addEventListener('pagehide', onHiddenOrPageHide, true);\n};\n\nexport { onHidden };\n//# sourceMappingURL=onHidden.js.map\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../types';\n\nexport interface OnHiddenCallback {\n (event: Event): void;\n}\n\nexport const onHidden = (cb: OnHiddenCallback, once?: boolean): void => {\n const onHiddenOrPageHide = (event: Event): void => {\n if (event.type === 'pagehide' || WINDOW.document.visibilityState === 'hidden') {\n cb(event);\n if (once) {\n removeEventListener('visibilitychange', onHiddenOrPageHide, true);\n removeEventListener('pagehide', onHiddenOrPageHide, true);\n }\n }\n };\n addEventListener('visibilitychange', onHiddenOrPageHide, true);\n // Some browsers have buggy implementations of visibilitychange,\n // so we use pagehide in addition, just to be safe.\n addEventListener('pagehide', onHiddenOrPageHide, true);\n};\n","import { bindReporter } from './lib/bindReporter.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Calculates the [FID](https://web.dev/fid/) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `first-input` performance entry used to determine the value. The\n * reported value is a `DOMHighResTimeStamp`.\n *\n * _**Important:** since FID is only reported after the user interacts with the\n * page, it's possible that it will not be reported for some page loads._\n */\nconst onFID = (onReport) => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('FID');\n // eslint-disable-next-line prefer-const\n let report;\n\n const handleEntry = (entry) => {\n // Only report if the page wasn't hidden prior to the first input.\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n metric.value = entry.processingStart - entry.startTime;\n metric.entries.push(entry);\n report(true);\n }\n };\n\n const handleEntries = (entries) => {\n (entries ).forEach(handleEntry);\n };\n\n const po = observe('first-input', handleEntries);\n report = bindReporter(onReport, metric);\n\n if (po) {\n onHidden(() => {\n handleEntries(po.takeRecords() );\n po.disconnect();\n }, true);\n }\n};\n\nexport { onFID };\n//# sourceMappingURL=getFID.js.map\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { bindReporter } from './lib/bindReporter';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nimport type { FIDMetric, PerformanceEventTiming, ReportCallback } from './types';\n\n/**\n * Calculates the [FID](https://web.dev/fid/) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `first-input` performance entry used to determine the value. The\n * reported value is a `DOMHighResTimeStamp`.\n *\n * _**Important:** since FID is only reported after the user interacts with the\n * page, it's possible that it will not be reported for some page loads._\n */\nexport const onFID = (onReport: ReportCallback): void => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('FID');\n // eslint-disable-next-line prefer-const\n let report: ReturnType;\n\n const handleEntry = (entry: PerformanceEventTiming): void => {\n // Only report if the page wasn't hidden prior to the first input.\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n metric.value = entry.processingStart - entry.startTime;\n metric.entries.push(entry);\n report(true);\n }\n };\n\n const handleEntries = (entries: FIDMetric['entries']): void => {\n (entries as PerformanceEventTiming[]).forEach(handleEntry);\n };\n\n const po = observe('first-input', handleEntries);\n report = bindReporter(onReport, metric);\n\n if (po) {\n onHidden(() => {\n handleEntries(po.takeRecords() as FIDMetric['entries']);\n po.disconnect();\n }, true);\n }\n};\n","import { WINDOW } from '../../types.js';\nimport { onHidden } from './onHidden.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet firstHiddenTime = -1;\n\nconst initHiddenTime = () => {\n // If the document is hidden and not prerendering, assume it was always\n // hidden and the page was loaded in the background.\n return WINDOW.document.visibilityState === 'hidden' && !WINDOW.document.prerendering ? 0 : Infinity;\n};\n\nconst trackChanges = () => {\n // Update the time if/when the document becomes hidden.\n onHidden(({ timeStamp }) => {\n firstHiddenTime = timeStamp;\n }, true);\n};\n\nconst getVisibilityWatcher = (\n\n) => {\n if (firstHiddenTime < 0) {\n // If the document is hidden when this code runs, assume it was hidden\n // since navigation start. This isn't a perfect heuristic, but it's the\n // best we can do until an API is available to support querying past\n // visibilityState.\n firstHiddenTime = initHiddenTime();\n trackChanges();\n }\n return {\n get firstHiddenTime() {\n return firstHiddenTime;\n },\n };\n};\n\nexport { getVisibilityWatcher };\n//# sourceMappingURL=getVisibilityWatcher.js.map\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../types';\nimport { onHidden } from './onHidden';\n\nlet firstHiddenTime = -1;\n\nconst initHiddenTime = (): number => {\n // If the document is hidden and not prerendering, assume it was always\n // hidden and the page was loaded in the background.\n return WINDOW.document.visibilityState === 'hidden' && !WINDOW.document.prerendering ? 0 : Infinity;\n};\n\nconst trackChanges = (): void => {\n // Update the time if/when the document becomes hidden.\n onHidden(({ timeStamp }) => {\n firstHiddenTime = timeStamp;\n }, true);\n};\n\nexport const getVisibilityWatcher = (): {\n readonly firstHiddenTime: number;\n} => {\n if (firstHiddenTime < 0) {\n // If the document is hidden when this code runs, assume it was hidden\n // since navigation start. This isn't a perfect heuristic, but it's the\n // best we can do until an API is available to support querying past\n // visibilityState.\n firstHiddenTime = initHiddenTime();\n trackChanges();\n }\n return {\n get firstHiddenTime() {\n return firstHiddenTime;\n },\n };\n};\n","import { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst reportedMetricIDs = {};\n\n/**\n * Calculates the [LCP](https://web.dev/lcp/) value for the current page and\n * calls the `callback` function once the value is ready (along with the\n * relevant `largest-contentful-paint` performance entry used to determine the\n * value). The reported value is a `DOMHighResTimeStamp`.\n */\nconst onLCP = (onReport) => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('LCP');\n let report;\n\n const handleEntries = (entries) => {\n const lastEntry = entries[entries.length - 1] ;\n if (lastEntry) {\n // The startTime attribute returns the value of the renderTime if it is\n // not 0, and the value of the loadTime otherwise. The activationStart\n // reference is used because LCP should be relative to page activation\n // rather than navigation start if the page was prerendered.\n const value = Math.max(lastEntry.startTime - getActivationStart(), 0);\n\n // Only report if the page wasn't hidden prior to LCP.\n if (value < visibilityWatcher.firstHiddenTime) {\n metric.value = value;\n metric.entries = [lastEntry];\n report();\n }\n }\n };\n\n const po = observe('largest-contentful-paint', handleEntries);\n\n if (po) {\n report = bindReporter(onReport, metric);\n\n const stopListening = () => {\n if (!reportedMetricIDs[metric.id]) {\n handleEntries(po.takeRecords() );\n po.disconnect();\n reportedMetricIDs[metric.id] = true;\n report(true);\n }\n };\n\n // Stop listening after input. Note: while scrolling is an input that\n // stop LCP observation, it's unreliable since it can be programmatically\n // generated. See: https://github.com/GoogleChrome/web-vitals/issues/75\n ['keydown', 'click'].forEach(type => {\n addEventListener(type, stopListening, { once: true, capture: true });\n });\n\n onHidden(stopListening, true);\n\n return stopListening;\n }\n\n return;\n};\n\nexport { onLCP };\n//# sourceMappingURL=getLCP.js.map\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { bindReporter } from './lib/bindReporter';\nimport { getActivationStart } from './lib/getActivationStart';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nimport type { LCPMetric, ReportCallback, StopListening } from './types';\n\nconst reportedMetricIDs: Record = {};\n\n/**\n * Calculates the [LCP](https://web.dev/lcp/) value for the current page and\n * calls the `callback` function once the value is ready (along with the\n * relevant `largest-contentful-paint` performance entry used to determine the\n * value). The reported value is a `DOMHighResTimeStamp`.\n */\nexport const onLCP = (onReport: ReportCallback): StopListening | undefined => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('LCP');\n let report: ReturnType;\n\n const handleEntries = (entries: LCPMetric['entries']): void => {\n const lastEntry = entries[entries.length - 1] as LargestContentfulPaint;\n if (lastEntry) {\n // The startTime attribute returns the value of the renderTime if it is\n // not 0, and the value of the loadTime otherwise. The activationStart\n // reference is used because LCP should be relative to page activation\n // rather than navigation start if the page was prerendered.\n const value = Math.max(lastEntry.startTime - getActivationStart(), 0);\n\n // Only report if the page wasn't hidden prior to LCP.\n if (value < visibilityWatcher.firstHiddenTime) {\n metric.value = value;\n metric.entries = [lastEntry];\n report();\n }\n }\n };\n\n const po = observe('largest-contentful-paint', handleEntries);\n\n if (po) {\n report = bindReporter(onReport, metric);\n\n const stopListening = (): void => {\n if (!reportedMetricIDs[metric.id]) {\n handleEntries(po.takeRecords() as LCPMetric['entries']);\n po.disconnect();\n reportedMetricIDs[metric.id] = true;\n report(true);\n }\n };\n\n // Stop listening after input. Note: while scrolling is an input that\n // stop LCP observation, it's unreliable since it can be programmatically\n // generated. See: https://github.com/GoogleChrome/web-vitals/issues/75\n ['keydown', 'click'].forEach(type => {\n addEventListener(type, stopListening, { once: true, capture: true });\n });\n\n onHidden(stopListening, true);\n\n return stopListening;\n }\n\n return;\n};\n","/**\n * Checks if a given value is a valid measurement value.\n */\nfunction isMeasurementValue(value) {\n return typeof value === 'number' && isFinite(value);\n}\n\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n */\nfunction _startChild(transaction, { startTimestamp, ...ctx }) {\n if (startTimestamp && transaction.startTimestamp > startTimestamp) {\n transaction.startTimestamp = startTimestamp;\n }\n\n return transaction.startChild({\n startTimestamp,\n ...ctx,\n });\n}\n\nexport { _startChild, isMeasurementValue };\n//# sourceMappingURL=utils.js.map\n","import type { Transaction } from '@sentry/core';\nimport type { Span, SpanContext } from '@sentry/types';\n\n/**\n * Checks if a given value is a valid measurement value.\n */\nexport function isMeasurementValue(value: unknown): value is number {\n return typeof value === 'number' && isFinite(value);\n}\n\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n */\nexport function _startChild(transaction: Transaction, { startTimestamp, ...ctx }: SpanContext): Span {\n if (startTimestamp && transaction.startTimestamp > startTimestamp) {\n transaction.startTimestamp = startTimestamp;\n }\n\n return transaction.startChild({\n startTimestamp,\n ...ctx,\n });\n}\n","import { hasTracingEnabled, getCurrentHub, getDynamicSamplingContextFromClient } from '@sentry/core';\nimport { addInstrumentationHandler, generateSentryTraceHeader, dynamicSamplingContextToSentryBaggageHeader, isInstanceOf, BAGGAGE_HEADER_NAME, SENTRY_XHR_DATA_KEY, browserPerformanceTimeOrigin, stringMatchesSomePattern } from '@sentry/utils';\nimport { addPerformanceInstrumentationHandler } from './instrument.js';\n\n/* eslint-disable max-lines */\n\nconst DEFAULT_TRACE_PROPAGATION_TARGETS = ['localhost', /^\\/(?!\\/)/];\n\n/** Options for Request Instrumentation */\n\nconst defaultRequestInstrumentationOptions = {\n traceFetch: true,\n traceXHR: true,\n enableHTTPTimings: true,\n // TODO (v8): Remove this property\n tracingOrigins: DEFAULT_TRACE_PROPAGATION_TARGETS,\n tracePropagationTargets: DEFAULT_TRACE_PROPAGATION_TARGETS,\n};\n\n/** Registers span creators for xhr and fetch requests */\nfunction instrumentOutgoingRequests(_options) {\n const {\n traceFetch,\n traceXHR,\n // eslint-disable-next-line deprecation/deprecation\n tracePropagationTargets,\n // eslint-disable-next-line deprecation/deprecation\n tracingOrigins,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n } = {\n traceFetch: defaultRequestInstrumentationOptions.traceFetch,\n traceXHR: defaultRequestInstrumentationOptions.traceXHR,\n ..._options,\n };\n\n const shouldCreateSpan =\n typeof shouldCreateSpanForRequest === 'function' ? shouldCreateSpanForRequest : (_) => true;\n\n // TODO(v8) Remove tracingOrigins here\n // The only reason we're passing it in here is because this instrumentOutgoingRequests function is publicly exported\n // and we don't want to break the API. We can remove it in v8.\n const shouldAttachHeadersWithTargets = (url) =>\n shouldAttachHeaders(url, tracePropagationTargets || tracingOrigins);\n\n const spans = {};\n\n if (traceFetch) {\n addInstrumentationHandler('fetch', (handlerData) => {\n const createdSpan = fetchCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n if (enableHTTPTimings && createdSpan) {\n addHTTPTimings(createdSpan);\n }\n });\n }\n\n if (traceXHR) {\n addInstrumentationHandler('xhr', (handlerData) => {\n const createdSpan = xhrCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n if (enableHTTPTimings && createdSpan) {\n addHTTPTimings(createdSpan);\n }\n });\n }\n}\n\nfunction isPerformanceResourceTiming(entry) {\n return (\n entry.entryType === 'resource' &&\n 'initiatorType' in entry &&\n typeof (entry ).nextHopProtocol === 'string' &&\n (entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest')\n );\n}\n\n/**\n * Creates a temporary observer to listen to the next fetch/xhr resourcing timings,\n * so that when timings hit their per-browser limit they don't need to be removed.\n *\n * @param span A span that has yet to be finished, must contain `url` on data.\n */\nfunction addHTTPTimings(span) {\n const url = span.data.url;\n\n if (!url) {\n return;\n }\n\n const cleanup = addPerformanceInstrumentationHandler('resource', ({ entries }) => {\n entries.forEach(entry => {\n if (isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) {\n const spanData = resourceTimingEntryToSpanData(entry);\n spanData.forEach(data => span.setData(...data));\n // In the next tick, clean this handler up\n // We have to wait here because otherwise this cleans itself up before it is fully done\n setTimeout(cleanup);\n }\n });\n });\n}\n\n/**\n * Converts ALPN protocol ids to name and version.\n *\n * (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)\n * @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol\n */\nfunction extractNetworkProtocol(nextHopProtocol) {\n let name = 'unknown';\n let version = 'unknown';\n let _name = '';\n for (const char of nextHopProtocol) {\n // http/1.1 etc.\n if (char === '/') {\n [name, version] = nextHopProtocol.split('/');\n break;\n }\n // h2, h3 etc.\n if (!isNaN(Number(char))) {\n name = _name === 'h' ? 'http' : _name;\n version = nextHopProtocol.split(_name)[1];\n break;\n }\n _name += char;\n }\n if (_name === nextHopProtocol) {\n // webrtc, ftp, etc.\n name = _name;\n }\n return { name, version };\n}\n\nfunction getAbsoluteTime(time = 0) {\n return ((browserPerformanceTimeOrigin || performance.timeOrigin) + time) / 1000;\n}\n\nfunction resourceTimingEntryToSpanData(resourceTiming) {\n const { name, version } = extractNetworkProtocol(resourceTiming.nextHopProtocol);\n\n const timingSpanData = [];\n\n timingSpanData.push(['network.protocol.version', version], ['network.protocol.name', name]);\n\n if (!browserPerformanceTimeOrigin) {\n return timingSpanData;\n }\n return [\n ...timingSpanData,\n ['http.request.redirect_start', getAbsoluteTime(resourceTiming.redirectStart)],\n ['http.request.fetch_start', getAbsoluteTime(resourceTiming.fetchStart)],\n ['http.request.domain_lookup_start', getAbsoluteTime(resourceTiming.domainLookupStart)],\n ['http.request.domain_lookup_end', getAbsoluteTime(resourceTiming.domainLookupEnd)],\n ['http.request.connect_start', getAbsoluteTime(resourceTiming.connectStart)],\n ['http.request.secure_connection_start', getAbsoluteTime(resourceTiming.secureConnectionStart)],\n ['http.request.connection_end', getAbsoluteTime(resourceTiming.connectEnd)],\n ['http.request.request_start', getAbsoluteTime(resourceTiming.requestStart)],\n ['http.request.response_start', getAbsoluteTime(resourceTiming.responseStart)],\n ['http.request.response_end', getAbsoluteTime(resourceTiming.responseEnd)],\n ];\n}\n\n/**\n * A function that determines whether to attach tracing headers to a request.\n * This was extracted from `instrumentOutgoingRequests` to make it easier to test shouldAttachHeaders.\n * We only export this fuction for testing purposes.\n */\nfunction shouldAttachHeaders(url, tracePropagationTargets) {\n return stringMatchesSomePattern(url, tracePropagationTargets || DEFAULT_TRACE_PROPAGATION_TARGETS);\n}\n\n/**\n * Create and track fetch request spans\n *\n * @returns Span if a span was created, otherwise void.\n */\nfunction fetchCallback(\n handlerData,\n shouldCreateSpan,\n shouldAttachHeaders,\n spans,\n) {\n if (!hasTracingEnabled() || !handlerData.fetchData) {\n return undefined;\n }\n\n const shouldCreateSpanResult = shouldCreateSpan(handlerData.fetchData.url);\n\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = handlerData.fetchData.__span;\n if (!spanId) return;\n\n const span = spans[spanId];\n if (span) {\n if (handlerData.response) {\n // TODO (kmclb) remove this once types PR goes through\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n span.setHttpStatus(handlerData.response.status);\n\n const contentLength =\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n handlerData.response && handlerData.response.headers && handlerData.response.headers.get('content-length');\n\n const contentLengthNum = parseInt(contentLength);\n if (contentLengthNum > 0) {\n span.setData('http.response_content_length', contentLengthNum);\n }\n } else if (handlerData.error) {\n span.setStatus('internal_error');\n }\n span.finish();\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const client = hub.getClient();\n const parentSpan = scope.getSpan();\n\n const { method, url } = handlerData.fetchData;\n\n const span =\n shouldCreateSpanResult && parentSpan\n ? parentSpan.startChild({\n data: {\n url,\n type: 'fetch',\n 'http.method': method,\n },\n description: `${method} ${url}`,\n op: 'http.client',\n origin: 'auto.http.browser',\n })\n : undefined;\n\n if (span) {\n handlerData.fetchData.__span = span.spanId;\n spans[span.spanId] = span;\n }\n\n if (shouldAttachHeaders(handlerData.fetchData.url) && client) {\n const request = handlerData.args[0];\n\n // In case the user hasn't set the second argument of a fetch call we default it to `{}`.\n handlerData.args[1] = handlerData.args[1] || {};\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const options = handlerData.args[1];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n options.headers = addTracingHeadersToFetchRequest(request, client, scope, options, span);\n }\n\n return span;\n}\n\n/**\n * Adds sentry-trace and baggage headers to the various forms of fetch headers\n */\nfunction addTracingHeadersToFetchRequest(\n request, // unknown is actually type Request but we can't export DOM types from this package,\n client,\n scope,\n options\n\n,\n requestSpan,\n) {\n const span = requestSpan || scope.getSpan();\n\n const transaction = span && span.transaction;\n\n const { traceId, sampled, dsc } = scope.getPropagationContext();\n\n const sentryTraceHeader = span ? span.toTraceparent() : generateSentryTraceHeader(traceId, undefined, sampled);\n const dynamicSamplingContext = transaction\n ? transaction.getDynamicSamplingContext()\n : dsc\n ? dsc\n : getDynamicSamplingContextFromClient(traceId, client, scope);\n\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext);\n\n const headers =\n typeof Request !== 'undefined' && isInstanceOf(request, Request) ? (request ).headers : options.headers;\n\n if (!headers) {\n return { 'sentry-trace': sentryTraceHeader, baggage: sentryBaggageHeader };\n } else if (typeof Headers !== 'undefined' && isInstanceOf(headers, Headers)) {\n const newHeaders = new Headers(headers );\n\n newHeaders.append('sentry-trace', sentryTraceHeader);\n\n if (sentryBaggageHeader) {\n // If the same header is appended multiple times the browser will merge the values into a single request header.\n // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n newHeaders.append(BAGGAGE_HEADER_NAME, sentryBaggageHeader);\n }\n\n return newHeaders ;\n } else if (Array.isArray(headers)) {\n const newHeaders = [...headers, ['sentry-trace', sentryTraceHeader]];\n\n if (sentryBaggageHeader) {\n // If there are multiple entries with the same key, the browser will merge the values into a single request header.\n // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n newHeaders.push([BAGGAGE_HEADER_NAME, sentryBaggageHeader]);\n }\n\n return newHeaders ;\n } else {\n const existingBaggageHeader = 'baggage' in headers ? headers.baggage : undefined;\n const newBaggageHeaders = [];\n\n if (Array.isArray(existingBaggageHeader)) {\n newBaggageHeaders.push(...existingBaggageHeader);\n } else if (existingBaggageHeader) {\n newBaggageHeaders.push(existingBaggageHeader);\n }\n\n if (sentryBaggageHeader) {\n newBaggageHeaders.push(sentryBaggageHeader);\n }\n\n return {\n ...(headers ),\n 'sentry-trace': sentryTraceHeader,\n baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(',') : undefined,\n };\n }\n}\n\n/**\n * Create and track xhr request spans\n *\n * @returns Span if a span was created, otherwise void.\n */\n// eslint-disable-next-line complexity\nfunction xhrCallback(\n handlerData,\n shouldCreateSpan,\n shouldAttachHeaders,\n spans,\n) {\n const xhr = handlerData.xhr;\n const sentryXhrData = xhr && xhr[SENTRY_XHR_DATA_KEY];\n\n if (!hasTracingEnabled() || (xhr && xhr.__sentry_own_request__) || !xhr || !sentryXhrData) {\n return undefined;\n }\n\n const shouldCreateSpanResult = shouldCreateSpan(sentryXhrData.url);\n\n // check first if the request has finished and is tracked by an existing span which should now end\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = xhr.__sentry_xhr_span_id__;\n if (!spanId) return;\n\n const span = spans[spanId];\n if (span) {\n span.setHttpStatus(sentryXhrData.status_code);\n span.finish();\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const parentSpan = scope.getSpan();\n\n const span =\n shouldCreateSpanResult && parentSpan\n ? parentSpan.startChild({\n data: {\n ...sentryXhrData.data,\n type: 'xhr',\n 'http.method': sentryXhrData.method,\n url: sentryXhrData.url,\n },\n description: `${sentryXhrData.method} ${sentryXhrData.url}`,\n op: 'http.client',\n origin: 'auto.http.browser',\n })\n : undefined;\n\n if (span) {\n xhr.__sentry_xhr_span_id__ = span.spanId;\n spans[xhr.__sentry_xhr_span_id__] = span;\n }\n\n if (xhr.setRequestHeader && shouldAttachHeaders(sentryXhrData.url)) {\n if (span) {\n const transaction = span && span.transaction;\n const dynamicSamplingContext = transaction && transaction.getDynamicSamplingContext();\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext);\n setHeaderOnXhr(xhr, span.toTraceparent(), sentryBaggageHeader);\n } else {\n const client = hub.getClient();\n const { traceId, sampled, dsc } = scope.getPropagationContext();\n const sentryTraceHeader = generateSentryTraceHeader(traceId, undefined, sampled);\n const dynamicSamplingContext =\n dsc || (client ? getDynamicSamplingContextFromClient(traceId, client, scope) : undefined);\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext);\n setHeaderOnXhr(xhr, sentryTraceHeader, sentryBaggageHeader);\n }\n }\n\n return span;\n}\n\nfunction setHeaderOnXhr(\n xhr,\n sentryTraceHeader,\n sentryBaggageHeader,\n) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader('sentry-trace', sentryTraceHeader);\n if (sentryBaggageHeader) {\n // From MDN: \"If this method is called several times with the same header, the values are merged into one single request header.\"\n // We can therefore simply set a baggage header without checking what was there before\n // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader(BAGGAGE_HEADER_NAME, sentryBaggageHeader);\n }\n } catch (_) {\n // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n }\n}\n\nexport { DEFAULT_TRACE_PROPAGATION_TARGETS, addTracingHeadersToFetchRequest, defaultRequestInstrumentationOptions, extractNetworkProtocol, fetchCallback, instrumentOutgoingRequests, shouldAttachHeaders, xhrCallback };\n//# sourceMappingURL=request.js.map\n","/* eslint-disable max-lines */\nimport { getCurrentHub, getDynamicSamplingContextFromClient, hasTracingEnabled } from '@sentry/core';\nimport type { Client, Scope, Span } from '@sentry/types';\nimport {\n addInstrumentationHandler,\n BAGGAGE_HEADER_NAME,\n browserPerformanceTimeOrigin,\n dynamicSamplingContextToSentryBaggageHeader,\n generateSentryTraceHeader,\n isInstanceOf,\n SENTRY_XHR_DATA_KEY,\n stringMatchesSomePattern,\n} from '@sentry/utils';\n\nimport { addPerformanceInstrumentationHandler } from './instrument';\n\nexport const DEFAULT_TRACE_PROPAGATION_TARGETS = ['localhost', /^\\/(?!\\/)/];\n\n/** Options for Request Instrumentation */\nexport interface RequestInstrumentationOptions {\n /**\n * @deprecated Will be removed in v8.\n * Use `shouldCreateSpanForRequest` to control span creation and `tracePropagationTargets` to control\n * trace header attachment.\n */\n tracingOrigins: Array;\n\n /**\n * List of strings and/or regexes used to determine which outgoing requests will have `sentry-trace` and `baggage`\n * headers attached.\n *\n * @deprecated Use the top-level `tracePropagationTargets` option in `Sentry.init` instead.\n * This option will be removed in v8.\n *\n * Default: ['localhost', /^\\//] @see {DEFAULT_TRACE_PROPAGATION_TARGETS}\n */\n tracePropagationTargets: Array;\n\n /**\n * Flag to disable patching all together for fetch requests.\n *\n * Default: true\n */\n traceFetch: boolean;\n\n /**\n * Flag to disable patching all together for xhr requests.\n *\n * Default: true\n */\n traceXHR: boolean;\n\n /**\n * If true, Sentry will capture http timings and add them to the corresponding http spans.\n *\n * Default: true\n */\n enableHTTPTimings: boolean;\n\n /**\n * This function will be called before creating a span for a request with the given url.\n * Return false if you don't want a span for the given url.\n *\n * Default: (url: string) => true\n */\n shouldCreateSpanForRequest?(this: void, url: string): boolean;\n}\n\n/** Data returned from fetch callback */\nexport interface FetchData {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n args: any[]; // the arguments passed to the fetch call itself\n fetchData?: {\n method: string;\n url: string;\n // span_id\n __span?: string;\n };\n\n // TODO Should this be unknown instead? If we vendor types, make it a Response\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n response?: any;\n error?: unknown;\n\n startTimestamp: number;\n endTimestamp?: number;\n}\n\n/** Data returned from XHR request */\nexport interface XHRData {\n xhr?: {\n [SENTRY_XHR_DATA_KEY]?: {\n method: string;\n url: string;\n status_code: number;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data: Record;\n };\n __sentry_xhr_span_id__?: string;\n setRequestHeader?: (key: string, val: string) => void;\n getRequestHeader?: (key: string) => string;\n __sentry_own_request__?: boolean;\n };\n startTimestamp: number;\n endTimestamp?: number;\n}\n\ntype PolymorphicRequestHeaders =\n | Record\n | Array<[string, string]>\n // the below is not preicsely the Header type used in Request, but it'll pass duck-typing\n | {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n append: (key: string, value: string) => void;\n get: (key: string) => string | null | undefined;\n };\n\nexport const defaultRequestInstrumentationOptions: RequestInstrumentationOptions = {\n traceFetch: true,\n traceXHR: true,\n enableHTTPTimings: true,\n // TODO (v8): Remove this property\n tracingOrigins: DEFAULT_TRACE_PROPAGATION_TARGETS,\n tracePropagationTargets: DEFAULT_TRACE_PROPAGATION_TARGETS,\n};\n\n/** Registers span creators for xhr and fetch requests */\nexport function instrumentOutgoingRequests(_options?: Partial): void {\n const {\n traceFetch,\n traceXHR,\n // eslint-disable-next-line deprecation/deprecation\n tracePropagationTargets,\n // eslint-disable-next-line deprecation/deprecation\n tracingOrigins,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n } = {\n traceFetch: defaultRequestInstrumentationOptions.traceFetch,\n traceXHR: defaultRequestInstrumentationOptions.traceXHR,\n ..._options,\n };\n\n const shouldCreateSpan =\n typeof shouldCreateSpanForRequest === 'function' ? shouldCreateSpanForRequest : (_: string) => true;\n\n // TODO(v8) Remove tracingOrigins here\n // The only reason we're passing it in here is because this instrumentOutgoingRequests function is publicly exported\n // and we don't want to break the API. We can remove it in v8.\n const shouldAttachHeadersWithTargets = (url: string): boolean =>\n shouldAttachHeaders(url, tracePropagationTargets || tracingOrigins);\n\n const spans: Record = {};\n\n if (traceFetch) {\n addInstrumentationHandler('fetch', (handlerData: FetchData) => {\n const createdSpan = fetchCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n if (enableHTTPTimings && createdSpan) {\n addHTTPTimings(createdSpan);\n }\n });\n }\n\n if (traceXHR) {\n addInstrumentationHandler('xhr', (handlerData: XHRData) => {\n const createdSpan = xhrCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n if (enableHTTPTimings && createdSpan) {\n addHTTPTimings(createdSpan);\n }\n });\n }\n}\n\nfunction isPerformanceResourceTiming(entry: PerformanceEntry): entry is PerformanceResourceTiming {\n return (\n entry.entryType === 'resource' &&\n 'initiatorType' in entry &&\n typeof (entry as PerformanceResourceTiming).nextHopProtocol === 'string' &&\n (entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest')\n );\n}\n\n/**\n * Creates a temporary observer to listen to the next fetch/xhr resourcing timings,\n * so that when timings hit their per-browser limit they don't need to be removed.\n *\n * @param span A span that has yet to be finished, must contain `url` on data.\n */\nfunction addHTTPTimings(span: Span): void {\n const url = span.data.url;\n\n if (!url) {\n return;\n }\n\n const cleanup = addPerformanceInstrumentationHandler('resource', ({ entries }) => {\n entries.forEach(entry => {\n if (isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) {\n const spanData = resourceTimingEntryToSpanData(entry);\n spanData.forEach(data => span.setData(...data));\n // In the next tick, clean this handler up\n // We have to wait here because otherwise this cleans itself up before it is fully done\n setTimeout(cleanup);\n }\n });\n });\n}\n\n/**\n * Converts ALPN protocol ids to name and version.\n *\n * (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)\n * @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol\n */\nexport function extractNetworkProtocol(nextHopProtocol: string): { name: string; version: string } {\n let name = 'unknown';\n let version = 'unknown';\n let _name = '';\n for (const char of nextHopProtocol) {\n // http/1.1 etc.\n if (char === '/') {\n [name, version] = nextHopProtocol.split('/');\n break;\n }\n // h2, h3 etc.\n if (!isNaN(Number(char))) {\n name = _name === 'h' ? 'http' : _name;\n version = nextHopProtocol.split(_name)[1];\n break;\n }\n _name += char;\n }\n if (_name === nextHopProtocol) {\n // webrtc, ftp, etc.\n name = _name;\n }\n return { name, version };\n}\n\nfunction getAbsoluteTime(time: number = 0): number {\n return ((browserPerformanceTimeOrigin || performance.timeOrigin) + time) / 1000;\n}\n\nfunction resourceTimingEntryToSpanData(resourceTiming: PerformanceResourceTiming): [string, string | number][] {\n const { name, version } = extractNetworkProtocol(resourceTiming.nextHopProtocol);\n\n const timingSpanData: [string, string | number][] = [];\n\n timingSpanData.push(['network.protocol.version', version], ['network.protocol.name', name]);\n\n if (!browserPerformanceTimeOrigin) {\n return timingSpanData;\n }\n return [\n ...timingSpanData,\n ['http.request.redirect_start', getAbsoluteTime(resourceTiming.redirectStart)],\n ['http.request.fetch_start', getAbsoluteTime(resourceTiming.fetchStart)],\n ['http.request.domain_lookup_start', getAbsoluteTime(resourceTiming.domainLookupStart)],\n ['http.request.domain_lookup_end', getAbsoluteTime(resourceTiming.domainLookupEnd)],\n ['http.request.connect_start', getAbsoluteTime(resourceTiming.connectStart)],\n ['http.request.secure_connection_start', getAbsoluteTime(resourceTiming.secureConnectionStart)],\n ['http.request.connection_end', getAbsoluteTime(resourceTiming.connectEnd)],\n ['http.request.request_start', getAbsoluteTime(resourceTiming.requestStart)],\n ['http.request.response_start', getAbsoluteTime(resourceTiming.responseStart)],\n ['http.request.response_end', getAbsoluteTime(resourceTiming.responseEnd)],\n ];\n}\n\n/**\n * A function that determines whether to attach tracing headers to a request.\n * This was extracted from `instrumentOutgoingRequests` to make it easier to test shouldAttachHeaders.\n * We only export this fuction for testing purposes.\n */\nexport function shouldAttachHeaders(url: string, tracePropagationTargets: (string | RegExp)[] | undefined): boolean {\n return stringMatchesSomePattern(url, tracePropagationTargets || DEFAULT_TRACE_PROPAGATION_TARGETS);\n}\n\n/**\n * Create and track fetch request spans\n *\n * @returns Span if a span was created, otherwise void.\n */\nexport function fetchCallback(\n handlerData: FetchData,\n shouldCreateSpan: (url: string) => boolean,\n shouldAttachHeaders: (url: string) => boolean,\n spans: Record,\n): Span | undefined {\n if (!hasTracingEnabled() || !handlerData.fetchData) {\n return undefined;\n }\n\n const shouldCreateSpanResult = shouldCreateSpan(handlerData.fetchData.url);\n\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = handlerData.fetchData.__span;\n if (!spanId) return;\n\n const span = spans[spanId];\n if (span) {\n if (handlerData.response) {\n // TODO (kmclb) remove this once types PR goes through\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n span.setHttpStatus(handlerData.response.status);\n\n const contentLength: string =\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n handlerData.response && handlerData.response.headers && handlerData.response.headers.get('content-length');\n\n const contentLengthNum = parseInt(contentLength);\n if (contentLengthNum > 0) {\n span.setData('http.response_content_length', contentLengthNum);\n }\n } else if (handlerData.error) {\n span.setStatus('internal_error');\n }\n span.finish();\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const client = hub.getClient();\n const parentSpan = scope.getSpan();\n\n const { method, url } = handlerData.fetchData;\n\n const span =\n shouldCreateSpanResult && parentSpan\n ? parentSpan.startChild({\n data: {\n url,\n type: 'fetch',\n 'http.method': method,\n },\n description: `${method} ${url}`,\n op: 'http.client',\n origin: 'auto.http.browser',\n })\n : undefined;\n\n if (span) {\n handlerData.fetchData.__span = span.spanId;\n spans[span.spanId] = span;\n }\n\n if (shouldAttachHeaders(handlerData.fetchData.url) && client) {\n const request: string | Request = handlerData.args[0];\n\n // In case the user hasn't set the second argument of a fetch call we default it to `{}`.\n handlerData.args[1] = handlerData.args[1] || {};\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const options: { [key: string]: any } = handlerData.args[1];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n options.headers = addTracingHeadersToFetchRequest(request, client, scope, options, span);\n }\n\n return span;\n}\n\n/**\n * Adds sentry-trace and baggage headers to the various forms of fetch headers\n */\nexport function addTracingHeadersToFetchRequest(\n request: string | unknown, // unknown is actually type Request but we can't export DOM types from this package,\n client: Client,\n scope: Scope,\n options: {\n headers?:\n | {\n [key: string]: string[] | string | undefined;\n }\n | PolymorphicRequestHeaders;\n },\n requestSpan?: Span,\n): PolymorphicRequestHeaders | undefined {\n const span = requestSpan || scope.getSpan();\n\n const transaction = span && span.transaction;\n\n const { traceId, sampled, dsc } = scope.getPropagationContext();\n\n const sentryTraceHeader = span ? span.toTraceparent() : generateSentryTraceHeader(traceId, undefined, sampled);\n const dynamicSamplingContext = transaction\n ? transaction.getDynamicSamplingContext()\n : dsc\n ? dsc\n : getDynamicSamplingContextFromClient(traceId, client, scope);\n\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext);\n\n const headers =\n typeof Request !== 'undefined' && isInstanceOf(request, Request) ? (request as Request).headers : options.headers;\n\n if (!headers) {\n return { 'sentry-trace': sentryTraceHeader, baggage: sentryBaggageHeader };\n } else if (typeof Headers !== 'undefined' && isInstanceOf(headers, Headers)) {\n const newHeaders = new Headers(headers as Headers);\n\n newHeaders.append('sentry-trace', sentryTraceHeader);\n\n if (sentryBaggageHeader) {\n // If the same header is appended multiple times the browser will merge the values into a single request header.\n // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n newHeaders.append(BAGGAGE_HEADER_NAME, sentryBaggageHeader);\n }\n\n return newHeaders as PolymorphicRequestHeaders;\n } else if (Array.isArray(headers)) {\n const newHeaders = [...headers, ['sentry-trace', sentryTraceHeader]];\n\n if (sentryBaggageHeader) {\n // If there are multiple entries with the same key, the browser will merge the values into a single request header.\n // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n newHeaders.push([BAGGAGE_HEADER_NAME, sentryBaggageHeader]);\n }\n\n return newHeaders as PolymorphicRequestHeaders;\n } else {\n const existingBaggageHeader = 'baggage' in headers ? headers.baggage : undefined;\n const newBaggageHeaders: string[] = [];\n\n if (Array.isArray(existingBaggageHeader)) {\n newBaggageHeaders.push(...existingBaggageHeader);\n } else if (existingBaggageHeader) {\n newBaggageHeaders.push(existingBaggageHeader);\n }\n\n if (sentryBaggageHeader) {\n newBaggageHeaders.push(sentryBaggageHeader);\n }\n\n return {\n ...(headers as Exclude),\n 'sentry-trace': sentryTraceHeader,\n baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(',') : undefined,\n };\n }\n}\n\n/**\n * Create and track xhr request spans\n *\n * @returns Span if a span was created, otherwise void.\n */\n// eslint-disable-next-line complexity\nexport function xhrCallback(\n handlerData: XHRData,\n shouldCreateSpan: (url: string) => boolean,\n shouldAttachHeaders: (url: string) => boolean,\n spans: Record,\n): Span | undefined {\n const xhr = handlerData.xhr;\n const sentryXhrData = xhr && xhr[SENTRY_XHR_DATA_KEY];\n\n if (!hasTracingEnabled() || (xhr && xhr.__sentry_own_request__) || !xhr || !sentryXhrData) {\n return undefined;\n }\n\n const shouldCreateSpanResult = shouldCreateSpan(sentryXhrData.url);\n\n // check first if the request has finished and is tracked by an existing span which should now end\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = xhr.__sentry_xhr_span_id__;\n if (!spanId) return;\n\n const span = spans[spanId];\n if (span) {\n span.setHttpStatus(sentryXhrData.status_code);\n span.finish();\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const parentSpan = scope.getSpan();\n\n const span =\n shouldCreateSpanResult && parentSpan\n ? parentSpan.startChild({\n data: {\n ...sentryXhrData.data,\n type: 'xhr',\n 'http.method': sentryXhrData.method,\n url: sentryXhrData.url,\n },\n description: `${sentryXhrData.method} ${sentryXhrData.url}`,\n op: 'http.client',\n origin: 'auto.http.browser',\n })\n : undefined;\n\n if (span) {\n xhr.__sentry_xhr_span_id__ = span.spanId;\n spans[xhr.__sentry_xhr_span_id__] = span;\n }\n\n if (xhr.setRequestHeader && shouldAttachHeaders(sentryXhrData.url)) {\n if (span) {\n const transaction = span && span.transaction;\n const dynamicSamplingContext = transaction && transaction.getDynamicSamplingContext();\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext);\n setHeaderOnXhr(xhr, span.toTraceparent(), sentryBaggageHeader);\n } else {\n const client = hub.getClient();\n const { traceId, sampled, dsc } = scope.getPropagationContext();\n const sentryTraceHeader = generateSentryTraceHeader(traceId, undefined, sampled);\n const dynamicSamplingContext =\n dsc || (client ? getDynamicSamplingContextFromClient(traceId, client, scope) : undefined);\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext);\n setHeaderOnXhr(xhr, sentryTraceHeader, sentryBaggageHeader);\n }\n }\n\n return span;\n}\n\nfunction setHeaderOnXhr(\n xhr: NonNullable,\n sentryTraceHeader: string,\n sentryBaggageHeader: string | undefined,\n): void {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader!('sentry-trace', sentryTraceHeader);\n if (sentryBaggageHeader) {\n // From MDN: \"If this method is called several times with the same header, the values are merged into one single request header.\"\n // We can therefore simply set a baggage header without checking what was there before\n // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader!(BAGGAGE_HEADER_NAME, sentryBaggageHeader);\n }\n } catch (_) {\n // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n }\n}\n","import { logger, browserPerformanceTimeOrigin, addInstrumentationHandler } from '@sentry/utils';\nimport { WINDOW } from './types.js';\n\n/**\n * Default function implementing pageload and navigation transactions\n */\nfunction instrumentRoutingWithDefaults(\n customStartTransaction,\n startTransactionOnPageLoad = true,\n startTransactionOnLocationChange = true,\n) {\n if (!WINDOW || !WINDOW.location) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Could not initialize routing instrumentation due to invalid location');\n return;\n }\n\n let startingUrl = WINDOW.location.href;\n\n let activeTransaction;\n if (startTransactionOnPageLoad) {\n activeTransaction = customStartTransaction({\n name: WINDOW.location.pathname,\n // pageload should always start at timeOrigin (and needs to be in s, not ms)\n startTimestamp: browserPerformanceTimeOrigin ? browserPerformanceTimeOrigin / 1000 : undefined,\n op: 'pageload',\n origin: 'auto.pageload.browser',\n metadata: { source: 'url' },\n });\n }\n\n if (startTransactionOnLocationChange) {\n addInstrumentationHandler('history', ({ to, from }) => {\n /**\n * This early return is there to account for some cases where a navigation transaction starts right after\n * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n * create an uneccessary navigation transaction.\n *\n * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n * only be caused in certain development environments where the usage of a hot module reloader is causing\n * errors.\n */\n if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) {\n startingUrl = undefined;\n return;\n }\n\n if (from !== to) {\n startingUrl = undefined;\n if (activeTransaction) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] Finishing current transaction with op: ${activeTransaction.op}`);\n // If there's an open transaction on the scope, we need to finish it before creating an new one.\n activeTransaction.finish();\n }\n activeTransaction = customStartTransaction({\n name: WINDOW.location.pathname,\n op: 'navigation',\n origin: 'auto.navigation.browser',\n metadata: { source: 'url' },\n });\n }\n });\n }\n}\n\nexport { instrumentRoutingWithDefaults };\n//# sourceMappingURL=router.js.map\n","import type { Transaction, TransactionContext } from '@sentry/types';\nimport { addInstrumentationHandler, browserPerformanceTimeOrigin, logger } from '@sentry/utils';\n\nimport { WINDOW } from './types';\n\n/**\n * Default function implementing pageload and navigation transactions\n */\nexport function instrumentRoutingWithDefaults(\n customStartTransaction: (context: TransactionContext) => T | undefined,\n startTransactionOnPageLoad: boolean = true,\n startTransactionOnLocationChange: boolean = true,\n): void {\n if (!WINDOW || !WINDOW.location) {\n __DEBUG_BUILD__ && logger.warn('Could not initialize routing instrumentation due to invalid location');\n return;\n }\n\n let startingUrl: string | undefined = WINDOW.location.href;\n\n let activeTransaction: T | undefined;\n if (startTransactionOnPageLoad) {\n activeTransaction = customStartTransaction({\n name: WINDOW.location.pathname,\n // pageload should always start at timeOrigin (and needs to be in s, not ms)\n startTimestamp: browserPerformanceTimeOrigin ? browserPerformanceTimeOrigin / 1000 : undefined,\n op: 'pageload',\n origin: 'auto.pageload.browser',\n metadata: { source: 'url' },\n });\n }\n\n if (startTransactionOnLocationChange) {\n addInstrumentationHandler('history', ({ to, from }: { to: string; from?: string }) => {\n /**\n * This early return is there to account for some cases where a navigation transaction starts right after\n * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n * create an uneccessary navigation transaction.\n *\n * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n * only be caused in certain development environments where the usage of a hot module reloader is causing\n * errors.\n */\n if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) {\n startingUrl = undefined;\n return;\n }\n\n if (from !== to) {\n startingUrl = undefined;\n if (activeTransaction) {\n __DEBUG_BUILD__ && logger.log(`[Tracing] Finishing current transaction with op: ${activeTransaction.op}`);\n // If there's an open transaction on the scope, we need to finish it before creating an new one.\n activeTransaction.finish();\n }\n activeTransaction = customStartTransaction({\n name: WINDOW.location.pathname,\n op: 'navigation',\n origin: 'auto.navigation.browser',\n metadata: { source: 'url' },\n });\n }\n });\n }\n}\n","import { _optionalChain } from '@sentry/utils';\nimport { logger, getNumberOfUrlSegments, stripUrlQueryAndFragment, extractPathForTransaction, isRegExp } from '@sentry/utils';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils.js';\n\n/**\n * Express integration\n *\n * Provides an request and error handler for Express framework as well as tracing capabilities\n */\nclass Express {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Express';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * Express App instance\n */\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {\n this.name = Express.id;\n this._router = options.router || options.app;\n this._methods = (Array.isArray(options.methods) ? options.methods : []).concat('use');\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n if (!this._router) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('ExpressIntegration is missing an Express instance');\n return;\n }\n\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Express Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n instrumentMiddlewares(this._router, this._methods);\n instrumentRouter(this._router );\n }\n}Express.__initStatic();\n\n/**\n * Wraps original middleware function in a tracing call, which stores the info about the call as a span,\n * and finishes it once the middleware is done invoking.\n *\n * Express middlewares have 3 various forms, thus we have to take care of all of them:\n * // sync\n * app.use(function (req, res) { ... })\n * // async\n * app.use(function (req, res, next) { ... })\n * // error handler\n * app.use(function (err, req, res, next) { ... })\n *\n * They all internally delegate to the `router[method]` of the given application instance.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-explicit-any\nfunction wrap(fn, method) {\n const arity = fn.length;\n\n switch (arity) {\n case 2: {\n return function ( req, res) {\n const transaction = res.__sentry_transaction;\n if (transaction) {\n const span = transaction.startChild({\n description: fn.name,\n op: `middleware.express.${method}`,\n origin: 'auto.middleware.express',\n });\n res.once('finish', () => {\n span.finish();\n });\n }\n return fn.call(this, req, res);\n };\n }\n case 3: {\n return function (\n\n req,\n res,\n next,\n ) {\n const transaction = res.__sentry_transaction;\n const span = _optionalChain([transaction, 'optionalAccess', _2 => _2.startChild, 'call', _3 => _3({\n description: fn.name,\n op: `middleware.express.${method}`,\n origin: 'auto.middleware.express',\n })]);\n fn.call(this, req, res, function ( ...args) {\n _optionalChain([span, 'optionalAccess', _4 => _4.finish, 'call', _5 => _5()]);\n next.call(this, ...args);\n });\n };\n }\n case 4: {\n return function (\n\n err,\n req,\n res,\n next,\n ) {\n const transaction = res.__sentry_transaction;\n const span = _optionalChain([transaction, 'optionalAccess', _6 => _6.startChild, 'call', _7 => _7({\n description: fn.name,\n op: `middleware.express.${method}`,\n origin: 'auto.middleware.express',\n })]);\n fn.call(this, err, req, res, function ( ...args) {\n _optionalChain([span, 'optionalAccess', _8 => _8.finish, 'call', _9 => _9()]);\n next.call(this, ...args);\n });\n };\n }\n default: {\n throw new Error(`Express middleware takes 2-4 arguments. Got: ${arity}`);\n }\n }\n}\n\n/**\n * Takes all the function arguments passed to the original `app` or `router` method, eg. `app.use` or `router.use`\n * and wraps every function, as well as array of functions with a call to our `wrap` method.\n * We have to take care of the arrays as well as iterate over all of the arguments,\n * as `app.use` can accept middlewares in few various forms.\n *\n * app.use([], )\n * app.use([], , ...)\n * app.use([], ...[])\n */\nfunction wrapMiddlewareArgs(args, method) {\n return args.map((arg) => {\n if (typeof arg === 'function') {\n return wrap(arg, method);\n }\n\n if (Array.isArray(arg)) {\n return arg.map((a) => {\n if (typeof a === 'function') {\n return wrap(a, method);\n }\n return a;\n });\n }\n\n return arg;\n });\n}\n\n/**\n * Patches original router to utilize our tracing functionality\n */\nfunction patchMiddleware(router, method) {\n const originalCallback = router[method];\n\n router[method] = function (...args) {\n return originalCallback.call(this, ...wrapMiddlewareArgs(args, method));\n };\n\n return router;\n}\n\n/**\n * Patches original router methods\n */\nfunction instrumentMiddlewares(router, methods = []) {\n methods.forEach((method) => patchMiddleware(router, method));\n}\n\n/**\n * Patches the prototype of Express.Router to accumulate the resolved route\n * if a layer instance's `match` function was called and it returned a successful match.\n *\n * @see https://github.com/expressjs/express/blob/master/lib/router/index.js\n *\n * @param appOrRouter the router instance which can either be an app (i.e. top-level) or a (nested) router.\n */\nfunction instrumentRouter(appOrRouter) {\n // This is how we can distinguish between app and routers\n const isApp = 'settings' in appOrRouter;\n\n // In case the app's top-level router hasn't been initialized yet, we have to do it now\n if (isApp && appOrRouter._router === undefined && appOrRouter.lazyrouter) {\n appOrRouter.lazyrouter();\n }\n\n const router = isApp ? appOrRouter._router : appOrRouter;\n\n if (!router) {\n /*\n If we end up here, this means likely that this integration is used with Express 3 or Express 5.\n For now, we don't support these versions (3 is very old and 5 is still in beta). To support Express 5,\n we'd need to make more changes to the routing instrumentation because the router is no longer part of\n the Express core package but maintained in its own package. The new router has different function\n signatures and works slightly differently, demanding more changes than just taking the router from\n `app.router` instead of `app._router`.\n @see https://github.com/pillarjs/router\n\n TODO: Proper Express 5 support\n */\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.debug('Cannot instrument router for URL Parameterization (did not find a valid router).');\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.debug('Routing instrumentation is currently only supported in Express 4.');\n return;\n }\n\n const routerProto = Object.getPrototypeOf(router) ;\n\n const originalProcessParams = routerProto.process_params;\n routerProto.process_params = function process_params(\n layer,\n called,\n req,\n res,\n done,\n ) {\n // Base case: We're in the first part of the URL (thus we start with the root '/')\n if (!req._reconstructedRoute) {\n req._reconstructedRoute = '';\n }\n\n // If the layer's partial route has params, is a regex or an array, the route is stored in layer.route.\n const { layerRoutePath, isRegex, isArray, numExtraSegments } = getLayerRoutePathInfo(layer);\n\n if (layerRoutePath || isRegex || isArray) {\n req._hasParameters = true;\n }\n\n // Otherwise, the hardcoded path (i.e. a partial route without params) is stored in layer.path\n let partialRoute;\n\n if (layerRoutePath) {\n partialRoute = layerRoutePath;\n } else {\n /**\n * prevent duplicate segment in _reconstructedRoute param if router match multiple routes before final path\n * example:\n * original url: /api/v1/1234\n * prevent: /api/api/v1/:userId\n * router structure\n * /api -> middleware\n * /api/v1 -> middleware\n * /1234 -> endpoint with param :userId\n * final _reconstructedRoute is /api/v1/:userId\n */\n partialRoute = preventDuplicateSegments(req.originalUrl, req._reconstructedRoute, layer.path) || '';\n }\n\n // Normalize the partial route so that it doesn't contain leading or trailing slashes\n // and exclude empty or '*' wildcard routes.\n // The exclusion of '*' routes is our best effort to not \"pollute\" the transaction name\n // with interim handlers (e.g. ones that check authentication or do other middleware stuff).\n // We want to end up with the parameterized URL of the incoming request without any extraneous path segments.\n const finalPartialRoute = partialRoute\n .split('/')\n .filter(segment => segment.length > 0 && (isRegex || isArray || !segment.includes('*')))\n .join('/');\n\n // If we found a valid partial URL, we append it to the reconstructed route\n if (finalPartialRoute && finalPartialRoute.length > 0) {\n // If the partial route is from a regex route, we append a '/' to close the regex\n req._reconstructedRoute += `/${finalPartialRoute}${isRegex ? '/' : ''}`;\n }\n\n // Now we check if we are in the \"last\" part of the route. We determine this by comparing the\n // number of URL segments from the original URL to that of our reconstructed parameterized URL.\n // If we've reached our final destination, we update the transaction name.\n const urlLength = getNumberOfUrlSegments(stripUrlQueryAndFragment(req.originalUrl || '')) + numExtraSegments;\n const routeLength = getNumberOfUrlSegments(req._reconstructedRoute);\n\n if (urlLength === routeLength) {\n if (!req._hasParameters) {\n if (req._reconstructedRoute !== req.originalUrl) {\n req._reconstructedRoute = req.originalUrl ? stripUrlQueryAndFragment(req.originalUrl) : req.originalUrl;\n }\n }\n\n const transaction = res.__sentry_transaction;\n if (transaction && transaction.metadata.source !== 'custom') {\n // If the request URL is '/' or empty, the reconstructed route will be empty.\n // Therefore, we fall back to setting the final route to '/' in this case.\n const finalRoute = req._reconstructedRoute || '/';\n\n transaction.setName(...extractPathForTransaction(req, { path: true, method: true, customRoute: finalRoute }));\n }\n }\n\n return originalProcessParams.call(this, layer, called, req, res, done);\n };\n}\n\n/**\n * Recreate layer.route.path from layer.regexp and layer.keys.\n * Works until express.js used package path-to-regexp@0.1.7\n * or until layer.keys contain offset attribute\n *\n * @param layer the layer to extract the stringified route from\n *\n * @returns string in layer.route.path structure 'router/:pathParam' or undefined\n */\nconst extractOriginalRoute = (\n path,\n regexp,\n keys,\n) => {\n if (!path || !regexp || !keys || Object.keys(keys).length === 0 || !_optionalChain([keys, 'access', _10 => _10[0], 'optionalAccess', _11 => _11.offset])) {\n return undefined;\n }\n\n const orderedKeys = keys.sort((a, b) => a.offset - b.offset);\n\n // add d flag for getting indices from regexp result\n const pathRegex = new RegExp(regexp, `${regexp.flags}d`);\n /**\n * use custom type cause of TS error with missing indices in RegExpExecArray\n */\n const execResult = pathRegex.exec(path) ;\n\n if (!execResult || !execResult.indices) {\n return undefined;\n }\n /**\n * remove first match from regex cause contain whole layer.path\n */\n const [, ...paramIndices] = execResult.indices;\n\n if (paramIndices.length !== orderedKeys.length) {\n return undefined;\n }\n let resultPath = path;\n let indexShift = 0;\n\n /**\n * iterate param matches from regexp.exec\n */\n paramIndices.forEach((item, index) => {\n /** check if offsets is define because in some cases regex d flag returns undefined */\n if (item) {\n const [startOffset, endOffset] = item;\n /**\n * isolate part before param\n */\n const substr1 = resultPath.substring(0, startOffset - indexShift);\n /**\n * define paramName as replacement in format :pathParam\n */\n const replacement = `:${orderedKeys[index].name}`;\n\n /**\n * isolate part after param\n */\n const substr2 = resultPath.substring(endOffset - indexShift);\n\n /**\n * recreate original path but with param replacement\n */\n resultPath = substr1 + replacement + substr2;\n\n /**\n * calculate new index shift after resultPath was modified\n */\n indexShift = indexShift + (endOffset - startOffset - replacement.length);\n }\n });\n\n return resultPath;\n};\n\n/**\n * Extracts and stringifies the layer's route which can either be a string with parameters (`users/:id`),\n * a RegEx (`/test/`) or an array of strings and regexes (`['/path1', /\\/path[2-5]/, /path/:id]`). Additionally\n * returns extra information about the route, such as if the route is defined as regex or as an array.\n *\n * @param layer the layer to extract the stringified route from\n *\n * @returns an object containing the stringified route, a flag determining if the route was a regex\n * and the number of extra segments to the matched path that are additionally in the route,\n * if the route was an array (defaults to 0).\n */\nfunction getLayerRoutePathInfo(layer) {\n let lrp = _optionalChain([layer, 'access', _12 => _12.route, 'optionalAccess', _13 => _13.path]);\n\n const isRegex = isRegExp(lrp);\n const isArray = Array.isArray(lrp);\n\n if (!lrp) {\n // parse node.js major version\n const [major] = process.versions.node.split('.').map(Number);\n\n // allow call extractOriginalRoute only if node version support Regex d flag, node 16+\n if (major >= 16) {\n /**\n * If lrp does not exist try to recreate original layer path from route regexp\n */\n lrp = extractOriginalRoute(layer.path, layer.regexp, layer.keys);\n }\n }\n\n if (!lrp) {\n return { isRegex, isArray, numExtraSegments: 0 };\n }\n\n const numExtraSegments = isArray\n ? Math.max(getNumberOfArrayUrlSegments(lrp ) - getNumberOfUrlSegments(layer.path || ''), 0)\n : 0;\n\n const layerRoutePath = getLayerRoutePathString(isArray, lrp);\n\n return { layerRoutePath, isRegex, isArray, numExtraSegments };\n}\n\n/**\n * Returns the number of URL segments in an array of routes\n *\n * Example: ['/api/test', /\\/api\\/post[0-9]/, '/users/:id/details`] -> 7\n */\nfunction getNumberOfArrayUrlSegments(routesArray) {\n return routesArray.reduce((accNumSegments, currentRoute) => {\n // array members can be a RegEx -> convert them toString\n return accNumSegments + getNumberOfUrlSegments(currentRoute.toString());\n }, 0);\n}\n\n/**\n * Extracts and returns the stringified version of the layers route path\n * Handles route arrays (by joining the paths together) as well as RegExp and normal\n * string values (in the latter case the toString conversion is technically unnecessary but\n * it doesn't hurt us either).\n */\nfunction getLayerRoutePathString(isArray, lrp) {\n if (isArray) {\n return (lrp ).map(r => r.toString()).join(',');\n }\n return lrp && lrp.toString();\n}\n\n/**\n * remove duplicate segment contain in layerPath against reconstructedRoute,\n * and return only unique segment that can be added into reconstructedRoute\n */\nfunction preventDuplicateSegments(\n originalUrl,\n reconstructedRoute,\n layerPath,\n) {\n const originalUrlSplit = _optionalChain([originalUrl, 'optionalAccess', _14 => _14.split, 'call', _15 => _15('/'), 'access', _16 => _16.filter, 'call', _17 => _17(v => !!v)]);\n let tempCounter = 0;\n const currentOffset = _optionalChain([reconstructedRoute, 'optionalAccess', _18 => _18.split, 'call', _19 => _19('/'), 'access', _20 => _20.filter, 'call', _21 => _21(v => !!v), 'access', _22 => _22.length]) || 0;\n const result = _optionalChain([layerPath\n, 'optionalAccess', _23 => _23.split, 'call', _24 => _24('/')\n, 'access', _25 => _25.filter, 'call', _26 => _26(segment => {\n if (_optionalChain([originalUrlSplit, 'optionalAccess', _27 => _27[currentOffset + tempCounter]]) === segment) {\n tempCounter += 1;\n return true;\n }\n return false;\n })\n, 'access', _28 => _28.join, 'call', _29 => _29('/')]);\n return result;\n}\n\nexport { Express, extractOriginalRoute, preventDuplicateSegments };\n//# sourceMappingURL=express.js.map\n","/* eslint-disable max-lines */\nimport type { Hub, Integration, PolymorphicRequest, Transaction } from '@sentry/types';\nimport {\n extractPathForTransaction,\n getNumberOfUrlSegments,\n isRegExp,\n logger,\n stripUrlQueryAndFragment,\n} from '@sentry/utils';\n\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils';\n\ntype Method =\n | 'all'\n | 'get'\n | 'post'\n | 'put'\n | 'delete'\n | 'patch'\n | 'options'\n | 'head'\n | 'checkout'\n | 'copy'\n | 'lock'\n | 'merge'\n | 'mkactivity'\n | 'mkcol'\n | 'move'\n | 'm-search'\n | 'notify'\n | 'purge'\n | 'report'\n | 'search'\n | 'subscribe'\n | 'trace'\n | 'unlock'\n | 'unsubscribe'\n | 'use';\n\ntype Router = {\n [method in Method]: (...args: any) => any; // eslint-disable-line @typescript-eslint/no-explicit-any\n};\n\n/* Extend the PolymorphicRequest type with a patched parameter to build a reconstructed route */\ntype PatchedRequest = PolymorphicRequest & { _reconstructedRoute?: string; _hasParameters?: boolean };\n\n/* Types used for patching the express router prototype */\ntype ExpressRouter = Router & {\n _router?: ExpressRouter;\n stack?: Layer[];\n lazyrouter?: () => void;\n settings?: unknown;\n process_params: (\n layer: Layer,\n called: unknown,\n req: PatchedRequest,\n res: ExpressResponse,\n done: () => void,\n ) => unknown;\n};\n\ntype Layer = {\n match: (path: string) => boolean;\n handle_request: (req: PatchedRequest, res: ExpressResponse, next: () => void) => void;\n route?: { path: RouteType | RouteType[] };\n path?: string;\n regexp?: RegExp;\n keys?: { name: string | number; offset: number; optional: boolean }[];\n};\n\ntype RouteType = string | RegExp;\n\ninterface ExpressResponse {\n once(name: string, callback: () => void): void;\n}\n\n/**\n * Internal helper for `__sentry_transaction`\n * @hidden\n */\ninterface SentryTracingResponse {\n __sentry_transaction?: Transaction;\n}\n\n/**\n * Express integration\n *\n * Provides an request and error handler for Express framework as well as tracing capabilities\n */\nexport class Express implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Express';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n /**\n * Express App instance\n */\n private readonly _router?: Router;\n private readonly _methods?: Method[];\n\n /**\n * @inheritDoc\n */\n public constructor(options: { app?: Router; router?: Router; methods?: Method[] } = {}) {\n this.name = Express.id;\n this._router = options.router || options.app;\n this._methods = (Array.isArray(options.methods) ? options.methods : []).concat('use');\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: unknown, getCurrentHub: () => Hub): void {\n if (!this._router) {\n __DEBUG_BUILD__ && logger.error('ExpressIntegration is missing an Express instance');\n return;\n }\n\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n __DEBUG_BUILD__ && logger.log('Express Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n instrumentMiddlewares(this._router, this._methods);\n instrumentRouter(this._router as ExpressRouter);\n }\n}\n\n/**\n * Wraps original middleware function in a tracing call, which stores the info about the call as a span,\n * and finishes it once the middleware is done invoking.\n *\n * Express middlewares have 3 various forms, thus we have to take care of all of them:\n * // sync\n * app.use(function (req, res) { ... })\n * // async\n * app.use(function (req, res, next) { ... })\n * // error handler\n * app.use(function (err, req, res, next) { ... })\n *\n * They all internally delegate to the `router[method]` of the given application instance.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-explicit-any\nfunction wrap(fn: Function, method: Method): (...args: any[]) => void {\n const arity = fn.length;\n\n switch (arity) {\n case 2: {\n return function (this: NodeJS.Global, req: unknown, res: ExpressResponse & SentryTracingResponse): void {\n const transaction = res.__sentry_transaction;\n if (transaction) {\n const span = transaction.startChild({\n description: fn.name,\n op: `middleware.express.${method}`,\n origin: 'auto.middleware.express',\n });\n res.once('finish', () => {\n span.finish();\n });\n }\n return fn.call(this, req, res);\n };\n }\n case 3: {\n return function (\n this: NodeJS.Global,\n req: unknown,\n res: ExpressResponse & SentryTracingResponse,\n next: () => void,\n ): void {\n const transaction = res.__sentry_transaction;\n const span = transaction?.startChild({\n description: fn.name,\n op: `middleware.express.${method}`,\n origin: 'auto.middleware.express',\n });\n fn.call(this, req, res, function (this: NodeJS.Global, ...args: unknown[]): void {\n span?.finish();\n next.call(this, ...args);\n });\n };\n }\n case 4: {\n return function (\n this: NodeJS.Global,\n err: Error,\n req: Request,\n res: Response & SentryTracingResponse,\n next: () => void,\n ): void {\n const transaction = res.__sentry_transaction;\n const span = transaction?.startChild({\n description: fn.name,\n op: `middleware.express.${method}`,\n origin: 'auto.middleware.express',\n });\n fn.call(this, err, req, res, function (this: NodeJS.Global, ...args: unknown[]): void {\n span?.finish();\n next.call(this, ...args);\n });\n };\n }\n default: {\n throw new Error(`Express middleware takes 2-4 arguments. Got: ${arity}`);\n }\n }\n}\n\n/**\n * Takes all the function arguments passed to the original `app` or `router` method, eg. `app.use` or `router.use`\n * and wraps every function, as well as array of functions with a call to our `wrap` method.\n * We have to take care of the arrays as well as iterate over all of the arguments,\n * as `app.use` can accept middlewares in few various forms.\n *\n * app.use([], )\n * app.use([], , ...)\n * app.use([], ...[])\n */\nfunction wrapMiddlewareArgs(args: unknown[], method: Method): unknown[] {\n return args.map((arg: unknown) => {\n if (typeof arg === 'function') {\n return wrap(arg, method);\n }\n\n if (Array.isArray(arg)) {\n return arg.map((a: unknown) => {\n if (typeof a === 'function') {\n return wrap(a, method);\n }\n return a;\n });\n }\n\n return arg;\n });\n}\n\n/**\n * Patches original router to utilize our tracing functionality\n */\nfunction patchMiddleware(router: Router, method: Method): Router {\n const originalCallback = router[method];\n\n router[method] = function (...args: unknown[]): void {\n return originalCallback.call(this, ...wrapMiddlewareArgs(args, method));\n };\n\n return router;\n}\n\n/**\n * Patches original router methods\n */\nfunction instrumentMiddlewares(router: Router, methods: Method[] = []): void {\n methods.forEach((method: Method) => patchMiddleware(router, method));\n}\n\n/**\n * Patches the prototype of Express.Router to accumulate the resolved route\n * if a layer instance's `match` function was called and it returned a successful match.\n *\n * @see https://github.com/expressjs/express/blob/master/lib/router/index.js\n *\n * @param appOrRouter the router instance which can either be an app (i.e. top-level) or a (nested) router.\n */\nfunction instrumentRouter(appOrRouter: ExpressRouter): void {\n // This is how we can distinguish between app and routers\n const isApp = 'settings' in appOrRouter;\n\n // In case the app's top-level router hasn't been initialized yet, we have to do it now\n if (isApp && appOrRouter._router === undefined && appOrRouter.lazyrouter) {\n appOrRouter.lazyrouter();\n }\n\n const router = isApp ? appOrRouter._router : appOrRouter;\n\n if (!router) {\n /*\n If we end up here, this means likely that this integration is used with Express 3 or Express 5.\n For now, we don't support these versions (3 is very old and 5 is still in beta). To support Express 5,\n we'd need to make more changes to the routing instrumentation because the router is no longer part of\n the Express core package but maintained in its own package. The new router has different function\n signatures and works slightly differently, demanding more changes than just taking the router from\n `app.router` instead of `app._router`.\n @see https://github.com/pillarjs/router\n\n TODO: Proper Express 5 support\n */\n __DEBUG_BUILD__ && logger.debug('Cannot instrument router for URL Parameterization (did not find a valid router).');\n __DEBUG_BUILD__ && logger.debug('Routing instrumentation is currently only supported in Express 4.');\n return;\n }\n\n const routerProto = Object.getPrototypeOf(router) as ExpressRouter;\n\n const originalProcessParams = routerProto.process_params;\n routerProto.process_params = function process_params(\n layer: Layer,\n called: unknown,\n req: PatchedRequest,\n res: ExpressResponse & SentryTracingResponse,\n done: () => unknown,\n ) {\n // Base case: We're in the first part of the URL (thus we start with the root '/')\n if (!req._reconstructedRoute) {\n req._reconstructedRoute = '';\n }\n\n // If the layer's partial route has params, is a regex or an array, the route is stored in layer.route.\n const { layerRoutePath, isRegex, isArray, numExtraSegments }: LayerRoutePathInfo = getLayerRoutePathInfo(layer);\n\n if (layerRoutePath || isRegex || isArray) {\n req._hasParameters = true;\n }\n\n // Otherwise, the hardcoded path (i.e. a partial route without params) is stored in layer.path\n let partialRoute;\n\n if (layerRoutePath) {\n partialRoute = layerRoutePath;\n } else {\n /**\n * prevent duplicate segment in _reconstructedRoute param if router match multiple routes before final path\n * example:\n * original url: /api/v1/1234\n * prevent: /api/api/v1/:userId\n * router structure\n * /api -> middleware\n * /api/v1 -> middleware\n * /1234 -> endpoint with param :userId\n * final _reconstructedRoute is /api/v1/:userId\n */\n partialRoute = preventDuplicateSegments(req.originalUrl, req._reconstructedRoute, layer.path) || '';\n }\n\n // Normalize the partial route so that it doesn't contain leading or trailing slashes\n // and exclude empty or '*' wildcard routes.\n // The exclusion of '*' routes is our best effort to not \"pollute\" the transaction name\n // with interim handlers (e.g. ones that check authentication or do other middleware stuff).\n // We want to end up with the parameterized URL of the incoming request without any extraneous path segments.\n const finalPartialRoute = partialRoute\n .split('/')\n .filter(segment => segment.length > 0 && (isRegex || isArray || !segment.includes('*')))\n .join('/');\n\n // If we found a valid partial URL, we append it to the reconstructed route\n if (finalPartialRoute && finalPartialRoute.length > 0) {\n // If the partial route is from a regex route, we append a '/' to close the regex\n req._reconstructedRoute += `/${finalPartialRoute}${isRegex ? '/' : ''}`;\n }\n\n // Now we check if we are in the \"last\" part of the route. We determine this by comparing the\n // number of URL segments from the original URL to that of our reconstructed parameterized URL.\n // If we've reached our final destination, we update the transaction name.\n const urlLength = getNumberOfUrlSegments(stripUrlQueryAndFragment(req.originalUrl || '')) + numExtraSegments;\n const routeLength = getNumberOfUrlSegments(req._reconstructedRoute);\n\n if (urlLength === routeLength) {\n if (!req._hasParameters) {\n if (req._reconstructedRoute !== req.originalUrl) {\n req._reconstructedRoute = req.originalUrl ? stripUrlQueryAndFragment(req.originalUrl) : req.originalUrl;\n }\n }\n\n const transaction = res.__sentry_transaction;\n if (transaction && transaction.metadata.source !== 'custom') {\n // If the request URL is '/' or empty, the reconstructed route will be empty.\n // Therefore, we fall back to setting the final route to '/' in this case.\n const finalRoute = req._reconstructedRoute || '/';\n\n transaction.setName(...extractPathForTransaction(req, { path: true, method: true, customRoute: finalRoute }));\n }\n }\n\n return originalProcessParams.call(this, layer, called, req, res, done);\n };\n}\n\ntype LayerRoutePathInfo = {\n layerRoutePath?: string;\n isRegex: boolean;\n isArray: boolean;\n numExtraSegments: number;\n};\n\n/**\n * Recreate layer.route.path from layer.regexp and layer.keys.\n * Works until express.js used package path-to-regexp@0.1.7\n * or until layer.keys contain offset attribute\n *\n * @param layer the layer to extract the stringified route from\n *\n * @returns string in layer.route.path structure 'router/:pathParam' or undefined\n */\nexport const extractOriginalRoute = (\n path?: Layer['path'],\n regexp?: Layer['regexp'],\n keys?: Layer['keys'],\n): string | undefined => {\n if (!path || !regexp || !keys || Object.keys(keys).length === 0 || !keys[0]?.offset) {\n return undefined;\n }\n\n const orderedKeys = keys.sort((a, b) => a.offset - b.offset);\n\n // add d flag for getting indices from regexp result\n const pathRegex = new RegExp(regexp, `${regexp.flags}d`);\n /**\n * use custom type cause of TS error with missing indices in RegExpExecArray\n */\n const execResult = pathRegex.exec(path) as (RegExpExecArray & { indices: [number, number][] }) | null;\n\n if (!execResult || !execResult.indices) {\n return undefined;\n }\n /**\n * remove first match from regex cause contain whole layer.path\n */\n const [, ...paramIndices] = execResult.indices;\n\n if (paramIndices.length !== orderedKeys.length) {\n return undefined;\n }\n let resultPath = path;\n let indexShift = 0;\n\n /**\n * iterate param matches from regexp.exec\n */\n paramIndices.forEach((item: [number, number] | undefined, index: number) => {\n /** check if offsets is define because in some cases regex d flag returns undefined */\n if (item) {\n const [startOffset, endOffset] = item;\n /**\n * isolate part before param\n */\n const substr1 = resultPath.substring(0, startOffset - indexShift);\n /**\n * define paramName as replacement in format :pathParam\n */\n const replacement = `:${orderedKeys[index].name}`;\n\n /**\n * isolate part after param\n */\n const substr2 = resultPath.substring(endOffset - indexShift);\n\n /**\n * recreate original path but with param replacement\n */\n resultPath = substr1 + replacement + substr2;\n\n /**\n * calculate new index shift after resultPath was modified\n */\n indexShift = indexShift + (endOffset - startOffset - replacement.length);\n }\n });\n\n return resultPath;\n};\n\n/**\n * Extracts and stringifies the layer's route which can either be a string with parameters (`users/:id`),\n * a RegEx (`/test/`) or an array of strings and regexes (`['/path1', /\\/path[2-5]/, /path/:id]`). Additionally\n * returns extra information about the route, such as if the route is defined as regex or as an array.\n *\n * @param layer the layer to extract the stringified route from\n *\n * @returns an object containing the stringified route, a flag determining if the route was a regex\n * and the number of extra segments to the matched path that are additionally in the route,\n * if the route was an array (defaults to 0).\n */\nfunction getLayerRoutePathInfo(layer: Layer): LayerRoutePathInfo {\n let lrp = layer.route?.path;\n\n const isRegex = isRegExp(lrp);\n const isArray = Array.isArray(lrp);\n\n if (!lrp) {\n // parse node.js major version\n const [major] = process.versions.node.split('.').map(Number);\n\n // allow call extractOriginalRoute only if node version support Regex d flag, node 16+\n if (major >= 16) {\n /**\n * If lrp does not exist try to recreate original layer path from route regexp\n */\n lrp = extractOriginalRoute(layer.path, layer.regexp, layer.keys);\n }\n }\n\n if (!lrp) {\n return { isRegex, isArray, numExtraSegments: 0 };\n }\n\n const numExtraSegments = isArray\n ? Math.max(getNumberOfArrayUrlSegments(lrp as RouteType[]) - getNumberOfUrlSegments(layer.path || ''), 0)\n : 0;\n\n const layerRoutePath = getLayerRoutePathString(isArray, lrp);\n\n return { layerRoutePath, isRegex, isArray, numExtraSegments };\n}\n\n/**\n * Returns the number of URL segments in an array of routes\n *\n * Example: ['/api/test', /\\/api\\/post[0-9]/, '/users/:id/details`] -> 7\n */\nfunction getNumberOfArrayUrlSegments(routesArray: RouteType[]): number {\n return routesArray.reduce((accNumSegments: number, currentRoute: RouteType) => {\n // array members can be a RegEx -> convert them toString\n return accNumSegments + getNumberOfUrlSegments(currentRoute.toString());\n }, 0);\n}\n\n/**\n * Extracts and returns the stringified version of the layers route path\n * Handles route arrays (by joining the paths together) as well as RegExp and normal\n * string values (in the latter case the toString conversion is technically unnecessary but\n * it doesn't hurt us either).\n */\nfunction getLayerRoutePathString(isArray: boolean, lrp?: RouteType | RouteType[]): string | undefined {\n if (isArray) {\n return (lrp as RouteType[]).map(r => r.toString()).join(',');\n }\n return lrp && lrp.toString();\n}\n\n/**\n * remove duplicate segment contain in layerPath against reconstructedRoute,\n * and return only unique segment that can be added into reconstructedRoute\n */\nexport function preventDuplicateSegments(\n originalUrl?: string,\n reconstructedRoute?: string,\n layerPath?: string,\n): string | undefined {\n const originalUrlSplit = originalUrl?.split('/').filter(v => !!v);\n let tempCounter = 0;\n const currentOffset = reconstructedRoute?.split('/').filter(v => !!v).length || 0;\n const result = layerPath\n ?.split('/')\n .filter(segment => {\n if (originalUrlSplit?.[currentOffset + tempCounter] === segment) {\n tempCounter += 1;\n return true;\n }\n return false;\n })\n .join('/');\n return result;\n}\n","import { isString, isPlainObject } from './is.js';\nimport { normalize } from './normalize.js';\nimport { stripUrlQueryAndFragment } from './url.js';\n\nconst DEFAULT_INCLUDES = {\n ip: false,\n request: true,\n transaction: true,\n user: true,\n};\nconst DEFAULT_REQUEST_INCLUDES = ['cookies', 'data', 'headers', 'method', 'query_string', 'url'];\nconst DEFAULT_USER_INCLUDES = ['id', 'username', 'email'];\n\n/**\n * Sets parameterized route as transaction name e.g.: `GET /users/:id`\n * Also adds more context data on the transaction from the request\n */\nfunction addRequestDataToTransaction(\n transaction,\n req,\n deps,\n) {\n if (!transaction) return;\n if (!transaction.metadata.source || transaction.metadata.source === 'url') {\n // Attempt to grab a parameterized route off of the request\n transaction.setName(...extractPathForTransaction(req, { path: true, method: true }));\n }\n transaction.setData('url', req.originalUrl || req.url);\n if (req.baseUrl) {\n transaction.setData('baseUrl', req.baseUrl);\n }\n transaction.setData('query', extractQueryParams(req, deps));\n}\n\n/**\n * Extracts a complete and parameterized path from the request object and uses it to construct transaction name.\n * If the parameterized transaction name cannot be extracted, we fall back to the raw URL.\n *\n * Additionally, this function determines and returns the transaction name source\n *\n * eg. GET /mountpoint/user/:id\n *\n * @param req A request object\n * @param options What to include in the transaction name (method, path, or a custom route name to be\n * used instead of the request's route)\n *\n * @returns A tuple of the fully constructed transaction name [0] and its source [1] (can be either 'route' or 'url')\n */\nfunction extractPathForTransaction(\n req,\n options = {},\n) {\n const method = req.method && req.method.toUpperCase();\n\n let path = '';\n let source = 'url';\n\n // Check to see if there's a parameterized route we can use (as there is in Express)\n if (options.customRoute || req.route) {\n path = options.customRoute || `${req.baseUrl || ''}${req.route && req.route.path}`;\n source = 'route';\n }\n\n // Otherwise, just take the original URL\n else if (req.originalUrl || req.url) {\n path = stripUrlQueryAndFragment(req.originalUrl || req.url || '');\n }\n\n let name = '';\n if (options.method && method) {\n name += method;\n }\n if (options.method && options.path) {\n name += ' ';\n }\n if (options.path && path) {\n name += path;\n }\n\n return [name, source];\n}\n\n/** JSDoc */\nfunction extractTransaction(req, type) {\n switch (type) {\n case 'path': {\n return extractPathForTransaction(req, { path: true })[0];\n }\n case 'handler': {\n return (req.route && req.route.stack && req.route.stack[0] && req.route.stack[0].name) || '';\n }\n case 'methodPath':\n default: {\n return extractPathForTransaction(req, { path: true, method: true })[0];\n }\n }\n}\n\n/** JSDoc */\nfunction extractUserData(\n user\n\n,\n keys,\n) {\n const extractedUser = {};\n const attributes = Array.isArray(keys) ? keys : DEFAULT_USER_INCLUDES;\n\n attributes.forEach(key => {\n if (user && key in user) {\n extractedUser[key] = user[key];\n }\n });\n\n return extractedUser;\n}\n\n/**\n * Normalize data from the request object, accounting for framework differences.\n *\n * @param req The request object from which to extract data\n * @param options.include An optional array of keys to include in the normalized data. Defaults to\n * DEFAULT_REQUEST_INCLUDES if not provided.\n * @param options.deps Injected, platform-specific dependencies\n * @returns An object containing normalized request data\n */\nfunction extractRequestData(\n req,\n options\n\n,\n) {\n const { include = DEFAULT_REQUEST_INCLUDES, deps } = options || {};\n const requestData = {};\n\n // headers:\n // node, express, koa, nextjs: req.headers\n const headers = (req.headers || {})\n\n;\n // method:\n // node, express, koa, nextjs: req.method\n const method = req.method;\n // host:\n // express: req.hostname in > 4 and req.host in < 4\n // koa: req.host\n // node, nextjs: req.headers.host\n const host = req.hostname || req.host || headers.host || '';\n // protocol:\n // node, nextjs: \n // express, koa: req.protocol\n const protocol = req.protocol === 'https' || (req.socket && req.socket.encrypted) ? 'https' : 'http';\n // url (including path and query string):\n // node, express: req.originalUrl\n // koa, nextjs: req.url\n const originalUrl = req.originalUrl || req.url || '';\n // absolute url\n const absoluteUrl = `${protocol}://${host}${originalUrl}`;\n include.forEach(key => {\n switch (key) {\n case 'headers': {\n requestData.headers = headers;\n break;\n }\n case 'method': {\n requestData.method = method;\n break;\n }\n case 'url': {\n requestData.url = absoluteUrl;\n break;\n }\n case 'cookies': {\n // cookies:\n // node, express, koa: req.headers.cookie\n // vercel, sails.js, express (w/ cookie middleware), nextjs: req.cookies\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n requestData.cookies =\n // TODO (v8 / #5257): We're only sending the empty object for backwards compatibility, so the last bit can\n // come off in v8\n req.cookies || (headers.cookie && deps && deps.cookie && deps.cookie.parse(headers.cookie)) || {};\n break;\n }\n case 'query_string': {\n // query string:\n // node: req.url (raw)\n // express, koa, nextjs: req.query\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n requestData.query_string = extractQueryParams(req, deps);\n break;\n }\n case 'data': {\n if (method === 'GET' || method === 'HEAD') {\n break;\n }\n // body data:\n // express, koa, nextjs: req.body\n //\n // when using node by itself, you have to read the incoming stream(see\n // https://nodejs.dev/learn/get-http-request-body-data-using-nodejs); if a user is doing that, we can't know\n // where they're going to store the final result, so they'll have to capture this data themselves\n if (req.body !== undefined) {\n requestData.data = isString(req.body) ? req.body : JSON.stringify(normalize(req.body));\n }\n break;\n }\n default: {\n if ({}.hasOwnProperty.call(req, key)) {\n requestData[key] = (req )[key];\n }\n }\n }\n });\n\n return requestData;\n}\n\n/**\n * Options deciding what parts of the request to use when enhancing an event\n */\n\n/**\n * Add data from the given request to the given event\n *\n * @param event The event to which the request data will be added\n * @param req Request object\n * @param options.include Flags to control what data is included\n * @param options.deps Injected platform-specific dependencies\n * @hidden\n */\nfunction addRequestDataToEvent(\n event,\n req,\n options,\n) {\n const include = {\n ...DEFAULT_INCLUDES,\n ...(options && options.include),\n };\n\n if (include.request) {\n const extractedRequestData = Array.isArray(include.request)\n ? extractRequestData(req, { include: include.request, deps: options && options.deps })\n : extractRequestData(req, { deps: options && options.deps });\n\n event.request = {\n ...event.request,\n ...extractedRequestData,\n };\n }\n\n if (include.user) {\n const extractedUser = req.user && isPlainObject(req.user) ? extractUserData(req.user, include.user) : {};\n\n if (Object.keys(extractedUser).length) {\n event.user = {\n ...event.user,\n ...extractedUser,\n };\n }\n }\n\n // client ip:\n // node, nextjs: req.socket.remoteAddress\n // express, koa: req.ip\n if (include.ip) {\n const ip = req.ip || (req.socket && req.socket.remoteAddress);\n if (ip) {\n event.user = {\n ...event.user,\n ip_address: ip,\n };\n }\n }\n\n if (include.transaction && !event.transaction) {\n // TODO do we even need this anymore?\n // TODO make this work for nextjs\n event.transaction = extractTransaction(req, include.transaction);\n }\n\n return event;\n}\n\nfunction extractQueryParams(\n req,\n deps,\n) {\n // url (including path and query string):\n // node, express: req.originalUrl\n // koa, nextjs: req.url\n let originalUrl = req.originalUrl || req.url || '';\n\n if (!originalUrl) {\n return;\n }\n\n // The `URL` constructor can't handle internal URLs of the form `/some/path/here`, so stick a dummy protocol and\n // hostname on the beginning. Since the point here is just to grab the query string, it doesn't matter what we use.\n if (originalUrl.startsWith('/')) {\n originalUrl = `http://dogs.are.great${originalUrl}`;\n }\n\n return (\n req.query ||\n (typeof URL !== undefined && new URL(originalUrl).search.replace('?', '')) ||\n // In Node 8, `URL` isn't in the global scope, so we have to use the built-in module from Node\n (deps && deps.url && deps.url.parse(originalUrl).query) ||\n undefined\n );\n}\n\nexport { addRequestDataToEvent, addRequestDataToTransaction, extractPathForTransaction, extractRequestData };\n//# sourceMappingURL=requestdata.js.map\n","// TODO: Remove this file once equivalent integration is used everywhere\n\n/* eslint-disable complexity */\n/**\n * The functions here, which enrich an event with request data, are mostly for use in Node, but are safe for use in a\n * browser context. They live here in `@sentry/utils` rather than in `@sentry/node` so that they can be used in\n * frameworks (like nextjs), which, because of SSR, run the same code in both Node and browser contexts.\n *\n * TODO (v8 / #5257): Remove the note below\n * Note that for now, the tests for this code have to live in `@sentry/node`, since they test both these functions and\n * the backwards-compatibility-preserving wrappers which still live in `handlers.ts` there.\n */\n\n/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type {\n Event,\n ExtractedNodeRequestData,\n PolymorphicRequest,\n Transaction,\n TransactionSource,\n} from '@sentry/types';\n\nimport { isPlainObject, isString } from './is';\nimport { normalize } from './normalize';\nimport { stripUrlQueryAndFragment } from './url';\n\nconst DEFAULT_INCLUDES = {\n ip: false,\n request: true,\n transaction: true,\n user: true,\n};\nconst DEFAULT_REQUEST_INCLUDES = ['cookies', 'data', 'headers', 'method', 'query_string', 'url'];\nconst DEFAULT_USER_INCLUDES = ['id', 'username', 'email'];\n\ntype InjectedNodeDeps = {\n cookie: {\n parse: (cookieStr: string) => Record;\n };\n url: {\n parse: (urlStr: string) => {\n query: string | null;\n };\n };\n};\n\n/**\n * Sets parameterized route as transaction name e.g.: `GET /users/:id`\n * Also adds more context data on the transaction from the request\n */\nexport function addRequestDataToTransaction(\n transaction: Transaction | undefined,\n req: PolymorphicRequest,\n deps?: InjectedNodeDeps,\n): void {\n if (!transaction) return;\n if (!transaction.metadata.source || transaction.metadata.source === 'url') {\n // Attempt to grab a parameterized route off of the request\n transaction.setName(...extractPathForTransaction(req, { path: true, method: true }));\n }\n transaction.setData('url', req.originalUrl || req.url);\n if (req.baseUrl) {\n transaction.setData('baseUrl', req.baseUrl);\n }\n transaction.setData('query', extractQueryParams(req, deps));\n}\n\n/**\n * Extracts a complete and parameterized path from the request object and uses it to construct transaction name.\n * If the parameterized transaction name cannot be extracted, we fall back to the raw URL.\n *\n * Additionally, this function determines and returns the transaction name source\n *\n * eg. GET /mountpoint/user/:id\n *\n * @param req A request object\n * @param options What to include in the transaction name (method, path, or a custom route name to be\n * used instead of the request's route)\n *\n * @returns A tuple of the fully constructed transaction name [0] and its source [1] (can be either 'route' or 'url')\n */\nexport function extractPathForTransaction(\n req: PolymorphicRequest,\n options: { path?: boolean; method?: boolean; customRoute?: string } = {},\n): [string, TransactionSource] {\n const method = req.method && req.method.toUpperCase();\n\n let path = '';\n let source: TransactionSource = 'url';\n\n // Check to see if there's a parameterized route we can use (as there is in Express)\n if (options.customRoute || req.route) {\n path = options.customRoute || `${req.baseUrl || ''}${req.route && req.route.path}`;\n source = 'route';\n }\n\n // Otherwise, just take the original URL\n else if (req.originalUrl || req.url) {\n path = stripUrlQueryAndFragment(req.originalUrl || req.url || '');\n }\n\n let name = '';\n if (options.method && method) {\n name += method;\n }\n if (options.method && options.path) {\n name += ' ';\n }\n if (options.path && path) {\n name += path;\n }\n\n return [name, source];\n}\n\ntype TransactionNamingScheme = 'path' | 'methodPath' | 'handler';\n\n/** JSDoc */\nfunction extractTransaction(req: PolymorphicRequest, type: boolean | TransactionNamingScheme): string {\n switch (type) {\n case 'path': {\n return extractPathForTransaction(req, { path: true })[0];\n }\n case 'handler': {\n return (req.route && req.route.stack && req.route.stack[0] && req.route.stack[0].name) || '';\n }\n case 'methodPath':\n default: {\n return extractPathForTransaction(req, { path: true, method: true })[0];\n }\n }\n}\n\n/** JSDoc */\nfunction extractUserData(\n user: {\n [key: string]: any;\n },\n keys: boolean | string[],\n): { [key: string]: any } {\n const extractedUser: { [key: string]: any } = {};\n const attributes = Array.isArray(keys) ? keys : DEFAULT_USER_INCLUDES;\n\n attributes.forEach(key => {\n if (user && key in user) {\n extractedUser[key] = user[key];\n }\n });\n\n return extractedUser;\n}\n\n/**\n * Normalize data from the request object, accounting for framework differences.\n *\n * @param req The request object from which to extract data\n * @param options.include An optional array of keys to include in the normalized data. Defaults to\n * DEFAULT_REQUEST_INCLUDES if not provided.\n * @param options.deps Injected, platform-specific dependencies\n * @returns An object containing normalized request data\n */\nexport function extractRequestData(\n req: PolymorphicRequest,\n options?: {\n include?: string[];\n deps?: InjectedNodeDeps;\n },\n): ExtractedNodeRequestData {\n const { include = DEFAULT_REQUEST_INCLUDES, deps } = options || {};\n const requestData: { [key: string]: any } = {};\n\n // headers:\n // node, express, koa, nextjs: req.headers\n const headers = (req.headers || {}) as {\n host?: string;\n cookie?: string;\n };\n // method:\n // node, express, koa, nextjs: req.method\n const method = req.method;\n // host:\n // express: req.hostname in > 4 and req.host in < 4\n // koa: req.host\n // node, nextjs: req.headers.host\n const host = req.hostname || req.host || headers.host || '';\n // protocol:\n // node, nextjs: \n // express, koa: req.protocol\n const protocol = req.protocol === 'https' || (req.socket && req.socket.encrypted) ? 'https' : 'http';\n // url (including path and query string):\n // node, express: req.originalUrl\n // koa, nextjs: req.url\n const originalUrl = req.originalUrl || req.url || '';\n // absolute url\n const absoluteUrl = `${protocol}://${host}${originalUrl}`;\n include.forEach(key => {\n switch (key) {\n case 'headers': {\n requestData.headers = headers;\n break;\n }\n case 'method': {\n requestData.method = method;\n break;\n }\n case 'url': {\n requestData.url = absoluteUrl;\n break;\n }\n case 'cookies': {\n // cookies:\n // node, express, koa: req.headers.cookie\n // vercel, sails.js, express (w/ cookie middleware), nextjs: req.cookies\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n requestData.cookies =\n // TODO (v8 / #5257): We're only sending the empty object for backwards compatibility, so the last bit can\n // come off in v8\n req.cookies || (headers.cookie && deps && deps.cookie && deps.cookie.parse(headers.cookie)) || {};\n break;\n }\n case 'query_string': {\n // query string:\n // node: req.url (raw)\n // express, koa, nextjs: req.query\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n requestData.query_string = extractQueryParams(req, deps);\n break;\n }\n case 'data': {\n if (method === 'GET' || method === 'HEAD') {\n break;\n }\n // body data:\n // express, koa, nextjs: req.body\n //\n // when using node by itself, you have to read the incoming stream(see\n // https://nodejs.dev/learn/get-http-request-body-data-using-nodejs); if a user is doing that, we can't know\n // where they're going to store the final result, so they'll have to capture this data themselves\n if (req.body !== undefined) {\n requestData.data = isString(req.body) ? req.body : JSON.stringify(normalize(req.body));\n }\n break;\n }\n default: {\n if ({}.hasOwnProperty.call(req, key)) {\n requestData[key] = (req as { [key: string]: any })[key];\n }\n }\n }\n });\n\n return requestData;\n}\n\n/**\n * Options deciding what parts of the request to use when enhancing an event\n */\nexport interface AddRequestDataToEventOptions {\n /** Flags controlling whether each type of data should be added to the event */\n include?: {\n ip?: boolean;\n request?: boolean | string[];\n transaction?: boolean | TransactionNamingScheme;\n user?: boolean | string[];\n };\n\n /** Injected platform-specific dependencies */\n deps?: {\n cookie: {\n parse: (cookieStr: string) => Record;\n };\n url: {\n parse: (urlStr: string) => {\n query: string | null;\n };\n };\n };\n}\n\n/**\n * Add data from the given request to the given event\n *\n * @param event The event to which the request data will be added\n * @param req Request object\n * @param options.include Flags to control what data is included\n * @param options.deps Injected platform-specific dependencies\n * @hidden\n */\nexport function addRequestDataToEvent(\n event: Event,\n req: PolymorphicRequest,\n options?: AddRequestDataToEventOptions,\n): Event {\n const include = {\n ...DEFAULT_INCLUDES,\n ...(options && options.include),\n };\n\n if (include.request) {\n const extractedRequestData = Array.isArray(include.request)\n ? extractRequestData(req, { include: include.request, deps: options && options.deps })\n : extractRequestData(req, { deps: options && options.deps });\n\n event.request = {\n ...event.request,\n ...extractedRequestData,\n };\n }\n\n if (include.user) {\n const extractedUser = req.user && isPlainObject(req.user) ? extractUserData(req.user, include.user) : {};\n\n if (Object.keys(extractedUser).length) {\n event.user = {\n ...event.user,\n ...extractedUser,\n };\n }\n }\n\n // client ip:\n // node, nextjs: req.socket.remoteAddress\n // express, koa: req.ip\n if (include.ip) {\n const ip = req.ip || (req.socket && req.socket.remoteAddress);\n if (ip) {\n event.user = {\n ...event.user,\n ip_address: ip,\n };\n }\n }\n\n if (include.transaction && !event.transaction) {\n // TODO do we even need this anymore?\n // TODO make this work for nextjs\n event.transaction = extractTransaction(req, include.transaction);\n }\n\n return event;\n}\n\nfunction extractQueryParams(\n req: PolymorphicRequest,\n deps?: InjectedNodeDeps,\n): string | Record | undefined {\n // url (including path and query string):\n // node, express: req.originalUrl\n // koa, nextjs: req.url\n let originalUrl = req.originalUrl || req.url || '';\n\n if (!originalUrl) {\n return;\n }\n\n // The `URL` constructor can't handle internal URLs of the form `/some/path/here`, so stick a dummy protocol and\n // hostname on the beginning. Since the point here is just to grab the query string, it doesn't matter what we use.\n if (originalUrl.startsWith('/')) {\n originalUrl = `http://dogs.are.great${originalUrl}`;\n }\n\n return (\n req.query ||\n (typeof URL !== undefined && new URL(originalUrl).search.replace('?', '')) ||\n // In Node 8, `URL` isn't in the global scope, so we have to use the built-in module from Node\n (deps && deps.url && deps.url.parse(originalUrl).query) ||\n undefined\n );\n}\n","import { _optionalChain } from '@sentry/utils';\nimport { loadModule, logger, fill, isThenable } from '@sentry/utils';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils.js';\n\n/** Tracing integration for graphql package */\nclass GraphQL {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'GraphQL';}\n\n /**\n * @inheritDoc\n */\n\n constructor() {\n this.name = GraphQL.id;\n }\n\n /** @inheritdoc */\n loadDependency() {\n return (this._module = this._module || loadModule('graphql/execution/execute.js'));\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('GraphQL Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n const pkg = this.loadDependency();\n\n if (!pkg) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('GraphQL Integration was unable to require graphql/execution package.');\n return;\n }\n\n fill(pkg, 'execute', function (orig) {\n return function ( ...args) {\n const scope = getCurrentHub().getScope();\n const parentSpan = scope.getSpan();\n\n const span = _optionalChain([parentSpan, 'optionalAccess', _2 => _2.startChild, 'call', _3 => _3({\n description: 'execute',\n op: 'graphql.execute',\n origin: 'auto.graphql.graphql',\n })]);\n\n _optionalChain([scope, 'optionalAccess', _4 => _4.setSpan, 'call', _5 => _5(span)]);\n\n const rv = orig.call(this, ...args);\n\n if (isThenable(rv)) {\n return rv.then((res) => {\n _optionalChain([span, 'optionalAccess', _6 => _6.finish, 'call', _7 => _7()]);\n _optionalChain([scope, 'optionalAccess', _8 => _8.setSpan, 'call', _9 => _9(parentSpan)]);\n\n return res;\n });\n }\n\n _optionalChain([span, 'optionalAccess', _10 => _10.finish, 'call', _11 => _11()]);\n _optionalChain([scope, 'optionalAccess', _12 => _12.setSpan, 'call', _13 => _13(parentSpan)]);\n return rv;\n };\n });\n }\n}GraphQL.__initStatic();\n\nexport { GraphQL };\n//# sourceMappingURL=graphql.js.map\n","import type { Hub } from '@sentry/core';\nimport type { EventProcessor } from '@sentry/types';\nimport { fill, isThenable, loadModule, logger } from '@sentry/utils';\n\nimport type { LazyLoadedIntegration } from './lazy';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils';\n\ntype GraphQLModule = {\n [method: string]: (...args: unknown[]) => unknown;\n};\n\n/** Tracing integration for graphql package */\nexport class GraphQL implements LazyLoadedIntegration {\n /**\n * @inheritDoc\n */\n public static id: string = 'GraphQL';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n private _module?: GraphQLModule;\n\n public constructor() {\n this.name = GraphQL.id;\n }\n\n /** @inheritdoc */\n public loadDependency(): GraphQLModule | undefined {\n return (this._module = this._module || loadModule('graphql/execution/execute.js'));\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n __DEBUG_BUILD__ && logger.log('GraphQL Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n const pkg = this.loadDependency();\n\n if (!pkg) {\n __DEBUG_BUILD__ && logger.error('GraphQL Integration was unable to require graphql/execution package.');\n return;\n }\n\n fill(pkg, 'execute', function (orig: () => void | Promise) {\n return function (this: unknown, ...args: unknown[]) {\n const scope = getCurrentHub().getScope();\n const parentSpan = scope.getSpan();\n\n const span = parentSpan?.startChild({\n description: 'execute',\n op: 'graphql.execute',\n origin: 'auto.graphql.graphql',\n });\n\n scope?.setSpan(span);\n\n const rv = orig.call(this, ...args);\n\n if (isThenable(rv)) {\n return rv.then((res: unknown) => {\n span?.finish();\n scope?.setSpan(parentSpan);\n\n return res;\n });\n }\n\n span?.finish();\n scope?.setSpan(parentSpan);\n return rv;\n };\n });\n }\n}\n","import { _optionalChain } from '@sentry/utils';\nimport { loadModule, logger, fill, isThenable } from '@sentry/utils';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils.js';\n\n// This allows us to use the same array for both defaults options and the type itself.\n// (note `as const` at the end to make it a union of string literal types (i.e. \"a\" | \"b\" | ... )\n// and not just a string[])\n\nconst OPERATIONS = [\n 'aggregate', // aggregate(pipeline, options, callback)\n 'bulkWrite', // bulkWrite(operations, options, callback)\n 'countDocuments', // countDocuments(query, options, callback)\n 'createIndex', // createIndex(fieldOrSpec, options, callback)\n 'createIndexes', // createIndexes(indexSpecs, options, callback)\n 'deleteMany', // deleteMany(filter, options, callback)\n 'deleteOne', // deleteOne(filter, options, callback)\n 'distinct', // distinct(key, query, options, callback)\n 'drop', // drop(options, callback)\n 'dropIndex', // dropIndex(indexName, options, callback)\n 'dropIndexes', // dropIndexes(options, callback)\n 'estimatedDocumentCount', // estimatedDocumentCount(options, callback)\n 'find', // find(query, options, callback)\n 'findOne', // findOne(query, options, callback)\n 'findOneAndDelete', // findOneAndDelete(filter, options, callback)\n 'findOneAndReplace', // findOneAndReplace(filter, replacement, options, callback)\n 'findOneAndUpdate', // findOneAndUpdate(filter, update, options, callback)\n 'indexes', // indexes(options, callback)\n 'indexExists', // indexExists(indexes, options, callback)\n 'indexInformation', // indexInformation(options, callback)\n 'initializeOrderedBulkOp', // initializeOrderedBulkOp(options, callback)\n 'insertMany', // insertMany(docs, options, callback)\n 'insertOne', // insertOne(doc, options, callback)\n 'isCapped', // isCapped(options, callback)\n 'mapReduce', // mapReduce(map, reduce, options, callback)\n 'options', // options(options, callback)\n 'parallelCollectionScan', // parallelCollectionScan(options, callback)\n 'rename', // rename(newName, options, callback)\n 'replaceOne', // replaceOne(filter, doc, options, callback)\n 'stats', // stats(options, callback)\n 'updateMany', // updateMany(filter, update, options, callback)\n 'updateOne', // updateOne(filter, update, options, callback)\n] ;\n\n// All of the operations above take `options` and `callback` as their final parameters, but some of them\n// take additional parameters as well. For those operations, this is a map of\n// { : [] }, as a way to know what to call the operation's\n// positional arguments when we add them to the span's `data` object later\nconst OPERATION_SIGNATURES\n\n = {\n // aggregate intentionally not included because `pipeline` arguments are too complex to serialize well\n // see https://github.com/getsentry/sentry-javascript/pull/3102\n bulkWrite: ['operations'],\n countDocuments: ['query'],\n createIndex: ['fieldOrSpec'],\n createIndexes: ['indexSpecs'],\n deleteMany: ['filter'],\n deleteOne: ['filter'],\n distinct: ['key', 'query'],\n dropIndex: ['indexName'],\n find: ['query'],\n findOne: ['query'],\n findOneAndDelete: ['filter'],\n findOneAndReplace: ['filter', 'replacement'],\n findOneAndUpdate: ['filter', 'update'],\n indexExists: ['indexes'],\n insertMany: ['docs'],\n insertOne: ['doc'],\n mapReduce: ['map', 'reduce'],\n rename: ['newName'],\n replaceOne: ['filter', 'doc'],\n updateMany: ['filter', 'update'],\n updateOne: ['filter', 'update'],\n};\n\nfunction isCursor(maybeCursor) {\n return maybeCursor && typeof maybeCursor === 'object' && maybeCursor.once && typeof maybeCursor.once === 'function';\n}\n\n/** Tracing integration for mongo package */\nclass Mongo {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Mongo';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {\n this.name = Mongo.id;\n this._operations = Array.isArray(options.operations) ? options.operations : (OPERATIONS );\n this._describeOperations = 'describeOperations' in options ? options.describeOperations : true;\n this._useMongoose = !!options.useMongoose;\n }\n\n /** @inheritdoc */\n loadDependency() {\n const moduleName = this._useMongoose ? 'mongoose' : 'mongodb';\n return (this._module = this._module || loadModule(moduleName));\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Mongo Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n const pkg = this.loadDependency();\n\n if (!pkg) {\n const moduleName = this._useMongoose ? 'mongoose' : 'mongodb';\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error(`Mongo Integration was unable to require \\`${moduleName}\\` package.`);\n return;\n }\n\n this._instrumentOperations(pkg.Collection, this._operations, getCurrentHub);\n }\n\n /**\n * Patches original collection methods\n */\n _instrumentOperations(collection, operations, getCurrentHub) {\n operations.forEach((operation) => this._patchOperation(collection, operation, getCurrentHub));\n }\n\n /**\n * Patches original collection to utilize our tracing functionality\n */\n _patchOperation(collection, operation, getCurrentHub) {\n if (!(operation in collection.prototype)) return;\n\n const getSpanContext = this._getSpanContextFromOperationArguments.bind(this);\n\n fill(collection.prototype, operation, function (orig) {\n return function ( ...args) {\n const lastArg = args[args.length - 1];\n const scope = getCurrentHub().getScope();\n const parentSpan = scope.getSpan();\n\n // Check if the operation was passed a callback. (mapReduce requires a different check, as\n // its (non-callback) arguments can also be functions.)\n if (typeof lastArg !== 'function' || (operation === 'mapReduce' && args.length === 2)) {\n const span = _optionalChain([parentSpan, 'optionalAccess', _2 => _2.startChild, 'call', _3 => _3(getSpanContext(this, operation, args))]);\n const maybePromiseOrCursor = orig.call(this, ...args);\n\n if (isThenable(maybePromiseOrCursor)) {\n return maybePromiseOrCursor.then((res) => {\n _optionalChain([span, 'optionalAccess', _4 => _4.finish, 'call', _5 => _5()]);\n return res;\n });\n }\n // If the operation returns a Cursor\n // we need to attach a listener to it to finish the span when the cursor is closed.\n else if (isCursor(maybePromiseOrCursor)) {\n const cursor = maybePromiseOrCursor ;\n\n try {\n cursor.once('close', () => {\n _optionalChain([span, 'optionalAccess', _6 => _6.finish, 'call', _7 => _7()]);\n });\n } catch (e) {\n // If the cursor is already closed, `once` will throw an error. In that case, we can\n // finish the span immediately.\n _optionalChain([span, 'optionalAccess', _8 => _8.finish, 'call', _9 => _9()]);\n }\n\n return cursor;\n } else {\n _optionalChain([span, 'optionalAccess', _10 => _10.finish, 'call', _11 => _11()]);\n return maybePromiseOrCursor;\n }\n }\n\n const span = _optionalChain([parentSpan, 'optionalAccess', _12 => _12.startChild, 'call', _13 => _13(getSpanContext(this, operation, args.slice(0, -1)))]);\n\n return orig.call(this, ...args.slice(0, -1), function (err, result) {\n _optionalChain([span, 'optionalAccess', _14 => _14.finish, 'call', _15 => _15()]);\n lastArg(err, result);\n });\n };\n });\n }\n\n /**\n * Form a SpanContext based on the user input to a given operation.\n */\n _getSpanContextFromOperationArguments(\n collection,\n operation,\n args,\n ) {\n const data = {\n 'db.system': 'mongodb',\n 'db.name': collection.dbName,\n 'db.operation': operation,\n 'db.mongodb.collection': collection.collectionName,\n };\n const spanContext = {\n op: 'db',\n // TODO v8: Use `${collection.collectionName}.${operation}`\n origin: 'auto.db.mongo',\n description: operation,\n data,\n };\n\n // If the operation takes no arguments besides `options` and `callback`, or if argument\n // collection is disabled for this operation, just return early.\n const signature = OPERATION_SIGNATURES[operation];\n const shouldDescribe = Array.isArray(this._describeOperations)\n ? this._describeOperations.includes(operation)\n : this._describeOperations;\n\n if (!signature || !shouldDescribe) {\n return spanContext;\n }\n\n try {\n // Special case for `mapReduce`, as the only one accepting functions as arguments.\n if (operation === 'mapReduce') {\n const [map, reduce] = args ;\n data[signature[0]] = typeof map === 'string' ? map : map.name || '';\n data[signature[1]] = typeof reduce === 'string' ? reduce : reduce.name || '';\n } else {\n for (let i = 0; i < signature.length; i++) {\n data[`db.mongodb.${signature[i]}`] = JSON.stringify(args[i]);\n }\n }\n } catch (_oO) {\n // no-empty\n }\n\n return spanContext;\n }\n}Mongo.__initStatic();\n\nexport { Mongo };\n//# sourceMappingURL=mongo.js.map\n","import type { Hub } from '@sentry/core';\nimport type { EventProcessor, SpanContext } from '@sentry/types';\nimport { fill, isThenable, loadModule, logger } from '@sentry/utils';\n\nimport type { LazyLoadedIntegration } from './lazy';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils';\n\n// This allows us to use the same array for both defaults options and the type itself.\n// (note `as const` at the end to make it a union of string literal types (i.e. \"a\" | \"b\" | ... )\n// and not just a string[])\ntype Operation = (typeof OPERATIONS)[number];\nconst OPERATIONS = [\n 'aggregate', // aggregate(pipeline, options, callback)\n 'bulkWrite', // bulkWrite(operations, options, callback)\n 'countDocuments', // countDocuments(query, options, callback)\n 'createIndex', // createIndex(fieldOrSpec, options, callback)\n 'createIndexes', // createIndexes(indexSpecs, options, callback)\n 'deleteMany', // deleteMany(filter, options, callback)\n 'deleteOne', // deleteOne(filter, options, callback)\n 'distinct', // distinct(key, query, options, callback)\n 'drop', // drop(options, callback)\n 'dropIndex', // dropIndex(indexName, options, callback)\n 'dropIndexes', // dropIndexes(options, callback)\n 'estimatedDocumentCount', // estimatedDocumentCount(options, callback)\n 'find', // find(query, options, callback)\n 'findOne', // findOne(query, options, callback)\n 'findOneAndDelete', // findOneAndDelete(filter, options, callback)\n 'findOneAndReplace', // findOneAndReplace(filter, replacement, options, callback)\n 'findOneAndUpdate', // findOneAndUpdate(filter, update, options, callback)\n 'indexes', // indexes(options, callback)\n 'indexExists', // indexExists(indexes, options, callback)\n 'indexInformation', // indexInformation(options, callback)\n 'initializeOrderedBulkOp', // initializeOrderedBulkOp(options, callback)\n 'insertMany', // insertMany(docs, options, callback)\n 'insertOne', // insertOne(doc, options, callback)\n 'isCapped', // isCapped(options, callback)\n 'mapReduce', // mapReduce(map, reduce, options, callback)\n 'options', // options(options, callback)\n 'parallelCollectionScan', // parallelCollectionScan(options, callback)\n 'rename', // rename(newName, options, callback)\n 'replaceOne', // replaceOne(filter, doc, options, callback)\n 'stats', // stats(options, callback)\n 'updateMany', // updateMany(filter, update, options, callback)\n 'updateOne', // updateOne(filter, update, options, callback)\n] as const;\n\n// All of the operations above take `options` and `callback` as their final parameters, but some of them\n// take additional parameters as well. For those operations, this is a map of\n// { : [] }, as a way to know what to call the operation's\n// positional arguments when we add them to the span's `data` object later\nconst OPERATION_SIGNATURES: {\n [op in Operation]?: string[];\n} = {\n // aggregate intentionally not included because `pipeline` arguments are too complex to serialize well\n // see https://github.com/getsentry/sentry-javascript/pull/3102\n bulkWrite: ['operations'],\n countDocuments: ['query'],\n createIndex: ['fieldOrSpec'],\n createIndexes: ['indexSpecs'],\n deleteMany: ['filter'],\n deleteOne: ['filter'],\n distinct: ['key', 'query'],\n dropIndex: ['indexName'],\n find: ['query'],\n findOne: ['query'],\n findOneAndDelete: ['filter'],\n findOneAndReplace: ['filter', 'replacement'],\n findOneAndUpdate: ['filter', 'update'],\n indexExists: ['indexes'],\n insertMany: ['docs'],\n insertOne: ['doc'],\n mapReduce: ['map', 'reduce'],\n rename: ['newName'],\n replaceOne: ['filter', 'doc'],\n updateMany: ['filter', 'update'],\n updateOne: ['filter', 'update'],\n};\n\ninterface MongoCollection {\n collectionName: string;\n dbName: string;\n namespace: string;\n prototype: {\n [operation in Operation]: (...args: unknown[]) => unknown;\n };\n}\n\ninterface MongoOptions {\n operations?: Operation[];\n describeOperations?: boolean | Operation[];\n useMongoose?: boolean;\n}\n\ninterface MongoCursor {\n once(event: 'close', listener: () => void): void;\n}\n\nfunction isCursor(maybeCursor: MongoCursor): maybeCursor is MongoCursor {\n return maybeCursor && typeof maybeCursor === 'object' && maybeCursor.once && typeof maybeCursor.once === 'function';\n}\n\ntype MongoModule = { Collection: MongoCollection };\n\n/** Tracing integration for mongo package */\nexport class Mongo implements LazyLoadedIntegration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Mongo';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n private _operations: Operation[];\n private _describeOperations?: boolean | Operation[];\n private _useMongoose: boolean;\n\n private _module?: MongoModule;\n\n /**\n * @inheritDoc\n */\n public constructor(options: MongoOptions = {}) {\n this.name = Mongo.id;\n this._operations = Array.isArray(options.operations) ? options.operations : (OPERATIONS as unknown as Operation[]);\n this._describeOperations = 'describeOperations' in options ? options.describeOperations : true;\n this._useMongoose = !!options.useMongoose;\n }\n\n /** @inheritdoc */\n public loadDependency(): MongoModule | undefined {\n const moduleName = this._useMongoose ? 'mongoose' : 'mongodb';\n return (this._module = this._module || loadModule(moduleName));\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n __DEBUG_BUILD__ && logger.log('Mongo Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n const pkg = this.loadDependency();\n\n if (!pkg) {\n const moduleName = this._useMongoose ? 'mongoose' : 'mongodb';\n __DEBUG_BUILD__ && logger.error(`Mongo Integration was unable to require \\`${moduleName}\\` package.`);\n return;\n }\n\n this._instrumentOperations(pkg.Collection, this._operations, getCurrentHub);\n }\n\n /**\n * Patches original collection methods\n */\n private _instrumentOperations(collection: MongoCollection, operations: Operation[], getCurrentHub: () => Hub): void {\n operations.forEach((operation: Operation) => this._patchOperation(collection, operation, getCurrentHub));\n }\n\n /**\n * Patches original collection to utilize our tracing functionality\n */\n private _patchOperation(collection: MongoCollection, operation: Operation, getCurrentHub: () => Hub): void {\n if (!(operation in collection.prototype)) return;\n\n const getSpanContext = this._getSpanContextFromOperationArguments.bind(this);\n\n fill(collection.prototype, operation, function (orig: () => void | Promise) {\n return function (this: unknown, ...args: unknown[]) {\n const lastArg = args[args.length - 1];\n const scope = getCurrentHub().getScope();\n const parentSpan = scope.getSpan();\n\n // Check if the operation was passed a callback. (mapReduce requires a different check, as\n // its (non-callback) arguments can also be functions.)\n if (typeof lastArg !== 'function' || (operation === 'mapReduce' && args.length === 2)) {\n const span = parentSpan?.startChild(getSpanContext(this, operation, args));\n const maybePromiseOrCursor = orig.call(this, ...args);\n\n if (isThenable(maybePromiseOrCursor)) {\n return maybePromiseOrCursor.then((res: unknown) => {\n span?.finish();\n return res;\n });\n }\n // If the operation returns a Cursor\n // we need to attach a listener to it to finish the span when the cursor is closed.\n else if (isCursor(maybePromiseOrCursor)) {\n const cursor = maybePromiseOrCursor as MongoCursor;\n\n try {\n cursor.once('close', () => {\n span?.finish();\n });\n } catch (e) {\n // If the cursor is already closed, `once` will throw an error. In that case, we can\n // finish the span immediately.\n span?.finish();\n }\n\n return cursor;\n } else {\n span?.finish();\n return maybePromiseOrCursor;\n }\n }\n\n const span = parentSpan?.startChild(getSpanContext(this, operation, args.slice(0, -1)));\n\n return orig.call(this, ...args.slice(0, -1), function (err: Error, result: unknown) {\n span?.finish();\n lastArg(err, result);\n });\n };\n });\n }\n\n /**\n * Form a SpanContext based on the user input to a given operation.\n */\n private _getSpanContextFromOperationArguments(\n collection: MongoCollection,\n operation: Operation,\n args: unknown[],\n ): SpanContext {\n const data: { [key: string]: string } = {\n 'db.system': 'mongodb',\n 'db.name': collection.dbName,\n 'db.operation': operation,\n 'db.mongodb.collection': collection.collectionName,\n };\n const spanContext: SpanContext = {\n op: 'db',\n // TODO v8: Use `${collection.collectionName}.${operation}`\n origin: 'auto.db.mongo',\n description: operation,\n data,\n };\n\n // If the operation takes no arguments besides `options` and `callback`, or if argument\n // collection is disabled for this operation, just return early.\n const signature = OPERATION_SIGNATURES[operation];\n const shouldDescribe = Array.isArray(this._describeOperations)\n ? this._describeOperations.includes(operation)\n : this._describeOperations;\n\n if (!signature || !shouldDescribe) {\n return spanContext;\n }\n\n try {\n // Special case for `mapReduce`, as the only one accepting functions as arguments.\n if (operation === 'mapReduce') {\n const [map, reduce] = args as { name?: string }[];\n data[signature[0]] = typeof map === 'string' ? map : map.name || '';\n data[signature[1]] = typeof reduce === 'string' ? reduce : reduce.name || '';\n } else {\n for (let i = 0; i < signature.length; i++) {\n data[`db.mongodb.${signature[i]}`] = JSON.stringify(args[i]);\n }\n }\n } catch (_oO) {\n // no-empty\n }\n\n return spanContext;\n }\n}\n","import { _optionalChain } from '@sentry/utils';\nimport { loadModule, logger, fill } from '@sentry/utils';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils.js';\n\n/** Tracing integration for node-mysql package */\nclass Mysql {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Mysql';}\n\n /**\n * @inheritDoc\n */\n\n constructor() {\n this.name = Mysql.id;\n }\n\n /** @inheritdoc */\n loadDependency() {\n return (this._module = this._module || loadModule('mysql/lib/Connection.js'));\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Mysql Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n const pkg = this.loadDependency();\n\n if (!pkg) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Mysql Integration was unable to require `mysql` package.');\n return;\n }\n\n let mySqlConfig = undefined;\n\n try {\n pkg.prototype.connect = new Proxy(pkg.prototype.connect, {\n apply(wrappingTarget, thisArg, args) {\n if (!mySqlConfig) {\n mySqlConfig = thisArg.config;\n }\n return wrappingTarget.apply(thisArg, args);\n },\n });\n } catch (e) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Mysql Integration was unable to instrument `mysql` config.');\n }\n\n function spanDataFromConfig() {\n if (!mySqlConfig) {\n return {};\n }\n return {\n 'server.address': mySqlConfig.host,\n 'server.port': mySqlConfig.port,\n 'db.user': mySqlConfig.user,\n };\n }\n\n function finishSpan(span) {\n if (!span || span.endTimestamp) {\n return;\n }\n\n const data = spanDataFromConfig();\n Object.keys(data).forEach(key => {\n span.setData(key, data[key]);\n });\n\n span.finish();\n }\n\n // The original function will have one of these signatures:\n // function (callback) => void\n // function (options, callback) => void\n // function (options, values, callback) => void\n fill(pkg, 'createQuery', function (orig) {\n return function ( options, values, callback) {\n const scope = getCurrentHub().getScope();\n const parentSpan = scope.getSpan();\n\n const span = _optionalChain([parentSpan, 'optionalAccess', _2 => _2.startChild, 'call', _3 => _3({\n description: typeof options === 'string' ? options : (options ).sql,\n op: 'db',\n origin: 'auto.db.mysql',\n data: {\n 'db.system': 'mysql',\n },\n })]);\n\n if (typeof callback === 'function') {\n return orig.call(this, options, values, function (err, result, fields) {\n finishSpan(span);\n callback(err, result, fields);\n });\n }\n\n if (typeof values === 'function') {\n return orig.call(this, options, function (err, result, fields) {\n finishSpan(span);\n values(err, result, fields);\n });\n }\n\n // streaming, no callback!\n const query = orig.call(this, options, values) ;\n\n query.on('end', () => {\n finishSpan(span);\n });\n\n return query;\n };\n });\n }\n}Mysql.__initStatic();\n\nexport { Mysql };\n//# sourceMappingURL=mysql.js.map\n","import type { Hub } from '@sentry/core';\nimport type { EventProcessor, Span } from '@sentry/types';\nimport { fill, loadModule, logger } from '@sentry/utils';\n\nimport type { LazyLoadedIntegration } from './lazy';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils';\n\ninterface MysqlConnection {\n prototype: {\n connect: () => void;\n };\n createQuery: () => void;\n}\n\ninterface MysqlConnectionConfig {\n host: string;\n port: number;\n user: string;\n}\n\n/** Tracing integration for node-mysql package */\nexport class Mysql implements LazyLoadedIntegration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Mysql';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n private _module?: MysqlConnection;\n\n public constructor() {\n this.name = Mysql.id;\n }\n\n /** @inheritdoc */\n public loadDependency(): MysqlConnection | undefined {\n return (this._module = this._module || loadModule('mysql/lib/Connection.js'));\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n __DEBUG_BUILD__ && logger.log('Mysql Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n const pkg = this.loadDependency();\n\n if (!pkg) {\n __DEBUG_BUILD__ && logger.error('Mysql Integration was unable to require `mysql` package.');\n return;\n }\n\n let mySqlConfig: MysqlConnectionConfig | undefined = undefined;\n\n try {\n pkg.prototype.connect = new Proxy(pkg.prototype.connect, {\n apply(wrappingTarget, thisArg: { config: MysqlConnectionConfig }, args) {\n if (!mySqlConfig) {\n mySqlConfig = thisArg.config;\n }\n return wrappingTarget.apply(thisArg, args);\n },\n });\n } catch (e) {\n __DEBUG_BUILD__ && logger.error('Mysql Integration was unable to instrument `mysql` config.');\n }\n\n function spanDataFromConfig(): Record {\n if (!mySqlConfig) {\n return {};\n }\n return {\n 'server.address': mySqlConfig.host,\n 'server.port': mySqlConfig.port,\n 'db.user': mySqlConfig.user,\n };\n }\n\n function finishSpan(span: Span | undefined): void {\n if (!span || span.endTimestamp) {\n return;\n }\n\n const data = spanDataFromConfig();\n Object.keys(data).forEach(key => {\n span.setData(key, data[key]);\n });\n\n span.finish();\n }\n\n // The original function will have one of these signatures:\n // function (callback) => void\n // function (options, callback) => void\n // function (options, values, callback) => void\n fill(pkg, 'createQuery', function (orig: () => void) {\n return function (this: unknown, options: unknown, values: unknown, callback: unknown) {\n const scope = getCurrentHub().getScope();\n const parentSpan = scope.getSpan();\n\n const span = parentSpan?.startChild({\n description: typeof options === 'string' ? options : (options as { sql: string }).sql,\n op: 'db',\n origin: 'auto.db.mysql',\n data: {\n 'db.system': 'mysql',\n },\n });\n\n if (typeof callback === 'function') {\n return orig.call(this, options, values, function (err: Error, result: unknown, fields: unknown) {\n finishSpan(span);\n callback(err, result, fields);\n });\n }\n\n if (typeof values === 'function') {\n return orig.call(this, options, function (err: Error, result: unknown, fields: unknown) {\n finishSpan(span);\n values(err, result, fields);\n });\n }\n\n // streaming, no callback!\n const query = orig.call(this, options, values) as { on: (event: string, callback: () => void) => void };\n\n query.on('end', () => {\n finishSpan(span);\n });\n\n return query;\n };\n });\n }\n}\n","import { _optionalChain } from '@sentry/utils';\nimport { loadModule, logger, fill, isThenable } from '@sentry/utils';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils.js';\n\n/** Tracing integration for node-postgres package */\nclass Postgres {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Postgres';}\n\n /**\n * @inheritDoc\n */\n\n constructor(options = {}) {\n this.name = Postgres.id;\n this._usePgNative = !!options.usePgNative;\n this._module = options.module;\n }\n\n /** @inheritdoc */\n loadDependency() {\n return (this._module = this._module || loadModule('pg'));\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Postgres Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n const pkg = this.loadDependency();\n\n if (!pkg) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Postgres Integration was unable to require `pg` package.');\n return;\n }\n\n const Client = this._usePgNative ? _optionalChain([pkg, 'access', _2 => _2.native, 'optionalAccess', _3 => _3.Client]) : pkg.Client;\n\n if (!Client) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error(\"Postgres Integration was unable to access 'pg-native' bindings.\");\n return;\n }\n\n /**\n * function (query, callback) => void\n * function (query, params, callback) => void\n * function (query) => Promise\n * function (query, params) => Promise\n * function (pg.Cursor) => pg.Cursor\n */\n fill(Client.prototype, 'query', function (orig) {\n return function ( config, values, callback) {\n const scope = getCurrentHub().getScope();\n const parentSpan = scope.getSpan();\n\n const data = {\n 'db.system': 'postgresql',\n };\n\n try {\n if (this.database) {\n data['db.name'] = this.database;\n }\n if (this.host) {\n data['server.address'] = this.host;\n }\n if (this.port) {\n data['server.port'] = this.port;\n }\n if (this.user) {\n data['db.user'] = this.user;\n }\n } catch (e) {\n // ignore\n }\n\n const span = _optionalChain([parentSpan, 'optionalAccess', _4 => _4.startChild, 'call', _5 => _5({\n description: typeof config === 'string' ? config : (config ).text,\n op: 'db',\n origin: 'auto.db.postgres',\n data,\n })]);\n\n if (typeof callback === 'function') {\n return orig.call(this, config, values, function (err, result) {\n _optionalChain([span, 'optionalAccess', _6 => _6.finish, 'call', _7 => _7()]);\n callback(err, result);\n });\n }\n\n if (typeof values === 'function') {\n return orig.call(this, config, function (err, result) {\n _optionalChain([span, 'optionalAccess', _8 => _8.finish, 'call', _9 => _9()]);\n values(err, result);\n });\n }\n\n const rv = typeof values !== 'undefined' ? orig.call(this, config, values) : orig.call(this, config);\n\n if (isThenable(rv)) {\n return rv.then((res) => {\n _optionalChain([span, 'optionalAccess', _10 => _10.finish, 'call', _11 => _11()]);\n return res;\n });\n }\n\n _optionalChain([span, 'optionalAccess', _12 => _12.finish, 'call', _13 => _13()]);\n return rv;\n };\n });\n }\n}Postgres.__initStatic();\n\nexport { Postgres };\n//# sourceMappingURL=postgres.js.map\n","import type { Hub } from '@sentry/core';\nimport type { EventProcessor } from '@sentry/types';\nimport { fill, isThenable, loadModule, logger } from '@sentry/utils';\n\nimport type { LazyLoadedIntegration } from './lazy';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils';\n\ntype PgClientQuery = (\n config: unknown,\n values?: unknown,\n callback?: (err: unknown, result: unknown) => void,\n) => void | Promise;\n\ninterface PgClient {\n prototype: {\n query: PgClientQuery;\n };\n}\n\ninterface PgClientThis {\n database?: string;\n host?: string;\n port?: number;\n user?: string;\n}\n\ninterface PgOptions {\n usePgNative?: boolean;\n /**\n * Supply your postgres module directly, instead of having Sentry attempt automatic resolution.\n * Use this if you (a) use a module that's not `pg`, or (b) use a bundler that breaks resolution (e.g. esbuild).\n *\n * Usage:\n * ```\n * import pg from 'pg';\n *\n * Sentry.init({\n * integrations: [new Sentry.Integrations.Postgres({ module: pg })],\n * });\n * ```\n */\n module?: PGModule;\n}\n\ntype PGModule = { Client: PgClient; native: { Client: PgClient } | null };\n\n/** Tracing integration for node-postgres package */\nexport class Postgres implements LazyLoadedIntegration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Postgres';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n private _usePgNative: boolean;\n\n private _module?: PGModule;\n\n public constructor(options: PgOptions = {}) {\n this.name = Postgres.id;\n this._usePgNative = !!options.usePgNative;\n this._module = options.module;\n }\n\n /** @inheritdoc */\n public loadDependency(): PGModule | undefined {\n return (this._module = this._module || loadModule('pg'));\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n __DEBUG_BUILD__ && logger.log('Postgres Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n const pkg = this.loadDependency();\n\n if (!pkg) {\n __DEBUG_BUILD__ && logger.error('Postgres Integration was unable to require `pg` package.');\n return;\n }\n\n const Client = this._usePgNative ? pkg.native?.Client : pkg.Client;\n\n if (!Client) {\n __DEBUG_BUILD__ && logger.error(\"Postgres Integration was unable to access 'pg-native' bindings.\");\n return;\n }\n\n /**\n * function (query, callback) => void\n * function (query, params, callback) => void\n * function (query) => Promise\n * function (query, params) => Promise\n * function (pg.Cursor) => pg.Cursor\n */\n fill(Client.prototype, 'query', function (orig: PgClientQuery) {\n return function (this: PgClientThis, config: unknown, values: unknown, callback: unknown) {\n const scope = getCurrentHub().getScope();\n const parentSpan = scope.getSpan();\n\n const data: Record = {\n 'db.system': 'postgresql',\n };\n\n try {\n if (this.database) {\n data['db.name'] = this.database;\n }\n if (this.host) {\n data['server.address'] = this.host;\n }\n if (this.port) {\n data['server.port'] = this.port;\n }\n if (this.user) {\n data['db.user'] = this.user;\n }\n } catch (e) {\n // ignore\n }\n\n const span = parentSpan?.startChild({\n description: typeof config === 'string' ? config : (config as { text: string }).text,\n op: 'db',\n origin: 'auto.db.postgres',\n data,\n });\n\n if (typeof callback === 'function') {\n return orig.call(this, config, values, function (err: Error, result: unknown) {\n span?.finish();\n callback(err, result);\n });\n }\n\n if (typeof values === 'function') {\n return orig.call(this, config, function (err: Error, result: unknown) {\n span?.finish();\n values(err, result);\n });\n }\n\n const rv = typeof values !== 'undefined' ? orig.call(this, config, values) : orig.call(this, config);\n\n if (isThenable(rv)) {\n return rv.then((res: unknown) => {\n span?.finish();\n return res;\n });\n }\n\n span?.finish();\n return rv;\n };\n });\n }\n}\n","import { trace, getCurrentHub } from '@sentry/core';\nimport { addNonEnumerableProperty, logger } from '@sentry/utils';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils.js';\n\nfunction isValidPrismaClient(possibleClient) {\n return !!possibleClient && !!(possibleClient )['$use'];\n}\n\n/** Tracing integration for @prisma/client package */\nclass Prisma {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Prisma';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {\n this.name = Prisma.id;\n\n // We instrument the PrismaClient inside the constructor and not inside `setupOnce` because in some cases of server-side\n // bundling (Next.js) multiple Prisma clients can be instantiated, even though users don't intend to. When instrumenting\n // in setupOnce we can only ever instrument one client.\n // https://github.com/getsentry/sentry-javascript/issues/7216#issuecomment-1602375012\n // In the future we might explore providing a dedicated PrismaClient middleware instead of this hack.\n if (isValidPrismaClient(options.client) && !options.client._sentryInstrumented) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n addNonEnumerableProperty(options.client , '_sentryInstrumented', true);\n\n const clientData = {};\n try {\n const engineConfig = (options.client )._engineConfig;\n if (engineConfig) {\n const { activeProvider, clientVersion } = engineConfig;\n if (activeProvider) {\n clientData['db.system'] = activeProvider;\n }\n if (clientVersion) {\n clientData['db.prisma.version'] = clientVersion;\n }\n }\n } catch (e) {\n // ignore\n }\n\n options.client.$use((params, next) => {\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n return next(params);\n }\n\n const action = params.action;\n const model = params.model;\n\n return trace(\n {\n name: model ? `${model} ${action}` : action,\n op: 'db.sql.prisma',\n origin: 'auto.db.prisma',\n data: { ...clientData, 'db.operation': action },\n },\n () => next(params),\n );\n });\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn('Unsupported Prisma client provided to PrismaIntegration. Provided client:', options.client);\n }\n }\n\n /**\n * @inheritDoc\n */\n setupOnce() {\n // Noop - here for backwards compatibility\n }\n} Prisma.__initStatic();\n\nexport { Prisma };\n//# sourceMappingURL=prisma.js.map\n","import { getCurrentHub, trace } from '@sentry/core';\nimport type { Integration } from '@sentry/types';\nimport { addNonEnumerableProperty, logger } from '@sentry/utils';\n\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils';\n\ntype PrismaAction =\n | 'findUnique'\n | 'findMany'\n | 'findFirst'\n | 'create'\n | 'createMany'\n | 'update'\n | 'updateMany'\n | 'upsert'\n | 'delete'\n | 'deleteMany'\n | 'executeRaw'\n | 'queryRaw'\n | 'aggregate'\n | 'count'\n | 'runCommandRaw';\n\ninterface PrismaMiddlewareParams {\n model?: unknown;\n action: PrismaAction;\n args: unknown;\n dataPath: string[];\n runInTransaction: boolean;\n}\n\ntype PrismaMiddleware = (\n params: PrismaMiddlewareParams,\n next: (params: PrismaMiddlewareParams) => Promise,\n) => Promise;\n\ninterface PrismaClient {\n _sentryInstrumented?: boolean;\n _engineConfig?: {\n activeProvider?: string;\n clientVersion?: string;\n };\n $use: (cb: PrismaMiddleware) => void;\n}\n\nfunction isValidPrismaClient(possibleClient: unknown): possibleClient is PrismaClient {\n return !!possibleClient && !!(possibleClient as PrismaClient)['$use'];\n}\n\n/** Tracing integration for @prisma/client package */\nexport class Prisma implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Prisma';\n\n /**\n * @inheritDoc\n */\n public name: string;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { client?: unknown } = {}) {\n this.name = Prisma.id;\n\n // We instrument the PrismaClient inside the constructor and not inside `setupOnce` because in some cases of server-side\n // bundling (Next.js) multiple Prisma clients can be instantiated, even though users don't intend to. When instrumenting\n // in setupOnce we can only ever instrument one client.\n // https://github.com/getsentry/sentry-javascript/issues/7216#issuecomment-1602375012\n // In the future we might explore providing a dedicated PrismaClient middleware instead of this hack.\n if (isValidPrismaClient(options.client) && !options.client._sentryInstrumented) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n addNonEnumerableProperty(options.client as any, '_sentryInstrumented', true);\n\n const clientData: Record = {};\n try {\n const engineConfig = (options.client as PrismaClient)._engineConfig;\n if (engineConfig) {\n const { activeProvider, clientVersion } = engineConfig;\n if (activeProvider) {\n clientData['db.system'] = activeProvider;\n }\n if (clientVersion) {\n clientData['db.prisma.version'] = clientVersion;\n }\n }\n } catch (e) {\n // ignore\n }\n\n options.client.$use((params, next: (params: PrismaMiddlewareParams) => Promise) => {\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n return next(params);\n }\n\n const action = params.action;\n const model = params.model;\n\n return trace(\n {\n name: model ? `${model} ${action}` : action,\n op: 'db.sql.prisma',\n origin: 'auto.db.prisma',\n data: { ...clientData, 'db.operation': action },\n },\n () => next(params),\n );\n });\n } else {\n __DEBUG_BUILD__ &&\n logger.warn('Unsupported Prisma client provided to PrismaIntegration. Provided client:', options.client);\n }\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n // Noop - here for backwards compatibility\n }\n}\n","import { isThenable, tracingContextFromHeaders, logger, dropUndefinedKeys } from '@sentry/utils';\nimport { getCurrentHub } from '../hub.js';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\n\n/**\n * Wraps a function with a transaction/span and finishes the span after the function is done.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n *\n * This function is meant to be used internally and may break at any time. Use at your own risk.\n *\n * @internal\n * @private\n */\nfunction trace(\n context,\n callback,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onError = () => {},\n) {\n const ctx = normalizeContext(context);\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const parentSpan = scope.getSpan();\n\n const activeSpan = createChildSpanOrTransaction(hub, parentSpan, ctx);\n\n scope.setSpan(activeSpan);\n\n function finishAndSetSpan() {\n activeSpan && activeSpan.finish();\n hub.getScope().setSpan(parentSpan);\n }\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback(activeSpan);\n } catch (e) {\n activeSpan && activeSpan.setStatus('internal_error');\n onError(e);\n finishAndSetSpan();\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(\n () => {\n finishAndSetSpan();\n },\n e => {\n activeSpan && activeSpan.setStatus('internal_error');\n onError(e);\n finishAndSetSpan();\n },\n );\n } else {\n finishAndSetSpan();\n }\n\n return maybePromiseResult;\n}\n\n/**\n * Wraps a function with a transaction/span and finishes the span after the function is done.\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getSpan()`, as long as the function is executed while the scope is active.\n *\n * If you want to create a span that is not set as active, use {@link startInactiveSpan}.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n */\nfunction startSpan(context, callback) {\n const ctx = normalizeContext(context);\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const parentSpan = scope.getSpan();\n\n const activeSpan = createChildSpanOrTransaction(hub, parentSpan, ctx);\n scope.setSpan(activeSpan);\n\n function finishAndSetSpan() {\n activeSpan && activeSpan.finish();\n hub.getScope().setSpan(parentSpan);\n }\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback(activeSpan);\n } catch (e) {\n activeSpan && activeSpan.setStatus('internal_error');\n finishAndSetSpan();\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(\n () => {\n finishAndSetSpan();\n },\n () => {\n activeSpan && activeSpan.setStatus('internal_error');\n finishAndSetSpan();\n },\n );\n } else {\n finishAndSetSpan();\n }\n\n return maybePromiseResult;\n}\n\n/**\n * @deprecated Use {@link startSpan} instead.\n */\nconst startActiveSpan = startSpan;\n\n/**\n * Similar to `Sentry.startSpan`. Wraps a function with a transaction/span, but does not finish the span\n * after the function is done automatically.\n *\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n */\nfunction startSpanManual(\n context,\n callback,\n) {\n const ctx = normalizeContext(context);\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const parentSpan = scope.getSpan();\n\n const activeSpan = createChildSpanOrTransaction(hub, parentSpan, ctx);\n scope.setSpan(activeSpan);\n\n function finishAndSetSpan() {\n activeSpan && activeSpan.finish();\n hub.getScope().setSpan(parentSpan);\n }\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback(activeSpan, finishAndSetSpan);\n } catch (e) {\n activeSpan && activeSpan.setStatus('internal_error');\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(undefined, () => {\n activeSpan && activeSpan.setStatus('internal_error');\n });\n }\n\n return maybePromiseResult;\n}\n\n/**\n * Creates a span. This span is not set as active, so will not get automatic instrumentation spans\n * as children or be able to be accessed via `Sentry.getSpan()`.\n *\n * If you want to create a span that is set as active, use {@link startSpan}.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate` or `tracesSampler`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n */\nfunction startInactiveSpan(context) {\n if (!hasTracingEnabled()) {\n return undefined;\n }\n\n const ctx = { ...context };\n // If a name is set and a description is not, set the description to the name.\n if (ctx.name !== undefined && ctx.description === undefined) {\n ctx.description = ctx.name;\n }\n\n const hub = getCurrentHub();\n const parentSpan = getActiveSpan();\n return parentSpan ? parentSpan.startChild(ctx) : hub.startTransaction(ctx);\n}\n\n/**\n * Returns the currently active span.\n */\nfunction getActiveSpan() {\n return getCurrentHub().getScope().getSpan();\n}\n\n/**\n * Continue a trace from `sentry-trace` and `baggage` values.\n * These values can be obtained from incoming request headers,\n * or in the browser from `` and `` HTML tags.\n *\n * It also takes an optional `request` option, which if provided will also be added to the scope & transaction metadata.\n * The callback receives a transactionContext that may be used for `startTransaction` or `startSpan`.\n */\nfunction continueTrace(\n {\n sentryTrace,\n baggage,\n }\n\n,\n callback,\n) {\n const hub = getCurrentHub();\n const currentScope = hub.getScope();\n\n const { traceparentData, dynamicSamplingContext, propagationContext } = tracingContextFromHeaders(\n sentryTrace,\n baggage,\n );\n\n currentScope.setPropagationContext(propagationContext);\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && traceparentData) {\n logger.log(`[Tracing] Continuing trace ${traceparentData.traceId}.`);\n }\n\n const transactionContext = {\n ...traceparentData,\n metadata: dropUndefinedKeys({\n dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext,\n }),\n };\n\n return callback(transactionContext);\n}\n\nfunction createChildSpanOrTransaction(\n hub,\n parentSpan,\n ctx,\n) {\n if (!hasTracingEnabled()) {\n return undefined;\n }\n return parentSpan ? parentSpan.startChild(ctx) : hub.startTransaction(ctx);\n}\n\nfunction normalizeContext(context) {\n const ctx = { ...context };\n // If a name is set and a description is not, set the description to the name.\n if (ctx.name !== undefined && ctx.description === undefined) {\n ctx.description = ctx.name;\n }\n\n return ctx;\n}\n\nexport { continueTrace, getActiveSpan, startActiveSpan, startInactiveSpan, startSpan, startSpanManual, trace };\n//# sourceMappingURL=trace.js.map\n","import type { TransactionContext } from '@sentry/types';\nimport { dropUndefinedKeys, isThenable, logger, tracingContextFromHeaders } from '@sentry/utils';\n\nimport type { Hub } from '../hub';\nimport { getCurrentHub } from '../hub';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled';\nimport type { Span } from './span';\n\n/**\n * Wraps a function with a transaction/span and finishes the span after the function is done.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n *\n * This function is meant to be used internally and may break at any time. Use at your own risk.\n *\n * @internal\n * @private\n */\nexport function trace(\n context: TransactionContext,\n callback: (span?: Span) => T,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onError: (error: unknown) => void = () => {},\n): T {\n const ctx = normalizeContext(context);\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const parentSpan = scope.getSpan();\n\n const activeSpan = createChildSpanOrTransaction(hub, parentSpan, ctx);\n\n scope.setSpan(activeSpan);\n\n function finishAndSetSpan(): void {\n activeSpan && activeSpan.finish();\n hub.getScope().setSpan(parentSpan);\n }\n\n let maybePromiseResult: T;\n try {\n maybePromiseResult = callback(activeSpan);\n } catch (e) {\n activeSpan && activeSpan.setStatus('internal_error');\n onError(e);\n finishAndSetSpan();\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(\n () => {\n finishAndSetSpan();\n },\n e => {\n activeSpan && activeSpan.setStatus('internal_error');\n onError(e);\n finishAndSetSpan();\n },\n );\n } else {\n finishAndSetSpan();\n }\n\n return maybePromiseResult;\n}\n\n/**\n * Wraps a function with a transaction/span and finishes the span after the function is done.\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getSpan()`, as long as the function is executed while the scope is active.\n *\n * If you want to create a span that is not set as active, use {@link startInactiveSpan}.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n */\nexport function startSpan(context: TransactionContext, callback: (span: Span | undefined) => T): T {\n const ctx = normalizeContext(context);\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const parentSpan = scope.getSpan();\n\n const activeSpan = createChildSpanOrTransaction(hub, parentSpan, ctx);\n scope.setSpan(activeSpan);\n\n function finishAndSetSpan(): void {\n activeSpan && activeSpan.finish();\n hub.getScope().setSpan(parentSpan);\n }\n\n let maybePromiseResult: T;\n try {\n maybePromiseResult = callback(activeSpan);\n } catch (e) {\n activeSpan && activeSpan.setStatus('internal_error');\n finishAndSetSpan();\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(\n () => {\n finishAndSetSpan();\n },\n () => {\n activeSpan && activeSpan.setStatus('internal_error');\n finishAndSetSpan();\n },\n );\n } else {\n finishAndSetSpan();\n }\n\n return maybePromiseResult;\n}\n\n/**\n * @deprecated Use {@link startSpan} instead.\n */\nexport const startActiveSpan = startSpan;\n\n/**\n * Similar to `Sentry.startSpan`. Wraps a function with a transaction/span, but does not finish the span\n * after the function is done automatically.\n *\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n */\nexport function startSpanManual(\n context: TransactionContext,\n callback: (span: Span | undefined, finish: () => void) => T,\n): T {\n const ctx = normalizeContext(context);\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const parentSpan = scope.getSpan();\n\n const activeSpan = createChildSpanOrTransaction(hub, parentSpan, ctx);\n scope.setSpan(activeSpan);\n\n function finishAndSetSpan(): void {\n activeSpan && activeSpan.finish();\n hub.getScope().setSpan(parentSpan);\n }\n\n let maybePromiseResult: T;\n try {\n maybePromiseResult = callback(activeSpan, finishAndSetSpan);\n } catch (e) {\n activeSpan && activeSpan.setStatus('internal_error');\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(undefined, () => {\n activeSpan && activeSpan.setStatus('internal_error');\n });\n }\n\n return maybePromiseResult;\n}\n\n/**\n * Creates a span. This span is not set as active, so will not get automatic instrumentation spans\n * as children or be able to be accessed via `Sentry.getSpan()`.\n *\n * If you want to create a span that is set as active, use {@link startSpan}.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate` or `tracesSampler`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n */\nexport function startInactiveSpan(context: TransactionContext): Span | undefined {\n if (!hasTracingEnabled()) {\n return undefined;\n }\n\n const ctx = { ...context };\n // If a name is set and a description is not, set the description to the name.\n if (ctx.name !== undefined && ctx.description === undefined) {\n ctx.description = ctx.name;\n }\n\n const hub = getCurrentHub();\n const parentSpan = getActiveSpan();\n return parentSpan ? parentSpan.startChild(ctx) : hub.startTransaction(ctx);\n}\n\n/**\n * Returns the currently active span.\n */\nexport function getActiveSpan(): Span | undefined {\n return getCurrentHub().getScope().getSpan();\n}\n\n/**\n * Continue a trace from `sentry-trace` and `baggage` values.\n * These values can be obtained from incoming request headers,\n * or in the browser from `` and `` HTML tags.\n *\n * It also takes an optional `request` option, which if provided will also be added to the scope & transaction metadata.\n * The callback receives a transactionContext that may be used for `startTransaction` or `startSpan`.\n */\nexport function continueTrace(\n {\n sentryTrace,\n baggage,\n }: {\n sentryTrace: Parameters[0];\n baggage: Parameters[1];\n },\n callback: (transactionContext: Partial) => V,\n): V {\n const hub = getCurrentHub();\n const currentScope = hub.getScope();\n\n const { traceparentData, dynamicSamplingContext, propagationContext } = tracingContextFromHeaders(\n sentryTrace,\n baggage,\n );\n\n currentScope.setPropagationContext(propagationContext);\n\n if (__DEBUG_BUILD__ && traceparentData) {\n logger.log(`[Tracing] Continuing trace ${traceparentData.traceId}.`);\n }\n\n const transactionContext: Partial = {\n ...traceparentData,\n metadata: dropUndefinedKeys({\n dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext,\n }),\n };\n\n return callback(transactionContext);\n}\n\nfunction createChildSpanOrTransaction(\n hub: Hub,\n parentSpan: Span | undefined,\n ctx: TransactionContext,\n): Span | undefined {\n if (!hasTracingEnabled()) {\n return undefined;\n }\n return parentSpan ? parentSpan.startChild(ctx) : hub.startTransaction(ctx);\n}\n\nfunction normalizeContext(context: TransactionContext): TransactionContext {\n const ctx = { ...context };\n // If a name is set and a description is not, set the description to the name.\n if (ctx.name !== undefined && ctx.description === undefined) {\n ctx.description = ctx.name;\n }\n\n return ctx;\n}\n","/** The status of an Span.\n *\n * @deprecated Use string literals - if you require type casting, cast to SpanStatusType type\n */\n// eslint-disable-next-line import/export\nvar SpanStatus; (function (SpanStatus) {\n /** The operation completed successfully. */\n const Ok = 'ok'; SpanStatus[\"Ok\"] = Ok;\n /** Deadline expired before operation could complete. */\n const DeadlineExceeded = 'deadline_exceeded'; SpanStatus[\"DeadlineExceeded\"] = DeadlineExceeded;\n /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */\n const Unauthenticated = 'unauthenticated'; SpanStatus[\"Unauthenticated\"] = Unauthenticated;\n /** 403 Forbidden */\n const PermissionDenied = 'permission_denied'; SpanStatus[\"PermissionDenied\"] = PermissionDenied;\n /** 404 Not Found. Some requested entity (file or directory) was not found. */\n const NotFound = 'not_found'; SpanStatus[\"NotFound\"] = NotFound;\n /** 429 Too Many Requests */\n const ResourceExhausted = 'resource_exhausted'; SpanStatus[\"ResourceExhausted\"] = ResourceExhausted;\n /** Client specified an invalid argument. 4xx. */\n const InvalidArgument = 'invalid_argument'; SpanStatus[\"InvalidArgument\"] = InvalidArgument;\n /** 501 Not Implemented */\n const Unimplemented = 'unimplemented'; SpanStatus[\"Unimplemented\"] = Unimplemented;\n /** 503 Service Unavailable */\n const Unavailable = 'unavailable'; SpanStatus[\"Unavailable\"] = Unavailable;\n /** Other/generic 5xx. */\n const InternalError = 'internal_error'; SpanStatus[\"InternalError\"] = InternalError;\n /** Unknown. Any non-standard HTTP status code. */\n const UnknownError = 'unknown_error'; SpanStatus[\"UnknownError\"] = UnknownError;\n /** The operation was cancelled (typically by the user). */\n const Cancelled = 'cancelled'; SpanStatus[\"Cancelled\"] = Cancelled;\n /** Already exists (409) */\n const AlreadyExists = 'already_exists'; SpanStatus[\"AlreadyExists\"] = AlreadyExists;\n /** Operation was rejected because the system is not in a state required for the operation's */\n const FailedPrecondition = 'failed_precondition'; SpanStatus[\"FailedPrecondition\"] = FailedPrecondition;\n /** The operation was aborted, typically due to a concurrency issue. */\n const Aborted = 'aborted'; SpanStatus[\"Aborted\"] = Aborted;\n /** Operation was attempted past the valid range. */\n const OutOfRange = 'out_of_range'; SpanStatus[\"OutOfRange\"] = OutOfRange;\n /** Unrecoverable data loss or corruption */\n const DataLoss = 'data_loss'; SpanStatus[\"DataLoss\"] = DataLoss;\n})(SpanStatus || (SpanStatus = {}));\n\nexport { SpanStatus };\n//# sourceMappingURL=spanstatus.js.map\n","/** The status of an Span.\n *\n * @deprecated Use string literals - if you require type casting, cast to SpanStatusType type\n */\n// eslint-disable-next-line import/export\nexport enum SpanStatus {\n /** The operation completed successfully. */\n Ok = 'ok',\n /** Deadline expired before operation could complete. */\n DeadlineExceeded = 'deadline_exceeded',\n /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */\n Unauthenticated = 'unauthenticated',\n /** 403 Forbidden */\n PermissionDenied = 'permission_denied',\n /** 404 Not Found. Some requested entity (file or directory) was not found. */\n NotFound = 'not_found',\n /** 429 Too Many Requests */\n ResourceExhausted = 'resource_exhausted',\n /** Client specified an invalid argument. 4xx. */\n InvalidArgument = 'invalid_argument',\n /** 501 Not Implemented */\n Unimplemented = 'unimplemented',\n /** 503 Service Unavailable */\n Unavailable = 'unavailable',\n /** Other/generic 5xx. */\n InternalError = 'internal_error',\n /** Unknown. Any non-standard HTTP status code. */\n UnknownError = 'unknown_error',\n /** The operation was cancelled (typically by the user). */\n Cancelled = 'cancelled',\n /** Already exists (409) */\n AlreadyExists = 'already_exists',\n /** Operation was rejected because the system is not in a state required for the operation's */\n FailedPrecondition = 'failed_precondition',\n /** The operation was aborted, typically due to a concurrency issue. */\n Aborted = 'aborted',\n /** Operation was attempted past the valid range. */\n OutOfRange = 'out_of_range',\n /** Unrecoverable data loss or corruption */\n DataLoss = 'data_loss',\n}\n","import { visit, clearCache } from \"@hotwired/turbo\";\nimport { Controller } from \"@hotwired/stimulus\";\nimport axios, { Method } from \"axios\";\nimport {\n disableAllButtons,\n hideProgressBar,\n showProgressBar,\n progressEventHandler,\n} from \"./loading\";\nimport { handleAxiosError } from \"./messageBar\";\n\n// Turbo has builtin support for form submission.\n// We once migrated to use it.\n// However, redirect to external is broken because\n// the redirect is made with fetch, which is subject to CORS.\n// A typical problem is the support for the post login redirect URI.\n// The post login redirect URI is usually an external link that\n// the origin of the link does not list our origin as allowed origin.\n// If we rely on Turbo to handle form submission,\n// the post login redirect URI will be broken.\n// Therefore, we reverted to handle form submission ourselves.\n// To disable the builtin form submission of Turbo,\n// I studied its source code and discovered that\n// Turbo checked in the bubble event listener to see if\n// the event is prevented.\n// So I added a capture event listener to call preventDefault()\n// to stop Turbo from submitting forms.\n//\n// See https://github.com/authgear/authgear-server/issues/2333\nexport class XHRSubmitFormController extends Controller {\n revertDisabledButtons: { (): void } | null = null;\n forms: HTMLFormElement[] = [];\n\n // Revert disabled buttons before Turbo caches the page\n // To avoid flickering in the UI\n beforeCache = () => {\n if (this.revertDisabledButtons) {\n this.revertDisabledButtons();\n }\n };\n\n onSubmitCapture = (e: Event) => {\n e.preventDefault();\n };\n\n onSubmit = (e: Event) => {\n this.submitForm(e);\n };\n\n async submitForm(e: Event) {\n const form = e.currentTarget as HTMLFormElement;\n\n if (form.querySelector('[data-turbo=\"false\"]')) {\n return;\n }\n\n // Do not stop propagation so that GTM can recognize the event as Form Submission trigger.\n // e.stopPropagation();\n\n const formData = new FormData(form);\n\n const params = new URLSearchParams();\n formData.forEach((value, name) => {\n params.set(name, value as string);\n });\n // FormData does not include any submit button's data:\n // include them manually, since we have at most one submit button per form.\n const submitButtons = form.querySelectorAll('button[type=\"submit\"]');\n for (let i = 0; i < submitButtons.length; i++) {\n const button = submitButtons[i] as HTMLButtonElement;\n params.set(button.name, button.value);\n }\n if (form.id) {\n const el = document.querySelector(\n `button[type=\"submit\"][form=\"${form.id}\"]`\n );\n if (el) {\n const button = el as HTMLButtonElement;\n params.set(button.name, button.value);\n }\n }\n\n this.revertDisabledButtons = disableAllButtons();\n showProgressBar();\n try {\n const resp = await axios(form.action, {\n method: form.method as Method,\n headers: {\n \"Content-Type\": \"application/x-www-form-urlencoded;charset=UTF-8\",\n \"X-Authgear-XHR\": \"true\",\n },\n data: params,\n onUploadProgress: progressEventHandler,\n onDownloadProgress: progressEventHandler,\n });\n\n const { redirect_uri, action } = resp.data;\n\n clearCache();\n switch (action) {\n case \"redirect\":\n // Perform full redirect.\n window.location = redirect_uri;\n break;\n\n case \"replace\":\n case \"advance\":\n // We assume the URL returned by the server have query preserved.\n visit(redirect_uri, { action });\n break;\n }\n } catch (e: unknown) {\n handleAxiosError(e);\n // revert is only called for error branch because\n // The success branch also loads a new page.\n // Keeping the buttons in disabled state reduce flickering in the UI.\n if (this.revertDisabledButtons) {\n this.revertDisabledButtons();\n this.revertDisabledButtons = null;\n }\n } finally {\n hideProgressBar();\n }\n }\n\n connect() {\n const elems = document.querySelectorAll(\"form\");\n for (let i = 0; i < elems.length; i++) {\n if (elems[i].querySelector('[data-turbo=\"false\"]')) {\n continue;\n }\n this.forms.push(elems[i] as HTMLFormElement);\n }\n for (const form of this.forms) {\n form.addEventListener(\"submit\", this.onSubmitCapture, true);\n form.addEventListener(\"submit\", this.onSubmit);\n }\n\n document.addEventListener(\"turbo:before-cache\", this.beforeCache);\n }\n\n disconnect() {\n for (const form of this.forms) {\n form.removeEventListener(\"submit\", this.onSubmitCapture, true);\n form.removeEventListener(\"submit\", this.onSubmit);\n }\n\n document.removeEventListener(\"turbo:before-cache\", this.beforeCache);\n }\n}\n\n// NOTE: As turbo would first disconnect and connect head and then disconnect and connect body, if we put this controller in head and modify field value, it will then be covered.\nexport class RestoreFormController extends Controller {\n static values = { json: String };\n\n declare jsonValue: string;\n\n connect() {\n const content = this.jsonValue;\n if (content === \"\") {\n return;\n }\n\n // Clear the content to avoid restoring twice.\n this.jsonValue = \"\";\n\n const formDataJSON = JSON.parse(content);\n\n // Find the form.\n let form: HTMLFormElement | null = null;\n const xAction = formDataJSON[\"x_action\"];\n const elementsWithXAction = document.querySelectorAll(`[name=\"x_action\"]`);\n for (let i = 0; i < elementsWithXAction.length; i++) {\n const elem = elementsWithXAction[i];\n if (elem instanceof HTMLButtonElement && elem.value === xAction) {\n form = elem.form;\n break;\n }\n }\n if (form == null) {\n return;\n }\n if (form.getAttribute(\"data-restore-form\") === \"false\") {\n return;\n }\n\n for (let i = 0; i < form.elements.length; i++) {\n const elem = form.elements[i];\n if (\n elem instanceof HTMLInputElement ||\n elem instanceof HTMLSelectElement ||\n elem instanceof HTMLTextAreaElement\n ) {\n const value = formDataJSON[elem.name];\n if (value != null) {\n elem.value = value;\n }\n }\n }\n }\n}\n\n// RetainFormFormController exposes the input listener\n// to capture form on every key stroke.\n// It saves the form in sessionStorage on disconnect.\n// On connect, it revives the input controls by setting their value attribute.\nexport class RetainFormFormController extends Controller {\n static values = {\n id: String,\n };\n\n static targets = [\"input\"];\n\n declare idValue: string;\n declare inputTargets: HTMLInputElement[];\n\n retained: Record = {};\n\n input(e: CustomEvent) {\n const name: string | undefined | null = (e as any).params.name;\n const value: string | undefined | null = e.detail.value;\n if (typeof name === \"string\" && typeof value === \"string\") {\n this.retained[name] = value;\n }\n }\n\n getSessionStorageKey(id: string): string {\n return `restore-form-form-${id}`;\n }\n\n connect() {\n if (this.idValue !== \"\") {\n const key = this.getSessionStorageKey(this.idValue);\n const value = sessionStorage.getItem(key);\n if (value == null) {\n return;\n }\n sessionStorage.removeItem(key);\n this.retained = JSON.parse(value);\n for (const input of this.inputTargets) {\n for (const name in this.retained) {\n if (input.getAttribute(\"data-retain-form-form-name-param\") === name) {\n input.setAttribute(\"value\", this.retained[name]);\n }\n }\n }\n }\n }\n\n disconnect() {\n // Before disconnect, collect all values once.\n this.collectAllValues();\n if (this.idValue !== \"\") {\n const key = this.getSessionStorageKey(this.idValue);\n sessionStorage.setItem(key, JSON.stringify(this.retained));\n }\n }\n\n private collectAllValues() {\n for (const input of this.inputTargets) {\n const name = input.getAttribute(\"data-retain-form-form-name-param\");\n const value = input.value;\n if (typeof name === \"string\" && typeof value === \"string\") {\n this.retained[name] = value;\n }\n }\n }\n}\n\n// RetainFormInputController is intended to be installed on\n// normal and forward the \"input\" event to RetainFormFormController.\nexport class RetainFormInputController extends Controller {\n input(e: InputEvent) {\n if (e.currentTarget instanceof HTMLInputElement) {\n this.dispatch(\"input\", {\n detail: {\n value: e.currentTarget.value,\n },\n });\n }\n }\n}\n","import { AxiosProgressEvent } from \"axios\";\n//\n// disableAllButtons remembers the disabled state of all buttons.\n// It disables all button and returns a function to revert to original state.\nexport function disableAllButtons(): () => void {\n const buttons = document.querySelectorAll(\"button\");\n const original: [HTMLButtonElement, boolean][] = [];\n for (let i = 0; i < buttons.length; i++) {\n const button = buttons[i];\n const disabled = button.disabled;\n const state: [HTMLButtonElement, boolean] = [button, disabled];\n button.disabled = true;\n original.push(state);\n }\n\n return () => {\n for (let i = 0; i < original.length; i++) {\n const [button, disabled] = original[i];\n button.disabled = disabled;\n }\n };\n}\n\nexport function hideProgressBar(): void {\n const loadingProgressBar = document.getElementById(\"loading-progress-bar\");\n if (loadingProgressBar == null) {\n return;\n }\n loadingProgressBar.style.opacity = \"0\";\n}\n\nexport function showProgressBar(): void {\n const loadingProgressBar = document.getElementById(\"loading-progress-bar\");\n if (loadingProgressBar == null) {\n return;\n }\n loadingProgressBar.style.opacity = \"1\";\n}\n\nexport function progressEventHandler(progressEvent: AxiosProgressEvent): void {\n const loadingProgressBar = document.getElementById(\"loading-progress-bar\");\n if (loadingProgressBar == null) {\n return;\n }\n\n if (progressEvent.total == null) {\n return;\n }\n\n const percentage = Math.round(\n (100 * progressEvent.loaded) / progressEvent.total\n );\n const width = Math.max(0, Math.min(100, percentage));\n loadingProgressBar.style.width = `${width}%`;\n}\n","import { AxiosResponse } from \"axios\";\nimport { Controller } from \"@hotwired/stimulus\";\nimport { session } from \"@hotwired/turbo\";\n\nexport function handleAxiosError(e: unknown) {\n const err = e as any;\n if (err.code === \"ERR_NETWORK\") {\n showErrorMessage(\"error-message-network\");\n } else if (err.response != null) {\n const response: AxiosResponse = err.response;\n\n if (typeof response.data === \"string\") {\n session.renderStreamMessage(response.data);\n return;\n }\n\n showErrorMessage(\"error-message-server\");\n } else if (err.request != null) {\n showErrorMessage(\"error-message-network\");\n } else {\n // programming error\n }\n\n console.error(err);\n}\n\nexport function showErrorMessage(id: string) {\n setErrorMessage(id, false);\n}\n\nexport function hideErrorMessage(id: string) {\n setErrorMessage(id, true);\n}\n\nfunction setErrorMessage(id: string, hidden: boolean) {\n if (hidden) {\n const e = new CustomEvent(\"messagebar:hide-message\", {\n detail: {\n id,\n },\n });\n document.dispatchEvent(e);\n } else {\n const e = new CustomEvent(\"messagebar:show-message\", {\n detail: {\n id,\n },\n });\n document.dispatchEvent(e);\n }\n}\n\nexport class MessageBarController extends Controller {\n // Close the message bar before cache the page.\n // So that the cached page does not have the message bar shown.\n // See https://github.com/authgear/authgear-server/issues/1424\n beforeCache = () => {\n this.hide();\n };\n\n open = () => {\n const barTarget = this.element as HTMLElement;\n barTarget.classList.remove(\"hidden\");\n };\n\n hide = () => {\n const barTarget = this.element as HTMLElement;\n barTarget.classList.add(\"hidden\");\n };\n\n connect() {\n document.addEventListener(\"turbo:before-cache\", this.beforeCache);\n }\n\n close(e: Event) {\n e.preventDefault();\n e.stopPropagation();\n\n this.hide();\n }\n\n disconnect() {\n document.removeEventListener(\"turbo:before-cache\", this.beforeCache);\n }\n\n showMessage(e: CustomEvent) {\n this.open();\n const id: string = e.detail.id;\n document.getElementById(id)?.classList?.remove(\"hidden\");\n }\n\n hideMessage(e: CustomEvent) {\n this.hide();\n const id: string = e.detail.id;\n document.getElementById(id)?.classList?.add(\"hidden\");\n }\n}\n","import { Controller } from \"@hotwired/stimulus\";\n// Disable double tap zoom\n// There are rumours on the web claiming that touch-action: manipulation can do that.\n// However, I tried\n// * {\n// touch-action: manipulation;\n// }\n// and\n// * {\n// touch-action: pan-y;\n// }\n// None of them work.\nexport class PreventDoubleTapController extends Controller {\n action(e: Event) {\n e.preventDefault();\n e.stopPropagation();\n }\n}\n","import { Controller } from \"@hotwired/stimulus\";\nimport { DateTime } from \"luxon\";\nimport { FormatDateRelativeController } from \"./date\";\n\nexport class LockoutController extends Controller {\n static outlets = [\"format-date-relative\"];\n static targets = [\"locked\", \"unlocked\"];\n static values = {\n lockUntil: String,\n actionButtonSelector: String,\n };\n\n declare intervalHandle: number | null;\n declare lockUntilValue: string;\n declare actionButtonSelectorValue: string;\n declare formatDateRelativeOutlets: FormatDateRelativeController[];\n declare lockedTargets: HTMLElement[];\n declare unlockedTargets: HTMLElement[];\n\n private isLocked: boolean | undefined = undefined;\n private wasActionButtonDisabled: boolean = false;\n\n stopTick() {\n if (this.intervalHandle != null) {\n window.clearInterval(this.intervalHandle);\n this.intervalHandle = null;\n this.wasActionButtonDisabled = false;\n }\n }\n\n setupTick() {\n this.isLocked = undefined;\n this.stopTick();\n const el = this.element as HTMLElement;\n const lockUntil = DateTime.fromISO(this.lockUntilValue);\n if (!this.lockUntilValue || !lockUntil.isValid) {\n return;\n }\n\n const tick = () => {\n const actionButtonEl = el.querySelector(this.actionButtonSelectorValue);\n const now = DateTime.now();\n this.formatDateRelativeOutlets.forEach(\n (outlet) => (outlet.relativeBaseValue = now.toISO() as string)\n );\n\n const newIsLocked = now < lockUntil;\n if (newIsLocked === this.isLocked) {\n return;\n }\n this.isLocked = newIsLocked;\n if (actionButtonEl != null) {\n if (newIsLocked === true) {\n this.wasActionButtonDisabled = actionButtonEl?.getAttribute(\n \"disabled\"\n )\n ? true\n : false;\n (actionButtonEl as HTMLButtonElement).disabled = true;\n } else {\n (actionButtonEl as HTMLButtonElement).disabled =\n this.wasActionButtonDisabled;\n }\n }\n\n this.lockedTargets.forEach(\n (el) => ((el as HTMLElement).style.display = newIsLocked ? \"\" : \"none\")\n );\n this.unlockedTargets.forEach(\n (el) => ((el as HTMLElement).style.display = newIsLocked ? \"none\" : \"\")\n );\n\n if (!newIsLocked) {\n this.stopTick();\n }\n };\n tick();\n\n this.intervalHandle = window.setInterval(tick, 100);\n }\n\n connect(): void {\n this.setupTick();\n }\n\n disconnect() {\n this.stopTick();\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n _setPrototypeOf(subClass, superClass);\n}\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\nfunction _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct.bind();\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n return _construct.apply(null, arguments);\n}\nfunction _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\nfunction _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !_isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return _construct(Class, arguments, _getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return _setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (it) return (it = it.call(o)).next.bind(it);\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n return typeof key === \"symbol\" ? key : String(key);\n}\n\n// these aren't really private, but nor are they really useful to document\n/**\n * @private\n */\nvar LuxonError = /*#__PURE__*/function (_Error) {\n _inheritsLoose(LuxonError, _Error);\n function LuxonError() {\n return _Error.apply(this, arguments) || this;\n }\n return LuxonError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n/**\n * @private\n */\nvar InvalidDateTimeError = /*#__PURE__*/function (_LuxonError) {\n _inheritsLoose(InvalidDateTimeError, _LuxonError);\n function InvalidDateTimeError(reason) {\n return _LuxonError.call(this, \"Invalid DateTime: \" + reason.toMessage()) || this;\n }\n return InvalidDateTimeError;\n}(LuxonError);\n\n/**\n * @private\n */\nvar InvalidIntervalError = /*#__PURE__*/function (_LuxonError2) {\n _inheritsLoose(InvalidIntervalError, _LuxonError2);\n function InvalidIntervalError(reason) {\n return _LuxonError2.call(this, \"Invalid Interval: \" + reason.toMessage()) || this;\n }\n return InvalidIntervalError;\n}(LuxonError);\n\n/**\n * @private\n */\nvar InvalidDurationError = /*#__PURE__*/function (_LuxonError3) {\n _inheritsLoose(InvalidDurationError, _LuxonError3);\n function InvalidDurationError(reason) {\n return _LuxonError3.call(this, \"Invalid Duration: \" + reason.toMessage()) || this;\n }\n return InvalidDurationError;\n}(LuxonError);\n\n/**\n * @private\n */\nvar ConflictingSpecificationError = /*#__PURE__*/function (_LuxonError4) {\n _inheritsLoose(ConflictingSpecificationError, _LuxonError4);\n function ConflictingSpecificationError() {\n return _LuxonError4.apply(this, arguments) || this;\n }\n return ConflictingSpecificationError;\n}(LuxonError);\n\n/**\n * @private\n */\nvar InvalidUnitError = /*#__PURE__*/function (_LuxonError5) {\n _inheritsLoose(InvalidUnitError, _LuxonError5);\n function InvalidUnitError(unit) {\n return _LuxonError5.call(this, \"Invalid unit \" + unit) || this;\n }\n return InvalidUnitError;\n}(LuxonError);\n\n/**\n * @private\n */\nvar InvalidArgumentError = /*#__PURE__*/function (_LuxonError6) {\n _inheritsLoose(InvalidArgumentError, _LuxonError6);\n function InvalidArgumentError() {\n return _LuxonError6.apply(this, arguments) || this;\n }\n return InvalidArgumentError;\n}(LuxonError);\n\n/**\n * @private\n */\nvar ZoneIsAbstractError = /*#__PURE__*/function (_LuxonError7) {\n _inheritsLoose(ZoneIsAbstractError, _LuxonError7);\n function ZoneIsAbstractError() {\n return _LuxonError7.call(this, \"Zone is an abstract class\") || this;\n }\n return ZoneIsAbstractError;\n}(LuxonError);\n\n/**\n * @private\n */\n\nvar n = \"numeric\",\n s = \"short\",\n l = \"long\";\nvar DATE_SHORT = {\n year: n,\n month: n,\n day: n\n};\nvar DATE_MED = {\n year: n,\n month: s,\n day: n\n};\nvar DATE_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s\n};\nvar DATE_FULL = {\n year: n,\n month: l,\n day: n\n};\nvar DATE_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l\n};\nvar TIME_SIMPLE = {\n hour: n,\n minute: n\n};\nvar TIME_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n\n};\nvar TIME_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s\n};\nvar TIME_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l\n};\nvar TIME_24_SIMPLE = {\n hour: n,\n minute: n,\n hourCycle: \"h23\"\n};\nvar TIME_24_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\"\n};\nvar TIME_24_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n timeZoneName: s\n};\nvar TIME_24_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n timeZoneName: l\n};\nvar DATETIME_SHORT = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n\n};\nvar DATETIME_SHORT_WITH_SECONDS = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n,\n second: n\n};\nvar DATETIME_MED = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n\n};\nvar DATETIME_MED_WITH_SECONDS = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n,\n second: n\n};\nvar DATETIME_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s,\n hour: n,\n minute: n\n};\nvar DATETIME_FULL = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n timeZoneName: s\n};\nvar DATETIME_FULL_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s\n};\nvar DATETIME_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n timeZoneName: l\n};\nvar DATETIME_HUGE_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l\n};\n\n/**\n * @interface\n */\nvar Zone = /*#__PURE__*/function () {\n function Zone() {}\n var _proto = Zone.prototype;\n /**\n * Returns the offset's common name (such as EST) at the specified timestamp\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the name\n * @param {Object} opts - Options to affect the format\n * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n * @param {string} opts.locale - What locale to return the offset name in.\n * @return {string}\n */\n _proto.offsetName = function offsetName(ts, opts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's value as a string\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */;\n _proto.formatOffset = function formatOffset(ts, format) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to compute the offset\n * @return {number}\n */;\n _proto.offset = function offset(ts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is equal to another zone\n * @abstract\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */;\n _proto.equals = function equals(otherZone) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is valid.\n * @abstract\n * @type {boolean}\n */;\n _createClass(Zone, [{\n key: \"type\",\n get:\n /**\n * The type of zone\n * @abstract\n * @type {string}\n */\n function get() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * The name of this zone.\n * @abstract\n * @type {string}\n */\n }, {\n key: \"name\",\n get: function get() {\n throw new ZoneIsAbstractError();\n }\n }, {\n key: \"ianaName\",\n get: function get() {\n return this.name;\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year.\n * @abstract\n * @type {boolean}\n */\n }, {\n key: \"isUniversal\",\n get: function get() {\n throw new ZoneIsAbstractError();\n }\n }, {\n key: \"isValid\",\n get: function get() {\n throw new ZoneIsAbstractError();\n }\n }]);\n return Zone;\n}();\n\nvar singleton$1 = null;\n\n/**\n * Represents the local zone for this JavaScript environment.\n * @implements {Zone}\n */\nvar SystemZone = /*#__PURE__*/function (_Zone) {\n _inheritsLoose(SystemZone, _Zone);\n function SystemZone() {\n return _Zone.apply(this, arguments) || this;\n }\n var _proto = SystemZone.prototype;\n /** @override **/\n _proto.offsetName = function offsetName(ts, _ref) {\n var format = _ref.format,\n locale = _ref.locale;\n return parseZoneInfo(ts, format, locale);\n }\n\n /** @override **/;\n _proto.formatOffset = function formatOffset$1(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/;\n _proto.offset = function offset(ts) {\n return -new Date(ts).getTimezoneOffset();\n }\n\n /** @override **/;\n _proto.equals = function equals(otherZone) {\n return otherZone.type === \"system\";\n }\n\n /** @override **/;\n _createClass(SystemZone, [{\n key: \"type\",\n get: /** @override **/\n function get() {\n return \"system\";\n }\n\n /** @override **/\n }, {\n key: \"name\",\n get: function get() {\n return new Intl.DateTimeFormat().resolvedOptions().timeZone;\n }\n\n /** @override **/\n }, {\n key: \"isUniversal\",\n get: function get() {\n return false;\n }\n }, {\n key: \"isValid\",\n get: function get() {\n return true;\n }\n }], [{\n key: \"instance\",\n get:\n /**\n * Get a singleton instance of the local zone\n * @return {SystemZone}\n */\n function get() {\n if (singleton$1 === null) {\n singleton$1 = new SystemZone();\n }\n return singleton$1;\n }\n }]);\n return SystemZone;\n}(Zone);\n\nvar dtfCache = {};\nfunction makeDTF(zone) {\n if (!dtfCache[zone]) {\n dtfCache[zone] = new Intl.DateTimeFormat(\"en-US\", {\n hour12: false,\n timeZone: zone,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n era: \"short\"\n });\n }\n return dtfCache[zone];\n}\nvar typeToPos = {\n year: 0,\n month: 1,\n day: 2,\n era: 3,\n hour: 4,\n minute: 5,\n second: 6\n};\nfunction hackyOffset(dtf, date) {\n var formatted = dtf.format(date).replace(/\\u200E/g, \"\"),\n parsed = /(\\d+)\\/(\\d+)\\/(\\d+) (AD|BC),? (\\d+):(\\d+):(\\d+)/.exec(formatted),\n fMonth = parsed[1],\n fDay = parsed[2],\n fYear = parsed[3],\n fadOrBc = parsed[4],\n fHour = parsed[5],\n fMinute = parsed[6],\n fSecond = parsed[7];\n return [fYear, fMonth, fDay, fadOrBc, fHour, fMinute, fSecond];\n}\nfunction partsOffset(dtf, date) {\n var formatted = dtf.formatToParts(date);\n var filled = [];\n for (var i = 0; i < formatted.length; i++) {\n var _formatted$i = formatted[i],\n type = _formatted$i.type,\n value = _formatted$i.value;\n var pos = typeToPos[type];\n if (type === \"era\") {\n filled[pos] = value;\n } else if (!isUndefined(pos)) {\n filled[pos] = parseInt(value, 10);\n }\n }\n return filled;\n}\nvar ianaZoneCache = {};\n/**\n * A zone identified by an IANA identifier, like America/New_York\n * @implements {Zone}\n */\nvar IANAZone = /*#__PURE__*/function (_Zone) {\n _inheritsLoose(IANAZone, _Zone);\n /**\n * @param {string} name - Zone name\n * @return {IANAZone}\n */\n IANAZone.create = function create(name) {\n if (!ianaZoneCache[name]) {\n ianaZoneCache[name] = new IANAZone(name);\n }\n return ianaZoneCache[name];\n }\n\n /**\n * Reset local caches. Should only be necessary in testing scenarios.\n * @return {void}\n */;\n IANAZone.resetCache = function resetCache() {\n ianaZoneCache = {};\n dtfCache = {};\n }\n\n /**\n * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.\n * @param {string} s - The string to check validity on\n * @example IANAZone.isValidSpecifier(\"America/New_York\") //=> true\n * @example IANAZone.isValidSpecifier(\"Sport~~blorp\") //=> false\n * @deprecated This method returns false for some valid IANA names. Use isValidZone instead.\n * @return {boolean}\n */;\n IANAZone.isValidSpecifier = function isValidSpecifier(s) {\n return this.isValidZone(s);\n }\n\n /**\n * Returns whether the provided string identifies a real zone\n * @param {string} zone - The string to check\n * @example IANAZone.isValidZone(\"America/New_York\") //=> true\n * @example IANAZone.isValidZone(\"Fantasia/Castle\") //=> false\n * @example IANAZone.isValidZone(\"Sport~~blorp\") //=> false\n * @return {boolean}\n */;\n IANAZone.isValidZone = function isValidZone(zone) {\n if (!zone) {\n return false;\n }\n try {\n new Intl.DateTimeFormat(\"en-US\", {\n timeZone: zone\n }).format();\n return true;\n } catch (e) {\n return false;\n }\n };\n function IANAZone(name) {\n var _this;\n _this = _Zone.call(this) || this;\n /** @private **/\n _this.zoneName = name;\n /** @private **/\n _this.valid = IANAZone.isValidZone(name);\n return _this;\n }\n\n /** @override **/\n var _proto = IANAZone.prototype;\n /** @override **/\n _proto.offsetName = function offsetName(ts, _ref) {\n var format = _ref.format,\n locale = _ref.locale;\n return parseZoneInfo(ts, format, locale, this.name);\n }\n\n /** @override **/;\n _proto.formatOffset = function formatOffset$1(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/;\n _proto.offset = function offset(ts) {\n var date = new Date(ts);\n if (isNaN(date)) return NaN;\n var dtf = makeDTF(this.name);\n var _ref2 = dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date),\n year = _ref2[0],\n month = _ref2[1],\n day = _ref2[2],\n adOrBc = _ref2[3],\n hour = _ref2[4],\n minute = _ref2[5],\n second = _ref2[6];\n if (adOrBc === \"BC\") {\n year = -Math.abs(year) + 1;\n }\n\n // because we're using hour12 and https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat\n var adjustedHour = hour === 24 ? 0 : hour;\n var asUTC = objToLocalTS({\n year: year,\n month: month,\n day: day,\n hour: adjustedHour,\n minute: minute,\n second: second,\n millisecond: 0\n });\n var asTS = +date;\n var over = asTS % 1000;\n asTS -= over >= 0 ? over : 1000 + over;\n return (asUTC - asTS) / (60 * 1000);\n }\n\n /** @override **/;\n _proto.equals = function equals(otherZone) {\n return otherZone.type === \"iana\" && otherZone.name === this.name;\n }\n\n /** @override **/;\n _createClass(IANAZone, [{\n key: \"type\",\n get: function get() {\n return \"iana\";\n }\n\n /** @override **/\n }, {\n key: \"name\",\n get: function get() {\n return this.zoneName;\n }\n\n /** @override **/\n }, {\n key: \"isUniversal\",\n get: function get() {\n return false;\n }\n }, {\n key: \"isValid\",\n get: function get() {\n return this.valid;\n }\n }]);\n return IANAZone;\n}(Zone);\n\nvar _excluded = [\"base\"],\n _excluded2 = [\"padTo\", \"floor\"];\n\n// todo - remap caching\n\nvar intlLFCache = {};\nfunction getCachedLF(locString, opts) {\n if (opts === void 0) {\n opts = {};\n }\n var key = JSON.stringify([locString, opts]);\n var dtf = intlLFCache[key];\n if (!dtf) {\n dtf = new Intl.ListFormat(locString, opts);\n intlLFCache[key] = dtf;\n }\n return dtf;\n}\nvar intlDTCache = {};\nfunction getCachedDTF(locString, opts) {\n if (opts === void 0) {\n opts = {};\n }\n var key = JSON.stringify([locString, opts]);\n var dtf = intlDTCache[key];\n if (!dtf) {\n dtf = new Intl.DateTimeFormat(locString, opts);\n intlDTCache[key] = dtf;\n }\n return dtf;\n}\nvar intlNumCache = {};\nfunction getCachedINF(locString, opts) {\n if (opts === void 0) {\n opts = {};\n }\n var key = JSON.stringify([locString, opts]);\n var inf = intlNumCache[key];\n if (!inf) {\n inf = new Intl.NumberFormat(locString, opts);\n intlNumCache[key] = inf;\n }\n return inf;\n}\nvar intlRelCache = {};\nfunction getCachedRTF(locString, opts) {\n if (opts === void 0) {\n opts = {};\n }\n var _opts = opts;\n _opts.base;\n var cacheKeyOpts = _objectWithoutPropertiesLoose(_opts, _excluded); // exclude `base` from the options\n var key = JSON.stringify([locString, cacheKeyOpts]);\n var inf = intlRelCache[key];\n if (!inf) {\n inf = new Intl.RelativeTimeFormat(locString, opts);\n intlRelCache[key] = inf;\n }\n return inf;\n}\nvar sysLocaleCache = null;\nfunction systemLocale() {\n if (sysLocaleCache) {\n return sysLocaleCache;\n } else {\n sysLocaleCache = new Intl.DateTimeFormat().resolvedOptions().locale;\n return sysLocaleCache;\n }\n}\nvar weekInfoCache = {};\nfunction getCachedWeekInfo(locString) {\n var data = weekInfoCache[locString];\n if (!data) {\n var locale = new Intl.Locale(locString);\n // browsers currently implement this as a property, but spec says it should be a getter function\n data = \"getWeekInfo\" in locale ? locale.getWeekInfo() : locale.weekInfo;\n weekInfoCache[locString] = data;\n }\n return data;\n}\nfunction parseLocaleString(localeStr) {\n // I really want to avoid writing a BCP 47 parser\n // see, e.g. https://github.com/wooorm/bcp-47\n // Instead, we'll do this:\n\n // a) if the string has no -u extensions, just leave it alone\n // b) if it does, use Intl to resolve everything\n // c) if Intl fails, try again without the -u\n\n // private subtags and unicode subtags have ordering requirements,\n // and we're not properly parsing this, so just strip out the\n // private ones if they exist.\n var xIndex = localeStr.indexOf(\"-x-\");\n if (xIndex !== -1) {\n localeStr = localeStr.substring(0, xIndex);\n }\n var uIndex = localeStr.indexOf(\"-u-\");\n if (uIndex === -1) {\n return [localeStr];\n } else {\n var options;\n var selectedStr;\n try {\n options = getCachedDTF(localeStr).resolvedOptions();\n selectedStr = localeStr;\n } catch (e) {\n var smaller = localeStr.substring(0, uIndex);\n options = getCachedDTF(smaller).resolvedOptions();\n selectedStr = smaller;\n }\n var _options = options,\n numberingSystem = _options.numberingSystem,\n calendar = _options.calendar;\n return [selectedStr, numberingSystem, calendar];\n }\n}\nfunction intlConfigString(localeStr, numberingSystem, outputCalendar) {\n if (outputCalendar || numberingSystem) {\n if (!localeStr.includes(\"-u-\")) {\n localeStr += \"-u\";\n }\n if (outputCalendar) {\n localeStr += \"-ca-\" + outputCalendar;\n }\n if (numberingSystem) {\n localeStr += \"-nu-\" + numberingSystem;\n }\n return localeStr;\n } else {\n return localeStr;\n }\n}\nfunction mapMonths(f) {\n var ms = [];\n for (var i = 1; i <= 12; i++) {\n var dt = DateTime.utc(2009, i, 1);\n ms.push(f(dt));\n }\n return ms;\n}\nfunction mapWeekdays(f) {\n var ms = [];\n for (var i = 1; i <= 7; i++) {\n var dt = DateTime.utc(2016, 11, 13 + i);\n ms.push(f(dt));\n }\n return ms;\n}\nfunction listStuff(loc, length, englishFn, intlFn) {\n var mode = loc.listingMode();\n if (mode === \"error\") {\n return null;\n } else if (mode === \"en\") {\n return englishFn(length);\n } else {\n return intlFn(length);\n }\n}\nfunction supportsFastNumbers(loc) {\n if (loc.numberingSystem && loc.numberingSystem !== \"latn\") {\n return false;\n } else {\n return loc.numberingSystem === \"latn\" || !loc.locale || loc.locale.startsWith(\"en\") || new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === \"latn\";\n }\n}\n\n/**\n * @private\n */\nvar PolyNumberFormatter = /*#__PURE__*/function () {\n function PolyNumberFormatter(intl, forceSimple, opts) {\n this.padTo = opts.padTo || 0;\n this.floor = opts.floor || false;\n opts.padTo;\n opts.floor;\n var otherOpts = _objectWithoutPropertiesLoose(opts, _excluded2);\n if (!forceSimple || Object.keys(otherOpts).length > 0) {\n var intlOpts = _extends({\n useGrouping: false\n }, opts);\n if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;\n this.inf = getCachedINF(intl, intlOpts);\n }\n }\n var _proto = PolyNumberFormatter.prototype;\n _proto.format = function format(i) {\n if (this.inf) {\n var fixed = this.floor ? Math.floor(i) : i;\n return this.inf.format(fixed);\n } else {\n // to match the browser's numberformatter defaults\n var _fixed = this.floor ? Math.floor(i) : roundTo(i, 3);\n return padStart(_fixed, this.padTo);\n }\n };\n return PolyNumberFormatter;\n}();\n/**\n * @private\n */\nvar PolyDateFormatter = /*#__PURE__*/function () {\n function PolyDateFormatter(dt, intl, opts) {\n this.opts = opts;\n this.originalZone = undefined;\n var z = undefined;\n if (this.opts.timeZone) {\n // Don't apply any workarounds if a timeZone is explicitly provided in opts\n this.dt = dt;\n } else if (dt.zone.type === \"fixed\") {\n // UTC-8 or Etc/UTC-8 are not part of tzdata, only Etc/GMT+8 and the like.\n // That is why fixed-offset TZ is set to that unless it is:\n // 1. Representing offset 0 when UTC is used to maintain previous behavior and does not become GMT.\n // 2. Unsupported by the browser:\n // - some do not support Etc/\n // - < Etc/GMT-14, > Etc/GMT+12, and 30-minute or 45-minute offsets are not part of tzdata\n var gmtOffset = -1 * (dt.offset / 60);\n var offsetZ = gmtOffset >= 0 ? \"Etc/GMT+\" + gmtOffset : \"Etc/GMT\" + gmtOffset;\n if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {\n z = offsetZ;\n this.dt = dt;\n } else {\n // Not all fixed-offset zones like Etc/+4:30 are present in tzdata so\n // we manually apply the offset and substitute the zone as needed.\n z = \"UTC\";\n this.dt = dt.offset === 0 ? dt : dt.setZone(\"UTC\").plus({\n minutes: dt.offset\n });\n this.originalZone = dt.zone;\n }\n } else if (dt.zone.type === \"system\") {\n this.dt = dt;\n } else if (dt.zone.type === \"iana\") {\n this.dt = dt;\n z = dt.zone.name;\n } else {\n // Custom zones can have any offset / offsetName so we just manually\n // apply the offset and substitute the zone as needed.\n z = \"UTC\";\n this.dt = dt.setZone(\"UTC\").plus({\n minutes: dt.offset\n });\n this.originalZone = dt.zone;\n }\n var intlOpts = _extends({}, this.opts);\n intlOpts.timeZone = intlOpts.timeZone || z;\n this.dtf = getCachedDTF(intl, intlOpts);\n }\n var _proto2 = PolyDateFormatter.prototype;\n _proto2.format = function format() {\n if (this.originalZone) {\n // If we have to substitute in the actual zone name, we have to use\n // formatToParts so that the timezone can be replaced.\n return this.formatToParts().map(function (_ref) {\n var value = _ref.value;\n return value;\n }).join(\"\");\n }\n return this.dtf.format(this.dt.toJSDate());\n };\n _proto2.formatToParts = function formatToParts() {\n var _this = this;\n var parts = this.dtf.formatToParts(this.dt.toJSDate());\n if (this.originalZone) {\n return parts.map(function (part) {\n if (part.type === \"timeZoneName\") {\n var offsetName = _this.originalZone.offsetName(_this.dt.ts, {\n locale: _this.dt.locale,\n format: _this.opts.timeZoneName\n });\n return _extends({}, part, {\n value: offsetName\n });\n } else {\n return part;\n }\n });\n }\n return parts;\n };\n _proto2.resolvedOptions = function resolvedOptions() {\n return this.dtf.resolvedOptions();\n };\n return PolyDateFormatter;\n}();\n/**\n * @private\n */\nvar PolyRelFormatter = /*#__PURE__*/function () {\n function PolyRelFormatter(intl, isEnglish, opts) {\n this.opts = _extends({\n style: \"long\"\n }, opts);\n if (!isEnglish && hasRelative()) {\n this.rtf = getCachedRTF(intl, opts);\n }\n }\n var _proto3 = PolyRelFormatter.prototype;\n _proto3.format = function format(count, unit) {\n if (this.rtf) {\n return this.rtf.format(count, unit);\n } else {\n return formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== \"long\");\n }\n };\n _proto3.formatToParts = function formatToParts(count, unit) {\n if (this.rtf) {\n return this.rtf.formatToParts(count, unit);\n } else {\n return [];\n }\n };\n return PolyRelFormatter;\n}();\nvar fallbackWeekSettings = {\n firstDay: 1,\n minimalDays: 4,\n weekend: [6, 7]\n};\n\n/**\n * @private\n */\nvar Locale = /*#__PURE__*/function () {\n Locale.fromOpts = function fromOpts(opts) {\n return Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.weekSettings, opts.defaultToEN);\n };\n Locale.create = function create(locale, numberingSystem, outputCalendar, weekSettings, defaultToEN) {\n if (defaultToEN === void 0) {\n defaultToEN = false;\n }\n var specifiedLocale = locale || Settings.defaultLocale;\n // the system locale is useful for human readable strings but annoying for parsing/formatting known formats\n var localeR = specifiedLocale || (defaultToEN ? \"en-US\" : systemLocale());\n var numberingSystemR = numberingSystem || Settings.defaultNumberingSystem;\n var outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;\n var weekSettingsR = validateWeekSettings(weekSettings) || Settings.defaultWeekSettings;\n return new Locale(localeR, numberingSystemR, outputCalendarR, weekSettingsR, specifiedLocale);\n };\n Locale.resetCache = function resetCache() {\n sysLocaleCache = null;\n intlDTCache = {};\n intlNumCache = {};\n intlRelCache = {};\n };\n Locale.fromObject = function fromObject(_temp) {\n var _ref2 = _temp === void 0 ? {} : _temp,\n locale = _ref2.locale,\n numberingSystem = _ref2.numberingSystem,\n outputCalendar = _ref2.outputCalendar,\n weekSettings = _ref2.weekSettings;\n return Locale.create(locale, numberingSystem, outputCalendar, weekSettings);\n };\n function Locale(locale, numbering, outputCalendar, weekSettings, specifiedLocale) {\n var _parseLocaleString = parseLocaleString(locale),\n parsedLocale = _parseLocaleString[0],\n parsedNumberingSystem = _parseLocaleString[1],\n parsedOutputCalendar = _parseLocaleString[2];\n this.locale = parsedLocale;\n this.numberingSystem = numbering || parsedNumberingSystem || null;\n this.outputCalendar = outputCalendar || parsedOutputCalendar || null;\n this.weekSettings = weekSettings;\n this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar);\n this.weekdaysCache = {\n format: {},\n standalone: {}\n };\n this.monthsCache = {\n format: {},\n standalone: {}\n };\n this.meridiemCache = null;\n this.eraCache = {};\n this.specifiedLocale = specifiedLocale;\n this.fastNumbersCached = null;\n }\n var _proto4 = Locale.prototype;\n _proto4.listingMode = function listingMode() {\n var isActuallyEn = this.isEnglish();\n var hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === \"latn\") && (this.outputCalendar === null || this.outputCalendar === \"gregory\");\n return isActuallyEn && hasNoWeirdness ? \"en\" : \"intl\";\n };\n _proto4.clone = function clone(alts) {\n if (!alts || Object.getOwnPropertyNames(alts).length === 0) {\n return this;\n } else {\n return Locale.create(alts.locale || this.specifiedLocale, alts.numberingSystem || this.numberingSystem, alts.outputCalendar || this.outputCalendar, validateWeekSettings(alts.weekSettings) || this.weekSettings, alts.defaultToEN || false);\n }\n };\n _proto4.redefaultToEN = function redefaultToEN(alts) {\n if (alts === void 0) {\n alts = {};\n }\n return this.clone(_extends({}, alts, {\n defaultToEN: true\n }));\n };\n _proto4.redefaultToSystem = function redefaultToSystem(alts) {\n if (alts === void 0) {\n alts = {};\n }\n return this.clone(_extends({}, alts, {\n defaultToEN: false\n }));\n };\n _proto4.months = function months$1(length, format) {\n var _this2 = this;\n if (format === void 0) {\n format = false;\n }\n return listStuff(this, length, months, function () {\n var intl = format ? {\n month: length,\n day: \"numeric\"\n } : {\n month: length\n },\n formatStr = format ? \"format\" : \"standalone\";\n if (!_this2.monthsCache[formatStr][length]) {\n _this2.monthsCache[formatStr][length] = mapMonths(function (dt) {\n return _this2.extract(dt, intl, \"month\");\n });\n }\n return _this2.monthsCache[formatStr][length];\n });\n };\n _proto4.weekdays = function weekdays$1(length, format) {\n var _this3 = this;\n if (format === void 0) {\n format = false;\n }\n return listStuff(this, length, weekdays, function () {\n var intl = format ? {\n weekday: length,\n year: \"numeric\",\n month: \"long\",\n day: \"numeric\"\n } : {\n weekday: length\n },\n formatStr = format ? \"format\" : \"standalone\";\n if (!_this3.weekdaysCache[formatStr][length]) {\n _this3.weekdaysCache[formatStr][length] = mapWeekdays(function (dt) {\n return _this3.extract(dt, intl, \"weekday\");\n });\n }\n return _this3.weekdaysCache[formatStr][length];\n });\n };\n _proto4.meridiems = function meridiems$1() {\n var _this4 = this;\n return listStuff(this, undefined, function () {\n return meridiems;\n }, function () {\n // In theory there could be aribitrary day periods. We're gonna assume there are exactly two\n // for AM and PM. This is probably wrong, but it's makes parsing way easier.\n if (!_this4.meridiemCache) {\n var intl = {\n hour: \"numeric\",\n hourCycle: \"h12\"\n };\n _this4.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(function (dt) {\n return _this4.extract(dt, intl, \"dayperiod\");\n });\n }\n return _this4.meridiemCache;\n });\n };\n _proto4.eras = function eras$1(length) {\n var _this5 = this;\n return listStuff(this, length, eras, function () {\n var intl = {\n era: length\n };\n\n // This is problematic. Different calendars are going to define eras totally differently. What I need is the minimum set of dates\n // to definitely enumerate them.\n if (!_this5.eraCache[length]) {\n _this5.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map(function (dt) {\n return _this5.extract(dt, intl, \"era\");\n });\n }\n return _this5.eraCache[length];\n });\n };\n _proto4.extract = function extract(dt, intlOpts, field) {\n var df = this.dtFormatter(dt, intlOpts),\n results = df.formatToParts(),\n matching = results.find(function (m) {\n return m.type.toLowerCase() === field;\n });\n return matching ? matching.value : null;\n };\n _proto4.numberFormatter = function numberFormatter(opts) {\n if (opts === void 0) {\n opts = {};\n }\n // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave)\n // (in contrast, the rest of the condition is used heavily)\n return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts);\n };\n _proto4.dtFormatter = function dtFormatter(dt, intlOpts) {\n if (intlOpts === void 0) {\n intlOpts = {};\n }\n return new PolyDateFormatter(dt, this.intl, intlOpts);\n };\n _proto4.relFormatter = function relFormatter(opts) {\n if (opts === void 0) {\n opts = {};\n }\n return new PolyRelFormatter(this.intl, this.isEnglish(), opts);\n };\n _proto4.listFormatter = function listFormatter(opts) {\n if (opts === void 0) {\n opts = {};\n }\n return getCachedLF(this.intl, opts);\n };\n _proto4.isEnglish = function isEnglish() {\n return this.locale === \"en\" || this.locale.toLowerCase() === \"en-us\" || new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith(\"en-us\");\n };\n _proto4.getWeekSettings = function getWeekSettings() {\n if (this.weekSettings) {\n return this.weekSettings;\n } else if (!hasLocaleWeekInfo()) {\n return fallbackWeekSettings;\n } else {\n return getCachedWeekInfo(this.locale);\n }\n };\n _proto4.getStartOfWeek = function getStartOfWeek() {\n return this.getWeekSettings().firstDay;\n };\n _proto4.getMinDaysInFirstWeek = function getMinDaysInFirstWeek() {\n return this.getWeekSettings().minimalDays;\n };\n _proto4.getWeekendDays = function getWeekendDays() {\n return this.getWeekSettings().weekend;\n };\n _proto4.equals = function equals(other) {\n return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar;\n };\n _createClass(Locale, [{\n key: \"fastNumbers\",\n get: function get() {\n if (this.fastNumbersCached == null) {\n this.fastNumbersCached = supportsFastNumbers(this);\n }\n return this.fastNumbersCached;\n }\n }]);\n return Locale;\n}();\n\nvar singleton = null;\n\n/**\n * A zone with a fixed offset (meaning no DST)\n * @implements {Zone}\n */\nvar FixedOffsetZone = /*#__PURE__*/function (_Zone) {\n _inheritsLoose(FixedOffsetZone, _Zone);\n /**\n * Get an instance with a specified offset\n * @param {number} offset - The offset in minutes\n * @return {FixedOffsetZone}\n */\n FixedOffsetZone.instance = function instance(offset) {\n return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset);\n }\n\n /**\n * Get an instance of FixedOffsetZone from a UTC offset string, like \"UTC+6\"\n * @param {string} s - The offset string to parse\n * @example FixedOffsetZone.parseSpecifier(\"UTC+6\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC+06\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC-6:00\")\n * @return {FixedOffsetZone}\n */;\n FixedOffsetZone.parseSpecifier = function parseSpecifier(s) {\n if (s) {\n var r = s.match(/^utc(?:([+-]\\d{1,2})(?::(\\d{2}))?)?$/i);\n if (r) {\n return new FixedOffsetZone(signedOffset(r[1], r[2]));\n }\n }\n return null;\n };\n function FixedOffsetZone(offset) {\n var _this;\n _this = _Zone.call(this) || this;\n /** @private **/\n _this.fixed = offset;\n return _this;\n }\n\n /** @override **/\n var _proto = FixedOffsetZone.prototype;\n /** @override **/\n _proto.offsetName = function offsetName() {\n return this.name;\n }\n\n /** @override **/;\n _proto.formatOffset = function formatOffset$1(ts, format) {\n return formatOffset(this.fixed, format);\n }\n\n /** @override **/;\n /** @override **/\n _proto.offset = function offset() {\n return this.fixed;\n }\n\n /** @override **/;\n _proto.equals = function equals(otherZone) {\n return otherZone.type === \"fixed\" && otherZone.fixed === this.fixed;\n }\n\n /** @override **/;\n _createClass(FixedOffsetZone, [{\n key: \"type\",\n get: function get() {\n return \"fixed\";\n }\n\n /** @override **/\n }, {\n key: \"name\",\n get: function get() {\n return this.fixed === 0 ? \"UTC\" : \"UTC\" + formatOffset(this.fixed, \"narrow\");\n }\n }, {\n key: \"ianaName\",\n get: function get() {\n if (this.fixed === 0) {\n return \"Etc/UTC\";\n } else {\n return \"Etc/GMT\" + formatOffset(-this.fixed, \"narrow\");\n }\n }\n }, {\n key: \"isUniversal\",\n get: function get() {\n return true;\n }\n }, {\n key: \"isValid\",\n get: function get() {\n return true;\n }\n }], [{\n key: \"utcInstance\",\n get:\n /**\n * Get a singleton instance of UTC\n * @return {FixedOffsetZone}\n */\n function get() {\n if (singleton === null) {\n singleton = new FixedOffsetZone(0);\n }\n return singleton;\n }\n }]);\n return FixedOffsetZone;\n}(Zone);\n\n/**\n * A zone that failed to parse. You should never need to instantiate this.\n * @implements {Zone}\n */\nvar InvalidZone = /*#__PURE__*/function (_Zone) {\n _inheritsLoose(InvalidZone, _Zone);\n function InvalidZone(zoneName) {\n var _this;\n _this = _Zone.call(this) || this;\n /** @private */\n _this.zoneName = zoneName;\n return _this;\n }\n\n /** @override **/\n var _proto = InvalidZone.prototype;\n /** @override **/\n _proto.offsetName = function offsetName() {\n return null;\n }\n\n /** @override **/;\n _proto.formatOffset = function formatOffset() {\n return \"\";\n }\n\n /** @override **/;\n _proto.offset = function offset() {\n return NaN;\n }\n\n /** @override **/;\n _proto.equals = function equals() {\n return false;\n }\n\n /** @override **/;\n _createClass(InvalidZone, [{\n key: \"type\",\n get: function get() {\n return \"invalid\";\n }\n\n /** @override **/\n }, {\n key: \"name\",\n get: function get() {\n return this.zoneName;\n }\n\n /** @override **/\n }, {\n key: \"isUniversal\",\n get: function get() {\n return false;\n }\n }, {\n key: \"isValid\",\n get: function get() {\n return false;\n }\n }]);\n return InvalidZone;\n}(Zone);\n\n/**\n * @private\n */\nfunction normalizeZone(input, defaultZone) {\n if (isUndefined(input) || input === null) {\n return defaultZone;\n } else if (input instanceof Zone) {\n return input;\n } else if (isString(input)) {\n var lowered = input.toLowerCase();\n if (lowered === \"default\") return defaultZone;else if (lowered === \"local\" || lowered === \"system\") return SystemZone.instance;else if (lowered === \"utc\" || lowered === \"gmt\") return FixedOffsetZone.utcInstance;else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input);\n } else if (isNumber(input)) {\n return FixedOffsetZone.instance(input);\n } else if (typeof input === \"object\" && \"offset\" in input && typeof input.offset === \"function\") {\n // This is dumb, but the instanceof check above doesn't seem to really work\n // so we're duck checking it\n return input;\n } else {\n return new InvalidZone(input);\n }\n}\n\nvar now = function now() {\n return Date.now();\n },\n defaultZone = \"system\",\n defaultLocale = null,\n defaultNumberingSystem = null,\n defaultOutputCalendar = null,\n twoDigitCutoffYear = 60,\n throwOnInvalid,\n defaultWeekSettings = null;\n\n/**\n * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here.\n */\nvar Settings = /*#__PURE__*/function () {\n function Settings() {}\n /**\n * Reset Luxon's global caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n Settings.resetCaches = function resetCaches() {\n Locale.resetCache();\n IANAZone.resetCache();\n };\n _createClass(Settings, null, [{\n key: \"now\",\n get:\n /**\n * Get the callback for returning the current timestamp.\n * @type {function}\n */\n function get() {\n return now;\n }\n\n /**\n * Set the callback for returning the current timestamp.\n * The function should return a number, which will be interpreted as an Epoch millisecond count\n * @type {function}\n * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future\n * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time\n */,\n set: function set(n) {\n now = n;\n }\n\n /**\n * Set the default time zone to create DateTimes in. Does not affect existing instances.\n * Use the value \"system\" to reset this value to the system's time zone.\n * @type {string}\n */\n }, {\n key: \"defaultZone\",\n get:\n /**\n * Get the default time zone object currently used to create DateTimes. Does not affect existing instances.\n * The default value is the system's time zone (the one set on the machine that runs this code).\n * @type {Zone}\n */\n function get() {\n return normalizeZone(defaultZone, SystemZone.instance);\n }\n\n /**\n * Get the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */,\n set: function set(zone) {\n defaultZone = zone;\n }\n }, {\n key: \"defaultLocale\",\n get: function get() {\n return defaultLocale;\n }\n\n /**\n * Set the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */,\n set: function set(locale) {\n defaultLocale = locale;\n }\n\n /**\n * Get the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n }, {\n key: \"defaultNumberingSystem\",\n get: function get() {\n return defaultNumberingSystem;\n }\n\n /**\n * Set the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */,\n set: function set(numberingSystem) {\n defaultNumberingSystem = numberingSystem;\n }\n\n /**\n * Get the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n }, {\n key: \"defaultOutputCalendar\",\n get: function get() {\n return defaultOutputCalendar;\n }\n\n /**\n * Set the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */,\n set: function set(outputCalendar) {\n defaultOutputCalendar = outputCalendar;\n }\n\n /**\n * @typedef {Object} WeekSettings\n * @property {number} firstDay\n * @property {number} minimalDays\n * @property {number[]} weekend\n */\n\n /**\n * @return {WeekSettings|null}\n */\n }, {\n key: \"defaultWeekSettings\",\n get: function get() {\n return defaultWeekSettings;\n }\n\n /**\n * Allows overriding the default locale week settings, i.e. the start of the week, the weekend and\n * how many days are required in the first week of a year.\n * Does not affect existing instances.\n *\n * @param {WeekSettings|null} weekSettings\n */,\n set: function set(weekSettings) {\n defaultWeekSettings = validateWeekSettings(weekSettings);\n }\n\n /**\n * Get the cutoff year after which a string encoding a year as two digits is interpreted to occur in the current century.\n * @type {number}\n */\n }, {\n key: \"twoDigitCutoffYear\",\n get: function get() {\n return twoDigitCutoffYear;\n }\n\n /**\n * Set the cutoff year after which a string encoding a year as two digits is interpreted to occur in the current century.\n * @type {number}\n * @example Settings.twoDigitCutoffYear = 0 // cut-off year is 0, so all 'yy' are interpreted as current century\n * @example Settings.twoDigitCutoffYear = 50 // '49' -> 1949; '50' -> 2050\n * @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50\n * @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50\n */,\n set: function set(cutoffYear) {\n twoDigitCutoffYear = cutoffYear % 100;\n }\n\n /**\n * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n }, {\n key: \"throwOnInvalid\",\n get: function get() {\n return throwOnInvalid;\n }\n\n /**\n * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */,\n set: function set(t) {\n throwOnInvalid = t;\n }\n }]);\n return Settings;\n}();\n\nvar Invalid = /*#__PURE__*/function () {\n function Invalid(reason, explanation) {\n this.reason = reason;\n this.explanation = explanation;\n }\n var _proto = Invalid.prototype;\n _proto.toMessage = function toMessage() {\n if (this.explanation) {\n return this.reason + \": \" + this.explanation;\n } else {\n return this.reason;\n }\n };\n return Invalid;\n}();\n\nvar nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],\n leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\nfunction unitOutOfRange(unit, value) {\n return new Invalid(\"unit out of range\", \"you specified \" + value + \" (of type \" + typeof value + \") as a \" + unit + \", which is invalid\");\n}\nfunction dayOfWeek(year, month, day) {\n var d = new Date(Date.UTC(year, month - 1, day));\n if (year < 100 && year >= 0) {\n d.setUTCFullYear(d.getUTCFullYear() - 1900);\n }\n var js = d.getUTCDay();\n return js === 0 ? 7 : js;\n}\nfunction computeOrdinal(year, month, day) {\n return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1];\n}\nfunction uncomputeOrdinal(year, ordinal) {\n var table = isLeapYear(year) ? leapLadder : nonLeapLadder,\n month0 = table.findIndex(function (i) {\n return i < ordinal;\n }),\n day = ordinal - table[month0];\n return {\n month: month0 + 1,\n day: day\n };\n}\nfunction isoWeekdayToLocal(isoWeekday, startOfWeek) {\n return (isoWeekday - startOfWeek + 7) % 7 + 1;\n}\n\n/**\n * @private\n */\n\nfunction gregorianToWeek(gregObj, minDaysInFirstWeek, startOfWeek) {\n if (minDaysInFirstWeek === void 0) {\n minDaysInFirstWeek = 4;\n }\n if (startOfWeek === void 0) {\n startOfWeek = 1;\n }\n var year = gregObj.year,\n month = gregObj.month,\n day = gregObj.day,\n ordinal = computeOrdinal(year, month, day),\n weekday = isoWeekdayToLocal(dayOfWeek(year, month, day), startOfWeek);\n var weekNumber = Math.floor((ordinal - weekday + 14 - minDaysInFirstWeek) / 7),\n weekYear;\n if (weekNumber < 1) {\n weekYear = year - 1;\n weekNumber = weeksInWeekYear(weekYear, minDaysInFirstWeek, startOfWeek);\n } else if (weekNumber > weeksInWeekYear(year, minDaysInFirstWeek, startOfWeek)) {\n weekYear = year + 1;\n weekNumber = 1;\n } else {\n weekYear = year;\n }\n return _extends({\n weekYear: weekYear,\n weekNumber: weekNumber,\n weekday: weekday\n }, timeObject(gregObj));\n}\nfunction weekToGregorian(weekData, minDaysInFirstWeek, startOfWeek) {\n if (minDaysInFirstWeek === void 0) {\n minDaysInFirstWeek = 4;\n }\n if (startOfWeek === void 0) {\n startOfWeek = 1;\n }\n var weekYear = weekData.weekYear,\n weekNumber = weekData.weekNumber,\n weekday = weekData.weekday,\n weekdayOfJan4 = isoWeekdayToLocal(dayOfWeek(weekYear, 1, minDaysInFirstWeek), startOfWeek),\n yearInDays = daysInYear(weekYear);\n var ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 7 + minDaysInFirstWeek,\n year;\n if (ordinal < 1) {\n year = weekYear - 1;\n ordinal += daysInYear(year);\n } else if (ordinal > yearInDays) {\n year = weekYear + 1;\n ordinal -= daysInYear(weekYear);\n } else {\n year = weekYear;\n }\n var _uncomputeOrdinal = uncomputeOrdinal(year, ordinal),\n month = _uncomputeOrdinal.month,\n day = _uncomputeOrdinal.day;\n return _extends({\n year: year,\n month: month,\n day: day\n }, timeObject(weekData));\n}\nfunction gregorianToOrdinal(gregData) {\n var year = gregData.year,\n month = gregData.month,\n day = gregData.day;\n var ordinal = computeOrdinal(year, month, day);\n return _extends({\n year: year,\n ordinal: ordinal\n }, timeObject(gregData));\n}\nfunction ordinalToGregorian(ordinalData) {\n var year = ordinalData.year,\n ordinal = ordinalData.ordinal;\n var _uncomputeOrdinal2 = uncomputeOrdinal(year, ordinal),\n month = _uncomputeOrdinal2.month,\n day = _uncomputeOrdinal2.day;\n return _extends({\n year: year,\n month: month,\n day: day\n }, timeObject(ordinalData));\n}\n\n/**\n * Check if local week units like localWeekday are used in obj.\n * If so, validates that they are not mixed with ISO week units and then copies them to the normal week unit properties.\n * Modifies obj in-place!\n * @param obj the object values\n */\nfunction usesLocalWeekValues(obj, loc) {\n var hasLocaleWeekData = !isUndefined(obj.localWeekday) || !isUndefined(obj.localWeekNumber) || !isUndefined(obj.localWeekYear);\n if (hasLocaleWeekData) {\n var hasIsoWeekData = !isUndefined(obj.weekday) || !isUndefined(obj.weekNumber) || !isUndefined(obj.weekYear);\n if (hasIsoWeekData) {\n throw new ConflictingSpecificationError(\"Cannot mix locale-based week fields with ISO-based week fields\");\n }\n if (!isUndefined(obj.localWeekday)) obj.weekday = obj.localWeekday;\n if (!isUndefined(obj.localWeekNumber)) obj.weekNumber = obj.localWeekNumber;\n if (!isUndefined(obj.localWeekYear)) obj.weekYear = obj.localWeekYear;\n delete obj.localWeekday;\n delete obj.localWeekNumber;\n delete obj.localWeekYear;\n return {\n minDaysInFirstWeek: loc.getMinDaysInFirstWeek(),\n startOfWeek: loc.getStartOfWeek()\n };\n } else {\n return {\n minDaysInFirstWeek: 4,\n startOfWeek: 1\n };\n }\n}\nfunction hasInvalidWeekData(obj, minDaysInFirstWeek, startOfWeek) {\n if (minDaysInFirstWeek === void 0) {\n minDaysInFirstWeek = 4;\n }\n if (startOfWeek === void 0) {\n startOfWeek = 1;\n }\n var validYear = isInteger(obj.weekYear),\n validWeek = integerBetween(obj.weekNumber, 1, weeksInWeekYear(obj.weekYear, minDaysInFirstWeek, startOfWeek)),\n validWeekday = integerBetween(obj.weekday, 1, 7);\n if (!validYear) {\n return unitOutOfRange(\"weekYear\", obj.weekYear);\n } else if (!validWeek) {\n return unitOutOfRange(\"week\", obj.weekNumber);\n } else if (!validWeekday) {\n return unitOutOfRange(\"weekday\", obj.weekday);\n } else return false;\n}\nfunction hasInvalidOrdinalData(obj) {\n var validYear = isInteger(obj.year),\n validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year));\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validOrdinal) {\n return unitOutOfRange(\"ordinal\", obj.ordinal);\n } else return false;\n}\nfunction hasInvalidGregorianData(obj) {\n var validYear = isInteger(obj.year),\n validMonth = integerBetween(obj.month, 1, 12),\n validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month));\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validMonth) {\n return unitOutOfRange(\"month\", obj.month);\n } else if (!validDay) {\n return unitOutOfRange(\"day\", obj.day);\n } else return false;\n}\nfunction hasInvalidTimeData(obj) {\n var hour = obj.hour,\n minute = obj.minute,\n second = obj.second,\n millisecond = obj.millisecond;\n var validHour = integerBetween(hour, 0, 23) || hour === 24 && minute === 0 && second === 0 && millisecond === 0,\n validMinute = integerBetween(minute, 0, 59),\n validSecond = integerBetween(second, 0, 59),\n validMillisecond = integerBetween(millisecond, 0, 999);\n if (!validHour) {\n return unitOutOfRange(\"hour\", hour);\n } else if (!validMinute) {\n return unitOutOfRange(\"minute\", minute);\n } else if (!validSecond) {\n return unitOutOfRange(\"second\", second);\n } else if (!validMillisecond) {\n return unitOutOfRange(\"millisecond\", millisecond);\n } else return false;\n}\n\n/**\n * @private\n */\n\n// TYPES\n\nfunction isUndefined(o) {\n return typeof o === \"undefined\";\n}\nfunction isNumber(o) {\n return typeof o === \"number\";\n}\nfunction isInteger(o) {\n return typeof o === \"number\" && o % 1 === 0;\n}\nfunction isString(o) {\n return typeof o === \"string\";\n}\nfunction isDate(o) {\n return Object.prototype.toString.call(o) === \"[object Date]\";\n}\n\n// CAPABILITIES\n\nfunction hasRelative() {\n try {\n return typeof Intl !== \"undefined\" && !!Intl.RelativeTimeFormat;\n } catch (e) {\n return false;\n }\n}\nfunction hasLocaleWeekInfo() {\n try {\n return typeof Intl !== \"undefined\" && !!Intl.Locale && (\"weekInfo\" in Intl.Locale.prototype || \"getWeekInfo\" in Intl.Locale.prototype);\n } catch (e) {\n return false;\n }\n}\n\n// OBJECTS AND ARRAYS\n\nfunction maybeArray(thing) {\n return Array.isArray(thing) ? thing : [thing];\n}\nfunction bestBy(arr, by, compare) {\n if (arr.length === 0) {\n return undefined;\n }\n return arr.reduce(function (best, next) {\n var pair = [by(next), next];\n if (!best) {\n return pair;\n } else if (compare(best[0], pair[0]) === best[0]) {\n return best;\n } else {\n return pair;\n }\n }, null)[1];\n}\nfunction pick(obj, keys) {\n return keys.reduce(function (a, k) {\n a[k] = obj[k];\n return a;\n }, {});\n}\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nfunction validateWeekSettings(settings) {\n if (settings == null) {\n return null;\n } else if (typeof settings !== \"object\") {\n throw new InvalidArgumentError(\"Week settings must be an object\");\n } else {\n if (!integerBetween(settings.firstDay, 1, 7) || !integerBetween(settings.minimalDays, 1, 7) || !Array.isArray(settings.weekend) || settings.weekend.some(function (v) {\n return !integerBetween(v, 1, 7);\n })) {\n throw new InvalidArgumentError(\"Invalid week settings\");\n }\n return {\n firstDay: settings.firstDay,\n minimalDays: settings.minimalDays,\n weekend: Array.from(settings.weekend)\n };\n }\n}\n\n// NUMBERS AND STRINGS\n\nfunction integerBetween(thing, bottom, top) {\n return isInteger(thing) && thing >= bottom && thing <= top;\n}\n\n// x % n but takes the sign of n instead of x\nfunction floorMod(x, n) {\n return x - n * Math.floor(x / n);\n}\nfunction padStart(input, n) {\n if (n === void 0) {\n n = 2;\n }\n var isNeg = input < 0;\n var padded;\n if (isNeg) {\n padded = \"-\" + (\"\" + -input).padStart(n, \"0\");\n } else {\n padded = (\"\" + input).padStart(n, \"0\");\n }\n return padded;\n}\nfunction parseInteger(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseInt(string, 10);\n }\n}\nfunction parseFloating(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseFloat(string);\n }\n}\nfunction parseMillis(fraction) {\n // Return undefined (instead of 0) in these cases, where fraction is not set\n if (isUndefined(fraction) || fraction === null || fraction === \"\") {\n return undefined;\n } else {\n var f = parseFloat(\"0.\" + fraction) * 1000;\n return Math.floor(f);\n }\n}\nfunction roundTo(number, digits, towardZero) {\n if (towardZero === void 0) {\n towardZero = false;\n }\n var factor = Math.pow(10, digits),\n rounder = towardZero ? Math.trunc : Math.round;\n return rounder(number * factor) / factor;\n}\n\n// DATE BASICS\n\nfunction isLeapYear(year) {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\nfunction daysInMonth(year, month) {\n var modMonth = floorMod(month - 1, 12) + 1,\n modYear = year + (month - modMonth) / 12;\n if (modMonth === 2) {\n return isLeapYear(modYear) ? 29 : 28;\n } else {\n return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1];\n }\n}\n\n// convert a calendar object to a local timestamp (epoch, but with the offset baked in)\nfunction objToLocalTS(obj) {\n var d = Date.UTC(obj.year, obj.month - 1, obj.day, obj.hour, obj.minute, obj.second, obj.millisecond);\n\n // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that\n if (obj.year < 100 && obj.year >= 0) {\n d = new Date(d);\n // set the month and day again, this is necessary because year 2000 is a leap year, but year 100 is not\n // so if obj.year is in 99, but obj.day makes it roll over into year 100,\n // the calculations done by Date.UTC are using year 2000 - which is incorrect\n d.setUTCFullYear(obj.year, obj.month - 1, obj.day);\n }\n return +d;\n}\n\n// adapted from moment.js: https://github.com/moment/moment/blob/000ac1800e620f770f4eb31b5ae908f6167b0ab2/src/lib/units/week-calendar-utils.js\nfunction firstWeekOffset(year, minDaysInFirstWeek, startOfWeek) {\n var fwdlw = isoWeekdayToLocal(dayOfWeek(year, 1, minDaysInFirstWeek), startOfWeek);\n return -fwdlw + minDaysInFirstWeek - 1;\n}\nfunction weeksInWeekYear(weekYear, minDaysInFirstWeek, startOfWeek) {\n if (minDaysInFirstWeek === void 0) {\n minDaysInFirstWeek = 4;\n }\n if (startOfWeek === void 0) {\n startOfWeek = 1;\n }\n var weekOffset = firstWeekOffset(weekYear, minDaysInFirstWeek, startOfWeek);\n var weekOffsetNext = firstWeekOffset(weekYear + 1, minDaysInFirstWeek, startOfWeek);\n return (daysInYear(weekYear) - weekOffset + weekOffsetNext) / 7;\n}\nfunction untruncateYear(year) {\n if (year > 99) {\n return year;\n } else return year > Settings.twoDigitCutoffYear ? 1900 + year : 2000 + year;\n}\n\n// PARSING\n\nfunction parseZoneInfo(ts, offsetFormat, locale, timeZone) {\n if (timeZone === void 0) {\n timeZone = null;\n }\n var date = new Date(ts),\n intlOpts = {\n hourCycle: \"h23\",\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\"\n };\n if (timeZone) {\n intlOpts.timeZone = timeZone;\n }\n var modified = _extends({\n timeZoneName: offsetFormat\n }, intlOpts);\n var parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find(function (m) {\n return m.type.toLowerCase() === \"timezonename\";\n });\n return parsed ? parsed.value : null;\n}\n\n// signedOffset('-5', '30') -> -330\nfunction signedOffset(offHourStr, offMinuteStr) {\n var offHour = parseInt(offHourStr, 10);\n\n // don't || this because we want to preserve -0\n if (Number.isNaN(offHour)) {\n offHour = 0;\n }\n var offMin = parseInt(offMinuteStr, 10) || 0,\n offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;\n return offHour * 60 + offMinSigned;\n}\n\n// COERCION\n\nfunction asNumber(value) {\n var numericValue = Number(value);\n if (typeof value === \"boolean\" || value === \"\" || Number.isNaN(numericValue)) throw new InvalidArgumentError(\"Invalid unit value \" + value);\n return numericValue;\n}\nfunction normalizeObject(obj, normalizer) {\n var normalized = {};\n for (var u in obj) {\n if (hasOwnProperty(obj, u)) {\n var v = obj[u];\n if (v === undefined || v === null) continue;\n normalized[normalizer(u)] = asNumber(v);\n }\n }\n return normalized;\n}\nfunction formatOffset(offset, format) {\n var hours = Math.trunc(Math.abs(offset / 60)),\n minutes = Math.trunc(Math.abs(offset % 60)),\n sign = offset >= 0 ? \"+\" : \"-\";\n switch (format) {\n case \"short\":\n return \"\" + sign + padStart(hours, 2) + \":\" + padStart(minutes, 2);\n case \"narrow\":\n return \"\" + sign + hours + (minutes > 0 ? \":\" + minutes : \"\");\n case \"techie\":\n return \"\" + sign + padStart(hours, 2) + padStart(minutes, 2);\n default:\n throw new RangeError(\"Value format \" + format + \" is out of range for property format\");\n }\n}\nfunction timeObject(obj) {\n return pick(obj, [\"hour\", \"minute\", \"second\", \"millisecond\"]);\n}\n\n/**\n * @private\n */\n\nvar monthsLong = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\nvar monthsShort = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nvar monthsNarrow = [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"];\nfunction months(length) {\n switch (length) {\n case \"narrow\":\n return [].concat(monthsNarrow);\n case \"short\":\n return [].concat(monthsShort);\n case \"long\":\n return [].concat(monthsLong);\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\"];\n case \"2-digit\":\n return [\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\"];\n default:\n return null;\n }\n}\nvar weekdaysLong = [\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\"];\nvar weekdaysShort = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"];\nvar weekdaysNarrow = [\"M\", \"T\", \"W\", \"T\", \"F\", \"S\", \"S\"];\nfunction weekdays(length) {\n switch (length) {\n case \"narrow\":\n return [].concat(weekdaysNarrow);\n case \"short\":\n return [].concat(weekdaysShort);\n case \"long\":\n return [].concat(weekdaysLong);\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\"];\n default:\n return null;\n }\n}\nvar meridiems = [\"AM\", \"PM\"];\nvar erasLong = [\"Before Christ\", \"Anno Domini\"];\nvar erasShort = [\"BC\", \"AD\"];\nvar erasNarrow = [\"B\", \"A\"];\nfunction eras(length) {\n switch (length) {\n case \"narrow\":\n return [].concat(erasNarrow);\n case \"short\":\n return [].concat(erasShort);\n case \"long\":\n return [].concat(erasLong);\n default:\n return null;\n }\n}\nfunction meridiemForDateTime(dt) {\n return meridiems[dt.hour < 12 ? 0 : 1];\n}\nfunction weekdayForDateTime(dt, length) {\n return weekdays(length)[dt.weekday - 1];\n}\nfunction monthForDateTime(dt, length) {\n return months(length)[dt.month - 1];\n}\nfunction eraForDateTime(dt, length) {\n return eras(length)[dt.year < 0 ? 0 : 1];\n}\nfunction formatRelativeTime(unit, count, numeric, narrow) {\n if (numeric === void 0) {\n numeric = \"always\";\n }\n if (narrow === void 0) {\n narrow = false;\n }\n var units = {\n years: [\"year\", \"yr.\"],\n quarters: [\"quarter\", \"qtr.\"],\n months: [\"month\", \"mo.\"],\n weeks: [\"week\", \"wk.\"],\n days: [\"day\", \"day\", \"days\"],\n hours: [\"hour\", \"hr.\"],\n minutes: [\"minute\", \"min.\"],\n seconds: [\"second\", \"sec.\"]\n };\n var lastable = [\"hours\", \"minutes\", \"seconds\"].indexOf(unit) === -1;\n if (numeric === \"auto\" && lastable) {\n var isDay = unit === \"days\";\n switch (count) {\n case 1:\n return isDay ? \"tomorrow\" : \"next \" + units[unit][0];\n case -1:\n return isDay ? \"yesterday\" : \"last \" + units[unit][0];\n case 0:\n return isDay ? \"today\" : \"this \" + units[unit][0];\n }\n }\n\n var isInPast = Object.is(count, -0) || count < 0,\n fmtValue = Math.abs(count),\n singular = fmtValue === 1,\n lilUnits = units[unit],\n fmtUnit = narrow ? singular ? lilUnits[1] : lilUnits[2] || lilUnits[1] : singular ? units[unit][0] : unit;\n return isInPast ? fmtValue + \" \" + fmtUnit + \" ago\" : \"in \" + fmtValue + \" \" + fmtUnit;\n}\n\nfunction stringifyTokens(splits, tokenToString) {\n var s = \"\";\n for (var _iterator = _createForOfIteratorHelperLoose(splits), _step; !(_step = _iterator()).done;) {\n var token = _step.value;\n if (token.literal) {\n s += token.val;\n } else {\n s += tokenToString(token.val);\n }\n }\n return s;\n}\nvar _macroTokenToFormatOpts = {\n D: DATE_SHORT,\n DD: DATE_MED,\n DDD: DATE_FULL,\n DDDD: DATE_HUGE,\n t: TIME_SIMPLE,\n tt: TIME_WITH_SECONDS,\n ttt: TIME_WITH_SHORT_OFFSET,\n tttt: TIME_WITH_LONG_OFFSET,\n T: TIME_24_SIMPLE,\n TT: TIME_24_WITH_SECONDS,\n TTT: TIME_24_WITH_SHORT_OFFSET,\n TTTT: TIME_24_WITH_LONG_OFFSET,\n f: DATETIME_SHORT,\n ff: DATETIME_MED,\n fff: DATETIME_FULL,\n ffff: DATETIME_HUGE,\n F: DATETIME_SHORT_WITH_SECONDS,\n FF: DATETIME_MED_WITH_SECONDS,\n FFF: DATETIME_FULL_WITH_SECONDS,\n FFFF: DATETIME_HUGE_WITH_SECONDS\n};\n\n/**\n * @private\n */\nvar Formatter = /*#__PURE__*/function () {\n Formatter.create = function create(locale, opts) {\n if (opts === void 0) {\n opts = {};\n }\n return new Formatter(locale, opts);\n };\n Formatter.parseFormat = function parseFormat(fmt) {\n // white-space is always considered a literal in user-provided formats\n // the \" \" token has a special meaning (see unitForToken)\n\n var current = null,\n currentFull = \"\",\n bracketed = false;\n var splits = [];\n for (var i = 0; i < fmt.length; i++) {\n var c = fmt.charAt(i);\n if (c === \"'\") {\n if (currentFull.length > 0) {\n splits.push({\n literal: bracketed || /^\\s+$/.test(currentFull),\n val: currentFull\n });\n }\n current = null;\n currentFull = \"\";\n bracketed = !bracketed;\n } else if (bracketed) {\n currentFull += c;\n } else if (c === current) {\n currentFull += c;\n } else {\n if (currentFull.length > 0) {\n splits.push({\n literal: /^\\s+$/.test(currentFull),\n val: currentFull\n });\n }\n currentFull = c;\n current = c;\n }\n }\n if (currentFull.length > 0) {\n splits.push({\n literal: bracketed || /^\\s+$/.test(currentFull),\n val: currentFull\n });\n }\n return splits;\n };\n Formatter.macroTokenToFormatOpts = function macroTokenToFormatOpts(token) {\n return _macroTokenToFormatOpts[token];\n };\n function Formatter(locale, formatOpts) {\n this.opts = formatOpts;\n this.loc = locale;\n this.systemLoc = null;\n }\n var _proto = Formatter.prototype;\n _proto.formatWithSystemDefault = function formatWithSystemDefault(dt, opts) {\n if (this.systemLoc === null) {\n this.systemLoc = this.loc.redefaultToSystem();\n }\n var df = this.systemLoc.dtFormatter(dt, _extends({}, this.opts, opts));\n return df.format();\n };\n _proto.dtFormatter = function dtFormatter(dt, opts) {\n if (opts === void 0) {\n opts = {};\n }\n return this.loc.dtFormatter(dt, _extends({}, this.opts, opts));\n };\n _proto.formatDateTime = function formatDateTime(dt, opts) {\n return this.dtFormatter(dt, opts).format();\n };\n _proto.formatDateTimeParts = function formatDateTimeParts(dt, opts) {\n return this.dtFormatter(dt, opts).formatToParts();\n };\n _proto.formatInterval = function formatInterval(interval, opts) {\n var df = this.dtFormatter(interval.start, opts);\n return df.dtf.formatRange(interval.start.toJSDate(), interval.end.toJSDate());\n };\n _proto.resolvedOptions = function resolvedOptions(dt, opts) {\n return this.dtFormatter(dt, opts).resolvedOptions();\n };\n _proto.num = function num(n, p) {\n if (p === void 0) {\n p = 0;\n }\n // we get some perf out of doing this here, annoyingly\n if (this.opts.forceSimple) {\n return padStart(n, p);\n }\n var opts = _extends({}, this.opts);\n if (p > 0) {\n opts.padTo = p;\n }\n return this.loc.numberFormatter(opts).format(n);\n };\n _proto.formatDateTimeFromString = function formatDateTimeFromString(dt, fmt) {\n var _this = this;\n var knownEnglish = this.loc.listingMode() === \"en\",\n useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== \"gregory\",\n string = function string(opts, extract) {\n return _this.loc.extract(dt, opts, extract);\n },\n formatOffset = function formatOffset(opts) {\n if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) {\n return \"Z\";\n }\n return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : \"\";\n },\n meridiem = function meridiem() {\n return knownEnglish ? meridiemForDateTime(dt) : string({\n hour: \"numeric\",\n hourCycle: \"h12\"\n }, \"dayperiod\");\n },\n month = function month(length, standalone) {\n return knownEnglish ? monthForDateTime(dt, length) : string(standalone ? {\n month: length\n } : {\n month: length,\n day: \"numeric\"\n }, \"month\");\n },\n weekday = function weekday(length, standalone) {\n return knownEnglish ? weekdayForDateTime(dt, length) : string(standalone ? {\n weekday: length\n } : {\n weekday: length,\n month: \"long\",\n day: \"numeric\"\n }, \"weekday\");\n },\n maybeMacro = function maybeMacro(token) {\n var formatOpts = Formatter.macroTokenToFormatOpts(token);\n if (formatOpts) {\n return _this.formatWithSystemDefault(dt, formatOpts);\n } else {\n return token;\n }\n },\n era = function era(length) {\n return knownEnglish ? eraForDateTime(dt, length) : string({\n era: length\n }, \"era\");\n },\n tokenToString = function tokenToString(token) {\n // Where possible: https://cldr.unicode.org/translation/date-time/date-time-symbols\n switch (token) {\n // ms\n case \"S\":\n return _this.num(dt.millisecond);\n case \"u\":\n // falls through\n case \"SSS\":\n return _this.num(dt.millisecond, 3);\n // seconds\n case \"s\":\n return _this.num(dt.second);\n case \"ss\":\n return _this.num(dt.second, 2);\n // fractional seconds\n case \"uu\":\n return _this.num(Math.floor(dt.millisecond / 10), 2);\n case \"uuu\":\n return _this.num(Math.floor(dt.millisecond / 100));\n // minutes\n case \"m\":\n return _this.num(dt.minute);\n case \"mm\":\n return _this.num(dt.minute, 2);\n // hours\n case \"h\":\n return _this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);\n case \"hh\":\n return _this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);\n case \"H\":\n return _this.num(dt.hour);\n case \"HH\":\n return _this.num(dt.hour, 2);\n // offset\n case \"Z\":\n // like +6\n return formatOffset({\n format: \"narrow\",\n allowZ: _this.opts.allowZ\n });\n case \"ZZ\":\n // like +06:00\n return formatOffset({\n format: \"short\",\n allowZ: _this.opts.allowZ\n });\n case \"ZZZ\":\n // like +0600\n return formatOffset({\n format: \"techie\",\n allowZ: _this.opts.allowZ\n });\n case \"ZZZZ\":\n // like EST\n return dt.zone.offsetName(dt.ts, {\n format: \"short\",\n locale: _this.loc.locale\n });\n case \"ZZZZZ\":\n // like Eastern Standard Time\n return dt.zone.offsetName(dt.ts, {\n format: \"long\",\n locale: _this.loc.locale\n });\n // zone\n case \"z\":\n // like America/New_York\n return dt.zoneName;\n // meridiems\n case \"a\":\n return meridiem();\n // dates\n case \"d\":\n return useDateTimeFormatter ? string({\n day: \"numeric\"\n }, \"day\") : _this.num(dt.day);\n case \"dd\":\n return useDateTimeFormatter ? string({\n day: \"2-digit\"\n }, \"day\") : _this.num(dt.day, 2);\n // weekdays - standalone\n case \"c\":\n // like 1\n return _this.num(dt.weekday);\n case \"ccc\":\n // like 'Tues'\n return weekday(\"short\", true);\n case \"cccc\":\n // like 'Tuesday'\n return weekday(\"long\", true);\n case \"ccccc\":\n // like 'T'\n return weekday(\"narrow\", true);\n // weekdays - format\n case \"E\":\n // like 1\n return _this.num(dt.weekday);\n case \"EEE\":\n // like 'Tues'\n return weekday(\"short\", false);\n case \"EEEE\":\n // like 'Tuesday'\n return weekday(\"long\", false);\n case \"EEEEE\":\n // like 'T'\n return weekday(\"narrow\", false);\n // months - standalone\n case \"L\":\n // like 1\n return useDateTimeFormatter ? string({\n month: \"numeric\",\n day: \"numeric\"\n }, \"month\") : _this.num(dt.month);\n case \"LL\":\n // like 01, doesn't seem to work\n return useDateTimeFormatter ? string({\n month: \"2-digit\",\n day: \"numeric\"\n }, \"month\") : _this.num(dt.month, 2);\n case \"LLL\":\n // like Jan\n return month(\"short\", true);\n case \"LLLL\":\n // like January\n return month(\"long\", true);\n case \"LLLLL\":\n // like J\n return month(\"narrow\", true);\n // months - format\n case \"M\":\n // like 1\n return useDateTimeFormatter ? string({\n month: \"numeric\"\n }, \"month\") : _this.num(dt.month);\n case \"MM\":\n // like 01\n return useDateTimeFormatter ? string({\n month: \"2-digit\"\n }, \"month\") : _this.num(dt.month, 2);\n case \"MMM\":\n // like Jan\n return month(\"short\", false);\n case \"MMMM\":\n // like January\n return month(\"long\", false);\n case \"MMMMM\":\n // like J\n return month(\"narrow\", false);\n // years\n case \"y\":\n // like 2014\n return useDateTimeFormatter ? string({\n year: \"numeric\"\n }, \"year\") : _this.num(dt.year);\n case \"yy\":\n // like 14\n return useDateTimeFormatter ? string({\n year: \"2-digit\"\n }, \"year\") : _this.num(dt.year.toString().slice(-2), 2);\n case \"yyyy\":\n // like 0012\n return useDateTimeFormatter ? string({\n year: \"numeric\"\n }, \"year\") : _this.num(dt.year, 4);\n case \"yyyyyy\":\n // like 000012\n return useDateTimeFormatter ? string({\n year: \"numeric\"\n }, \"year\") : _this.num(dt.year, 6);\n // eras\n case \"G\":\n // like AD\n return era(\"short\");\n case \"GG\":\n // like Anno Domini\n return era(\"long\");\n case \"GGGGG\":\n return era(\"narrow\");\n case \"kk\":\n return _this.num(dt.weekYear.toString().slice(-2), 2);\n case \"kkkk\":\n return _this.num(dt.weekYear, 4);\n case \"W\":\n return _this.num(dt.weekNumber);\n case \"WW\":\n return _this.num(dt.weekNumber, 2);\n case \"n\":\n return _this.num(dt.localWeekNumber);\n case \"nn\":\n return _this.num(dt.localWeekNumber, 2);\n case \"ii\":\n return _this.num(dt.localWeekYear.toString().slice(-2), 2);\n case \"iiii\":\n return _this.num(dt.localWeekYear, 4);\n case \"o\":\n return _this.num(dt.ordinal);\n case \"ooo\":\n return _this.num(dt.ordinal, 3);\n case \"q\":\n // like 1\n return _this.num(dt.quarter);\n case \"qq\":\n // like 01\n return _this.num(dt.quarter, 2);\n case \"X\":\n return _this.num(Math.floor(dt.ts / 1000));\n case \"x\":\n return _this.num(dt.ts);\n default:\n return maybeMacro(token);\n }\n };\n return stringifyTokens(Formatter.parseFormat(fmt), tokenToString);\n };\n _proto.formatDurationFromString = function formatDurationFromString(dur, fmt) {\n var _this2 = this;\n var tokenToField = function tokenToField(token) {\n switch (token[0]) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"w\":\n return \"week\";\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n default:\n return null;\n }\n },\n tokenToString = function tokenToString(lildur) {\n return function (token) {\n var mapped = tokenToField(token);\n if (mapped) {\n return _this2.num(lildur.get(mapped), token.length);\n } else {\n return token;\n }\n };\n },\n tokens = Formatter.parseFormat(fmt),\n realTokens = tokens.reduce(function (found, _ref) {\n var literal = _ref.literal,\n val = _ref.val;\n return literal ? found : found.concat(val);\n }, []),\n collapsed = dur.shiftTo.apply(dur, realTokens.map(tokenToField).filter(function (t) {\n return t;\n }));\n return stringifyTokens(tokens, tokenToString(collapsed));\n };\n return Formatter;\n}();\n\n/*\n * This file handles parsing for well-specified formats. Here's how it works:\n * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match.\n * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object\n * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence.\n * Extractors can take a \"cursor\" representing the offset in the match to look at. This makes it easy to combine extractors.\n * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions.\n * Some extractions are super dumb and simpleParse and fromStrings help DRY them.\n */\n\nvar ianaRegex = /[A-Za-z_+-]{1,256}(?::?\\/[A-Za-z0-9_+-]{1,256}(?:\\/[A-Za-z0-9_+-]{1,256})?)?/;\nfunction combineRegexes() {\n for (var _len = arguments.length, regexes = new Array(_len), _key = 0; _key < _len; _key++) {\n regexes[_key] = arguments[_key];\n }\n var full = regexes.reduce(function (f, r) {\n return f + r.source;\n }, \"\");\n return RegExp(\"^\" + full + \"$\");\n}\nfunction combineExtractors() {\n for (var _len2 = arguments.length, extractors = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extractors[_key2] = arguments[_key2];\n }\n return function (m) {\n return extractors.reduce(function (_ref, ex) {\n var mergedVals = _ref[0],\n mergedZone = _ref[1],\n cursor = _ref[2];\n var _ex = ex(m, cursor),\n val = _ex[0],\n zone = _ex[1],\n next = _ex[2];\n return [_extends({}, mergedVals, val), zone || mergedZone, next];\n }, [{}, null, 1]).slice(0, 2);\n };\n}\nfunction parse(s) {\n if (s == null) {\n return [null, null];\n }\n for (var _len3 = arguments.length, patterns = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n patterns[_key3 - 1] = arguments[_key3];\n }\n for (var _i = 0, _patterns = patterns; _i < _patterns.length; _i++) {\n var _patterns$_i = _patterns[_i],\n regex = _patterns$_i[0],\n extractor = _patterns$_i[1];\n var m = regex.exec(s);\n if (m) {\n return extractor(m);\n }\n }\n return [null, null];\n}\nfunction simpleParse() {\n for (var _len4 = arguments.length, keys = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n keys[_key4] = arguments[_key4];\n }\n return function (match, cursor) {\n var ret = {};\n var i;\n for (i = 0; i < keys.length; i++) {\n ret[keys[i]] = parseInteger(match[cursor + i]);\n }\n return [ret, null, cursor + i];\n };\n}\n\n// ISO and SQL parsing\nvar offsetRegex = /(?:(Z)|([+-]\\d\\d)(?::?(\\d\\d))?)/;\nvar isoExtendedZone = \"(?:\" + offsetRegex.source + \"?(?:\\\\[(\" + ianaRegex.source + \")\\\\])?)?\";\nvar isoTimeBaseRegex = /(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d{1,30}))?)?)?/;\nvar isoTimeRegex = RegExp(\"\" + isoTimeBaseRegex.source + isoExtendedZone);\nvar isoTimeExtensionRegex = RegExp(\"(?:T\" + isoTimeRegex.source + \")?\");\nvar isoYmdRegex = /([+-]\\d{6}|\\d{4})(?:-?(\\d\\d)(?:-?(\\d\\d))?)?/;\nvar isoWeekRegex = /(\\d{4})-?W(\\d\\d)(?:-?(\\d))?/;\nvar isoOrdinalRegex = /(\\d{4})-?(\\d{3})/;\nvar extractISOWeekData = simpleParse(\"weekYear\", \"weekNumber\", \"weekDay\");\nvar extractISOOrdinalData = simpleParse(\"year\", \"ordinal\");\nvar sqlYmdRegex = /(\\d{4})-(\\d\\d)-(\\d\\d)/; // dumbed-down version of the ISO one\nvar sqlTimeRegex = RegExp(isoTimeBaseRegex.source + \" ?(?:\" + offsetRegex.source + \"|(\" + ianaRegex.source + \"))?\");\nvar sqlTimeExtensionRegex = RegExp(\"(?: \" + sqlTimeRegex.source + \")?\");\nfunction int(match, pos, fallback) {\n var m = match[pos];\n return isUndefined(m) ? fallback : parseInteger(m);\n}\nfunction extractISOYmd(match, cursor) {\n var item = {\n year: int(match, cursor),\n month: int(match, cursor + 1, 1),\n day: int(match, cursor + 2, 1)\n };\n return [item, null, cursor + 3];\n}\nfunction extractISOTime(match, cursor) {\n var item = {\n hours: int(match, cursor, 0),\n minutes: int(match, cursor + 1, 0),\n seconds: int(match, cursor + 2, 0),\n milliseconds: parseMillis(match[cursor + 3])\n };\n return [item, null, cursor + 4];\n}\nfunction extractISOOffset(match, cursor) {\n var local = !match[cursor] && !match[cursor + 1],\n fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]),\n zone = local ? null : FixedOffsetZone.instance(fullOffset);\n return [{}, zone, cursor + 3];\n}\nfunction extractIANAZone(match, cursor) {\n var zone = match[cursor] ? IANAZone.create(match[cursor]) : null;\n return [{}, zone, cursor + 1];\n}\n\n// ISO time parsing\n\nvar isoTimeOnly = RegExp(\"^T?\" + isoTimeBaseRegex.source + \"$\");\n\n// ISO duration parsing\n\nvar isoDuration = /^-?P(?:(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)Y)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)W)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)D)?(?:T(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)H)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20})(?:[.,](-?\\d{1,20}))?S)?)?)$/;\nfunction extractISODuration(match) {\n var s = match[0],\n yearStr = match[1],\n monthStr = match[2],\n weekStr = match[3],\n dayStr = match[4],\n hourStr = match[5],\n minuteStr = match[6],\n secondStr = match[7],\n millisecondsStr = match[8];\n var hasNegativePrefix = s[0] === \"-\";\n var negativeSeconds = secondStr && secondStr[0] === \"-\";\n var maybeNegate = function maybeNegate(num, force) {\n if (force === void 0) {\n force = false;\n }\n return num !== undefined && (force || num && hasNegativePrefix) ? -num : num;\n };\n return [{\n years: maybeNegate(parseFloating(yearStr)),\n months: maybeNegate(parseFloating(monthStr)),\n weeks: maybeNegate(parseFloating(weekStr)),\n days: maybeNegate(parseFloating(dayStr)),\n hours: maybeNegate(parseFloating(hourStr)),\n minutes: maybeNegate(parseFloating(minuteStr)),\n seconds: maybeNegate(parseFloating(secondStr), secondStr === \"-0\"),\n milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds)\n }];\n}\n\n// These are a little braindead. EDT *should* tell us that we're in, say, America/New_York\n// and not just that we're in -240 *right now*. But since I don't think these are used that often\n// I'm just going to ignore that\nvar obsOffsets = {\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n};\nfunction fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n var result = {\n year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr),\n month: monthsShort.indexOf(monthStr) + 1,\n day: parseInteger(dayStr),\n hour: parseInteger(hourStr),\n minute: parseInteger(minuteStr)\n };\n if (secondStr) result.second = parseInteger(secondStr);\n if (weekdayStr) {\n result.weekday = weekdayStr.length > 3 ? weekdaysLong.indexOf(weekdayStr) + 1 : weekdaysShort.indexOf(weekdayStr) + 1;\n }\n return result;\n}\n\n// RFC 2822/5322\nvar rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\\d\\d)(\\d\\d)))$/;\nfunction extractRFC2822(match) {\n var weekdayStr = match[1],\n dayStr = match[2],\n monthStr = match[3],\n yearStr = match[4],\n hourStr = match[5],\n minuteStr = match[6],\n secondStr = match[7],\n obsOffset = match[8],\n milOffset = match[9],\n offHourStr = match[10],\n offMinuteStr = match[11],\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n var offset;\n if (obsOffset) {\n offset = obsOffsets[obsOffset];\n } else if (milOffset) {\n offset = 0;\n } else {\n offset = signedOffset(offHourStr, offMinuteStr);\n }\n return [result, new FixedOffsetZone(offset)];\n}\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^()]*\\)|[\\n\\t]/g, \" \").replace(/(\\s\\s+)/g, \" \").trim();\n}\n\n// http date\n\nvar rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d\\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n rfc850 = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d\\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \\d|\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) (\\d{4})$/;\nfunction extractRFC1123Or850(match) {\n var weekdayStr = match[1],\n dayStr = match[2],\n monthStr = match[3],\n yearStr = match[4],\n hourStr = match[5],\n minuteStr = match[6],\n secondStr = match[7],\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\nfunction extractASCII(match) {\n var weekdayStr = match[1],\n monthStr = match[2],\n dayStr = match[3],\n hourStr = match[4],\n minuteStr = match[5],\n secondStr = match[6],\n yearStr = match[7],\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\nvar isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex);\nvar isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex);\nvar isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex);\nvar isoTimeCombinedRegex = combineRegexes(isoTimeRegex);\nvar extractISOYmdTimeAndOffset = combineExtractors(extractISOYmd, extractISOTime, extractISOOffset, extractIANAZone);\nvar extractISOWeekTimeAndOffset = combineExtractors(extractISOWeekData, extractISOTime, extractISOOffset, extractIANAZone);\nvar extractISOOrdinalDateAndTime = combineExtractors(extractISOOrdinalData, extractISOTime, extractISOOffset, extractIANAZone);\nvar extractISOTimeAndOffset = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone);\n\n/*\n * @private\n */\n\nfunction parseISODate(s) {\n return parse(s, [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset], [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime], [isoTimeCombinedRegex, extractISOTimeAndOffset]);\n}\nfunction parseRFC2822Date(s) {\n return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]);\n}\nfunction parseHTTPDate(s) {\n return parse(s, [rfc1123, extractRFC1123Or850], [rfc850, extractRFC1123Or850], [ascii, extractASCII]);\n}\nfunction parseISODuration(s) {\n return parse(s, [isoDuration, extractISODuration]);\n}\nvar extractISOTimeOnly = combineExtractors(extractISOTime);\nfunction parseISOTimeOnly(s) {\n return parse(s, [isoTimeOnly, extractISOTimeOnly]);\n}\nvar sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex);\nvar sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex);\nvar extractISOTimeOffsetAndIANAZone = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone);\nfunction parseSQL(s) {\n return parse(s, [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]);\n}\n\nvar INVALID$2 = \"Invalid Duration\";\n\n// unit conversion constants\nvar lowOrderMatrix = {\n weeks: {\n days: 7,\n hours: 7 * 24,\n minutes: 7 * 24 * 60,\n seconds: 7 * 24 * 60 * 60,\n milliseconds: 7 * 24 * 60 * 60 * 1000\n },\n days: {\n hours: 24,\n minutes: 24 * 60,\n seconds: 24 * 60 * 60,\n milliseconds: 24 * 60 * 60 * 1000\n },\n hours: {\n minutes: 60,\n seconds: 60 * 60,\n milliseconds: 60 * 60 * 1000\n },\n minutes: {\n seconds: 60,\n milliseconds: 60 * 1000\n },\n seconds: {\n milliseconds: 1000\n }\n },\n casualMatrix = _extends({\n years: {\n quarters: 4,\n months: 12,\n weeks: 52,\n days: 365,\n hours: 365 * 24,\n minutes: 365 * 24 * 60,\n seconds: 365 * 24 * 60 * 60,\n milliseconds: 365 * 24 * 60 * 60 * 1000\n },\n quarters: {\n months: 3,\n weeks: 13,\n days: 91,\n hours: 91 * 24,\n minutes: 91 * 24 * 60,\n seconds: 91 * 24 * 60 * 60,\n milliseconds: 91 * 24 * 60 * 60 * 1000\n },\n months: {\n weeks: 4,\n days: 30,\n hours: 30 * 24,\n minutes: 30 * 24 * 60,\n seconds: 30 * 24 * 60 * 60,\n milliseconds: 30 * 24 * 60 * 60 * 1000\n }\n }, lowOrderMatrix),\n daysInYearAccurate = 146097.0 / 400,\n daysInMonthAccurate = 146097.0 / 4800,\n accurateMatrix = _extends({\n years: {\n quarters: 4,\n months: 12,\n weeks: daysInYearAccurate / 7,\n days: daysInYearAccurate,\n hours: daysInYearAccurate * 24,\n minutes: daysInYearAccurate * 24 * 60,\n seconds: daysInYearAccurate * 24 * 60 * 60,\n milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000\n },\n quarters: {\n months: 3,\n weeks: daysInYearAccurate / 28,\n days: daysInYearAccurate / 4,\n hours: daysInYearAccurate * 24 / 4,\n minutes: daysInYearAccurate * 24 * 60 / 4,\n seconds: daysInYearAccurate * 24 * 60 * 60 / 4,\n milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000 / 4\n },\n months: {\n weeks: daysInMonthAccurate / 7,\n days: daysInMonthAccurate,\n hours: daysInMonthAccurate * 24,\n minutes: daysInMonthAccurate * 24 * 60,\n seconds: daysInMonthAccurate * 24 * 60 * 60,\n milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000\n }\n }, lowOrderMatrix);\n\n// units ordered by size\nvar orderedUnits$1 = [\"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", \"seconds\", \"milliseconds\"];\nvar reverseUnits = orderedUnits$1.slice(0).reverse();\n\n// clone really means \"create another instance just like this one, but with these changes\"\nfunction clone$1(dur, alts, clear) {\n if (clear === void 0) {\n clear = false;\n }\n // deep merge for vals\n var conf = {\n values: clear ? alts.values : _extends({}, dur.values, alts.values || {}),\n loc: dur.loc.clone(alts.loc),\n conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy,\n matrix: alts.matrix || dur.matrix\n };\n return new Duration(conf);\n}\nfunction durationToMillis(matrix, vals) {\n var _vals$milliseconds;\n var sum = (_vals$milliseconds = vals.milliseconds) != null ? _vals$milliseconds : 0;\n for (var _iterator = _createForOfIteratorHelperLoose(reverseUnits.slice(1)), _step; !(_step = _iterator()).done;) {\n var unit = _step.value;\n if (vals[unit]) {\n sum += vals[unit] * matrix[unit][\"milliseconds\"];\n }\n }\n return sum;\n}\n\n// NB: mutates parameters\nfunction normalizeValues(matrix, vals) {\n // the logic below assumes the overall value of the duration is positive\n // if this is not the case, factor is used to make it so\n var factor = durationToMillis(matrix, vals) < 0 ? -1 : 1;\n orderedUnits$1.reduceRight(function (previous, current) {\n if (!isUndefined(vals[current])) {\n if (previous) {\n var previousVal = vals[previous] * factor;\n var conv = matrix[current][previous];\n\n // if (previousVal < 0):\n // lower order unit is negative (e.g. { years: 2, days: -2 })\n // normalize this by reducing the higher order unit by the appropriate amount\n // and increasing the lower order unit\n // this can never make the higher order unit negative, because this function only operates\n // on positive durations, so the amount of time represented by the lower order unit cannot\n // be larger than the higher order unit\n // else:\n // lower order unit is positive (e.g. { years: 2, days: 450 } or { years: -2, days: 450 })\n // in this case we attempt to convert as much as possible from the lower order unit into\n // the higher order one\n //\n // Math.floor takes care of both of these cases, rounding away from 0\n // if previousVal < 0 it makes the absolute value larger\n // if previousVal >= it makes the absolute value smaller\n var rollUp = Math.floor(previousVal / conv);\n vals[current] += rollUp * factor;\n vals[previous] -= rollUp * conv * factor;\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n\n // try to convert any decimals into smaller units if possible\n // for example for { years: 2.5, days: 0, seconds: 0 } we want to get { years: 2, days: 182, hours: 12 }\n orderedUnits$1.reduce(function (previous, current) {\n if (!isUndefined(vals[current])) {\n if (previous) {\n var fraction = vals[previous] % 1;\n vals[previous] -= fraction;\n vals[current] += fraction * matrix[previous][current];\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n}\n\n// Remove all properties with a value of 0 from an object\nfunction removeZeroes(vals) {\n var newVals = {};\n for (var _i = 0, _Object$entries = Object.entries(vals); _i < _Object$entries.length; _i++) {\n var _Object$entries$_i = _Object$entries[_i],\n key = _Object$entries$_i[0],\n value = _Object$entries$_i[1];\n if (value !== 0) {\n newVals[key] = value;\n }\n }\n return newVals;\n}\n\n/**\n * A Duration object represents a period of time, like \"2 months\" or \"1 day, 1 hour\". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime#plus} to add a Duration object to a DateTime, producing another DateTime.\n *\n * Here is a brief overview of commonly used methods and getters in Duration:\n *\n * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}.\n * * **Unit values** See the {@link Duration#years}, {@link Duration#months}, {@link Duration#weeks}, {@link Duration#days}, {@link Duration#hours}, {@link Duration#minutes}, {@link Duration#seconds}, {@link Duration#milliseconds} accessors.\n * * **Configuration** See {@link Duration#locale} and {@link Duration#numberingSystem} accessors.\n * * **Transformation** To create new Durations out of old ones use {@link Duration#plus}, {@link Duration#minus}, {@link Duration#normalize}, {@link Duration#set}, {@link Duration#reconfigure}, {@link Duration#shiftTo}, and {@link Duration#negate}.\n * * **Output** To convert the Duration into other representations, see {@link Duration#as}, {@link Duration#toISO}, {@link Duration#toFormat}, and {@link Duration#toJSON}\n *\n * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation.\n */\nvar Duration = /*#__PURE__*/function (_Symbol$for) {\n /**\n * @private\n */\n function Duration(config) {\n var accurate = config.conversionAccuracy === \"longterm\" || false;\n var matrix = accurate ? accurateMatrix : casualMatrix;\n if (config.matrix) {\n matrix = config.matrix;\n }\n\n /**\n * @access private\n */\n this.values = config.values;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.conversionAccuracy = accurate ? \"longterm\" : \"casual\";\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.matrix = matrix;\n /**\n * @access private\n */\n this.isLuxonDuration = true;\n }\n\n /**\n * Create Duration from a number of milliseconds.\n * @param {number} count of milliseconds\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n Duration.fromMillis = function fromMillis(count, opts) {\n return Duration.fromObject({\n milliseconds: count\n }, opts);\n }\n\n /**\n * Create a Duration from a JavaScript object with keys like 'years' and 'hours'.\n * If this object is empty then a zero milliseconds duration is returned.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.years\n * @param {number} obj.quarters\n * @param {number} obj.months\n * @param {number} obj.weeks\n * @param {number} obj.days\n * @param {number} obj.hours\n * @param {number} obj.minutes\n * @param {number} obj.seconds\n * @param {number} obj.milliseconds\n * @param {Object} [opts=[]] - options for creating this Duration\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the custom conversion system to use\n * @return {Duration}\n */;\n Duration.fromObject = function fromObject(obj, opts) {\n if (opts === void 0) {\n opts = {};\n }\n if (obj == null || typeof obj !== \"object\") {\n throw new InvalidArgumentError(\"Duration.fromObject: argument expected to be an object, got \" + (obj === null ? \"null\" : typeof obj));\n }\n return new Duration({\n values: normalizeObject(obj, Duration.normalizeUnit),\n loc: Locale.fromObject(opts),\n conversionAccuracy: opts.conversionAccuracy,\n matrix: opts.matrix\n });\n }\n\n /**\n * Create a Duration from DurationLike.\n *\n * @param {Object | number | Duration} durationLike\n * One of:\n * - object with keys like 'years' and 'hours'.\n * - number representing milliseconds\n * - Duration instance\n * @return {Duration}\n */;\n Duration.fromDurationLike = function fromDurationLike(durationLike) {\n if (isNumber(durationLike)) {\n return Duration.fromMillis(durationLike);\n } else if (Duration.isDuration(durationLike)) {\n return durationLike;\n } else if (typeof durationLike === \"object\") {\n return Duration.fromObject(durationLike);\n } else {\n throw new InvalidArgumentError(\"Unknown duration argument \" + durationLike + \" of type \" + typeof durationLike);\n }\n }\n\n /**\n * Create a Duration from an ISO 8601 duration string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the preset conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }\n * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }\n * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }\n * @return {Duration}\n */;\n Duration.fromISO = function fromISO(text, opts) {\n var _parseISODuration = parseISODuration(text),\n parsed = _parseISODuration[0];\n if (parsed) {\n return Duration.fromObject(parsed, opts);\n } else {\n return Duration.invalid(\"unparsable\", \"the input \\\"\" + text + \"\\\" can't be parsed as ISO 8601\");\n }\n }\n\n /**\n * Create a Duration from an ISO 8601 time string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 }\n * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @return {Duration}\n */;\n Duration.fromISOTime = function fromISOTime(text, opts) {\n var _parseISOTimeOnly = parseISOTimeOnly(text),\n parsed = _parseISOTimeOnly[0];\n if (parsed) {\n return Duration.fromObject(parsed, opts);\n } else {\n return Duration.invalid(\"unparsable\", \"the input \\\"\" + text + \"\\\" can't be parsed as ISO 8601\");\n }\n }\n\n /**\n * Create an invalid Duration.\n * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Duration}\n */;\n Duration.invalid = function invalid(reason, explanation) {\n if (explanation === void 0) {\n explanation = null;\n }\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Duration is invalid\");\n }\n var invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n if (Settings.throwOnInvalid) {\n throw new InvalidDurationError(invalid);\n } else {\n return new Duration({\n invalid: invalid\n });\n }\n }\n\n /**\n * @private\n */;\n Duration.normalizeUnit = function normalizeUnit(unit) {\n var normalized = {\n year: \"years\",\n years: \"years\",\n quarter: \"quarters\",\n quarters: \"quarters\",\n month: \"months\",\n months: \"months\",\n week: \"weeks\",\n weeks: \"weeks\",\n day: \"days\",\n days: \"days\",\n hour: \"hours\",\n hours: \"hours\",\n minute: \"minutes\",\n minutes: \"minutes\",\n second: \"seconds\",\n seconds: \"seconds\",\n millisecond: \"milliseconds\",\n milliseconds: \"milliseconds\"\n }[unit ? unit.toLowerCase() : unit];\n if (!normalized) throw new InvalidUnitError(unit);\n return normalized;\n }\n\n /**\n * Check if an object is a Duration. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */;\n Duration.isDuration = function isDuration(o) {\n return o && o.isLuxonDuration || false;\n }\n\n /**\n * Get the locale of a Duration, such 'en-GB'\n * @type {string}\n */;\n var _proto = Duration.prototype;\n /**\n * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:\n * * `S` for milliseconds\n * * `s` for seconds\n * * `m` for minutes\n * * `h` for hours\n * * `d` for days\n * * `w` for weeks\n * * `M` for months\n * * `y` for years\n * Notes:\n * * Add padding by repeating the token, e.g. \"yy\" pads the years to two digits, \"hhhh\" pads the hours out to four digits\n * * Tokens can be escaped by wrapping with single quotes.\n * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.\n * @param {string} fmt - the format string\n * @param {Object} opts - options\n * @param {boolean} [opts.floor=true] - floor numerical values\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"y d s\") //=> \"1 6 2\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"yy dd sss\") //=> \"01 06 002\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"M S\") //=> \"12 518402000\"\n * @return {string}\n */\n _proto.toFormat = function toFormat(fmt, opts) {\n if (opts === void 0) {\n opts = {};\n }\n // reverse-compat since 1.2; we always round down now, never up, and we do it by default\n var fmtOpts = _extends({}, opts, {\n floor: opts.round !== false && opts.floor !== false\n });\n return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID$2;\n }\n\n /**\n * Returns a string representation of a Duration with all units included.\n * To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options\n * @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`.\n * @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor.\n * @example\n * ```js\n * var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 })\n * dur.toHuman() //=> '1 day, 5 hours, 6 minutes'\n * dur.toHuman({ listStyle: \"long\" }) //=> '1 day, 5 hours, and 6 minutes'\n * dur.toHuman({ unitDisplay: \"short\" }) //=> '1 day, 5 hr, 6 min'\n * ```\n */;\n _proto.toHuman = function toHuman(opts) {\n var _this = this;\n if (opts === void 0) {\n opts = {};\n }\n if (!this.isValid) return INVALID$2;\n var l = orderedUnits$1.map(function (unit) {\n var val = _this.values[unit];\n if (isUndefined(val)) {\n return null;\n }\n return _this.loc.numberFormatter(_extends({\n style: \"unit\",\n unitDisplay: \"long\"\n }, opts, {\n unit: unit.slice(0, -1)\n })).format(val);\n }).filter(function (n) {\n return n;\n });\n return this.loc.listFormatter(_extends({\n type: \"conjunction\",\n style: opts.listStyle || \"narrow\"\n }, opts)).format(l);\n }\n\n /**\n * Returns a JavaScript object with this Duration's values.\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }\n * @return {Object}\n */;\n _proto.toObject = function toObject() {\n if (!this.isValid) return {};\n return _extends({}, this.values);\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'\n * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'\n * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'\n * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'\n * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'\n * @return {string}\n */;\n _proto.toISO = function toISO() {\n // we could use the formatter, but this is an easier way to get the minimum string\n if (!this.isValid) return null;\n var s = \"P\";\n if (this.years !== 0) s += this.years + \"Y\";\n if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + \"M\";\n if (this.weeks !== 0) s += this.weeks + \"W\";\n if (this.days !== 0) s += this.days + \"D\";\n if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) s += \"T\";\n if (this.hours !== 0) s += this.hours + \"H\";\n if (this.minutes !== 0) s += this.minutes + \"M\";\n if (this.seconds !== 0 || this.milliseconds !== 0)\n // this will handle \"floating point madness\" by removing extra decimal places\n // https://stackoverflow.com/questions/588004/is-floating-point-math-broken\n s += roundTo(this.seconds + this.milliseconds / 1000, 3) + \"S\";\n if (s === \"P\") s += \"T0S\";\n return s;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.\n * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000'\n * @return {string}\n */;\n _proto.toISOTime = function toISOTime(opts) {\n if (opts === void 0) {\n opts = {};\n }\n if (!this.isValid) return null;\n var millis = this.toMillis();\n if (millis < 0 || millis >= 86400000) return null;\n opts = _extends({\n suppressMilliseconds: false,\n suppressSeconds: false,\n includePrefix: false,\n format: \"extended\"\n }, opts, {\n includeOffset: false\n });\n var dateTime = DateTime.fromMillis(millis, {\n zone: \"UTC\"\n });\n return dateTime.toISOTime(opts);\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in JSON.\n * @return {string}\n */;\n _proto.toJSON = function toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in debugging.\n * @return {string}\n */;\n _proto.toString = function toString() {\n return this.toISO();\n }\n\n /**\n * Returns a string representation of this Duration appropriate for the REPL.\n * @return {string}\n */;\n _proto[_Symbol$for] = function () {\n if (this.isValid) {\n return \"Duration { values: \" + JSON.stringify(this.values) + \" }\";\n } else {\n return \"Duration { Invalid, reason: \" + this.invalidReason + \" }\";\n }\n }\n\n /**\n * Returns an milliseconds value of this Duration.\n * @return {number}\n */;\n _proto.toMillis = function toMillis() {\n if (!this.isValid) return NaN;\n return durationToMillis(this.matrix, this.values);\n }\n\n /**\n * Returns an milliseconds value of this Duration. Alias of {@link toMillis}\n * @return {number}\n */;\n _proto.valueOf = function valueOf() {\n return this.toMillis();\n }\n\n /**\n * Make this Duration longer by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */;\n _proto.plus = function plus(duration) {\n if (!this.isValid) return this;\n var dur = Duration.fromDurationLike(duration),\n result = {};\n for (var _i2 = 0, _orderedUnits = orderedUnits$1; _i2 < _orderedUnits.length; _i2++) {\n var k = _orderedUnits[_i2];\n if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) {\n result[k] = dur.get(k) + this.get(k);\n }\n }\n return clone$1(this, {\n values: result\n }, true);\n }\n\n /**\n * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */;\n _proto.minus = function minus(duration) {\n if (!this.isValid) return this;\n var dur = Duration.fromDurationLike(duration);\n return this.plus(dur.negate());\n }\n\n /**\n * Scale this Duration by the specified amount. Return a newly-constructed Duration.\n * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 }\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === \"hours\" ? x * 2 : x) //=> { hours: 2, minutes: 30 }\n * @return {Duration}\n */;\n _proto.mapUnits = function mapUnits(fn) {\n if (!this.isValid) return this;\n var result = {};\n for (var _i3 = 0, _Object$keys = Object.keys(this.values); _i3 < _Object$keys.length; _i3++) {\n var k = _Object$keys[_i3];\n result[k] = asNumber(fn(this.values[k], k));\n }\n return clone$1(this, {\n values: result\n }, true);\n }\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2\n * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0\n * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3\n * @return {number}\n */;\n _proto.get = function get(unit) {\n return this[Duration.normalizeUnit(unit)];\n }\n\n /**\n * \"Set\" the values of specified units. Return a newly-constructed Duration.\n * @param {Object} values - a mapping of units to numbers\n * @example dur.set({ years: 2017 })\n * @example dur.set({ hours: 8, minutes: 30 })\n * @return {Duration}\n */;\n _proto.set = function set(values) {\n if (!this.isValid) return this;\n var mixed = _extends({}, this.values, normalizeObject(values, Duration.normalizeUnit));\n return clone$1(this, {\n values: mixed\n });\n }\n\n /**\n * \"Set\" the locale and/or numberingSystem. Returns a newly-constructed Duration.\n * @example dur.reconfigure({ locale: 'en-GB' })\n * @return {Duration}\n */;\n _proto.reconfigure = function reconfigure(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n locale = _ref.locale,\n numberingSystem = _ref.numberingSystem,\n conversionAccuracy = _ref.conversionAccuracy,\n matrix = _ref.matrix;\n var loc = this.loc.clone({\n locale: locale,\n numberingSystem: numberingSystem\n });\n var opts = {\n loc: loc,\n matrix: matrix,\n conversionAccuracy: conversionAccuracy\n };\n return clone$1(this, opts);\n }\n\n /**\n * Return the length of the duration in the specified unit.\n * @param {string} unit - a unit such as 'minutes' or 'days'\n * @example Duration.fromObject({years: 1}).as('days') //=> 365\n * @example Duration.fromObject({years: 1}).as('months') //=> 12\n * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5\n * @return {number}\n */;\n _proto.as = function as(unit) {\n return this.isValid ? this.shiftTo(unit).get(unit) : NaN;\n }\n\n /**\n * Reduce this Duration to its canonical representation in its current units.\n * Assuming the overall value of the Duration is positive, this means:\n * - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example)\n * - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise\n * the overall value would be negative, see third example)\n * - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example)\n *\n * If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`.\n * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }\n * @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 }\n * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }\n * @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 }\n * @return {Duration}\n */;\n _proto.normalize = function normalize() {\n if (!this.isValid) return this;\n var vals = this.toObject();\n normalizeValues(this.matrix, vals);\n return clone$1(this, {\n values: vals\n }, true);\n }\n\n /**\n * Rescale units to its largest representation\n * @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 }\n * @return {Duration}\n */;\n _proto.rescale = function rescale() {\n if (!this.isValid) return this;\n var vals = removeZeroes(this.normalize().shiftToAll().toObject());\n return clone$1(this, {\n values: vals\n }, true);\n }\n\n /**\n * Convert this Duration into its representation in a different set of units.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }\n * @return {Duration}\n */;\n _proto.shiftTo = function shiftTo() {\n for (var _len = arguments.length, units = new Array(_len), _key = 0; _key < _len; _key++) {\n units[_key] = arguments[_key];\n }\n if (!this.isValid) return this;\n if (units.length === 0) {\n return this;\n }\n units = units.map(function (u) {\n return Duration.normalizeUnit(u);\n });\n var built = {},\n accumulated = {},\n vals = this.toObject();\n var lastUnit;\n for (var _i4 = 0, _orderedUnits2 = orderedUnits$1; _i4 < _orderedUnits2.length; _i4++) {\n var k = _orderedUnits2[_i4];\n if (units.indexOf(k) >= 0) {\n lastUnit = k;\n var own = 0;\n\n // anything we haven't boiled down yet should get boiled to this unit\n for (var ak in accumulated) {\n own += this.matrix[ak][k] * accumulated[ak];\n accumulated[ak] = 0;\n }\n\n // plus anything that's already in this unit\n if (isNumber(vals[k])) {\n own += vals[k];\n }\n\n // only keep the integer part for now in the hopes of putting any decimal part\n // into a smaller unit later\n var i = Math.trunc(own);\n built[k] = i;\n accumulated[k] = (own * 1000 - i * 1000) / 1000;\n\n // otherwise, keep it in the wings to boil it later\n } else if (isNumber(vals[k])) {\n accumulated[k] = vals[k];\n }\n }\n\n // anything leftover becomes the decimal for the last unit\n // lastUnit must be defined since units is not empty\n for (var key in accumulated) {\n if (accumulated[key] !== 0) {\n built[lastUnit] += key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key];\n }\n }\n normalizeValues(this.matrix, built);\n return clone$1(this, {\n values: built\n }, true);\n }\n\n /**\n * Shift this Duration to all available units.\n * Same as shiftTo(\"years\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", \"seconds\", \"milliseconds\")\n * @return {Duration}\n */;\n _proto.shiftToAll = function shiftToAll() {\n if (!this.isValid) return this;\n return this.shiftTo(\"years\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", \"seconds\", \"milliseconds\");\n }\n\n /**\n * Return the negative of this Duration.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }\n * @return {Duration}\n */;\n _proto.negate = function negate() {\n if (!this.isValid) return this;\n var negated = {};\n for (var _i5 = 0, _Object$keys2 = Object.keys(this.values); _i5 < _Object$keys2.length; _i5++) {\n var k = _Object$keys2[_i5];\n negated[k] = this.values[k] === 0 ? 0 : -this.values[k];\n }\n return clone$1(this, {\n values: negated\n }, true);\n }\n\n /**\n * Get the years.\n * @type {number}\n */;\n /**\n * Equality check\n * Two Durations are equal iff they have the same units and the same values for each unit.\n * @param {Duration} other\n * @return {boolean}\n */\n _proto.equals = function equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n if (!this.loc.equals(other.loc)) {\n return false;\n }\n function eq(v1, v2) {\n // Consider 0 and undefined as equal\n if (v1 === undefined || v1 === 0) return v2 === undefined || v2 === 0;\n return v1 === v2;\n }\n for (var _i6 = 0, _orderedUnits3 = orderedUnits$1; _i6 < _orderedUnits3.length; _i6++) {\n var u = _orderedUnits3[_i6];\n if (!eq(this.values[u], other.values[u])) {\n return false;\n }\n }\n return true;\n };\n _createClass(Duration, [{\n key: \"locale\",\n get: function get() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration\n *\n * @type {string}\n */\n }, {\n key: \"numberingSystem\",\n get: function get() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n }, {\n key: \"years\",\n get: function get() {\n return this.isValid ? this.values.years || 0 : NaN;\n }\n\n /**\n * Get the quarters.\n * @type {number}\n */\n }, {\n key: \"quarters\",\n get: function get() {\n return this.isValid ? this.values.quarters || 0 : NaN;\n }\n\n /**\n * Get the months.\n * @type {number}\n */\n }, {\n key: \"months\",\n get: function get() {\n return this.isValid ? this.values.months || 0 : NaN;\n }\n\n /**\n * Get the weeks\n * @type {number}\n */\n }, {\n key: \"weeks\",\n get: function get() {\n return this.isValid ? this.values.weeks || 0 : NaN;\n }\n\n /**\n * Get the days.\n * @type {number}\n */\n }, {\n key: \"days\",\n get: function get() {\n return this.isValid ? this.values.days || 0 : NaN;\n }\n\n /**\n * Get the hours.\n * @type {number}\n */\n }, {\n key: \"hours\",\n get: function get() {\n return this.isValid ? this.values.hours || 0 : NaN;\n }\n\n /**\n * Get the minutes.\n * @type {number}\n */\n }, {\n key: \"minutes\",\n get: function get() {\n return this.isValid ? this.values.minutes || 0 : NaN;\n }\n\n /**\n * Get the seconds.\n * @return {number}\n */\n }, {\n key: \"seconds\",\n get: function get() {\n return this.isValid ? this.values.seconds || 0 : NaN;\n }\n\n /**\n * Get the milliseconds.\n * @return {number}\n */\n }, {\n key: \"milliseconds\",\n get: function get() {\n return this.isValid ? this.values.milliseconds || 0 : NaN;\n }\n\n /**\n * Returns whether the Duration is invalid. Invalid durations are returned by diff operations\n * on invalid DateTimes or Intervals.\n * @return {boolean}\n */\n }, {\n key: \"isValid\",\n get: function get() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this Duration became invalid, or null if the Duration is valid\n * @return {string}\n */\n }, {\n key: \"invalidReason\",\n get: function get() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Duration became invalid, or null if the Duration is valid\n * @type {string}\n */\n }, {\n key: \"invalidExplanation\",\n get: function get() {\n return this.invalid ? this.invalid.explanation : null;\n }\n }]);\n return Duration;\n}(Symbol.for(\"nodejs.util.inspect.custom\"));\n\nvar INVALID$1 = \"Invalid Interval\";\n\n// checks if the start is equal to or before the end\nfunction validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", \"The end of an interval must be after its start, but you had start=\" + start.toISO() + \" and end=\" + end.toISO());\n } else {\n return null;\n }\n}\n\n/**\n * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them.\n *\n * Here is a brief overview of the most commonly used methods and getters in Interval:\n *\n * * **Creation** To create an Interval, use {@link Interval.fromDateTimes}, {@link Interval.after}, {@link Interval.before}, or {@link Interval.fromISO}.\n * * **Accessors** Use {@link Interval#start} and {@link Interval#end} to get the start and end.\n * * **Interrogation** To analyze the Interval, use {@link Interval#count}, {@link Interval#length}, {@link Interval#hasSame}, {@link Interval#contains}, {@link Interval#isAfter}, or {@link Interval#isBefore}.\n * * **Transformation** To create other Intervals out of this one, use {@link Interval#set}, {@link Interval#splitAt}, {@link Interval#splitBy}, {@link Interval#divideEqually}, {@link Interval.merge}, {@link Interval.xor}, {@link Interval#union}, {@link Interval#intersection}, or {@link Interval#difference}.\n * * **Comparison** To compare this Interval to another one, use {@link Interval#equals}, {@link Interval#overlaps}, {@link Interval#abutsStart}, {@link Interval#abutsEnd}, {@link Interval#engulfs}\n * * **Output** To convert the Interval into other representations, see {@link Interval#toString}, {@link Interval#toLocaleString}, {@link Interval#toISO}, {@link Interval#toISODate}, {@link Interval#toISOTime}, {@link Interval#toFormat}, and {@link Interval#toDuration}.\n */\nvar Interval = /*#__PURE__*/function (_Symbol$for) {\n /**\n * @private\n */\n function Interval(config) {\n /**\n * @access private\n */\n this.s = config.start;\n /**\n * @access private\n */\n this.e = config.end;\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.isLuxonInterval = true;\n }\n\n /**\n * Create an invalid Interval.\n * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Interval}\n */\n Interval.invalid = function invalid(reason, explanation) {\n if (explanation === void 0) {\n explanation = null;\n }\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Interval is invalid\");\n }\n var invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n if (Settings.throwOnInvalid) {\n throw new InvalidIntervalError(invalid);\n } else {\n return new Interval({\n invalid: invalid\n });\n }\n }\n\n /**\n * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.\n * @param {DateTime|Date|Object} start\n * @param {DateTime|Date|Object} end\n * @return {Interval}\n */;\n Interval.fromDateTimes = function fromDateTimes(start, end) {\n var builtStart = friendlyDateTime(start),\n builtEnd = friendlyDateTime(end);\n var validateError = validateStartEnd(builtStart, builtEnd);\n if (validateError == null) {\n return new Interval({\n start: builtStart,\n end: builtEnd\n });\n } else {\n return validateError;\n }\n }\n\n /**\n * Create an Interval from a start DateTime and a Duration to extend to.\n * @param {DateTime|Date|Object} start\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */;\n Interval.after = function after(start, duration) {\n var dur = Duration.fromDurationLike(duration),\n dt = friendlyDateTime(start);\n return Interval.fromDateTimes(dt, dt.plus(dur));\n }\n\n /**\n * Create an Interval from an end DateTime and a Duration to extend backwards to.\n * @param {DateTime|Date|Object} end\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */;\n Interval.before = function before(end, duration) {\n var dur = Duration.fromDurationLike(duration),\n dt = friendlyDateTime(end);\n return Interval.fromDateTimes(dt.minus(dur), dt);\n }\n\n /**\n * Create an Interval from an ISO 8601 string.\n * Accepts `/`, `/`, and `/` formats.\n * @param {string} text - the ISO string to parse\n * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {Interval}\n */;\n Interval.fromISO = function fromISO(text, opts) {\n var _split = (text || \"\").split(\"/\", 2),\n s = _split[0],\n e = _split[1];\n if (s && e) {\n var start, startIsValid;\n try {\n start = DateTime.fromISO(s, opts);\n startIsValid = start.isValid;\n } catch (e) {\n startIsValid = false;\n }\n var end, endIsValid;\n try {\n end = DateTime.fromISO(e, opts);\n endIsValid = end.isValid;\n } catch (e) {\n endIsValid = false;\n }\n if (startIsValid && endIsValid) {\n return Interval.fromDateTimes(start, end);\n }\n if (startIsValid) {\n var dur = Duration.fromISO(e, opts);\n if (dur.isValid) {\n return Interval.after(start, dur);\n }\n } else if (endIsValid) {\n var _dur = Duration.fromISO(s, opts);\n if (_dur.isValid) {\n return Interval.before(end, _dur);\n }\n }\n }\n return Interval.invalid(\"unparsable\", \"the input \\\"\" + text + \"\\\" can't be parsed as ISO 8601\");\n }\n\n /**\n * Check if an object is an Interval. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */;\n Interval.isInterval = function isInterval(o) {\n return o && o.isLuxonInterval || false;\n }\n\n /**\n * Returns the start of the Interval\n * @type {DateTime}\n */;\n var _proto = Interval.prototype;\n /**\n * Returns the length of the Interval in the specified unit.\n * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.\n * @return {number}\n */\n _proto.length = function length(unit) {\n if (unit === void 0) {\n unit = \"milliseconds\";\n }\n return this.isValid ? this.toDuration.apply(this, [unit]).get(unit) : NaN;\n }\n\n /**\n * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.\n * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'\n * asks 'what dates are included in this interval?', not 'how many days long is this interval?'\n * @param {string} [unit='milliseconds'] - the unit of time to count.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime\n * @return {number}\n */;\n _proto.count = function count(unit, opts) {\n if (unit === void 0) {\n unit = \"milliseconds\";\n }\n if (!this.isValid) return NaN;\n var start = this.start.startOf(unit, opts);\n var end;\n if (opts != null && opts.useLocaleWeeks) {\n end = this.end.reconfigure({\n locale: start.locale\n });\n } else {\n end = this.end;\n }\n end = end.startOf(unit, opts);\n return Math.floor(end.diff(start, unit).get(unit)) + (end.valueOf() !== this.end.valueOf());\n }\n\n /**\n * Returns whether this Interval's start and end are both in the same unit of time\n * @param {string} unit - the unit of time to check sameness on\n * @return {boolean}\n */;\n _proto.hasSame = function hasSame(unit) {\n return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;\n }\n\n /**\n * Return whether this Interval has the same start and end DateTimes.\n * @return {boolean}\n */;\n _proto.isEmpty = function isEmpty() {\n return this.s.valueOf() === this.e.valueOf();\n }\n\n /**\n * Return whether this Interval's start is after the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */;\n _proto.isAfter = function isAfter(dateTime) {\n if (!this.isValid) return false;\n return this.s > dateTime;\n }\n\n /**\n * Return whether this Interval's end is before the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */;\n _proto.isBefore = function isBefore(dateTime) {\n if (!this.isValid) return false;\n return this.e <= dateTime;\n }\n\n /**\n * Return whether this Interval contains the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */;\n _proto.contains = function contains(dateTime) {\n if (!this.isValid) return false;\n return this.s <= dateTime && this.e > dateTime;\n }\n\n /**\n * \"Sets\" the start and/or end dates. Returns a newly-constructed Interval.\n * @param {Object} values - the values to set\n * @param {DateTime} values.start - the starting DateTime\n * @param {DateTime} values.end - the ending DateTime\n * @return {Interval}\n */;\n _proto.set = function set(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n start = _ref.start,\n end = _ref.end;\n if (!this.isValid) return this;\n return Interval.fromDateTimes(start || this.s, end || this.e);\n }\n\n /**\n * Split this Interval at each of the specified DateTimes\n * @param {...DateTime} dateTimes - the unit of time to count.\n * @return {Array}\n */;\n _proto.splitAt = function splitAt() {\n var _this = this;\n if (!this.isValid) return [];\n for (var _len = arguments.length, dateTimes = new Array(_len), _key = 0; _key < _len; _key++) {\n dateTimes[_key] = arguments[_key];\n }\n var sorted = dateTimes.map(friendlyDateTime).filter(function (d) {\n return _this.contains(d);\n }).sort(function (a, b) {\n return a.toMillis() - b.toMillis();\n }),\n results = [];\n var s = this.s,\n i = 0;\n while (s < this.e) {\n var added = sorted[i] || this.e,\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n i += 1;\n }\n return results;\n }\n\n /**\n * Split this Interval into smaller Intervals, each of the specified length.\n * Left over time is grouped into a smaller interval\n * @param {Duration|Object|number} duration - The length of each resulting interval.\n * @return {Array}\n */;\n _proto.splitBy = function splitBy(duration) {\n var dur = Duration.fromDurationLike(duration);\n if (!this.isValid || !dur.isValid || dur.as(\"milliseconds\") === 0) {\n return [];\n }\n var s = this.s,\n idx = 1,\n next;\n var results = [];\n while (s < this.e) {\n var added = this.start.plus(dur.mapUnits(function (x) {\n return x * idx;\n }));\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n idx += 1;\n }\n return results;\n }\n\n /**\n * Split this Interval into the specified number of smaller intervals.\n * @param {number} numberOfParts - The number of Intervals to divide the Interval into.\n * @return {Array}\n */;\n _proto.divideEqually = function divideEqually(numberOfParts) {\n if (!this.isValid) return [];\n return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);\n }\n\n /**\n * Return whether this Interval overlaps with the specified Interval\n * @param {Interval} other\n * @return {boolean}\n */;\n _proto.overlaps = function overlaps(other) {\n return this.e > other.s && this.s < other.e;\n }\n\n /**\n * Return whether this Interval's end is adjacent to the specified Interval's start.\n * @param {Interval} other\n * @return {boolean}\n */;\n _proto.abutsStart = function abutsStart(other) {\n if (!this.isValid) return false;\n return +this.e === +other.s;\n }\n\n /**\n * Return whether this Interval's start is adjacent to the specified Interval's end.\n * @param {Interval} other\n * @return {boolean}\n */;\n _proto.abutsEnd = function abutsEnd(other) {\n if (!this.isValid) return false;\n return +other.e === +this.s;\n }\n\n /**\n * Return whether this Interval engulfs the start and end of the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */;\n _proto.engulfs = function engulfs(other) {\n if (!this.isValid) return false;\n return this.s <= other.s && this.e >= other.e;\n }\n\n /**\n * Return whether this Interval has the same start and end as the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */;\n _proto.equals = function equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n return this.s.equals(other.s) && this.e.equals(other.e);\n }\n\n /**\n * Return an Interval representing the intersection of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.\n * Returns null if the intersection is empty, meaning, the intervals don't intersect.\n * @param {Interval} other\n * @return {Interval}\n */;\n _proto.intersection = function intersection(other) {\n if (!this.isValid) return this;\n var s = this.s > other.s ? this.s : other.s,\n e = this.e < other.e ? this.e : other.e;\n if (s >= e) {\n return null;\n } else {\n return Interval.fromDateTimes(s, e);\n }\n }\n\n /**\n * Return an Interval representing the union of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.\n * @param {Interval} other\n * @return {Interval}\n */;\n _proto.union = function union(other) {\n if (!this.isValid) return this;\n var s = this.s < other.s ? this.s : other.s,\n e = this.e > other.e ? this.e : other.e;\n return Interval.fromDateTimes(s, e);\n }\n\n /**\n * Merge an array of Intervals into a equivalent minimal set of Intervals.\n * Combines overlapping and adjacent Intervals.\n * @param {Array} intervals\n * @return {Array}\n */;\n Interval.merge = function merge(intervals) {\n var _intervals$sort$reduc = intervals.sort(function (a, b) {\n return a.s - b.s;\n }).reduce(function (_ref2, item) {\n var sofar = _ref2[0],\n current = _ref2[1];\n if (!current) {\n return [sofar, item];\n } else if (current.overlaps(item) || current.abutsStart(item)) {\n return [sofar, current.union(item)];\n } else {\n return [sofar.concat([current]), item];\n }\n }, [[], null]),\n found = _intervals$sort$reduc[0],\n final = _intervals$sort$reduc[1];\n if (final) {\n found.push(final);\n }\n return found;\n }\n\n /**\n * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.\n * @param {Array} intervals\n * @return {Array}\n */;\n Interval.xor = function xor(intervals) {\n var _Array$prototype;\n var start = null,\n currentCount = 0;\n var results = [],\n ends = intervals.map(function (i) {\n return [{\n time: i.s,\n type: \"s\"\n }, {\n time: i.e,\n type: \"e\"\n }];\n }),\n flattened = (_Array$prototype = Array.prototype).concat.apply(_Array$prototype, ends),\n arr = flattened.sort(function (a, b) {\n return a.time - b.time;\n });\n for (var _iterator = _createForOfIteratorHelperLoose(arr), _step; !(_step = _iterator()).done;) {\n var i = _step.value;\n currentCount += i.type === \"s\" ? 1 : -1;\n if (currentCount === 1) {\n start = i.time;\n } else {\n if (start && +start !== +i.time) {\n results.push(Interval.fromDateTimes(start, i.time));\n }\n start = null;\n }\n }\n return Interval.merge(results);\n }\n\n /**\n * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.\n * @param {...Interval} intervals\n * @return {Array}\n */;\n _proto.difference = function difference() {\n var _this2 = this;\n for (var _len2 = arguments.length, intervals = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n intervals[_key2] = arguments[_key2];\n }\n return Interval.xor([this].concat(intervals)).map(function (i) {\n return _this2.intersection(i);\n }).filter(function (i) {\n return i && !i.isEmpty();\n });\n }\n\n /**\n * Returns a string representation of this Interval appropriate for debugging.\n * @return {string}\n */;\n _proto.toString = function toString() {\n if (!this.isValid) return INVALID$1;\n return \"[\" + this.s.toISO() + \" \\u2013 \" + this.e.toISO() + \")\";\n }\n\n /**\n * Returns a string representation of this Interval appropriate for the REPL.\n * @return {string}\n */;\n _proto[_Symbol$for] = function () {\n if (this.isValid) {\n return \"Interval { start: \" + this.s.toISO() + \", end: \" + this.e.toISO() + \" }\";\n } else {\n return \"Interval { Invalid, reason: \" + this.invalidReason + \" }\";\n }\n }\n\n /**\n * Returns a localized string representing this Interval. Accepts the same options as the\n * Intl.DateTimeFormat constructor and any presets defined by Luxon, such as\n * {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method\n * is browser-specific, but in general it will return an appropriate representation of the\n * Interval in the assigned locale. Defaults to the system's locale if no locale has been\n * specified.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or\n * Intl.DateTimeFormat constructor options.\n * @param {Object} opts - Options to override the configuration of the start DateTime.\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 – 11/8/2022\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 – 8, 2022\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 7–8 novembre 2022\n * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 – 8:00 PM\n * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p\n * @return {string}\n */;\n _proto.toLocaleString = function toLocaleString(formatOpts, opts) {\n if (formatOpts === void 0) {\n formatOpts = DATE_SHORT;\n }\n if (opts === void 0) {\n opts = {};\n }\n return this.isValid ? Formatter.create(this.s.loc.clone(opts), formatOpts).formatInterval(this) : INVALID$1;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Interval.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime#toISO}\n * @return {string}\n */;\n _proto.toISO = function toISO(opts) {\n if (!this.isValid) return INVALID$1;\n return this.s.toISO(opts) + \"/\" + this.e.toISO(opts);\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of date of this Interval.\n * The time components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {string}\n */;\n _proto.toISODate = function toISODate() {\n if (!this.isValid) return INVALID$1;\n return this.s.toISODate() + \"/\" + this.e.toISODate();\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of time of this Interval.\n * The date components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime#toISO}\n * @return {string}\n */;\n _proto.toISOTime = function toISOTime(opts) {\n if (!this.isValid) return INVALID$1;\n return this.s.toISOTime(opts) + \"/\" + this.e.toISOTime(opts);\n }\n\n /**\n * Returns a string representation of this Interval formatted according to the specified format\n * string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible\n * formatting tool.\n * @param {string} dateFormat - The format string. This string formats the start and end time.\n * See {@link DateTime#toFormat} for details.\n * @param {Object} opts - Options.\n * @param {string} [opts.separator = ' – '] - A separator to place between the start and end\n * representations.\n * @return {string}\n */;\n _proto.toFormat = function toFormat(dateFormat, _temp2) {\n var _ref3 = _temp2 === void 0 ? {} : _temp2,\n _ref3$separator = _ref3.separator,\n separator = _ref3$separator === void 0 ? \" – \" : _ref3$separator;\n if (!this.isValid) return INVALID$1;\n return \"\" + this.s.toFormat(dateFormat) + separator + this.e.toFormat(dateFormat);\n }\n\n /**\n * Return a Duration representing the time spanned by this interval.\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }\n * @return {Duration}\n */;\n _proto.toDuration = function toDuration(unit, opts) {\n if (!this.isValid) {\n return Duration.invalid(this.invalidReason);\n }\n return this.e.diff(this.s, unit, opts);\n }\n\n /**\n * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes\n * @param {function} mapFn\n * @return {Interval}\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))\n */;\n _proto.mapEndpoints = function mapEndpoints(mapFn) {\n return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));\n };\n _createClass(Interval, [{\n key: \"start\",\n get: function get() {\n return this.isValid ? this.s : null;\n }\n\n /**\n * Returns the end of the Interval\n * @type {DateTime}\n */\n }, {\n key: \"end\",\n get: function get() {\n return this.isValid ? this.e : null;\n }\n\n /**\n * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.\n * @type {boolean}\n */\n }, {\n key: \"isValid\",\n get: function get() {\n return this.invalidReason === null;\n }\n\n /**\n * Returns an error code if this Interval is invalid, or null if the Interval is valid\n * @type {string}\n */\n }, {\n key: \"invalidReason\",\n get: function get() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Interval became invalid, or null if the Interval is valid\n * @type {string}\n */\n }, {\n key: \"invalidExplanation\",\n get: function get() {\n return this.invalid ? this.invalid.explanation : null;\n }\n }]);\n return Interval;\n}(Symbol.for(\"nodejs.util.inspect.custom\"));\n\n/**\n * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment.\n */\nvar Info = /*#__PURE__*/function () {\n function Info() {}\n /**\n * Return whether the specified zone contains a DST.\n * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.\n * @return {boolean}\n */\n Info.hasDST = function hasDST(zone) {\n if (zone === void 0) {\n zone = Settings.defaultZone;\n }\n var proto = DateTime.now().setZone(zone).set({\n month: 12\n });\n return !zone.isUniversal && proto.offset !== proto.set({\n month: 6\n }).offset;\n }\n\n /**\n * Return whether the specified zone is a valid IANA specifier.\n * @param {string} zone - Zone to check\n * @return {boolean}\n */;\n Info.isValidIANAZone = function isValidIANAZone(zone) {\n return IANAZone.isValidZone(zone);\n }\n\n /**\n * Converts the input into a {@link Zone} instance.\n *\n * * If `input` is already a Zone instance, it is returned unchanged.\n * * If `input` is a string containing a valid time zone name, a Zone instance\n * with that name is returned.\n * * If `input` is a string that doesn't refer to a known time zone, a Zone\n * instance with {@link Zone#isValid} == false is returned.\n * * If `input is a number, a Zone instance with the specified fixed offset\n * in minutes is returned.\n * * If `input` is `null` or `undefined`, the default zone is returned.\n * @param {string|Zone|number} [input] - the value to be converted\n * @return {Zone}\n */;\n Info.normalizeZone = function normalizeZone$1(input) {\n return normalizeZone(input, Settings.defaultZone);\n }\n\n /**\n * Get the weekday on which the week starts according to the given locale.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number} the start of the week, 1 for Monday through 7 for Sunday\n */;\n Info.getStartOfWeek = function getStartOfWeek(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$locale = _ref.locale,\n locale = _ref$locale === void 0 ? null : _ref$locale,\n _ref$locObj = _ref.locObj,\n locObj = _ref$locObj === void 0 ? null : _ref$locObj;\n return (locObj || Locale.create(locale)).getStartOfWeek();\n }\n\n /**\n * Get the minimum number of days necessary in a week before it is considered part of the next year according\n * to the given locale.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number}\n */;\n Info.getMinimumDaysInFirstWeek = function getMinimumDaysInFirstWeek(_temp2) {\n var _ref2 = _temp2 === void 0 ? {} : _temp2,\n _ref2$locale = _ref2.locale,\n locale = _ref2$locale === void 0 ? null : _ref2$locale,\n _ref2$locObj = _ref2.locObj,\n locObj = _ref2$locObj === void 0 ? null : _ref2$locObj;\n return (locObj || Locale.create(locale)).getMinDaysInFirstWeek();\n }\n\n /**\n * Get the weekdays, which are considered the weekend according to the given locale\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday\n */;\n Info.getWeekendWeekdays = function getWeekendWeekdays(_temp3) {\n var _ref3 = _temp3 === void 0 ? {} : _temp3,\n _ref3$locale = _ref3.locale,\n locale = _ref3$locale === void 0 ? null : _ref3$locale,\n _ref3$locObj = _ref3.locObj,\n locObj = _ref3$locObj === void 0 ? null : _ref3$locObj;\n // copy the array, because we cache it internally\n return (locObj || Locale.create(locale)).getWeekendDays().slice();\n }\n\n /**\n * Return an array of standalone month names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @example Info.months()[0] //=> 'January'\n * @example Info.months('short')[0] //=> 'Jan'\n * @example Info.months('numeric')[0] //=> '1'\n * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'\n * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'\n * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'\n * @return {Array}\n */;\n Info.months = function months(length, _temp4) {\n if (length === void 0) {\n length = \"long\";\n }\n var _ref4 = _temp4 === void 0 ? {} : _temp4,\n _ref4$locale = _ref4.locale,\n locale = _ref4$locale === void 0 ? null : _ref4$locale,\n _ref4$numberingSystem = _ref4.numberingSystem,\n numberingSystem = _ref4$numberingSystem === void 0 ? null : _ref4$numberingSystem,\n _ref4$locObj = _ref4.locObj,\n locObj = _ref4$locObj === void 0 ? null : _ref4$locObj,\n _ref4$outputCalendar = _ref4.outputCalendar,\n outputCalendar = _ref4$outputCalendar === void 0 ? \"gregory\" : _ref4$outputCalendar;\n return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length);\n }\n\n /**\n * Return an array of format month names.\n * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that\n * changes the string.\n * See {@link Info#months}\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @return {Array}\n */;\n Info.monthsFormat = function monthsFormat(length, _temp5) {\n if (length === void 0) {\n length = \"long\";\n }\n var _ref5 = _temp5 === void 0 ? {} : _temp5,\n _ref5$locale = _ref5.locale,\n locale = _ref5$locale === void 0 ? null : _ref5$locale,\n _ref5$numberingSystem = _ref5.numberingSystem,\n numberingSystem = _ref5$numberingSystem === void 0 ? null : _ref5$numberingSystem,\n _ref5$locObj = _ref5.locObj,\n locObj = _ref5$locObj === void 0 ? null : _ref5$locObj,\n _ref5$outputCalendar = _ref5.outputCalendar,\n outputCalendar = _ref5$outputCalendar === void 0 ? \"gregory\" : _ref5$outputCalendar;\n return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length, true);\n }\n\n /**\n * Return an array of standalone week names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @example Info.weekdays()[0] //=> 'Monday'\n * @example Info.weekdays('short')[0] //=> 'Mon'\n * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'\n * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'\n * @return {Array}\n */;\n Info.weekdays = function weekdays(length, _temp6) {\n if (length === void 0) {\n length = \"long\";\n }\n var _ref6 = _temp6 === void 0 ? {} : _temp6,\n _ref6$locale = _ref6.locale,\n locale = _ref6$locale === void 0 ? null : _ref6$locale,\n _ref6$numberingSystem = _ref6.numberingSystem,\n numberingSystem = _ref6$numberingSystem === void 0 ? null : _ref6$numberingSystem,\n _ref6$locObj = _ref6.locObj,\n locObj = _ref6$locObj === void 0 ? null : _ref6$locObj;\n return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length);\n }\n\n /**\n * Return an array of format week names.\n * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that\n * changes the string.\n * See {@link Info#weekdays}\n * @param {string} [length='long'] - the length of the month representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale=null] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @return {Array}\n */;\n Info.weekdaysFormat = function weekdaysFormat(length, _temp7) {\n if (length === void 0) {\n length = \"long\";\n }\n var _ref7 = _temp7 === void 0 ? {} : _temp7,\n _ref7$locale = _ref7.locale,\n locale = _ref7$locale === void 0 ? null : _ref7$locale,\n _ref7$numberingSystem = _ref7.numberingSystem,\n numberingSystem = _ref7$numberingSystem === void 0 ? null : _ref7$numberingSystem,\n _ref7$locObj = _ref7.locObj,\n locObj = _ref7$locObj === void 0 ? null : _ref7$locObj;\n return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length, true);\n }\n\n /**\n * Return an array of meridiems.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.meridiems() //=> [ 'AM', 'PM' ]\n * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]\n * @return {Array}\n */;\n Info.meridiems = function meridiems(_temp8) {\n var _ref8 = _temp8 === void 0 ? {} : _temp8,\n _ref8$locale = _ref8.locale,\n locale = _ref8$locale === void 0 ? null : _ref8$locale;\n return Locale.create(locale).meridiems();\n }\n\n /**\n * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.\n * @param {string} [length='short'] - the length of the era representation, such as \"short\" or \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.eras() //=> [ 'BC', 'AD' ]\n * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]\n * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]\n * @return {Array}\n */;\n Info.eras = function eras(length, _temp9) {\n if (length === void 0) {\n length = \"short\";\n }\n var _ref9 = _temp9 === void 0 ? {} : _temp9,\n _ref9$locale = _ref9.locale,\n locale = _ref9$locale === void 0 ? null : _ref9$locale;\n return Locale.create(locale, null, \"gregory\").eras(length);\n }\n\n /**\n * Return the set of available features in this environment.\n * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.\n * Keys:\n * * `relative`: whether this environment supports relative time formatting\n * * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale\n * @example Info.features() //=> { relative: false, localeWeek: true }\n * @return {Object}\n */;\n Info.features = function features() {\n return {\n relative: hasRelative(),\n localeWeek: hasLocaleWeekInfo()\n };\n };\n return Info;\n}();\n\nfunction dayDiff(earlier, later) {\n var utcDayStart = function utcDayStart(dt) {\n return dt.toUTC(0, {\n keepLocalTime: true\n }).startOf(\"day\").valueOf();\n },\n ms = utcDayStart(later) - utcDayStart(earlier);\n return Math.floor(Duration.fromMillis(ms).as(\"days\"));\n}\nfunction highOrderDiffs(cursor, later, units) {\n var differs = [[\"years\", function (a, b) {\n return b.year - a.year;\n }], [\"quarters\", function (a, b) {\n return b.quarter - a.quarter + (b.year - a.year) * 4;\n }], [\"months\", function (a, b) {\n return b.month - a.month + (b.year - a.year) * 12;\n }], [\"weeks\", function (a, b) {\n var days = dayDiff(a, b);\n return (days - days % 7) / 7;\n }], [\"days\", dayDiff]];\n var results = {};\n var earlier = cursor;\n var lowestOrder, highWater;\n\n /* This loop tries to diff using larger units first.\n If we overshoot, we backtrack and try the next smaller unit.\n \"cursor\" starts out at the earlier timestamp and moves closer and closer to \"later\"\n as we use smaller and smaller units.\n highWater keeps track of where we would be if we added one more of the smallest unit,\n this is used later to potentially convert any difference smaller than the smallest higher order unit\n into a fraction of that smallest higher order unit\n */\n for (var _i = 0, _differs = differs; _i < _differs.length; _i++) {\n var _differs$_i = _differs[_i],\n unit = _differs$_i[0],\n differ = _differs$_i[1];\n if (units.indexOf(unit) >= 0) {\n lowestOrder = unit;\n results[unit] = differ(cursor, later);\n highWater = earlier.plus(results);\n if (highWater > later) {\n // we overshot the end point, backtrack cursor by 1\n results[unit]--;\n cursor = earlier.plus(results);\n\n // if we are still overshooting now, we need to backtrack again\n // this happens in certain situations when diffing times in different zones,\n // because this calculation ignores time zones\n if (cursor > later) {\n // keep the \"overshot by 1\" around as highWater\n highWater = cursor;\n // backtrack cursor by 1\n results[unit]--;\n cursor = earlier.plus(results);\n }\n } else {\n cursor = highWater;\n }\n }\n }\n return [cursor, results, highWater, lowestOrder];\n}\nfunction _diff (earlier, later, units, opts) {\n var _highOrderDiffs = highOrderDiffs(earlier, later, units),\n cursor = _highOrderDiffs[0],\n results = _highOrderDiffs[1],\n highWater = _highOrderDiffs[2],\n lowestOrder = _highOrderDiffs[3];\n var remainingMillis = later - cursor;\n var lowerOrderUnits = units.filter(function (u) {\n return [\"hours\", \"minutes\", \"seconds\", \"milliseconds\"].indexOf(u) >= 0;\n });\n if (lowerOrderUnits.length === 0) {\n if (highWater < later) {\n var _cursor$plus;\n highWater = cursor.plus((_cursor$plus = {}, _cursor$plus[lowestOrder] = 1, _cursor$plus));\n }\n if (highWater !== cursor) {\n results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);\n }\n }\n var duration = Duration.fromObject(results, opts);\n if (lowerOrderUnits.length > 0) {\n var _Duration$fromMillis;\n return (_Duration$fromMillis = Duration.fromMillis(remainingMillis, opts)).shiftTo.apply(_Duration$fromMillis, lowerOrderUnits).plus(duration);\n } else {\n return duration;\n }\n}\n\nvar numberingSystems = {\n arab: \"[\\u0660-\\u0669]\",\n arabext: \"[\\u06F0-\\u06F9]\",\n bali: \"[\\u1B50-\\u1B59]\",\n beng: \"[\\u09E6-\\u09EF]\",\n deva: \"[\\u0966-\\u096F]\",\n fullwide: \"[\\uFF10-\\uFF19]\",\n gujr: \"[\\u0AE6-\\u0AEF]\",\n hanidec: \"[〇|一|二|三|四|五|六|七|八|九]\",\n khmr: \"[\\u17E0-\\u17E9]\",\n knda: \"[\\u0CE6-\\u0CEF]\",\n laoo: \"[\\u0ED0-\\u0ED9]\",\n limb: \"[\\u1946-\\u194F]\",\n mlym: \"[\\u0D66-\\u0D6F]\",\n mong: \"[\\u1810-\\u1819]\",\n mymr: \"[\\u1040-\\u1049]\",\n orya: \"[\\u0B66-\\u0B6F]\",\n tamldec: \"[\\u0BE6-\\u0BEF]\",\n telu: \"[\\u0C66-\\u0C6F]\",\n thai: \"[\\u0E50-\\u0E59]\",\n tibt: \"[\\u0F20-\\u0F29]\",\n latn: \"\\\\d\"\n};\nvar numberingSystemsUTF16 = {\n arab: [1632, 1641],\n arabext: [1776, 1785],\n bali: [6992, 7001],\n beng: [2534, 2543],\n deva: [2406, 2415],\n fullwide: [65296, 65303],\n gujr: [2790, 2799],\n khmr: [6112, 6121],\n knda: [3302, 3311],\n laoo: [3792, 3801],\n limb: [6470, 6479],\n mlym: [3430, 3439],\n mong: [6160, 6169],\n mymr: [4160, 4169],\n orya: [2918, 2927],\n tamldec: [3046, 3055],\n telu: [3174, 3183],\n thai: [3664, 3673],\n tibt: [3872, 3881]\n};\nvar hanidecChars = numberingSystems.hanidec.replace(/[\\[|\\]]/g, \"\").split(\"\");\nfunction parseDigits(str) {\n var value = parseInt(str, 10);\n if (isNaN(value)) {\n value = \"\";\n for (var i = 0; i < str.length; i++) {\n var code = str.charCodeAt(i);\n if (str[i].search(numberingSystems.hanidec) !== -1) {\n value += hanidecChars.indexOf(str[i]);\n } else {\n for (var key in numberingSystemsUTF16) {\n var _numberingSystemsUTF = numberingSystemsUTF16[key],\n min = _numberingSystemsUTF[0],\n max = _numberingSystemsUTF[1];\n if (code >= min && code <= max) {\n value += code - min;\n }\n }\n }\n }\n return parseInt(value, 10);\n } else {\n return value;\n }\n}\nfunction digitRegex(_ref, append) {\n var numberingSystem = _ref.numberingSystem;\n if (append === void 0) {\n append = \"\";\n }\n return new RegExp(\"\" + numberingSystems[numberingSystem || \"latn\"] + append);\n}\n\nvar MISSING_FTP = \"missing Intl.DateTimeFormat.formatToParts support\";\nfunction intUnit(regex, post) {\n if (post === void 0) {\n post = function post(i) {\n return i;\n };\n }\n return {\n regex: regex,\n deser: function deser(_ref) {\n var s = _ref[0];\n return post(parseDigits(s));\n }\n };\n}\nvar NBSP = String.fromCharCode(160);\nvar spaceOrNBSP = \"[ \" + NBSP + \"]\";\nvar spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, \"g\");\nfunction fixListRegex(s) {\n // make dots optional and also make them literal\n // make space and non breakable space characters interchangeable\n return s.replace(/\\./g, \"\\\\.?\").replace(spaceOrNBSPRegExp, spaceOrNBSP);\n}\nfunction stripInsensitivities(s) {\n return s.replace(/\\./g, \"\") // ignore dots that were made optional\n .replace(spaceOrNBSPRegExp, \" \") // interchange space and nbsp\n .toLowerCase();\n}\nfunction oneOf(strings, startIndex) {\n if (strings === null) {\n return null;\n } else {\n return {\n regex: RegExp(strings.map(fixListRegex).join(\"|\")),\n deser: function deser(_ref2) {\n var s = _ref2[0];\n return strings.findIndex(function (i) {\n return stripInsensitivities(s) === stripInsensitivities(i);\n }) + startIndex;\n }\n };\n }\n}\nfunction offset(regex, groups) {\n return {\n regex: regex,\n deser: function deser(_ref3) {\n var h = _ref3[1],\n m = _ref3[2];\n return signedOffset(h, m);\n },\n groups: groups\n };\n}\nfunction simple(regex) {\n return {\n regex: regex,\n deser: function deser(_ref4) {\n var s = _ref4[0];\n return s;\n }\n };\n}\nfunction escapeToken(value) {\n return value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n}\n\n/**\n * @param token\n * @param {Locale} loc\n */\nfunction unitForToken(token, loc) {\n var one = digitRegex(loc),\n two = digitRegex(loc, \"{2}\"),\n three = digitRegex(loc, \"{3}\"),\n four = digitRegex(loc, \"{4}\"),\n six = digitRegex(loc, \"{6}\"),\n oneOrTwo = digitRegex(loc, \"{1,2}\"),\n oneToThree = digitRegex(loc, \"{1,3}\"),\n oneToSix = digitRegex(loc, \"{1,6}\"),\n oneToNine = digitRegex(loc, \"{1,9}\"),\n twoToFour = digitRegex(loc, \"{2,4}\"),\n fourToSix = digitRegex(loc, \"{4,6}\"),\n literal = function literal(t) {\n return {\n regex: RegExp(escapeToken(t.val)),\n deser: function deser(_ref5) {\n var s = _ref5[0];\n return s;\n },\n literal: true\n };\n },\n unitate = function unitate(t) {\n if (token.literal) {\n return literal(t);\n }\n switch (t.val) {\n // era\n case \"G\":\n return oneOf(loc.eras(\"short\"), 0);\n case \"GG\":\n return oneOf(loc.eras(\"long\"), 0);\n // years\n case \"y\":\n return intUnit(oneToSix);\n case \"yy\":\n return intUnit(twoToFour, untruncateYear);\n case \"yyyy\":\n return intUnit(four);\n case \"yyyyy\":\n return intUnit(fourToSix);\n case \"yyyyyy\":\n return intUnit(six);\n // months\n case \"M\":\n return intUnit(oneOrTwo);\n case \"MM\":\n return intUnit(two);\n case \"MMM\":\n return oneOf(loc.months(\"short\", true), 1);\n case \"MMMM\":\n return oneOf(loc.months(\"long\", true), 1);\n case \"L\":\n return intUnit(oneOrTwo);\n case \"LL\":\n return intUnit(two);\n case \"LLL\":\n return oneOf(loc.months(\"short\", false), 1);\n case \"LLLL\":\n return oneOf(loc.months(\"long\", false), 1);\n // dates\n case \"d\":\n return intUnit(oneOrTwo);\n case \"dd\":\n return intUnit(two);\n // ordinals\n case \"o\":\n return intUnit(oneToThree);\n case \"ooo\":\n return intUnit(three);\n // time\n case \"HH\":\n return intUnit(two);\n case \"H\":\n return intUnit(oneOrTwo);\n case \"hh\":\n return intUnit(two);\n case \"h\":\n return intUnit(oneOrTwo);\n case \"mm\":\n return intUnit(two);\n case \"m\":\n return intUnit(oneOrTwo);\n case \"q\":\n return intUnit(oneOrTwo);\n case \"qq\":\n return intUnit(two);\n case \"s\":\n return intUnit(oneOrTwo);\n case \"ss\":\n return intUnit(two);\n case \"S\":\n return intUnit(oneToThree);\n case \"SSS\":\n return intUnit(three);\n case \"u\":\n return simple(oneToNine);\n case \"uu\":\n return simple(oneOrTwo);\n case \"uuu\":\n return intUnit(one);\n // meridiem\n case \"a\":\n return oneOf(loc.meridiems(), 0);\n // weekYear (k)\n case \"kkkk\":\n return intUnit(four);\n case \"kk\":\n return intUnit(twoToFour, untruncateYear);\n // weekNumber (W)\n case \"W\":\n return intUnit(oneOrTwo);\n case \"WW\":\n return intUnit(two);\n // weekdays\n case \"E\":\n case \"c\":\n return intUnit(one);\n case \"EEE\":\n return oneOf(loc.weekdays(\"short\", false), 1);\n case \"EEEE\":\n return oneOf(loc.weekdays(\"long\", false), 1);\n case \"ccc\":\n return oneOf(loc.weekdays(\"short\", true), 1);\n case \"cccc\":\n return oneOf(loc.weekdays(\"long\", true), 1);\n // offset/zone\n case \"Z\":\n case \"ZZ\":\n return offset(new RegExp(\"([+-]\" + oneOrTwo.source + \")(?::(\" + two.source + \"))?\"), 2);\n case \"ZZZ\":\n return offset(new RegExp(\"([+-]\" + oneOrTwo.source + \")(\" + two.source + \")?\"), 2);\n // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing\n // because we don't have any way to figure out what they are\n case \"z\":\n return simple(/[a-z_+-/]{1,256}?/i);\n // this special-case \"token\" represents a place where a macro-token expanded into a white-space literal\n // in this case we accept any non-newline white-space\n case \" \":\n return simple(/[^\\S\\n\\r]/);\n default:\n return literal(t);\n }\n };\n var unit = unitate(token) || {\n invalidReason: MISSING_FTP\n };\n unit.token = token;\n return unit;\n}\nvar partTypeStyleToTokenVal = {\n year: {\n \"2-digit\": \"yy\",\n numeric: \"yyyyy\"\n },\n month: {\n numeric: \"M\",\n \"2-digit\": \"MM\",\n short: \"MMM\",\n long: \"MMMM\"\n },\n day: {\n numeric: \"d\",\n \"2-digit\": \"dd\"\n },\n weekday: {\n short: \"EEE\",\n long: \"EEEE\"\n },\n dayperiod: \"a\",\n dayPeriod: \"a\",\n hour12: {\n numeric: \"h\",\n \"2-digit\": \"hh\"\n },\n hour24: {\n numeric: \"H\",\n \"2-digit\": \"HH\"\n },\n minute: {\n numeric: \"m\",\n \"2-digit\": \"mm\"\n },\n second: {\n numeric: \"s\",\n \"2-digit\": \"ss\"\n },\n timeZoneName: {\n long: \"ZZZZZ\",\n short: \"ZZZ\"\n }\n};\nfunction tokenForPart(part, formatOpts, resolvedOpts) {\n var type = part.type,\n value = part.value;\n if (type === \"literal\") {\n var isSpace = /^\\s+$/.test(value);\n return {\n literal: !isSpace,\n val: isSpace ? \" \" : value\n };\n }\n var style = formatOpts[type];\n\n // The user might have explicitly specified hour12 or hourCycle\n // if so, respect their decision\n // if not, refer back to the resolvedOpts, which are based on the locale\n var actualType = type;\n if (type === \"hour\") {\n if (formatOpts.hour12 != null) {\n actualType = formatOpts.hour12 ? \"hour12\" : \"hour24\";\n } else if (formatOpts.hourCycle != null) {\n if (formatOpts.hourCycle === \"h11\" || formatOpts.hourCycle === \"h12\") {\n actualType = \"hour12\";\n } else {\n actualType = \"hour24\";\n }\n } else {\n // tokens only differentiate between 24 hours or not,\n // so we do not need to check hourCycle here, which is less supported anyways\n actualType = resolvedOpts.hour12 ? \"hour12\" : \"hour24\";\n }\n }\n var val = partTypeStyleToTokenVal[actualType];\n if (typeof val === \"object\") {\n val = val[style];\n }\n if (val) {\n return {\n literal: false,\n val: val\n };\n }\n return undefined;\n}\nfunction buildRegex(units) {\n var re = units.map(function (u) {\n return u.regex;\n }).reduce(function (f, r) {\n return f + \"(\" + r.source + \")\";\n }, \"\");\n return [\"^\" + re + \"$\", units];\n}\nfunction match(input, regex, handlers) {\n var matches = input.match(regex);\n if (matches) {\n var all = {};\n var matchIndex = 1;\n for (var i in handlers) {\n if (hasOwnProperty(handlers, i)) {\n var h = handlers[i],\n groups = h.groups ? h.groups + 1 : 1;\n if (!h.literal && h.token) {\n all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups));\n }\n matchIndex += groups;\n }\n }\n return [matches, all];\n } else {\n return [matches, {}];\n }\n}\nfunction dateTimeFromMatches(matches) {\n var toField = function toField(token) {\n switch (token) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n case \"H\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"o\":\n return \"ordinal\";\n case \"L\":\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n case \"E\":\n case \"c\":\n return \"weekday\";\n case \"W\":\n return \"weekNumber\";\n case \"k\":\n return \"weekYear\";\n case \"q\":\n return \"quarter\";\n default:\n return null;\n }\n };\n var zone = null;\n var specificOffset;\n if (!isUndefined(matches.z)) {\n zone = IANAZone.create(matches.z);\n }\n if (!isUndefined(matches.Z)) {\n if (!zone) {\n zone = new FixedOffsetZone(matches.Z);\n }\n specificOffset = matches.Z;\n }\n if (!isUndefined(matches.q)) {\n matches.M = (matches.q - 1) * 3 + 1;\n }\n if (!isUndefined(matches.h)) {\n if (matches.h < 12 && matches.a === 1) {\n matches.h += 12;\n } else if (matches.h === 12 && matches.a === 0) {\n matches.h = 0;\n }\n }\n if (matches.G === 0 && matches.y) {\n matches.y = -matches.y;\n }\n if (!isUndefined(matches.u)) {\n matches.S = parseMillis(matches.u);\n }\n var vals = Object.keys(matches).reduce(function (r, k) {\n var f = toField(k);\n if (f) {\n r[f] = matches[k];\n }\n return r;\n }, {});\n return [vals, zone, specificOffset];\n}\nvar dummyDateTimeCache = null;\nfunction getDummyDateTime() {\n if (!dummyDateTimeCache) {\n dummyDateTimeCache = DateTime.fromMillis(1555555555555);\n }\n return dummyDateTimeCache;\n}\nfunction maybeExpandMacroToken(token, locale) {\n if (token.literal) {\n return token;\n }\n var formatOpts = Formatter.macroTokenToFormatOpts(token.val);\n var tokens = formatOptsToTokens(formatOpts, locale);\n if (tokens == null || tokens.includes(undefined)) {\n return token;\n }\n return tokens;\n}\nfunction expandMacroTokens(tokens, locale) {\n var _Array$prototype;\n return (_Array$prototype = Array.prototype).concat.apply(_Array$prototype, tokens.map(function (t) {\n return maybeExpandMacroToken(t, locale);\n }));\n}\n\n/**\n * @private\n */\n\nfunction explainFromTokens(locale, input, format) {\n var tokens = expandMacroTokens(Formatter.parseFormat(format), locale),\n units = tokens.map(function (t) {\n return unitForToken(t, locale);\n }),\n disqualifyingUnit = units.find(function (t) {\n return t.invalidReason;\n });\n if (disqualifyingUnit) {\n return {\n input: input,\n tokens: tokens,\n invalidReason: disqualifyingUnit.invalidReason\n };\n } else {\n var _buildRegex = buildRegex(units),\n regexString = _buildRegex[0],\n handlers = _buildRegex[1],\n regex = RegExp(regexString, \"i\"),\n _match = match(input, regex, handlers),\n rawMatches = _match[0],\n matches = _match[1],\n _ref6 = matches ? dateTimeFromMatches(matches) : [null, null, undefined],\n result = _ref6[0],\n zone = _ref6[1],\n specificOffset = _ref6[2];\n if (hasOwnProperty(matches, \"a\") && hasOwnProperty(matches, \"H\")) {\n throw new ConflictingSpecificationError(\"Can't include meridiem when specifying 24-hour format\");\n }\n return {\n input: input,\n tokens: tokens,\n regex: regex,\n rawMatches: rawMatches,\n matches: matches,\n result: result,\n zone: zone,\n specificOffset: specificOffset\n };\n }\n}\nfunction parseFromTokens(locale, input, format) {\n var _explainFromTokens = explainFromTokens(locale, input, format),\n result = _explainFromTokens.result,\n zone = _explainFromTokens.zone,\n specificOffset = _explainFromTokens.specificOffset,\n invalidReason = _explainFromTokens.invalidReason;\n return [result, zone, specificOffset, invalidReason];\n}\nfunction formatOptsToTokens(formatOpts, locale) {\n if (!formatOpts) {\n return null;\n }\n var formatter = Formatter.create(locale, formatOpts);\n var df = formatter.dtFormatter(getDummyDateTime());\n var parts = df.formatToParts();\n var resolvedOpts = df.resolvedOptions();\n return parts.map(function (p) {\n return tokenForPart(p, formatOpts, resolvedOpts);\n });\n}\n\nvar INVALID = \"Invalid DateTime\";\nvar MAX_DATE = 8.64e15;\nfunction unsupportedZone(zone) {\n return new Invalid(\"unsupported zone\", \"the zone \\\"\" + zone.name + \"\\\" is not supported\");\n}\n\n// we cache week data on the DT object and this intermediates the cache\n/**\n * @param {DateTime} dt\n */\nfunction possiblyCachedWeekData(dt) {\n if (dt.weekData === null) {\n dt.weekData = gregorianToWeek(dt.c);\n }\n return dt.weekData;\n}\n\n/**\n * @param {DateTime} dt\n */\nfunction possiblyCachedLocalWeekData(dt) {\n if (dt.localWeekData === null) {\n dt.localWeekData = gregorianToWeek(dt.c, dt.loc.getMinDaysInFirstWeek(), dt.loc.getStartOfWeek());\n }\n return dt.localWeekData;\n}\n\n// clone really means, \"make a new object with these modifications\". all \"setters\" really use this\n// to create a new object while only changing some of the properties\nfunction clone(inst, alts) {\n var current = {\n ts: inst.ts,\n zone: inst.zone,\n c: inst.c,\n o: inst.o,\n loc: inst.loc,\n invalid: inst.invalid\n };\n return new DateTime(_extends({}, current, alts, {\n old: current\n }));\n}\n\n// find the right offset a given local time. The o input is our guess, which determines which\n// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)\nfunction fixOffset(localTS, o, tz) {\n // Our UTC time is just a guess because our offset is just a guess\n var utcGuess = localTS - o * 60 * 1000;\n\n // Test whether the zone matches the offset for this ts\n var o2 = tz.offset(utcGuess);\n\n // If so, offset didn't change and we're done\n if (o === o2) {\n return [utcGuess, o];\n }\n\n // If not, change the ts by the difference in the offset\n utcGuess -= (o2 - o) * 60 * 1000;\n\n // If that gives us the local time we want, we're done\n var o3 = tz.offset(utcGuess);\n if (o2 === o3) {\n return [utcGuess, o2];\n }\n\n // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];\n}\n\n// convert an epoch timestamp into a calendar object with the given offset\nfunction tsToObj(ts, offset) {\n ts += offset * 60 * 1000;\n var d = new Date(ts);\n return {\n year: d.getUTCFullYear(),\n month: d.getUTCMonth() + 1,\n day: d.getUTCDate(),\n hour: d.getUTCHours(),\n minute: d.getUTCMinutes(),\n second: d.getUTCSeconds(),\n millisecond: d.getUTCMilliseconds()\n };\n}\n\n// convert a calendar object to a epoch timestamp\nfunction objToTS(obj, offset, zone) {\n return fixOffset(objToLocalTS(obj), offset, zone);\n}\n\n// create a new DT instance by adding a duration, adjusting for DSTs\nfunction adjustTime(inst, dur) {\n var oPre = inst.o,\n year = inst.c.year + Math.trunc(dur.years),\n month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3,\n c = _extends({}, inst.c, {\n year: year,\n month: month,\n day: Math.min(inst.c.day, daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7\n }),\n millisToAdd = Duration.fromObject({\n years: dur.years - Math.trunc(dur.years),\n quarters: dur.quarters - Math.trunc(dur.quarters),\n months: dur.months - Math.trunc(dur.months),\n weeks: dur.weeks - Math.trunc(dur.weeks),\n days: dur.days - Math.trunc(dur.days),\n hours: dur.hours,\n minutes: dur.minutes,\n seconds: dur.seconds,\n milliseconds: dur.milliseconds\n }).as(\"milliseconds\"),\n localTS = objToLocalTS(c);\n var _fixOffset = fixOffset(localTS, oPre, inst.zone),\n ts = _fixOffset[0],\n o = _fixOffset[1];\n if (millisToAdd !== 0) {\n ts += millisToAdd;\n // that could have changed the offset by going over a DST, but we want to keep the ts the same\n o = inst.zone.offset(ts);\n }\n return {\n ts: ts,\n o: o\n };\n}\n\n// helper useful in turning the results of parsing into real dates\n// by handling the zone options\nfunction parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {\n var setZone = opts.setZone,\n zone = opts.zone;\n if (parsed && Object.keys(parsed).length !== 0 || parsedZone) {\n var interpretationZone = parsedZone || zone,\n inst = DateTime.fromObject(parsed, _extends({}, opts, {\n zone: interpretationZone,\n specificOffset: specificOffset\n }));\n return setZone ? inst : inst.setZone(zone);\n } else {\n return DateTime.invalid(new Invalid(\"unparsable\", \"the input \\\"\" + text + \"\\\" can't be parsed as \" + format));\n }\n}\n\n// if you want to output a technical format (e.g. RFC 2822), this helper\n// helps handle the details\nfunction toTechFormat(dt, format, allowZ) {\n if (allowZ === void 0) {\n allowZ = true;\n }\n return dt.isValid ? Formatter.create(Locale.create(\"en-US\"), {\n allowZ: allowZ,\n forceSimple: true\n }).formatDateTimeFromString(dt, format) : null;\n}\nfunction _toISODate(o, extended) {\n var longFormat = o.c.year > 9999 || o.c.year < 0;\n var c = \"\";\n if (longFormat && o.c.year >= 0) c += \"+\";\n c += padStart(o.c.year, longFormat ? 6 : 4);\n if (extended) {\n c += \"-\";\n c += padStart(o.c.month);\n c += \"-\";\n c += padStart(o.c.day);\n } else {\n c += padStart(o.c.month);\n c += padStart(o.c.day);\n }\n return c;\n}\nfunction _toISOTime(o, extended, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone) {\n var c = padStart(o.c.hour);\n if (extended) {\n c += \":\";\n c += padStart(o.c.minute);\n if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) {\n c += \":\";\n }\n } else {\n c += padStart(o.c.minute);\n }\n if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) {\n c += padStart(o.c.second);\n if (o.c.millisecond !== 0 || !suppressMilliseconds) {\n c += \".\";\n c += padStart(o.c.millisecond, 3);\n }\n }\n if (includeOffset) {\n if (o.isOffsetFixed && o.offset === 0 && !extendedZone) {\n c += \"Z\";\n } else if (o.o < 0) {\n c += \"-\";\n c += padStart(Math.trunc(-o.o / 60));\n c += \":\";\n c += padStart(Math.trunc(-o.o % 60));\n } else {\n c += \"+\";\n c += padStart(Math.trunc(o.o / 60));\n c += \":\";\n c += padStart(Math.trunc(o.o % 60));\n }\n }\n if (extendedZone) {\n c += \"[\" + o.zone.ianaName + \"]\";\n }\n return c;\n}\n\n// defaults for unspecified units in the supported calendars\nvar defaultUnitValues = {\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n },\n defaultWeekUnitValues = {\n weekNumber: 1,\n weekday: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n },\n defaultOrdinalUnitValues = {\n ordinal: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n };\n\n// Units in the supported calendars, sorted by bigness\nvar orderedUnits = [\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\", \"millisecond\"],\n orderedWeekUnits = [\"weekYear\", \"weekNumber\", \"weekday\", \"hour\", \"minute\", \"second\", \"millisecond\"],\n orderedOrdinalUnits = [\"year\", \"ordinal\", \"hour\", \"minute\", \"second\", \"millisecond\"];\n\n// standardize case and plurality in units\nfunction normalizeUnit(unit) {\n var normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit.toLowerCase()];\n if (!normalized) throw new InvalidUnitError(unit);\n return normalized;\n}\nfunction normalizeUnitWithLocalWeeks(unit) {\n switch (unit.toLowerCase()) {\n case \"localweekday\":\n case \"localweekdays\":\n return \"localWeekday\";\n case \"localweeknumber\":\n case \"localweeknumbers\":\n return \"localWeekNumber\";\n case \"localweekyear\":\n case \"localweekyears\":\n return \"localWeekYear\";\n default:\n return normalizeUnit(unit);\n }\n}\n\n// this is a dumbed down version of fromObject() that runs about 60% faster\n// but doesn't do any validation, makes a bunch of assumptions about what units\n// are present, and so on.\nfunction quickDT(obj, opts) {\n var zone = normalizeZone(opts.zone, Settings.defaultZone),\n loc = Locale.fromObject(opts),\n tsNow = Settings.now();\n var ts, o;\n\n // assume we have the higher-order units\n if (!isUndefined(obj.year)) {\n for (var _i = 0, _orderedUnits = orderedUnits; _i < _orderedUnits.length; _i++) {\n var u = _orderedUnits[_i];\n if (isUndefined(obj[u])) {\n obj[u] = defaultUnitValues[u];\n }\n }\n var invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj);\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n var offsetProvis = zone.offset(tsNow);\n var _objToTS = objToTS(obj, offsetProvis, zone);\n ts = _objToTS[0];\n o = _objToTS[1];\n } else {\n ts = tsNow;\n }\n return new DateTime({\n ts: ts,\n zone: zone,\n loc: loc,\n o: o\n });\n}\nfunction diffRelative(start, end, opts) {\n var round = isUndefined(opts.round) ? true : opts.round,\n format = function format(c, unit) {\n c = roundTo(c, round || opts.calendary ? 0 : 2, true);\n var formatter = end.loc.clone(opts).relFormatter(opts);\n return formatter.format(c, unit);\n },\n differ = function differ(unit) {\n if (opts.calendary) {\n if (!end.hasSame(start, unit)) {\n return end.startOf(unit).diff(start.startOf(unit), unit).get(unit);\n } else return 0;\n } else {\n return end.diff(start, unit).get(unit);\n }\n };\n if (opts.unit) {\n return format(differ(opts.unit), opts.unit);\n }\n for (var _iterator = _createForOfIteratorHelperLoose(opts.units), _step; !(_step = _iterator()).done;) {\n var unit = _step.value;\n var count = differ(unit);\n if (Math.abs(count) >= 1) {\n return format(count, unit);\n }\n }\n return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]);\n}\nfunction lastOpts(argList) {\n var opts = {},\n args;\n if (argList.length > 0 && typeof argList[argList.length - 1] === \"object\") {\n opts = argList[argList.length - 1];\n args = Array.from(argList).slice(0, argList.length - 1);\n } else {\n args = Array.from(argList);\n }\n return [opts, args];\n}\n\n/**\n * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them.\n *\n * A DateTime comprises of:\n * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch.\n * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone).\n * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`.\n *\n * Here is a brief overview of the most commonly used functionality it provides:\n *\n * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link DateTime.local}, {@link DateTime.utc}, and (most flexibly) {@link DateTime.fromObject}. To create one from a standard string format, use {@link DateTime.fromISO}, {@link DateTime.fromHTTP}, and {@link DateTime.fromRFC2822}. To create one from a custom string format, use {@link DateTime.fromFormat}. To create one from a native JS date, use {@link DateTime.fromJSDate}.\n * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link DateTime#toObject}), use the {@link DateTime#year}, {@link DateTime#month},\n * {@link DateTime#day}, {@link DateTime#hour}, {@link DateTime#minute}, {@link DateTime#second}, {@link DateTime#millisecond} accessors.\n * * **Week calendar**: For ISO week calendar attributes, see the {@link DateTime#weekYear}, {@link DateTime#weekNumber}, and {@link DateTime#weekday} accessors.\n * * **Configuration** See the {@link DateTime#locale} and {@link DateTime#numberingSystem} accessors.\n * * **Transformation**: To transform the DateTime into other DateTimes, use {@link DateTime#set}, {@link DateTime#reconfigure}, {@link DateTime#setZone}, {@link DateTime#setLocale}, {@link DateTime.plus}, {@link DateTime#minus}, {@link DateTime#endOf}, {@link DateTime#startOf}, {@link DateTime#toUTC}, and {@link DateTime#toLocal}.\n * * **Output**: To convert the DateTime to other representations, use the {@link DateTime#toRelative}, {@link DateTime#toRelativeCalendar}, {@link DateTime#toJSON}, {@link DateTime#toISO}, {@link DateTime#toHTTP}, {@link DateTime#toObject}, {@link DateTime#toRFC2822}, {@link DateTime#toString}, {@link DateTime#toLocaleString}, {@link DateTime#toFormat}, {@link DateTime#toMillis} and {@link DateTime#toJSDate}.\n *\n * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation.\n */\nvar DateTime = /*#__PURE__*/function (_Symbol$for) {\n /**\n * @access private\n */\n function DateTime(config) {\n var zone = config.zone || Settings.defaultZone;\n var invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid(\"invalid input\") : null) || (!zone.isValid ? unsupportedZone(zone) : null);\n /**\n * @access private\n */\n this.ts = isUndefined(config.ts) ? Settings.now() : config.ts;\n var c = null,\n o = null;\n if (!invalid) {\n var unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);\n if (unchanged) {\n var _ref = [config.old.c, config.old.o];\n c = _ref[0];\n o = _ref[1];\n } else {\n var ot = zone.offset(this.ts);\n c = tsToObj(this.ts, ot);\n invalid = Number.isNaN(c.year) ? new Invalid(\"invalid input\") : null;\n c = invalid ? null : c;\n o = invalid ? null : ot;\n }\n }\n\n /**\n * @access private\n */\n this._zone = zone;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.invalid = invalid;\n /**\n * @access private\n */\n this.weekData = null;\n /**\n * @access private\n */\n this.localWeekData = null;\n /**\n * @access private\n */\n this.c = c;\n /**\n * @access private\n */\n this.o = o;\n /**\n * @access private\n */\n this.isLuxonDateTime = true;\n }\n\n // CONSTRUCT\n\n /**\n * Create a DateTime for the current instant, in the system's time zone.\n *\n * Use Settings to override these default values if needed.\n * @example DateTime.now().toISO() //~> now in the ISO format\n * @return {DateTime}\n */\n DateTime.now = function now() {\n return new DateTime({});\n }\n\n /**\n * Create a local DateTime\n * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month, 1-indexed\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @example DateTime.local() //~> now\n * @example DateTime.local({ zone: \"America/New_York\" }) //~> now, in US east coast time\n * @example DateTime.local(2017) //~> 2017-01-01T00:00:00\n * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00\n * @example DateTime.local(2017, 3, 12, { locale: \"fr\" }) //~> 2017-03-12T00:00:00, with a French locale\n * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00\n * @example DateTime.local(2017, 3, 12, 5, { zone: \"utc\" }) //~> 2017-03-12T05:00:00, in UTC\n * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00\n * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10\n * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765\n * @return {DateTime}\n */;\n DateTime.local = function local() {\n var _lastOpts = lastOpts(arguments),\n opts = _lastOpts[0],\n args = _lastOpts[1],\n year = args[0],\n month = args[1],\n day = args[2],\n hour = args[3],\n minute = args[4],\n second = args[5],\n millisecond = args[6];\n return quickDT({\n year: year,\n month: month,\n day: day,\n hour: hour,\n minute: minute,\n second: second,\n millisecond: millisecond\n }, opts);\n }\n\n /**\n * Create a DateTime in UTC\n * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @param {Object} options - configuration options for the DateTime\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance\n * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance\n * @example DateTime.utc() //~> now\n * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z\n * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z\n * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: \"fr\" }) //~> 2017-03-12T05:45:00Z with a French locale\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: \"fr\" }) //~> 2017-03-12T05:45:10.765Z with a French locale\n * @return {DateTime}\n */;\n DateTime.utc = function utc() {\n var _lastOpts2 = lastOpts(arguments),\n opts = _lastOpts2[0],\n args = _lastOpts2[1],\n year = args[0],\n month = args[1],\n day = args[2],\n hour = args[3],\n minute = args[4],\n second = args[5],\n millisecond = args[6];\n opts.zone = FixedOffsetZone.utcInstance;\n return quickDT({\n year: year,\n month: month,\n day: day,\n hour: hour,\n minute: minute,\n second: second,\n millisecond: millisecond\n }, opts);\n }\n\n /**\n * Create a DateTime from a JavaScript Date object. Uses the default zone.\n * @param {Date} date - a JavaScript Date object\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @return {DateTime}\n */;\n DateTime.fromJSDate = function fromJSDate(date, options) {\n if (options === void 0) {\n options = {};\n }\n var ts = isDate(date) ? date.valueOf() : NaN;\n if (Number.isNaN(ts)) {\n return DateTime.invalid(\"invalid input\");\n }\n var zoneToUse = normalizeZone(options.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n return new DateTime({\n ts: ts,\n zone: zoneToUse,\n loc: Locale.fromObject(options)\n });\n }\n\n /**\n * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} milliseconds - a number of milliseconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @return {DateTime}\n */;\n DateTime.fromMillis = function fromMillis(milliseconds, options) {\n if (options === void 0) {\n options = {};\n }\n if (!isNumber(milliseconds)) {\n throw new InvalidArgumentError(\"fromMillis requires a numerical input, but received a \" + typeof milliseconds + \" with value \" + milliseconds);\n } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {\n // this isn't perfect because because we can still end up out of range because of additional shifting, but it's a start\n return DateTime.invalid(\"Timestamp out of range\");\n } else {\n return new DateTime({\n ts: milliseconds,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options)\n });\n }\n }\n\n /**\n * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} seconds - a number of seconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @return {DateTime}\n */;\n DateTime.fromSeconds = function fromSeconds(seconds, options) {\n if (options === void 0) {\n options = {};\n }\n if (!isNumber(seconds)) {\n throw new InvalidArgumentError(\"fromSeconds requires a numerical input\");\n } else {\n return new DateTime({\n ts: seconds * 1000,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options)\n });\n }\n }\n\n /**\n * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.year - a year, such as 1987\n * @param {number} obj.month - a month, 1-12\n * @param {number} obj.day - a day of the month, 1-31, depending on the month\n * @param {number} obj.ordinal - day of the year, 1-365 or 366\n * @param {number} obj.weekYear - an ISO week year\n * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year\n * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday\n * @param {number} obj.localWeekYear - a week year, according to the locale\n * @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale\n * @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale\n * @param {number} obj.hour - hour of the day, 0-23\n * @param {number} obj.minute - minute of the hour, 0-59\n * @param {number} obj.second - second of the minute, 0-59\n * @param {number} obj.millisecond - millisecond of the second, 0-999\n * @param {Object} opts - options for creating this DateTime\n * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()\n * @param {string} [opts.locale='system\\'s locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'\n * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }),\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' })\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' })\n * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'\n * @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: \"en-US\" }).toISODate() //=> '2021-12-26'\n * @return {DateTime}\n */;\n DateTime.fromObject = function fromObject(obj, opts) {\n if (opts === void 0) {\n opts = {};\n }\n obj = obj || {};\n var zoneToUse = normalizeZone(opts.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n var loc = Locale.fromObject(opts);\n var normalized = normalizeObject(obj, normalizeUnitWithLocalWeeks);\n var _usesLocalWeekValues = usesLocalWeekValues(normalized, loc),\n minDaysInFirstWeek = _usesLocalWeekValues.minDaysInFirstWeek,\n startOfWeek = _usesLocalWeekValues.startOfWeek;\n var tsNow = Settings.now(),\n offsetProvis = !isUndefined(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n\n // cases:\n // just a weekday -> this week's instance of that weekday, no worries\n // (gregorian data or ordinal) + (weekYear or weekNumber) -> error\n // (gregorian month or day) + ordinal -> error\n // otherwise just use weeks or ordinals or gregorian, depending on what's specified\n\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\"Can't mix weekYear/weekNumber units with year/month/day or ordinals\");\n }\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n var useWeekData = definiteWeekDef || normalized.weekday && !containsGregor;\n\n // configure ourselves to deal with gregorian dates or week stuff\n var units,\n defaultValues,\n objNow = tsToObj(tsNow, offsetProvis);\n if (useWeekData) {\n units = orderedWeekUnits;\n defaultValues = defaultWeekUnitValues;\n objNow = gregorianToWeek(objNow, minDaysInFirstWeek, startOfWeek);\n } else if (containsOrdinal) {\n units = orderedOrdinalUnits;\n defaultValues = defaultOrdinalUnitValues;\n objNow = gregorianToOrdinal(objNow);\n } else {\n units = orderedUnits;\n defaultValues = defaultUnitValues;\n }\n\n // set default values for missing stuff\n var foundFirst = false;\n for (var _iterator2 = _createForOfIteratorHelperLoose(units), _step2; !(_step2 = _iterator2()).done;) {\n var u = _step2.value;\n var v = normalized[u];\n if (!isUndefined(v)) {\n foundFirst = true;\n } else if (foundFirst) {\n normalized[u] = defaultValues[u];\n } else {\n normalized[u] = objNow[u];\n }\n }\n\n // make sure the values we have are in range\n var higherOrderInvalid = useWeekData ? hasInvalidWeekData(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? hasInvalidOrdinalData(normalized) : hasInvalidGregorianData(normalized),\n invalid = higherOrderInvalid || hasInvalidTimeData(normalized);\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n // compute the actual time\n var gregorian = useWeekData ? weekToGregorian(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? ordinalToGregorian(normalized) : normalized,\n _objToTS2 = objToTS(gregorian, offsetProvis, zoneToUse),\n tsFinal = _objToTS2[0],\n offsetFinal = _objToTS2[1],\n inst = new DateTime({\n ts: tsFinal,\n zone: zoneToUse,\n o: offsetFinal,\n loc: loc\n });\n\n // gregorian data + weekday serves only to validate\n if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {\n return DateTime.invalid(\"mismatched weekday\", \"you can't specify both a weekday of \" + normalized.weekday + \" and a date of \" + inst.toISO());\n }\n return inst;\n }\n\n /**\n * Create a DateTime from an ISO 8601 string\n * @param {string} text - the ISO string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance\n * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromISO('2016-05-25T09:08:34.123')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})\n * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})\n * @example DateTime.fromISO('2016-W05-4')\n * @return {DateTime}\n */;\n DateTime.fromISO = function fromISO(text, opts) {\n if (opts === void 0) {\n opts = {};\n }\n var _parseISODate = parseISODate(text),\n vals = _parseISODate[0],\n parsedZone = _parseISODate[1];\n return parseDataToDateTime(vals, parsedZone, opts, \"ISO 8601\", text);\n }\n\n /**\n * Create a DateTime from an RFC 2822 string\n * @param {string} text - the RFC 2822 string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')\n * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')\n * @return {DateTime}\n */;\n DateTime.fromRFC2822 = function fromRFC2822(text, opts) {\n if (opts === void 0) {\n opts = {};\n }\n var _parseRFC2822Date = parseRFC2822Date(text),\n vals = _parseRFC2822Date[0],\n parsedZone = _parseRFC2822Date[1];\n return parseDataToDateTime(vals, parsedZone, opts, \"RFC 2822\", text);\n }\n\n /**\n * Create a DateTime from an HTTP header date\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @param {string} text - the HTTP header date\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994')\n * @return {DateTime}\n */;\n DateTime.fromHTTP = function fromHTTP(text, opts) {\n if (opts === void 0) {\n opts = {};\n }\n var _parseHTTPDate = parseHTTPDate(text),\n vals = _parseHTTPDate[0],\n parsedZone = _parseHTTPDate[1];\n return parseDataToDateTime(vals, parsedZone, opts, \"HTTP\", opts);\n }\n\n /**\n * Create a DateTime from an input string and format string.\n * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens).\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @return {DateTime}\n */;\n DateTime.fromFormat = function fromFormat(text, fmt, opts) {\n if (opts === void 0) {\n opts = {};\n }\n if (isUndefined(text) || isUndefined(fmt)) {\n throw new InvalidArgumentError(\"fromFormat requires an input string and a format\");\n }\n var _opts = opts,\n _opts$locale = _opts.locale,\n locale = _opts$locale === void 0 ? null : _opts$locale,\n _opts$numberingSystem = _opts.numberingSystem,\n numberingSystem = _opts$numberingSystem === void 0 ? null : _opts$numberingSystem,\n localeToUse = Locale.fromOpts({\n locale: locale,\n numberingSystem: numberingSystem,\n defaultToEN: true\n }),\n _parseFromTokens = parseFromTokens(localeToUse, text, fmt),\n vals = _parseFromTokens[0],\n parsedZone = _parseFromTokens[1],\n specificOffset = _parseFromTokens[2],\n invalid = _parseFromTokens[3];\n if (invalid) {\n return DateTime.invalid(invalid);\n } else {\n return parseDataToDateTime(vals, parsedZone, opts, \"format \" + fmt, text, specificOffset);\n }\n }\n\n /**\n * @deprecated use fromFormat instead\n */;\n DateTime.fromString = function fromString(text, fmt, opts) {\n if (opts === void 0) {\n opts = {};\n }\n return DateTime.fromFormat(text, fmt, opts);\n }\n\n /**\n * Create a DateTime from a SQL date, time, or datetime\n * Defaults to en-US if no locale has been specified, regardless of the system's locale\n * @param {string} text - the string to parse\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @example DateTime.fromSQL('2017-05-15')\n * @example DateTime.fromSQL('2017-05-15 09:12:34')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })\n * @example DateTime.fromSQL('09:12:34.342')\n * @return {DateTime}\n */;\n DateTime.fromSQL = function fromSQL(text, opts) {\n if (opts === void 0) {\n opts = {};\n }\n var _parseSQL = parseSQL(text),\n vals = _parseSQL[0],\n parsedZone = _parseSQL[1];\n return parseDataToDateTime(vals, parsedZone, opts, \"SQL\", text);\n }\n\n /**\n * Create an invalid DateTime.\n * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent.\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {DateTime}\n */;\n DateTime.invalid = function invalid(reason, explanation) {\n if (explanation === void 0) {\n explanation = null;\n }\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the DateTime is invalid\");\n }\n var invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n if (Settings.throwOnInvalid) {\n throw new InvalidDateTimeError(invalid);\n } else {\n return new DateTime({\n invalid: invalid\n });\n }\n }\n\n /**\n * Check if an object is an instance of DateTime. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */;\n DateTime.isDateTime = function isDateTime(o) {\n return o && o.isLuxonDateTime || false;\n }\n\n /**\n * Produce the format string for a set of options\n * @param formatOpts\n * @param localeOpts\n * @returns {string}\n */;\n DateTime.parseFormatForOpts = function parseFormatForOpts(formatOpts, localeOpts) {\n if (localeOpts === void 0) {\n localeOpts = {};\n }\n var tokenList = formatOptsToTokens(formatOpts, Locale.fromObject(localeOpts));\n return !tokenList ? null : tokenList.map(function (t) {\n return t ? t.val : null;\n }).join(\"\");\n }\n\n /**\n * Produce the the fully expanded format token for the locale\n * Does NOT quote characters, so quoted tokens will not round trip correctly\n * @param fmt\n * @param localeOpts\n * @returns {string}\n */;\n DateTime.expandFormat = function expandFormat(fmt, localeOpts) {\n if (localeOpts === void 0) {\n localeOpts = {};\n }\n var expanded = expandMacroTokens(Formatter.parseFormat(fmt), Locale.fromObject(localeOpts));\n return expanded.map(function (t) {\n return t.val;\n }).join(\"\");\n }\n\n // INFO\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example DateTime.local(2017, 7, 4).get('month'); //=> 7\n * @example DateTime.local(2017, 7, 4).get('day'); //=> 4\n * @return {number}\n */;\n var _proto = DateTime.prototype;\n _proto.get = function get(unit) {\n return this[unit];\n }\n\n /**\n * Returns whether the DateTime is valid. Invalid DateTimes occur when:\n * * The DateTime was created from invalid calendar information, such as the 13th month or February 30\n * * The DateTime was created by an operation on another invalid date\n * @type {boolean}\n */;\n /**\n * Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC\n * in this DateTime's zone. During DST changes local time can be ambiguous, for example\n * `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`.\n * This method will return both possible DateTimes if this DateTime's local time is ambiguous.\n * @returns {DateTime[]}\n */\n _proto.getPossibleOffsets = function getPossibleOffsets() {\n if (!this.isValid || this.isOffsetFixed) {\n return [this];\n }\n var dayMs = 86400000;\n var minuteMs = 60000;\n var localTS = objToLocalTS(this.c);\n var oEarlier = this.zone.offset(localTS - dayMs);\n var oLater = this.zone.offset(localTS + dayMs);\n var o1 = this.zone.offset(localTS - oEarlier * minuteMs);\n var o2 = this.zone.offset(localTS - oLater * minuteMs);\n if (o1 === o2) {\n return [this];\n }\n var ts1 = localTS - o1 * minuteMs;\n var ts2 = localTS - o2 * minuteMs;\n var c1 = tsToObj(ts1, o1);\n var c2 = tsToObj(ts2, o2);\n if (c1.hour === c2.hour && c1.minute === c2.minute && c1.second === c2.second && c1.millisecond === c2.millisecond) {\n return [clone(this, {\n ts: ts1\n }), clone(this, {\n ts: ts2\n })];\n }\n return [this];\n }\n\n /**\n * Returns true if this DateTime is in a leap year, false otherwise\n * @example DateTime.local(2016).isInLeapYear //=> true\n * @example DateTime.local(2013).isInLeapYear //=> false\n * @type {boolean}\n */;\n /**\n * Returns the resolved Intl options for this DateTime.\n * This is useful in understanding the behavior of formatting methods\n * @param {Object} opts - the same options as toLocaleString\n * @return {Object}\n */\n _proto.resolvedLocaleOptions = function resolvedLocaleOptions(opts) {\n if (opts === void 0) {\n opts = {};\n }\n var _Formatter$create$res = Formatter.create(this.loc.clone(opts), opts).resolvedOptions(this),\n locale = _Formatter$create$res.locale,\n numberingSystem = _Formatter$create$res.numberingSystem,\n calendar = _Formatter$create$res.calendar;\n return {\n locale: locale,\n numberingSystem: numberingSystem,\n outputCalendar: calendar\n };\n }\n\n // TRANSFORM\n\n /**\n * \"Set\" the DateTime's zone to UTC. Returns a newly-constructed DateTime.\n *\n * Equivalent to {@link DateTime#setZone}('utc')\n * @param {number} [offset=0] - optionally, an offset from UTC in minutes\n * @param {Object} [opts={}] - options to pass to `setZone()`\n * @return {DateTime}\n */;\n _proto.toUTC = function toUTC(offset, opts) {\n if (offset === void 0) {\n offset = 0;\n }\n if (opts === void 0) {\n opts = {};\n }\n return this.setZone(FixedOffsetZone.instance(offset), opts);\n }\n\n /**\n * \"Set\" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.\n *\n * Equivalent to `setZone('local')`\n * @return {DateTime}\n */;\n _proto.toLocal = function toLocal() {\n return this.setZone(Settings.defaultZone);\n }\n\n /**\n * \"Set\" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.\n *\n * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.\n * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.\n * @param {Object} opts - options\n * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.\n * @return {DateTime}\n */;\n _proto.setZone = function setZone(zone, _temp) {\n var _ref2 = _temp === void 0 ? {} : _temp,\n _ref2$keepLocalTime = _ref2.keepLocalTime,\n keepLocalTime = _ref2$keepLocalTime === void 0 ? false : _ref2$keepLocalTime,\n _ref2$keepCalendarTim = _ref2.keepCalendarTime,\n keepCalendarTime = _ref2$keepCalendarTim === void 0 ? false : _ref2$keepCalendarTim;\n zone = normalizeZone(zone, Settings.defaultZone);\n if (zone.equals(this.zone)) {\n return this;\n } else if (!zone.isValid) {\n return DateTime.invalid(unsupportedZone(zone));\n } else {\n var newTS = this.ts;\n if (keepLocalTime || keepCalendarTime) {\n var offsetGuess = zone.offset(this.ts);\n var asObj = this.toObject();\n var _objToTS3 = objToTS(asObj, offsetGuess, zone);\n newTS = _objToTS3[0];\n }\n return clone(this, {\n ts: newTS,\n zone: zone\n });\n }\n }\n\n /**\n * \"Set\" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.\n * @param {Object} properties - the properties to set\n * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })\n * @return {DateTime}\n */;\n _proto.reconfigure = function reconfigure(_temp2) {\n var _ref3 = _temp2 === void 0 ? {} : _temp2,\n locale = _ref3.locale,\n numberingSystem = _ref3.numberingSystem,\n outputCalendar = _ref3.outputCalendar;\n var loc = this.loc.clone({\n locale: locale,\n numberingSystem: numberingSystem,\n outputCalendar: outputCalendar\n });\n return clone(this, {\n loc: loc\n });\n }\n\n /**\n * \"Set\" the locale. Returns a newly-constructed DateTime.\n * Just a convenient alias for reconfigure({ locale })\n * @example DateTime.local(2017, 5, 25).setLocale('en-GB')\n * @return {DateTime}\n */;\n _proto.setLocale = function setLocale(locale) {\n return this.reconfigure({\n locale: locale\n });\n }\n\n /**\n * \"Set\" the values of specified units. Returns a newly-constructed DateTime.\n * You can only set units with this method; for \"setting\" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.\n *\n * This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`.\n * They cannot be mixed with ISO-week units like `weekday`.\n * @param {Object} values - a mapping of units to numbers\n * @example dt.set({ year: 2017 })\n * @example dt.set({ hour: 8, minute: 30 })\n * @example dt.set({ weekday: 5 })\n * @example dt.set({ year: 2005, ordinal: 234 })\n * @return {DateTime}\n */;\n _proto.set = function set(values) {\n if (!this.isValid) return this;\n var normalized = normalizeObject(values, normalizeUnitWithLocalWeeks);\n var _usesLocalWeekValues2 = usesLocalWeekValues(normalized, this.loc),\n minDaysInFirstWeek = _usesLocalWeekValues2.minDaysInFirstWeek,\n startOfWeek = _usesLocalWeekValues2.startOfWeek;\n var settingWeekStuff = !isUndefined(normalized.weekYear) || !isUndefined(normalized.weekNumber) || !isUndefined(normalized.weekday),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\"Can't mix weekYear/weekNumber units with year/month/day or ordinals\");\n }\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n var mixed;\n if (settingWeekStuff) {\n mixed = weekToGregorian(_extends({}, gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), normalized), minDaysInFirstWeek, startOfWeek);\n } else if (!isUndefined(normalized.ordinal)) {\n mixed = ordinalToGregorian(_extends({}, gregorianToOrdinal(this.c), normalized));\n } else {\n mixed = _extends({}, this.toObject(), normalized);\n\n // if we didn't set the day but we ended up on an overflow date,\n // use the last day of the right month\n if (isUndefined(normalized.day)) {\n mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day);\n }\n }\n var _objToTS4 = objToTS(mixed, this.o, this.zone),\n ts = _objToTS4[0],\n o = _objToTS4[1];\n return clone(this, {\n ts: ts,\n o: o\n });\n }\n\n /**\n * Add a period of time to this DateTime and return the resulting DateTime\n *\n * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @example DateTime.now().plus(123) //~> in 123 milliseconds\n * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes\n * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow\n * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday\n * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min\n * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min\n * @return {DateTime}\n */;\n _proto.plus = function plus(duration) {\n if (!this.isValid) return this;\n var dur = Duration.fromDurationLike(duration);\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * Subtract a period of time to this DateTime and return the resulting DateTime\n * See {@link DateTime#plus}\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n @return {DateTime}\n */;\n _proto.minus = function minus(duration) {\n if (!this.isValid) return this;\n var dur = Duration.fromDurationLike(duration).negate();\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * \"Set\" this DateTime to the beginning of a unit of time.\n * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week\n * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'\n * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'\n * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'\n * @return {DateTime}\n */;\n _proto.startOf = function startOf(unit, _temp3) {\n var _ref4 = _temp3 === void 0 ? {} : _temp3,\n _ref4$useLocaleWeeks = _ref4.useLocaleWeeks,\n useLocaleWeeks = _ref4$useLocaleWeeks === void 0 ? false : _ref4$useLocaleWeeks;\n if (!this.isValid) return this;\n var o = {},\n normalizedUnit = Duration.normalizeUnit(unit);\n switch (normalizedUnit) {\n case \"years\":\n o.month = 1;\n // falls through\n case \"quarters\":\n case \"months\":\n o.day = 1;\n // falls through\n case \"weeks\":\n case \"days\":\n o.hour = 0;\n // falls through\n case \"hours\":\n o.minute = 0;\n // falls through\n case \"minutes\":\n o.second = 0;\n // falls through\n case \"seconds\":\n o.millisecond = 0;\n break;\n // no default, invalid units throw in normalizeUnit()\n }\n\n if (normalizedUnit === \"weeks\") {\n if (useLocaleWeeks) {\n var startOfWeek = this.loc.getStartOfWeek();\n var weekday = this.weekday;\n if (weekday < startOfWeek) {\n o.weekNumber = this.weekNumber - 1;\n }\n o.weekday = startOfWeek;\n } else {\n o.weekday = 1;\n }\n }\n if (normalizedUnit === \"quarters\") {\n var q = Math.ceil(this.month / 3);\n o.month = (q - 1) * 3 + 1;\n }\n return this.set(o);\n }\n\n /**\n * \"Set\" this DateTime to the end (meaning the last millisecond) of a unit of time\n * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week\n * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'\n * @return {DateTime}\n */;\n _proto.endOf = function endOf(unit, opts) {\n var _this$plus;\n return this.isValid ? this.plus((_this$plus = {}, _this$plus[unit] = 1, _this$plus)).startOf(unit, opts).minus(1) : this;\n }\n\n // OUTPUT\n\n /**\n * Returns a string representation of this DateTime formatted according to the specified format string.\n * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).\n * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n * @param {string} fmt - the format string\n * @param {Object} opts - opts to override the configuration options on this DateTime\n * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22'\n * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'\n * @example DateTime.now().toFormat('yyyy LLL dd', { locale: \"fr\" }) //=> '2017 avr. 22'\n * @example DateTime.now().toFormat(\"HH 'hours and' mm 'minutes'\") //=> '20 hours and 55 minutes'\n * @return {string}\n */;\n _proto.toFormat = function toFormat(fmt, opts) {\n if (opts === void 0) {\n opts = {};\n }\n return this.isValid ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : INVALID;\n }\n\n /**\n * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.\n * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation\n * of the DateTime in the assigned locale.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options\n * @param {Object} opts - opts to override the configuration options on this DateTime\n * @example DateTime.now().toLocaleString(); //=> 4/20/2017\n * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'\n * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'\n * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022'\n * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'\n * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'\n * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'\n * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'\n * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'\n * @return {string}\n */;\n _proto.toLocaleString = function toLocaleString(formatOpts, opts) {\n if (formatOpts === void 0) {\n formatOpts = DATE_SHORT;\n }\n if (opts === void 0) {\n opts = {};\n }\n return this.isValid ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this) : INVALID;\n }\n\n /**\n * Returns an array of format \"parts\", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts\n * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.\n * @example DateTime.now().toLocaleParts(); //=> [\n * //=> { type: 'day', value: '25' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'month', value: '05' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'year', value: '1982' }\n * //=> ]\n */;\n _proto.toLocaleParts = function toLocaleParts(opts) {\n if (opts === void 0) {\n opts = {};\n }\n return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : [];\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.extendedZone=false] - add the time zone format extension\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'\n * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'\n * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'\n * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'\n * @return {string}\n */;\n _proto.toISO = function toISO(_temp4) {\n var _ref5 = _temp4 === void 0 ? {} : _temp4,\n _ref5$format = _ref5.format,\n format = _ref5$format === void 0 ? \"extended\" : _ref5$format,\n _ref5$suppressSeconds = _ref5.suppressSeconds,\n suppressSeconds = _ref5$suppressSeconds === void 0 ? false : _ref5$suppressSeconds,\n _ref5$suppressMillise = _ref5.suppressMilliseconds,\n suppressMilliseconds = _ref5$suppressMillise === void 0 ? false : _ref5$suppressMillise,\n _ref5$includeOffset = _ref5.includeOffset,\n includeOffset = _ref5$includeOffset === void 0 ? true : _ref5$includeOffset,\n _ref5$extendedZone = _ref5.extendedZone,\n extendedZone = _ref5$extendedZone === void 0 ? false : _ref5$extendedZone;\n if (!this.isValid) {\n return null;\n }\n var ext = format === \"extended\";\n var c = _toISODate(this, ext);\n c += \"T\";\n c += _toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone);\n return c;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's date component\n * @param {Object} opts - options\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'\n * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'\n * @return {string}\n */;\n _proto.toISODate = function toISODate(_temp5) {\n var _ref6 = _temp5 === void 0 ? {} : _temp5,\n _ref6$format = _ref6.format,\n format = _ref6$format === void 0 ? \"extended\" : _ref6$format;\n if (!this.isValid) {\n return null;\n }\n return _toISODate(this, format === \"extended\");\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's week date\n * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'\n * @return {string}\n */;\n _proto.toISOWeekDate = function toISOWeekDate() {\n return toTechFormat(this, \"kkkk-'W'WW-c\");\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's time component\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.extendedZone=true] - add the time zone format extension\n * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z'\n * @return {string}\n */;\n _proto.toISOTime = function toISOTime(_temp6) {\n var _ref7 = _temp6 === void 0 ? {} : _temp6,\n _ref7$suppressMillise = _ref7.suppressMilliseconds,\n suppressMilliseconds = _ref7$suppressMillise === void 0 ? false : _ref7$suppressMillise,\n _ref7$suppressSeconds = _ref7.suppressSeconds,\n suppressSeconds = _ref7$suppressSeconds === void 0 ? false : _ref7$suppressSeconds,\n _ref7$includeOffset = _ref7.includeOffset,\n includeOffset = _ref7$includeOffset === void 0 ? true : _ref7$includeOffset,\n _ref7$includePrefix = _ref7.includePrefix,\n includePrefix = _ref7$includePrefix === void 0 ? false : _ref7$includePrefix,\n _ref7$extendedZone = _ref7.extendedZone,\n extendedZone = _ref7$extendedZone === void 0 ? false : _ref7$extendedZone,\n _ref7$format = _ref7.format,\n format = _ref7$format === void 0 ? \"extended\" : _ref7$format;\n if (!this.isValid) {\n return null;\n }\n var c = includePrefix ? \"T\" : \"\";\n return c + _toISOTime(this, format === \"extended\", suppressSeconds, suppressMilliseconds, includeOffset, extendedZone);\n }\n\n /**\n * Returns an RFC 2822-compatible string representation of this DateTime\n * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'\n * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'\n * @return {string}\n */;\n _proto.toRFC2822 = function toRFC2822() {\n return toTechFormat(this, \"EEE, dd LLL yyyy HH:mm:ss ZZZ\", false);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.\n * Specifically, the string conforms to RFC 1123.\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'\n * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'\n * @return {string}\n */;\n _proto.toHTTP = function toHTTP() {\n return toTechFormat(this.toUTC(), \"EEE, dd LLL yyyy HH:mm:ss 'GMT'\");\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Date\n * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'\n * @return {string}\n */;\n _proto.toSQLDate = function toSQLDate() {\n if (!this.isValid) {\n return null;\n }\n return _toISODate(this, true);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Time\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n * @example DateTime.utc().toSQL() //=> '05:15:16.345'\n * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00'\n * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345'\n * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'\n * @return {string}\n */;\n _proto.toSQLTime = function toSQLTime(_temp7) {\n var _ref8 = _temp7 === void 0 ? {} : _temp7,\n _ref8$includeOffset = _ref8.includeOffset,\n includeOffset = _ref8$includeOffset === void 0 ? true : _ref8$includeOffset,\n _ref8$includeZone = _ref8.includeZone,\n includeZone = _ref8$includeZone === void 0 ? false : _ref8$includeZone,\n _ref8$includeOffsetSp = _ref8.includeOffsetSpace,\n includeOffsetSpace = _ref8$includeOffsetSp === void 0 ? true : _ref8$includeOffsetSp;\n var fmt = \"HH:mm:ss.SSS\";\n if (includeZone || includeOffset) {\n if (includeOffsetSpace) {\n fmt += \" \";\n }\n if (includeZone) {\n fmt += \"z\";\n } else if (includeOffset) {\n fmt += \"ZZ\";\n }\n }\n return toTechFormat(this, fmt, true);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'\n * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'\n * @return {string}\n */;\n _proto.toSQL = function toSQL(opts) {\n if (opts === void 0) {\n opts = {};\n }\n if (!this.isValid) {\n return null;\n }\n return this.toSQLDate() + \" \" + this.toSQLTime(opts);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for debugging\n * @return {string}\n */;\n _proto.toString = function toString() {\n return this.isValid ? this.toISO() : INVALID;\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for the REPL.\n * @return {string}\n */;\n _proto[_Symbol$for] = function () {\n if (this.isValid) {\n return \"DateTime { ts: \" + this.toISO() + \", zone: \" + this.zone.name + \", locale: \" + this.locale + \" }\";\n } else {\n return \"DateTime { Invalid, reason: \" + this.invalidReason + \" }\";\n }\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}\n * @return {number}\n */;\n _proto.valueOf = function valueOf() {\n return this.toMillis();\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime.\n * @return {number}\n */;\n _proto.toMillis = function toMillis() {\n return this.isValid ? this.ts : NaN;\n }\n\n /**\n * Returns the epoch seconds of this DateTime.\n * @return {number}\n */;\n _proto.toSeconds = function toSeconds() {\n return this.isValid ? this.ts / 1000 : NaN;\n }\n\n /**\n * Returns the epoch seconds (as a whole number) of this DateTime.\n * @return {number}\n */;\n _proto.toUnixInteger = function toUnixInteger() {\n return this.isValid ? Math.floor(this.ts / 1000) : NaN;\n }\n\n /**\n * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.\n * @return {string}\n */;\n _proto.toJSON = function toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns a BSON serializable equivalent to this DateTime.\n * @return {Date}\n */;\n _proto.toBSON = function toBSON() {\n return this.toJSDate();\n }\n\n /**\n * Returns a JavaScript object with this DateTime's year, month, day, and so on.\n * @param opts - options for generating the object\n * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }\n * @return {Object}\n */;\n _proto.toObject = function toObject(opts) {\n if (opts === void 0) {\n opts = {};\n }\n if (!this.isValid) return {};\n var base = _extends({}, this.c);\n if (opts.includeConfig) {\n base.outputCalendar = this.outputCalendar;\n base.numberingSystem = this.loc.numberingSystem;\n base.locale = this.loc.locale;\n }\n return base;\n }\n\n /**\n * Returns a JavaScript Date equivalent to this DateTime.\n * @return {Date}\n */;\n _proto.toJSDate = function toJSDate() {\n return new Date(this.isValid ? this.ts : NaN);\n }\n\n // COMPARE\n\n /**\n * Return the difference between two DateTimes as a Duration.\n * @param {DateTime} otherDateTime - the DateTime to compare this one to\n * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example\n * var i1 = DateTime.fromISO('1982-05-25T09:45'),\n * i2 = DateTime.fromISO('1983-10-14T10:30');\n * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }\n * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }\n * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }\n * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }\n * @return {Duration}\n */;\n _proto.diff = function diff(otherDateTime, unit, opts) {\n if (unit === void 0) {\n unit = \"milliseconds\";\n }\n if (opts === void 0) {\n opts = {};\n }\n if (!this.isValid || !otherDateTime.isValid) {\n return Duration.invalid(\"created by diffing an invalid DateTime\");\n }\n var durOpts = _extends({\n locale: this.locale,\n numberingSystem: this.numberingSystem\n }, opts);\n var units = maybeArray(unit).map(Duration.normalizeUnit),\n otherIsLater = otherDateTime.valueOf() > this.valueOf(),\n earlier = otherIsLater ? this : otherDateTime,\n later = otherIsLater ? otherDateTime : this,\n diffed = _diff(earlier, later, units, durOpts);\n return otherIsLater ? diffed.negate() : diffed;\n }\n\n /**\n * Return the difference between this DateTime and right now.\n * See {@link DateTime#diff}\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */;\n _proto.diffNow = function diffNow(unit, opts) {\n if (unit === void 0) {\n unit = \"milliseconds\";\n }\n if (opts === void 0) {\n opts = {};\n }\n return this.diff(DateTime.now(), unit, opts);\n }\n\n /**\n * Return an Interval spanning between this DateTime and another DateTime\n * @param {DateTime} otherDateTime - the other end point of the Interval\n * @return {Interval}\n */;\n _proto.until = function until(otherDateTime) {\n return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this;\n }\n\n /**\n * Return whether this DateTime is in the same unit of time as another DateTime.\n * Higher-order units must also be identical for this function to return `true`.\n * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.\n * @param {DateTime} otherDateTime - the other DateTime\n * @param {string} unit - the unit of time to check sameness on\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used\n * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day\n * @return {boolean}\n */;\n _proto.hasSame = function hasSame(otherDateTime, unit, opts) {\n if (!this.isValid) return false;\n var inputMs = otherDateTime.valueOf();\n var adjustedToZone = this.setZone(otherDateTime.zone, {\n keepLocalTime: true\n });\n return adjustedToZone.startOf(unit, opts) <= inputMs && inputMs <= adjustedToZone.endOf(unit, opts);\n }\n\n /**\n * Equality check\n * Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid.\n * To compare just the millisecond values, use `+dt1 === +dt2`.\n * @param {DateTime} other - the other DateTime\n * @return {boolean}\n */;\n _proto.equals = function equals(other) {\n return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc);\n }\n\n /**\n * Returns a string representation of a this time relative to now, such as \"in two days\". Can only internationalize if your\n * platform supports Intl.RelativeTimeFormat. Rounds down by default.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} [options.style=\"long\"] - the style of units, must be \"long\", \"short\", or \"narrow\"\n * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of \"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", or \"seconds\"\n * @param {boolean} [options.round=true] - whether to round the numbers in the output.\n * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.now().plus({ days: 1 }).toRelative() //=> \"in 1 day\"\n * @example DateTime.now().setLocale(\"es\").toRelative({ days: 1 }) //=> \"dentro de 1 día\"\n * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: \"fr\" }) //=> \"dans 23 heures\"\n * @example DateTime.now().minus({ days: 2 }).toRelative() //=> \"2 days ago\"\n * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: \"hours\" }) //=> \"48 hours ago\"\n * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> \"1.5 days ago\"\n */;\n _proto.toRelative = function toRelative(options) {\n if (options === void 0) {\n options = {};\n }\n if (!this.isValid) return null;\n var base = options.base || DateTime.fromObject({}, {\n zone: this.zone\n }),\n padding = options.padding ? this < base ? -options.padding : options.padding : 0;\n var units = [\"years\", \"months\", \"days\", \"hours\", \"minutes\", \"seconds\"];\n var unit = options.unit;\n if (Array.isArray(options.unit)) {\n units = options.unit;\n unit = undefined;\n }\n return diffRelative(base, this.plus(padding), _extends({}, options, {\n numeric: \"always\",\n units: units,\n unit: unit\n }));\n }\n\n /**\n * Returns a string representation of this date relative to today, such as \"yesterday\" or \"next month\".\n * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", or \"days\"\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> \"tomorrow\"\n * @example DateTime.now().setLocale(\"es\").plus({ days: 1 }).toRelative() //=> \"\"mañana\"\n * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: \"fr\" }) //=> \"demain\"\n * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> \"2 days ago\"\n */;\n _proto.toRelativeCalendar = function toRelativeCalendar(options) {\n if (options === void 0) {\n options = {};\n }\n if (!this.isValid) return null;\n return diffRelative(options.base || DateTime.fromObject({}, {\n zone: this.zone\n }), this, _extends({}, options, {\n numeric: \"auto\",\n units: [\"years\", \"months\", \"days\"],\n calendary: true\n }));\n }\n\n /**\n * Return the min of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum\n * @return {DateTime} the min DateTime, or undefined if called with no argument\n */;\n DateTime.min = function min() {\n for (var _len = arguments.length, dateTimes = new Array(_len), _key = 0; _key < _len; _key++) {\n dateTimes[_key] = arguments[_key];\n }\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"min requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, function (i) {\n return i.valueOf();\n }, Math.min);\n }\n\n /**\n * Return the max of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum\n * @return {DateTime} the max DateTime, or undefined if called with no argument\n */;\n DateTime.max = function max() {\n for (var _len2 = arguments.length, dateTimes = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n dateTimes[_key2] = arguments[_key2];\n }\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"max requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, function (i) {\n return i.valueOf();\n }, Math.max);\n }\n\n // MISC\n\n /**\n * Explain how a string would be parsed by fromFormat()\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see description)\n * @param {Object} options - options taken by fromFormat()\n * @return {Object}\n */;\n DateTime.fromFormatExplain = function fromFormatExplain(text, fmt, options) {\n if (options === void 0) {\n options = {};\n }\n var _options = options,\n _options$locale = _options.locale,\n locale = _options$locale === void 0 ? null : _options$locale,\n _options$numberingSys = _options.numberingSystem,\n numberingSystem = _options$numberingSys === void 0 ? null : _options$numberingSys,\n localeToUse = Locale.fromOpts({\n locale: locale,\n numberingSystem: numberingSystem,\n defaultToEN: true\n });\n return explainFromTokens(localeToUse, text, fmt);\n }\n\n /**\n * @deprecated use fromFormatExplain instead\n */;\n DateTime.fromStringExplain = function fromStringExplain(text, fmt, options) {\n if (options === void 0) {\n options = {};\n }\n return DateTime.fromFormatExplain(text, fmt, options);\n }\n\n // FORMAT PRESETS\n\n /**\n * {@link DateTime#toLocaleString} format like 10/14/1983\n * @type {Object}\n */;\n _createClass(DateTime, [{\n key: \"isValid\",\n get: function get() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this DateTime is invalid, or null if the DateTime is valid\n * @type {string}\n */\n }, {\n key: \"invalidReason\",\n get: function get() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid\n * @type {string}\n */\n }, {\n key: \"invalidExplanation\",\n get: function get() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime\n *\n * @type {string}\n */\n }, {\n key: \"locale\",\n get: function get() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime\n *\n * @type {string}\n */\n }, {\n key: \"numberingSystem\",\n get: function get() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime\n *\n * @type {string}\n */\n }, {\n key: \"outputCalendar\",\n get: function get() {\n return this.isValid ? this.loc.outputCalendar : null;\n }\n\n /**\n * Get the time zone associated with this DateTime.\n * @type {Zone}\n */\n }, {\n key: \"zone\",\n get: function get() {\n return this._zone;\n }\n\n /**\n * Get the name of the time zone.\n * @type {string}\n */\n }, {\n key: \"zoneName\",\n get: function get() {\n return this.isValid ? this.zone.name : null;\n }\n\n /**\n * Get the year\n * @example DateTime.local(2017, 5, 25).year //=> 2017\n * @type {number}\n */\n }, {\n key: \"year\",\n get: function get() {\n return this.isValid ? this.c.year : NaN;\n }\n\n /**\n * Get the quarter\n * @example DateTime.local(2017, 5, 25).quarter //=> 2\n * @type {number}\n */\n }, {\n key: \"quarter\",\n get: function get() {\n return this.isValid ? Math.ceil(this.c.month / 3) : NaN;\n }\n\n /**\n * Get the month (1-12).\n * @example DateTime.local(2017, 5, 25).month //=> 5\n * @type {number}\n */\n }, {\n key: \"month\",\n get: function get() {\n return this.isValid ? this.c.month : NaN;\n }\n\n /**\n * Get the day of the month (1-30ish).\n * @example DateTime.local(2017, 5, 25).day //=> 25\n * @type {number}\n */\n }, {\n key: \"day\",\n get: function get() {\n return this.isValid ? this.c.day : NaN;\n }\n\n /**\n * Get the hour of the day (0-23).\n * @example DateTime.local(2017, 5, 25, 9).hour //=> 9\n * @type {number}\n */\n }, {\n key: \"hour\",\n get: function get() {\n return this.isValid ? this.c.hour : NaN;\n }\n\n /**\n * Get the minute of the hour (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30\n * @type {number}\n */\n }, {\n key: \"minute\",\n get: function get() {\n return this.isValid ? this.c.minute : NaN;\n }\n\n /**\n * Get the second of the minute (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52\n * @type {number}\n */\n }, {\n key: \"second\",\n get: function get() {\n return this.isValid ? this.c.second : NaN;\n }\n\n /**\n * Get the millisecond of the second (0-999).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654\n * @type {number}\n */\n }, {\n key: \"millisecond\",\n get: function get() {\n return this.isValid ? this.c.millisecond : NaN;\n }\n\n /**\n * Get the week year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 12, 31).weekYear //=> 2015\n * @type {number}\n */\n }, {\n key: \"weekYear\",\n get: function get() {\n return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the week number of the week year (1-52ish).\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2017, 5, 25).weekNumber //=> 21\n * @type {number}\n */\n }, {\n key: \"weekNumber\",\n get: function get() {\n return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the day of the week.\n * 1 is Monday and 7 is Sunday\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 11, 31).weekday //=> 4\n * @type {number}\n */\n }, {\n key: \"weekday\",\n get: function get() {\n return this.isValid ? possiblyCachedWeekData(this).weekday : NaN;\n }\n\n /**\n * Returns true if this date is on a weekend according to the locale, false otherwise\n * @returns {boolean}\n */\n }, {\n key: \"isWeekend\",\n get: function get() {\n return this.isValid && this.loc.getWeekendDays().includes(this.weekday);\n }\n\n /**\n * Get the day of the week according to the locale.\n * 1 is the first day of the week and 7 is the last day of the week.\n * If the locale assigns Sunday as the first day of the week, then a date which is a Sunday will return 1,\n * @returns {number}\n */\n }, {\n key: \"localWeekday\",\n get: function get() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekday : NaN;\n }\n\n /**\n * Get the week number of the week year according to the locale. Different locales assign week numbers differently,\n * because the week can start on different days of the week (see localWeekday) and because a different number of days\n * is required for a week to count as the first week of a year.\n * @returns {number}\n */\n }, {\n key: \"localWeekNumber\",\n get: function get() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the week year according to the locale. Different locales assign week numbers (and therefor week years)\n * differently, see localWeekNumber.\n * @returns {number}\n */\n }, {\n key: \"localWeekYear\",\n get: function get() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the ordinal (meaning the day of the year)\n * @example DateTime.local(2017, 5, 25).ordinal //=> 145\n * @type {number|DateTime}\n */\n }, {\n key: \"ordinal\",\n get: function get() {\n return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN;\n }\n\n /**\n * Get the human readable short month name, such as 'Oct'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthShort //=> Oct\n * @type {string}\n */\n }, {\n key: \"monthShort\",\n get: function get() {\n return this.isValid ? Info.months(\"short\", {\n locObj: this.loc\n })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable long month name, such as 'October'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthLong //=> October\n * @type {string}\n */\n }, {\n key: \"monthLong\",\n get: function get() {\n return this.isValid ? Info.months(\"long\", {\n locObj: this.loc\n })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable short weekday, such as 'Mon'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon\n * @type {string}\n */\n }, {\n key: \"weekdayShort\",\n get: function get() {\n return this.isValid ? Info.weekdays(\"short\", {\n locObj: this.loc\n })[this.weekday - 1] : null;\n }\n\n /**\n * Get the human readable long weekday, such as 'Monday'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday\n * @type {string}\n */\n }, {\n key: \"weekdayLong\",\n get: function get() {\n return this.isValid ? Info.weekdays(\"long\", {\n locObj: this.loc\n })[this.weekday - 1] : null;\n }\n\n /**\n * Get the UTC offset of this DateTime in minutes\n * @example DateTime.now().offset //=> -240\n * @example DateTime.utc().offset //=> 0\n * @type {number}\n */\n }, {\n key: \"offset\",\n get: function get() {\n return this.isValid ? +this.o : NaN;\n }\n\n /**\n * Get the short human name for the zone's current offset, for example \"EST\" or \"EDT\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n }, {\n key: \"offsetNameShort\",\n get: function get() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"short\",\n locale: this.locale\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get the long human name for the zone's current offset, for example \"Eastern Standard Time\" or \"Eastern Daylight Time\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n }, {\n key: \"offsetNameLong\",\n get: function get() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"long\",\n locale: this.locale\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get whether this zone's offset ever changes, as in a DST.\n * @type {boolean}\n */\n }, {\n key: \"isOffsetFixed\",\n get: function get() {\n return this.isValid ? this.zone.isUniversal : null;\n }\n\n /**\n * Get whether the DateTime is in a DST.\n * @type {boolean}\n */\n }, {\n key: \"isInDST\",\n get: function get() {\n if (this.isOffsetFixed) {\n return false;\n } else {\n return this.offset > this.set({\n month: 1,\n day: 1\n }).offset || this.offset > this.set({\n month: 5\n }).offset;\n }\n }\n }, {\n key: \"isInLeapYear\",\n get: function get() {\n return isLeapYear(this.year);\n }\n\n /**\n * Returns the number of days in this DateTime's month\n * @example DateTime.local(2016, 2).daysInMonth //=> 29\n * @example DateTime.local(2016, 3).daysInMonth //=> 31\n * @type {number}\n */\n }, {\n key: \"daysInMonth\",\n get: function get() {\n return daysInMonth(this.year, this.month);\n }\n\n /**\n * Returns the number of days in this DateTime's year\n * @example DateTime.local(2016).daysInYear //=> 366\n * @example DateTime.local(2013).daysInYear //=> 365\n * @type {number}\n */\n }, {\n key: \"daysInYear\",\n get: function get() {\n return this.isValid ? daysInYear(this.year) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2004).weeksInWeekYear //=> 53\n * @example DateTime.local(2013).weeksInWeekYear //=> 52\n * @type {number}\n */\n }, {\n key: \"weeksInWeekYear\",\n get: function get() {\n return this.isValid ? weeksInWeekYear(this.weekYear) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's local week year\n * @example DateTime.local(2020, 6, {locale: 'en-US'}).weeksInLocalWeekYear //=> 52\n * @example DateTime.local(2020, 6, {locale: 'de-DE'}).weeksInLocalWeekYear //=> 53\n * @type {number}\n */\n }, {\n key: \"weeksInLocalWeekYear\",\n get: function get() {\n return this.isValid ? weeksInWeekYear(this.localWeekYear, this.loc.getMinDaysInFirstWeek(), this.loc.getStartOfWeek()) : NaN;\n }\n }], [{\n key: \"DATE_SHORT\",\n get: function get() {\n return DATE_SHORT;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983'\n * @type {Object}\n */\n }, {\n key: \"DATE_MED\",\n get: function get() {\n return DATE_MED;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'\n * @type {Object}\n */\n }, {\n key: \"DATE_MED_WITH_WEEKDAY\",\n get: function get() {\n return DATE_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983'\n * @type {Object}\n */\n }, {\n key: \"DATE_FULL\",\n get: function get() {\n return DATE_FULL;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'\n * @type {Object}\n */\n }, {\n key: \"DATE_HUGE\",\n get: function get() {\n return DATE_HUGE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n }, {\n key: \"TIME_SIMPLE\",\n get: function get() {\n return TIME_SIMPLE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n }, {\n key: \"TIME_WITH_SECONDS\",\n get: function get() {\n return TIME_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n }, {\n key: \"TIME_WITH_SHORT_OFFSET\",\n get: function get() {\n return TIME_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n }, {\n key: \"TIME_WITH_LONG_OFFSET\",\n get: function get() {\n return TIME_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30', always 24-hour.\n * @type {Object}\n */\n }, {\n key: \"TIME_24_SIMPLE\",\n get: function get() {\n return TIME_24_SIMPLE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.\n * @type {Object}\n */\n }, {\n key: \"TIME_24_WITH_SECONDS\",\n get: function get() {\n return TIME_24_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.\n * @type {Object}\n */\n }, {\n key: \"TIME_24_WITH_SHORT_OFFSET\",\n get: function get() {\n return TIME_24_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.\n * @type {Object}\n */\n }, {\n key: \"TIME_24_WITH_LONG_OFFSET\",\n get: function get() {\n return TIME_24_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n }, {\n key: \"DATETIME_SHORT\",\n get: function get() {\n return DATETIME_SHORT;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n }, {\n key: \"DATETIME_SHORT_WITH_SECONDS\",\n get: function get() {\n return DATETIME_SHORT_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n }, {\n key: \"DATETIME_MED\",\n get: function get() {\n return DATETIME_MED;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n }, {\n key: \"DATETIME_MED_WITH_SECONDS\",\n get: function get() {\n return DATETIME_MED_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n }, {\n key: \"DATETIME_MED_WITH_WEEKDAY\",\n get: function get() {\n return DATETIME_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n }, {\n key: \"DATETIME_FULL\",\n get: function get() {\n return DATETIME_FULL;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n }, {\n key: \"DATETIME_FULL_WITH_SECONDS\",\n get: function get() {\n return DATETIME_FULL_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n }, {\n key: \"DATETIME_HUGE\",\n get: function get() {\n return DATETIME_HUGE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n }, {\n key: \"DATETIME_HUGE_WITH_SECONDS\",\n get: function get() {\n return DATETIME_HUGE_WITH_SECONDS;\n }\n }]);\n return DateTime;\n}(Symbol.for(\"nodejs.util.inspect.custom\"));\nfunction friendlyDateTime(dateTimeish) {\n if (DateTime.isDateTime(dateTimeish)) {\n return dateTimeish;\n } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) {\n return DateTime.fromJSDate(dateTimeish);\n } else if (dateTimeish && typeof dateTimeish === \"object\") {\n return DateTime.fromObject(dateTimeish);\n } else {\n throw new InvalidArgumentError(\"Unknown datetime argument: \" + dateTimeish + \", of type \" + typeof dateTimeish);\n }\n}\n\nvar VERSION = \"3.4.4\";\n\nexports.DateTime = DateTime;\nexports.Duration = Duration;\nexports.FixedOffsetZone = FixedOffsetZone;\nexports.IANAZone = IANAZone;\nexports.Info = Info;\nexports.Interval = Interval;\nexports.InvalidZone = InvalidZone;\nexports.Settings = Settings;\nexports.SystemZone = SystemZone;\nexports.VERSION = VERSION;\nexports.Zone = Zone;\n//# sourceMappingURL=luxon.js.map\n","// these aren't really private, but nor are they really useful to document\n\n/**\n * @private\n */\nclass LuxonError extends Error {}\n\n/**\n * @private\n */\nexport class InvalidDateTimeError extends LuxonError {\n constructor(reason) {\n super(`Invalid DateTime: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidIntervalError extends LuxonError {\n constructor(reason) {\n super(`Invalid Interval: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidDurationError extends LuxonError {\n constructor(reason) {\n super(`Invalid Duration: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class ConflictingSpecificationError extends LuxonError {}\n\n/**\n * @private\n */\nexport class InvalidUnitError extends LuxonError {\n constructor(unit) {\n super(`Invalid unit ${unit}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidArgumentError extends LuxonError {}\n\n/**\n * @private\n */\nexport class ZoneIsAbstractError extends LuxonError {\n constructor() {\n super(\"Zone is an abstract class\");\n }\n}\n","/**\n * @private\n */\n\nconst n = \"numeric\",\n s = \"short\",\n l = \"long\";\n\nexport const DATE_SHORT = {\n year: n,\n month: n,\n day: n,\n};\n\nexport const DATE_MED = {\n year: n,\n month: s,\n day: n,\n};\n\nexport const DATE_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s,\n};\n\nexport const DATE_FULL = {\n year: n,\n month: l,\n day: n,\n};\n\nexport const DATE_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n};\n\nexport const TIME_SIMPLE = {\n hour: n,\n minute: n,\n};\n\nexport const TIME_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n,\n};\n\nexport const TIME_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s,\n};\n\nexport const TIME_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l,\n};\n\nexport const TIME_24_SIMPLE = {\n hour: n,\n minute: n,\n hourCycle: \"h23\",\n};\n\nexport const TIME_24_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n};\n\nexport const TIME_24_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n timeZoneName: s,\n};\n\nexport const TIME_24_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n timeZoneName: l,\n};\n\nexport const DATETIME_SHORT = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n,\n};\n\nexport const DATETIME_SHORT_WITH_SECONDS = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n,\n second: n,\n};\n\nexport const DATETIME_MED = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n,\n};\n\nexport const DATETIME_MED_WITH_SECONDS = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n,\n second: n,\n};\n\nexport const DATETIME_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s,\n hour: n,\n minute: n,\n};\n\nexport const DATETIME_FULL = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n timeZoneName: s,\n};\n\nexport const DATETIME_FULL_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s,\n};\n\nexport const DATETIME_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n timeZoneName: l,\n};\n\nexport const DATETIME_HUGE_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l,\n};\n","import { ZoneIsAbstractError } from \"./errors.js\";\n\n/**\n * @interface\n */\nexport default class Zone {\n /**\n * The type of zone\n * @abstract\n * @type {string}\n */\n get type() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * The name of this zone.\n * @abstract\n * @type {string}\n */\n get name() {\n throw new ZoneIsAbstractError();\n }\n\n get ianaName() {\n return this.name;\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year.\n * @abstract\n * @type {boolean}\n */\n get isUniversal() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's common name (such as EST) at the specified timestamp\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the name\n * @param {Object} opts - Options to affect the format\n * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n * @param {string} opts.locale - What locale to return the offset name in.\n * @return {string}\n */\n offsetName(ts, opts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's value as a string\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to compute the offset\n * @return {number}\n */\n offset(ts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is equal to another zone\n * @abstract\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is valid.\n * @abstract\n * @type {boolean}\n */\n get isValid() {\n throw new ZoneIsAbstractError();\n }\n}\n","import { formatOffset, parseZoneInfo } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * Represents the local zone for this JavaScript environment.\n * @implements {Zone}\n */\nexport default class SystemZone extends Zone {\n /**\n * Get a singleton instance of the local zone\n * @return {SystemZone}\n */\n static get instance() {\n if (singleton === null) {\n singleton = new SystemZone();\n }\n return singleton;\n }\n\n /** @override **/\n get type() {\n return \"system\";\n }\n\n /** @override **/\n get name() {\n return new Intl.DateTimeFormat().resolvedOptions().timeZone;\n }\n\n /** @override **/\n get isUniversal() {\n return false;\n }\n\n /** @override **/\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale);\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/\n offset(ts) {\n return -new Date(ts).getTimezoneOffset();\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"system\";\n }\n\n /** @override **/\n get isValid() {\n return true;\n }\n}\n","import { formatOffset, parseZoneInfo, isUndefined, objToLocalTS } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet dtfCache = {};\nfunction makeDTF(zone) {\n if (!dtfCache[zone]) {\n dtfCache[zone] = new Intl.DateTimeFormat(\"en-US\", {\n hour12: false,\n timeZone: zone,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n era: \"short\",\n });\n }\n return dtfCache[zone];\n}\n\nconst typeToPos = {\n year: 0,\n month: 1,\n day: 2,\n era: 3,\n hour: 4,\n minute: 5,\n second: 6,\n};\n\nfunction hackyOffset(dtf, date) {\n const formatted = dtf.format(date).replace(/\\u200E/g, \"\"),\n parsed = /(\\d+)\\/(\\d+)\\/(\\d+) (AD|BC),? (\\d+):(\\d+):(\\d+)/.exec(formatted),\n [, fMonth, fDay, fYear, fadOrBc, fHour, fMinute, fSecond] = parsed;\n return [fYear, fMonth, fDay, fadOrBc, fHour, fMinute, fSecond];\n}\n\nfunction partsOffset(dtf, date) {\n const formatted = dtf.formatToParts(date);\n const filled = [];\n for (let i = 0; i < formatted.length; i++) {\n const { type, value } = formatted[i];\n const pos = typeToPos[type];\n\n if (type === \"era\") {\n filled[pos] = value;\n } else if (!isUndefined(pos)) {\n filled[pos] = parseInt(value, 10);\n }\n }\n return filled;\n}\n\nlet ianaZoneCache = {};\n/**\n * A zone identified by an IANA identifier, like America/New_York\n * @implements {Zone}\n */\nexport default class IANAZone extends Zone {\n /**\n * @param {string} name - Zone name\n * @return {IANAZone}\n */\n static create(name) {\n if (!ianaZoneCache[name]) {\n ianaZoneCache[name] = new IANAZone(name);\n }\n return ianaZoneCache[name];\n }\n\n /**\n * Reset local caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCache() {\n ianaZoneCache = {};\n dtfCache = {};\n }\n\n /**\n * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.\n * @param {string} s - The string to check validity on\n * @example IANAZone.isValidSpecifier(\"America/New_York\") //=> true\n * @example IANAZone.isValidSpecifier(\"Sport~~blorp\") //=> false\n * @deprecated This method returns false for some valid IANA names. Use isValidZone instead.\n * @return {boolean}\n */\n static isValidSpecifier(s) {\n return this.isValidZone(s);\n }\n\n /**\n * Returns whether the provided string identifies a real zone\n * @param {string} zone - The string to check\n * @example IANAZone.isValidZone(\"America/New_York\") //=> true\n * @example IANAZone.isValidZone(\"Fantasia/Castle\") //=> false\n * @example IANAZone.isValidZone(\"Sport~~blorp\") //=> false\n * @return {boolean}\n */\n static isValidZone(zone) {\n if (!zone) {\n return false;\n }\n try {\n new Intl.DateTimeFormat(\"en-US\", { timeZone: zone }).format();\n return true;\n } catch (e) {\n return false;\n }\n }\n\n constructor(name) {\n super();\n /** @private **/\n this.zoneName = name;\n /** @private **/\n this.valid = IANAZone.isValidZone(name);\n }\n\n /** @override **/\n get type() {\n return \"iana\";\n }\n\n /** @override **/\n get name() {\n return this.zoneName;\n }\n\n /** @override **/\n get isUniversal() {\n return false;\n }\n\n /** @override **/\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale, this.name);\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/\n offset(ts) {\n const date = new Date(ts);\n\n if (isNaN(date)) return NaN;\n\n const dtf = makeDTF(this.name);\n let [year, month, day, adOrBc, hour, minute, second] = dtf.formatToParts\n ? partsOffset(dtf, date)\n : hackyOffset(dtf, date);\n\n if (adOrBc === \"BC\") {\n year = -Math.abs(year) + 1;\n }\n\n // because we're using hour12 and https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat\n const adjustedHour = hour === 24 ? 0 : hour;\n\n const asUTC = objToLocalTS({\n year,\n month,\n day,\n hour: adjustedHour,\n minute,\n second,\n millisecond: 0,\n });\n\n let asTS = +date;\n const over = asTS % 1000;\n asTS -= over >= 0 ? over : 1000 + over;\n return (asUTC - asTS) / (60 * 1000);\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"iana\" && otherZone.name === this.name;\n }\n\n /** @override **/\n get isValid() {\n return this.valid;\n }\n}\n","import { hasLocaleWeekInfo, hasRelative, padStart, roundTo, validateWeekSettings } from \"./util.js\";\nimport * as English from \"./english.js\";\nimport Settings from \"../settings.js\";\nimport DateTime from \"../datetime.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\n\n// todo - remap caching\n\nlet intlLFCache = {};\nfunction getCachedLF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let dtf = intlLFCache[key];\n if (!dtf) {\n dtf = new Intl.ListFormat(locString, opts);\n intlLFCache[key] = dtf;\n }\n return dtf;\n}\n\nlet intlDTCache = {};\nfunction getCachedDTF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let dtf = intlDTCache[key];\n if (!dtf) {\n dtf = new Intl.DateTimeFormat(locString, opts);\n intlDTCache[key] = dtf;\n }\n return dtf;\n}\n\nlet intlNumCache = {};\nfunction getCachedINF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let inf = intlNumCache[key];\n if (!inf) {\n inf = new Intl.NumberFormat(locString, opts);\n intlNumCache[key] = inf;\n }\n return inf;\n}\n\nlet intlRelCache = {};\nfunction getCachedRTF(locString, opts = {}) {\n const { base, ...cacheKeyOpts } = opts; // exclude `base` from the options\n const key = JSON.stringify([locString, cacheKeyOpts]);\n let inf = intlRelCache[key];\n if (!inf) {\n inf = new Intl.RelativeTimeFormat(locString, opts);\n intlRelCache[key] = inf;\n }\n return inf;\n}\n\nlet sysLocaleCache = null;\nfunction systemLocale() {\n if (sysLocaleCache) {\n return sysLocaleCache;\n } else {\n sysLocaleCache = new Intl.DateTimeFormat().resolvedOptions().locale;\n return sysLocaleCache;\n }\n}\n\nlet weekInfoCache = {};\nfunction getCachedWeekInfo(locString) {\n let data = weekInfoCache[locString];\n if (!data) {\n const locale = new Intl.Locale(locString);\n // browsers currently implement this as a property, but spec says it should be a getter function\n data = \"getWeekInfo\" in locale ? locale.getWeekInfo() : locale.weekInfo;\n weekInfoCache[locString] = data;\n }\n return data;\n}\n\nfunction parseLocaleString(localeStr) {\n // I really want to avoid writing a BCP 47 parser\n // see, e.g. https://github.com/wooorm/bcp-47\n // Instead, we'll do this:\n\n // a) if the string has no -u extensions, just leave it alone\n // b) if it does, use Intl to resolve everything\n // c) if Intl fails, try again without the -u\n\n // private subtags and unicode subtags have ordering requirements,\n // and we're not properly parsing this, so just strip out the\n // private ones if they exist.\n const xIndex = localeStr.indexOf(\"-x-\");\n if (xIndex !== -1) {\n localeStr = localeStr.substring(0, xIndex);\n }\n\n const uIndex = localeStr.indexOf(\"-u-\");\n if (uIndex === -1) {\n return [localeStr];\n } else {\n let options;\n let selectedStr;\n try {\n options = getCachedDTF(localeStr).resolvedOptions();\n selectedStr = localeStr;\n } catch (e) {\n const smaller = localeStr.substring(0, uIndex);\n options = getCachedDTF(smaller).resolvedOptions();\n selectedStr = smaller;\n }\n\n const { numberingSystem, calendar } = options;\n return [selectedStr, numberingSystem, calendar];\n }\n}\n\nfunction intlConfigString(localeStr, numberingSystem, outputCalendar) {\n if (outputCalendar || numberingSystem) {\n if (!localeStr.includes(\"-u-\")) {\n localeStr += \"-u\";\n }\n\n if (outputCalendar) {\n localeStr += `-ca-${outputCalendar}`;\n }\n\n if (numberingSystem) {\n localeStr += `-nu-${numberingSystem}`;\n }\n return localeStr;\n } else {\n return localeStr;\n }\n}\n\nfunction mapMonths(f) {\n const ms = [];\n for (let i = 1; i <= 12; i++) {\n const dt = DateTime.utc(2009, i, 1);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction mapWeekdays(f) {\n const ms = [];\n for (let i = 1; i <= 7; i++) {\n const dt = DateTime.utc(2016, 11, 13 + i);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction listStuff(loc, length, englishFn, intlFn) {\n const mode = loc.listingMode();\n\n if (mode === \"error\") {\n return null;\n } else if (mode === \"en\") {\n return englishFn(length);\n } else {\n return intlFn(length);\n }\n}\n\nfunction supportsFastNumbers(loc) {\n if (loc.numberingSystem && loc.numberingSystem !== \"latn\") {\n return false;\n } else {\n return (\n loc.numberingSystem === \"latn\" ||\n !loc.locale ||\n loc.locale.startsWith(\"en\") ||\n new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === \"latn\"\n );\n }\n}\n\n/**\n * @private\n */\n\nclass PolyNumberFormatter {\n constructor(intl, forceSimple, opts) {\n this.padTo = opts.padTo || 0;\n this.floor = opts.floor || false;\n\n const { padTo, floor, ...otherOpts } = opts;\n\n if (!forceSimple || Object.keys(otherOpts).length > 0) {\n const intlOpts = { useGrouping: false, ...opts };\n if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;\n this.inf = getCachedINF(intl, intlOpts);\n }\n }\n\n format(i) {\n if (this.inf) {\n const fixed = this.floor ? Math.floor(i) : i;\n return this.inf.format(fixed);\n } else {\n // to match the browser's numberformatter defaults\n const fixed = this.floor ? Math.floor(i) : roundTo(i, 3);\n return padStart(fixed, this.padTo);\n }\n }\n}\n\n/**\n * @private\n */\n\nclass PolyDateFormatter {\n constructor(dt, intl, opts) {\n this.opts = opts;\n this.originalZone = undefined;\n\n let z = undefined;\n if (this.opts.timeZone) {\n // Don't apply any workarounds if a timeZone is explicitly provided in opts\n this.dt = dt;\n } else if (dt.zone.type === \"fixed\") {\n // UTC-8 or Etc/UTC-8 are not part of tzdata, only Etc/GMT+8 and the like.\n // That is why fixed-offset TZ is set to that unless it is:\n // 1. Representing offset 0 when UTC is used to maintain previous behavior and does not become GMT.\n // 2. Unsupported by the browser:\n // - some do not support Etc/\n // - < Etc/GMT-14, > Etc/GMT+12, and 30-minute or 45-minute offsets are not part of tzdata\n const gmtOffset = -1 * (dt.offset / 60);\n const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;\n if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {\n z = offsetZ;\n this.dt = dt;\n } else {\n // Not all fixed-offset zones like Etc/+4:30 are present in tzdata so\n // we manually apply the offset and substitute the zone as needed.\n z = \"UTC\";\n this.dt = dt.offset === 0 ? dt : dt.setZone(\"UTC\").plus({ minutes: dt.offset });\n this.originalZone = dt.zone;\n }\n } else if (dt.zone.type === \"system\") {\n this.dt = dt;\n } else if (dt.zone.type === \"iana\") {\n this.dt = dt;\n z = dt.zone.name;\n } else {\n // Custom zones can have any offset / offsetName so we just manually\n // apply the offset and substitute the zone as needed.\n z = \"UTC\";\n this.dt = dt.setZone(\"UTC\").plus({ minutes: dt.offset });\n this.originalZone = dt.zone;\n }\n\n const intlOpts = { ...this.opts };\n intlOpts.timeZone = intlOpts.timeZone || z;\n this.dtf = getCachedDTF(intl, intlOpts);\n }\n\n format() {\n if (this.originalZone) {\n // If we have to substitute in the actual zone name, we have to use\n // formatToParts so that the timezone can be replaced.\n return this.formatToParts()\n .map(({ value }) => value)\n .join(\"\");\n }\n return this.dtf.format(this.dt.toJSDate());\n }\n\n formatToParts() {\n const parts = this.dtf.formatToParts(this.dt.toJSDate());\n if (this.originalZone) {\n return parts.map((part) => {\n if (part.type === \"timeZoneName\") {\n const offsetName = this.originalZone.offsetName(this.dt.ts, {\n locale: this.dt.locale,\n format: this.opts.timeZoneName,\n });\n return {\n ...part,\n value: offsetName,\n };\n } else {\n return part;\n }\n });\n }\n return parts;\n }\n\n resolvedOptions() {\n return this.dtf.resolvedOptions();\n }\n}\n\n/**\n * @private\n */\nclass PolyRelFormatter {\n constructor(intl, isEnglish, opts) {\n this.opts = { style: \"long\", ...opts };\n if (!isEnglish && hasRelative()) {\n this.rtf = getCachedRTF(intl, opts);\n }\n }\n\n format(count, unit) {\n if (this.rtf) {\n return this.rtf.format(count, unit);\n } else {\n return English.formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== \"long\");\n }\n }\n\n formatToParts(count, unit) {\n if (this.rtf) {\n return this.rtf.formatToParts(count, unit);\n } else {\n return [];\n }\n }\n}\n\nconst fallbackWeekSettings = {\n firstDay: 1,\n minimalDays: 4,\n weekend: [6, 7],\n};\n\n/**\n * @private\n */\n\nexport default class Locale {\n static fromOpts(opts) {\n return Locale.create(\n opts.locale,\n opts.numberingSystem,\n opts.outputCalendar,\n opts.weekSettings,\n opts.defaultToEN\n );\n }\n\n static create(locale, numberingSystem, outputCalendar, weekSettings, defaultToEN = false) {\n const specifiedLocale = locale || Settings.defaultLocale;\n // the system locale is useful for human readable strings but annoying for parsing/formatting known formats\n const localeR = specifiedLocale || (defaultToEN ? \"en-US\" : systemLocale());\n const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem;\n const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;\n const weekSettingsR = validateWeekSettings(weekSettings) || Settings.defaultWeekSettings;\n return new Locale(localeR, numberingSystemR, outputCalendarR, weekSettingsR, specifiedLocale);\n }\n\n static resetCache() {\n sysLocaleCache = null;\n intlDTCache = {};\n intlNumCache = {};\n intlRelCache = {};\n }\n\n static fromObject({ locale, numberingSystem, outputCalendar, weekSettings } = {}) {\n return Locale.create(locale, numberingSystem, outputCalendar, weekSettings);\n }\n\n constructor(locale, numbering, outputCalendar, weekSettings, specifiedLocale) {\n const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale);\n\n this.locale = parsedLocale;\n this.numberingSystem = numbering || parsedNumberingSystem || null;\n this.outputCalendar = outputCalendar || parsedOutputCalendar || null;\n this.weekSettings = weekSettings;\n this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar);\n\n this.weekdaysCache = { format: {}, standalone: {} };\n this.monthsCache = { format: {}, standalone: {} };\n this.meridiemCache = null;\n this.eraCache = {};\n\n this.specifiedLocale = specifiedLocale;\n this.fastNumbersCached = null;\n }\n\n get fastNumbers() {\n if (this.fastNumbersCached == null) {\n this.fastNumbersCached = supportsFastNumbers(this);\n }\n\n return this.fastNumbersCached;\n }\n\n listingMode() {\n const isActuallyEn = this.isEnglish();\n const hasNoWeirdness =\n (this.numberingSystem === null || this.numberingSystem === \"latn\") &&\n (this.outputCalendar === null || this.outputCalendar === \"gregory\");\n return isActuallyEn && hasNoWeirdness ? \"en\" : \"intl\";\n }\n\n clone(alts) {\n if (!alts || Object.getOwnPropertyNames(alts).length === 0) {\n return this;\n } else {\n return Locale.create(\n alts.locale || this.specifiedLocale,\n alts.numberingSystem || this.numberingSystem,\n alts.outputCalendar || this.outputCalendar,\n validateWeekSettings(alts.weekSettings) || this.weekSettings,\n alts.defaultToEN || false\n );\n }\n }\n\n redefaultToEN(alts = {}) {\n return this.clone({ ...alts, defaultToEN: true });\n }\n\n redefaultToSystem(alts = {}) {\n return this.clone({ ...alts, defaultToEN: false });\n }\n\n months(length, format = false) {\n return listStuff(this, length, English.months, () => {\n const intl = format ? { month: length, day: \"numeric\" } : { month: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.monthsCache[formatStr][length]) {\n this.monthsCache[formatStr][length] = mapMonths((dt) => this.extract(dt, intl, \"month\"));\n }\n return this.monthsCache[formatStr][length];\n });\n }\n\n weekdays(length, format = false) {\n return listStuff(this, length, English.weekdays, () => {\n const intl = format\n ? { weekday: length, year: \"numeric\", month: \"long\", day: \"numeric\" }\n : { weekday: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.weekdaysCache[formatStr][length]) {\n this.weekdaysCache[formatStr][length] = mapWeekdays((dt) =>\n this.extract(dt, intl, \"weekday\")\n );\n }\n return this.weekdaysCache[formatStr][length];\n });\n }\n\n meridiems() {\n return listStuff(\n this,\n undefined,\n () => English.meridiems,\n () => {\n // In theory there could be aribitrary day periods. We're gonna assume there are exactly two\n // for AM and PM. This is probably wrong, but it's makes parsing way easier.\n if (!this.meridiemCache) {\n const intl = { hour: \"numeric\", hourCycle: \"h12\" };\n this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(\n (dt) => this.extract(dt, intl, \"dayperiod\")\n );\n }\n\n return this.meridiemCache;\n }\n );\n }\n\n eras(length) {\n return listStuff(this, length, English.eras, () => {\n const intl = { era: length };\n\n // This is problematic. Different calendars are going to define eras totally differently. What I need is the minimum set of dates\n // to definitely enumerate them.\n if (!this.eraCache[length]) {\n this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map((dt) =>\n this.extract(dt, intl, \"era\")\n );\n }\n\n return this.eraCache[length];\n });\n }\n\n extract(dt, intlOpts, field) {\n const df = this.dtFormatter(dt, intlOpts),\n results = df.formatToParts(),\n matching = results.find((m) => m.type.toLowerCase() === field);\n return matching ? matching.value : null;\n }\n\n numberFormatter(opts = {}) {\n // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave)\n // (in contrast, the rest of the condition is used heavily)\n return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts);\n }\n\n dtFormatter(dt, intlOpts = {}) {\n return new PolyDateFormatter(dt, this.intl, intlOpts);\n }\n\n relFormatter(opts = {}) {\n return new PolyRelFormatter(this.intl, this.isEnglish(), opts);\n }\n\n listFormatter(opts = {}) {\n return getCachedLF(this.intl, opts);\n }\n\n isEnglish() {\n return (\n this.locale === \"en\" ||\n this.locale.toLowerCase() === \"en-us\" ||\n new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith(\"en-us\")\n );\n }\n\n getWeekSettings() {\n if (this.weekSettings) {\n return this.weekSettings;\n } else if (!hasLocaleWeekInfo()) {\n return fallbackWeekSettings;\n } else {\n return getCachedWeekInfo(this.locale);\n }\n }\n\n getStartOfWeek() {\n return this.getWeekSettings().firstDay;\n }\n\n getMinDaysInFirstWeek() {\n return this.getWeekSettings().minimalDays;\n }\n\n getWeekendDays() {\n return this.getWeekSettings().weekend;\n }\n\n equals(other) {\n return (\n this.locale === other.locale &&\n this.numberingSystem === other.numberingSystem &&\n this.outputCalendar === other.outputCalendar\n );\n }\n}\n","import { formatOffset, signedOffset } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * A zone with a fixed offset (meaning no DST)\n * @implements {Zone}\n */\nexport default class FixedOffsetZone extends Zone {\n /**\n * Get a singleton instance of UTC\n * @return {FixedOffsetZone}\n */\n static get utcInstance() {\n if (singleton === null) {\n singleton = new FixedOffsetZone(0);\n }\n return singleton;\n }\n\n /**\n * Get an instance with a specified offset\n * @param {number} offset - The offset in minutes\n * @return {FixedOffsetZone}\n */\n static instance(offset) {\n return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset);\n }\n\n /**\n * Get an instance of FixedOffsetZone from a UTC offset string, like \"UTC+6\"\n * @param {string} s - The offset string to parse\n * @example FixedOffsetZone.parseSpecifier(\"UTC+6\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC+06\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC-6:00\")\n * @return {FixedOffsetZone}\n */\n static parseSpecifier(s) {\n if (s) {\n const r = s.match(/^utc(?:([+-]\\d{1,2})(?::(\\d{2}))?)?$/i);\n if (r) {\n return new FixedOffsetZone(signedOffset(r[1], r[2]));\n }\n }\n return null;\n }\n\n constructor(offset) {\n super();\n /** @private **/\n this.fixed = offset;\n }\n\n /** @override **/\n get type() {\n return \"fixed\";\n }\n\n /** @override **/\n get name() {\n return this.fixed === 0 ? \"UTC\" : `UTC${formatOffset(this.fixed, \"narrow\")}`;\n }\n\n get ianaName() {\n if (this.fixed === 0) {\n return \"Etc/UTC\";\n } else {\n return `Etc/GMT${formatOffset(-this.fixed, \"narrow\")}`;\n }\n }\n\n /** @override **/\n offsetName() {\n return this.name;\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.fixed, format);\n }\n\n /** @override **/\n get isUniversal() {\n return true;\n }\n\n /** @override **/\n offset() {\n return this.fixed;\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"fixed\" && otherZone.fixed === this.fixed;\n }\n\n /** @override **/\n get isValid() {\n return true;\n }\n}\n","import Zone from \"../zone.js\";\n\n/**\n * A zone that failed to parse. You should never need to instantiate this.\n * @implements {Zone}\n */\nexport default class InvalidZone extends Zone {\n constructor(zoneName) {\n super();\n /** @private */\n this.zoneName = zoneName;\n }\n\n /** @override **/\n get type() {\n return \"invalid\";\n }\n\n /** @override **/\n get name() {\n return this.zoneName;\n }\n\n /** @override **/\n get isUniversal() {\n return false;\n }\n\n /** @override **/\n offsetName() {\n return null;\n }\n\n /** @override **/\n formatOffset() {\n return \"\";\n }\n\n /** @override **/\n offset() {\n return NaN;\n }\n\n /** @override **/\n equals() {\n return false;\n }\n\n /** @override **/\n get isValid() {\n return false;\n }\n}\n","/**\n * @private\n */\n\nimport Zone from \"../zone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport InvalidZone from \"../zones/invalidZone.js\";\n\nimport { isUndefined, isString, isNumber } from \"./util.js\";\nimport SystemZone from \"../zones/systemZone.js\";\n\nexport function normalizeZone(input, defaultZone) {\n let offset;\n if (isUndefined(input) || input === null) {\n return defaultZone;\n } else if (input instanceof Zone) {\n return input;\n } else if (isString(input)) {\n const lowered = input.toLowerCase();\n if (lowered === \"default\") return defaultZone;\n else if (lowered === \"local\" || lowered === \"system\") return SystemZone.instance;\n else if (lowered === \"utc\" || lowered === \"gmt\") return FixedOffsetZone.utcInstance;\n else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input);\n } else if (isNumber(input)) {\n return FixedOffsetZone.instance(input);\n } else if (typeof input === \"object\" && \"offset\" in input && typeof input.offset === \"function\") {\n // This is dumb, but the instanceof check above doesn't seem to really work\n // so we're duck checking it\n return input;\n } else {\n return new InvalidZone(input);\n }\n}\n","import SystemZone from \"./zones/systemZone.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport Locale from \"./impl/locale.js\";\n\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\nimport { validateWeekSettings } from \"./impl/util.js\";\n\nlet now = () => Date.now(),\n defaultZone = \"system\",\n defaultLocale = null,\n defaultNumberingSystem = null,\n defaultOutputCalendar = null,\n twoDigitCutoffYear = 60,\n throwOnInvalid,\n defaultWeekSettings = null;\n\n/**\n * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here.\n */\nexport default class Settings {\n /**\n * Get the callback for returning the current timestamp.\n * @type {function}\n */\n static get now() {\n return now;\n }\n\n /**\n * Set the callback for returning the current timestamp.\n * The function should return a number, which will be interpreted as an Epoch millisecond count\n * @type {function}\n * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future\n * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time\n */\n static set now(n) {\n now = n;\n }\n\n /**\n * Set the default time zone to create DateTimes in. Does not affect existing instances.\n * Use the value \"system\" to reset this value to the system's time zone.\n * @type {string}\n */\n static set defaultZone(zone) {\n defaultZone = zone;\n }\n\n /**\n * Get the default time zone object currently used to create DateTimes. Does not affect existing instances.\n * The default value is the system's time zone (the one set on the machine that runs this code).\n * @type {Zone}\n */\n static get defaultZone() {\n return normalizeZone(defaultZone, SystemZone.instance);\n }\n\n /**\n * Get the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultLocale() {\n return defaultLocale;\n }\n\n /**\n * Set the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultLocale(locale) {\n defaultLocale = locale;\n }\n\n /**\n * Get the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultNumberingSystem() {\n return defaultNumberingSystem;\n }\n\n /**\n * Set the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultNumberingSystem(numberingSystem) {\n defaultNumberingSystem = numberingSystem;\n }\n\n /**\n * Get the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultOutputCalendar() {\n return defaultOutputCalendar;\n }\n\n /**\n * Set the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultOutputCalendar(outputCalendar) {\n defaultOutputCalendar = outputCalendar;\n }\n\n /**\n * @typedef {Object} WeekSettings\n * @property {number} firstDay\n * @property {number} minimalDays\n * @property {number[]} weekend\n */\n\n /**\n * @return {WeekSettings|null}\n */\n static get defaultWeekSettings() {\n return defaultWeekSettings;\n }\n\n /**\n * Allows overriding the default locale week settings, i.e. the start of the week, the weekend and\n * how many days are required in the first week of a year.\n * Does not affect existing instances.\n *\n * @param {WeekSettings|null} weekSettings\n */\n static set defaultWeekSettings(weekSettings) {\n defaultWeekSettings = validateWeekSettings(weekSettings);\n }\n\n /**\n * Get the cutoff year after which a string encoding a year as two digits is interpreted to occur in the current century.\n * @type {number}\n */\n static get twoDigitCutoffYear() {\n return twoDigitCutoffYear;\n }\n\n /**\n * Set the cutoff year after which a string encoding a year as two digits is interpreted to occur in the current century.\n * @type {number}\n * @example Settings.twoDigitCutoffYear = 0 // cut-off year is 0, so all 'yy' are interpreted as current century\n * @example Settings.twoDigitCutoffYear = 50 // '49' -> 1949; '50' -> 2050\n * @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50\n * @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50\n */\n static set twoDigitCutoffYear(cutoffYear) {\n twoDigitCutoffYear = cutoffYear % 100;\n }\n\n /**\n * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static get throwOnInvalid() {\n return throwOnInvalid;\n }\n\n /**\n * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static set throwOnInvalid(t) {\n throwOnInvalid = t;\n }\n\n /**\n * Reset Luxon's global caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCaches() {\n Locale.resetCache();\n IANAZone.resetCache();\n }\n}\n","export default class Invalid {\n constructor(reason, explanation) {\n this.reason = reason;\n this.explanation = explanation;\n }\n\n toMessage() {\n if (this.explanation) {\n return `${this.reason}: ${this.explanation}`;\n } else {\n return this.reason;\n }\n }\n}\n","import {\n integerBetween,\n isLeapYear,\n timeObject,\n daysInYear,\n daysInMonth,\n weeksInWeekYear,\n isInteger,\n isUndefined,\n} from \"./util.js\";\nimport Invalid from \"./invalid.js\";\nimport { ConflictingSpecificationError } from \"../errors.js\";\n\nconst nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],\n leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\n\nfunction unitOutOfRange(unit, value) {\n return new Invalid(\n \"unit out of range\",\n `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`\n );\n}\n\nexport function dayOfWeek(year, month, day) {\n const d = new Date(Date.UTC(year, month - 1, day));\n\n if (year < 100 && year >= 0) {\n d.setUTCFullYear(d.getUTCFullYear() - 1900);\n }\n\n const js = d.getUTCDay();\n\n return js === 0 ? 7 : js;\n}\n\nfunction computeOrdinal(year, month, day) {\n return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1];\n}\n\nfunction uncomputeOrdinal(year, ordinal) {\n const table = isLeapYear(year) ? leapLadder : nonLeapLadder,\n month0 = table.findIndex((i) => i < ordinal),\n day = ordinal - table[month0];\n return { month: month0 + 1, day };\n}\n\nexport function isoWeekdayToLocal(isoWeekday, startOfWeek) {\n return ((isoWeekday - startOfWeek + 7) % 7) + 1;\n}\n\n/**\n * @private\n */\n\nexport function gregorianToWeek(gregObj, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const { year, month, day } = gregObj,\n ordinal = computeOrdinal(year, month, day),\n weekday = isoWeekdayToLocal(dayOfWeek(year, month, day), startOfWeek);\n\n let weekNumber = Math.floor((ordinal - weekday + 14 - minDaysInFirstWeek) / 7),\n weekYear;\n\n if (weekNumber < 1) {\n weekYear = year - 1;\n weekNumber = weeksInWeekYear(weekYear, minDaysInFirstWeek, startOfWeek);\n } else if (weekNumber > weeksInWeekYear(year, minDaysInFirstWeek, startOfWeek)) {\n weekYear = year + 1;\n weekNumber = 1;\n } else {\n weekYear = year;\n }\n\n return { weekYear, weekNumber, weekday, ...timeObject(gregObj) };\n}\n\nexport function weekToGregorian(weekData, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const { weekYear, weekNumber, weekday } = weekData,\n weekdayOfJan4 = isoWeekdayToLocal(dayOfWeek(weekYear, 1, minDaysInFirstWeek), startOfWeek),\n yearInDays = daysInYear(weekYear);\n\n let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 7 + minDaysInFirstWeek,\n year;\n\n if (ordinal < 1) {\n year = weekYear - 1;\n ordinal += daysInYear(year);\n } else if (ordinal > yearInDays) {\n year = weekYear + 1;\n ordinal -= daysInYear(weekYear);\n } else {\n year = weekYear;\n }\n\n const { month, day } = uncomputeOrdinal(year, ordinal);\n return { year, month, day, ...timeObject(weekData) };\n}\n\nexport function gregorianToOrdinal(gregData) {\n const { year, month, day } = gregData;\n const ordinal = computeOrdinal(year, month, day);\n return { year, ordinal, ...timeObject(gregData) };\n}\n\nexport function ordinalToGregorian(ordinalData) {\n const { year, ordinal } = ordinalData;\n const { month, day } = uncomputeOrdinal(year, ordinal);\n return { year, month, day, ...timeObject(ordinalData) };\n}\n\n/**\n * Check if local week units like localWeekday are used in obj.\n * If so, validates that they are not mixed with ISO week units and then copies them to the normal week unit properties.\n * Modifies obj in-place!\n * @param obj the object values\n */\nexport function usesLocalWeekValues(obj, loc) {\n const hasLocaleWeekData =\n !isUndefined(obj.localWeekday) ||\n !isUndefined(obj.localWeekNumber) ||\n !isUndefined(obj.localWeekYear);\n if (hasLocaleWeekData) {\n const hasIsoWeekData =\n !isUndefined(obj.weekday) || !isUndefined(obj.weekNumber) || !isUndefined(obj.weekYear);\n\n if (hasIsoWeekData) {\n throw new ConflictingSpecificationError(\n \"Cannot mix locale-based week fields with ISO-based week fields\"\n );\n }\n if (!isUndefined(obj.localWeekday)) obj.weekday = obj.localWeekday;\n if (!isUndefined(obj.localWeekNumber)) obj.weekNumber = obj.localWeekNumber;\n if (!isUndefined(obj.localWeekYear)) obj.weekYear = obj.localWeekYear;\n delete obj.localWeekday;\n delete obj.localWeekNumber;\n delete obj.localWeekYear;\n return {\n minDaysInFirstWeek: loc.getMinDaysInFirstWeek(),\n startOfWeek: loc.getStartOfWeek(),\n };\n } else {\n return { minDaysInFirstWeek: 4, startOfWeek: 1 };\n }\n}\n\nexport function hasInvalidWeekData(obj, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const validYear = isInteger(obj.weekYear),\n validWeek = integerBetween(\n obj.weekNumber,\n 1,\n weeksInWeekYear(obj.weekYear, minDaysInFirstWeek, startOfWeek)\n ),\n validWeekday = integerBetween(obj.weekday, 1, 7);\n\n if (!validYear) {\n return unitOutOfRange(\"weekYear\", obj.weekYear);\n } else if (!validWeek) {\n return unitOutOfRange(\"week\", obj.weekNumber);\n } else if (!validWeekday) {\n return unitOutOfRange(\"weekday\", obj.weekday);\n } else return false;\n}\n\nexport function hasInvalidOrdinalData(obj) {\n const validYear = isInteger(obj.year),\n validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validOrdinal) {\n return unitOutOfRange(\"ordinal\", obj.ordinal);\n } else return false;\n}\n\nexport function hasInvalidGregorianData(obj) {\n const validYear = isInteger(obj.year),\n validMonth = integerBetween(obj.month, 1, 12),\n validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validMonth) {\n return unitOutOfRange(\"month\", obj.month);\n } else if (!validDay) {\n return unitOutOfRange(\"day\", obj.day);\n } else return false;\n}\n\nexport function hasInvalidTimeData(obj) {\n const { hour, minute, second, millisecond } = obj;\n const validHour =\n integerBetween(hour, 0, 23) ||\n (hour === 24 && minute === 0 && second === 0 && millisecond === 0),\n validMinute = integerBetween(minute, 0, 59),\n validSecond = integerBetween(second, 0, 59),\n validMillisecond = integerBetween(millisecond, 0, 999);\n\n if (!validHour) {\n return unitOutOfRange(\"hour\", hour);\n } else if (!validMinute) {\n return unitOutOfRange(\"minute\", minute);\n } else if (!validSecond) {\n return unitOutOfRange(\"second\", second);\n } else if (!validMillisecond) {\n return unitOutOfRange(\"millisecond\", millisecond);\n } else return false;\n}\n","/*\n This is just a junk drawer, containing anything used across multiple classes.\n Because Luxon is small(ish), this should stay small and we won't worry about splitting\n it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.\n*/\n\nimport { InvalidArgumentError } from \"../errors.js\";\nimport Settings from \"../settings.js\";\nimport { dayOfWeek, isoWeekdayToLocal } from \"./conversions.js\";\n\n/**\n * @private\n */\n\n// TYPES\n\nexport function isUndefined(o) {\n return typeof o === \"undefined\";\n}\n\nexport function isNumber(o) {\n return typeof o === \"number\";\n}\n\nexport function isInteger(o) {\n return typeof o === \"number\" && o % 1 === 0;\n}\n\nexport function isString(o) {\n return typeof o === \"string\";\n}\n\nexport function isDate(o) {\n return Object.prototype.toString.call(o) === \"[object Date]\";\n}\n\n// CAPABILITIES\n\nexport function hasRelative() {\n try {\n return typeof Intl !== \"undefined\" && !!Intl.RelativeTimeFormat;\n } catch (e) {\n return false;\n }\n}\n\nexport function hasLocaleWeekInfo() {\n try {\n return (\n typeof Intl !== \"undefined\" &&\n !!Intl.Locale &&\n (\"weekInfo\" in Intl.Locale.prototype || \"getWeekInfo\" in Intl.Locale.prototype)\n );\n } catch (e) {\n return false;\n }\n}\n\n// OBJECTS AND ARRAYS\n\nexport function maybeArray(thing) {\n return Array.isArray(thing) ? thing : [thing];\n}\n\nexport function bestBy(arr, by, compare) {\n if (arr.length === 0) {\n return undefined;\n }\n return arr.reduce((best, next) => {\n const pair = [by(next), next];\n if (!best) {\n return pair;\n } else if (compare(best[0], pair[0]) === best[0]) {\n return best;\n } else {\n return pair;\n }\n }, null)[1];\n}\n\nexport function pick(obj, keys) {\n return keys.reduce((a, k) => {\n a[k] = obj[k];\n return a;\n }, {});\n}\n\nexport function hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nexport function validateWeekSettings(settings) {\n if (settings == null) {\n return null;\n } else if (typeof settings !== \"object\") {\n throw new InvalidArgumentError(\"Week settings must be an object\");\n } else {\n if (\n !integerBetween(settings.firstDay, 1, 7) ||\n !integerBetween(settings.minimalDays, 1, 7) ||\n !Array.isArray(settings.weekend) ||\n settings.weekend.some((v) => !integerBetween(v, 1, 7))\n ) {\n throw new InvalidArgumentError(\"Invalid week settings\");\n }\n return {\n firstDay: settings.firstDay,\n minimalDays: settings.minimalDays,\n weekend: Array.from(settings.weekend),\n };\n }\n}\n\n// NUMBERS AND STRINGS\n\nexport function integerBetween(thing, bottom, top) {\n return isInteger(thing) && thing >= bottom && thing <= top;\n}\n\n// x % n but takes the sign of n instead of x\nexport function floorMod(x, n) {\n return x - n * Math.floor(x / n);\n}\n\nexport function padStart(input, n = 2) {\n const isNeg = input < 0;\n let padded;\n if (isNeg) {\n padded = \"-\" + (\"\" + -input).padStart(n, \"0\");\n } else {\n padded = (\"\" + input).padStart(n, \"0\");\n }\n return padded;\n}\n\nexport function parseInteger(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseInt(string, 10);\n }\n}\n\nexport function parseFloating(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseFloat(string);\n }\n}\n\nexport function parseMillis(fraction) {\n // Return undefined (instead of 0) in these cases, where fraction is not set\n if (isUndefined(fraction) || fraction === null || fraction === \"\") {\n return undefined;\n } else {\n const f = parseFloat(\"0.\" + fraction) * 1000;\n return Math.floor(f);\n }\n}\n\nexport function roundTo(number, digits, towardZero = false) {\n const factor = 10 ** digits,\n rounder = towardZero ? Math.trunc : Math.round;\n return rounder(number * factor) / factor;\n}\n\n// DATE BASICS\n\nexport function isLeapYear(year) {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\n\nexport function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\nexport function daysInMonth(year, month) {\n const modMonth = floorMod(month - 1, 12) + 1,\n modYear = year + (month - modMonth) / 12;\n\n if (modMonth === 2) {\n return isLeapYear(modYear) ? 29 : 28;\n } else {\n return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1];\n }\n}\n\n// convert a calendar object to a local timestamp (epoch, but with the offset baked in)\nexport function objToLocalTS(obj) {\n let d = Date.UTC(\n obj.year,\n obj.month - 1,\n obj.day,\n obj.hour,\n obj.minute,\n obj.second,\n obj.millisecond\n );\n\n // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that\n if (obj.year < 100 && obj.year >= 0) {\n d = new Date(d);\n // set the month and day again, this is necessary because year 2000 is a leap year, but year 100 is not\n // so if obj.year is in 99, but obj.day makes it roll over into year 100,\n // the calculations done by Date.UTC are using year 2000 - which is incorrect\n d.setUTCFullYear(obj.year, obj.month - 1, obj.day);\n }\n return +d;\n}\n\n// adapted from moment.js: https://github.com/moment/moment/blob/000ac1800e620f770f4eb31b5ae908f6167b0ab2/src/lib/units/week-calendar-utils.js\nfunction firstWeekOffset(year, minDaysInFirstWeek, startOfWeek) {\n const fwdlw = isoWeekdayToLocal(dayOfWeek(year, 1, minDaysInFirstWeek), startOfWeek);\n return -fwdlw + minDaysInFirstWeek - 1;\n}\n\nexport function weeksInWeekYear(weekYear, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const weekOffset = firstWeekOffset(weekYear, minDaysInFirstWeek, startOfWeek);\n const weekOffsetNext = firstWeekOffset(weekYear + 1, minDaysInFirstWeek, startOfWeek);\n return (daysInYear(weekYear) - weekOffset + weekOffsetNext) / 7;\n}\n\nexport function untruncateYear(year) {\n if (year > 99) {\n return year;\n } else return year > Settings.twoDigitCutoffYear ? 1900 + year : 2000 + year;\n}\n\n// PARSING\n\nexport function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) {\n const date = new Date(ts),\n intlOpts = {\n hourCycle: \"h23\",\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n };\n\n if (timeZone) {\n intlOpts.timeZone = timeZone;\n }\n\n const modified = { timeZoneName: offsetFormat, ...intlOpts };\n\n const parsed = new Intl.DateTimeFormat(locale, modified)\n .formatToParts(date)\n .find((m) => m.type.toLowerCase() === \"timezonename\");\n return parsed ? parsed.value : null;\n}\n\n// signedOffset('-5', '30') -> -330\nexport function signedOffset(offHourStr, offMinuteStr) {\n let offHour = parseInt(offHourStr, 10);\n\n // don't || this because we want to preserve -0\n if (Number.isNaN(offHour)) {\n offHour = 0;\n }\n\n const offMin = parseInt(offMinuteStr, 10) || 0,\n offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;\n return offHour * 60 + offMinSigned;\n}\n\n// COERCION\n\nexport function asNumber(value) {\n const numericValue = Number(value);\n if (typeof value === \"boolean\" || value === \"\" || Number.isNaN(numericValue))\n throw new InvalidArgumentError(`Invalid unit value ${value}`);\n return numericValue;\n}\n\nexport function normalizeObject(obj, normalizer) {\n const normalized = {};\n for (const u in obj) {\n if (hasOwnProperty(obj, u)) {\n const v = obj[u];\n if (v === undefined || v === null) continue;\n normalized[normalizer(u)] = asNumber(v);\n }\n }\n return normalized;\n}\n\nexport function formatOffset(offset, format) {\n const hours = Math.trunc(Math.abs(offset / 60)),\n minutes = Math.trunc(Math.abs(offset % 60)),\n sign = offset >= 0 ? \"+\" : \"-\";\n\n switch (format) {\n case \"short\":\n return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`;\n case \"narrow\":\n return `${sign}${hours}${minutes > 0 ? `:${minutes}` : \"\"}`;\n case \"techie\":\n return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`;\n default:\n throw new RangeError(`Value format ${format} is out of range for property format`);\n }\n}\n\nexport function timeObject(obj) {\n return pick(obj, [\"hour\", \"minute\", \"second\", \"millisecond\"]);\n}\n","import * as Formats from \"./formats.js\";\nimport { pick } from \"./util.js\";\n\nfunction stringify(obj) {\n return JSON.stringify(obj, Object.keys(obj).sort());\n}\n\n/**\n * @private\n */\n\nexport const monthsLong = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n];\n\nexport const monthsShort = [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n];\n\nexport const monthsNarrow = [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"];\n\nexport function months(length) {\n switch (length) {\n case \"narrow\":\n return [...monthsNarrow];\n case \"short\":\n return [...monthsShort];\n case \"long\":\n return [...monthsLong];\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\"];\n case \"2-digit\":\n return [\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\"];\n default:\n return null;\n }\n}\n\nexport const weekdaysLong = [\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n \"Sunday\",\n];\n\nexport const weekdaysShort = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"];\n\nexport const weekdaysNarrow = [\"M\", \"T\", \"W\", \"T\", \"F\", \"S\", \"S\"];\n\nexport function weekdays(length) {\n switch (length) {\n case \"narrow\":\n return [...weekdaysNarrow];\n case \"short\":\n return [...weekdaysShort];\n case \"long\":\n return [...weekdaysLong];\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\"];\n default:\n return null;\n }\n}\n\nexport const meridiems = [\"AM\", \"PM\"];\n\nexport const erasLong = [\"Before Christ\", \"Anno Domini\"];\n\nexport const erasShort = [\"BC\", \"AD\"];\n\nexport const erasNarrow = [\"B\", \"A\"];\n\nexport function eras(length) {\n switch (length) {\n case \"narrow\":\n return [...erasNarrow];\n case \"short\":\n return [...erasShort];\n case \"long\":\n return [...erasLong];\n default:\n return null;\n }\n}\n\nexport function meridiemForDateTime(dt) {\n return meridiems[dt.hour < 12 ? 0 : 1];\n}\n\nexport function weekdayForDateTime(dt, length) {\n return weekdays(length)[dt.weekday - 1];\n}\n\nexport function monthForDateTime(dt, length) {\n return months(length)[dt.month - 1];\n}\n\nexport function eraForDateTime(dt, length) {\n return eras(length)[dt.year < 0 ? 0 : 1];\n}\n\nexport function formatRelativeTime(unit, count, numeric = \"always\", narrow = false) {\n const units = {\n years: [\"year\", \"yr.\"],\n quarters: [\"quarter\", \"qtr.\"],\n months: [\"month\", \"mo.\"],\n weeks: [\"week\", \"wk.\"],\n days: [\"day\", \"day\", \"days\"],\n hours: [\"hour\", \"hr.\"],\n minutes: [\"minute\", \"min.\"],\n seconds: [\"second\", \"sec.\"],\n };\n\n const lastable = [\"hours\", \"minutes\", \"seconds\"].indexOf(unit) === -1;\n\n if (numeric === \"auto\" && lastable) {\n const isDay = unit === \"days\";\n switch (count) {\n case 1:\n return isDay ? \"tomorrow\" : `next ${units[unit][0]}`;\n case -1:\n return isDay ? \"yesterday\" : `last ${units[unit][0]}`;\n case 0:\n return isDay ? \"today\" : `this ${units[unit][0]}`;\n default: // fall through\n }\n }\n\n const isInPast = Object.is(count, -0) || count < 0,\n fmtValue = Math.abs(count),\n singular = fmtValue === 1,\n lilUnits = units[unit],\n fmtUnit = narrow\n ? singular\n ? lilUnits[1]\n : lilUnits[2] || lilUnits[1]\n : singular\n ? units[unit][0]\n : unit;\n return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`;\n}\n\nexport function formatString(knownFormat) {\n // these all have the offsets removed because we don't have access to them\n // without all the intl stuff this is backfilling\n const filtered = pick(knownFormat, [\n \"weekday\",\n \"era\",\n \"year\",\n \"month\",\n \"day\",\n \"hour\",\n \"minute\",\n \"second\",\n \"timeZoneName\",\n \"hourCycle\",\n ]),\n key = stringify(filtered),\n dateTimeHuge = \"EEEE, LLLL d, yyyy, h:mm a\";\n switch (key) {\n case stringify(Formats.DATE_SHORT):\n return \"M/d/yyyy\";\n case stringify(Formats.DATE_MED):\n return \"LLL d, yyyy\";\n case stringify(Formats.DATE_MED_WITH_WEEKDAY):\n return \"EEE, LLL d, yyyy\";\n case stringify(Formats.DATE_FULL):\n return \"LLLL d, yyyy\";\n case stringify(Formats.DATE_HUGE):\n return \"EEEE, LLLL d, yyyy\";\n case stringify(Formats.TIME_SIMPLE):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_SECONDS):\n return \"h:mm:ss a\";\n case stringify(Formats.TIME_WITH_SHORT_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_LONG_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_24_SIMPLE):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_SECONDS):\n return \"HH:mm:ss\";\n case stringify(Formats.TIME_24_WITH_SHORT_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_LONG_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.DATETIME_SHORT):\n return \"M/d/yyyy, h:mm a\";\n case stringify(Formats.DATETIME_MED):\n return \"LLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL):\n return \"LLLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_HUGE):\n return dateTimeHuge;\n case stringify(Formats.DATETIME_SHORT_WITH_SECONDS):\n return \"M/d/yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_SECONDS):\n return \"LLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_WEEKDAY):\n return \"EEE, d LLL yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL_WITH_SECONDS):\n return \"LLLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_HUGE_WITH_SECONDS):\n return \"EEEE, LLLL d, yyyy, h:mm:ss a\";\n default:\n return dateTimeHuge;\n }\n}\n","import * as English from \"./english.js\";\nimport * as Formats from \"./formats.js\";\nimport { padStart } from \"./util.js\";\n\nfunction stringifyTokens(splits, tokenToString) {\n let s = \"\";\n for (const token of splits) {\n if (token.literal) {\n s += token.val;\n } else {\n s += tokenToString(token.val);\n }\n }\n return s;\n}\n\nconst macroTokenToFormatOpts = {\n D: Formats.DATE_SHORT,\n DD: Formats.DATE_MED,\n DDD: Formats.DATE_FULL,\n DDDD: Formats.DATE_HUGE,\n t: Formats.TIME_SIMPLE,\n tt: Formats.TIME_WITH_SECONDS,\n ttt: Formats.TIME_WITH_SHORT_OFFSET,\n tttt: Formats.TIME_WITH_LONG_OFFSET,\n T: Formats.TIME_24_SIMPLE,\n TT: Formats.TIME_24_WITH_SECONDS,\n TTT: Formats.TIME_24_WITH_SHORT_OFFSET,\n TTTT: Formats.TIME_24_WITH_LONG_OFFSET,\n f: Formats.DATETIME_SHORT,\n ff: Formats.DATETIME_MED,\n fff: Formats.DATETIME_FULL,\n ffff: Formats.DATETIME_HUGE,\n F: Formats.DATETIME_SHORT_WITH_SECONDS,\n FF: Formats.DATETIME_MED_WITH_SECONDS,\n FFF: Formats.DATETIME_FULL_WITH_SECONDS,\n FFFF: Formats.DATETIME_HUGE_WITH_SECONDS,\n};\n\n/**\n * @private\n */\n\nexport default class Formatter {\n static create(locale, opts = {}) {\n return new Formatter(locale, opts);\n }\n\n static parseFormat(fmt) {\n // white-space is always considered a literal in user-provided formats\n // the \" \" token has a special meaning (see unitForToken)\n\n let current = null,\n currentFull = \"\",\n bracketed = false;\n const splits = [];\n for (let i = 0; i < fmt.length; i++) {\n const c = fmt.charAt(i);\n if (c === \"'\") {\n if (currentFull.length > 0) {\n splits.push({ literal: bracketed || /^\\s+$/.test(currentFull), val: currentFull });\n }\n current = null;\n currentFull = \"\";\n bracketed = !bracketed;\n } else if (bracketed) {\n currentFull += c;\n } else if (c === current) {\n currentFull += c;\n } else {\n if (currentFull.length > 0) {\n splits.push({ literal: /^\\s+$/.test(currentFull), val: currentFull });\n }\n currentFull = c;\n current = c;\n }\n }\n\n if (currentFull.length > 0) {\n splits.push({ literal: bracketed || /^\\s+$/.test(currentFull), val: currentFull });\n }\n\n return splits;\n }\n\n static macroTokenToFormatOpts(token) {\n return macroTokenToFormatOpts[token];\n }\n\n constructor(locale, formatOpts) {\n this.opts = formatOpts;\n this.loc = locale;\n this.systemLoc = null;\n }\n\n formatWithSystemDefault(dt, opts) {\n if (this.systemLoc === null) {\n this.systemLoc = this.loc.redefaultToSystem();\n }\n const df = this.systemLoc.dtFormatter(dt, { ...this.opts, ...opts });\n return df.format();\n }\n\n dtFormatter(dt, opts = {}) {\n return this.loc.dtFormatter(dt, { ...this.opts, ...opts });\n }\n\n formatDateTime(dt, opts) {\n return this.dtFormatter(dt, opts).format();\n }\n\n formatDateTimeParts(dt, opts) {\n return this.dtFormatter(dt, opts).formatToParts();\n }\n\n formatInterval(interval, opts) {\n const df = this.dtFormatter(interval.start, opts);\n return df.dtf.formatRange(interval.start.toJSDate(), interval.end.toJSDate());\n }\n\n resolvedOptions(dt, opts) {\n return this.dtFormatter(dt, opts).resolvedOptions();\n }\n\n num(n, p = 0) {\n // we get some perf out of doing this here, annoyingly\n if (this.opts.forceSimple) {\n return padStart(n, p);\n }\n\n const opts = { ...this.opts };\n\n if (p > 0) {\n opts.padTo = p;\n }\n\n return this.loc.numberFormatter(opts).format(n);\n }\n\n formatDateTimeFromString(dt, fmt) {\n const knownEnglish = this.loc.listingMode() === \"en\",\n useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== \"gregory\",\n string = (opts, extract) => this.loc.extract(dt, opts, extract),\n formatOffset = (opts) => {\n if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) {\n return \"Z\";\n }\n\n return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : \"\";\n },\n meridiem = () =>\n knownEnglish\n ? English.meridiemForDateTime(dt)\n : string({ hour: \"numeric\", hourCycle: \"h12\" }, \"dayperiod\"),\n month = (length, standalone) =>\n knownEnglish\n ? English.monthForDateTime(dt, length)\n : string(standalone ? { month: length } : { month: length, day: \"numeric\" }, \"month\"),\n weekday = (length, standalone) =>\n knownEnglish\n ? English.weekdayForDateTime(dt, length)\n : string(\n standalone ? { weekday: length } : { weekday: length, month: \"long\", day: \"numeric\" },\n \"weekday\"\n ),\n maybeMacro = (token) => {\n const formatOpts = Formatter.macroTokenToFormatOpts(token);\n if (formatOpts) {\n return this.formatWithSystemDefault(dt, formatOpts);\n } else {\n return token;\n }\n },\n era = (length) =>\n knownEnglish ? English.eraForDateTime(dt, length) : string({ era: length }, \"era\"),\n tokenToString = (token) => {\n // Where possible: https://cldr.unicode.org/translation/date-time/date-time-symbols\n switch (token) {\n // ms\n case \"S\":\n return this.num(dt.millisecond);\n case \"u\":\n // falls through\n case \"SSS\":\n return this.num(dt.millisecond, 3);\n // seconds\n case \"s\":\n return this.num(dt.second);\n case \"ss\":\n return this.num(dt.second, 2);\n // fractional seconds\n case \"uu\":\n return this.num(Math.floor(dt.millisecond / 10), 2);\n case \"uuu\":\n return this.num(Math.floor(dt.millisecond / 100));\n // minutes\n case \"m\":\n return this.num(dt.minute);\n case \"mm\":\n return this.num(dt.minute, 2);\n // hours\n case \"h\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);\n case \"hh\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);\n case \"H\":\n return this.num(dt.hour);\n case \"HH\":\n return this.num(dt.hour, 2);\n // offset\n case \"Z\":\n // like +6\n return formatOffset({ format: \"narrow\", allowZ: this.opts.allowZ });\n case \"ZZ\":\n // like +06:00\n return formatOffset({ format: \"short\", allowZ: this.opts.allowZ });\n case \"ZZZ\":\n // like +0600\n return formatOffset({ format: \"techie\", allowZ: this.opts.allowZ });\n case \"ZZZZ\":\n // like EST\n return dt.zone.offsetName(dt.ts, { format: \"short\", locale: this.loc.locale });\n case \"ZZZZZ\":\n // like Eastern Standard Time\n return dt.zone.offsetName(dt.ts, { format: \"long\", locale: this.loc.locale });\n // zone\n case \"z\":\n // like America/New_York\n return dt.zoneName;\n // meridiems\n case \"a\":\n return meridiem();\n // dates\n case \"d\":\n return useDateTimeFormatter ? string({ day: \"numeric\" }, \"day\") : this.num(dt.day);\n case \"dd\":\n return useDateTimeFormatter ? string({ day: \"2-digit\" }, \"day\") : this.num(dt.day, 2);\n // weekdays - standalone\n case \"c\":\n // like 1\n return this.num(dt.weekday);\n case \"ccc\":\n // like 'Tues'\n return weekday(\"short\", true);\n case \"cccc\":\n // like 'Tuesday'\n return weekday(\"long\", true);\n case \"ccccc\":\n // like 'T'\n return weekday(\"narrow\", true);\n // weekdays - format\n case \"E\":\n // like 1\n return this.num(dt.weekday);\n case \"EEE\":\n // like 'Tues'\n return weekday(\"short\", false);\n case \"EEEE\":\n // like 'Tuesday'\n return weekday(\"long\", false);\n case \"EEEEE\":\n // like 'T'\n return weekday(\"narrow\", false);\n // months - standalone\n case \"L\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\", day: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"LL\":\n // like 01, doesn't seem to work\n return useDateTimeFormatter\n ? string({ month: \"2-digit\", day: \"numeric\" }, \"month\")\n : this.num(dt.month, 2);\n case \"LLL\":\n // like Jan\n return month(\"short\", true);\n case \"LLLL\":\n // like January\n return month(\"long\", true);\n case \"LLLLL\":\n // like J\n return month(\"narrow\", true);\n // months - format\n case \"M\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"MM\":\n // like 01\n return useDateTimeFormatter\n ? string({ month: \"2-digit\" }, \"month\")\n : this.num(dt.month, 2);\n case \"MMM\":\n // like Jan\n return month(\"short\", false);\n case \"MMMM\":\n // like January\n return month(\"long\", false);\n case \"MMMMM\":\n // like J\n return month(\"narrow\", false);\n // years\n case \"y\":\n // like 2014\n return useDateTimeFormatter ? string({ year: \"numeric\" }, \"year\") : this.num(dt.year);\n case \"yy\":\n // like 14\n return useDateTimeFormatter\n ? string({ year: \"2-digit\" }, \"year\")\n : this.num(dt.year.toString().slice(-2), 2);\n case \"yyyy\":\n // like 0012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 4);\n case \"yyyyyy\":\n // like 000012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 6);\n // eras\n case \"G\":\n // like AD\n return era(\"short\");\n case \"GG\":\n // like Anno Domini\n return era(\"long\");\n case \"GGGGG\":\n return era(\"narrow\");\n case \"kk\":\n return this.num(dt.weekYear.toString().slice(-2), 2);\n case \"kkkk\":\n return this.num(dt.weekYear, 4);\n case \"W\":\n return this.num(dt.weekNumber);\n case \"WW\":\n return this.num(dt.weekNumber, 2);\n case \"n\":\n return this.num(dt.localWeekNumber);\n case \"nn\":\n return this.num(dt.localWeekNumber, 2);\n case \"ii\":\n return this.num(dt.localWeekYear.toString().slice(-2), 2);\n case \"iiii\":\n return this.num(dt.localWeekYear, 4);\n case \"o\":\n return this.num(dt.ordinal);\n case \"ooo\":\n return this.num(dt.ordinal, 3);\n case \"q\":\n // like 1\n return this.num(dt.quarter);\n case \"qq\":\n // like 01\n return this.num(dt.quarter, 2);\n case \"X\":\n return this.num(Math.floor(dt.ts / 1000));\n case \"x\":\n return this.num(dt.ts);\n default:\n return maybeMacro(token);\n }\n };\n\n return stringifyTokens(Formatter.parseFormat(fmt), tokenToString);\n }\n\n formatDurationFromString(dur, fmt) {\n const tokenToField = (token) => {\n switch (token[0]) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"w\":\n return \"week\";\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n default:\n return null;\n }\n },\n tokenToString = (lildur) => (token) => {\n const mapped = tokenToField(token);\n if (mapped) {\n return this.num(lildur.get(mapped), token.length);\n } else {\n return token;\n }\n },\n tokens = Formatter.parseFormat(fmt),\n realTokens = tokens.reduce(\n (found, { literal, val }) => (literal ? found : found.concat(val)),\n []\n ),\n collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t) => t));\n return stringifyTokens(tokens, tokenToString(collapsed));\n }\n}\n","import {\n untruncateYear,\n signedOffset,\n parseInteger,\n parseMillis,\n isUndefined,\n parseFloating,\n} from \"./util.js\";\nimport * as English from \"./english.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\n\n/*\n * This file handles parsing for well-specified formats. Here's how it works:\n * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match.\n * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object\n * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence.\n * Extractors can take a \"cursor\" representing the offset in the match to look at. This makes it easy to combine extractors.\n * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions.\n * Some extractions are super dumb and simpleParse and fromStrings help DRY them.\n */\n\nconst ianaRegex = /[A-Za-z_+-]{1,256}(?::?\\/[A-Za-z0-9_+-]{1,256}(?:\\/[A-Za-z0-9_+-]{1,256})?)?/;\n\nfunction combineRegexes(...regexes) {\n const full = regexes.reduce((f, r) => f + r.source, \"\");\n return RegExp(`^${full}$`);\n}\n\nfunction combineExtractors(...extractors) {\n return (m) =>\n extractors\n .reduce(\n ([mergedVals, mergedZone, cursor], ex) => {\n const [val, zone, next] = ex(m, cursor);\n return [{ ...mergedVals, ...val }, zone || mergedZone, next];\n },\n [{}, null, 1]\n )\n .slice(0, 2);\n}\n\nfunction parse(s, ...patterns) {\n if (s == null) {\n return [null, null];\n }\n\n for (const [regex, extractor] of patterns) {\n const m = regex.exec(s);\n if (m) {\n return extractor(m);\n }\n }\n return [null, null];\n}\n\nfunction simpleParse(...keys) {\n return (match, cursor) => {\n const ret = {};\n let i;\n\n for (i = 0; i < keys.length; i++) {\n ret[keys[i]] = parseInteger(match[cursor + i]);\n }\n return [ret, null, cursor + i];\n };\n}\n\n// ISO and SQL parsing\nconst offsetRegex = /(?:(Z)|([+-]\\d\\d)(?::?(\\d\\d))?)/;\nconst isoExtendedZone = `(?:${offsetRegex.source}?(?:\\\\[(${ianaRegex.source})\\\\])?)?`;\nconst isoTimeBaseRegex = /(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d{1,30}))?)?)?/;\nconst isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${isoExtendedZone}`);\nconst isoTimeExtensionRegex = RegExp(`(?:T${isoTimeRegex.source})?`);\nconst isoYmdRegex = /([+-]\\d{6}|\\d{4})(?:-?(\\d\\d)(?:-?(\\d\\d))?)?/;\nconst isoWeekRegex = /(\\d{4})-?W(\\d\\d)(?:-?(\\d))?/;\nconst isoOrdinalRegex = /(\\d{4})-?(\\d{3})/;\nconst extractISOWeekData = simpleParse(\"weekYear\", \"weekNumber\", \"weekDay\");\nconst extractISOOrdinalData = simpleParse(\"year\", \"ordinal\");\nconst sqlYmdRegex = /(\\d{4})-(\\d\\d)-(\\d\\d)/; // dumbed-down version of the ISO one\nconst sqlTimeRegex = RegExp(\n `${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`\n);\nconst sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`);\n\nfunction int(match, pos, fallback) {\n const m = match[pos];\n return isUndefined(m) ? fallback : parseInteger(m);\n}\n\nfunction extractISOYmd(match, cursor) {\n const item = {\n year: int(match, cursor),\n month: int(match, cursor + 1, 1),\n day: int(match, cursor + 2, 1),\n };\n\n return [item, null, cursor + 3];\n}\n\nfunction extractISOTime(match, cursor) {\n const item = {\n hours: int(match, cursor, 0),\n minutes: int(match, cursor + 1, 0),\n seconds: int(match, cursor + 2, 0),\n milliseconds: parseMillis(match[cursor + 3]),\n };\n\n return [item, null, cursor + 4];\n}\n\nfunction extractISOOffset(match, cursor) {\n const local = !match[cursor] && !match[cursor + 1],\n fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]),\n zone = local ? null : FixedOffsetZone.instance(fullOffset);\n return [{}, zone, cursor + 3];\n}\n\nfunction extractIANAZone(match, cursor) {\n const zone = match[cursor] ? IANAZone.create(match[cursor]) : null;\n return [{}, zone, cursor + 1];\n}\n\n// ISO time parsing\n\nconst isoTimeOnly = RegExp(`^T?${isoTimeBaseRegex.source}$`);\n\n// ISO duration parsing\n\nconst isoDuration =\n /^-?P(?:(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)Y)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)W)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)D)?(?:T(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)H)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20})(?:[.,](-?\\d{1,20}))?S)?)?)$/;\n\nfunction extractISODuration(match) {\n const [s, yearStr, monthStr, weekStr, dayStr, hourStr, minuteStr, secondStr, millisecondsStr] =\n match;\n\n const hasNegativePrefix = s[0] === \"-\";\n const negativeSeconds = secondStr && secondStr[0] === \"-\";\n\n const maybeNegate = (num, force = false) =>\n num !== undefined && (force || (num && hasNegativePrefix)) ? -num : num;\n\n return [\n {\n years: maybeNegate(parseFloating(yearStr)),\n months: maybeNegate(parseFloating(monthStr)),\n weeks: maybeNegate(parseFloating(weekStr)),\n days: maybeNegate(parseFloating(dayStr)),\n hours: maybeNegate(parseFloating(hourStr)),\n minutes: maybeNegate(parseFloating(minuteStr)),\n seconds: maybeNegate(parseFloating(secondStr), secondStr === \"-0\"),\n milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds),\n },\n ];\n}\n\n// These are a little braindead. EDT *should* tell us that we're in, say, America/New_York\n// and not just that we're in -240 *right now*. But since I don't think these are used that often\n// I'm just going to ignore that\nconst obsOffsets = {\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n};\n\nfunction fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n const result = {\n year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr),\n month: English.monthsShort.indexOf(monthStr) + 1,\n day: parseInteger(dayStr),\n hour: parseInteger(hourStr),\n minute: parseInteger(minuteStr),\n };\n\n if (secondStr) result.second = parseInteger(secondStr);\n if (weekdayStr) {\n result.weekday =\n weekdayStr.length > 3\n ? English.weekdaysLong.indexOf(weekdayStr) + 1\n : English.weekdaysShort.indexOf(weekdayStr) + 1;\n }\n\n return result;\n}\n\n// RFC 2822/5322\nconst rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\\d\\d)(\\d\\d)))$/;\n\nfunction extractRFC2822(match) {\n const [\n ,\n weekdayStr,\n dayStr,\n monthStr,\n yearStr,\n hourStr,\n minuteStr,\n secondStr,\n obsOffset,\n milOffset,\n offHourStr,\n offMinuteStr,\n ] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n\n let offset;\n if (obsOffset) {\n offset = obsOffsets[obsOffset];\n } else if (milOffset) {\n offset = 0;\n } else {\n offset = signedOffset(offHourStr, offMinuteStr);\n }\n\n return [result, new FixedOffsetZone(offset)];\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, \" \")\n .replace(/(\\s\\s+)/g, \" \")\n .trim();\n}\n\n// http date\n\nconst rfc1123 =\n /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d\\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n rfc850 =\n /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d\\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n ascii =\n /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \\d|\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) (\\d{4})$/;\n\nfunction extractRFC1123Or850(match) {\n const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nfunction extractASCII(match) {\n const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nconst isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex);\nconst isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex);\nconst isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex);\nconst isoTimeCombinedRegex = combineRegexes(isoTimeRegex);\n\nconst extractISOYmdTimeAndOffset = combineExtractors(\n extractISOYmd,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOWeekTimeAndOffset = combineExtractors(\n extractISOWeekData,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOOrdinalDateAndTime = combineExtractors(\n extractISOOrdinalData,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOTimeAndOffset = combineExtractors(\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\n\n/*\n * @private\n */\n\nexport function parseISODate(s) {\n return parse(\n s,\n [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],\n [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset],\n [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime],\n [isoTimeCombinedRegex, extractISOTimeAndOffset]\n );\n}\n\nexport function parseRFC2822Date(s) {\n return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]);\n}\n\nexport function parseHTTPDate(s) {\n return parse(\n s,\n [rfc1123, extractRFC1123Or850],\n [rfc850, extractRFC1123Or850],\n [ascii, extractASCII]\n );\n}\n\nexport function parseISODuration(s) {\n return parse(s, [isoDuration, extractISODuration]);\n}\n\nconst extractISOTimeOnly = combineExtractors(extractISOTime);\n\nexport function parseISOTimeOnly(s) {\n return parse(s, [isoTimeOnly, extractISOTimeOnly]);\n}\n\nconst sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex);\nconst sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex);\n\nconst extractISOTimeOffsetAndIANAZone = combineExtractors(\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\n\nexport function parseSQL(s) {\n return parse(\n s,\n [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],\n [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]\n );\n}\n","import { InvalidArgumentError, InvalidDurationError, InvalidUnitError } from \"./errors.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport Invalid from \"./impl/invalid.js\";\nimport Locale from \"./impl/locale.js\";\nimport { parseISODuration, parseISOTimeOnly } from \"./impl/regexParser.js\";\nimport {\n asNumber,\n hasOwnProperty,\n isNumber,\n isUndefined,\n normalizeObject,\n roundTo,\n} from \"./impl/util.js\";\nimport Settings from \"./settings.js\";\nimport DateTime from \"./datetime.js\";\n\nconst INVALID = \"Invalid Duration\";\n\n// unit conversion constants\nexport const lowOrderMatrix = {\n weeks: {\n days: 7,\n hours: 7 * 24,\n minutes: 7 * 24 * 60,\n seconds: 7 * 24 * 60 * 60,\n milliseconds: 7 * 24 * 60 * 60 * 1000,\n },\n days: {\n hours: 24,\n minutes: 24 * 60,\n seconds: 24 * 60 * 60,\n milliseconds: 24 * 60 * 60 * 1000,\n },\n hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1000 },\n minutes: { seconds: 60, milliseconds: 60 * 1000 },\n seconds: { milliseconds: 1000 },\n },\n casualMatrix = {\n years: {\n quarters: 4,\n months: 12,\n weeks: 52,\n days: 365,\n hours: 365 * 24,\n minutes: 365 * 24 * 60,\n seconds: 365 * 24 * 60 * 60,\n milliseconds: 365 * 24 * 60 * 60 * 1000,\n },\n quarters: {\n months: 3,\n weeks: 13,\n days: 91,\n hours: 91 * 24,\n minutes: 91 * 24 * 60,\n seconds: 91 * 24 * 60 * 60,\n milliseconds: 91 * 24 * 60 * 60 * 1000,\n },\n months: {\n weeks: 4,\n days: 30,\n hours: 30 * 24,\n minutes: 30 * 24 * 60,\n seconds: 30 * 24 * 60 * 60,\n milliseconds: 30 * 24 * 60 * 60 * 1000,\n },\n\n ...lowOrderMatrix,\n },\n daysInYearAccurate = 146097.0 / 400,\n daysInMonthAccurate = 146097.0 / 4800,\n accurateMatrix = {\n years: {\n quarters: 4,\n months: 12,\n weeks: daysInYearAccurate / 7,\n days: daysInYearAccurate,\n hours: daysInYearAccurate * 24,\n minutes: daysInYearAccurate * 24 * 60,\n seconds: daysInYearAccurate * 24 * 60 * 60,\n milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000,\n },\n quarters: {\n months: 3,\n weeks: daysInYearAccurate / 28,\n days: daysInYearAccurate / 4,\n hours: (daysInYearAccurate * 24) / 4,\n minutes: (daysInYearAccurate * 24 * 60) / 4,\n seconds: (daysInYearAccurate * 24 * 60 * 60) / 4,\n milliseconds: (daysInYearAccurate * 24 * 60 * 60 * 1000) / 4,\n },\n months: {\n weeks: daysInMonthAccurate / 7,\n days: daysInMonthAccurate,\n hours: daysInMonthAccurate * 24,\n minutes: daysInMonthAccurate * 24 * 60,\n seconds: daysInMonthAccurate * 24 * 60 * 60,\n milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000,\n },\n ...lowOrderMatrix,\n };\n\n// units ordered by size\nconst orderedUnits = [\n \"years\",\n \"quarters\",\n \"months\",\n \"weeks\",\n \"days\",\n \"hours\",\n \"minutes\",\n \"seconds\",\n \"milliseconds\",\n];\n\nconst reverseUnits = orderedUnits.slice(0).reverse();\n\n// clone really means \"create another instance just like this one, but with these changes\"\nfunction clone(dur, alts, clear = false) {\n // deep merge for vals\n const conf = {\n values: clear ? alts.values : { ...dur.values, ...(alts.values || {}) },\n loc: dur.loc.clone(alts.loc),\n conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy,\n matrix: alts.matrix || dur.matrix,\n };\n return new Duration(conf);\n}\n\nfunction durationToMillis(matrix, vals) {\n let sum = vals.milliseconds ?? 0;\n for (const unit of reverseUnits.slice(1)) {\n if (vals[unit]) {\n sum += vals[unit] * matrix[unit][\"milliseconds\"];\n }\n }\n return sum;\n}\n\n// NB: mutates parameters\nfunction normalizeValues(matrix, vals) {\n // the logic below assumes the overall value of the duration is positive\n // if this is not the case, factor is used to make it so\n const factor = durationToMillis(matrix, vals) < 0 ? -1 : 1;\n\n orderedUnits.reduceRight((previous, current) => {\n if (!isUndefined(vals[current])) {\n if (previous) {\n const previousVal = vals[previous] * factor;\n const conv = matrix[current][previous];\n\n // if (previousVal < 0):\n // lower order unit is negative (e.g. { years: 2, days: -2 })\n // normalize this by reducing the higher order unit by the appropriate amount\n // and increasing the lower order unit\n // this can never make the higher order unit negative, because this function only operates\n // on positive durations, so the amount of time represented by the lower order unit cannot\n // be larger than the higher order unit\n // else:\n // lower order unit is positive (e.g. { years: 2, days: 450 } or { years: -2, days: 450 })\n // in this case we attempt to convert as much as possible from the lower order unit into\n // the higher order one\n //\n // Math.floor takes care of both of these cases, rounding away from 0\n // if previousVal < 0 it makes the absolute value larger\n // if previousVal >= it makes the absolute value smaller\n const rollUp = Math.floor(previousVal / conv);\n vals[current] += rollUp * factor;\n vals[previous] -= rollUp * conv * factor;\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n\n // try to convert any decimals into smaller units if possible\n // for example for { years: 2.5, days: 0, seconds: 0 } we want to get { years: 2, days: 182, hours: 12 }\n orderedUnits.reduce((previous, current) => {\n if (!isUndefined(vals[current])) {\n if (previous) {\n const fraction = vals[previous] % 1;\n vals[previous] -= fraction;\n vals[current] += fraction * matrix[previous][current];\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n}\n\n// Remove all properties with a value of 0 from an object\nfunction removeZeroes(vals) {\n const newVals = {};\n for (const [key, value] of Object.entries(vals)) {\n if (value !== 0) {\n newVals[key] = value;\n }\n }\n return newVals;\n}\n\n/**\n * A Duration object represents a period of time, like \"2 months\" or \"1 day, 1 hour\". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime#plus} to add a Duration object to a DateTime, producing another DateTime.\n *\n * Here is a brief overview of commonly used methods and getters in Duration:\n *\n * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}.\n * * **Unit values** See the {@link Duration#years}, {@link Duration#months}, {@link Duration#weeks}, {@link Duration#days}, {@link Duration#hours}, {@link Duration#minutes}, {@link Duration#seconds}, {@link Duration#milliseconds} accessors.\n * * **Configuration** See {@link Duration#locale} and {@link Duration#numberingSystem} accessors.\n * * **Transformation** To create new Durations out of old ones use {@link Duration#plus}, {@link Duration#minus}, {@link Duration#normalize}, {@link Duration#set}, {@link Duration#reconfigure}, {@link Duration#shiftTo}, and {@link Duration#negate}.\n * * **Output** To convert the Duration into other representations, see {@link Duration#as}, {@link Duration#toISO}, {@link Duration#toFormat}, and {@link Duration#toJSON}\n *\n * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation.\n */\nexport default class Duration {\n /**\n * @private\n */\n constructor(config) {\n const accurate = config.conversionAccuracy === \"longterm\" || false;\n let matrix = accurate ? accurateMatrix : casualMatrix;\n\n if (config.matrix) {\n matrix = config.matrix;\n }\n\n /**\n * @access private\n */\n this.values = config.values;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.conversionAccuracy = accurate ? \"longterm\" : \"casual\";\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.matrix = matrix;\n /**\n * @access private\n */\n this.isLuxonDuration = true;\n }\n\n /**\n * Create Duration from a number of milliseconds.\n * @param {number} count of milliseconds\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n static fromMillis(count, opts) {\n return Duration.fromObject({ milliseconds: count }, opts);\n }\n\n /**\n * Create a Duration from a JavaScript object with keys like 'years' and 'hours'.\n * If this object is empty then a zero milliseconds duration is returned.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.years\n * @param {number} obj.quarters\n * @param {number} obj.months\n * @param {number} obj.weeks\n * @param {number} obj.days\n * @param {number} obj.hours\n * @param {number} obj.minutes\n * @param {number} obj.seconds\n * @param {number} obj.milliseconds\n * @param {Object} [opts=[]] - options for creating this Duration\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the custom conversion system to use\n * @return {Duration}\n */\n static fromObject(obj, opts = {}) {\n if (obj == null || typeof obj !== \"object\") {\n throw new InvalidArgumentError(\n `Duration.fromObject: argument expected to be an object, got ${\n obj === null ? \"null\" : typeof obj\n }`\n );\n }\n\n return new Duration({\n values: normalizeObject(obj, Duration.normalizeUnit),\n loc: Locale.fromObject(opts),\n conversionAccuracy: opts.conversionAccuracy,\n matrix: opts.matrix,\n });\n }\n\n /**\n * Create a Duration from DurationLike.\n *\n * @param {Object | number | Duration} durationLike\n * One of:\n * - object with keys like 'years' and 'hours'.\n * - number representing milliseconds\n * - Duration instance\n * @return {Duration}\n */\n static fromDurationLike(durationLike) {\n if (isNumber(durationLike)) {\n return Duration.fromMillis(durationLike);\n } else if (Duration.isDuration(durationLike)) {\n return durationLike;\n } else if (typeof durationLike === \"object\") {\n return Duration.fromObject(durationLike);\n } else {\n throw new InvalidArgumentError(\n `Unknown duration argument ${durationLike} of type ${typeof durationLike}`\n );\n }\n }\n\n /**\n * Create a Duration from an ISO 8601 duration string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the preset conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }\n * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }\n * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }\n * @return {Duration}\n */\n static fromISO(text, opts) {\n const [parsed] = parseISODuration(text);\n if (parsed) {\n return Duration.fromObject(parsed, opts);\n } else {\n return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n }\n\n /**\n * Create a Duration from an ISO 8601 time string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 }\n * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @return {Duration}\n */\n static fromISOTime(text, opts) {\n const [parsed] = parseISOTimeOnly(text);\n if (parsed) {\n return Duration.fromObject(parsed, opts);\n } else {\n return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n }\n\n /**\n * Create an invalid Duration.\n * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Duration}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Duration is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDurationError(invalid);\n } else {\n return new Duration({ invalid });\n }\n }\n\n /**\n * @private\n */\n static normalizeUnit(unit) {\n const normalized = {\n year: \"years\",\n years: \"years\",\n quarter: \"quarters\",\n quarters: \"quarters\",\n month: \"months\",\n months: \"months\",\n week: \"weeks\",\n weeks: \"weeks\",\n day: \"days\",\n days: \"days\",\n hour: \"hours\",\n hours: \"hours\",\n minute: \"minutes\",\n minutes: \"minutes\",\n second: \"seconds\",\n seconds: \"seconds\",\n millisecond: \"milliseconds\",\n milliseconds: \"milliseconds\",\n }[unit ? unit.toLowerCase() : unit];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n }\n\n /**\n * Check if an object is a Duration. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDuration(o) {\n return (o && o.isLuxonDuration) || false;\n }\n\n /**\n * Get the locale of a Duration, such 'en-GB'\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:\n * * `S` for milliseconds\n * * `s` for seconds\n * * `m` for minutes\n * * `h` for hours\n * * `d` for days\n * * `w` for weeks\n * * `M` for months\n * * `y` for years\n * Notes:\n * * Add padding by repeating the token, e.g. \"yy\" pads the years to two digits, \"hhhh\" pads the hours out to four digits\n * * Tokens can be escaped by wrapping with single quotes.\n * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.\n * @param {string} fmt - the format string\n * @param {Object} opts - options\n * @param {boolean} [opts.floor=true] - floor numerical values\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"y d s\") //=> \"1 6 2\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"yy dd sss\") //=> \"01 06 002\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"M S\") //=> \"12 518402000\"\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n // reverse-compat since 1.2; we always round down now, never up, and we do it by default\n const fmtOpts = {\n ...opts,\n floor: opts.round !== false && opts.floor !== false,\n };\n return this.isValid\n ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a string representation of a Duration with all units included.\n * To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options\n * @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`.\n * @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor.\n * @example\n * ```js\n * var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 })\n * dur.toHuman() //=> '1 day, 5 hours, 6 minutes'\n * dur.toHuman({ listStyle: \"long\" }) //=> '1 day, 5 hours, and 6 minutes'\n * dur.toHuman({ unitDisplay: \"short\" }) //=> '1 day, 5 hr, 6 min'\n * ```\n */\n toHuman(opts = {}) {\n if (!this.isValid) return INVALID;\n\n const l = orderedUnits\n .map((unit) => {\n const val = this.values[unit];\n if (isUndefined(val)) {\n return null;\n }\n return this.loc\n .numberFormatter({ style: \"unit\", unitDisplay: \"long\", ...opts, unit: unit.slice(0, -1) })\n .format(val);\n })\n .filter((n) => n);\n\n return this.loc\n .listFormatter({ type: \"conjunction\", style: opts.listStyle || \"narrow\", ...opts })\n .format(l);\n }\n\n /**\n * Returns a JavaScript object with this Duration's values.\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }\n * @return {Object}\n */\n toObject() {\n if (!this.isValid) return {};\n return { ...this.values };\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'\n * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'\n * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'\n * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'\n * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'\n * @return {string}\n */\n toISO() {\n // we could use the formatter, but this is an easier way to get the minimum string\n if (!this.isValid) return null;\n\n let s = \"P\";\n if (this.years !== 0) s += this.years + \"Y\";\n if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + \"M\";\n if (this.weeks !== 0) s += this.weeks + \"W\";\n if (this.days !== 0) s += this.days + \"D\";\n if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0)\n s += \"T\";\n if (this.hours !== 0) s += this.hours + \"H\";\n if (this.minutes !== 0) s += this.minutes + \"M\";\n if (this.seconds !== 0 || this.milliseconds !== 0)\n // this will handle \"floating point madness\" by removing extra decimal places\n // https://stackoverflow.com/questions/588004/is-floating-point-math-broken\n s += roundTo(this.seconds + this.milliseconds / 1000, 3) + \"S\";\n if (s === \"P\") s += \"T0S\";\n return s;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.\n * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000'\n * @return {string}\n */\n toISOTime(opts = {}) {\n if (!this.isValid) return null;\n\n const millis = this.toMillis();\n if (millis < 0 || millis >= 86400000) return null;\n\n opts = {\n suppressMilliseconds: false,\n suppressSeconds: false,\n includePrefix: false,\n format: \"extended\",\n ...opts,\n includeOffset: false,\n };\n\n const dateTime = DateTime.fromMillis(millis, { zone: \"UTC\" });\n return dateTime.toISOTime(opts);\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in debugging.\n * @return {string}\n */\n toString() {\n return this.toISO();\n }\n\n /**\n * Returns a string representation of this Duration appropriate for the REPL.\n * @return {string}\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n if (this.isValid) {\n return `Duration { values: ${JSON.stringify(this.values)} }`;\n } else {\n return `Duration { Invalid, reason: ${this.invalidReason} }`;\n }\n }\n\n /**\n * Returns an milliseconds value of this Duration.\n * @return {number}\n */\n toMillis() {\n if (!this.isValid) return NaN;\n\n return durationToMillis(this.matrix, this.values);\n }\n\n /**\n * Returns an milliseconds value of this Duration. Alias of {@link toMillis}\n * @return {number}\n */\n valueOf() {\n return this.toMillis();\n }\n\n /**\n * Make this Duration longer by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n plus(duration) {\n if (!this.isValid) return this;\n\n const dur = Duration.fromDurationLike(duration),\n result = {};\n\n for (const k of orderedUnits) {\n if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) {\n result[k] = dur.get(k) + this.get(k);\n }\n }\n\n return clone(this, { values: result }, true);\n }\n\n /**\n * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n minus(duration) {\n if (!this.isValid) return this;\n\n const dur = Duration.fromDurationLike(duration);\n return this.plus(dur.negate());\n }\n\n /**\n * Scale this Duration by the specified amount. Return a newly-constructed Duration.\n * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 }\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === \"hours\" ? x * 2 : x) //=> { hours: 2, minutes: 30 }\n * @return {Duration}\n */\n mapUnits(fn) {\n if (!this.isValid) return this;\n const result = {};\n for (const k of Object.keys(this.values)) {\n result[k] = asNumber(fn(this.values[k], k));\n }\n return clone(this, { values: result }, true);\n }\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2\n * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0\n * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3\n * @return {number}\n */\n get(unit) {\n return this[Duration.normalizeUnit(unit)];\n }\n\n /**\n * \"Set\" the values of specified units. Return a newly-constructed Duration.\n * @param {Object} values - a mapping of units to numbers\n * @example dur.set({ years: 2017 })\n * @example dur.set({ hours: 8, minutes: 30 })\n * @return {Duration}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const mixed = { ...this.values, ...normalizeObject(values, Duration.normalizeUnit) };\n return clone(this, { values: mixed });\n }\n\n /**\n * \"Set\" the locale and/or numberingSystem. Returns a newly-constructed Duration.\n * @example dur.reconfigure({ locale: 'en-GB' })\n * @return {Duration}\n */\n reconfigure({ locale, numberingSystem, conversionAccuracy, matrix } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem });\n const opts = { loc, matrix, conversionAccuracy };\n return clone(this, opts);\n }\n\n /**\n * Return the length of the duration in the specified unit.\n * @param {string} unit - a unit such as 'minutes' or 'days'\n * @example Duration.fromObject({years: 1}).as('days') //=> 365\n * @example Duration.fromObject({years: 1}).as('months') //=> 12\n * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5\n * @return {number}\n */\n as(unit) {\n return this.isValid ? this.shiftTo(unit).get(unit) : NaN;\n }\n\n /**\n * Reduce this Duration to its canonical representation in its current units.\n * Assuming the overall value of the Duration is positive, this means:\n * - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example)\n * - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise\n * the overall value would be negative, see third example)\n * - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example)\n *\n * If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`.\n * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }\n * @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 }\n * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }\n * @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 }\n * @return {Duration}\n */\n normalize() {\n if (!this.isValid) return this;\n const vals = this.toObject();\n normalizeValues(this.matrix, vals);\n return clone(this, { values: vals }, true);\n }\n\n /**\n * Rescale units to its largest representation\n * @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 }\n * @return {Duration}\n */\n rescale() {\n if (!this.isValid) return this;\n const vals = removeZeroes(this.normalize().shiftToAll().toObject());\n return clone(this, { values: vals }, true);\n }\n\n /**\n * Convert this Duration into its representation in a different set of units.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }\n * @return {Duration}\n */\n shiftTo(...units) {\n if (!this.isValid) return this;\n\n if (units.length === 0) {\n return this;\n }\n\n units = units.map((u) => Duration.normalizeUnit(u));\n\n const built = {},\n accumulated = {},\n vals = this.toObject();\n let lastUnit;\n\n for (const k of orderedUnits) {\n if (units.indexOf(k) >= 0) {\n lastUnit = k;\n\n let own = 0;\n\n // anything we haven't boiled down yet should get boiled to this unit\n for (const ak in accumulated) {\n own += this.matrix[ak][k] * accumulated[ak];\n accumulated[ak] = 0;\n }\n\n // plus anything that's already in this unit\n if (isNumber(vals[k])) {\n own += vals[k];\n }\n\n // only keep the integer part for now in the hopes of putting any decimal part\n // into a smaller unit later\n const i = Math.trunc(own);\n built[k] = i;\n accumulated[k] = (own * 1000 - i * 1000) / 1000;\n\n // otherwise, keep it in the wings to boil it later\n } else if (isNumber(vals[k])) {\n accumulated[k] = vals[k];\n }\n }\n\n // anything leftover becomes the decimal for the last unit\n // lastUnit must be defined since units is not empty\n for (const key in accumulated) {\n if (accumulated[key] !== 0) {\n built[lastUnit] +=\n key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key];\n }\n }\n\n normalizeValues(this.matrix, built);\n return clone(this, { values: built }, true);\n }\n\n /**\n * Shift this Duration to all available units.\n * Same as shiftTo(\"years\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", \"seconds\", \"milliseconds\")\n * @return {Duration}\n */\n shiftToAll() {\n if (!this.isValid) return this;\n return this.shiftTo(\n \"years\",\n \"months\",\n \"weeks\",\n \"days\",\n \"hours\",\n \"minutes\",\n \"seconds\",\n \"milliseconds\"\n );\n }\n\n /**\n * Return the negative of this Duration.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }\n * @return {Duration}\n */\n negate() {\n if (!this.isValid) return this;\n const negated = {};\n for (const k of Object.keys(this.values)) {\n negated[k] = this.values[k] === 0 ? 0 : -this.values[k];\n }\n return clone(this, { values: negated }, true);\n }\n\n /**\n * Get the years.\n * @type {number}\n */\n get years() {\n return this.isValid ? this.values.years || 0 : NaN;\n }\n\n /**\n * Get the quarters.\n * @type {number}\n */\n get quarters() {\n return this.isValid ? this.values.quarters || 0 : NaN;\n }\n\n /**\n * Get the months.\n * @type {number}\n */\n get months() {\n return this.isValid ? this.values.months || 0 : NaN;\n }\n\n /**\n * Get the weeks\n * @type {number}\n */\n get weeks() {\n return this.isValid ? this.values.weeks || 0 : NaN;\n }\n\n /**\n * Get the days.\n * @type {number}\n */\n get days() {\n return this.isValid ? this.values.days || 0 : NaN;\n }\n\n /**\n * Get the hours.\n * @type {number}\n */\n get hours() {\n return this.isValid ? this.values.hours || 0 : NaN;\n }\n\n /**\n * Get the minutes.\n * @type {number}\n */\n get minutes() {\n return this.isValid ? this.values.minutes || 0 : NaN;\n }\n\n /**\n * Get the seconds.\n * @return {number}\n */\n get seconds() {\n return this.isValid ? this.values.seconds || 0 : NaN;\n }\n\n /**\n * Get the milliseconds.\n * @return {number}\n */\n get milliseconds() {\n return this.isValid ? this.values.milliseconds || 0 : NaN;\n }\n\n /**\n * Returns whether the Duration is invalid. Invalid durations are returned by diff operations\n * on invalid DateTimes or Intervals.\n * @return {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this Duration became invalid, or null if the Duration is valid\n * @return {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Duration became invalid, or null if the Duration is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Equality check\n * Two Durations are equal iff they have the same units and the same values for each unit.\n * @param {Duration} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n if (!this.loc.equals(other.loc)) {\n return false;\n }\n\n function eq(v1, v2) {\n // Consider 0 and undefined as equal\n if (v1 === undefined || v1 === 0) return v2 === undefined || v2 === 0;\n return v1 === v2;\n }\n\n for (const u of orderedUnits) {\n if (!eq(this.values[u], other.values[u])) {\n return false;\n }\n }\n return true;\n }\n}\n","import DateTime, { friendlyDateTime } from \"./datetime.js\";\nimport Duration from \"./duration.js\";\nimport Settings from \"./settings.js\";\nimport { InvalidArgumentError, InvalidIntervalError } from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport * as Formats from \"./impl/formats.js\";\n\nconst INVALID = \"Invalid Interval\";\n\n// checks if the start is equal to or before the end\nfunction validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\n \"end before start\",\n `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`\n );\n } else {\n return null;\n }\n}\n\n/**\n * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them.\n *\n * Here is a brief overview of the most commonly used methods and getters in Interval:\n *\n * * **Creation** To create an Interval, use {@link Interval.fromDateTimes}, {@link Interval.after}, {@link Interval.before}, or {@link Interval.fromISO}.\n * * **Accessors** Use {@link Interval#start} and {@link Interval#end} to get the start and end.\n * * **Interrogation** To analyze the Interval, use {@link Interval#count}, {@link Interval#length}, {@link Interval#hasSame}, {@link Interval#contains}, {@link Interval#isAfter}, or {@link Interval#isBefore}.\n * * **Transformation** To create other Intervals out of this one, use {@link Interval#set}, {@link Interval#splitAt}, {@link Interval#splitBy}, {@link Interval#divideEqually}, {@link Interval.merge}, {@link Interval.xor}, {@link Interval#union}, {@link Interval#intersection}, or {@link Interval#difference}.\n * * **Comparison** To compare this Interval to another one, use {@link Interval#equals}, {@link Interval#overlaps}, {@link Interval#abutsStart}, {@link Interval#abutsEnd}, {@link Interval#engulfs}\n * * **Output** To convert the Interval into other representations, see {@link Interval#toString}, {@link Interval#toLocaleString}, {@link Interval#toISO}, {@link Interval#toISODate}, {@link Interval#toISOTime}, {@link Interval#toFormat}, and {@link Interval#toDuration}.\n */\nexport default class Interval {\n /**\n * @private\n */\n constructor(config) {\n /**\n * @access private\n */\n this.s = config.start;\n /**\n * @access private\n */\n this.e = config.end;\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.isLuxonInterval = true;\n }\n\n /**\n * Create an invalid Interval.\n * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Interval}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Interval is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidIntervalError(invalid);\n } else {\n return new Interval({ invalid });\n }\n }\n\n /**\n * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.\n * @param {DateTime|Date|Object} start\n * @param {DateTime|Date|Object} end\n * @return {Interval}\n */\n static fromDateTimes(start, end) {\n const builtStart = friendlyDateTime(start),\n builtEnd = friendlyDateTime(end);\n\n const validateError = validateStartEnd(builtStart, builtEnd);\n\n if (validateError == null) {\n return new Interval({\n start: builtStart,\n end: builtEnd,\n });\n } else {\n return validateError;\n }\n }\n\n /**\n * Create an Interval from a start DateTime and a Duration to extend to.\n * @param {DateTime|Date|Object} start\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static after(start, duration) {\n const dur = Duration.fromDurationLike(duration),\n dt = friendlyDateTime(start);\n return Interval.fromDateTimes(dt, dt.plus(dur));\n }\n\n /**\n * Create an Interval from an end DateTime and a Duration to extend backwards to.\n * @param {DateTime|Date|Object} end\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static before(end, duration) {\n const dur = Duration.fromDurationLike(duration),\n dt = friendlyDateTime(end);\n return Interval.fromDateTimes(dt.minus(dur), dt);\n }\n\n /**\n * Create an Interval from an ISO 8601 string.\n * Accepts `/`, `/`, and `/` formats.\n * @param {string} text - the ISO string to parse\n * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {Interval}\n */\n static fromISO(text, opts) {\n const [s, e] = (text || \"\").split(\"/\", 2);\n if (s && e) {\n let start, startIsValid;\n try {\n start = DateTime.fromISO(s, opts);\n startIsValid = start.isValid;\n } catch (e) {\n startIsValid = false;\n }\n\n let end, endIsValid;\n try {\n end = DateTime.fromISO(e, opts);\n endIsValid = end.isValid;\n } catch (e) {\n endIsValid = false;\n }\n\n if (startIsValid && endIsValid) {\n return Interval.fromDateTimes(start, end);\n }\n\n if (startIsValid) {\n const dur = Duration.fromISO(e, opts);\n if (dur.isValid) {\n return Interval.after(start, dur);\n }\n } else if (endIsValid) {\n const dur = Duration.fromISO(s, opts);\n if (dur.isValid) {\n return Interval.before(end, dur);\n }\n }\n }\n return Interval.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n\n /**\n * Check if an object is an Interval. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isInterval(o) {\n return (o && o.isLuxonInterval) || false;\n }\n\n /**\n * Returns the start of the Interval\n * @type {DateTime}\n */\n get start() {\n return this.isValid ? this.s : null;\n }\n\n /**\n * Returns the end of the Interval\n * @type {DateTime}\n */\n get end() {\n return this.isValid ? this.e : null;\n }\n\n /**\n * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.\n * @type {boolean}\n */\n get isValid() {\n return this.invalidReason === null;\n }\n\n /**\n * Returns an error code if this Interval is invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Interval became invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Returns the length of the Interval in the specified unit.\n * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.\n * @return {number}\n */\n length(unit = \"milliseconds\") {\n return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN;\n }\n\n /**\n * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.\n * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'\n * asks 'what dates are included in this interval?', not 'how many days long is this interval?'\n * @param {string} [unit='milliseconds'] - the unit of time to count.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime\n * @return {number}\n */\n count(unit = \"milliseconds\", opts) {\n if (!this.isValid) return NaN;\n const start = this.start.startOf(unit, opts);\n let end;\n if (opts?.useLocaleWeeks) {\n end = this.end.reconfigure({ locale: start.locale });\n } else {\n end = this.end;\n }\n end = end.startOf(unit, opts);\n return Math.floor(end.diff(start, unit).get(unit)) + (end.valueOf() !== this.end.valueOf());\n }\n\n /**\n * Returns whether this Interval's start and end are both in the same unit of time\n * @param {string} unit - the unit of time to check sameness on\n * @return {boolean}\n */\n hasSame(unit) {\n return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;\n }\n\n /**\n * Return whether this Interval has the same start and end DateTimes.\n * @return {boolean}\n */\n isEmpty() {\n return this.s.valueOf() === this.e.valueOf();\n }\n\n /**\n * Return whether this Interval's start is after the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isAfter(dateTime) {\n if (!this.isValid) return false;\n return this.s > dateTime;\n }\n\n /**\n * Return whether this Interval's end is before the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isBefore(dateTime) {\n if (!this.isValid) return false;\n return this.e <= dateTime;\n }\n\n /**\n * Return whether this Interval contains the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n contains(dateTime) {\n if (!this.isValid) return false;\n return this.s <= dateTime && this.e > dateTime;\n }\n\n /**\n * \"Sets\" the start and/or end dates. Returns a newly-constructed Interval.\n * @param {Object} values - the values to set\n * @param {DateTime} values.start - the starting DateTime\n * @param {DateTime} values.end - the ending DateTime\n * @return {Interval}\n */\n set({ start, end } = {}) {\n if (!this.isValid) return this;\n return Interval.fromDateTimes(start || this.s, end || this.e);\n }\n\n /**\n * Split this Interval at each of the specified DateTimes\n * @param {...DateTime} dateTimes - the unit of time to count.\n * @return {Array}\n */\n splitAt(...dateTimes) {\n if (!this.isValid) return [];\n const sorted = dateTimes\n .map(friendlyDateTime)\n .filter((d) => this.contains(d))\n .sort((a, b) => a.toMillis() - b.toMillis()),\n results = [];\n let { s } = this,\n i = 0;\n\n while (s < this.e) {\n const added = sorted[i] || this.e,\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n i += 1;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into smaller Intervals, each of the specified length.\n * Left over time is grouped into a smaller interval\n * @param {Duration|Object|number} duration - The length of each resulting interval.\n * @return {Array}\n */\n splitBy(duration) {\n const dur = Duration.fromDurationLike(duration);\n\n if (!this.isValid || !dur.isValid || dur.as(\"milliseconds\") === 0) {\n return [];\n }\n\n let { s } = this,\n idx = 1,\n next;\n\n const results = [];\n while (s < this.e) {\n const added = this.start.plus(dur.mapUnits((x) => x * idx));\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n idx += 1;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into the specified number of smaller intervals.\n * @param {number} numberOfParts - The number of Intervals to divide the Interval into.\n * @return {Array}\n */\n divideEqually(numberOfParts) {\n if (!this.isValid) return [];\n return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);\n }\n\n /**\n * Return whether this Interval overlaps with the specified Interval\n * @param {Interval} other\n * @return {boolean}\n */\n overlaps(other) {\n return this.e > other.s && this.s < other.e;\n }\n\n /**\n * Return whether this Interval's end is adjacent to the specified Interval's start.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsStart(other) {\n if (!this.isValid) return false;\n return +this.e === +other.s;\n }\n\n /**\n * Return whether this Interval's start is adjacent to the specified Interval's end.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsEnd(other) {\n if (!this.isValid) return false;\n return +other.e === +this.s;\n }\n\n /**\n * Return whether this Interval engulfs the start and end of the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */\n engulfs(other) {\n if (!this.isValid) return false;\n return this.s <= other.s && this.e >= other.e;\n }\n\n /**\n * Return whether this Interval has the same start and end as the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n return this.s.equals(other.s) && this.e.equals(other.e);\n }\n\n /**\n * Return an Interval representing the intersection of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.\n * Returns null if the intersection is empty, meaning, the intervals don't intersect.\n * @param {Interval} other\n * @return {Interval}\n */\n intersection(other) {\n if (!this.isValid) return this;\n const s = this.s > other.s ? this.s : other.s,\n e = this.e < other.e ? this.e : other.e;\n\n if (s >= e) {\n return null;\n } else {\n return Interval.fromDateTimes(s, e);\n }\n }\n\n /**\n * Return an Interval representing the union of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.\n * @param {Interval} other\n * @return {Interval}\n */\n union(other) {\n if (!this.isValid) return this;\n const s = this.s < other.s ? this.s : other.s,\n e = this.e > other.e ? this.e : other.e;\n return Interval.fromDateTimes(s, e);\n }\n\n /**\n * Merge an array of Intervals into a equivalent minimal set of Intervals.\n * Combines overlapping and adjacent Intervals.\n * @param {Array} intervals\n * @return {Array}\n */\n static merge(intervals) {\n const [found, final] = intervals\n .sort((a, b) => a.s - b.s)\n .reduce(\n ([sofar, current], item) => {\n if (!current) {\n return [sofar, item];\n } else if (current.overlaps(item) || current.abutsStart(item)) {\n return [sofar, current.union(item)];\n } else {\n return [sofar.concat([current]), item];\n }\n },\n [[], null]\n );\n if (final) {\n found.push(final);\n }\n return found;\n }\n\n /**\n * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.\n * @param {Array} intervals\n * @return {Array}\n */\n static xor(intervals) {\n let start = null,\n currentCount = 0;\n const results = [],\n ends = intervals.map((i) => [\n { time: i.s, type: \"s\" },\n { time: i.e, type: \"e\" },\n ]),\n flattened = Array.prototype.concat(...ends),\n arr = flattened.sort((a, b) => a.time - b.time);\n\n for (const i of arr) {\n currentCount += i.type === \"s\" ? 1 : -1;\n\n if (currentCount === 1) {\n start = i.time;\n } else {\n if (start && +start !== +i.time) {\n results.push(Interval.fromDateTimes(start, i.time));\n }\n\n start = null;\n }\n }\n\n return Interval.merge(results);\n }\n\n /**\n * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.\n * @param {...Interval} intervals\n * @return {Array}\n */\n difference(...intervals) {\n return Interval.xor([this].concat(intervals))\n .map((i) => this.intersection(i))\n .filter((i) => i && !i.isEmpty());\n }\n\n /**\n * Returns a string representation of this Interval appropriate for debugging.\n * @return {string}\n */\n toString() {\n if (!this.isValid) return INVALID;\n return `[${this.s.toISO()} – ${this.e.toISO()})`;\n }\n\n /**\n * Returns a string representation of this Interval appropriate for the REPL.\n * @return {string}\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n if (this.isValid) {\n return `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`;\n } else {\n return `Interval { Invalid, reason: ${this.invalidReason} }`;\n }\n }\n\n /**\n * Returns a localized string representing this Interval. Accepts the same options as the\n * Intl.DateTimeFormat constructor and any presets defined by Luxon, such as\n * {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method\n * is browser-specific, but in general it will return an appropriate representation of the\n * Interval in the assigned locale. Defaults to the system's locale if no locale has been\n * specified.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or\n * Intl.DateTimeFormat constructor options.\n * @param {Object} opts - Options to override the configuration of the start DateTime.\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 – 11/8/2022\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 – 8, 2022\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 7–8 novembre 2022\n * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 – 8:00 PM\n * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p\n * @return {string}\n */\n toLocaleString(formatOpts = Formats.DATE_SHORT, opts = {}) {\n return this.isValid\n ? Formatter.create(this.s.loc.clone(opts), formatOpts).formatInterval(this)\n : INVALID;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Interval.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime#toISO}\n * @return {string}\n */\n toISO(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of date of this Interval.\n * The time components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {string}\n */\n toISODate() {\n if (!this.isValid) return INVALID;\n return `${this.s.toISODate()}/${this.e.toISODate()}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of time of this Interval.\n * The date components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime#toISO}\n * @return {string}\n */\n toISOTime(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this Interval formatted according to the specified format\n * string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible\n * formatting tool.\n * @param {string} dateFormat - The format string. This string formats the start and end time.\n * See {@link DateTime#toFormat} for details.\n * @param {Object} opts - Options.\n * @param {string} [opts.separator = ' – '] - A separator to place between the start and end\n * representations.\n * @return {string}\n */\n toFormat(dateFormat, { separator = \" – \" } = {}) {\n if (!this.isValid) return INVALID;\n return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`;\n }\n\n /**\n * Return a Duration representing the time spanned by this interval.\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }\n * @return {Duration}\n */\n toDuration(unit, opts) {\n if (!this.isValid) {\n return Duration.invalid(this.invalidReason);\n }\n return this.e.diff(this.s, unit, opts);\n }\n\n /**\n * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes\n * @param {function} mapFn\n * @return {Interval}\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))\n */\n mapEndpoints(mapFn) {\n return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));\n }\n}\n","import DateTime from \"./datetime.js\";\nimport Settings from \"./settings.js\";\nimport Locale from \"./impl/locale.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\n\nimport { hasLocaleWeekInfo, hasRelative } from \"./impl/util.js\";\n\n/**\n * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment.\n */\nexport default class Info {\n /**\n * Return whether the specified zone contains a DST.\n * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.\n * @return {boolean}\n */\n static hasDST(zone = Settings.defaultZone) {\n const proto = DateTime.now().setZone(zone).set({ month: 12 });\n\n return !zone.isUniversal && proto.offset !== proto.set({ month: 6 }).offset;\n }\n\n /**\n * Return whether the specified zone is a valid IANA specifier.\n * @param {string} zone - Zone to check\n * @return {boolean}\n */\n static isValidIANAZone(zone) {\n return IANAZone.isValidZone(zone);\n }\n\n /**\n * Converts the input into a {@link Zone} instance.\n *\n * * If `input` is already a Zone instance, it is returned unchanged.\n * * If `input` is a string containing a valid time zone name, a Zone instance\n * with that name is returned.\n * * If `input` is a string that doesn't refer to a known time zone, a Zone\n * instance with {@link Zone#isValid} == false is returned.\n * * If `input is a number, a Zone instance with the specified fixed offset\n * in minutes is returned.\n * * If `input` is `null` or `undefined`, the default zone is returned.\n * @param {string|Zone|number} [input] - the value to be converted\n * @return {Zone}\n */\n static normalizeZone(input) {\n return normalizeZone(input, Settings.defaultZone);\n }\n\n /**\n * Get the weekday on which the week starts according to the given locale.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number} the start of the week, 1 for Monday through 7 for Sunday\n */\n static getStartOfWeek({ locale = null, locObj = null } = {}) {\n return (locObj || Locale.create(locale)).getStartOfWeek();\n }\n\n /**\n * Get the minimum number of days necessary in a week before it is considered part of the next year according\n * to the given locale.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number}\n */\n static getMinimumDaysInFirstWeek({ locale = null, locObj = null } = {}) {\n return (locObj || Locale.create(locale)).getMinDaysInFirstWeek();\n }\n\n /**\n * Get the weekdays, which are considered the weekend according to the given locale\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday\n */\n static getWeekendWeekdays({ locale = null, locObj = null } = {}) {\n // copy the array, because we cache it internally\n return (locObj || Locale.create(locale)).getWeekendDays().slice();\n }\n\n /**\n * Return an array of standalone month names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @example Info.months()[0] //=> 'January'\n * @example Info.months('short')[0] //=> 'Jan'\n * @example Info.months('numeric')[0] //=> '1'\n * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'\n * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'\n * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'\n * @return {Array}\n */\n static months(\n length = \"long\",\n { locale = null, numberingSystem = null, locObj = null, outputCalendar = \"gregory\" } = {}\n ) {\n return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length);\n }\n\n /**\n * Return an array of format month names.\n * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that\n * changes the string.\n * See {@link Info#months}\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @return {Array}\n */\n static monthsFormat(\n length = \"long\",\n { locale = null, numberingSystem = null, locObj = null, outputCalendar = \"gregory\" } = {}\n ) {\n return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length, true);\n }\n\n /**\n * Return an array of standalone week names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @example Info.weekdays()[0] //=> 'Monday'\n * @example Info.weekdays('short')[0] //=> 'Mon'\n * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'\n * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'\n * @return {Array}\n */\n static weekdays(length = \"long\", { locale = null, numberingSystem = null, locObj = null } = {}) {\n return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length);\n }\n\n /**\n * Return an array of format week names.\n * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that\n * changes the string.\n * See {@link Info#weekdays}\n * @param {string} [length='long'] - the length of the month representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale=null] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @return {Array}\n */\n static weekdaysFormat(\n length = \"long\",\n { locale = null, numberingSystem = null, locObj = null } = {}\n ) {\n return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length, true);\n }\n\n /**\n * Return an array of meridiems.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.meridiems() //=> [ 'AM', 'PM' ]\n * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]\n * @return {Array}\n */\n static meridiems({ locale = null } = {}) {\n return Locale.create(locale).meridiems();\n }\n\n /**\n * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.\n * @param {string} [length='short'] - the length of the era representation, such as \"short\" or \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.eras() //=> [ 'BC', 'AD' ]\n * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]\n * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]\n * @return {Array}\n */\n static eras(length = \"short\", { locale = null } = {}) {\n return Locale.create(locale, null, \"gregory\").eras(length);\n }\n\n /**\n * Return the set of available features in this environment.\n * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.\n * Keys:\n * * `relative`: whether this environment supports relative time formatting\n * * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale\n * @example Info.features() //=> { relative: false, localeWeek: true }\n * @return {Object}\n */\n static features() {\n return { relative: hasRelative(), localeWeek: hasLocaleWeekInfo() };\n }\n}\n","import Duration from \"../duration.js\";\n\nfunction dayDiff(earlier, later) {\n const utcDayStart = (dt) => dt.toUTC(0, { keepLocalTime: true }).startOf(\"day\").valueOf(),\n ms = utcDayStart(later) - utcDayStart(earlier);\n return Math.floor(Duration.fromMillis(ms).as(\"days\"));\n}\n\nfunction highOrderDiffs(cursor, later, units) {\n const differs = [\n [\"years\", (a, b) => b.year - a.year],\n [\"quarters\", (a, b) => b.quarter - a.quarter + (b.year - a.year) * 4],\n [\"months\", (a, b) => b.month - a.month + (b.year - a.year) * 12],\n [\n \"weeks\",\n (a, b) => {\n const days = dayDiff(a, b);\n return (days - (days % 7)) / 7;\n },\n ],\n [\"days\", dayDiff],\n ];\n\n const results = {};\n const earlier = cursor;\n let lowestOrder, highWater;\n\n /* This loop tries to diff using larger units first.\n If we overshoot, we backtrack and try the next smaller unit.\n \"cursor\" starts out at the earlier timestamp and moves closer and closer to \"later\"\n as we use smaller and smaller units.\n highWater keeps track of where we would be if we added one more of the smallest unit,\n this is used later to potentially convert any difference smaller than the smallest higher order unit\n into a fraction of that smallest higher order unit\n */\n for (const [unit, differ] of differs) {\n if (units.indexOf(unit) >= 0) {\n lowestOrder = unit;\n\n results[unit] = differ(cursor, later);\n highWater = earlier.plus(results);\n\n if (highWater > later) {\n // we overshot the end point, backtrack cursor by 1\n results[unit]--;\n cursor = earlier.plus(results);\n\n // if we are still overshooting now, we need to backtrack again\n // this happens in certain situations when diffing times in different zones,\n // because this calculation ignores time zones\n if (cursor > later) {\n // keep the \"overshot by 1\" around as highWater\n highWater = cursor;\n // backtrack cursor by 1\n results[unit]--;\n cursor = earlier.plus(results);\n }\n } else {\n cursor = highWater;\n }\n }\n }\n\n return [cursor, results, highWater, lowestOrder];\n}\n\nexport default function (earlier, later, units, opts) {\n let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units);\n\n const remainingMillis = later - cursor;\n\n const lowerOrderUnits = units.filter(\n (u) => [\"hours\", \"minutes\", \"seconds\", \"milliseconds\"].indexOf(u) >= 0\n );\n\n if (lowerOrderUnits.length === 0) {\n if (highWater < later) {\n highWater = cursor.plus({ [lowestOrder]: 1 });\n }\n\n if (highWater !== cursor) {\n results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);\n }\n }\n\n const duration = Duration.fromObject(results, opts);\n\n if (lowerOrderUnits.length > 0) {\n return Duration.fromMillis(remainingMillis, opts)\n .shiftTo(...lowerOrderUnits)\n .plus(duration);\n } else {\n return duration;\n }\n}\n","const numberingSystems = {\n arab: \"[\\u0660-\\u0669]\",\n arabext: \"[\\u06F0-\\u06F9]\",\n bali: \"[\\u1B50-\\u1B59]\",\n beng: \"[\\u09E6-\\u09EF]\",\n deva: \"[\\u0966-\\u096F]\",\n fullwide: \"[\\uFF10-\\uFF19]\",\n gujr: \"[\\u0AE6-\\u0AEF]\",\n hanidec: \"[〇|一|二|三|四|五|六|七|八|九]\",\n khmr: \"[\\u17E0-\\u17E9]\",\n knda: \"[\\u0CE6-\\u0CEF]\",\n laoo: \"[\\u0ED0-\\u0ED9]\",\n limb: \"[\\u1946-\\u194F]\",\n mlym: \"[\\u0D66-\\u0D6F]\",\n mong: \"[\\u1810-\\u1819]\",\n mymr: \"[\\u1040-\\u1049]\",\n orya: \"[\\u0B66-\\u0B6F]\",\n tamldec: \"[\\u0BE6-\\u0BEF]\",\n telu: \"[\\u0C66-\\u0C6F]\",\n thai: \"[\\u0E50-\\u0E59]\",\n tibt: \"[\\u0F20-\\u0F29]\",\n latn: \"\\\\d\",\n};\n\nconst numberingSystemsUTF16 = {\n arab: [1632, 1641],\n arabext: [1776, 1785],\n bali: [6992, 7001],\n beng: [2534, 2543],\n deva: [2406, 2415],\n fullwide: [65296, 65303],\n gujr: [2790, 2799],\n khmr: [6112, 6121],\n knda: [3302, 3311],\n laoo: [3792, 3801],\n limb: [6470, 6479],\n mlym: [3430, 3439],\n mong: [6160, 6169],\n mymr: [4160, 4169],\n orya: [2918, 2927],\n tamldec: [3046, 3055],\n telu: [3174, 3183],\n thai: [3664, 3673],\n tibt: [3872, 3881],\n};\n\nconst hanidecChars = numberingSystems.hanidec.replace(/[\\[|\\]]/g, \"\").split(\"\");\n\nexport function parseDigits(str) {\n let value = parseInt(str, 10);\n if (isNaN(value)) {\n value = \"\";\n for (let i = 0; i < str.length; i++) {\n const code = str.charCodeAt(i);\n\n if (str[i].search(numberingSystems.hanidec) !== -1) {\n value += hanidecChars.indexOf(str[i]);\n } else {\n for (const key in numberingSystemsUTF16) {\n const [min, max] = numberingSystemsUTF16[key];\n if (code >= min && code <= max) {\n value += code - min;\n }\n }\n }\n }\n return parseInt(value, 10);\n } else {\n return value;\n }\n}\n\nexport function digitRegex({ numberingSystem }, append = \"\") {\n return new RegExp(`${numberingSystems[numberingSystem || \"latn\"]}${append}`);\n}\n","import { parseMillis, isUndefined, untruncateYear, signedOffset, hasOwnProperty } from \"./util.js\";\nimport Formatter from \"./formatter.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport DateTime from \"../datetime.js\";\nimport { digitRegex, parseDigits } from \"./digits.js\";\nimport { ConflictingSpecificationError } from \"../errors.js\";\n\nconst MISSING_FTP = \"missing Intl.DateTimeFormat.formatToParts support\";\n\nfunction intUnit(regex, post = (i) => i) {\n return { regex, deser: ([s]) => post(parseDigits(s)) };\n}\n\nconst NBSP = String.fromCharCode(160);\nconst spaceOrNBSP = `[ ${NBSP}]`;\nconst spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, \"g\");\n\nfunction fixListRegex(s) {\n // make dots optional and also make them literal\n // make space and non breakable space characters interchangeable\n return s.replace(/\\./g, \"\\\\.?\").replace(spaceOrNBSPRegExp, spaceOrNBSP);\n}\n\nfunction stripInsensitivities(s) {\n return s\n .replace(/\\./g, \"\") // ignore dots that were made optional\n .replace(spaceOrNBSPRegExp, \" \") // interchange space and nbsp\n .toLowerCase();\n}\n\nfunction oneOf(strings, startIndex) {\n if (strings === null) {\n return null;\n } else {\n return {\n regex: RegExp(strings.map(fixListRegex).join(\"|\")),\n deser: ([s]) =>\n strings.findIndex((i) => stripInsensitivities(s) === stripInsensitivities(i)) + startIndex,\n };\n }\n}\n\nfunction offset(regex, groups) {\n return { regex, deser: ([, h, m]) => signedOffset(h, m), groups };\n}\n\nfunction simple(regex) {\n return { regex, deser: ([s]) => s };\n}\n\nfunction escapeToken(value) {\n return value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n}\n\n/**\n * @param token\n * @param {Locale} loc\n */\nfunction unitForToken(token, loc) {\n const one = digitRegex(loc),\n two = digitRegex(loc, \"{2}\"),\n three = digitRegex(loc, \"{3}\"),\n four = digitRegex(loc, \"{4}\"),\n six = digitRegex(loc, \"{6}\"),\n oneOrTwo = digitRegex(loc, \"{1,2}\"),\n oneToThree = digitRegex(loc, \"{1,3}\"),\n oneToSix = digitRegex(loc, \"{1,6}\"),\n oneToNine = digitRegex(loc, \"{1,9}\"),\n twoToFour = digitRegex(loc, \"{2,4}\"),\n fourToSix = digitRegex(loc, \"{4,6}\"),\n literal = (t) => ({ regex: RegExp(escapeToken(t.val)), deser: ([s]) => s, literal: true }),\n unitate = (t) => {\n if (token.literal) {\n return literal(t);\n }\n switch (t.val) {\n // era\n case \"G\":\n return oneOf(loc.eras(\"short\"), 0);\n case \"GG\":\n return oneOf(loc.eras(\"long\"), 0);\n // years\n case \"y\":\n return intUnit(oneToSix);\n case \"yy\":\n return intUnit(twoToFour, untruncateYear);\n case \"yyyy\":\n return intUnit(four);\n case \"yyyyy\":\n return intUnit(fourToSix);\n case \"yyyyyy\":\n return intUnit(six);\n // months\n case \"M\":\n return intUnit(oneOrTwo);\n case \"MM\":\n return intUnit(two);\n case \"MMM\":\n return oneOf(loc.months(\"short\", true), 1);\n case \"MMMM\":\n return oneOf(loc.months(\"long\", true), 1);\n case \"L\":\n return intUnit(oneOrTwo);\n case \"LL\":\n return intUnit(two);\n case \"LLL\":\n return oneOf(loc.months(\"short\", false), 1);\n case \"LLLL\":\n return oneOf(loc.months(\"long\", false), 1);\n // dates\n case \"d\":\n return intUnit(oneOrTwo);\n case \"dd\":\n return intUnit(two);\n // ordinals\n case \"o\":\n return intUnit(oneToThree);\n case \"ooo\":\n return intUnit(three);\n // time\n case \"HH\":\n return intUnit(two);\n case \"H\":\n return intUnit(oneOrTwo);\n case \"hh\":\n return intUnit(two);\n case \"h\":\n return intUnit(oneOrTwo);\n case \"mm\":\n return intUnit(two);\n case \"m\":\n return intUnit(oneOrTwo);\n case \"q\":\n return intUnit(oneOrTwo);\n case \"qq\":\n return intUnit(two);\n case \"s\":\n return intUnit(oneOrTwo);\n case \"ss\":\n return intUnit(two);\n case \"S\":\n return intUnit(oneToThree);\n case \"SSS\":\n return intUnit(three);\n case \"u\":\n return simple(oneToNine);\n case \"uu\":\n return simple(oneOrTwo);\n case \"uuu\":\n return intUnit(one);\n // meridiem\n case \"a\":\n return oneOf(loc.meridiems(), 0);\n // weekYear (k)\n case \"kkkk\":\n return intUnit(four);\n case \"kk\":\n return intUnit(twoToFour, untruncateYear);\n // weekNumber (W)\n case \"W\":\n return intUnit(oneOrTwo);\n case \"WW\":\n return intUnit(two);\n // weekdays\n case \"E\":\n case \"c\":\n return intUnit(one);\n case \"EEE\":\n return oneOf(loc.weekdays(\"short\", false), 1);\n case \"EEEE\":\n return oneOf(loc.weekdays(\"long\", false), 1);\n case \"ccc\":\n return oneOf(loc.weekdays(\"short\", true), 1);\n case \"cccc\":\n return oneOf(loc.weekdays(\"long\", true), 1);\n // offset/zone\n case \"Z\":\n case \"ZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2);\n case \"ZZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2);\n // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing\n // because we don't have any way to figure out what they are\n case \"z\":\n return simple(/[a-z_+-/]{1,256}?/i);\n // this special-case \"token\" represents a place where a macro-token expanded into a white-space literal\n // in this case we accept any non-newline white-space\n case \" \":\n return simple(/[^\\S\\n\\r]/);\n default:\n return literal(t);\n }\n };\n\n const unit = unitate(token) || {\n invalidReason: MISSING_FTP,\n };\n\n unit.token = token;\n\n return unit;\n}\n\nconst partTypeStyleToTokenVal = {\n year: {\n \"2-digit\": \"yy\",\n numeric: \"yyyyy\",\n },\n month: {\n numeric: \"M\",\n \"2-digit\": \"MM\",\n short: \"MMM\",\n long: \"MMMM\",\n },\n day: {\n numeric: \"d\",\n \"2-digit\": \"dd\",\n },\n weekday: {\n short: \"EEE\",\n long: \"EEEE\",\n },\n dayperiod: \"a\",\n dayPeriod: \"a\",\n hour12: {\n numeric: \"h\",\n \"2-digit\": \"hh\",\n },\n hour24: {\n numeric: \"H\",\n \"2-digit\": \"HH\",\n },\n minute: {\n numeric: \"m\",\n \"2-digit\": \"mm\",\n },\n second: {\n numeric: \"s\",\n \"2-digit\": \"ss\",\n },\n timeZoneName: {\n long: \"ZZZZZ\",\n short: \"ZZZ\",\n },\n};\n\nfunction tokenForPart(part, formatOpts, resolvedOpts) {\n const { type, value } = part;\n\n if (type === \"literal\") {\n const isSpace = /^\\s+$/.test(value);\n return {\n literal: !isSpace,\n val: isSpace ? \" \" : value,\n };\n }\n\n const style = formatOpts[type];\n\n // The user might have explicitly specified hour12 or hourCycle\n // if so, respect their decision\n // if not, refer back to the resolvedOpts, which are based on the locale\n let actualType = type;\n if (type === \"hour\") {\n if (formatOpts.hour12 != null) {\n actualType = formatOpts.hour12 ? \"hour12\" : \"hour24\";\n } else if (formatOpts.hourCycle != null) {\n if (formatOpts.hourCycle === \"h11\" || formatOpts.hourCycle === \"h12\") {\n actualType = \"hour12\";\n } else {\n actualType = \"hour24\";\n }\n } else {\n // tokens only differentiate between 24 hours or not,\n // so we do not need to check hourCycle here, which is less supported anyways\n actualType = resolvedOpts.hour12 ? \"hour12\" : \"hour24\";\n }\n }\n let val = partTypeStyleToTokenVal[actualType];\n if (typeof val === \"object\") {\n val = val[style];\n }\n\n if (val) {\n return {\n literal: false,\n val,\n };\n }\n\n return undefined;\n}\n\nfunction buildRegex(units) {\n const re = units.map((u) => u.regex).reduce((f, r) => `${f}(${r.source})`, \"\");\n return [`^${re}$`, units];\n}\n\nfunction match(input, regex, handlers) {\n const matches = input.match(regex);\n\n if (matches) {\n const all = {};\n let matchIndex = 1;\n for (const i in handlers) {\n if (hasOwnProperty(handlers, i)) {\n const h = handlers[i],\n groups = h.groups ? h.groups + 1 : 1;\n if (!h.literal && h.token) {\n all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups));\n }\n matchIndex += groups;\n }\n }\n return [matches, all];\n } else {\n return [matches, {}];\n }\n}\n\nfunction dateTimeFromMatches(matches) {\n const toField = (token) => {\n switch (token) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n case \"H\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"o\":\n return \"ordinal\";\n case \"L\":\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n case \"E\":\n case \"c\":\n return \"weekday\";\n case \"W\":\n return \"weekNumber\";\n case \"k\":\n return \"weekYear\";\n case \"q\":\n return \"quarter\";\n default:\n return null;\n }\n };\n\n let zone = null;\n let specificOffset;\n if (!isUndefined(matches.z)) {\n zone = IANAZone.create(matches.z);\n }\n\n if (!isUndefined(matches.Z)) {\n if (!zone) {\n zone = new FixedOffsetZone(matches.Z);\n }\n specificOffset = matches.Z;\n }\n\n if (!isUndefined(matches.q)) {\n matches.M = (matches.q - 1) * 3 + 1;\n }\n\n if (!isUndefined(matches.h)) {\n if (matches.h < 12 && matches.a === 1) {\n matches.h += 12;\n } else if (matches.h === 12 && matches.a === 0) {\n matches.h = 0;\n }\n }\n\n if (matches.G === 0 && matches.y) {\n matches.y = -matches.y;\n }\n\n if (!isUndefined(matches.u)) {\n matches.S = parseMillis(matches.u);\n }\n\n const vals = Object.keys(matches).reduce((r, k) => {\n const f = toField(k);\n if (f) {\n r[f] = matches[k];\n }\n\n return r;\n }, {});\n\n return [vals, zone, specificOffset];\n}\n\nlet dummyDateTimeCache = null;\n\nfunction getDummyDateTime() {\n if (!dummyDateTimeCache) {\n dummyDateTimeCache = DateTime.fromMillis(1555555555555);\n }\n\n return dummyDateTimeCache;\n}\n\nfunction maybeExpandMacroToken(token, locale) {\n if (token.literal) {\n return token;\n }\n\n const formatOpts = Formatter.macroTokenToFormatOpts(token.val);\n const tokens = formatOptsToTokens(formatOpts, locale);\n\n if (tokens == null || tokens.includes(undefined)) {\n return token;\n }\n\n return tokens;\n}\n\nexport function expandMacroTokens(tokens, locale) {\n return Array.prototype.concat(...tokens.map((t) => maybeExpandMacroToken(t, locale)));\n}\n\n/**\n * @private\n */\n\nexport function explainFromTokens(locale, input, format) {\n const tokens = expandMacroTokens(Formatter.parseFormat(format), locale),\n units = tokens.map((t) => unitForToken(t, locale)),\n disqualifyingUnit = units.find((t) => t.invalidReason);\n\n if (disqualifyingUnit) {\n return { input, tokens, invalidReason: disqualifyingUnit.invalidReason };\n } else {\n const [regexString, handlers] = buildRegex(units),\n regex = RegExp(regexString, \"i\"),\n [rawMatches, matches] = match(input, regex, handlers),\n [result, zone, specificOffset] = matches\n ? dateTimeFromMatches(matches)\n : [null, null, undefined];\n if (hasOwnProperty(matches, \"a\") && hasOwnProperty(matches, \"H\")) {\n throw new ConflictingSpecificationError(\n \"Can't include meridiem when specifying 24-hour format\"\n );\n }\n return { input, tokens, regex, rawMatches, matches, result, zone, specificOffset };\n }\n}\n\nexport function parseFromTokens(locale, input, format) {\n const { result, zone, specificOffset, invalidReason } = explainFromTokens(locale, input, format);\n return [result, zone, specificOffset, invalidReason];\n}\n\nexport function formatOptsToTokens(formatOpts, locale) {\n if (!formatOpts) {\n return null;\n }\n\n const formatter = Formatter.create(locale, formatOpts);\n const df = formatter.dtFormatter(getDummyDateTime());\n const parts = df.formatToParts();\n const resolvedOpts = df.resolvedOptions();\n return parts.map((p) => tokenForPart(p, formatOpts, resolvedOpts));\n}\n","import Duration from \"./duration.js\";\nimport Interval from \"./interval.js\";\nimport Settings from \"./settings.js\";\nimport Info from \"./info.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport FixedOffsetZone from \"./zones/fixedOffsetZone.js\";\nimport Locale from \"./impl/locale.js\";\nimport {\n isUndefined,\n maybeArray,\n isDate,\n isNumber,\n bestBy,\n daysInMonth,\n daysInYear,\n isLeapYear,\n weeksInWeekYear,\n normalizeObject,\n roundTo,\n objToLocalTS,\n padStart,\n} from \"./impl/util.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\nimport diff from \"./impl/diff.js\";\nimport { parseRFC2822Date, parseISODate, parseHTTPDate, parseSQL } from \"./impl/regexParser.js\";\nimport {\n parseFromTokens,\n explainFromTokens,\n formatOptsToTokens,\n expandMacroTokens,\n} from \"./impl/tokenParser.js\";\nimport {\n gregorianToWeek,\n weekToGregorian,\n gregorianToOrdinal,\n ordinalToGregorian,\n hasInvalidGregorianData,\n hasInvalidWeekData,\n hasInvalidOrdinalData,\n hasInvalidTimeData,\n usesLocalWeekValues,\n isoWeekdayToLocal,\n} from \"./impl/conversions.js\";\nimport * as Formats from \"./impl/formats.js\";\nimport {\n InvalidArgumentError,\n ConflictingSpecificationError,\n InvalidUnitError,\n InvalidDateTimeError,\n} from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\n\nconst INVALID = \"Invalid DateTime\";\nconst MAX_DATE = 8.64e15;\n\nfunction unsupportedZone(zone) {\n return new Invalid(\"unsupported zone\", `the zone \"${zone.name}\" is not supported`);\n}\n\n// we cache week data on the DT object and this intermediates the cache\n/**\n * @param {DateTime} dt\n */\nfunction possiblyCachedWeekData(dt) {\n if (dt.weekData === null) {\n dt.weekData = gregorianToWeek(dt.c);\n }\n return dt.weekData;\n}\n\n/**\n * @param {DateTime} dt\n */\nfunction possiblyCachedLocalWeekData(dt) {\n if (dt.localWeekData === null) {\n dt.localWeekData = gregorianToWeek(\n dt.c,\n dt.loc.getMinDaysInFirstWeek(),\n dt.loc.getStartOfWeek()\n );\n }\n return dt.localWeekData;\n}\n\n// clone really means, \"make a new object with these modifications\". all \"setters\" really use this\n// to create a new object while only changing some of the properties\nfunction clone(inst, alts) {\n const current = {\n ts: inst.ts,\n zone: inst.zone,\n c: inst.c,\n o: inst.o,\n loc: inst.loc,\n invalid: inst.invalid,\n };\n return new DateTime({ ...current, ...alts, old: current });\n}\n\n// find the right offset a given local time. The o input is our guess, which determines which\n// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)\nfunction fixOffset(localTS, o, tz) {\n // Our UTC time is just a guess because our offset is just a guess\n let utcGuess = localTS - o * 60 * 1000;\n\n // Test whether the zone matches the offset for this ts\n const o2 = tz.offset(utcGuess);\n\n // If so, offset didn't change and we're done\n if (o === o2) {\n return [utcGuess, o];\n }\n\n // If not, change the ts by the difference in the offset\n utcGuess -= (o2 - o) * 60 * 1000;\n\n // If that gives us the local time we want, we're done\n const o3 = tz.offset(utcGuess);\n if (o2 === o3) {\n return [utcGuess, o2];\n }\n\n // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];\n}\n\n// convert an epoch timestamp into a calendar object with the given offset\nfunction tsToObj(ts, offset) {\n ts += offset * 60 * 1000;\n\n const d = new Date(ts);\n\n return {\n year: d.getUTCFullYear(),\n month: d.getUTCMonth() + 1,\n day: d.getUTCDate(),\n hour: d.getUTCHours(),\n minute: d.getUTCMinutes(),\n second: d.getUTCSeconds(),\n millisecond: d.getUTCMilliseconds(),\n };\n}\n\n// convert a calendar object to a epoch timestamp\nfunction objToTS(obj, offset, zone) {\n return fixOffset(objToLocalTS(obj), offset, zone);\n}\n\n// create a new DT instance by adding a duration, adjusting for DSTs\nfunction adjustTime(inst, dur) {\n const oPre = inst.o,\n year = inst.c.year + Math.trunc(dur.years),\n month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3,\n c = {\n ...inst.c,\n year,\n month,\n day:\n Math.min(inst.c.day, daysInMonth(year, month)) +\n Math.trunc(dur.days) +\n Math.trunc(dur.weeks) * 7,\n },\n millisToAdd = Duration.fromObject({\n years: dur.years - Math.trunc(dur.years),\n quarters: dur.quarters - Math.trunc(dur.quarters),\n months: dur.months - Math.trunc(dur.months),\n weeks: dur.weeks - Math.trunc(dur.weeks),\n days: dur.days - Math.trunc(dur.days),\n hours: dur.hours,\n minutes: dur.minutes,\n seconds: dur.seconds,\n milliseconds: dur.milliseconds,\n }).as(\"milliseconds\"),\n localTS = objToLocalTS(c);\n\n let [ts, o] = fixOffset(localTS, oPre, inst.zone);\n\n if (millisToAdd !== 0) {\n ts += millisToAdd;\n // that could have changed the offset by going over a DST, but we want to keep the ts the same\n o = inst.zone.offset(ts);\n }\n\n return { ts, o };\n}\n\n// helper useful in turning the results of parsing into real dates\n// by handling the zone options\nfunction parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {\n const { setZone, zone } = opts;\n if ((parsed && Object.keys(parsed).length !== 0) || parsedZone) {\n const interpretationZone = parsedZone || zone,\n inst = DateTime.fromObject(parsed, {\n ...opts,\n zone: interpretationZone,\n specificOffset,\n });\n return setZone ? inst : inst.setZone(zone);\n } else {\n return DateTime.invalid(\n new Invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ${format}`)\n );\n }\n}\n\n// if you want to output a technical format (e.g. RFC 2822), this helper\n// helps handle the details\nfunction toTechFormat(dt, format, allowZ = true) {\n return dt.isValid\n ? Formatter.create(Locale.create(\"en-US\"), {\n allowZ,\n forceSimple: true,\n }).formatDateTimeFromString(dt, format)\n : null;\n}\n\nfunction toISODate(o, extended) {\n const longFormat = o.c.year > 9999 || o.c.year < 0;\n let c = \"\";\n if (longFormat && o.c.year >= 0) c += \"+\";\n c += padStart(o.c.year, longFormat ? 6 : 4);\n\n if (extended) {\n c += \"-\";\n c += padStart(o.c.month);\n c += \"-\";\n c += padStart(o.c.day);\n } else {\n c += padStart(o.c.month);\n c += padStart(o.c.day);\n }\n return c;\n}\n\nfunction toISOTime(\n o,\n extended,\n suppressSeconds,\n suppressMilliseconds,\n includeOffset,\n extendedZone\n) {\n let c = padStart(o.c.hour);\n if (extended) {\n c += \":\";\n c += padStart(o.c.minute);\n if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) {\n c += \":\";\n }\n } else {\n c += padStart(o.c.minute);\n }\n\n if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) {\n c += padStart(o.c.second);\n\n if (o.c.millisecond !== 0 || !suppressMilliseconds) {\n c += \".\";\n c += padStart(o.c.millisecond, 3);\n }\n }\n\n if (includeOffset) {\n if (o.isOffsetFixed && o.offset === 0 && !extendedZone) {\n c += \"Z\";\n } else if (o.o < 0) {\n c += \"-\";\n c += padStart(Math.trunc(-o.o / 60));\n c += \":\";\n c += padStart(Math.trunc(-o.o % 60));\n } else {\n c += \"+\";\n c += padStart(Math.trunc(o.o / 60));\n c += \":\";\n c += padStart(Math.trunc(o.o % 60));\n }\n }\n\n if (extendedZone) {\n c += \"[\" + o.zone.ianaName + \"]\";\n }\n return c;\n}\n\n// defaults for unspecified units in the supported calendars\nconst defaultUnitValues = {\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n },\n defaultWeekUnitValues = {\n weekNumber: 1,\n weekday: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n },\n defaultOrdinalUnitValues = {\n ordinal: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n };\n\n// Units in the supported calendars, sorted by bigness\nconst orderedUnits = [\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\", \"millisecond\"],\n orderedWeekUnits = [\n \"weekYear\",\n \"weekNumber\",\n \"weekday\",\n \"hour\",\n \"minute\",\n \"second\",\n \"millisecond\",\n ],\n orderedOrdinalUnits = [\"year\", \"ordinal\", \"hour\", \"minute\", \"second\", \"millisecond\"];\n\n// standardize case and plurality in units\nfunction normalizeUnit(unit) {\n const normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\",\n }[unit.toLowerCase()];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n}\n\nfunction normalizeUnitWithLocalWeeks(unit) {\n switch (unit.toLowerCase()) {\n case \"localweekday\":\n case \"localweekdays\":\n return \"localWeekday\";\n case \"localweeknumber\":\n case \"localweeknumbers\":\n return \"localWeekNumber\";\n case \"localweekyear\":\n case \"localweekyears\":\n return \"localWeekYear\";\n default:\n return normalizeUnit(unit);\n }\n}\n\n// this is a dumbed down version of fromObject() that runs about 60% faster\n// but doesn't do any validation, makes a bunch of assumptions about what units\n// are present, and so on.\nfunction quickDT(obj, opts) {\n const zone = normalizeZone(opts.zone, Settings.defaultZone),\n loc = Locale.fromObject(opts),\n tsNow = Settings.now();\n\n let ts, o;\n\n // assume we have the higher-order units\n if (!isUndefined(obj.year)) {\n for (const u of orderedUnits) {\n if (isUndefined(obj[u])) {\n obj[u] = defaultUnitValues[u];\n }\n }\n\n const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj);\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n const offsetProvis = zone.offset(tsNow);\n [ts, o] = objToTS(obj, offsetProvis, zone);\n } else {\n ts = tsNow;\n }\n\n return new DateTime({ ts, zone, loc, o });\n}\n\nfunction diffRelative(start, end, opts) {\n const round = isUndefined(opts.round) ? true : opts.round,\n format = (c, unit) => {\n c = roundTo(c, round || opts.calendary ? 0 : 2, true);\n const formatter = end.loc.clone(opts).relFormatter(opts);\n return formatter.format(c, unit);\n },\n differ = (unit) => {\n if (opts.calendary) {\n if (!end.hasSame(start, unit)) {\n return end.startOf(unit).diff(start.startOf(unit), unit).get(unit);\n } else return 0;\n } else {\n return end.diff(start, unit).get(unit);\n }\n };\n\n if (opts.unit) {\n return format(differ(opts.unit), opts.unit);\n }\n\n for (const unit of opts.units) {\n const count = differ(unit);\n if (Math.abs(count) >= 1) {\n return format(count, unit);\n }\n }\n return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]);\n}\n\nfunction lastOpts(argList) {\n let opts = {},\n args;\n if (argList.length > 0 && typeof argList[argList.length - 1] === \"object\") {\n opts = argList[argList.length - 1];\n args = Array.from(argList).slice(0, argList.length - 1);\n } else {\n args = Array.from(argList);\n }\n return [opts, args];\n}\n\n/**\n * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them.\n *\n * A DateTime comprises of:\n * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch.\n * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone).\n * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`.\n *\n * Here is a brief overview of the most commonly used functionality it provides:\n *\n * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link DateTime.local}, {@link DateTime.utc}, and (most flexibly) {@link DateTime.fromObject}. To create one from a standard string format, use {@link DateTime.fromISO}, {@link DateTime.fromHTTP}, and {@link DateTime.fromRFC2822}. To create one from a custom string format, use {@link DateTime.fromFormat}. To create one from a native JS date, use {@link DateTime.fromJSDate}.\n * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link DateTime#toObject}), use the {@link DateTime#year}, {@link DateTime#month},\n * {@link DateTime#day}, {@link DateTime#hour}, {@link DateTime#minute}, {@link DateTime#second}, {@link DateTime#millisecond} accessors.\n * * **Week calendar**: For ISO week calendar attributes, see the {@link DateTime#weekYear}, {@link DateTime#weekNumber}, and {@link DateTime#weekday} accessors.\n * * **Configuration** See the {@link DateTime#locale} and {@link DateTime#numberingSystem} accessors.\n * * **Transformation**: To transform the DateTime into other DateTimes, use {@link DateTime#set}, {@link DateTime#reconfigure}, {@link DateTime#setZone}, {@link DateTime#setLocale}, {@link DateTime.plus}, {@link DateTime#minus}, {@link DateTime#endOf}, {@link DateTime#startOf}, {@link DateTime#toUTC}, and {@link DateTime#toLocal}.\n * * **Output**: To convert the DateTime to other representations, use the {@link DateTime#toRelative}, {@link DateTime#toRelativeCalendar}, {@link DateTime#toJSON}, {@link DateTime#toISO}, {@link DateTime#toHTTP}, {@link DateTime#toObject}, {@link DateTime#toRFC2822}, {@link DateTime#toString}, {@link DateTime#toLocaleString}, {@link DateTime#toFormat}, {@link DateTime#toMillis} and {@link DateTime#toJSDate}.\n *\n * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation.\n */\nexport default class DateTime {\n /**\n * @access private\n */\n constructor(config) {\n const zone = config.zone || Settings.defaultZone;\n\n let invalid =\n config.invalid ||\n (Number.isNaN(config.ts) ? new Invalid(\"invalid input\") : null) ||\n (!zone.isValid ? unsupportedZone(zone) : null);\n /**\n * @access private\n */\n this.ts = isUndefined(config.ts) ? Settings.now() : config.ts;\n\n let c = null,\n o = null;\n if (!invalid) {\n const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);\n\n if (unchanged) {\n [c, o] = [config.old.c, config.old.o];\n } else {\n const ot = zone.offset(this.ts);\n c = tsToObj(this.ts, ot);\n invalid = Number.isNaN(c.year) ? new Invalid(\"invalid input\") : null;\n c = invalid ? null : c;\n o = invalid ? null : ot;\n }\n }\n\n /**\n * @access private\n */\n this._zone = zone;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.invalid = invalid;\n /**\n * @access private\n */\n this.weekData = null;\n /**\n * @access private\n */\n this.localWeekData = null;\n /**\n * @access private\n */\n this.c = c;\n /**\n * @access private\n */\n this.o = o;\n /**\n * @access private\n */\n this.isLuxonDateTime = true;\n }\n\n // CONSTRUCT\n\n /**\n * Create a DateTime for the current instant, in the system's time zone.\n *\n * Use Settings to override these default values if needed.\n * @example DateTime.now().toISO() //~> now in the ISO format\n * @return {DateTime}\n */\n static now() {\n return new DateTime({});\n }\n\n /**\n * Create a local DateTime\n * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month, 1-indexed\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @example DateTime.local() //~> now\n * @example DateTime.local({ zone: \"America/New_York\" }) //~> now, in US east coast time\n * @example DateTime.local(2017) //~> 2017-01-01T00:00:00\n * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00\n * @example DateTime.local(2017, 3, 12, { locale: \"fr\" }) //~> 2017-03-12T00:00:00, with a French locale\n * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00\n * @example DateTime.local(2017, 3, 12, 5, { zone: \"utc\" }) //~> 2017-03-12T05:00:00, in UTC\n * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00\n * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10\n * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765\n * @return {DateTime}\n */\n static local() {\n const [opts, args] = lastOpts(arguments),\n [year, month, day, hour, minute, second, millisecond] = args;\n return quickDT({ year, month, day, hour, minute, second, millisecond }, opts);\n }\n\n /**\n * Create a DateTime in UTC\n * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @param {Object} options - configuration options for the DateTime\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance\n * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance\n * @example DateTime.utc() //~> now\n * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z\n * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z\n * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: \"fr\" }) //~> 2017-03-12T05:45:00Z with a French locale\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: \"fr\" }) //~> 2017-03-12T05:45:10.765Z with a French locale\n * @return {DateTime}\n */\n static utc() {\n const [opts, args] = lastOpts(arguments),\n [year, month, day, hour, minute, second, millisecond] = args;\n\n opts.zone = FixedOffsetZone.utcInstance;\n return quickDT({ year, month, day, hour, minute, second, millisecond }, opts);\n }\n\n /**\n * Create a DateTime from a JavaScript Date object. Uses the default zone.\n * @param {Date} date - a JavaScript Date object\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @return {DateTime}\n */\n static fromJSDate(date, options = {}) {\n const ts = isDate(date) ? date.valueOf() : NaN;\n if (Number.isNaN(ts)) {\n return DateTime.invalid(\"invalid input\");\n }\n\n const zoneToUse = normalizeZone(options.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n return new DateTime({\n ts: ts,\n zone: zoneToUse,\n loc: Locale.fromObject(options),\n });\n }\n\n /**\n * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} milliseconds - a number of milliseconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromMillis(milliseconds, options = {}) {\n if (!isNumber(milliseconds)) {\n throw new InvalidArgumentError(\n `fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`\n );\n } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {\n // this isn't perfect because because we can still end up out of range because of additional shifting, but it's a start\n return DateTime.invalid(\"Timestamp out of range\");\n } else {\n return new DateTime({\n ts: milliseconds,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options),\n });\n }\n }\n\n /**\n * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} seconds - a number of seconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromSeconds(seconds, options = {}) {\n if (!isNumber(seconds)) {\n throw new InvalidArgumentError(\"fromSeconds requires a numerical input\");\n } else {\n return new DateTime({\n ts: seconds * 1000,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options),\n });\n }\n }\n\n /**\n * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.year - a year, such as 1987\n * @param {number} obj.month - a month, 1-12\n * @param {number} obj.day - a day of the month, 1-31, depending on the month\n * @param {number} obj.ordinal - day of the year, 1-365 or 366\n * @param {number} obj.weekYear - an ISO week year\n * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year\n * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday\n * @param {number} obj.localWeekYear - a week year, according to the locale\n * @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale\n * @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale\n * @param {number} obj.hour - hour of the day, 0-23\n * @param {number} obj.minute - minute of the hour, 0-59\n * @param {number} obj.second - second of the minute, 0-59\n * @param {number} obj.millisecond - millisecond of the second, 0-999\n * @param {Object} opts - options for creating this DateTime\n * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()\n * @param {string} [opts.locale='system\\'s locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'\n * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }),\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' })\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' })\n * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'\n * @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: \"en-US\" }).toISODate() //=> '2021-12-26'\n * @return {DateTime}\n */\n static fromObject(obj, opts = {}) {\n obj = obj || {};\n const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n const loc = Locale.fromObject(opts);\n const normalized = normalizeObject(obj, normalizeUnitWithLocalWeeks);\n const { minDaysInFirstWeek, startOfWeek } = usesLocalWeekValues(normalized, loc);\n\n const tsNow = Settings.now(),\n offsetProvis = !isUndefined(opts.specificOffset)\n ? opts.specificOffset\n : zoneToUse.offset(tsNow),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n\n // cases:\n // just a weekday -> this week's instance of that weekday, no worries\n // (gregorian data or ordinal) + (weekYear or weekNumber) -> error\n // (gregorian month or day) + ordinal -> error\n // otherwise just use weeks or ordinals or gregorian, depending on what's specified\n\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\n \"Can't mix weekYear/weekNumber units with year/month/day or ordinals\"\n );\n }\n\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n\n const useWeekData = definiteWeekDef || (normalized.weekday && !containsGregor);\n\n // configure ourselves to deal with gregorian dates or week stuff\n let units,\n defaultValues,\n objNow = tsToObj(tsNow, offsetProvis);\n if (useWeekData) {\n units = orderedWeekUnits;\n defaultValues = defaultWeekUnitValues;\n objNow = gregorianToWeek(objNow, minDaysInFirstWeek, startOfWeek);\n } else if (containsOrdinal) {\n units = orderedOrdinalUnits;\n defaultValues = defaultOrdinalUnitValues;\n objNow = gregorianToOrdinal(objNow);\n } else {\n units = orderedUnits;\n defaultValues = defaultUnitValues;\n }\n\n // set default values for missing stuff\n let foundFirst = false;\n for (const u of units) {\n const v = normalized[u];\n if (!isUndefined(v)) {\n foundFirst = true;\n } else if (foundFirst) {\n normalized[u] = defaultValues[u];\n } else {\n normalized[u] = objNow[u];\n }\n }\n\n // make sure the values we have are in range\n const higherOrderInvalid = useWeekData\n ? hasInvalidWeekData(normalized, minDaysInFirstWeek, startOfWeek)\n : containsOrdinal\n ? hasInvalidOrdinalData(normalized)\n : hasInvalidGregorianData(normalized),\n invalid = higherOrderInvalid || hasInvalidTimeData(normalized);\n\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n // compute the actual time\n const gregorian = useWeekData\n ? weekToGregorian(normalized, minDaysInFirstWeek, startOfWeek)\n : containsOrdinal\n ? ordinalToGregorian(normalized)\n : normalized,\n [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse),\n inst = new DateTime({\n ts: tsFinal,\n zone: zoneToUse,\n o: offsetFinal,\n loc,\n });\n\n // gregorian data + weekday serves only to validate\n if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {\n return DateTime.invalid(\n \"mismatched weekday\",\n `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`\n );\n }\n\n return inst;\n }\n\n /**\n * Create a DateTime from an ISO 8601 string\n * @param {string} text - the ISO string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance\n * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromISO('2016-05-25T09:08:34.123')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})\n * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})\n * @example DateTime.fromISO('2016-W05-4')\n * @return {DateTime}\n */\n static fromISO(text, opts = {}) {\n const [vals, parsedZone] = parseISODate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"ISO 8601\", text);\n }\n\n /**\n * Create a DateTime from an RFC 2822 string\n * @param {string} text - the RFC 2822 string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')\n * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')\n * @return {DateTime}\n */\n static fromRFC2822(text, opts = {}) {\n const [vals, parsedZone] = parseRFC2822Date(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"RFC 2822\", text);\n }\n\n /**\n * Create a DateTime from an HTTP header date\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @param {string} text - the HTTP header date\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994')\n * @return {DateTime}\n */\n static fromHTTP(text, opts = {}) {\n const [vals, parsedZone] = parseHTTPDate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"HTTP\", opts);\n }\n\n /**\n * Create a DateTime from an input string and format string.\n * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens).\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromFormat(text, fmt, opts = {}) {\n if (isUndefined(text) || isUndefined(fmt)) {\n throw new InvalidArgumentError(\"fromFormat requires an input string and a format\");\n }\n\n const { locale = null, numberingSystem = null } = opts,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n }),\n [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text, fmt);\n if (invalid) {\n return DateTime.invalid(invalid);\n } else {\n return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset);\n }\n }\n\n /**\n * @deprecated use fromFormat instead\n */\n static fromString(text, fmt, opts = {}) {\n return DateTime.fromFormat(text, fmt, opts);\n }\n\n /**\n * Create a DateTime from a SQL date, time, or datetime\n * Defaults to en-US if no locale has been specified, regardless of the system's locale\n * @param {string} text - the string to parse\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @example DateTime.fromSQL('2017-05-15')\n * @example DateTime.fromSQL('2017-05-15 09:12:34')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })\n * @example DateTime.fromSQL('09:12:34.342')\n * @return {DateTime}\n */\n static fromSQL(text, opts = {}) {\n const [vals, parsedZone] = parseSQL(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"SQL\", text);\n }\n\n /**\n * Create an invalid DateTime.\n * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent.\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {DateTime}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the DateTime is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDateTimeError(invalid);\n } else {\n return new DateTime({ invalid });\n }\n }\n\n /**\n * Check if an object is an instance of DateTime. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDateTime(o) {\n return (o && o.isLuxonDateTime) || false;\n }\n\n /**\n * Produce the format string for a set of options\n * @param formatOpts\n * @param localeOpts\n * @returns {string}\n */\n static parseFormatForOpts(formatOpts, localeOpts = {}) {\n const tokenList = formatOptsToTokens(formatOpts, Locale.fromObject(localeOpts));\n return !tokenList ? null : tokenList.map((t) => (t ? t.val : null)).join(\"\");\n }\n\n /**\n * Produce the the fully expanded format token for the locale\n * Does NOT quote characters, so quoted tokens will not round trip correctly\n * @param fmt\n * @param localeOpts\n * @returns {string}\n */\n static expandFormat(fmt, localeOpts = {}) {\n const expanded = expandMacroTokens(Formatter.parseFormat(fmt), Locale.fromObject(localeOpts));\n return expanded.map((t) => t.val).join(\"\");\n }\n\n // INFO\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example DateTime.local(2017, 7, 4).get('month'); //=> 7\n * @example DateTime.local(2017, 7, 4).get('day'); //=> 4\n * @return {number}\n */\n get(unit) {\n return this[unit];\n }\n\n /**\n * Returns whether the DateTime is valid. Invalid DateTimes occur when:\n * * The DateTime was created from invalid calendar information, such as the 13th month or February 30\n * * The DateTime was created by an operation on another invalid date\n * @type {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this DateTime is invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime\n *\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime\n *\n * @type {string}\n */\n get outputCalendar() {\n return this.isValid ? this.loc.outputCalendar : null;\n }\n\n /**\n * Get the time zone associated with this DateTime.\n * @type {Zone}\n */\n get zone() {\n return this._zone;\n }\n\n /**\n * Get the name of the time zone.\n * @type {string}\n */\n get zoneName() {\n return this.isValid ? this.zone.name : null;\n }\n\n /**\n * Get the year\n * @example DateTime.local(2017, 5, 25).year //=> 2017\n * @type {number}\n */\n get year() {\n return this.isValid ? this.c.year : NaN;\n }\n\n /**\n * Get the quarter\n * @example DateTime.local(2017, 5, 25).quarter //=> 2\n * @type {number}\n */\n get quarter() {\n return this.isValid ? Math.ceil(this.c.month / 3) : NaN;\n }\n\n /**\n * Get the month (1-12).\n * @example DateTime.local(2017, 5, 25).month //=> 5\n * @type {number}\n */\n get month() {\n return this.isValid ? this.c.month : NaN;\n }\n\n /**\n * Get the day of the month (1-30ish).\n * @example DateTime.local(2017, 5, 25).day //=> 25\n * @type {number}\n */\n get day() {\n return this.isValid ? this.c.day : NaN;\n }\n\n /**\n * Get the hour of the day (0-23).\n * @example DateTime.local(2017, 5, 25, 9).hour //=> 9\n * @type {number}\n */\n get hour() {\n return this.isValid ? this.c.hour : NaN;\n }\n\n /**\n * Get the minute of the hour (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30\n * @type {number}\n */\n get minute() {\n return this.isValid ? this.c.minute : NaN;\n }\n\n /**\n * Get the second of the minute (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52\n * @type {number}\n */\n get second() {\n return this.isValid ? this.c.second : NaN;\n }\n\n /**\n * Get the millisecond of the second (0-999).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654\n * @type {number}\n */\n get millisecond() {\n return this.isValid ? this.c.millisecond : NaN;\n }\n\n /**\n * Get the week year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 12, 31).weekYear //=> 2015\n * @type {number}\n */\n get weekYear() {\n return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the week number of the week year (1-52ish).\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2017, 5, 25).weekNumber //=> 21\n * @type {number}\n */\n get weekNumber() {\n return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the day of the week.\n * 1 is Monday and 7 is Sunday\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 11, 31).weekday //=> 4\n * @type {number}\n */\n get weekday() {\n return this.isValid ? possiblyCachedWeekData(this).weekday : NaN;\n }\n\n /**\n * Returns true if this date is on a weekend according to the locale, false otherwise\n * @returns {boolean}\n */\n get isWeekend() {\n return this.isValid && this.loc.getWeekendDays().includes(this.weekday);\n }\n\n /**\n * Get the day of the week according to the locale.\n * 1 is the first day of the week and 7 is the last day of the week.\n * If the locale assigns Sunday as the first day of the week, then a date which is a Sunday will return 1,\n * @returns {number}\n */\n get localWeekday() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekday : NaN;\n }\n\n /**\n * Get the week number of the week year according to the locale. Different locales assign week numbers differently,\n * because the week can start on different days of the week (see localWeekday) and because a different number of days\n * is required for a week to count as the first week of a year.\n * @returns {number}\n */\n get localWeekNumber() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the week year according to the locale. Different locales assign week numbers (and therefor week years)\n * differently, see localWeekNumber.\n * @returns {number}\n */\n get localWeekYear() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the ordinal (meaning the day of the year)\n * @example DateTime.local(2017, 5, 25).ordinal //=> 145\n * @type {number|DateTime}\n */\n get ordinal() {\n return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN;\n }\n\n /**\n * Get the human readable short month name, such as 'Oct'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthShort //=> Oct\n * @type {string}\n */\n get monthShort() {\n return this.isValid ? Info.months(\"short\", { locObj: this.loc })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable long month name, such as 'October'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthLong //=> October\n * @type {string}\n */\n get monthLong() {\n return this.isValid ? Info.months(\"long\", { locObj: this.loc })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable short weekday, such as 'Mon'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon\n * @type {string}\n */\n get weekdayShort() {\n return this.isValid ? Info.weekdays(\"short\", { locObj: this.loc })[this.weekday - 1] : null;\n }\n\n /**\n * Get the human readable long weekday, such as 'Monday'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday\n * @type {string}\n */\n get weekdayLong() {\n return this.isValid ? Info.weekdays(\"long\", { locObj: this.loc })[this.weekday - 1] : null;\n }\n\n /**\n * Get the UTC offset of this DateTime in minutes\n * @example DateTime.now().offset //=> -240\n * @example DateTime.utc().offset //=> 0\n * @type {number}\n */\n get offset() {\n return this.isValid ? +this.o : NaN;\n }\n\n /**\n * Get the short human name for the zone's current offset, for example \"EST\" or \"EDT\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameShort() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"short\",\n locale: this.locale,\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get the long human name for the zone's current offset, for example \"Eastern Standard Time\" or \"Eastern Daylight Time\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameLong() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"long\",\n locale: this.locale,\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get whether this zone's offset ever changes, as in a DST.\n * @type {boolean}\n */\n get isOffsetFixed() {\n return this.isValid ? this.zone.isUniversal : null;\n }\n\n /**\n * Get whether the DateTime is in a DST.\n * @type {boolean}\n */\n get isInDST() {\n if (this.isOffsetFixed) {\n return false;\n } else {\n return (\n this.offset > this.set({ month: 1, day: 1 }).offset ||\n this.offset > this.set({ month: 5 }).offset\n );\n }\n }\n\n /**\n * Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC\n * in this DateTime's zone. During DST changes local time can be ambiguous, for example\n * `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`.\n * This method will return both possible DateTimes if this DateTime's local time is ambiguous.\n * @returns {DateTime[]}\n */\n getPossibleOffsets() {\n if (!this.isValid || this.isOffsetFixed) {\n return [this];\n }\n const dayMs = 86400000;\n const minuteMs = 60000;\n const localTS = objToLocalTS(this.c);\n const oEarlier = this.zone.offset(localTS - dayMs);\n const oLater = this.zone.offset(localTS + dayMs);\n\n const o1 = this.zone.offset(localTS - oEarlier * minuteMs);\n const o2 = this.zone.offset(localTS - oLater * minuteMs);\n if (o1 === o2) {\n return [this];\n }\n const ts1 = localTS - o1 * minuteMs;\n const ts2 = localTS - o2 * minuteMs;\n const c1 = tsToObj(ts1, o1);\n const c2 = tsToObj(ts2, o2);\n if (\n c1.hour === c2.hour &&\n c1.minute === c2.minute &&\n c1.second === c2.second &&\n c1.millisecond === c2.millisecond\n ) {\n return [clone(this, { ts: ts1 }), clone(this, { ts: ts2 })];\n }\n return [this];\n }\n\n /**\n * Returns true if this DateTime is in a leap year, false otherwise\n * @example DateTime.local(2016).isInLeapYear //=> true\n * @example DateTime.local(2013).isInLeapYear //=> false\n * @type {boolean}\n */\n get isInLeapYear() {\n return isLeapYear(this.year);\n }\n\n /**\n * Returns the number of days in this DateTime's month\n * @example DateTime.local(2016, 2).daysInMonth //=> 29\n * @example DateTime.local(2016, 3).daysInMonth //=> 31\n * @type {number}\n */\n get daysInMonth() {\n return daysInMonth(this.year, this.month);\n }\n\n /**\n * Returns the number of days in this DateTime's year\n * @example DateTime.local(2016).daysInYear //=> 366\n * @example DateTime.local(2013).daysInYear //=> 365\n * @type {number}\n */\n get daysInYear() {\n return this.isValid ? daysInYear(this.year) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2004).weeksInWeekYear //=> 53\n * @example DateTime.local(2013).weeksInWeekYear //=> 52\n * @type {number}\n */\n get weeksInWeekYear() {\n return this.isValid ? weeksInWeekYear(this.weekYear) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's local week year\n * @example DateTime.local(2020, 6, {locale: 'en-US'}).weeksInLocalWeekYear //=> 52\n * @example DateTime.local(2020, 6, {locale: 'de-DE'}).weeksInLocalWeekYear //=> 53\n * @type {number}\n */\n get weeksInLocalWeekYear() {\n return this.isValid\n ? weeksInWeekYear(\n this.localWeekYear,\n this.loc.getMinDaysInFirstWeek(),\n this.loc.getStartOfWeek()\n )\n : NaN;\n }\n\n /**\n * Returns the resolved Intl options for this DateTime.\n * This is useful in understanding the behavior of formatting methods\n * @param {Object} opts - the same options as toLocaleString\n * @return {Object}\n */\n resolvedLocaleOptions(opts = {}) {\n const { locale, numberingSystem, calendar } = Formatter.create(\n this.loc.clone(opts),\n opts\n ).resolvedOptions(this);\n return { locale, numberingSystem, outputCalendar: calendar };\n }\n\n // TRANSFORM\n\n /**\n * \"Set\" the DateTime's zone to UTC. Returns a newly-constructed DateTime.\n *\n * Equivalent to {@link DateTime#setZone}('utc')\n * @param {number} [offset=0] - optionally, an offset from UTC in minutes\n * @param {Object} [opts={}] - options to pass to `setZone()`\n * @return {DateTime}\n */\n toUTC(offset = 0, opts = {}) {\n return this.setZone(FixedOffsetZone.instance(offset), opts);\n }\n\n /**\n * \"Set\" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.\n *\n * Equivalent to `setZone('local')`\n * @return {DateTime}\n */\n toLocal() {\n return this.setZone(Settings.defaultZone);\n }\n\n /**\n * \"Set\" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.\n *\n * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.\n * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.\n * @param {Object} opts - options\n * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.\n * @return {DateTime}\n */\n setZone(zone, { keepLocalTime = false, keepCalendarTime = false } = {}) {\n zone = normalizeZone(zone, Settings.defaultZone);\n if (zone.equals(this.zone)) {\n return this;\n } else if (!zone.isValid) {\n return DateTime.invalid(unsupportedZone(zone));\n } else {\n let newTS = this.ts;\n if (keepLocalTime || keepCalendarTime) {\n const offsetGuess = zone.offset(this.ts);\n const asObj = this.toObject();\n [newTS] = objToTS(asObj, offsetGuess, zone);\n }\n return clone(this, { ts: newTS, zone });\n }\n }\n\n /**\n * \"Set\" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.\n * @param {Object} properties - the properties to set\n * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })\n * @return {DateTime}\n */\n reconfigure({ locale, numberingSystem, outputCalendar } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem, outputCalendar });\n return clone(this, { loc });\n }\n\n /**\n * \"Set\" the locale. Returns a newly-constructed DateTime.\n * Just a convenient alias for reconfigure({ locale })\n * @example DateTime.local(2017, 5, 25).setLocale('en-GB')\n * @return {DateTime}\n */\n setLocale(locale) {\n return this.reconfigure({ locale });\n }\n\n /**\n * \"Set\" the values of specified units. Returns a newly-constructed DateTime.\n * You can only set units with this method; for \"setting\" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.\n *\n * This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`.\n * They cannot be mixed with ISO-week units like `weekday`.\n * @param {Object} values - a mapping of units to numbers\n * @example dt.set({ year: 2017 })\n * @example dt.set({ hour: 8, minute: 30 })\n * @example dt.set({ weekday: 5 })\n * @example dt.set({ year: 2005, ordinal: 234 })\n * @return {DateTime}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const normalized = normalizeObject(values, normalizeUnitWithLocalWeeks);\n const { minDaysInFirstWeek, startOfWeek } = usesLocalWeekValues(normalized, this.loc);\n\n const settingWeekStuff =\n !isUndefined(normalized.weekYear) ||\n !isUndefined(normalized.weekNumber) ||\n !isUndefined(normalized.weekday),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\n \"Can't mix weekYear/weekNumber units with year/month/day or ordinals\"\n );\n }\n\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n\n let mixed;\n if (settingWeekStuff) {\n mixed = weekToGregorian(\n { ...gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), ...normalized },\n minDaysInFirstWeek,\n startOfWeek\n );\n } else if (!isUndefined(normalized.ordinal)) {\n mixed = ordinalToGregorian({ ...gregorianToOrdinal(this.c), ...normalized });\n } else {\n mixed = { ...this.toObject(), ...normalized };\n\n // if we didn't set the day but we ended up on an overflow date,\n // use the last day of the right month\n if (isUndefined(normalized.day)) {\n mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day);\n }\n }\n\n const [ts, o] = objToTS(mixed, this.o, this.zone);\n return clone(this, { ts, o });\n }\n\n /**\n * Add a period of time to this DateTime and return the resulting DateTime\n *\n * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @example DateTime.now().plus(123) //~> in 123 milliseconds\n * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes\n * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow\n * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday\n * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min\n * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min\n * @return {DateTime}\n */\n plus(duration) {\n if (!this.isValid) return this;\n const dur = Duration.fromDurationLike(duration);\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * Subtract a period of time to this DateTime and return the resulting DateTime\n * See {@link DateTime#plus}\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n @return {DateTime}\n */\n minus(duration) {\n if (!this.isValid) return this;\n const dur = Duration.fromDurationLike(duration).negate();\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * \"Set\" this DateTime to the beginning of a unit of time.\n * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week\n * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'\n * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'\n * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'\n * @return {DateTime}\n */\n startOf(unit, { useLocaleWeeks = false } = {}) {\n if (!this.isValid) return this;\n\n const o = {},\n normalizedUnit = Duration.normalizeUnit(unit);\n switch (normalizedUnit) {\n case \"years\":\n o.month = 1;\n // falls through\n case \"quarters\":\n case \"months\":\n o.day = 1;\n // falls through\n case \"weeks\":\n case \"days\":\n o.hour = 0;\n // falls through\n case \"hours\":\n o.minute = 0;\n // falls through\n case \"minutes\":\n o.second = 0;\n // falls through\n case \"seconds\":\n o.millisecond = 0;\n break;\n case \"milliseconds\":\n break;\n // no default, invalid units throw in normalizeUnit()\n }\n\n if (normalizedUnit === \"weeks\") {\n if (useLocaleWeeks) {\n const startOfWeek = this.loc.getStartOfWeek();\n const { weekday } = this;\n if (weekday < startOfWeek) {\n o.weekNumber = this.weekNumber - 1;\n }\n o.weekday = startOfWeek;\n } else {\n o.weekday = 1;\n }\n }\n\n if (normalizedUnit === \"quarters\") {\n const q = Math.ceil(this.month / 3);\n o.month = (q - 1) * 3 + 1;\n }\n\n return this.set(o);\n }\n\n /**\n * \"Set\" this DateTime to the end (meaning the last millisecond) of a unit of time\n * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week\n * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'\n * @return {DateTime}\n */\n endOf(unit, opts) {\n return this.isValid\n ? this.plus({ [unit]: 1 })\n .startOf(unit, opts)\n .minus(1)\n : this;\n }\n\n // OUTPUT\n\n /**\n * Returns a string representation of this DateTime formatted according to the specified format string.\n * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).\n * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n * @param {string} fmt - the format string\n * @param {Object} opts - opts to override the configuration options on this DateTime\n * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22'\n * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'\n * @example DateTime.now().toFormat('yyyy LLL dd', { locale: \"fr\" }) //=> '2017 avr. 22'\n * @example DateTime.now().toFormat(\"HH 'hours and' mm 'minutes'\") //=> '20 hours and 55 minutes'\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.\n * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation\n * of the DateTime in the assigned locale.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options\n * @param {Object} opts - opts to override the configuration options on this DateTime\n * @example DateTime.now().toLocaleString(); //=> 4/20/2017\n * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'\n * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'\n * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022'\n * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'\n * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'\n * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'\n * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'\n * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'\n * @return {string}\n */\n toLocaleString(formatOpts = Formats.DATE_SHORT, opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this)\n : INVALID;\n }\n\n /**\n * Returns an array of format \"parts\", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts\n * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.\n * @example DateTime.now().toLocaleParts(); //=> [\n * //=> { type: 'day', value: '25' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'month', value: '05' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'year', value: '1982' }\n * //=> ]\n */\n toLocaleParts(opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this)\n : [];\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.extendedZone=false] - add the time zone format extension\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'\n * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'\n * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'\n * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'\n * @return {string}\n */\n toISO({\n format = \"extended\",\n suppressSeconds = false,\n suppressMilliseconds = false,\n includeOffset = true,\n extendedZone = false,\n } = {}) {\n if (!this.isValid) {\n return null;\n }\n\n const ext = format === \"extended\";\n\n let c = toISODate(this, ext);\n c += \"T\";\n c += toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone);\n return c;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's date component\n * @param {Object} opts - options\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'\n * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'\n * @return {string}\n */\n toISODate({ format = \"extended\" } = {}) {\n if (!this.isValid) {\n return null;\n }\n\n return toISODate(this, format === \"extended\");\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's week date\n * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'\n * @return {string}\n */\n toISOWeekDate() {\n return toTechFormat(this, \"kkkk-'W'WW-c\");\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's time component\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.extendedZone=true] - add the time zone format extension\n * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z'\n * @return {string}\n */\n toISOTime({\n suppressMilliseconds = false,\n suppressSeconds = false,\n includeOffset = true,\n includePrefix = false,\n extendedZone = false,\n format = \"extended\",\n } = {}) {\n if (!this.isValid) {\n return null;\n }\n\n let c = includePrefix ? \"T\" : \"\";\n return (\n c +\n toISOTime(\n this,\n format === \"extended\",\n suppressSeconds,\n suppressMilliseconds,\n includeOffset,\n extendedZone\n )\n );\n }\n\n /**\n * Returns an RFC 2822-compatible string representation of this DateTime\n * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'\n * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'\n * @return {string}\n */\n toRFC2822() {\n return toTechFormat(this, \"EEE, dd LLL yyyy HH:mm:ss ZZZ\", false);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.\n * Specifically, the string conforms to RFC 1123.\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'\n * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'\n * @return {string}\n */\n toHTTP() {\n return toTechFormat(this.toUTC(), \"EEE, dd LLL yyyy HH:mm:ss 'GMT'\");\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Date\n * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'\n * @return {string}\n */\n toSQLDate() {\n if (!this.isValid) {\n return null;\n }\n return toISODate(this, true);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Time\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n * @example DateTime.utc().toSQL() //=> '05:15:16.345'\n * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00'\n * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345'\n * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'\n * @return {string}\n */\n toSQLTime({ includeOffset = true, includeZone = false, includeOffsetSpace = true } = {}) {\n let fmt = \"HH:mm:ss.SSS\";\n\n if (includeZone || includeOffset) {\n if (includeOffsetSpace) {\n fmt += \" \";\n }\n if (includeZone) {\n fmt += \"z\";\n } else if (includeOffset) {\n fmt += \"ZZ\";\n }\n }\n\n return toTechFormat(this, fmt, true);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'\n * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'\n * @return {string}\n */\n toSQL(opts = {}) {\n if (!this.isValid) {\n return null;\n }\n\n return `${this.toSQLDate()} ${this.toSQLTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for debugging\n * @return {string}\n */\n toString() {\n return this.isValid ? this.toISO() : INVALID;\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for the REPL.\n * @return {string}\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n if (this.isValid) {\n return `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`;\n } else {\n return `DateTime { Invalid, reason: ${this.invalidReason} }`;\n }\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}\n * @return {number}\n */\n valueOf() {\n return this.toMillis();\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime.\n * @return {number}\n */\n toMillis() {\n return this.isValid ? this.ts : NaN;\n }\n\n /**\n * Returns the epoch seconds of this DateTime.\n * @return {number}\n */\n toSeconds() {\n return this.isValid ? this.ts / 1000 : NaN;\n }\n\n /**\n * Returns the epoch seconds (as a whole number) of this DateTime.\n * @return {number}\n */\n toUnixInteger() {\n return this.isValid ? Math.floor(this.ts / 1000) : NaN;\n }\n\n /**\n * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns a BSON serializable equivalent to this DateTime.\n * @return {Date}\n */\n toBSON() {\n return this.toJSDate();\n }\n\n /**\n * Returns a JavaScript object with this DateTime's year, month, day, and so on.\n * @param opts - options for generating the object\n * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }\n * @return {Object}\n */\n toObject(opts = {}) {\n if (!this.isValid) return {};\n\n const base = { ...this.c };\n\n if (opts.includeConfig) {\n base.outputCalendar = this.outputCalendar;\n base.numberingSystem = this.loc.numberingSystem;\n base.locale = this.loc.locale;\n }\n return base;\n }\n\n /**\n * Returns a JavaScript Date equivalent to this DateTime.\n * @return {Date}\n */\n toJSDate() {\n return new Date(this.isValid ? this.ts : NaN);\n }\n\n // COMPARE\n\n /**\n * Return the difference between two DateTimes as a Duration.\n * @param {DateTime} otherDateTime - the DateTime to compare this one to\n * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example\n * var i1 = DateTime.fromISO('1982-05-25T09:45'),\n * i2 = DateTime.fromISO('1983-10-14T10:30');\n * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }\n * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }\n * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }\n * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }\n * @return {Duration}\n */\n diff(otherDateTime, unit = \"milliseconds\", opts = {}) {\n if (!this.isValid || !otherDateTime.isValid) {\n return Duration.invalid(\"created by diffing an invalid DateTime\");\n }\n\n const durOpts = { locale: this.locale, numberingSystem: this.numberingSystem, ...opts };\n\n const units = maybeArray(unit).map(Duration.normalizeUnit),\n otherIsLater = otherDateTime.valueOf() > this.valueOf(),\n earlier = otherIsLater ? this : otherDateTime,\n later = otherIsLater ? otherDateTime : this,\n diffed = diff(earlier, later, units, durOpts);\n\n return otherIsLater ? diffed.negate() : diffed;\n }\n\n /**\n * Return the difference between this DateTime and right now.\n * See {@link DateTime#diff}\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n diffNow(unit = \"milliseconds\", opts = {}) {\n return this.diff(DateTime.now(), unit, opts);\n }\n\n /**\n * Return an Interval spanning between this DateTime and another DateTime\n * @param {DateTime} otherDateTime - the other end point of the Interval\n * @return {Interval}\n */\n until(otherDateTime) {\n return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this;\n }\n\n /**\n * Return whether this DateTime is in the same unit of time as another DateTime.\n * Higher-order units must also be identical for this function to return `true`.\n * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.\n * @param {DateTime} otherDateTime - the other DateTime\n * @param {string} unit - the unit of time to check sameness on\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used\n * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day\n * @return {boolean}\n */\n hasSame(otherDateTime, unit, opts) {\n if (!this.isValid) return false;\n\n const inputMs = otherDateTime.valueOf();\n const adjustedToZone = this.setZone(otherDateTime.zone, { keepLocalTime: true });\n return (\n adjustedToZone.startOf(unit, opts) <= inputMs && inputMs <= adjustedToZone.endOf(unit, opts)\n );\n }\n\n /**\n * Equality check\n * Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid.\n * To compare just the millisecond values, use `+dt1 === +dt2`.\n * @param {DateTime} other - the other DateTime\n * @return {boolean}\n */\n equals(other) {\n return (\n this.isValid &&\n other.isValid &&\n this.valueOf() === other.valueOf() &&\n this.zone.equals(other.zone) &&\n this.loc.equals(other.loc)\n );\n }\n\n /**\n * Returns a string representation of a this time relative to now, such as \"in two days\". Can only internationalize if your\n * platform supports Intl.RelativeTimeFormat. Rounds down by default.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} [options.style=\"long\"] - the style of units, must be \"long\", \"short\", or \"narrow\"\n * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of \"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", or \"seconds\"\n * @param {boolean} [options.round=true] - whether to round the numbers in the output.\n * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.now().plus({ days: 1 }).toRelative() //=> \"in 1 day\"\n * @example DateTime.now().setLocale(\"es\").toRelative({ days: 1 }) //=> \"dentro de 1 día\"\n * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: \"fr\" }) //=> \"dans 23 heures\"\n * @example DateTime.now().minus({ days: 2 }).toRelative() //=> \"2 days ago\"\n * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: \"hours\" }) //=> \"48 hours ago\"\n * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> \"1.5 days ago\"\n */\n toRelative(options = {}) {\n if (!this.isValid) return null;\n const base = options.base || DateTime.fromObject({}, { zone: this.zone }),\n padding = options.padding ? (this < base ? -options.padding : options.padding) : 0;\n let units = [\"years\", \"months\", \"days\", \"hours\", \"minutes\", \"seconds\"];\n let unit = options.unit;\n if (Array.isArray(options.unit)) {\n units = options.unit;\n unit = undefined;\n }\n return diffRelative(base, this.plus(padding), {\n ...options,\n numeric: \"always\",\n units,\n unit,\n });\n }\n\n /**\n * Returns a string representation of this date relative to today, such as \"yesterday\" or \"next month\".\n * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", or \"days\"\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> \"tomorrow\"\n * @example DateTime.now().setLocale(\"es\").plus({ days: 1 }).toRelative() //=> \"\"mañana\"\n * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: \"fr\" }) //=> \"demain\"\n * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> \"2 days ago\"\n */\n toRelativeCalendar(options = {}) {\n if (!this.isValid) return null;\n\n return diffRelative(options.base || DateTime.fromObject({}, { zone: this.zone }), this, {\n ...options,\n numeric: \"auto\",\n units: [\"years\", \"months\", \"days\"],\n calendary: true,\n });\n }\n\n /**\n * Return the min of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum\n * @return {DateTime} the min DateTime, or undefined if called with no argument\n */\n static min(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"min requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, (i) => i.valueOf(), Math.min);\n }\n\n /**\n * Return the max of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum\n * @return {DateTime} the max DateTime, or undefined if called with no argument\n */\n static max(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"max requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, (i) => i.valueOf(), Math.max);\n }\n\n // MISC\n\n /**\n * Explain how a string would be parsed by fromFormat()\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see description)\n * @param {Object} options - options taken by fromFormat()\n * @return {Object}\n */\n static fromFormatExplain(text, fmt, options = {}) {\n const { locale = null, numberingSystem = null } = options,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n });\n return explainFromTokens(localeToUse, text, fmt);\n }\n\n /**\n * @deprecated use fromFormatExplain instead\n */\n static fromStringExplain(text, fmt, options = {}) {\n return DateTime.fromFormatExplain(text, fmt, options);\n }\n\n // FORMAT PRESETS\n\n /**\n * {@link DateTime#toLocaleString} format like 10/14/1983\n * @type {Object}\n */\n static get DATE_SHORT() {\n return Formats.DATE_SHORT;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED() {\n return Formats.DATE_MED;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED_WITH_WEEKDAY() {\n return Formats.DATE_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983'\n * @type {Object}\n */\n static get DATE_FULL() {\n return Formats.DATE_FULL;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'\n * @type {Object}\n */\n static get DATE_HUGE() {\n return Formats.DATE_HUGE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_SIMPLE() {\n return Formats.TIME_SIMPLE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SECONDS() {\n return Formats.TIME_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SHORT_OFFSET() {\n return Formats.TIME_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_LONG_OFFSET() {\n return Formats.TIME_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_SIMPLE() {\n return Formats.TIME_24_SIMPLE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SECONDS() {\n return Formats.TIME_24_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SHORT_OFFSET() {\n return Formats.TIME_24_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_LONG_OFFSET() {\n return Formats.TIME_24_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT() {\n return Formats.DATETIME_SHORT;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT_WITH_SECONDS() {\n return Formats.DATETIME_SHORT_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED() {\n return Formats.DATETIME_MED;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_SECONDS() {\n return Formats.DATETIME_MED_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_WEEKDAY() {\n return Formats.DATETIME_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL() {\n return Formats.DATETIME_FULL;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL_WITH_SECONDS() {\n return Formats.DATETIME_FULL_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE() {\n return Formats.DATETIME_HUGE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE_WITH_SECONDS() {\n return Formats.DATETIME_HUGE_WITH_SECONDS;\n }\n}\n\n/**\n * @private\n */\nexport function friendlyDateTime(dateTimeish) {\n if (DateTime.isDateTime(dateTimeish)) {\n return dateTimeish;\n } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) {\n return DateTime.fromJSDate(dateTimeish);\n } else if (dateTimeish && typeof dateTimeish === \"object\") {\n return DateTime.fromObject(dateTimeish);\n } else {\n throw new InvalidArgumentError(\n `Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`\n );\n }\n}\n","import DateTime from \"./datetime.js\";\nimport Duration from \"./duration.js\";\nimport Interval from \"./interval.js\";\nimport Info from \"./info.js\";\nimport Zone from \"./zone.js\";\nimport FixedOffsetZone from \"./zones/fixedOffsetZone.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport InvalidZone from \"./zones/invalidZone.js\";\nimport SystemZone from \"./zones/systemZone.js\";\nimport Settings from \"./settings.js\";\n\nconst VERSION = \"3.4.4\";\n\nexport {\n VERSION,\n DateTime,\n Duration,\n Interval,\n Info,\n Zone,\n FixedOffsetZone,\n IANAZone,\n InvalidZone,\n SystemZone,\n Settings,\n};\n","import {\n intlDateTimeFormatIsSupported,\n intlRelativeTimeFormatIsSupported,\n} from \"./feature\";\nimport { DateTime, Duration } from \"luxon\";\nimport { Controller } from \"@hotwired/stimulus\";\n\n// In order to be backward compatible,\n// is equivalent to\n// \n// To suppress time, specify data-date-time-style as an empty attribute.\n\nconst DATE_TYPES = [\"relative\", \"absolute\", \"luxon-relative-duration\"] as const;\ntype DateType = (typeof DATE_TYPES)[number];\n\nconst DATE_STYLES = [\"full\", \"long\", \"medium\", \"short\"] as const;\ntype DateStyle = (typeof DATE_STYLES)[number];\n\nconst TIME_STYLES = [\"full\", \"long\", \"medium\", \"short\"] as const;\ntype TimeStyle = (typeof TIME_STYLES)[number];\n\nfunction parseDateType(s: string | null): DateType {\n for (const variant of DATE_TYPES) {\n if (variant === s) {\n return variant;\n }\n }\n return \"relative\";\n}\n\nfunction parseDateStyle(s: string | null): DateStyle | undefined {\n if (s === \"\") {\n return undefined;\n }\n\n for (const variant of DATE_STYLES) {\n if (variant === s) {\n return variant;\n }\n }\n return \"medium\";\n}\n\nfunction parseTimeStyle(s: string | null): TimeStyle | undefined {\n if (s === \"\") {\n return undefined;\n }\n\n for (const variant of TIME_STYLES) {\n if (variant === s) {\n return variant;\n }\n }\n return \"short\";\n}\n\nexport class FormatDateRelativeController extends Controller {\n static values = {\n relativeBase: String,\n };\n\n declare relativeBaseValue: string;\n\n render: () => void = () => {};\n\n private formatLuxonRelativeDuration(\n lang: string,\n dt: DateTime,\n base: DateTime\n ): string {\n let duration = dt.diff(base);\n duration = Duration.fromMillis(\n // Trim to seconds\n Math.trunc(duration.toMillis() / 1000) * 1000,\n {\n locale: lang,\n }\n ).rescale();\n const opts = {\n unitDisplay: \"narrow\",\n listStyle: \"narrow\",\n type: \"unit\",\n } as const;\n return duration.reconfigure({ locale: lang }).toHuman(opts);\n }\n\n connect() {\n const dateSpans = document.documentElement.querySelectorAll(\"[data-date]\");\n\n const render = () => {\n const lang = document.documentElement.lang;\n\n if (lang == null || lang === \"\") {\n return;\n }\n\n const hasAbs = intlDateTimeFormatIsSupported();\n const hasRel = intlRelativeTimeFormatIsSupported();\n let relativeBase = DateTime.now();\n if (this.relativeBaseValue) {\n relativeBase = DateTime.fromISO(this.relativeBaseValue);\n }\n\n for (let i = 0; i < dateSpans.length; i++) {\n const dateSpan = dateSpans[i];\n const rfc3339 = dateSpan.getAttribute(\"data-date\");\n const dateType = parseDateType(dateSpan.getAttribute(\"data-date-type\"));\n const dateStyle = parseDateStyle(\n dateSpan.getAttribute(\"data-date-date-style\")\n );\n const timeStyle = parseTimeStyle(\n dateSpan.getAttribute(\"data-date-time-style\")\n );\n\n if (typeof rfc3339 === \"string\") {\n const luxonDatetime = DateTime.fromISO(rfc3339);\n const abs = hasAbs\n ? luxonDatetime.toLocaleString(\n {\n dateStyle,\n timeStyle,\n },\n {\n locale: lang,\n }\n )\n : null;\n const rel = hasRel\n ? luxonDatetime.toRelative({\n locale: lang,\n base: relativeBase,\n })\n : null;\n\n if (dateSpan instanceof HTMLElement) {\n // Display the absolute date time as title (tooltip).\n // This is how GitHub shows date time.\n if (abs != null) {\n dateSpan.title = abs;\n }\n }\n\n if (dateType === \"relative\") {\n // Prefer showing relative date time,\n // and fallback to absolute date time.\n if (rel != null) {\n dateSpan.textContent = rel;\n } else if (abs != null) {\n dateSpan.textContent = abs;\n }\n } else if (dateType === \"luxon-relative-duration\") {\n dateSpan.textContent = this.formatLuxonRelativeDuration(\n lang,\n luxonDatetime,\n relativeBase\n );\n } else {\n if (abs != null) {\n dateSpan.textContent = abs;\n }\n }\n }\n }\n };\n\n this.render = render.bind(this);\n this.render();\n }\n\n relativeBaseValueChanged() {\n this.render();\n }\n}\n\n// There is no way to change the display format of .\n// So the comprimise is to make the display format of such value matches that of .\n// The display format of is in browser locale for Safari and Firefox.\n// For Chrome, the display format is somehow arbitrary :(\nexport class FormatInputDateController extends Controller {\n static values = {\n date: String,\n };\n\n declare dateValue: string;\n\n connect() {\n const hasAbs = intlDateTimeFormatIsSupported();\n if (!hasAbs) {\n return;\n }\n\n const dateSpan = this.element as HTMLSpanElement;\n const rfc3339 = this.dateValue;\n if (rfc3339 !== \"\") {\n const jsDate = new Date(rfc3339);\n if (!isNaN(jsDate.getTime())) {\n dateSpan.textContent = new Intl.DateTimeFormat().format(jsDate);\n }\n }\n }\n}\n","export function intlDateTimeFormatIsSupported(): boolean {\n if (\"Intl\" in window && \"DateTimeFormat\" in Intl) {\n const testDate = new Date(\"2006-01-02T03:04:05Z\");\n const testFormat = new Intl.DateTimeFormat(\"en\", {\n dateStyle: \"long\",\n timeStyle: \"long\",\n timeZone: \"UTC\",\n } as any);\n const actual = testFormat.format(testDate);\n const expected = \"January 2, 2006 at 3:04:05 AM UTC\";\n return actual === expected;\n }\n return false;\n}\n\nexport function intlRelativeTimeFormatIsSupported(): boolean {\n if (\"Intl\" in window && \"RelativeTimeFormat\" in Intl) {\n return true;\n }\n return false;\n}\n","import { Controller } from \"@hotwired/stimulus\";\n\nexport class ResendButtonController extends Controller {\n static values = {\n cooldown: Number,\n label: String,\n labelUnit: String,\n };\n\n declare cooldownValue: number;\n declare labelValue: string;\n declare labelUnitValue: string;\n declare animHandle: number | null;\n\n connect() {\n const button = this.element as HTMLButtonElement;\n\n const scheduledAt = new Date();\n const cooldown = this.cooldownValue * 1000;\n const label = this.labelValue;\n const labelUnit = this.labelUnitValue;\n\n const tick = () => {\n const now = new Date();\n const timeElapsed = now.getTime() - scheduledAt.getTime();\n\n let displaySeconds = 0;\n if (timeElapsed <= cooldown) {\n displaySeconds = Math.round((cooldown - timeElapsed) / 1000);\n }\n\n if (displaySeconds === 0) {\n button.disabled = false;\n button.textContent = label;\n this.animHandle = null;\n } else {\n button.disabled = true;\n button.textContent = labelUnit.replace(\"%d\", String(displaySeconds));\n this.animHandle = requestAnimationFrame(tick);\n }\n };\n\n this.animHandle = requestAnimationFrame(tick);\n }\n\n disconnect() {\n if (this.animHandle != null) {\n cancelAnimationFrame(this.animHandle);\n this.animHandle = null;\n }\n }\n}\n","import { Controller } from \"@hotwired/stimulus\";\n\nexport class PasswordVisibilityToggleController extends Controller {\n static targets = [\"input\", \"showButton\", \"hideButton\"];\n\n declare inputTarget: HTMLInputElement;\n declare showButtonTarget: HTMLButtonElement;\n declare hideButtonTarget: HTMLButtonElement;\n\n show(e: Event) {\n e.preventDefault();\n e.stopImmediatePropagation();\n\n this.inputTarget.type = \"text\";\n this.showButtonTarget.classList.add(\"hidden\");\n this.hideButtonTarget.classList.remove(\"hidden\");\n }\n\n hide(e: Event) {\n e.preventDefault();\n e.stopImmediatePropagation();\n\n this.inputTarget.type = \"password\";\n this.showButtonTarget.classList.remove(\"hidden\");\n this.hideButtonTarget.classList.add(\"hidden\");\n }\n}\n","import { Controller } from \"@hotwired/stimulus\";\n\nfunction copyToClipboard(str: string): void {\n const el = document.createElement(\"textarea\");\n el.value = str;\n // Set non-editable to avoid focus and move outside of view\n el.setAttribute(\"readonly\", \"\");\n el.setAttribute(\"style\", \"position: absolute; left: -9999px\");\n document.body.appendChild(el);\n // Select text inside element\n el.select();\n el.setSelectionRange(0, el.value.length); // for mobile device\n document.execCommand(\"copy\");\n // Remove temporary element\n document.body.removeChild(el);\n}\n\nexport class CopyButtonController extends Controller {\n static values = {\n source: String,\n copyLabel: String,\n copiedLabel: String,\n };\n\n declare sourceValue: string;\n declare copyLabelValue: string;\n declare copiedLabelValue: string;\n declare hasCopyLabelValue: boolean;\n declare hasCopiedLabelValue: boolean;\n declare timeoutHandle: number | null;\n\n copy(e: Event) {\n e.preventDefault();\n e.stopPropagation();\n\n const button = this.element as HTMLButtonElement;\n\n const copyLabel = this.copyLabelValue;\n const copiedLabel = this.copiedLabelValue;\n\n const target = document.querySelector(this.sourceValue);\n if (target == null) {\n return;\n }\n\n const textContent = target.textContent;\n if (textContent == null) {\n return;\n }\n\n copyToClipboard(textContent);\n\n // Show feedback\n let currentHandle = this.timeoutHandle;\n // Clear scheduled timeout if the timeout function has NOT been executed yet.\n if (currentHandle != null) {\n window.clearTimeout(currentHandle);\n this.timeoutHandle = null;\n }\n // Changing label as feedback is optional\n if (this.hasCopyLabelValue && this.hasCopiedLabelValue) {\n button.textContent = copiedLabel;\n }\n button.classList.add(\"outline\");\n const newHandle = window.setTimeout(() => {\n // Changing label as feedback is optional\n if (this.hasCopyLabelValue && this.hasCopiedLabelValue) {\n button.textContent = copyLabel;\n }\n button.classList.remove(\"outline\");\n this.timeoutHandle = null;\n }, 1000);\n this.timeoutHandle = newHandle;\n }\n}\n"],"names":["$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","parcelRegister","$c717361202759bca$export$2cd8252107eb640b","$1D41F","$cIx5z","$7kOyh","$rNbsF","$8GNPF","$boFAr","$fxSvy","$lQaUW","$l46vI","$ikSrI","$cgnMu","$aQXYv","$ap2QB","$lElMz","$3CtSo","$dErZh","$l8ZBF","$kWGRK","$6Uiw0","$c717361202759bca$export$5ef831fccfce35e5","InboundFilters","FunctionToString","TryCatch","Breadcrumbs","GlobalHandlers","LinkedErrors","Dedupe","HttpContext","options","undefined","defaultIntegrations","release","__SENTRY_RELEASE__","WINDOW","SENTRY_RELEASE","autoSessionTracking","sendClientReports","clientOptions","stackParser","stackParserFromStackParserOptions","defaultStackParser","integrations","getIntegrationsToSetup","transport","supportsFetch","makeFetchTransport","makeXHRTransport","initAndBind","BrowserClient","$c717361202759bca$var$startSessionTracking","document","__SENTRY_DEBUG__","logger","warn","hub","getCurrentHub","captureSession","$c717361202759bca$var$startSessionOnHub","addInstrumentationHandler","from","to","startSession","ignoreDuration","$12fc8e6f8b8c537c$export$19eade501500c6c1","$12fc8e6f8b8c537c$export$a07cdf6544bbd7c","$hbZCn","$kPqMJ","$aZ9cG","$bagDH","$gP2DW","$4Dtig","$12fc8e6f8b8c537c$export$8c41bb232f1008b1","constructor","client","scope","Scope","_version","_stack","bindClient","isOlderThan","version","top","getStackTop","setupIntegrations","pushScope","clone","getScope","getStack","push","getClient","popScope","length","pop","withScope","callback","captureException","exception","hint","eventId","_lastEventId","event_id","uuid4","syntheticException","_withClient","originalException","captureMessage","message","level","captureEvent","event","type","lastEventId","addBreadcrumb","breadcrumb","beforeBreadcrumb","maxBreadcrumbs","getOptions","timestamp","dateTimestampInSeconds","mergedBreadcrumb","finalBreadcrumb","consoleSandbox","emit","setUser","user","setTags","tags","setExtras","extras","setTag","key","value","setExtra","extra","setContext","name","context","configureScope","run","oldHub","$12fc8e6f8b8c537c$export$4188a14ad302d1bc","getIntegration","integration","_oO","startTransaction","customSamplingContext","result","_callExtensionMethod","console","traceHeaders","endSession","_sendSessionUpdate","layer","session","getSession","closeSession","setSession","environment","DEFAULT_ENVIRONMENT","userAgent","GLOBAL_OBJ","navigator","makeSession","getUser","currentSession","status","updateSession","shouldSendDefaultPii","Boolean","sendDefaultPii","method","args","carrier","sentry","__SENTRY__","extensions","apply","registry","$12fc8e6f8b8c537c$export$bfa8a924a84a76b7","$12fc8e6f8b8c537c$export$849f05434e95d2f2","acs","$12fc8e6f8b8c537c$var$getGlobalHub","getGlobalSingleton","$84c231e20e4ef99a$export$2a2b1d2252a69ecb","$84c231e20e4ef99a$export$77c4ce905194557b","$84c231e20e4ef99a$export$cda52e2a8927a2ca","$84c231e20e4ef99a$export$af88d00dbe7f521","wrappedFuncs","wrappedLevels","keys","forEach","originalConsoleMethod","$84c231e20e4ef99a$var$makeLogger","enabled","enable","disable","isEnabled","$f29d59038dfac1ce$var$isGlobalObj","obj","Math","$f29d59038dfac1ce$export$f1a6cdb1459e81d1","$f29d59038dfac1ce$export$256479dc0cea61c4","$f29d59038dfac1ce$export$7e223ec222791509","window","self","creator","gbl","singleton","timestampInSeconds","browserPerformanceTimeOrigin","$ink2I","getGlobalObject","dateTimestampSource","nowSeconds","Date","now","platformPerformance","isNodeEnv","getNodePerformance","perfHooks","dynamicRequire","performance","_","getBrowserPerformance","timeOrigin","timestampSource","bind","performanceNow","dateNow","timeOriginDelta","abs","navigationStart","timing","navigationStartDelta","hasNavigationStart","timeOriginIsReliable","loadModule","$kK3mJ","$hP8pc","isBrowserBundle","prototype","toString","mod","request","require","moduleName","cwd","$f19ab6e0ef0517a3$export$2928c40372e623c0","__SENTRY_BROWSER_BUNDLE__","$f19ab6e0ef0517a3$export$8ad33f488b1ab046","$7ff6bd81588b7196$export$19f53698e68b2496","$7ff6bd81588b7196$export$4157119e2b157127","$7ff6bd81588b7196$export$f26508487bf83ee7","$7ff6bd81588b7196$export$c69a9a0313b03bb1","$7ff6bd81588b7196$export$6de4ffac6a2f1098","$7ff6bd81588b7196$export$3131421a7d01b4fb","$aCgU1","crypto","msCrypto","getRandomByte","random","randomUUID","replace","getRandomValues","Uint8Array","c","$7ff6bd81588b7196$var$getFirstException","values","firstException","newMechanism","currentMechanism","mechanism","handled","mergedData","data","__sentry_captured__","addNonEnumerableProperty","maybeArray","Array","isArray","$7baa907c91595aad$export$9563e054e6f787fb","$7baa907c91595aad$export$5c1499e2e5d010ae","$7baa907c91595aad$export$e73679ffaf56810e","$7baa907c91595aad$export$e6cc1e135e2092e5","$7baa907c91595aad$export$9ef804feabbcbaf1","$7baa907c91595aad$export$62ff257738bf57f5","$7baa907c91595aad$export$b0244d5063c0b61b","$7baa907c91595aad$export$d25f2688db1bb433","$8SKxE","$8cfrP","$6qV3U","source","replacementFactory","original","wrapped","writable","o_O","log","proto","func","__sentry_original__","object","map","encodeURIComponent","join","isError","stack","$7baa907c91595aad$var$getOwnProperties","isEvent","newObj","target","$7baa907c91595aad$var$serializeEventTarget","currentTarget","CustomEvent","isInstanceOf","detail","isElement","htmlTreeAsString","extractedProps","property","hasOwnProperty","maxLength","sort","truncate","includedKeys","serialized","slice","inputValue","memoizationMap","Map","$7baa907c91595aad$var$_dropUndefinedKeys","isPlainObject","memoVal","returnValue","item","$6777781ef1f2f9dd$export$5647df6b7814ac86","$6777781ef1f2f9dd$export$1cfafeee2987818b","$6777781ef1f2f9dd$export$c660c1f3ab49225c","$6777781ef1f2f9dd$var$WINDOW","elem","nextStr","currentElem","out","height","len","keyAttrs","maxStringLength","$6777781ef1f2f9dd$var$_htmlElementAsString","el","className","classes","attr","i","tagName","toLowerCase","keyAttrPairs","filter","keyAttr","getAttribute","keyAttrPair","isString","split","allowedAttrs","parentNode","reverse","location","href","oO","selector","querySelector","$5f7b6d58759a9242$export$e6127cc7fe7395c3","$5f7b6d58759a9242$export$49034edbe6b62415","$5f7b6d58759a9242$export$9f9636d330b71954","$5f7b6d58759a9242$export$ef9e2056653f0c8e","$5f7b6d58759a9242$export$12e869b2a583f783","$5f7b6d58759a9242$export$844ec244b1367d54","$5f7b6d58759a9242$export$c3825b437cbdea5c","$5f7b6d58759a9242$export$53b83ca8eaab0383","$5f7b6d58759a9242$export$9671ea99bd126ace","$5f7b6d58759a9242$export$45a5e7f76e0caa8d","$5f7b6d58759a9242$export$49841c62b9eff15","$5f7b6d58759a9242$export$f5b060c2914b97c8","$5f7b6d58759a9242$export$bc2894c7158efbac","$5f7b6d58759a9242$export$c9f5652083b8129d","$5f7b6d58759a9242$export$7916fad0ebc23f48","$5f7b6d58759a9242$var$objectToString","wat","$5f7b6d58759a9242$var$isBuiltin","Event","Element","then","base","_e","__isVue","_isVue","$4af16f1ad58b3b60$export$6a506b36fdea397d","$4af16f1ad58b3b60$export$4215662d762d6f9d","$4af16f1ad58b3b60$export$465e9d514283d4fd","$4af16f1ad58b3b60$export$a7a5ec66062ea5d","str","max","line","colno","newLine","lineLength","start","end","min","input","delimiter","output","isVueViewModel","String","testString","patterns","requireExactStringMatch","some","pattern","$4af16f1ad58b3b60$export$cdded5b28a5f8c6d","isRegExp","test","includes","$820d891af722c6fc$export$849dbeeeda01ae98","$c3f375ac93578695$export$775b6bb06e53a214","$1Be8C","_notifyingListeners","_scopeListeners","_eventProcessors","_breadcrumbs","_attachments","_user","_tags","_extra","_contexts","_sdkProcessingMetadata","_propagationContext","$c3f375ac93578695$var$generatePropagationContext","newScope","_level","_span","_session","_transactionName","_fingerprint","_requestSession","addScopeListener","addEventProcessor","_notifyScopeListeners","getRequestSession","setRequestSession","requestSession","setFingerprint","fingerprint","setLevel","setTransactionName","setSpan","span","getSpan","getTransaction","transaction","update","captureContext","updatedScope","contexts","propagationContext","clear","maxCrumbs","breadcrumbs","getLastBreadcrumb","clearBreadcrumbs","addAttachment","attachment","getAttachments","clearAttachments","applyToEvent","additionalEventProcessors","trace","getTraceContext","sdkProcessingMetadata","dynamicSamplingContext","getDynamicSamplingContext","transactionName","_applyFingerprint","scopeBreadcrumbs","_getBreadcrumbs","notifyEventProcessors","getGlobalEventProcessors","setSDKProcessingMetadata","newData","setPropagationContext","getPropagationContext","arrayify","concat","traceId","spanId","substring","$12a436a7097f0d31$export$3c4238858b85e8ac","$12a436a7097f0d31$export$8e4e25f54d456511","$12a436a7097f0d31$export$bf2a096c3e883e79","processors","index","$6SaPC","SyncPromise","resolve","reject","processor","isThenable","final","$50103023bee6d175$export$1fda8aa4d135f8aa","$50103023bee6d175$export$6f292d4960313241","$50103023bee6d175$export$78e43115b553f358","States","$50103023bee6d175$var$States","reason","executor","__init","__init2","__init3","__init4","_state","PENDING","_handlers","_resolve","_reject","onfulfilled","onrejected","_executeHandlers","catch","val","finally","onfinally","isRejected","_setResult","RESOLVED","REJECTED","state","_value","cachedHandlers","handler","$36018705d1bcadfa$export$14a186326edbb264","$36018705d1bcadfa$export$531818e825e774db","$36018705d1bcadfa$export$56521d9ba90f62ee","startingTime","sid","started","duration","errors","toJSON","dropUndefinedKeys","toISOString","did","abnormal_mechanism","attrs","ip_address","ipAddress","user_agent","email","username","$942342d81ce1affd$export$68bc4c01ab8ae766","$942342d81ce1affd$export$51abed9797baa598","$942342d81ce1affd$export$e7390a03b70a6f2f","$942342d81ce1affd$export$b14a8888f80a0b3e","userIntegrations","isDefaultInstance","finalIntegrations","$942342d81ce1affd$var$filterDuplicates","integrationsByName","currentInstance","existingInstance","k","debugIndex","$942342d81ce1affd$var$findIndex","arr","debugInstance","splice","integrationIndex","indexOf","setupOnce","addGlobalEventProcessor","on","preprocessEvent","processEvent","assign","$af37a54b12e8cd80$export$9964600bfe84e6a3","$af37a54b12e8cd80$export$671c7ed8e40a7a57","$3R32v","$af37a54b12e8cd80$var$getBaseApiEndpoint","dsn","protocol","port","host","path","tunnelOrOptions","tunnel","sdkInfo","_metadata","sdk","projectId","urlEncode","sentry_key","publicKey","sentry_version","sentry_client","dsnLike","dialogOptions","makeDsn","endpoint","encodedOptions","dsnToString","$2ce8ade492c2c66d$export$44d472fbb931a776","$2ce8ade492c2c66d$export$128827c3562ec0cb","$2ce8ade492c2c66d$var$DSN_REGEX","withPassword","pass","$2ce8ade492c2c66d$var$dsnFromComponents","components","$2ce8ade492c2c66d$export$b892860177f70a30","match","exec","error","lastPath","projectMatch","$2ce8ade492c2c66d$var$validateDsn","hasMissingRequiredComponent","requiredComponents","find","component","isNaN","parseInt","$55719d3744764fca$export$5333c3f1c58d9bc1","clientClass","debug","initialScope","$3df556fcff5e8d6a$var$originalFunctionToString","$3df556fcff5e8d6a$export$da4704525c20ae79","__initStatic","Function","getOriginalFunction","$dc52417356a5d683$export$2ffbb5359dcc6be4","$dc52417356a5d683$var$DEFAULT_IGNORE_ERRORS","$dc52417356a5d683$var$DEFAULT_IGNORE_TRANSACTIONS","_options","_addGlobaleventProcessor","_getCurrentHub","_eventHint","ignoreErrors","$dc52417356a5d683$export$6620a151868b99aa","internalOptions","allowUrls","denyUrls","disableErrorDefaults","ignoreTransactions","disableTransactionDefaults","ignoreInternal","$dc52417356a5d683$export$3c6361fddf6cd929","$dc52417356a5d683$var$_isSentryError","getEventDescription","$dc52417356a5d683$var$_getPossibleEventMessages","lastException","possibleMessages","stringMatchesSomePattern","$dc52417356a5d683$var$_isIgnoredTransaction","$dc52417356a5d683$var$_isDeniedUrl","url","$dc52417356a5d683$var$_getEventFilterUrl","$dc52417356a5d683$var$_isAllowedUrl","frames","stacktrace","$dc52417356a5d683$var$_getLastValidUrl","frame","filename","$90f54a2bd3a75444$export$8d1e60aaf616fb4f","$7qGRm","$aCdlr","_key","_limit","limit","applyAggregateErrorsToEvent","exceptionFromError","maxValueLength","$568c35217631c696$export$b91c38ed7d8ae9b2","exceptionFromErrorImplementation","parser","maxValueLimit","exceptions","$568c35217631c696$var$aggregateExceptionsFromError","prevExceptions","exceptionId","newExceptions","$568c35217631c696$var$applyExceptionGroupFieldsForParentException","newException","newExceptionId","$568c35217631c696$var$applyExceptionGroupFieldsForChildException","childError","is_exception_group","exception_id","parentId","parent_id","$7ba7ce02ba83c421$export$a6c2d27607295951","$1b8fc1be6ce75068$export$a3295358bff77e","$1b8fc1be6ce75068$export$23fbbb20bed71033","depth","maxSize","normalized","$1b8fc1be6ce75068$var$jsonSize","encodeURI","JSON","stringify","$bniZ5","maxProperties","Infinity","$1b8fc1be6ce75068$export$588732934346abbf","memo","memoBuilder","memoize","unmemoize","stringified","$1b8fc1be6ce75068$var$stringifyValue","_events","isSyntheticEvent","getFunctionName","objName","$1b8fc1be6ce75068$var$getConstructorName","getPrototypeOf","startsWith","remainingDepth","valueWithToJSON","jsonValue","numAdded","visitable","convertToPlainObject","visitKey","visitValue","ERROR","$84809191b153e415$export$8115b0b78e956ab3","hasWeakSet","WeakSet","inner","has","add","delete","$b51438391e17bfa0$export$a5739666fb2d03d4","$b51438391e17bfa0$export$1d5cf88b347146d4","$b51438391e17bfa0$export$aad197c7121a6651","$b51438391e17bfa0$var$WEBPACK_ERROR_REGEXP","$b51438391e17bfa0$var$STRIP_FRAME_REGEXP","parsers","sortedParsers","a","b","p","skipFirst","lines","cleanedLine","$b51438391e17bfa0$export$c55c24c0eeba0205","localStack","function","$b51438391e17bfa0$var$defaultFunctionName","fn","$2670805f51a3a407$export$35059013cd4a06db","getModule","FILENAME_MATCH","FULL_MATCH","lineMatch","functionName","typeName","methodName","methodStart","lastIndexOf","objectEnd","isNative","lineno","in_app","$2670805f51a3a407$export$1de92f38f4de99a8","isInternal","$6538e6a9c5c2197b$var$lastHref","$6538e6a9c5c2197b$var$debounceTimerID","$6538e6a9c5c2197b$var$lastCapturedEventType","$6538e6a9c5c2197b$var$lastCapturedEventTargetId","$6538e6a9c5c2197b$export$55b6bb1e45c6cf59","$6538e6a9c5c2197b$export$285b9172a3741fb7","$aGprC","$6538e6a9c5c2197b$var$WINDOW","$6538e6a9c5c2197b$var$handlers","$6538e6a9c5c2197b$var$instrumented","$6538e6a9c5c2197b$var$instrument","CONSOLE_LEVELS","fill","originalConsoleMethods","$6538e6a9c5c2197b$var$triggerHandlers","$6538e6a9c5c2197b$export$3014bbf0af0e1d4a","triggerDOMHandler","globalDOMEventHandler","$6538e6a9c5c2197b$var$makeDOMEventHandler","addEventListener","originalAddEventListener","listener","handlers","__sentry_instrumentation_handlers__","handlerForType","refCount","originalRemoveEventListener","$6538e6a9c5c2197b$export$c67d533bf77cbf54","XMLHttpRequest","xhrproto","originalOpen","startTimestamp","xhrInfo","toUpperCase","request_headers","__sentry_own_request__","onreadystatechangeHandler","readyState","status_code","endTimestamp","xhr","onreadystatechange","readyStateArgs","setRequestHeaderArgs","header","originalSend","sentryXhrData","body","supportsNativeFetch","originalFetch","$6538e6a9c5c2197b$export$f7a71163cc309d9a","fetchArgs","$6538e6a9c5c2197b$var$getUrlFromResource","$6538e6a9c5c2197b$var$hasProp","arg","handlerData","fetchData","response","$6538e6a9c5c2197b$var$instrumentHistory","supportsHistory","oldOnPopState","onpopstate","historyReplacementFunction","originalHistoryFunction","history","$6538e6a9c5c2197b$var$_oldOnErrorHandler","onerror","msg","column","__SENTRY_LOADER__","arguments","__SENTRY_INSTRUMENTED__","$6538e6a9c5c2197b$var$_oldOnUnhandledRejectionHandler","onunhandledrejection","prop","resource","globalListener","$6538e6a9c5c2197b$var$getEventTarget","isContentEditable","_sentryId","$6538e6a9c5c2197b$var$isSimilarToLastCapturedEvent","global","clearTimeout","setTimeout","$fe66ec44f2f5431f$export$edf3cb81fd7d2a3e","$fe66ec44f2f5431f$export$18cf36ed71d733e7","$fe66ec44f2f5431f$export$c82d238e23c40b21","$fe66ec44f2f5431f$var$WINDOW","Headers","Request","Response","fetch","doc","createElement","sandbox","hidden","head","appendChild","contentWindow","removeChild","$7c71906350cd4073$export$67fc34576016d6ec","$7c71906350cd4073$var$WINDOW","chrome","isChromePackagedApp","app","runtime","hasHistoryApi","pushState","replaceState","$f55f058e732ce077$export$1df9218a526d318d","$83DUc","$5j5C8","$hL11s","$kJZcO","$jpXo4","BaseClient","sdkSource","SENTRY_SDK_SOURCE","getSDKSource","packages","SDK_VERSION","visibilityState","_flushOutcomes","eventFromException","attachStacktrace","eventFromMessage","captureUserFeedback","feedback","_isEnabled","envelope","createUserFeedbackEnvelope","metadata","getSdkMetadata","getDsn","_sendEnvelope","_prepareEvent","platform","outcomes","_clearOutcomes","_dsn","createClientReportEnvelope","$5ddd8eea08b5db9d$export$4f22f74eddb7716a","$i4Z6l","$3nsdT","$f2G1X","$eSP6V","$vjmKu","$783pM","$5ddd8eea08b5db9d$var$ALREADY_SEEN_ERROR","_integrations","_integrationsInitialized","_numProcessing","_outcomes","_hooks","getEnvelopeEndpointWithUrlEncodedAuth","_transport","recordDroppedEvent","transportOptions","checkOrSetAlreadyCaught","_process","_captureEvent","promisedEvent","isPrimitive","sendSession","getTransport","flush","timeout","_isClientDoneProcessing","clientFinished","transportFlushed","resolvedSyncPromise","close","getEventProcessors","eventProcessor","forceInitialize","getIntegrationById","integrationId","addIntegration","setupIntegration","sendEvent","env","createEventEnvelope","attachments","addItemToEnvelope","createAttachmentEnvelopeItem","textEncoder","promise","sendResponse","createSessionEnvelope","category","_event","hook","rest","_updateSessionFromEvent","crashed","errored","ex","sessionNonTerminal","shouldUpdateAndSend","Number","ticked","interval","setInterval","clearInterval","prepareEvent","evt","trace_id","parentSpanId","dsc","span_id","parent_span_id","getDynamicSamplingContextFromClient","_processEvent","finalEvent","sentryError","logLevel","sampleRate","isTransaction","$5ddd8eea08b5db9d$var$isTransactionEvent","$5ddd8eea08b5db9d$var$isErrorEvent","eventType","beforeSendLabel","rejectedSyncPromise","SentryError","dataCategory","prepared","isInternalException","__sentry__","$5ddd8eea08b5db9d$var$processBeforeSend","beforeSend","beforeSendTransaction","$5ddd8eea08b5db9d$var$_validateBeforeSendResult","beforeSendResult","invalidValueError","processedEvent","transactionInfo","transaction_info","send","quantity","$d297ff2edd68285e$export$f93f7f385160c44e","$d297ff2edd68285e$export$d650323442802f6f","$d297ff2edd68285e$export$c56c55acf0136fd3","$d297ff2edd68285e$export$32f9b428425aac85","$d297ff2edd68285e$export$d8fc80952cc31fa4","$d297ff2edd68285e$export$b11169581eeaf237","$d297ff2edd68285e$export$d369f3b2758f6743","$d297ff2edd68285e$export$92b6093782fe661b","$2mHZf","headers","items","newItem","envelopeItems","envelopeItem","envelopeItemType","$d297ff2edd68285e$var$encodeUTF8","utf8","TextEncoder","encode","envHeaders","parts","append","next","itemHeaders","payload","stringifiedPayload","normalize","$d297ff2edd68285e$var$concatBuffers","buffers","totalLength","reduce","acc","buf","merged","offset","buffer","content_type","contentType","attachment_type","attachmentType","$d297ff2edd68285e$var$ITEM_TYPE_TO_DATA_CATEGORY_MAP","sessions","client_report","user_report","profile","replay_event","replay_recording","check_in","statsd","metadataOrEvent","sent_at","$27596998e7932a97$export$5949942ba2a7c0e2","setPrototypeOf","$ad5dc15cfce7242d$export$124b03c077baa2f3","$ad5dc15cfce7242d$export$c31057337a18010f","getSdkMetadataForEnvelopeHeader","envelopeHeaders","createEnvelope","createEventEnvelopeHeaders","eventItem","$05e1eb084ed8c80c$export$366bad00d6815eed","public_key","segment","user_segment","$530bedd7fb374bf8$export$2d67fb380bd11267","normalizeDepth","normalizeMaxBreadth","$530bedd7fb374bf8$var$applyClientOptions","dist","integrationNames","$530bedd7fb374bf8$export$63042efc86f043e7","debugIdStackFramesCache","debugIdMap","_sentryDebugIds","cachedDebugIdStackFrameCache","$530bedd7fb374bf8$var$debugIdStackParserCache","filenameDebugIdMap","debugIdStackTrace","parsedStack","cachedParsedStack","stackFrame","debug_id","finalScope","clientEventProcessors","abs_path","debug_meta","images","code_file","$530bedd7fb374bf8$var$normalizeEvent","maxBreadth","spans","WeakMap","$3dd314f1f3559771$export$31499a9cd224b78c","$ced79e81321045b6$export$f3b9ed77c03eeb00","discarded_events","clientReportItem","$f1977cc3047eace9$export$a6c2d27607295951","$f1977cc3047eace9$export$ea3ec7e569b823fc","$f1977cc3047eace9$export$9dd56ed1ef0c3420","$f1977cc3047eace9$export$5425b53185d13d6c","$f1977cc3047eace9$export$d478b2c12fbcfdda","$f1977cc3047eace9$var$extractMessage","$f1977cc3047eace9$export$73fbea5a0a5234af","popSize","$f1977cc3047eace9$var$getPopSize","framesToPop","$f1977cc3047eace9$var$reactMinifiedRegexp","addExceptionMechanism","$f1977cc3047eace9$export$47d86ae4b3c9994","isUnhandledRejection","isErrorEvent","errorEvent","isDOMError","isDOMException","domException","addExceptionTypeValue","$f1977cc3047eace9$export$a6a5dd73e489caf","$f1977cc3047eace9$var$getNonErrorObjectExceptionValue","extractExceptionKeysForMessage","captureType","$f1977cc3047eace9$var$getObjectClassName","__serialized__","normalizeToSize","synthetic","$d5945412a22fffe3$export$56d8a8a25bd48b81","$d5945412a22fffe3$export$b79738ab10c590b2","$d5945412a22fffe3$export$4997ffc0176396a6","before","wrapper","__sentry_wrapped__","sentryWrapped","wrappedArguments","$d5945412a22fffe3$var$ignoreOnError","$dUAl9","markFunctionWrapped","descriptor","getOwnPropertyDescriptor","$a20cb1b2a03a8593$export$f5282963edea4a68","$a20cb1b2a03a8593$export$ec58d9285c204497","$e22e6b2b9a589077$export$24a4dfcb686ee5bf","$8ed96d1b89d46273$export$204155decbc90e5a","_installFunc","$8ed96d1b89d46273$var$_installGlobalOnErrorHandler","$8ed96d1b89d46273$var$_installGlobalOnUnhandledRejectionHandler","stackTraceLimit","installFunc","$8ed96d1b89d46273$var$getHubAndOptions","shouldIgnoreOnError","$8ed96d1b89d46273$var$_eventFromIncompleteOnError","groups","$8ed96d1b89d46273$var$_enhanceEventWithInitialFrame","eventFromUnknownInput","$8ed96d1b89d46273$var$addMechanismAndCapture","ev","ev0","ev0s","ev0sf","getLocationHref","$7e6d4877388ba425$export$f1a018517668e6d3","$7e6d4877388ba425$var$DEFAULT_EVENT_TARGET","eventTarget","requestAnimationFrame","$7e6d4877388ba425$var$_wrapTimeFunction","$7e6d4877388ba425$var$_wrapRAF","$7e6d4877388ba425$var$_wrapXHR","eventTargetOption","$7e6d4877388ba425$var$_wrapEventTarget","originalCallback","wrap","xmlHttpRequestProps","wrapOptions","originalFunction","globalObject","eventName","handleEvent","originalEventHandler","wrappedEventHandler","$792e729eaea52473$export$2dc68d50d56fbbd","$iKY39","$8WUsZ","dom","$792e729eaea52473$var$_consoleBreadcrumb","serializeAttribute","$792e729eaea52473$var$_isEvent","$792e729eaea52473$var$_xhrBreadcrumb","$792e729eaea52473$var$_fetchBreadcrumb","$792e729eaea52473$var$_historyBreadcrumb","$792e729eaea52473$var$addSentryBreadcrumb","severityLevelFromString","safeJoin","SENTRY_XHR_DATA_KEY","parsedLoc","parseUrl","parsedFrom","parsedTo","relative","$da7b1a819db558f8$export$7a5253c0f62e0150","query","fragment","search","hash","$da7b1a819db558f8$export$ce084c78234bd35","urlPath","$da7b1a819db558f8$export$69dd85280a8d374c","$683f8a96b52a79a6$export$d771ef054122c30a","$683f8a96b52a79a6$export$411d0ffdba845b6c","$fc2e3af0e52e68b5$export$8d1e60aaf616fb4f","$2a2c18815a6144f5$export$5d2ee9a544b09a94","referrer","Referer","$9f04b87be0479eaa$export$688d98c249d31ad3","currentEvent","previousEvent","_previousEvent","$9f04b87be0479eaa$var$_isSameMessageEvent","currentMessage","previousMessage","$9f04b87be0479eaa$var$_isSameFingerprint","$9f04b87be0479eaa$var$_isSameStacktrace","$9f04b87be0479eaa$var$_isSameExceptionEvent","previousException","$9f04b87be0479eaa$var$_getExceptionFromEvent","currentException","currentFrames","$9f04b87be0479eaa$var$_getFramesFromEvent","previousFrames","frameA","frameB","currentFingerprint","previousFingerprint","$f64a22202534c31a$export$2b2b997d81bf3907","$f64a22202534c31a$var$createFrame","$f64a22202534c31a$var$chromeRegex","$f64a22202534c31a$var$chromeEvalRegex","$f64a22202534c31a$export$263a749fff749872","isEval","subMatch","$f64a22202534c31a$var$extractSafariExtensionDetails","$f64a22202534c31a$var$geckoREgex","$f64a22202534c31a$var$geckoEvalRegex","$f64a22202534c31a$export$cdba47a5dd2804d","$f64a22202534c31a$var$winjsRegex","createStackParser","isSafariExtension","isSafariWebExtension","$f3fa79b9a4beedac$export$b2311068c46d7cc8","$igQ6w","$5ZH6C","nativeFetch","getNativeFetchImplementation","pendingBodySize","pendingCount","createTransport","requestSize","requestOptions","referrerPolicy","keepalive","fetchOptions","statusCode","clearCachedFetchImplementation","$d4d2236f6e082fa6$export$d09f50d9ab7f7b69","$4EjQ0","$imGg5","makeRequest","makePromiseBuffer","bufferSize","rateLimits","filteredEnvelopeItems","forEachEnvelopeItem","envelopeItemDataCategory","envelopeItemTypeToDataCategory","isRateLimited","$d4d2236f6e082fa6$var$getEventForEnvelopeItem","filteredEnvelope","recordEnvelopeLoss","serializeEnvelope","updateRateLimits","__sentry__baseTransport__","drain","$362a493cd541548f$export$6c91fec22056810a","limits","$362a493cd541548f$export$b89fc7b2e4c799e7","all","$362a493cd541548f$export$699aff705e0d49d4","updatedRateLimits","rateLimitHeader","retryAfterHeader","trim","retryAfter","categories","headerDelay","delay","$362a493cd541548f$export$615352e17ed7741","headerDate","parse","$d5eb0fb89c56fa57$export$85a4f67f852183e6","remove","task","$","taskProducer","counter","capturedSetTimeout","$45d416244a3de8fc$var$cachedFetchImpl","$45d416244a3de8fc$export$8be2119ce08e3379","$45d416244a3de8fc$export$d499686d2dd738c6","isNativeFetch","fetchImpl","$507655c2edd18f55$export$5e1441cee30d5a39","getResponseHeader","open","setRequestHeader","$4c525c1ee72da3ec$export$46d3bbd0375f5fa4","$bD37U","$cQrvJ","$2okBR","$eF6SP","$kIlbl","$iI7u6","$9QK0o","$eqzpm","$6Em9x","$60Zur","$1Q6St","$4bvNg","$lA9Ai","$f0Fc8","$a2D5e","$19lWH","$29dwI","$jiipB","BrowserTracing","addExtensionMethods","getActiveTransaction","extractTraceparentData","spanStatusfromHttpCode","Transaction","Span","BROWSER_TRACING_INTEGRATION_ID","defaultRequestInstrumentationOptions","hasTracingEnabled","stripUrlQueryAndFragment","TRACEPARENT_REGEXP","IdleTransaction","instrumentOutgoingRequests","startIdleTransaction","SpanStatus","Apollo","Express","GraphQL","Mongo","Mysql","Postgres","Prisma","__SENTRY_TRACING__","addTracingExtensions","_autoloadDatabaseIntegrations","getMainCarrier","packageToIntegrationMapping","mongodb","mongoose","mysql","pg","mappedPackages","pkg","$1906ea2bbf7221f7$export$479dbd817e392a4f","$1906ea2bbf7221f7$export$653d0ef2bad9cdf9","$byAJR","$2gSGS","$1906ea2bbf7221f7$var$traceHeaders","toTraceparent","$1906ea2bbf7221f7$var$_startTransaction","transactionContext","configInstrumenter","instrumenter","transactionInstrumenter","sampled","sampleTransaction","parentSampled","initSpanRecorder","_experiments","maxSpans","idleTimeout","finalTimeout","onScope","heartbeatInterval","registerErrorInstrumentation","$869f5e3c70ce3a16$export$637857c1d87b640c","$869f5e3c70ce3a16$var$errorsInstrumented","$869f5e3c70ce3a16$var$errorCallback","activeTransaction","setStatus","tag","$72bca8191f377eee$export$a7feb32fdd923295","maybeHub","$461270d1452094f7$export$809a2b7987fd5306","$461270d1452094f7$export$b279e6bd7040371f","$461270d1452094f7$export$370d6113c18ba86c","SpanRecorder","_pushActivity","_popActivity","transactionSpanId","maxlen","finish","_idleHub","_idleTimeout","_finalTimeout","_heartbeatInterval","_onScope","activities","_heartbeatCounter","_finished","_idleTimeoutCanceledPermanently","_beforeFinishCallbacks","_finishReason","_restartIdleTimeout","op","spanRecorder","spanStartedBeforeTransactionFinish","timeoutWithMarginOfError","spanEndedBeforeFinalTimeout","stringifiedSpan","registerBeforeFinishCallback","_pingHeartbeat","cancelIdleTimeout","restartOnChildSpanChange","_idleTimeoutID","setFinishReason","_beat","heartbeatString","_prevHeartbeatString","$74f868682f73a5ea$export$10c95c129cd0d4fe","$74f868682f73a5ea$export$5f1714a13ed34c01","$74f868682f73a5ea$export$ac65c70d78fcdb55","_maxlen","spanContext","origin","description","setName","startChild","childSpan","opStr","nameStr","idStr","logMessage","spanMetadata","setData","setHttpStatus","httpStatus","spanStatus","isSuccess","generateSentryTraceHeader","toContext","updateWithContext","start_timestamp","$d9f2245613a34f82$export$394a210812ba3012","$d9f2245613a34f82$export$8e9a29865c0a1226","$d9f2245613a34f82$export$ca5c066532785b6e","$d9f2245613a34f82$export$f35d907436da45cf","$1s9A9","RegExp","traceparent","matches","sentryTrace","baggage","traceparentData","baggageHeaderToDynamicSamplingContext","sampledString","$10efd6cb1115e979$export$9ca9946bd449ac06","$10efd6cb1115e979$export$5b96ee2c8421f107","$10efd6cb1115e979$export$56766feef403f365","$10efd6cb1115e979$export$6e69537d67fa20f","$10efd6cb1115e979$export$eb0401070c617ea5","baggageHeader","baggageObject","curr","currBaggageObject","$10efd6cb1115e979$var$baggageHeaderToObject","entries","nonPrefixedKey","sentryPrefixedDSC","dscKey","dscValue","$10efd6cb1115e979$var$objectToBaggageHeader","objectKey","objectValue","currentIndex","baggageEntry","newBaggageHeader","keyOrValue","decodeURIComponent","$e0bdfb01a41c5c9f$export$febc5573c75cefb0","_measurements","_hub","_name","_trimEnd","trimEnd","incomingDynamicSamplingContext","_frozenDynamicSamplingContext","newName","setMeasurement","unit","setMetadata","newMetadata","_finishTransaction","maybeSampleRate","sample_rate","setHub","finishedSpans","prev","current","hasMeasurements","measurements","$1a777fcb8ededcae$export$b3258c3993bc9b71","samplingContext","rate","tracesSampler","tracesSampleRate","$4d77a998e73876a1$export$5008da00b1b6dee6","maybeOptions","enableTracing","$959fae7468217515$export$3db3e396472fda8d","$4I4m1","$3yaN4","useNestjs","_useNest","loadDependency","_module","shouldDisableAutoInstrumentation","GraphQLFactory","orig","resolversExplorerService","resolvers","instrumentedResolvers","$959fae7468217515$var$instrumentResolvers","ApolloServerBase","config","schema","modules","model","resolverGroupName","resolverName","parentSpan","_optionalChain","_2","_3","rv","res","_4","_5","_6","_7","$36dea620c29829d9$export$3cc482e6b02f32f7","ops","lastAccessLHS","$295ceadbba9c16cd$export$34db76d03eb96b7e","$1bddcf4cca1dd8db$export$bbd2089f30bd3708","$1bddcf4cca1dd8db$export$46d3bbd0375f5fa4","$hIUQs","$21QZq","$cJLfg","$eKkm5","$1bddcf4cca1dd8db$var$DEFAULT_BROWSER_TRACING_OPTIONS","TRACING_DEFAULTS","markBackgroundTransactions","routingInstrumentation","instrumentRoutingWithDefaults","startTransactionOnLocationChange","startTransactionOnPageLoad","enableLongTask","_hasSetTracePropagationTargets","tracePropagationTargets","tracingOrigins","_collectWebVitals","startTrackingWebVitals","startTrackingLongTasks","enableInteractions","startTrackingInteractions","instrumentRouting","traceFetch","traceXHR","shouldCreateSpanForRequest","enableHTTPTimings","clientOptionsTracePropagationTargets","_createRouteTransaction","onStartRouteTransaction","registerBackgroundTabDetection","_registerInteractionListener","beforeNavigate","isPageloadTransaction","$1bddcf4cca1dd8db$export$f147b32b03c9cf11","tracingContextFromHeaders","expandedContext","modifiedContext","finalContext","_latestRouteName","_latestRouteSource","idleTransaction","addPerformanceEntries","inflightInteractionTransaction","registerInteractionTransaction","currentTransaction","once","capture","metaName","metaTag","getDomElement","$ce72a3f6040a3d13$export$6f18f55521af71a1","statusType","$abc526b0c18364b6$export$56d8a8a25bd48b81","$17a4c76669ae2502$var$_lcpEntry","$17a4c76669ae2502$var$_clsEntry","$17a4c76669ae2502$export$7c69f0412d101b88","$17a4c76669ae2502$export$f396d19077034ad2","$17a4c76669ae2502$export$e27543e0976315e4","$17a4c76669ae2502$export$5f8fa6b3467a7443","$aPEnJ","$aYJ7F","$g2e6t","$17a4c76669ae2502$var$msToSec","time","$17a4c76669ae2502$var$getBrowserPerformanceAPI","$17a4c76669ae2502$var$_performanceCursor","$17a4c76669ae2502$var$_measurements","mark","fidCallback","addFidInstrumentationHandler","metric","entry","startTime","clsCallback","addClsInstrumentationHandler","lcpCallback","addLcpInstrumentationHandler","addPerformanceInstrumentationHandler","responseStartTimestamp","requestStartTimestamp","getEntries","performanceEntries","entryType","$17a4c76669ae2502$var$_addPerformanceNavigationTiming","_startChild","requestStart","responseEnd","responseStart","$17a4c76669ae2502$export$bc93b84e4d45912d","measureStartTimestamp","firstHidden","getVisibilityWatcher","shouldRecord","firstHiddenTime","resourceName","$17a4c76669ae2502$export$c82fe1a70634f317","initiatorType","transferSize","encodedBodySize","decodedBodySize","renderBlockingStatus","$17a4c76669ae2502$var$_trackNavigator","connection","effectiveType","isMeasurementValue","rtt","deviceMemory","hardwareConcurrency","oldValue","measurementTimestamp","normalizedValue","delta","fidMark","cls","measurementName","element","size","sources","node","eventEnd","$7e2dfdc583f71ae7$var$_previousCls","$7e2dfdc583f71ae7$var$_previousFid","$7e2dfdc583f71ae7$var$_previousLcp","$7e2dfdc583f71ae7$export$861b82818b37ba5b","$7e2dfdc583f71ae7$export$3fd4b53331200102","$7e2dfdc583f71ae7$export$2707d7471c0b918f","$7e2dfdc583f71ae7$export$69816c1a049f8db6","$6RVhN","$hbTjc","$cxxaY","$7l4XI","$7e2dfdc583f71ae7$var$handlers","$7e2dfdc583f71ae7$var$instrumented","$7e2dfdc583f71ae7$var$addMetricObserver","$7e2dfdc583f71ae7$var$instrumentCls","$7e2dfdc583f71ae7$var$instrumentLcp","$7e2dfdc583f71ae7$var$instrumentFid","$7e2dfdc583f71ae7$var$addHandler","$7e2dfdc583f71ae7$var$instrumentPerformanceObserver","durationThreshold","observe","$7e2dfdc583f71ae7$var$triggerHandlers","$7e2dfdc583f71ae7$var$getCleanupCallback","typeHandlers","onCLS","onFID","onLCP","instrumentFn","previousValue","$5004211a3379e720$export$a7873055838e5ad8","$6htuU","$h2Dpw","$hCBGv","onReport","report","initMetric","sessionValue","sessionEntries","handleEntries","hadRecentInput","firstSessionEntry","lastSessionEntry","po","bindReporter","stopListening","takeRecords","onHidden","$492b36332a705c53$export$17679dccdd551979","reportAllChanges","prevValue","forceReport","$c68131b758542993$export$3c29b44508a0612b","$6LHZG","$01kTG","$hMqmr","navEntry","getNavigationEntry","navigationType","prerendering","getActivationStart","rating","generateUniqueID","$4ed94220185c2472$export$407ea409d1f3b539","floor","$00404ddb8ea2dcd5$export$d3e828b3c7b5b845","activationStart","$cf1b5e15ac1ab493$export$6431553786c94949","$cf1b5e15ac1ab493$var$getNavigationEntryFromPerformanceTiming","navigation","navigationEntry","__WEB_VITALS_POLYFILL__","getEntriesByType","$557e57f25a2ff1c6$export$d1203567a167490e","opts","PerformanceObserver","supportedEntryTypes","list","buffered","$cd4337a39bc4ec72$export$91ec2be6fdd8f1b4","cb","onHiddenOrPageHide","removeEventListener","$c83e5de965c7bdae$export$39705a25c49af873","visibilityWatcher","handleEntry","processingStart","disconnect","$7fe282614dd24467$export$443f86b2c77012c4","$7fe282614dd24467$var$firstHiddenTime","$7fe282614dd24467$var$initHiddenTime","$7fe282614dd24467$var$trackChanges","timeStamp","$92124d293fb37e9b$export$947b1626ab8d5632","$92124d293fb37e9b$var$reportedMetricIDs","lastEntry","$bac7c5e2ea621c69$export$27169ccae1b439e3","isFinite","$bac7c5e2ea621c69$export$8bd469e1f37aa721","ctx","$aaca3bedce12f6e4$export$cc17fb3c0bc95cd7","$aaca3bedce12f6e4$export$864489cb3478db3e","$aaca3bedce12f6e4$export$15bd0305d05ad07b","shouldCreateSpan","shouldAttachHeadersWithTargets","createdSpan","$aaca3bedce12f6e4$export$cd8846dd8ea4bd7a","shouldAttachHeaders","shouldCreateSpanResult","__span","contentLength","contentLengthNum","$aaca3bedce12f6e4$export$6717acf674206871","requestSpan","sentryTraceHeader","sentryBaggageHeader","dynamicSamplingContextToSentryBaggageHeader","newHeaders","BAGGAGE_HEADER_NAME","existingBaggageHeader","newBaggageHeaders","$aaca3bedce12f6e4$var$addHTTPTimings","$aaca3bedce12f6e4$export$49680d91e75e2ef7","__sentry_xhr_span_id__","$aaca3bedce12f6e4$var$setHeaderOnXhr","cleanup","$aaca3bedce12f6e4$var$isPerformanceResourceTiming","nextHopProtocol","endsWith","spanData","$aaca3bedce12f6e4$var$resourceTimingEntryToSpanData","resourceTiming","$aaca3bedce12f6e4$export$57c6f824442f9fe1","char","timingSpanData","$aaca3bedce12f6e4$var$getAbsoluteTime","redirectStart","fetchStart","domainLookupStart","domainLookupEnd","connectStart","secureConnectionStart","connectEnd","$945e55ebcf49ab38$export$86649cc09fe75143","customStartTransaction","startingUrl","pathname","$f14858ffb6e8fa17$export$6dafdd8fec05099d","$inESk","_router","router","_methods","methods","$f14858ffb6e8fa17$var$instrumentMiddlewares","$f14858ffb6e8fa17$var$patchMiddleware","$f14858ffb6e8fa17$var$wrap","$f14858ffb6e8fa17$var$instrumentRouter","appOrRouter","isApp","lazyrouter","routerProto","originalProcessParams","process_params","called","req","done","partialRoute","_reconstructedRoute","layerRoutePath","isRegex","numExtraSegments","$f14858ffb6e8fa17$var$getLayerRoutePathInfo","lrp","_12","route","_13","major","versions","$f14858ffb6e8fa17$export$bde9c19304d7dbd3","regexp","$f14858ffb6e8fa17$var$getNumberOfArrayUrlSegments","routesArray","accNumSegments","currentRoute","getNumberOfUrlSegments","r","_hasParameters","$f14858ffb6e8fa17$export$ea5dbbfd8423c1fa","originalUrl","reconstructedRoute","layerPath","originalUrlSplit","_14","_15","_16","_17","tempCounter","currentOffset","_18","_19","_20","_21","_22","_23","_24","_25","_26","_27","_28","_29","finalPartialRoute","urlLength","routeLength","__sentry_transaction","finalRoute","extractPathForTransaction","customRoute","arity","_8","_9","_10","_11","orderedKeys","pathRegex","flags","execResult","indices","paramIndices","resultPath","indexShift","startOffset","endOffset","substr1","replacement","substr2","$d61a14f058aa8e95$export$8c5ebee2e5bb9575","baseUrl","$a80ef5afbf6ef141$export$b735d011553f1049","$156ffb7f877676fa$export$968aa4360b02a334","$156ffb7f877676fa$var$OPERATIONS","$156ffb7f877676fa$var$OPERATION_SIGNATURES","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","dropIndex","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexExists","insertMany","insertOne","mapReduce","rename","replaceOne","updateMany","updateOne","_operations","operations","_describeOperations","describeOperations","_useMongoose","useMongoose","_instrumentOperations","Collection","collection","operation","_patchOperation","getSpanContext","_getSpanContextFromOperationArguments","lastArg","maybePromiseOrCursor","maybeCursor","cursor","dbName","collectionName","signature","shouldDescribe","$30c0da0699e9da3d$export$a2cc26ff91a3f8ad","mySqlConfig","connect","Proxy","wrappingTarget","thisArg","finishSpan","sql","fields","$fb64650258fea1e0$export$806ddb599177abc4","_usePgNative","usePgNative","Client","native","database","text","$aed6cf858dbccebe$export$e300e6f4779d55c2","$1bEoM","possibleClient","$aed6cf858dbccebe$var$isValidPrismaClient","_sentryInstrumented","clientData","engineConfig","_engineConfig","activeProvider","clientVersion","$use","params","action","$0dd627dda6e5095f$export$357889f174732d38","onError","maybePromiseResult","$0dd627dda6e5095f$var$normalizeContext","activeSpan","$0dd627dda6e5095f$var$createChildSpanOrTransaction","finishAndSetSpan","Promise","$0d67a7b19af82315$export$beb8e6a823e89c5d","$c9721eed98d92ce1$export$3ff7d2096ad729f0","$c9721eed98d92ce1$export$fdd0d4d850365372","$c9721eed98d92ce1$export$1c6fba4d645dcec2","$c9721eed98d92ce1$export$ff14e7c38350c77d","$a9NjE","$ixn3l","$kavin","$7pkPC","$1EGrR","Controller","submitForm","form","formData","FormData","URLSearchParams","submitButtons","querySelectorAll","button","revertDisabledButtons","disableAllButtons","showProgressBar","resp","default","onUploadProgress","progressEventHandler","onDownloadProgress","redirect_uri","clearCache","visit","handleAxiosError","hideProgressBar","elems","forms","onSubmitCapture","onSubmit","beforeCache","preventDefault","json","content","formDataJSON","xAction","elementsWithXAction","HTMLButtonElement","elements","HTMLInputElement","HTMLSelectElement","HTMLTextAreaElement","_1","targets","retained","getSessionStorageKey","idValue","sessionStorage","getItem","removeItem","inputTargets","setAttribute","collectAllValues","setItem","dispatch","$8e2027ca6b52a8f5$export$e395a65fcce0676e","buttons","disabled","$8e2027ca6b52a8f5$export$eddeecc40507de3b","loadingProgressBar","getElementById","style","opacity","$8e2027ca6b52a8f5$export$78e919f667bc272b","$8e2027ca6b52a8f5$export$6e08f0b3718c5078","progressEvent","total","percentage","round","loaded","width","$b19aa4638d51eb26$export$d8daec839daf2d34","$b19aa4638d51eb26$export$f3b8e31d958a9f24","$b19aa4638d51eb26$export$333c4084290bc216","$b19aa4638d51eb26$export$9bee1a6f18f533d2","renderStreamMessage","$b19aa4638d51eb26$var$setErrorMessage","dispatchEvent","stopPropagation","hide","showMessage","classList","hideMessage","barTarget","$5df3022776a321e4$export$c6da7db072182cc4","$9b1e3d6e13a9a761$export$a4310b58c682348e","$7jicr","outlets","lockUntil","actionButtonSelector","stopTick","intervalHandle","wasActionButtonDisabled","setupTick","isLocked","DateTime","fromISO","lockUntilValue","isValid","tick","actionButtonEl","actionButtonSelectorValue","formatDateRelativeOutlets","outlet","relativeBaseValue","toISO","newIsLocked","lockedTargets","display","unlockedTargets","$55286cce8d5d6f71$var$_defineProperties","props","$55286cce8d5d6f71$var$_toPropertyKey","$55286cce8d5d6f71$var$_toPrimitive","prim","Symbol","toPrimitive","TypeError","$55286cce8d5d6f71$var$_createClass","Constructor","protoProps","staticProps","$55286cce8d5d6f71$var$_extends","$55286cce8d5d6f71$var$_inheritsLoose","subClass","superClass","create","$55286cce8d5d6f71$var$_setPrototypeOf","$55286cce8d5d6f71$var$_getPrototypeOf","o","__proto__","$55286cce8d5d6f71$var$_construct","Parent","Class","$55286cce8d5d6f71$var$_isNativeReflectConstruct","Reflect","construct","sham","valueOf","instance","$55286cce8d5d6f71$var$_wrapNativeSuper","_cache","Wrapper","$55286cce8d5d6f71$var$_objectWithoutPropertiesLoose","excluded","sourceKeys","$55286cce8d5d6f71$var$_arrayLikeToArray","arr2","$55286cce8d5d6f71$var$_createForOfIteratorHelperLoose","allowArrayLike","it","iterator","$55286cce8d5d6f71$var$_unsupportedIterableToArray","minLen","$55286cce8d5d6f71$var$LuxonError","_Error","LuxonError","$55286cce8d5d6f71$var$InvalidDateTimeError","_LuxonError","InvalidDateTimeError","toMessage","$55286cce8d5d6f71$var$InvalidIntervalError","_LuxonError2","InvalidIntervalError","$55286cce8d5d6f71$var$InvalidDurationError","_LuxonError3","InvalidDurationError","$55286cce8d5d6f71$var$ConflictingSpecificationError","_LuxonError4","ConflictingSpecificationError","$55286cce8d5d6f71$var$InvalidUnitError","_LuxonError5","InvalidUnitError","$55286cce8d5d6f71$var$InvalidArgumentError","_LuxonError6","InvalidArgumentError","$55286cce8d5d6f71$var$ZoneIsAbstractError","_LuxonError7","ZoneIsAbstractError","$55286cce8d5d6f71$var$n","$55286cce8d5d6f71$var$s","$55286cce8d5d6f71$var$l","$55286cce8d5d6f71$var$DATE_SHORT","year","month","day","$55286cce8d5d6f71$var$DATE_MED","$55286cce8d5d6f71$var$DATE_MED_WITH_WEEKDAY","weekday","$55286cce8d5d6f71$var$DATE_FULL","$55286cce8d5d6f71$var$DATE_HUGE","$55286cce8d5d6f71$var$TIME_SIMPLE","hour","minute","$55286cce8d5d6f71$var$TIME_WITH_SECONDS","second","$55286cce8d5d6f71$var$TIME_WITH_SHORT_OFFSET","timeZoneName","$55286cce8d5d6f71$var$TIME_WITH_LONG_OFFSET","$55286cce8d5d6f71$var$TIME_24_SIMPLE","hourCycle","$55286cce8d5d6f71$var$TIME_24_WITH_SECONDS","$55286cce8d5d6f71$var$TIME_24_WITH_SHORT_OFFSET","$55286cce8d5d6f71$var$TIME_24_WITH_LONG_OFFSET","$55286cce8d5d6f71$var$DATETIME_SHORT","$55286cce8d5d6f71$var$DATETIME_SHORT_WITH_SECONDS","$55286cce8d5d6f71$var$DATETIME_MED","$55286cce8d5d6f71$var$DATETIME_MED_WITH_SECONDS","$55286cce8d5d6f71$var$DATETIME_MED_WITH_WEEKDAY","$55286cce8d5d6f71$var$DATETIME_FULL","$55286cce8d5d6f71$var$DATETIME_FULL_WITH_SECONDS","$55286cce8d5d6f71$var$DATETIME_HUGE","$55286cce8d5d6f71$var$DATETIME_HUGE_WITH_SECONDS","$55286cce8d5d6f71$var$Zone","Zone","_proto","offsetName","ts","formatOffset","format","equals","otherZone","$55286cce8d5d6f71$var$singleton$1","$55286cce8d5d6f71$var$SystemZone","_Zone","SystemZone","_ref","$55286cce8d5d6f71$var$parseZoneInfo","locale","$55286cce8d5d6f71$var$formatOffset","getTimezoneOffset","Intl","DateTimeFormat","resolvedOptions","timeZone","$55286cce8d5d6f71$var$dtfCache","$55286cce8d5d6f71$var$typeToPos","era","$55286cce8d5d6f71$var$ianaZoneCache","$55286cce8d5d6f71$var$IANAZone","IANAZone","_this","zoneName","valid","isValidZone","resetCache","isValidSpecifier","zone","formatted","parsed","fMonth","fDay","date","NaN","dtf","hour12","_ref2","formatToParts","$55286cce8d5d6f71$var$partsOffset","filled","_formatted$i","pos","$55286cce8d5d6f71$var$isUndefined","adOrBc","asUTC","$55286cce8d5d6f71$var$objToLocalTS","millisecond","asTS","over","$55286cce8d5d6f71$var$_excluded","$55286cce8d5d6f71$var$_excluded2","$55286cce8d5d6f71$var$intlLFCache","$55286cce8d5d6f71$var$intlDTCache","$55286cce8d5d6f71$var$getCachedDTF","locString","$55286cce8d5d6f71$var$intlNumCache","$55286cce8d5d6f71$var$intlRelCache","$55286cce8d5d6f71$var$sysLocaleCache","$55286cce8d5d6f71$var$weekInfoCache","$55286cce8d5d6f71$var$listStuff","loc","englishFn","intlFn","mode","listingMode","$55286cce8d5d6f71$var$PolyNumberFormatter","PolyNumberFormatter","intl","forceSimple","padTo","otherOpts","inf","intlOpts","useGrouping","minimumIntegerDigits","NumberFormat","$55286cce8d5d6f71$var$padStart","$55286cce8d5d6f71$var$roundTo","fixed","$55286cce8d5d6f71$var$PolyDateFormatter","PolyDateFormatter","dt","originalZone","z","gmtOffset","offsetZ","setZone","plus","minutes","_proto2","toJSDate","part","$55286cce8d5d6f71$var$PolyRelFormatter","PolyRelFormatter","isEnglish","$55286cce8d5d6f71$var$hasRelative","_opts","rtf","RelativeTimeFormat","_proto3","count","$55286cce8d5d6f71$var$formatRelativeTime","numeric","narrow","units","years","quarters","months","weeks","days","hours","seconds","lastable","isDay","isInPast","is","fmtValue","singular","lilUnits","fmtUnit","$55286cce8d5d6f71$var$fallbackWeekSettings","firstDay","minimalDays","weekend","$55286cce8d5d6f71$var$Locale","Locale","numbering","outputCalendar","weekSettings","specifiedLocale","localeStr","numberingSystem","_parseLocaleString","$55286cce8d5d6f71$var$parseLocaleString","xIndex","uIndex","selectedStr","smaller","calendar","parsedLocale","parsedNumberingSystem","parsedOutputCalendar","weekdaysCache","standalone","monthsCache","meridiemCache","eraCache","fastNumbersCached","fromOpts","defaultToEN","$55286cce8d5d6f71$var$Settings","defaultLocale","defaultNumberingSystem","defaultOutputCalendar","$55286cce8d5d6f71$var$validateWeekSettings","defaultWeekSettings","fromObject","_temp","_proto4","isActuallyEn","hasNoWeirdness","alts","getOwnPropertyNames","redefaultToEN","redefaultToSystem","_this2","$55286cce8d5d6f71$var$months","formatStr","$55286cce8d5d6f71$var$mapMonths","f","ms","$55286cce8d5d6f71$var$DateTime","utc","extract","weekdays","_this3","$55286cce8d5d6f71$var$weekdays","$55286cce8d5d6f71$var$mapWeekdays","meridiems","_this4","$55286cce8d5d6f71$var$meridiems","eras","_this5","$55286cce8d5d6f71$var$eras","field","matching","results","df","dtFormatter","m","numberFormatter","fastNumbers","relFormatter","listFormatter","ListFormat","getWeekSettings","$55286cce8d5d6f71$var$hasLocaleWeekInfo","$55286cce8d5d6f71$var$getCachedWeekInfo","getWeekInfo","weekInfo","getStartOfWeek","getMinDaysInFirstWeek","getWeekendDays","other","$55286cce8d5d6f71$var$singleton","$55286cce8d5d6f71$var$FixedOffsetZone","FixedOffsetZone","utcInstance","parseSpecifier","$55286cce8d5d6f71$var$signedOffset","$55286cce8d5d6f71$var$InvalidZone","InvalidZone","$55286cce8d5d6f71$var$normalizeZone","defaultZone","lowered","$55286cce8d5d6f71$var$isNumber","$55286cce8d5d6f71$var$throwOnInvalid","$55286cce8d5d6f71$var$now","$55286cce8d5d6f71$var$defaultZone","$55286cce8d5d6f71$var$defaultLocale","$55286cce8d5d6f71$var$defaultNumberingSystem","$55286cce8d5d6f71$var$defaultOutputCalendar","$55286cce8d5d6f71$var$twoDigitCutoffYear","$55286cce8d5d6f71$var$defaultWeekSettings","Settings","resetCaches","cutoffYear","t","$55286cce8d5d6f71$var$Invalid","Invalid","explanation","$55286cce8d5d6f71$var$nonLeapLadder","$55286cce8d5d6f71$var$leapLadder","$55286cce8d5d6f71$var$unitOutOfRange","$55286cce8d5d6f71$var$dayOfWeek","d","UTC","setUTCFullYear","getUTCFullYear","js","getUTCDay","$55286cce8d5d6f71$var$uncomputeOrdinal","ordinal","table","$55286cce8d5d6f71$var$isLeapYear","month0","findIndex","$55286cce8d5d6f71$var$isoWeekdayToLocal","isoWeekday","startOfWeek","$55286cce8d5d6f71$var$gregorianToWeek","gregObj","minDaysInFirstWeek","weekYear","weekNumber","$55286cce8d5d6f71$var$weeksInWeekYear","$55286cce8d5d6f71$var$timeObject","$55286cce8d5d6f71$var$weekToGregorian","weekData","weekdayOfJan4","yearInDays","$55286cce8d5d6f71$var$daysInYear","_uncomputeOrdinal","$55286cce8d5d6f71$var$gregorianToOrdinal","gregData","$55286cce8d5d6f71$var$ordinalToGregorian","ordinalData","_uncomputeOrdinal2","$55286cce8d5d6f71$var$usesLocalWeekValues","localWeekday","localWeekNumber","localWeekYear","$55286cce8d5d6f71$var$hasInvalidGregorianData","validYear","$55286cce8d5d6f71$var$isInteger","validMonth","$55286cce8d5d6f71$var$integerBetween","validDay","$55286cce8d5d6f71$var$daysInMonth","$55286cce8d5d6f71$var$hasInvalidTimeData","validHour","validMinute","validSecond","validMillisecond","$55286cce8d5d6f71$var$bestBy","by","compare","best","pair","$55286cce8d5d6f71$var$hasOwnProperty","settings","thing","bottom","padStart","$55286cce8d5d6f71$var$parseInteger","string","$55286cce8d5d6f71$var$parseFloating","parseFloat","$55286cce8d5d6f71$var$parseMillis","fraction","number","digits","towardZero","factor","pow","rounder","trunc","x","modMonth","$55286cce8d5d6f71$var$firstWeekOffset","weekOffset","weekOffsetNext","$55286cce8d5d6f71$var$untruncateYear","twoDigitCutoffYear","offsetFormat","modified","offHourStr","offMinuteStr","offHour","offMin","offMinSigned","$55286cce8d5d6f71$var$asNumber","numericValue","$55286cce8d5d6f71$var$normalizeObject","normalizer","u","sign","RangeError","$55286cce8d5d6f71$var$monthsLong","$55286cce8d5d6f71$var$monthsShort","$55286cce8d5d6f71$var$monthsNarrow","$55286cce8d5d6f71$var$weekdaysLong","$55286cce8d5d6f71$var$weekdaysShort","$55286cce8d5d6f71$var$weekdaysNarrow","$55286cce8d5d6f71$var$erasLong","$55286cce8d5d6f71$var$erasShort","$55286cce8d5d6f71$var$erasNarrow","$55286cce8d5d6f71$var$stringifyTokens","splits","tokenToString","_step","_iterator","token","literal","$55286cce8d5d6f71$var$_macroTokenToFormatOpts","D","DD","DDD","DDDD","tt","ttt","tttt","T","TT","TTT","TTTT","ff","fff","ffff","F","FF","FFF","FFFF","$55286cce8d5d6f71$var$Formatter","Formatter","formatOpts","systemLoc","parseFormat","fmt","currentFull","bracketed","charAt","macroTokenToFormatOpts","formatWithSystemDefault","formatDateTime","formatDateTimeParts","formatInterval","formatRange","num","formatDateTimeFromString","knownEnglish","useDateTimeFormatter","isOffsetFixed","allowZ","maybeMacro","quarter","formatDurationFromString","dur","lildur","tokenToField","tokens","realTokens","found","shiftTo","mapped","$55286cce8d5d6f71$var$ianaRegex","$55286cce8d5d6f71$var$combineRegexes","_len","regexes","$55286cce8d5d6f71$var$combineExtractors","_len2","extractors","_key2","mergedVals","mergedZone","_ex","$55286cce8d5d6f71$var$parse","_len3","_key3","_i","_patterns","_patterns$_i","regex","extractor","$55286cce8d5d6f71$var$simpleParse","_len4","_key4","ret","$55286cce8d5d6f71$var$offsetRegex","$55286cce8d5d6f71$var$isoTimeBaseRegex","$55286cce8d5d6f71$var$isoTimeRegex","$55286cce8d5d6f71$var$isoTimeExtensionRegex","$55286cce8d5d6f71$var$extractISOWeekData","$55286cce8d5d6f71$var$extractISOOrdinalData","$55286cce8d5d6f71$var$sqlTimeRegex","$55286cce8d5d6f71$var$sqlTimeExtensionRegex","$55286cce8d5d6f71$var$int","fallback","$55286cce8d5d6f71$var$extractISOTime","milliseconds","$55286cce8d5d6f71$var$extractISOOffset","local","fullOffset","$55286cce8d5d6f71$var$extractIANAZone","$55286cce8d5d6f71$var$isoTimeOnly","$55286cce8d5d6f71$var$isoDuration","$55286cce8d5d6f71$var$extractISODuration","yearStr","monthStr","weekStr","dayStr","hourStr","minuteStr","secondStr","millisecondsStr","hasNegativePrefix","negativeSeconds","maybeNegate","force","$55286cce8d5d6f71$var$obsOffsets","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","$55286cce8d5d6f71$var$fromStrings","weekdayStr","$55286cce8d5d6f71$var$rfc2822","$55286cce8d5d6f71$var$extractRFC2822","obsOffset","milOffset","$55286cce8d5d6f71$var$rfc1123","$55286cce8d5d6f71$var$rfc850","$55286cce8d5d6f71$var$ascii","$55286cce8d5d6f71$var$extractRFC1123Or850","$55286cce8d5d6f71$var$extractASCII","$55286cce8d5d6f71$var$isoYmdWithTimeExtensionRegex","$55286cce8d5d6f71$var$isoWeekWithTimeExtensionRegex","$55286cce8d5d6f71$var$isoOrdinalWithTimeExtensionRegex","$55286cce8d5d6f71$var$isoTimeCombinedRegex","$55286cce8d5d6f71$var$extractISOYmdTimeAndOffset","$55286cce8d5d6f71$var$extractISOWeekTimeAndOffset","$55286cce8d5d6f71$var$extractISOOrdinalDateAndTime","$55286cce8d5d6f71$var$extractISOTimeAndOffset","$55286cce8d5d6f71$var$extractISOTimeOnly","$55286cce8d5d6f71$var$sqlYmdWithTimeExtensionRegex","$55286cce8d5d6f71$var$sqlTimeCombinedRegex","$55286cce8d5d6f71$var$extractISOTimeOffsetAndIANAZone","$55286cce8d5d6f71$var$INVALID$2","$55286cce8d5d6f71$var$lowOrderMatrix","$55286cce8d5d6f71$var$casualMatrix","$55286cce8d5d6f71$var$accurateMatrix","$55286cce8d5d6f71$var$daysInYearAccurate","$55286cce8d5d6f71$var$daysInMonthAccurate","$55286cce8d5d6f71$var$orderedUnits$1","$55286cce8d5d6f71$var$reverseUnits","$55286cce8d5d6f71$var$clone$1","$55286cce8d5d6f71$var$Duration","conversionAccuracy","matrix","$55286cce8d5d6f71$var$durationToMillis","vals","_vals$milliseconds","sum","$55286cce8d5d6f71$var$normalizeValues","reduceRight","previous","previousVal","conv","rollUp","_Symbol$for","Duration","accurate","invalid","isLuxonDuration","fromMillis","normalizeUnit","fromDurationLike","durationLike","isDuration","_parseISODuration","fromISOTime","_parseISOTimeOnly","throwOnInvalid","week","toFormat","fmtOpts","toHuman","l","unitDisplay","listStyle","toObject","toISOTime","millis","toMillis","suppressMilliseconds","suppressSeconds","includePrefix","includeOffset","dateTime","invalidReason","_i2","_orderedUnits","minus","negate","mapUnits","_i3","_Object$keys","reconfigure","as","rescale","$55286cce8d5d6f71$var$removeZeroes","newVals","_Object$entries","_Object$entries$_i","shiftToAll","lastUnit","built","accumulated","_i4","_orderedUnits2","own","ak","negated","_i5","_Object$keys2","_i6","_orderedUnits3","v1","v2","for","$55286cce8d5d6f71$var$INVALID$1","$55286cce8d5d6f71$var$Interval","Interval","isLuxonInterval","fromDateTimes","builtStart","$55286cce8d5d6f71$var$friendlyDateTime","builtEnd","validateError","after","_split","startIsValid","endIsValid","_dur","isInterval","toDuration","startOf","useLocaleWeeks","diff","hasSame","isEmpty","isAfter","isBefore","contains","splitAt","dateTimes","sorted","added","splitBy","idx","divideEqually","numberOfParts","overlaps","abutsStart","abutsEnd","engulfs","intersection","union","merge","intervals","_intervals$sort$reduc","sofar","xor","_Array$prototype","currentCount","ends","flattened","difference","toLocaleString","toISODate","dateFormat","_temp2","_ref3$separator","_ref3","separator","mapEndpoints","mapFn","$55286cce8d5d6f71$var$Info","Info","hasDST","isUniversal","isValidIANAZone","normalizeZone","_ref$locale","_ref$locObj","locObj","getMinimumDaysInFirstWeek","_ref2$locale","_ref2$locObj","getWeekendWeekdays","_temp3","_ref3$locale","_ref3$locObj","_temp4","_ref4","_ref4$locale","_ref4$numberingSystem","_ref4$locObj","_ref4$outputCalendar","monthsFormat","_temp5","_ref5","_ref5$locale","_ref5$numberingSystem","_ref5$locObj","_ref5$outputCalendar","_temp6","_ref6","_ref6$locale","_ref6$numberingSystem","_ref6$locObj","weekdaysFormat","_temp7","_ref7","_ref7$locale","_ref7$numberingSystem","_ref7$locObj","_temp8","_ref8$locale","_ref8","_temp9","_ref9$locale","_ref9","features","localeWeek","$55286cce8d5d6f71$var$dayDiff","earlier","later","utcDayStart","toUTC","keepLocalTime","$55286cce8d5d6f71$var$numberingSystems","arab","arabext","bali","beng","deva","fullwide","gujr","hanidec","khmr","knda","laoo","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt","latn","$55286cce8d5d6f71$var$numberingSystemsUTF16","$55286cce8d5d6f71$var$hanidecChars","$55286cce8d5d6f71$var$digitRegex","$55286cce8d5d6f71$var$intUnit","post","deser","$55286cce8d5d6f71$var$parseDigits","charCodeAt","_numberingSystemsUTF","$55286cce8d5d6f71$var$spaceOrNBSP","fromCharCode","$55286cce8d5d6f71$var$spaceOrNBSPRegExp","$55286cce8d5d6f71$var$fixListRegex","$55286cce8d5d6f71$var$stripInsensitivities","$55286cce8d5d6f71$var$oneOf","strings","startIndex","$55286cce8d5d6f71$var$offset","$55286cce8d5d6f71$var$simple","$55286cce8d5d6f71$var$partTypeStyleToTokenVal","short","long","dayperiod","dayPeriod","hour24","$55286cce8d5d6f71$var$dummyDateTimeCache","$55286cce8d5d6f71$var$expandMacroTokens","$55286cce8d5d6f71$var$maybeExpandMacroToken","$55286cce8d5d6f71$var$formatOptsToTokens","$55286cce8d5d6f71$var$explainFromTokens","specificOffset","toField","one","two","three","four","six","oneOrTwo","oneToThree","oneToSix","oneToNine","twoToFour","fourToSix","unitate","disqualifyingUnit","_buildRegex","regexString","_match","$55286cce8d5d6f71$var$match","matchIndex","h","rawMatches","Z","q","M","G","y","S","formatter","resolvedOpts","$55286cce8d5d6f71$var$tokenForPart","isSpace","actualType","$55286cce8d5d6f71$var$INVALID","$55286cce8d5d6f71$var$unsupportedZone","$55286cce8d5d6f71$var$possiblyCachedWeekData","$55286cce8d5d6f71$var$possiblyCachedLocalWeekData","localWeekData","$55286cce8d5d6f71$var$clone","inst","old","$55286cce8d5d6f71$var$fixOffset","localTS","tz","utcGuess","o2","o3","$55286cce8d5d6f71$var$tsToObj","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","$55286cce8d5d6f71$var$adjustTime","oPre","millisToAdd","_fixOffset","$55286cce8d5d6f71$var$parseDataToDateTime","parsedZone","$55286cce8d5d6f71$var$toTechFormat","$55286cce8d5d6f71$var$_toISODate","extended","longFormat","$55286cce8d5d6f71$var$_toISOTime","extendedZone","ianaName","$55286cce8d5d6f71$var$defaultUnitValues","$55286cce8d5d6f71$var$defaultWeekUnitValues","$55286cce8d5d6f71$var$defaultOrdinalUnitValues","$55286cce8d5d6f71$var$orderedUnits","$55286cce8d5d6f71$var$orderedWeekUnits","$55286cce8d5d6f71$var$orderedOrdinalUnits","$55286cce8d5d6f71$var$normalizeUnitWithLocalWeeks","$55286cce8d5d6f71$var$normalizeUnit","weeknumber","weeksnumber","weeknumbers","weekyear","weekyears","$55286cce8d5d6f71$var$quickDT","tsNow","offsetProvis","_objToTS","$55286cce8d5d6f71$var$diffRelative","calendary","differ","$55286cce8d5d6f71$var$lastOpts","argList","ot","_zone","isLuxonDateTime","_lastOpts","_lastOpts2","fromJSDate","$55286cce8d5d6f71$var$isDate","zoneToUse","fromSeconds","validWeek","validWeekday","validOrdinal","_usesLocalWeekValues","containsOrdinal","containsGregorYear","containsGregorMD","containsGregor","definiteWeekDef","defaultValues","useWeekData","objNow","_step2","foundFirst","_iterator2","higherOrderInvalid","_objToTS2","_parseISODate","fromRFC2822","_parseRFC2822Date","fromHTTP","_parseHTTPDate","fromFormat","_explainFromTokens","_opts$locale","_opts$numberingSystem","_parseFromTokens","fromString","fromSQL","_parseSQL","isDateTime","parseFormatForOpts","localeOpts","tokenList","expandFormat","expanded","getPossibleOffsets","oEarlier","oLater","o1","ts1","ts2","c1","c2","resolvedLocaleOptions","_Formatter$create$res","toLocal","_ref2$keepLocalTime","_ref2$keepCalendarTim","keepCalendarTime","newTS","offsetGuess","_objToTS3","setLocale","mixed","_usesLocalWeekValues2","settingWeekStuff","_objToTS4","_ref4$useLocaleWeeks","normalizedUnit","ceil","endOf","_this$plus","toLocaleParts","_ref5$format","_ref5$suppressSeconds","_ref5$suppressMillise","_ref5$includeOffset","_ref5$extendedZone","ext","_ref6$format","toISOWeekDate","_ref7$suppressMillise","_ref7$suppressSeconds","_ref7$includeOffset","_ref7$includePrefix","_ref7$extendedZone","_ref7$format","toRFC2822","toHTTP","toSQLDate","toSQLTime","_ref8$includeOffset","_ref8$includeZone","includeZone","_ref8$includeOffsetSp","includeOffsetSpace","toSQL","toSeconds","toUnixInteger","toBSON","includeConfig","otherDateTime","_cursor$plus","_Duration$fromMillis","_highOrderDiffs","highWater","lowestOrder","remainingMillis","lowerOrderUnits","durOpts","$55286cce8d5d6f71$var$maybeArray","otherIsLater","diffed","$55286cce8d5d6f71$var$highOrderDiffs","differs","_differs","_differs$_i","diffNow","until","inputMs","adjustedToZone","toRelative","padding","toRelativeCalendar","every","fromFormatExplain","_options$locale","_options$numberingSys","fromStringExplain","dateTimeish","VERSION","$23343a2e2faa5665$export$a51b1932d3e09d8d","$23343a2e2faa5665$export$2fcc7e4077f77255","$gffAK","$23343a2e2faa5665$var$DATE_TYPES","$23343a2e2faa5665$var$DATE_STYLES","$23343a2e2faa5665$var$TIME_STYLES","relativeBase","formatLuxonRelativeDuration","lang","dateSpans","documentElement","render","hasAbs","intlDateTimeFormatIsSupported","hasRel","intlRelativeTimeFormatIsSupported","dateSpan","rfc3339","dateType","$23343a2e2faa5665$var$parseDateType","variant","dateStyle","$23343a2e2faa5665$var$parseDateStyle","timeStyle","$23343a2e2faa5665$var$parseTimeStyle","luxonDatetime","rel","HTMLElement","title","textContent","relativeBaseValueChanged","dateValue","jsDate","getTime","$e91199fecf823e37$export$69a877e843b1c75d","testDate","testFormat","actual","$e91199fecf823e37$export$abe7027f27563b68","$e96299560cefa6ab$export$98bde2dca13b978c","cooldown","label","labelUnit","scheduledAt","cooldownValue","labelValue","labelUnitValue","timeElapsed","displaySeconds","animHandle","cancelAnimationFrame","$d4ca369f1dba308a$export$df777343f2132381","show","stopImmediatePropagation","inputTarget","showButtonTarget","hideButtonTarget","$2acfa7b89ddfb395$export$606a7a71a8f20197","copyLabel","copiedLabel","copy","copyLabelValue","copiedLabelValue","sourceValue","$2acfa7b89ddfb395$var$copyToClipboard","select","setSelectionRange","execCommand","currentHandle","timeoutHandle","hasCopyLabelValue","hasCopiedLabelValue","newHandle","CoreIntegrations","internalWrap","BrowserTracingT","addExtensionMethodsT","getActiveTransactionT","extractTraceparentDataT","spanStatusfromHttpCodeT","TransactionT","SpanT","BROWSER_TRACING_INTEGRATION_ID_T","defaultRequestInstrumentationOptionsT","hasTracingEnabledT","stripUrlQueryAndFragmentT","TRACEPARENT_REGEXP_T","IdleTransactionT","instrumentOutgoingRequestsT","startIdleTransactionT","SpanStatusT","SpanClass","_inheritsLoose","_wrapNativeSuper","DATE_SHORT","DATE_MED","DATE_MED_WITH_WEEKDAY","DATE_FULL","DATE_HUGE","TIME_SIMPLE","TIME_WITH_SECONDS","TIME_WITH_SHORT_OFFSET","TIME_WITH_LONG_OFFSET","TIME_24_SIMPLE","TIME_24_WITH_SECONDS","TIME_24_WITH_SHORT_OFFSET","TIME_24_WITH_LONG_OFFSET","DATETIME_SHORT","DATETIME_SHORT_WITH_SECONDS","DATETIME_MED","DATETIME_MED_WITH_SECONDS","DATETIME_MED_WITH_WEEKDAY","DATETIME_FULL","DATETIME_FULL_WITH_SECONDS","DATETIME_HUGE","DATETIME_HUGE_WITH_SECONDS","_createClass","parseZoneInfo","dtfCache","makeDTF","typeToPos","hackyOffset","fYear","fadOrBc","fHour","fMinute","fSecond","partsOffset","isUndefined","ianaZoneCache","adjustedHour","objToLocalTS","intlLFCache","getCachedLF","intlDTCache","getCachedDTF","intlNumCache","getCachedINF","intlRelCache","getCachedRTF","cacheKeyOpts","_objectWithoutPropertiesLoose","_excluded","sysLocaleCache","systemLocale","weekInfoCache","getCachedWeekInfo","parseLocaleString","intlConfigString","mapMonths","mapWeekdays","listStuff","supportsFastNumbers","_excluded2","_extends","roundTo","hasRelative","English","fallbackWeekSettings","localeR","numberingSystemR","outputCalendarR","weekSettingsR","validateWeekSettings","hasLocaleWeekInfo","signedOffset","isNumber","nonLeapLadder","leapLadder","unitOutOfRange","dayOfWeek","computeOrdinal","isLeapYear","uncomputeOrdinal","isoWeekdayToLocal","gregorianToWeek","weeksInWeekYear","timeObject","weekToGregorian","daysInYear","gregorianToOrdinal","ordinalToGregorian","usesLocalWeekValues","hasLocaleWeekData","hasIsoWeekData","hasInvalidWeekData","isInteger","integerBetween","hasInvalidOrdinalData","hasInvalidGregorianData","daysInMonth","hasInvalidTimeData","isDate","bestBy","pick","floorMod","isNeg","padded","parseInteger","parseFloating","parseMillis","modYear","firstWeekOffset","fwdlw","untruncateYear","asNumber","normalizeObject","monthsLong","monthsShort","monthsNarrow","weekdaysLong","weekdaysShort","weekdaysNarrow","erasLong","erasShort","erasNarrow","meridiemForDateTime","weekdayForDateTime","monthForDateTime","eraForDateTime","formatRelativeTime","stringifyTokens","_createForOfIteratorHelperLoose","Formats","meridiem","collapsed","ianaRegex","combineRegexes","full","combineExtractors","simpleParse","offsetRegex","isoExtendedZone","isoTimeBaseRegex","isoTimeRegex","isoTimeExtensionRegex","isoYmdRegex","isoWeekRegex","isoOrdinalRegex","extractISOWeekData","extractISOOrdinalData","sqlYmdRegex","sqlTimeRegex","sqlTimeExtensionRegex","int","extractISOYmd","extractISOTime","extractISOOffset","extractIANAZone","isoTimeOnly","isoDuration","extractISODuration","obsOffsets","fromStrings","rfc2822","extractRFC2822","preprocessRFC2822","rfc1123","rfc850","ascii","extractRFC1123Or850","extractASCII","isoYmdWithTimeExtensionRegex","isoWeekWithTimeExtensionRegex","isoOrdinalWithTimeExtensionRegex","isoTimeCombinedRegex","extractISOYmdTimeAndOffset","extractISOWeekTimeAndOffset","extractISOOrdinalDateAndTime","extractISOTimeAndOffset","parseISODate","parseRFC2822Date","parseHTTPDate","parseISODuration","extractISOTimeOnly","parseISOTimeOnly","sqlYmdWithTimeExtensionRegex","sqlTimeCombinedRegex","extractISOTimeOffsetAndIANAZone","parseSQL","INVALID","lowOrderMatrix","casualMatrix","daysInYearAccurate","daysInMonthAccurate","accurateMatrix","orderedUnits","reverseUnits","conf","durationToMillis","normalizeValues","removeZeroes","eq","validateStartEnd","friendlyDateTime","dayDiff","highOrderDiffs","numberingSystems","numberingSystemsUTF16","hanidecChars","parseDigits","digitRegex","MISSING_FTP","intUnit","NBSP","spaceOrNBSP","spaceOrNBSPRegExp","fixListRegex","stripInsensitivities","oneOf","simple","escapeToken","unitForToken","partTypeStyleToTokenVal","tokenForPart","buildRegex","re","dateTimeFromMatches","dummyDateTimeCache","getDummyDateTime","maybeExpandMacroToken","formatOptsToTokens","expandMacroTokens","explainFromTokens","parseFromTokens","MAX_DATE","unsupportedZone","possiblyCachedWeekData","possiblyCachedLocalWeekData","fixOffset","tsToObj","objToTS","adjustTime","parseDataToDateTime","interpretationZone","toTechFormat","defaultUnitValues","defaultWeekUnitValues","defaultOrdinalUnitValues","orderedWeekUnits","orderedOrdinalUnits","normalizeUnitWithLocalWeeks","quickDT","diffRelative","lastOpts","unchanged","gregorian","tsFinal","offsetFinal","localeToUse","dayMs","minuteMs","asObj"],"version":3,"file":"build-authflowv2.861662bd.js.map"}