{"version":3,"sources":["webpack:///./node_modules/@sentry/core/esm/eventProcessors.js","webpack:///./node_modules/@sentry/core/esm/scope.js","webpack:///./node_modules/@sentry/utils/esm/normalize.js","webpack:///./node_modules/@sentry/browser/esm/sdk.js","webpack:///./node_modules/@sentry/browser/esm/stack-parsers.js","webpack:///./node_modules/@sentry/core/esm/constants.js","webpack:///./node_modules/@sentry/browser/esm/helpers.js","webpack:///./node_modules/@sentry/core/esm/tracing/spanstatus.js","webpack:///./node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.js","webpack:///./node_modules/@sentry/core/esm/utils/getRootSpan.js","webpack:///./node_modules/@sentry/core/esm/metrics/utils.js","webpack:///./node_modules/@sentry/core/esm/api.js","webpack:///./node_modules/@sentry/utils/esm/syncpromise.js","webpack:///./node_modules/@sentry/utils/esm/dsn.js","webpack:///./node_modules/@sentry/utils/esm/is.js","webpack:///./node_modules/@sentry/browser/esm/integrations/trycatch.js","webpack:///./node_modules/@sentry/browser/esm/integrations/breadcrumbs.js","webpack:///./node_modules/@sentry/browser/esm/integrations/globalhandlers.js","webpack:///./node_modules/@sentry/utils/esm/object.js","webpack:///./node_modules/@sentry/browser/esm/integrations/linkederrors.js","webpack:///./node_modules/@sentry/browser/esm/integrations/httpcontext.js","webpack:///./node_modules/@sentry/core/esm/tracing/utils.js","webpack:///./node_modules/@sentry/core/esm/version.js","webpack:///./node_modules/@sentry/core/esm/tracing/span.js","webpack:///./node_modules/@sentry/core/esm/utils/hasTracingEnabled.js","webpack:///./node_modules/@sentry/core/esm/hub.js","webpack:///./node_modules/@sentry/core/esm/integrations/inboundfilters.js","webpack:///./node_modules/@sentry/core/esm/integrations/functiontostring.js","webpack:///./node_modules/@sentry/browser/esm/integrations/dedupe.js","webpack:///./node_modules/@sentry/core/esm/utils/prepareEvent.js","webpack:///./node_modules/@sentry/core/esm/envelope.js","webpack:///./node_modules/@sentry/core/esm/tracing/transaction.js","webpack:///./node_modules/@sentry/utils/esm/misc.js","webpack:///./node_modules/@sentry/core/esm/metrics/metric-summary.js","webpack:///./node_modules/@sentry/core/esm/utils/handleCallbackErrors.js","webpack:///./node_modules/@sentry/utils/esm/worldwide.js","webpack:///./node_modules/@sentry/core/esm/tracing/idletransaction.js","webpack:///./node_modules/@sentry/core/esm/tracing/sampling.js","webpack:///./node_modules/@sentry/utils/esm/browser.js","webpack:///./node_modules/@sentry/browser/esm/debug-build.js","webpack:///./node_modules/@sentry/core/esm/utils/spanUtils.js","webpack:///./node_modules/@sentry/browser/esm/transports/xhr.js","webpack:///./node_modules/@sentry/core/esm/sdk.js","webpack:///./node_modules/@sentry/browser/esm/userfeedback.js","webpack:///./node_modules/@sentry/core/esm/tracing/errors.js","webpack:///./node_modules/@sentry/browser/esm/transports/utils.js","webpack:///./node_modules/@sentry/browser/esm/transports/fetch.js","webpack:///./node_modules/@sentry/browser/esm/client.js","webpack:///./node_modules/@sentry/utils/esm/clientreport.js","webpack:///./node_modules/@sentry/utils/esm/url.js","webpack:///./node_modules/@sentry/core/esm/integration.js","webpack:///./node_modules/@sentry/utils/esm/eventbuilder.js","webpack:///./node_modules/@sentry/core/esm/integrations/linkederrors.js","webpack:///./node_modules/@sentry/core/esm/index.js","webpack:///./node_modules/@sentry/utils/esm/instrument/_handlers.js","webpack:///./node_modules/@sentry/utils/esm/logger.js","webpack:///./node_modules/@sentry/core/esm/semanticAttributes.js","webpack:///./node_modules/@sentry/core/esm/debug-build.js","webpack:///./node_modules/@sentry/core/esm/tracing/hubextensions.js","webpack:///./node_modules/@sentry/core/esm/metrics/envelope.js","webpack:///./node_modules/@sentry/core/esm/baseclient.js","webpack:///./node_modules/@sentry/core/esm/metadata.js","webpack:///./node_modules/@sentry/core/esm/integrations/metadata.js","webpack:///./node_modules/@sentry/utils/esm/promisebuffer.js","webpack:///./node_modules/@sentry/core/esm/transports/base.js","webpack:///./node_modules/@sentry/utils/esm/baggage.js","webpack:///./node_modules/@sentry/utils/esm/supports.js","webpack:///./node_modules/@sentry/utils/esm/tracing.js","webpack:///./node_modules/@sentry/utils/esm/string.js","webpack:///./node_modules/@sentry/core/esm/utils/sdkMetadata.js","webpack:///./node_modules/@sentry/core/esm/transports/multiplexed.js","webpack:///./node_modules/@sentry/core/esm/utils/parameterize.js","webpack:///./node_modules/@sentry/core/esm/tracing/measurement.js","webpack:///./node_modules/@sentry/core/esm/utils/isSentryRequestUrl.js","webpack:///./node_modules/@sentry/core/esm/span.js","webpack:///./node_modules/@sentry/core/esm/transports/offline.js","webpack:///./node_modules/@sentry/core/esm/metrics/instance.js","webpack:///./node_modules/@sentry/core/esm/metrics/constants.js","webpack:///./node_modules/@sentry/core/esm/metrics/browser-aggregator.js","webpack:///./node_modules/@sentry/core/esm/metrics/integration.js","webpack:///./node_modules/@sentry/core/esm/metrics/exports.js","webpack:///./node_modules/@sentry/utils/esm/memo.js","webpack:///./node_modules/@sentry/utils/esm/error.js","webpack:///./node_modules/@sentry/utils/esm/env.js","webpack:///./node_modules/@sentry/utils/esm/node.js","webpack:///./node_modules/@sentry/utils/esm/buildPolyfills/_optionalChain.js","webpack:///./node_modules/@sentry/utils/esm/isBrowser.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/polyfills/interactionCountPolyfill.js","webpack:///./node_modules/@sentry-internal/tracing/esm/common/debug-build.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/bindReporter.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/types.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/getNavigationEntry.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/getActivationStart.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/initMetric.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/generateUniqueID.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/observe.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/onHidden.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/getVisibilityWatcher.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/getINP.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/getLCP.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/onTTFB.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/instrument.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/getCLS.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/getFID.js","webpack:///./node_modules/@sentry/replay/esm/index.js","webpack:///./node_modules/@sentry/utils/esm/buildPolyfills/_nullishCoalesce.js","webpack:///./node_modules/@sentry-internal/replay-canvas/esm/index.js","webpack:///./node_modules/@sentry-internal/feedback/esm/index.js","webpack:///./node_modules/@sentry/integrations/esm/captureconsole.js","webpack:///./node_modules/@sentry/integrations/esm/contextlines.js","webpack:///./node_modules/@sentry/integrations/esm/debug.js","webpack:///./node_modules/@sentry/integrations/esm/debug-build.js","webpack:///./node_modules/@sentry/integrations/esm/dedupe.js","webpack:///./node_modules/@sentry/integrations/esm/extraerrordata.js","webpack:///./node_modules/@sentry/integrations/esm/httpclient.js","webpack:///./node_modules/@sentry/integrations/esm/reportingobserver.js","webpack:///./node_modules/@sentry/utils/esm/path.js","webpack:///./node_modules/@sentry/integrations/esm/rewriteframes.js","webpack:///./node_modules/@sentry/integrations/esm/sessiontiming.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/backgroundtab.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/metrics/utils.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/metrics/index.js","webpack:///./node_modules/@sentry-internal/tracing/esm/common/fetch.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/request.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/browsertracing.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/router.js","webpack:///./node_modules/@sentry-internal/tracing/esm/browser/browserTracingIntegration.js","webpack:///./node_modules/@sentry/browser/esm/transports/offline.js","webpack:///./node_modules/@sentry/browser/esm/profiling/utils.js","webpack:///./node_modules/@sentry/browser/esm/profiling/hubextensions.js","webpack:///./node_modules/@sentry/browser/esm/profiling/integration.js","webpack:///./node_modules/@sentry/browser/esm/index.js","webpack:///./node_modules/@sentry/utils/esm/instrument/xhr.js","webpack:///./node_modules/@sentry/utils/esm/instrument/globalError.js","webpack:///./node_modules/@sentry/utils/esm/instrument/globalUnhandledRejection.js","webpack:///./node_modules/@sentry/utils/esm/vendor/supportsHistory.js","webpack:///./node_modules/@sentry/utils/esm/instrument/history.js","webpack:///./node_modules/@sentry/core/esm/session.js","webpack:///./node_modules/process/browser.js","webpack:///(webpack)/buildin/harmony-module.js","webpack:///./node_modules/@sentry/utils/esm/instrument/console.js","webpack:///./node_modules/@sentry/utils/esm/instrument/dom.js","webpack:///./node_modules/@sentry/utils/esm/instrument/fetch.js","webpack:///./node_modules/@sentry/utils/esm/severity.js","webpack:///./node_modules/@sentry/utils/esm/aggregate-errors.js","webpack:///./node_modules/@sentry/utils/esm/ratelimit.js","webpack:///./node_modules/@sentry/core/esm/exports.js","webpack:///./node_modules/@sentry/utils/esm/debug-build.js","webpack:///./node_modules/@sentry/core/esm/tracing/trace.js","webpack:///./node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js","webpack:///./node_modules/@sentry/browser/esm/eventbuilder.js","webpack:///./node_modules/@sentry/utils/esm/stacktrace.js","webpack:///./node_modules/@sentry/utils/esm/time.js","webpack:///./node_modules/@sentry/utils/esm/envelope.js"],"names":["ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","value","configurable","writable","getGlobalEventProcessors","addGlobalEventProcessor","callback","notifyEventProcessors","processors","event","hint","index","undefined","resolve","reject","processor","result","id","log","concat","then","final","_toConsumableArray","arr","Array","isArray","_arrayLikeToArray","_arrayWithoutHoles","iter","Symbol","iterator","from","_iterableToArray","o","minLen","n","prototype","toString","call","slice","constructor","name","test","_unsupportedIterableToArray","TypeError","_nonIterableSpread","len","arr2","_defineProperties","props","descriptor","globalScope","Scope","instance","Constructor","_classCallCheck","this","_notifyingListeners","_scopeListeners","_eventProcessors","_breadcrumbs","_attachments","_user","_tags","_extra","_contexts","_sdkProcessingMetadata","_propagationContext","generatePropagationContext","protoProps","staticProps","newScope","_level","_span","_session","_transactionName","_fingerprint","_requestSession","_client","client","user","email","ip_address","segment","username","_notifyScopeListeners","requestSession","tags","extras","extra","fingerprint","level","context","span","transaction","session","captureContext","scopeToMerge","scopeData","getScopeData","contexts","getRequestSession","propagationContext","scopeContext","breadcrumb","maxBreadcrumbs","maxCrumbs","mergedBreadcrumb","timestamp","breadcrumbs","attachment","attachments","eventProcessors","sdkProcessingMetadata","transactionName","additionalEventProcessors","newData","exception","eventId","event_id","warn","syntheticException","Error","captureException","originalException","message","captureMessage","captureEvent","_this","scope","clone","getGlobalScope","traceId","spanId","substring","_typeof","_slicedToArray","_arrayWithHoles","_i","_s","_e","_arr","_n","_d","next","done","err","_iterableToArrayLimit","_nonIterableRest","normalize","input","depth","maxProperties","Infinity","visit","ERROR","normalizeToSize","maxSize","normalized","jsonSize","memo","_memo","memoize","unmemoize","includes","stringified","stringifyValue","startsWith","remainingDepth","replace","valueWithToJSON","toJSON","jsonValue","numAdded","visitable","visitKey","hasOwnProperty","visitValue","_events","global","window","document","String","objName","getPrototypeOf","getConstructorName","encodeURI","split","utf8Length","JSON","stringify","defaultIntegrations","getDefaultIntegrations","_options","init","options","release","__SENTRY_RELEASE__","SENTRY_RELEASE","autoSessionTracking","sendClientReports","clientOptions","stackParser","integrations","transport","startSessionTracking","showReportDialog","hub","_hub$getStackTop","getStackTop","dsn","getDsn","getUser","lastEventId","script","createElement","async","crossOrigin","src","onLoad","onload","onClose","reportDialogClosedMessageHandler","data","removeEventListener","addEventListener","injectionPoint","head","body","appendChild","error","forceLoad","wrap","fn","ignoreDuration","_ref","to","captureUserFeedback","feedback","UNKNOWN_FUNCTION","createFrame","filename","func","lineno","colno","frame","function","in_app","chromeRegex","chromeEvalRegex","chromeStackLineParser","line","parts","exec","indexOf","subMatch","_extractSafariExtensi2","extractSafariExtensionDetails","geckoREgex","geckoEvalRegex","geckoStackLineParser","_extractSafariExtensi4","winjsRegex","winjsStackLineParser","opera10Regex","opera10StackLineParser","opera11Regex","opera11StackLineParser","defaultStackLineParsers","defaultStackParser","isSafariExtension","isSafariWebExtension","DEFAULT_ENVIRONMENT","WINDOW","ignoreOnError","shouldIgnoreOnError","ignoreNextOnError","setTimeout","before","wrapper","__sentry_wrapped__","e","sentryWrapped","args","wrappedArguments","map","arg","ex","addEventProcessor","mechanism","property","_oO","get","SpanStatus","getSpanStatusFromHttpCode","httpStatus","spanStatusfromHttpCode","setHttpStatus","setTag","setData","spanStatus","setStatus","applyScopeDataToEvent","cleanedExtra","cleanedTags","cleanedUser","cleanedContexts","applyDataToEvent","trace","rootSpan","dynamicSamplingContext","description","applySpanToEvent","applyFingerprintToEvent","mergedBreadcrumbs","applyBreadcrumbsToEvent","applySdkMetadataToEvent","mergeScopeData","mergeData","mergeAndOverwriteScopeData","prop","mergeVal","getRootSpan","_createForOfIteratorHelper","allowArrayLike","it","F","s","_e2","f","normalCompletion","didErr","step","_e3","return","getBucketKey","metricType","unit","stringifiedTags","entries","sort","a","b","localeCompare","simpleHash","rv","charCodeAt","serializeMetricBuckets","metricBucketItems","_step","out","_iterator","item","tagEntries","maybeTags","_ref2","join","metric","sanitizeUnit","sanitizeMetricKey","sanitizeTagKey","tagValueReplacements","sanitizeTagValue","reduce","acc","char","_step2","_iterator2","_ref4","search","replacement","getCharOrReplacement","sanitizeTags","unsanitizedTags","getBaseApiEndpoint","protocol","port","host","path","_getIngestEndpoint","projectId","_encodedAuth","sdkInfo","sentry_key","publicKey","sentry_version","sentry_client","version","getEnvelopeEndpointWithUrlEncodedAuth","tunnelOrOptions","tunnel","_metadata","sdk","getReportDialogEndpoint","dsnLike","dialogOptions","endpoint","encodedOptions","encodeURIComponent","States","resolvedSyncPromise","SyncPromise","rejectedSyncPromise","reason","_","executor","__init","__init2","__init3","__init4","_state","PENDING","_handlers","_resolve","_reject","onfulfilled","onrejected","_executeHandlers","val","onfinally","_this2","isRejected","_this3","_setResult","RESOLVED","_this4","REJECTED","_this5","state","_value","_this6","cachedHandlers","handler","DSN_REGEX","dsnToString","withPassword","pass","dsnFromString","str","match","_match$slice2","_match$slice2$","_match$slice2$2","pop","projectMatch","dsnFromComponents","console","components","makeDsn","find","component","isValidProtocol","isNaN","parseInt","validateDsn","objectToString","isError","wat","isInstanceOf","isBuiltin","className","isErrorEvent","isDOMError","isDOMException","isString","isParameterizedString","isPrimitive","isPlainObject","isEvent","Event","isElement","Element","isRegExp","isThenable","Boolean","isSyntheticEvent","base","isVueViewModel","__isVue","_isVue","DEFAULT_EVENT_TARGET","INTEGRATION_NAME","browserApiErrorsIntegration","XMLHttpRequest","eventTarget","requestAnimationFrame","setInterval","setupOnce","_wrapTimeFunction","_wrapRAF","_wrapXHR","eventTargetOption","_wrapEventTarget","TryCatch","original","_len","_key","originalCallback","handled","type","originalSend","xhr","xmlHttpRequestProps","wrapOptions","originalFunction","_len2","_key2","globalObject","proto","eventName","handleEvent","originalRemoveEventListener","wrappedEventHandler","originalEventHandler","MAX_ALLOWED_STRING_LENGTH","breadcrumbsIntegration","dom","fetch","history","sentry","setup","_getConsoleBreadcrumbHandler","_getDomBreadcrumbHandler","_getXhrBreadcrumbHandler","_getFetchBreadcrumbHandler","_getHistoryBreadcrumbHandler","on","_getSentryBreadcrumbHandler","Breadcrumbs","category","handlerData","componentName","keyAttrs","serializeAttribute","maxStringLength","element","_isEvent","logger","startTimestamp","endTimestamp","sentryXhrData","method","url","status_code","fetchData","response","_data","status","_hint","parsedLoc","location","href","parsedFrom","parsedTo","relative","globalHandlersIntegration","onerror","onunhandledrejection","stackTraceLimit","_installGlobalOnErrorHandler","globalHandlerLog","_installGlobalOnUnhandledRejectionHandler","GlobalHandlers","_getOptions","getOptions","attachStacktrace","msg","column","ERROR_TYPES_RE","groups","_enhanceEventWithInitialFrame","values","_eventFromIncompleteOnError","_getOptions2","detail","e2","_getUnhandledRejectionError","ev","ev0","ev0s","stacktrace","ev0sf","frames","fill","replacementFactory","wrapped","markFunctionWrapped","addNonEnumerableProperty","o_O","getOriginalFunction","__sentry_original__","urlEncode","convertToPlainObject","stack","getOwnProperties","newObj","serializeEventTarget","currentTarget","CustomEvent","extractedProps","extractExceptionKeysForMessage","maxLength","includedKeys","serialized","dropUndefinedKeys","inputValue","_dropUndefinedKeys","Map","memoizationMap","isPojo","memoVal","returnValue","set","_Object$keys","_memoVal","_returnValue","DEFAULT_KEY","linkedErrorsIntegration","limit","preprocessEvent","maxValueLength","LinkedErrors","httpContextIntegration","navigator","request","referrer","userAgent","headers","Referer","HttpContext","getActiveTransaction","maybeHub","getScope","getTransaction","extractTraceparentData","SDK_VERSION","_createClass","SpanRecorder","maxlen","_maxlen","spans","spanRecorder","Span","_objectSpread2","spanContext","_traceId","_spanId","_startTime","instrumenter","_attributes","setAttributes","origin","op","attributes","_name","parentSpanId","_parentSpanId","_sampled","sampled","_status","_endTime","exclusiveTime","_exclusiveTime","_measurements","measurements","updateName","string","startTime","endTime","setAttribute","traceFlags","childSpan","add","opStr","nameStr","idStr","logMessage","_logMessage","end","_getData","parent_span_id","span_id","start_timestamp","trace_id","_metrics_summary","profile_id","exclusive_time","getSpanJSON","hasData","hasAttributes","hasTracingEnabled","maybeOptions","__SENTRY_TRACING__","enableTracing","API_VERSION","parseFloat","Hub","isolationScope","assignedScope","assignedIsolationScope","_version","setClient","_stack","bindClient","_isolationScope","top","setupIntegrations","getStack","getClient","maybePromiseResult","pushScope","popScope","res","_lastEventId","_this$getStackTop","_ref$beforeBreadcrumb","beforeBreadcrumb","_ref$maxBreadcrumbs","finalBreadcrumb","emit","addBreadcrumb","setUser","getIsolationScope","setTags","setExtras","setExtra","setContext","_this$getStackTop2","oldHub","makeMain","integration","getIntegration","customSamplingContext","_callExtensionMethod","endSession","_sendSessionUpdate","getSession","setSession","_this$getStackTop3","_ref2$environment","environment","currentSession","sendDefaultPii","_this$getStackTop4","captureSession","carrier","getMainCarrier","__SENTRY__","extensions","registry","getHubFromCarrier","setHubOnCarrier","getCurrentHub","acs","getGlobalHub","hasHubOnCarrier","isOlderThan","runWithAsyncContext","DEFAULT_IGNORE_ERRORS","DEFAULT_IGNORE_TRANSACTIONS","inboundFiltersIntegration","processEvent","_shouldDropEvent","_mergeOptions","InboundFilters","internalOptions","allowUrls","denyUrls","ignoreErrors","disableErrorDefaults","ignoreTransactions","disableTransactionDefaults","ignoreInternal","_isSentryError","lastException","possibleMessages","_getPossibleEventMessages","some","_isIgnoredError","_isIgnoredTransaction","_getEventFilterUrl","_isDeniedUrl","_isAllowedUrl","_getLastValidUrl","oO","originalFunctionToString","SETUP_CLIENTS","WeakMap","functionToStringIntegration","Function","has","FunctionToString","dedupeIntegration","previousEvent","currentEvent","currentMessage","previousMessage","_isSameFingerprint","_isSameStacktrace","_isSameMessageEvent","previousException","_getExceptionFromEvent","currentException","_isSameExceptionEvent","Dedupe","currentFrames","_getFramesFromEvent","previousFrames","frameA","frameB","currentFingerprint","previousFingerprint","prepareEvent","_options$normalizeDep","normalizeDepth","_options$normalizeMax","normalizeMaxBreadth","prepared","dist","_options$maxValueLeng","applyClientOptions","integrationNames","applyIntegrationsMetadata","debugIdStackFramesCache","debugIdMap","_sentryDebugIds","cachedDebugIdStackFrameCache","debugIdStackParserCache","filenameDebugIdMap","debugIdStackTrace","parsedStack","cachedParsedStack","stackFrame","debug_id","applyDebugIds","finalScope","update","getFinalScope","clientEventProcessors","getEventProcessors","isolationData","finalScopeData","evt","abs_path","debug_meta","images","code_file","applyDebugMeta","maxBreadth","normalizeEvent","parseEventHintOrCaptureContext","hintIsScopeOrFunction","captureContextKeys","hintIsScopeContext","createSessionEnvelope","metadata","envelopeHeaders","sent_at","Date","toISOString","envelopeItem","createEventEnvelope","eventType","packages","enhanceEventWithSdkInfo","eventItem","_get","Reflect","receiver","_superPropBase","desc","_getPrototypeOf","_setPrototypeOf","p","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","construct","sham","Proxy","valueOf","_isNativeReflectConstruct","Super","NewTarget","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","Transaction","_Span","subClass","superClass","create","_inherits","_super","transactionContext","_hub","_trimEnd","trimEnd","incomingDynamicSamplingContext","_frozenDynamicSamplingContext","newName","setName","spanMetadata","sampleRate","newMetadata","timestampInS","_finishTransaction","recordDroppedEvent","finishedSpans","endTimes","prev","current","_getCapturedScopesOnS","capturedSpanScope","capturedSpanIsolationScope","transaction_info","uuid4","gbl","crypto","msCrypto","getRandomByte","Math","random","randomUUID","getRandomValues","typedArray","Uint8Array","c","getFirstException","getEventDescription","firstException","addExceptionTypeValue","addExceptionMechanism","newMechanism","currentMechanism","mergedData","addContextToFrame","lines","linesOfContext","maxLines","sourceLine","max","min","pre_context","context_line","post_context","checkOrSetAlreadyCaught","__sentry_captured__","arrayify","maybeArray","SPAN_METRIC_SUMMARY","getMetricStorageForSpan","getMetricSummaryJsonForSpan","storage","output","_ref2$","exportKey","summary","updateMetricSummaryOnActiveSpan","sanitizedName","bucketKey","bucketItem","count","sum","handleCallbackErrors","onError","onFinally","maybeHandlePromiseRejection","isGlobalObj","GLOBAL_OBJ","globalThis","getGlobalObject","getGlobalSingleton","creator","TRACING_DEFAULTS","idleTimeout","finalTimeout","heartbeatInterval","IDLE_TRANSACTION_FINISH_REASONS","IdleTransactionSpanRecorder","_SpanRecorder","_pushActivity","_popActivity","transactionSpanId","originalEnd","rest","IdleTransaction","_Transaction","_super2","_idleHub","_idleTimeout","_finalTimeout","_heartbeatInterval","_onScope","delayAutoFinishUntilSignal","activities","_heartbeatCounter","_finished","_idleTimeoutCanceledPermanently","_beforeFinishCallbacks","_finishReason","_autoFinishAllowed","setSpan","_restartIdleTimeout","endTimestampInS","_spanToJSON","spanStartedBeforeTransactionFinish","timeoutWithMarginOfError","spanEndedBeforeFinalTimeout","stringifiedSpan","_pingHeartbeat","restartOnChildSpanChange","_idleTimeoutID","clearTimeout","cancelIdleTimeout","heartbeatString","_prevHeartbeatString","_this7","_beat","sampleTransaction","samplingContext","Number","tracesSampler","parentSampled","tracesSampleRate","isValidSampleRate","rate","htmlTreeAsString","elem","nextStr","currentElem","MAX_TRAVERSE_HEIGHT","height","separator","sepLength","_htmlElementAsString","parentNode","reverse","el","classes","attr","tagName","HTMLElement","dataset","toLowerCase","keyAttrPairs","keyAttr","getAttribute","keyAttrPair","allowedAttrs","getLocationHref","getDomElement","selector","querySelector","getComponentName","DEBUG_BUILD","__SENTRY_DEBUG__","TRACE_FLAG_NONE","TRACE_FLAG_SAMPLED","spanToTraceContext","_span$spanContext","spanToJSON","spanToTraceHeader","_span$spanContext2","spanIsSampled","spanTimeInputToSeconds","ensureTimestampInSeconds","getTime","spanIsSpanClass","makeXHRTransport","header","onreadystatechange","readyState","statusCode","getResponseHeader","open","setRequestHeader","send","initAndBind","clientClass","debug","enable","initialScope","setCurrentClient","initializeClient","createUserFeedbackEnvelope","createUserFeedbackEnvelopeItem","errorsInstrumented","registerErrorInstrumentation","errorCallback","activeTransaction","tag","cachedFetchImpl","getNativeFetchImplementation","bind","fetchImpl","sandbox","hidden","contentWindow","removeChild","clearCachedFetchImplementation","makeFetchTransport","nativeFetch","pendingBodySize","pendingCount","makeRequest","requestSize","requestOptions","referrerPolicy","keepalive","fetchOptions","_BaseClient","BrowserClient","sdkSource","SENTRY_SDK_SOURCE","visibilityState","_flushOutcomes","_isEnabled","envelope","getSdkMetadata","_sendEnvelope","platform","outcomes","_clearOutcomes","_dsn","discarded_events","clientReportItem","parseUrl","query","fragment","hash","stripUrlQueryAndFragment","urlPath","installedIntegrations","getIntegrationsToSetup","userIntegrations","isDefaultInstance","finalIntegrations","integrationsByName","currentInstance","existingInstance","k","filterDuplicates","debugIndex","findIndex","debugInstance","splice","integrationIndex","setupIntegration","afterSetupIntegrations","afterAllSetup","_callback","assign","addIntegration","convertIntegrationFnToClass","defineIntegration","parseStackFrames","exceptionFromError","Integrations","handlers","instrumented","addHandler","maybeInstrument","instrumentFn","triggerHandlers","typeHandlers","PREFIX","CONSOLE_LEVELS","originalConsoleMethods","consoleSandbox","wrappedFuncs","wrappedLevels","originalConsoleMethod","enabled","disable","isEnabled","_GLOBAL_OBJ$console","makeLogger","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE","SEMANTIC_ATTRIBUTE_SENTRY_OP","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","SEMANTIC_ATTRIBUTE_PROFILE_ID","traceHeaders","getSpan","_startTransaction","configInstrumenter","transactionInstrumenter","isRecording","initSpanRecorder","_experiments","maxSpans","startIdleTransaction","onScope","addTracingExtensions","startTransaction","createMetricEnvelope","payload","createMetricEnvelopeItem","ALREADY_SEEN_ERROR","BaseClient","_integrations","_integrationsInitialized","_numProcessing","_outcomes","_hooks","_transport","transportOptions","_process","eventFromException","_captureEvent","eventMessage","is","promisedEvent","eventFromMessage","sendSession","timeout","metricsAggregator","flush","_isClientDoneProcessing","clientFinished","transportFlushed","close","eventProcessor","forceInitialize","_setupIntegrations","integrationId","getIntegrationByName","integrationName","isAlreadyInstalled","env","textEncoder","promise","sendResponse","eventOrCount","metricsEnvelope","hook","crashed","errored","exceptions","sessionNonTerminal","errors","ticked","interval","clearInterval","getPropagationContext","dsc","_processEvent","finalEvent","sentryError","logLevel","isTransaction","isTransactionEvent","beforeSendLabel","dataCategory","_prepareEvent","__sentry__","beforeSend","beforeSendTransaction","spanCountBefore","spanCountBeforeProcessing","processBeforeSend","beforeSendResult","invalidValueError","_validateBeforeSendResult","processedEvent","spanCount","_updateSessionFromEvent","droppedSpanCount","transactionInfo","sendEvent","_this8","_key$split2","quantity","filenameMetadataMap","parsedStacks","Set","getMetadataForUrl","parser","_sentryModuleMetadata","ensureMetadataStacksAreParsed","moduleMetadataIntegration","_step3","_iterator3","module_metadata","stripMetadataFromStackFrames","addMetadataToStackFrames","ModuleMetadata","makePromiseBuffer","buffer","remove","task","$","taskProducer","drain","counter","capturedSetTimeout","createTransport","bufferSize","rateLimits","filteredEnvelopeItems","getEventForEnvelopeItem","filteredEnvelope","recordEnvelopeLoss","__sentry__baseTransport__","BAGGAGE_HEADER_NAME","SENTRY_BAGGAGE_KEY_PREFIX","SENTRY_BAGGAGE_KEY_PREFIX_REGEX","baggageHeaderToDynamicSamplingContext","baggageHeader","baggageObject","curr","currBaggageObject","baggageHeaderToObject","dynamicSamplingContextToSentryBaggageHeader","_ref7","currentIndex","_ref8","objectKey","objectValue","baggageEntry","newBaggageHeader","objectToBaggageHeader","_ref3","dscKey","dscValue","keyOrValue","decodeURIComponent","trim","_ref5","_ref6","supportsFetch","Headers","Request","Response","isNativeFetch","supportsNativeFetch","EdgeRuntime","doc","supportsReportingObserver","TRACEPARENT_REGEXP","RegExp","traceparent","matches","tracingContextFromHeaders","sentryTrace","baggage","traceparentData","propagationContextFromHeaders","generateSentryTraceHeader","sampledString","truncate","snipLine","newLine","lineLength","start","safeJoin","delimiter","isMatchingPattern","pattern","requireExactStringMatch","stringMatchesSomePattern","testString","patterns","applySdkMetadata","names","asyncGeneratorStep","gen","_next","_throw","info","Promise","_asyncToGenerator","eventFromEnvelope","types","overrideDsn","makeMultiplexedTransport","matcher","fallbackTransport","otherTransports","getTransport","validatedDsn","_send","mark","_callee","_context","abrupt","stop","_x","makeOverrideReleaseTransport","_send2","_callee2","transports","results","_context2","getEvent","eventTypes","t","all","sent","_flush","_callee3","promises","_context3","t0","t1","t2","t3","finish","every","r","_x2","_x3","parameterize","strings","formatted","raw","__sentry_template_string__","__sentry_template_values__","setMeasurement","isSentryRequestUrl","hubOrClient","isHub","checkDsn","removeTrailingSlash","checkTunnel","createSpanEnvelope","items","createSpanItem","START_DELAY","makeOfflineTransport","flushTimer","store","createStore","retryDelay","shouldQueue","shouldStore","flushIn","delay","found","catch","unref","flushWithBackOff","insert","flushAtStartup","_METRIC_MAP","SET_METRIC_TYPE","CounterMetric","GaugeMetric","_last","_min","_max","_sum","_count","DistributionMetric","first","SetMetric","size","METRIC_MAP","BrowserMetricsAggregator","_buckets","_interval","unsanitizedName","unsanitizedUnit","maybeFloatTimestamp","time","floor","previousWeight","weight","captureAggregateMetrics","metricBuckets","clear","metricsAggregatorIntegration","addToMetricsAggregator","_client$getOptions","metricTags","metrics","increment","distribution","gauge","MetricsAggregator","memoBuilder","hasWeakSet","WeakSet","inner","delete","_wrapNativeSuper","Class","_cache","Wrapper","_construct","Parent","SentryError","_Error","isBrowserBundle","__SENTRY_BROWSER_BUNDLE__","getSDKSource","isNodeEnv","process","_optionalChain","ops","lastAccessLHS","isBrowser","bindReporter","reportAllChanges","prevValue","delta","forceReport","__WEB_VITALS_POLYFILL__","performance","getEntriesByType","timing","navigation","navigationEntry","entryType","navigationStart","navEntry","activationStart","navigationType","prerendering","rating","now","opts","PerformanceObserver","supportedEntryTypes","po","list","getEntries","observe","buffered","cb","once","onHiddenOrPageHide","firstHiddenTime","getVisibilityWatcher","timeStamp","interactionCountEstimate","minKnownInteractionId","maxKnownInteractionId","updateEstimate","interactionId","interactionCount","longestInteractionList","longestInteractionMap","processEntry","entry","minLongestInteraction","existingInteraction","duration","latency","interaction","onReport","durationThreshold","report","handleEntries","prevEntry","candidateInteractionIndex","inp","takeRecords","reportedMetricIDs","whenReady","responseStart","_previousCls","_previousFid","_previousLcp","_previousTtfb","_previousInp","addLcpInstrumentationHandler","stopOnCallback","addMetricObserver","instrumentLcp","addPerformanceInstrumentationHandler","instrumentPerformanceObserver","getCleanupCallback","instrumentCls","sessionValue","sessionEntries","hadRecentInput","firstSessionEntry","lastSessionEntry","stopListening","instrumentFid","visibilityWatcher","handleEntry","processingStart","disconnect","lastEntry","capture","instrumentTtfb","instrumentInp","previousValue","NodeType$1","REPLAY_SESSION_KEY","REPLAY_EVENT_NAME","UNABLE_TO_SEND_REPLAY","RETRY_BASE_INTERVAL","NETWORK_BODY_MAX_SIZE","CONSOLE_ARG_MAX_SIZE","REPLAY_MAX_EVENT_BUFFER_SIZE","MAX_REPLAY_DURATION","_optionalChain$5","_value2","isShadowRoot","_2","shadowRoot","isNativeShadowDom","stringifyStylesheet","rules","cssRules","cssText","stringifyRule","rule","importStringified","cssStringified","regex","isCSSImportRule","styleSheet","statement","layerName","supportsText","media","mediaText","escapeImportStatement","isCSSStyleRule","selectorText","NodeType","Mirror","idNodeMap","nodeMetaMap","lhs","rhsFn","_3","getMeta","_4","_5","getId","childNodes","childNode","removeNodeFromMap","node","meta","oldNode","getNode","shouldMaskInput","maskInputOptions","maskInputValue","isMasked","maskInputFn","text","repeat","toUpperCase","ORIGINAL_ATTRIBUTE_NAME","getInputType","hasAttribute","getInputValue","canvasService","canvasCtx","_id","tagNameRegex","genId","URL_IN_CSS_REF","URL_PROTOCOL_MATCH","URL_WWW_MATCH","DATA_URI","absoluteToStylesheet","quote1","path1","quote2","path2","path3","filePath","maybeQuote","part","SRCSET_NOT_SPACES","SRCSET_COMMAS_OR_SPACES","absoluteToDoc","attributeValue","isSVGElement","ownerSVGElement","getHref","transformAttribute","maskAttributeFn","pos","collectCharacters","regEx","chars","descriptorsStr","inParens","charAt","getAbsoluteSrcsetString","ignoreAttribute","distanceToMatch","matchPredicate","distance","nodeType","ELEMENT_NODE","createMatchPredicate","eIndex","classList","elementClassMatchesRegex","needMaskingText","maskTextClass","maskTextSelector","unmaskTextClass","unmaskTextSelector","maskAllText","parentElement","autocomplete","maskDistance","unmaskDistance","serializeNode","mirror","blockClass","blockSelector","unblockSelector","inlineStylesheet","_options$maskInputOpt","maskTextFn","_options$dataURLOptio","dataURLOptions","inlineImages","recordCanvas","keepIframeSrcFn","_options$newlyAddedEl","newlyAddedElement","rootId","hasNode","docId","getRootId","DOCUMENT_NODE","compatMode","Document","DOCUMENT_TYPE_NODE","DocumentType","publicId","systemId","isCustomElement","_options$maskInputOpt2","_options$dataURLOptio2","_options$newlyAddedEl2","needBlock","contains","_isBlockedElement","HTMLFormElement","processedTagName","getValidTagName","stylesheet","styleSheets","rel","_cssText","sheet","innerText","textContent","checked","forceMask","selected","__context","canvas","ctx","getContext","x","width","y","getImageData","originalGetImageData","Uint32Array","pixel","is2DCanvasBlank","rr_dataURL","toDataURL","quality","canvasDataURL","blankCanvas","image","oldValue","recordInlineImage","naturalWidth","naturalHeight","drawImage","currentSrc","removeAttribute","complete","rr_mediaState","paused","rr_mediaCurrentTime","currentTime","scrollLeft","rr_scrollLeft","scrollTop","rr_scrollTop","_n$getBoundingClientR","getBoundingClientRect","class","rr_width","rr_height","contentDocument","rr_src","customElements","isSVG","isCustom","serializeElementNode","TEXT_NODE","parentTagName","isStyle","isScript","isTextarea","nextSibling","previousSibling","_6","_7","_8","textarea","Text","serializeTextNode","CDATA_SECTION_NODE","CDATA","COMMENT_NODE","Comment","lowerIfExists","maybeAttr","serializeNodeWithId","_options$skipChild","skipChild","_options$inlineStyles","_options$maskInputOpt3","slimDOMOptions","_options$dataURLOptio3","_options$inlineImages","_options$recordCanvas","onSerialize","onIframeLoad","_options$iframeLoadTi","iframeLoadTimeout","onStylesheetLoad","_options$stylesheetLo","stylesheetLoadTimeout","_options$keepIframeSr","_options$newlyAddedEl3","_options$preserveWhit","preserveWhiteSpace","_serializedNode","sn","comment","as","endsWith","headFavicon","headMetaDescKeywords","headMetaSocial","headMetaRobots","headMetaHttpEquiv","headMetaAuthorship","headMetaVerification","slimDOMExcluded","serializedNode","recordChild","isShadowHost","headWhitespace","bypassOptions","_Array$from","serializedChildNode","isElement$1","_i2","_Array$from2","_serializedChildNode","isShadow","iframeEl","listener","win","fired","blankUrl","timer","onceIframeLoaded","iframeDoc","serializedIframeNode","link","styleSheetLoadTimeout","styleSheetLoaded","onceStylesheetLoaded","serializedLinkNode","_ref3$mirror","_ref3$blockClass","_ref3$blockSelector","_ref3$unblockSelector","_ref3$maskAllText","_ref3$maskTextClass","_ref3$unmaskTextClass","_ref3$maskTextSelecto","_ref3$unmaskTextSelec","_ref3$inlineStyleshee","_ref3$inlineImages","_ref3$recordCanvas","_ref3$maskAllInputs","maskAllInputs","_ref3$slimDOM","slimDOM","_ref3$keepIframeSrcFn","color","date","month","number","range","tel","week","select","_optionalChain$4","_value3","passive","DEPARTED_MIRROR_ACCESS_WARNING","_mirror","reset","throttle$1","wait","previous","_len3","_key3","leading","remaining","clearTimeout$1","trailing","setTimeout$1","hookSetter","d","isRevoked","patch","__rrweb_original__","nowTimestamp","getWindowScroll","left","scrollingElement","pageXOffset","documentElement","pageYOffset","_9","_10","_11","_12","_13","_14","getWindowHeight","innerHeight","clientHeight","getWindowWidth","innerWidth","clientWidth","closestElementOfNode","isBlocked","checkAncestors","blockedPredicate","isUnblocked","blockDistance","unblockDistance","isIgnored","isAncestorRemoved","legacy_isTouchEvent","changedTouches","polyfill","NodeList","DOMTokenList","Node","_len4","_key4","isSerializedIframe","nodeName","isSerializedStylesheet","hasShadowRoot","_18","StyleSheetMirror","styleIDMap","idStyleMap","newId","getShadowHost","shadowHost","_19","getRootNode","_20","_21","DOCUMENT_FRAGMENT_NODE","shadowHostInDom","ownerDocument","rootShadowHost","getRootShadowHost","inDom","cachedImplementations","getImplementation","cached","impl","EventType","EventType2","IncrementalSource","IncrementalSource2","MouseInteractions","MouseInteractions2","PointerTypes","PointerTypes2","_optionalChain$3","_value4","_len5","_key5","isNodeInLinkedList","DoubleLinkedList","tail","position","__ln","_current","moveKey","parentId","MutationBuffer","frozen","locked","texts","attributeMap","removes","mapRemoves","movedMap","addedSet","movedSet","droppedSet","processMutations","mutations","processMutation","adds","addedIds","addList","getNextId","ns","nextId","pushAdd","addNode","currentN","iframeManager","addIframe","stylesheetManager","trackLinkElement","shadowDomManager","addShadowRoot","iframe","childSn","attachIframe","observeAttachShadow","attachLinkElement","shift","isParentRemoved","isAncestorInSet","candidate","tailNode","_node","_parentId","unhandledNode","removeNode","attribute","style","diffAsStr","styleDiff","unchangedAsStr","_unchangedStyles","mutationCb","m","attributeName","_value5","isInputMasked","unattachedDoc","implementation","createHTMLDocument","old","_i3","_Array$from3","pname","newValue","getPropertyValue","newPriority","getPropertyPriority","_i4","_Array$from4","_pname","addedNodes","genAdds","removedNodes","nodeId","isSerialized","deepDelete","processedNodeManager","inOtherBuffer","targetId","childN","canvasManager","freeze","unfreeze","lock","unlock","addsSet","_isParentRemoved","_isAncestorInSet","registerErrorHandler","unregisterErrorHandler","callbackWrapper","_optionalChain$2","_value6","_len6","_key6","mutationBuffers","getEventTarget","composedPath","initMutationObserver","rootEl","mutationBuffer","mutationObserverCtor","MutationObserver","__rrMutationObserver","angularZoneSymbol","Zone","__symbol__","observer","onMutation","attributeOldValue","characterData","characterDataOldValue","childList","subtree","initMoveObserver","mousemoveCb","sampling","mousemove","timeBaseline","threshold","callbackThreshold","mousemoveCallback","positions","wrappedCb","totalOffset","timeOffset","updatePosition","clientX","clientY","DragEvent","Drag","MouseEvent","MouseMove","TouchMove","h","initMouseInteractionObserver","mouseInteractionCb","mouseInteraction","disableMap","currentPointerType","eventKey","pointerType","thisEventKey","Mouse","Touch","Pen","MouseDown","MouseUp","Click","getHandler","PointerEvent","TouchStart","TouchEnd","initScrollObserver","scrollCb","defaultView","scrollLeftTop","scroll","initViewportResizeObserver","_ref9","viewportResizeCb","lastH","lastW","INPUT_TAGS","lastInputValueMap","initInputObserver","_ref10","inputCb","ignoreClass","ignoreSelector","userTriggeredOnInput","eventHandler","userTriggered","isTrusted","isChecked","cbWithDedup","querySelectorAll","_text","v","lastInputValue","currentWindow","propertyDescriptor","HTMLInputElement","hookProperties","HTMLSelectElement","HTMLTextAreaElement","HTMLOptionElement","getNestedCSSRulePositions","childRule","hasNestedCSSRule","parentRule","CSSGroupingRule","CSSMediaRule","CSSSupportsRule","CSSConditionRule","unshift","parentStyleSheet","_index","recurse","getIdAndStyleId","styleMirror","styleId","ownerNode","initStyleSheetObserver","_ref11","_ref12","styleSheetRuleCb","CSSStyleSheet","insertRule","thisArg","argumentsList","_argumentsList","_getIdAndStyleId","replaceSync","deleteRule","_getIdAndStyleId2","_getIdAndStyleId3","_getIdAndStyleId4","supportedNestedCSSRuleTypes","canMonkeyPatchNestedCSSRule","unmodifiedFunctions","_ref13","_ref14","typeKey","_argumentsList5","_getIdAndStyleId5","_getIdAndStyleId6","_ref15","_ref16","initAdoptedStyleSheetObserver","_ref17","hostId","patchTarget","ShadowRoot","originalPropertyDescriptor","sheets","_15","_16","adoptStyleSheets","initStyleDeclarationObserver","_ref18","_ref19","styleDeclarationCb","ignoreCSSAttributes","setProperty","CSSStyleDeclaration","_argumentsList7","priority","_getIdAndStyleId7","_17","removeProperty","_getIdAndStyleId8","initMediaInteractionObserver","_ref20","mediaInteractionCb","volume","muted","playbackRate","initFontObserver","_ref21","fontCb","fontMap","originalFontFace","FontFace","family","descriptors","fontFace","fontSource","restoreHandler","fonts","initSelectionObserver","param","selectionCb","collapsed","updateSelection","selection","getSelection","isCollapsed","ranges","rangeCount","getRangeAt","startContainer","startOffset","endContainer","endOffset","initCustomElementObserver","_ref22","customElementCb","define","initObservers","_step4","mutationObserver","mousemoveHandler","mouseInteractionHandler","scrollHandler","viewportResizeHandler","inputHandler","mediaInteractionHandler","styleSheetObserver","adoptedStyleSheetObserver","styleDeclarationObserver","fontObserver","collectFonts","selectionObserver","customElementObserver","pluginHandlers","_iterator4","plugins","plugin","CrossOriginIframeMirror","generateIdFn","iframeIdToRemoteIdMap","iframeRemoteIdToIdMap","remoteId","idToRemoteMap","remoteToIdMap","idToRemoteIdMap","getIdToRemoteIdMap","remoteIdToIdMap","getRemoteIdToIdMap","ids","_this9","getRemoteId","_optionalChain$1","_value7","_len7","_key7","_takeFullSnapshot","IframeManagerNoop","crossOriginIframeMirror","crossOriginIframeRootIdMap","IframeManager","iframes","crossOriginIframeMap","wrappedEmit","recordCrossOriginIframes","crossOriginIframeStyleMirror","generateId","handleMessage","loadListener","isAttachIframe","adoptedStyleSheets","crossOriginMessageEvent","transformedEvent","transformCrossOriginEvent","isCheckout","_this10","FullSnapshot","replaceIdOnNode","patchRootIdOnNode","IncrementalSnapshot","Mutation","Meta","Load","DomContentLoaded","Plugin","Custom","replaceIds","ViewportResize","MediaInteraction","MouseInteraction","Scroll","CanvasMutation","Input","StyleSheetRule","StyleDeclaration","replaceStyleIds","Font","Selection","AdoptedStyleSheet","styles","iframeMirror","_step5","_iterator5","getIds","_this11","child","_this12","ShadowDomManagerNoop","ShadowDomManager","shadowDoms","restoreHandlers","patchAttachShadow","_this13","iframeElement","manager","option","CanvasManagerNoop","StylesheetManager","trackedLinkElements","adoptedStyleSheetCb","linkEl","trackStylesheetInLinkElement","_step6","adoptedStyleSheetData","styleIds","_iterator6","CSSRule","ProcessedNodeManager","nodeMap","loop","periodicallyClear","_this14","onRequestAnimationFrame","thisBuffer","buffers","record","checkoutEveryNms","checkoutEveryNth","_options$blockClass","_options$blockSelecto","_options$unblockSelec","_options$ignoreClass","_options$ignoreSelect","_options$maskAllText","_options$maskTextClas","_options$unmaskTextCl","_options$maskTextSele","_options$unmaskTextSe","_options$inlineStyles2","_maskInputOptions","_slimDOMOptions","_options$maxCanvasSiz","maxCanvasSize","packFn","_options$sampling","_options$dataURLOptio4","mousemoveWait","_options$recordCanvas2","_options$recordCrossO","_options$recordAfter","recordAfter","_options$userTriggere","_options$collectFonts","_options$inlineImages2","_options$keepIframeSr2","_options$ignoreCSSAtt","errorHandler","getCanvasManager","inEmittingFrame","parent","passEmitsToParent","lastFullSnapshotEvent","radio","checkbox","incrementalSnapshotCount","_step7","_iterator7","isFrozen","buf","postMessage","exceedCount","exceedTime","takeFullSnapshot","_step8","wrappedMutationEmit","wrappedScrollEmit","wrappedCanvasMutationEmit","wrappedAdoptedStyleSheetEmit","__RRWEB_EXCLUDE_IFRAME__","_iterator8","getMirror","nodeMirror","_getCanvasManager","__RRWEB_EXCLUDE_SHADOW_DOM__","initialOffset","canvasMutationCb","CustomElement","addLoadListener","destroy","getCanvasManagerFn","timestampToMs","timestampToS","addBreadcrumbEvent","replay","triggerUserActivity","checkAndHandleExpiredSession","addUpdate","throttledAddEvent","getClosestInteractive","closest","getClickTargetNode","getTargetNode","isEventWithTarget","onWindowOpen","originalWindowOpen","_len8","_key8","ClickDetector","slowClickConfig","_addBreadcrumbEvent","_lastMutation","_lastScroll","_clicks","_timeout","_threshold","_scollTimeout","scrollTimeout","_replay","_ignoreSelector","_this15","cleanupWindowOpen","nowInSeconds","_teardown","_checkClickTimeout","SLOW_CLICK_TAGS","ignoreElement","isClickBreadcrumb","newClick","clickBreadcrumb","clickCount","click","abs","_scheduleCheckClicks","_handleMultiClick","_getClicks","_this16","timedOutClicks","mutationAfter","scrollAfter","_i5","_timedOutClicks","_generateBreadcrumbs","hadScroll","hadMutation","isSlowClick","timeAfterClickMs","endReason","route","getCurrentRoute","_breadcrumb","_this17","_checkClicks","updateClickDetectorForRecordingEvent","clickDetector","isIncrementalEvent","registerMutation","registerScroll","isIncrementalMouseInteraction","_event$data","registerClick","createBreadcrumb","ATTRIBUTES_TO_RECORD","getAttributesToRecord","normalizedKey","handleDomListener","_getDomTarget","isClick","getDomTarget","getBaseDomBreadcrumb","handleDom","altKey","metaKey","ctrlKey","shiftKey","handleClick","handleKeyboardEvent","updateUserActivity","isContentEditable","isInputElement","hasModifierKey","isCharacterKey","baseBreadcrumb","getKeyboardBreadcrumb","ENTRY_TYPES","resource","initiatorType","responseEnd","decodedBodySize","encodedBodySize","responseStatus","transferSize","getAbsoluteTime","paint","domComplete","domContentLoadedEventStart","domContentLoadedEventEnd","domInteractive","loadEventStart","loadEventEnd","redirectCount","createPerformanceEntry","timeOrigin","setupPerformanceObserver","addPerformanceEntry","performanceEntries","onEntries","_ref23","clearCallbacks","_ref24","replayPerformanceEntries","getLargestContentfulPaint","clearCallback","logInfo","shouldAddBreadcrumb","addLogBreadcrumb","logInfoNextTick","EventBufferSizeExceededError","EventBufferArray","events","_totalSize","hasCheckout","_addEvent2","eventSize","_this18","eventsRet","WorkerHandler","worker","_worker","_this19","_ensureReadyPromise","_ref25","success","terminate","_this20","_getAndIncrementId","_ref26","EventBufferCompressionWorker","_earliestTimestamp","_finishRequest2","ensureReady","_sendEventToWorker","_finishRequest","EventBufferProxy","_fallback","_compression","_used","_ensureWorkerIsLoadedPromise","_ensureWorkerIsLoaded","_switchToCompressionWorker2","_ensureWorkerIsLoaded2","_finish","hasEvents","getEarliestTimestamp","addEvent","_context4","ensureWorkerIsLoaded","_callee4","_context5","_switchToCompressionWorker","_callee5","_this$_fallback","addEventPromises","_iterator9","_step9","_context6","createEventBuffer","_ref27","useCompression","customWorkerUrl","workerUrl","Worker","__SENTRY_EXCLUDE_REPLAY_WORKER__","Blob","URL","createObjectURL","_getWorkerUrl","_loadWorker","hasSessionStorage","sessionStorage","clearSession","removeItem","deleteSession","isSampled","makeSession","started","lastActivity","segmentId","previousSessionId","saveSession","setItem","getSessionSampleType","sessionSampleRate","allowBuffering","createSession","_ref28","_ref28$stickySession","stickySession","_ref29","isExpired","initialTime","expiry","targetTime","isSessionExpired","_ref30","maxReplayDuration","sessionIdleExpire","_ref30$targetTime","shouldRefreshSession","_ref31","loadOrCreateSession","_ref32","sessionOptions","traceInternals","existingSession","sessionStringFromStorage","getItem","sessionObj","parse","fetchSession","addEventSync","shouldAddEvent","_addEvent","_x4","_addEvent3","_callee11","replayOptions","eventAfterPossibleCallback","_context12","eventBuffer","recordingMode","maybeApplyCallback","beforeAddRecordingEvent","isPaused","timestampInMs","timeouts","sessionIdlePause","initialTimestamp","isCustomEvent","isReplayEvent","isFeedbackEvent","handleAfterSendEvent","enforceStatusCode","isBaseTransportSend","replayContext","traceIds","handleTransactionEvent","errorIds","replayId","beforeErrorSampling","sendBufferedReplayOrFlush","handleErrorEvent","handleBeforeSendEvent","exceptionValue","handleHydrationError","isRrwebError","__rrweb__","addFeedbackBreadcrumb","feedbackId","shouldSampleForBufferEvent","errorSampleRate","createPerformanceSpans","_ref33","handleHistorySpanListener","handleHistory","urls","addNetworkBreadcrumb","shouldFilterRequest","handleXhrSpanListener","handleXhr","getBodySize","encode","URLSearchParams","FormData","formDataStr","_serializeFormData","ArrayBuffer","byteLength","parseContentLengthHeader","getBodyString","mergeWarning","warning","_meta","warnings","newMeta","existingWarnings","makeNetworkReplayBreadcrumb","buildSkippedNetworkRequestOrResponse","bodySize","buildNetworkRequestOrResponse","_normalizeNetworkBody","exceedsSizeLimit","isProbablyJson","last","truncatedBody","e3","normalizeNetworkBody","normalizedBody","getAllowedHeaders","allowedHeaders","filteredHeaders","formData","urlMatches","fullUrl","baseURI","fixedUrl","getFullUrl","_captureFetchBreadcrumbToReplay","_callee12","_context13","_prepareFetchData","_x8","_x9","_x10","_prepareFetchData2","_callee13","_hint$startTimestamp2","_hint$endTimestamp2","_breadcrumb$data2","_breadcrumb$data2$sta","requestBodySize","responseBodySize","captureDetails","_context14","request_body_size","response_body_size","networkDetailAllowUrls","networkDetailDenyUrls","_getRequestInfo","_getResponseInfo","_ref34","networkCaptureBodies","networkRequestHeaders","fetchArgs","getHeadersFromOptions","getRequestHeaders","_getBodyString2","_getFetchRequestArgBody","bodyStr","_x11","_x12","_x13","_x14","_getResponseInfo2","_callee14","_ref35","networkResponseHeaders","_yield$_parseFetchRes","_yield$_parseFetchRes2","bodyText","_context15","getAllHeaders","_parseFetchResponseBody","getResponseData","_ref36","_x15","_parseFetchResponseBody2","_callee15","_context16","_tryCloneResponse","_tryGetResponseText","allHeaders","_x16","_getResponseText2","_getResponseText","txt","finally","_callee16","_context17","_captureXhrBreadcrumbToReplay","_callee17","_context18","_prepareXhrData","enrichXhrBreadcrumb","reqSize","resSize","responseType","_getBodySize","_hint$startTimestamp","_hint$endTimestamp","_breadcrumb$data","_breadcrumb$data$stat","xhrInfo","request_headers","getAllResponseHeaders","_line$split2","getResponseHeaders","_ref38","requestBody","requestWarning","_ref39","responseText","outerHTML","_parseXhrResponse","_getXhrResponseBody","_ref40","responseBody","responseWarning","handleNetworkBreadcrumbs","TextEncoder","_replay$getOptions2","_isXhrBreadcrumb","_isXhrHint","_x17","_x18","_x19","captureXhrBreadcrumbToReplay","_isFetchBreadcrumb","_isFetchHint","enrichFetchBreadcrumb","_x5","_x6","_x7","captureFetchBreadcrumbToReplay","beforeAddNetworkBreadcrumb","handleFetch","handleFetchSpanListener","_LAST_BREADCRUMB","handleScopeListener","newBreadcrumb","getLastBreadcrumb","isBreadcrumbWithCategory","isTruncated","normalizedArgs","normalizedArg","normalizeConsoleBreadcrumb","handleScope","addGlobalListeners","addScopeListener","afterSendHandler","replay_id","getSessionId","captureExceptions","handleGlobalEventListener","hasHooks","lastTransaction","feedbackEvent","includeReplay","addMemoryEntry","_x20","_addMemoryEntry","_callee18","_context19","createMemoryEntry","memory","memoryEntry","jsHeapSizeLimit","totalJSHeapSize","usedJSHeapSize","getHandleRecordingEmit","hadFirstEvent","_isCheckout","setInitialState","shouldRecordCanvas","isRecordingCanvas","useCompressionOption","blockAllMedia","networkDetailHasUrls","networkRequestHasHeaders","networkResponseHasHeaders","createOptionsEvent","addSettingsEvent","earliestEvent","createReplayEnvelope","replayEvent","recordingData","prepareRecordingData","_ref41","payloadWithSequence","replayHeaders","sequence","prepareReplayEvent","_x21","_prepareReplayEvent","_callee19","_ref42","eventHint","preparedEvent","_ref52","_context20","sendReplayRequest","_x22","_sendReplayRequest","_callee20","_ref43","segment_id","eventContext","preparedRecordingData","baseEvent","_context21","replay_start_timestamp","error_ids","trace_ids","replay_type","cause","TransportStatusCodeError","RateLimitError","_Error2","_Error3","_super3","_this21","sendReplay","_x23","_sendReplay","_callee22","replayData","retryConfig","_args22","_context23","_retryCount","_callee21","_context22","THROTTLED","SKIPPED","ReplayContainer","_ref44","maxCount","durationSeconds","_cleanup","_getTotalCount","isThrottled","_this22","recordingOptions","__init5","__init6","_lastActivity","_isPaused","_hasInitializedCoreListeners","initialUrl","_recordingOptions","_debouncedFlush","callbackReturnValue","timerId","maxTimerId","maxWait","invokeFunc","cancelTimers","debounced","cancel","debounce","flushMinDelay","flushMaxDelay","_throttledAddEvent","wasThrottled","_this$getOptions","slowClickTimeout","slowClickIgnoreSelectors","_runFlush2","_refreshSession2","_sendBufferedReplayOrFlush","_stop","_canvas","_this$_options","_initializeSessionForSampling","_initializeRecording","_handleException","_updateUserActivity","canvasOptions","_stopRecording","_onMutationHandler","_callee6","_ref45","_ref45$forceFlush","forceFlush","_args6","_context7","_removeListeners","stopRecording","force","_checkSession","startRecording","_callee7","_ref46","_ref46$continueRecord","continueRecording","activityTime","hasStoppedRecording","_args7","_context8","flushImmediate","_updateSessionActivity","_maybeSaveSession","cbResult","resume","pause","pathname","_clearContext","_this23","_addListeners","_refreshSession","_callee8","_context9","initializeSampling","_x24","_handleVisibilityChange","_handleWindowBlur","_handleWindowFocus","_handleKeyboardEvent","addListeners","_performanceCleanupCallback","removeListeners","_this24","_doChangeToForegroundTasks","_doChangeToBackgroundTasks","_this25","_this26","_this27","_createCustomBreadcrumb","conditionalFlush","_this28","_callee9","_context10","_addPerformanceEntries","_updateInitialTimestampFromEventBuffer","_popEventContext","_this29","_callee10","_ref48","_ref48$force","tooShort","tooLong","_args10","_context11","minReplayDuration","_flushLock","_runFlush","_this30","mutationLimit","overMutationLimit","mutationBreadcrumbLimit","getOption","selectors","defaultSelectors","deprecatedClassOption","deprecatedSelectorOption","deprecatedSelectors","allSelectors","getPrivacyOptions","_ref49","mask","unmask","block","unblock","ignore","maskAttribute","_ref50","maskAttributes","privacyOptions","MEDIA_SELECTORS","DEFAULT_NETWORK_HEADERS","_initialized","replayIntegration$1","Replay$1","_ref51","_ref51$flushMinDelay","_ref51$flushMaxDelay","_ref51$minReplayDurat","_ref51$maxReplayDurat","_ref51$stickySession","_ref51$useCompression","_ref51$_experiments","_ref51$maskAllText","_ref51$maskAllInputs","_ref51$blockAllMedia","_ref51$mutationBreadc","_ref51$mutationLimit","_ref51$slowClickTimeo","_ref51$slowClickIgnor","_ref51$networkDetailA","_ref51$networkDetailD","_ref51$networkCapture","_ref51$networkRequest","_ref51$networkRespons","_ref51$mask","_ref51$maskAttributes","_ref51$unmask","_ref51$block","_ref51$unblock","_ref51$ignore","maskFn","password","_initialOptions","_getMergedNetworkHeaders","_isInitialized","_this31","_setup","_initialize","startBuffering","_maybeLoadFromReplayCanvasIntegration","finalOptions","initialOptions","opt","replaysSessionSampleRate","replaysOnErrorSampleRate","loadReplayOptionsFromClient","canvasIntegration","getReplay$1","__initStatic","_excluded","_objectWithoutProperties","excluded","sourceKeys","_objectWithoutPropertiesLoose","sourceSymbolKeys","propertyIsEnumerable","CanvasContext","CanvasContext2","lookup","canvasVarMap","saveWebGLVar","isInstanceOfWebGLObject","ctor","contextMap","variableListFor","serializeArg","Float32Array","Float64Array","Int32Array","Uint16Array","Int16Array","Int8Array","Uint8ClampedArray","rr_type","base64","arraybuffer","bytes","DataView","byteOffset","HTMLImageElement","HTMLCanvasElement","ImageData","serializeArgs","supportedWebGLConstructorNames","getNormalizedContextName","contextType","initCanvasContextObserver","setPreserveDrawingBufferToTrue","ctxName","contextAttributes","preserveDrawingBuffer","patchGLPrototype","getOwnPropertyNames","_loop2","recordArgs","mutation","hookHandler","setter","CanvasManager","pendingCanvasMutations","rafStamps","latestId","invokeId","enableManualSnapshot","initCanvasMutationObserver","initCanvasFPSObserver","resetObservers","fps","canvasContextReset","rafId","takeSnapshot","cancelAnimationFrame","startRAFTimestamping","startPendingCanvasMutationFlusher","canvas2DReset","CanvasRenderingContext2D","_loop","initCanvas2DMutationObserver","canvasWebGL1and2Reset","WebGLRenderingContext","WebGL","WebGL2RenderingContext","WebGL2","initCanvasWebGLMutationObserver","canvasElement","isManualSnapshot","snapshotInProgressMap","onmessage","commands","timeBetweenSnapshots","lastSnapshotTime","takeCanvasSnapshots","matchedCanvas","getCanvas","getContextAttributes","COLOR_BUFFER_BIT","createImageBitmap","bitmap","flushPendingCanvasMutations","setLatestRAFTimestamp","flushPendingCanvasMutationFor","valuesWithType","CANVAS_QUALITY","low","medium","high","DEFAULT_MAX_CANVAS_SIZE","replayCanvasIntegration","canvasManagerResolve","maxCanvasWidth","maxCanvasHeight","_canvasOptions","_canvasManager","getCanvasManagerOptions","snapshot","ReplayCanvas","_excluded2","LIGHT_BACKGROUND","INHERIT","SUBMIT_COLOR","LIGHT_THEME","fontFamily","fontSize","background","backgroundHover","foreground","border","borderRadius","boxShadow","submitBackground","submitBackgroundHover","submitBorder","submitOutlineFocus","submitForeground","submitForegroundHover","cancelBackground","cancelBackgroundHover","cancelBorder","cancelOutlineFocus","cancelForeground","cancelForegroundHover","inputBackground","inputForeground","inputBorder","inputOutlineFocus","formBorderRadius","formContentBorderRadius","DEFAULT_THEME","light","dark","ACTOR_LABEL","CANCEL_BUTTON_LABEL","SUBMIT_BUTTON_LABEL","FORM_TITLE","EMAIL_PLACEHOLDER","EMAIL_LABEL","MESSAGE_PLACEHOLDER","MESSAGE_LABEL","NAME_PLACEHOLDER","NAME_LABEL","IS_REQUIRED_LABEL","SUCCESS_MESSAGE_TEXT","FEEDBACK_WIDGET_SOURCE","FEEDBACK_API_SOURCE","prepareFeedbackEvent","_prepareFeedbackEvent","sendFeedbackRequest","_sendFeedbackRequest","_ref2$feedback","_ref19$includeReplay","_args4","contact_email","clearBreadcrumbs","setLevel","sendFeedback","_ref3$source","_ref3$url","mergeOptions","defaultOptions","optionOverrides","themeDark","themeLight","getThemedCssVariables","theme","createShadowHost","colorScheme","_doc","shadow","attachShadow","mode","themes","createMainStyles","handleFeedbackSubmit","_handleFeedbackSubmit2","dialog","showFetchError","resp","showError","hideError","setAttributesNS","setAttributeNS","SIZE","children","_children","createTextNode","Actor","_createElement","buttonLabel","onClick","_setAttributesNS","createElementNS","svg","viewBox","g","clipPath","speakerDefs","speakerClipPathDef","speakerRect","Icon","show","hide","retrieveStringValue","Form","_createElement4","_createElement5","_createElement6","label","nameLabel","namePlaceholder","emailLabel","emailPlaceholder","messageLabel","messagePlaceholder","isRequiredLabel","cancelButtonLabel","submitButtonLabel","showName","showEmail","isNameRequired","isEmailRequired","defaultName","defaultEmail","onCancel","onSubmit","submitEl","errorEl","nameEl","emailEl","messageEl","autoFocus","rows","required","placeholder","cancelEl","formEl","preventDefault","htmlFor","Dialog","formTitle","showBranding","onClosed","textLabels","_Form","stopPropagation","title","transform","append","defs","Logo","checkIsOpen","SuccessMessage","onRemove","_setAttributesNS2","SuccessIcon","actor","_ref15$options","_ref15$options$should","shouldCreateActor","attachTo","isDialogOpen","showSuccessMessage","successMessageText","timeoutId","showActor","_handleFeedbackSubmit","_handleFeedbackSubmit3","emptyField","onSubmitError","removeDialog","onSubmitSuccess","handleOpenDialog","hideActor","openDialog","onFormOpen","userKey","useSentryUser","onFormClose","closeDialog","dialogEl","handleActorClick","removeActor","feedbackIntegration","Feedback","_ref16$autoInject","autoInject","_ref16$id","_ref16$isEmailRequire","_ref16$isNameRequired","_ref16$showBranding","_ref16$showEmail","_ref16$showName","_ref16$useSentryUser","_ref16$colorScheme","_ref16$buttonLabel","_ref16$cancelButtonLa","_ref16$submitButtonLa","_ref16$formTitle","_ref16$emailPlacehold","_ref16$emailLabel","_ref16$messagePlaceho","_ref16$messageLabel","_ref16$namePlaceholde","_ref16$nameLabel","_ref16$isRequiredLabe","_ref16$successMessage","_host","_shadow","_widget","_widgets","_hasInsertedActorStyles","_cleanupWidgetIfExists","_createWidget","_ensureShadowHost","targetEl","widget","existingFeedback","needsAppendHost","_createShadowHost","sentryFeedbackColorscheme","captureConsoleIntegration","levels","consoleHandler","severity","_message","contextLinesIntegration","contextLines","frameContextLines","addSourceContext","htmlFilename","html","innerHTML","htmlLines","applySourceContextToFrame","debugIntegration","debugger","extraErrorDataIntegration","captureErrorCause","_enhanceEventWithErrorData","exceptionName","errorData","_extractErrorData","normalizedErrorData","nativeKeys","extraErrorInfo","serializedError","_Object$keys2","httpClientIntegration","failedRequestStatusCodes","failedRequestTargets","_wrapFetch","_fetchResponseHandler","requestInfo","requestInit","_shouldCaptureResponse","requestHeaders","responseHeaders","requestCookies","responseCookies","bodyUsed","_getRequest","_shouldSendDefaultPii","_map2","cookieHeader","cookies","_extractFetchHeaders","cookieString","_parseCookieString","_map2$","_map2$2","_createEvent","_xhrResponseHandler","responseURL","_getXHRResponseHeaders","_getResponseSizeFromHeaders","contentLength","cookie","_cookie$split2","supports","_args","_isInGivenStatusRanges","givenRequestTarget","body_size","reportingObserverIntegration","reports","details","plainBody","crashId","ReportingObserver","normalizeArray","allowAboveRoot","up","splitPathRe","splitPath","truncated","resolvedPath","resolvedAbsolute","fromParts","toParts","samePartsLength","outputParts","basename","ext","rewriteFramesIntegration","root","prefix","iteratee","isWindowsFrame","startsWithSlash","_processExceptionsEvent","_processStacktrace","originalEvent","sessionTimingIntegration","registerBackgroundTabDetection","statusType","isMeasurementValue","isFinite","_startChild","startChild","msToSec","getBrowserPerformanceAPI","_lcpEntry","_clsEntry","_performanceCursor","startTrackingWebVitals","fidCallback","clsCallback","addClsInstrumentationHandler","lcpCallback","ttfbCallback","addTtfbInstrumentationHandler","startTrackingLongTasks","startTrackingInteractions","startTrackingINP","interactionIdtoRouteNameMapping","interactionsSampleRate","inpCallback","interactionIdToRouteNameMapping","INP_ENTRY_MAP","interactionType","routeName","parentContext","userDisplay","profileId","getProfileId","getSampleRate","_trackINP","pointerdown","pointerup","mousedown","mouseup","touchstart","touchend","mouseover","mouseout","mouseenter","mouseleave","pointerover","pointerout","pointerenter","pointerleave","dragstart","dragend","drag","dragenter","dragleave","dragover","drop","keydown","keyup","keypress","addPerformanceEntries","transactionStartTime","_addPerformanceNavigationTiming","requestStart","_addRequest","_addNavigationSpans","measureStartTimestamp","measureEndTimestamp","_addMeasureSpans","firstHidden","shouldRecord","resourceUrl","parsedUrl","setResourceEntrySizeData","renderBlockingStatus","_addResourceSpans","connection","effectiveType","rtt","deviceMemory","hardwareConcurrency","_trackNavigator","_addTtfbRequestTimeToMeasurements","measurementTimestamp","normalizedValue","fidMark","cls","measurementName","sources","_tagMetricInfo","eventEnd","dataKey","entryVal","addTracingHeadersToFetchRequest","requestSpan","_isolationScope$getPr","sentryTraceHeader","sentryBaggageHeader","newHeaders","_newHeaders","existingBaggageHeader","newBaggageHeaders","getFullURL","endSpan","contentLengthNum","DEFAULT_TRACE_PROPAGATION_TARGETS","defaultRequestInstrumentationOptions","traceFetch","traceXHR","enableHTTPTimings","tracingOrigins","tracePropagationTargets","instrumentOutgoingRequests","_traceFetch$traceXHR$","shouldCreateSpanForRequest","shouldCreateSpan","shouldAttachHeadersWithTargets","createdSpan","shouldAttachHeaders","spanOrigin","shouldCreateSpanResult","_handlerData$fetchDat","onlyIfParent","__span","instrumentFetchRequest","addHTTPTimings","__sentry_own_request__","__sentry_xhr_span_id__","setHeaderOnXhr","xhrCallback","cleanup","nextHopProtocol","isPerformanceResourceTiming","resourceTiming","_extractNetworkProtoc","_nextHopProtocol$spli2","extractNetworkProtocol","timingSpanData","redirectStart","fetchStart","domainLookupStart","domainLookupEnd","connectStart","secureConnectionStart","connectEnd","resourceTimingEntryToSpanData","DEFAULT_BROWSER_TRACING_OPTIONS","markBackgroundTransactions","routingInstrumentation","customStartTransaction","startTransactionOnPageLoad","startTransactionOnLocationChange","startingUrl","enableLongTask","enableInp","BrowserTracing","_hasSetTracePropagationTargets","_collectWebVitals","_interactionIdToRouteNameMapping","enableInteractions","_latestRoute","_getCurrentHub","_this$options","instrumentRouting","clientOptionsTracePropagationTargets","_createRouteTransaction","onStartRouteTransaction","_registerInteractionListener","_registerInpInteractionListener","expandedContext","_this$options2","beforeNavigate","isPageloadTransaction","getMetaContent","_propagationContextFr","modifiedContext","finalContext","idleTransaction","sendAutoFinishSignal","registerBeforeFinishCallback","inflightInteractionTransaction","registerInteractionTransaction","_this3$options","currentTransaction","setFinishReason","getSource","getReplayId","currentScope","isPerformanceEventTiming","minInteractionId","metaName","metaTag","sourceFromAttributes","sourceFromData","sourceFromMetadata","instrumentNavigation","instrumentPageLoad","markBackgroundSpan","latestRoute","beforeStartSpan","activeSpan","startBrowserTracingPageLoadSpan","startBrowserTracingNavigationSpan","registerInteractionListener","registerInpInteractionListener","spanOptions","promisifyRequest","oncomplete","onsuccess","onabort","getAllKeys","_insert","maxQueueSize","put","_pop","createIndexedDbStore","_pop2","_insert2","getStore","dbName","storeName","indexedDB","onupgradeneeded","createObjectStore","dbp","db","objectStore","deserialized","textDecoder","TextDecoder","makeBrowserOfflineTransport","makeIndexedDbOfflineTransport","MS_TO_NS","THREAD_ID_STRING","THREAD_NAME","OS_PLATFORM","OS_PLATFORM_VERSION","OS_ARCH","OS_BROWSER","OS_MODEL","OS_LOCALE","language","languages","userAgentData","enrichWithThreadInformation","profile","isProcessedJSSelfProfile","EMPTY_STACK_ID","STACK_ID","samples","stacks","thread_metadata","adjustForOriginChange","jsSample","stackId","stackTop","frameId","resourceId","resources","sample","elapsed_since_start_ns","toFixed","stack_id","thread_id","convertJSSelfProfileToSampledFormat","createProfilePayload","processed_profile","getTraceId","enrichedThreadProfile","transactionStartMs","transactionEndMs","runtime","os","build_number","device","locale","model","manufacturer","architecture","is_emulator","applyDebugMetadata","transactions","active_thread_id","relative_start_ns","relative_end_ns","isAutomatedPageLoadTransaction","getHighEntropyValues","ua","platformVersion","fullVersionList","firstUa","brand","resource_paths","file","PROFILING_CONSTRUCTOR_FAILED","shouldProfileTransaction","profilesSampleRate","createProfilingEvent","isValidProfile","PROFILE_MAP","takeProfileFromGlobalCache","addProfileToGlobalCache","onProfilingStartRouteTransaction","startProfileForTransaction","profiler","JSProfilerConstructor","Profiler","maxSamples","MAX_PROFILE_DURATION_MS","sampleInterval","maxBufferSize","startJSSelfProfile","onProfileHandler","_onProfileHandler","maxDurationTimeoutID","browserProfilingIntegration","profiledTransactionEvents","j","findProfiledTransactionsFromEnvelope","profilesToAddToEnvelope","profiledTransaction","profileEvent","profiles","addProfilesToEnvelope","BrowserProfilingIntegration","windowIntegrations","Sentry","INTEGRATIONS","SENTRY_XHR_DATA_KEY","addXhrInstrumentationHandler","instrumentXHR","xhrproto","originalOpen","onreadystatechangeHandler","readyStateArgs","setRequestHeaderArgs","_oldOnErrorHandler","addGlobalErrorInstrumentationHandler","instrumentError","__SENTRY_LOADER__","__SENTRY_INSTRUMENTED__","_oldOnUnhandledRejectionHandler","addGlobalUnhandledRejectionInstrumentationHandler","instrumentUnhandledRejection","lastHref","addHistoryInstrumentationHandler","instrumentHistory","chromeVar","chrome","isChromePackagedApp","app","hasHistoryApi","pushState","replaceState","oldOnPopState","onpopstate","historyReplacementFunction","originalHistoryFunction","startingTime","sid","did","abnormal_mechanism","attrs","ipAddress","user_agent","sessionToJSON","updateSession","closeSession","cachedSetTimeout","cachedClearTimeout","module","exports","defaultSetTimout","defaultClearTimeout","runTimeout","fun","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","run","marker","runClearTimeout","Item","array","noop","nextTick","browser","argv","versions","addListener","off","removeListener","removeAllListeners","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","originalModule","webpackPolyfill","l","addConsoleInstrumentationHandler","instrumentConsole","debounceTimerID","lastCapturedEventType","lastCapturedEventTargetId","addClickKeypressInstrumentationHandler","instrumentDOM","triggerDOMHandler","globalDOMEventHandler","makeDOMEventHandler","originalAddEventListener","__sentry_instrumentation_handlers__","handlerForType","refCount","isSimilarToLastCapturedEvent","_sentryId","shouldSkipDOMEvent","globalListener","addFetchInstrumentationHandler","instrumentFetch","originalFetch","_parseFetchArgs","parseFetchArgs","finishedHandlerData","erroredHandlerData","hasProp","getUrlFromResource","_fetchArgs","validSeverityLevels","severityLevelFromString","applyAggregateErrorsToEvent","exceptionFromErrorImplementation","maxValueLimit","truncateAggregateExceptions","aggregateExceptionsFromError","prevExceptions","exceptionId","newExceptions","applyExceptionGroupFieldsForParentException","newException","newExceptionId","applyExceptionGroupFieldsForChildException","childError","_newException","_newExceptionId","is_exception_group","exception_id","parent_id","parseRetryAfterHeader","headerDelay","headerDate","disabledUntil","limits","isRateLimited","updateRateLimits","updatedRateLimits","rateLimitHeader","retryAfterHeader","_limit$split","_limit$split2","retryAfter","categories","namespaces","configureScope","withScope","withIsolationScope","withActiveSpan","_close","isInitialized","getCurrentScope","startSession","_ref$environment","afterFinish","parentSpan","normalizeContext","createChildSpanOrTransaction","forceTransaction","startSpan","startSpanManual","finishAndSetSpan","startInactiveSpan","getActiveSpan","temporaryScope","continueTrace","_tracingContextFromHe","setPropagationContext","_parentSpan$spanConte","_dsc","ISOLATION_SCOPE_ON_START_SPAN_FIELD","SCOPE_ON_START_SPAN_FIELD","setCapturedScopesOnSpan","getCapturedScopesOnSpan","getDynamicSamplingContextFromClient","public_key","user_segment","getDynamicSamplingContextFromSpan","txn","v7FrozenDsc","_txn$metadata","maybeSampleRate","sample_rate","jsonSpan","extractMessage","eventFromError","popSize","framesToPop","reactMinifiedRegexp","getPopSize","eventFromUnknownInput","eventFromString","isUnhandledRejection","domException","code","getNonErrorObjectExceptionValue","__serialized__","eventFromPlainObject","synthetic","logentry","params","captureType","getObjectClassName","WEBPACK_ERROR_REGEXP","STRIP_FRAME_REGEXP","createStackParser","parsers","sortedParsers","skipFirst","cleanedLine","stripSentryFramesAndReverse","stackParserFromStackParserOptions","localStack","defaultFunctionName","getFunctionName","dateTimestampInSeconds","timestampInSeconds","approxStartingTimeOrigin","createUnixTimestampInSecondsFunc","browserPerformanceTimeOrigin","performanceNow","dateNow","timeOriginDelta","timeOriginIsReliable","navigationStartDelta","createEnvelope","addItemToEnvelope","newItem","_envelope","forEachEnvelopeItem","envelopeContainsItemType","encodeUTF8","serializeEnvelope","_envelope2","envHeaders","_item","itemHeaders","stringifiedPayload","totalLength","merged","offset","concatBuffers","parseEnvelope","readBinary","bin","subarray","readJson","decode","envelopeHeader","itemHeader","binaryLength","createAttachmentEnvelopeItem","content_type","contentType","attachment_type","attachmentType","ITEM_TYPE_TO_DATA_CATEGORY_MAP","sessions","client_report","user_report","replay_event","replay_recording","check_in","statsd","envelopeItemTypeToDataCategory","getSdkMetadataForEnvelopeHeader","metadataOrEvent","_metadataOrEvent$sdk","createEventEnvelopeHeaders"],"mappings":"4FAAA,0JAASA,EAAQC,EAAQC,GAAkB,IAAIC,EAAOC,OAAOD,KAAKF,GAAS,GAAIG,OAAOC,sBAAuB,CAAE,IAAIC,EAAUF,OAAOC,sBAAsBJ,GAASC,IAAmBI,EAAUA,EAAQC,QAAO,SAAUC,GAAO,OAAOJ,OAAOK,yBAAyBR,EAAQO,GAAKE,eAAiBP,EAAKQ,KAAKC,MAAMT,EAAMG,GAAY,OAAOH,EAE9U,SAASU,EAAcC,GAAU,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAAS,MAAQF,UAAUD,GAAKC,UAAUD,GAAK,GAAIA,EAAI,EAAIf,EAAQI,OAAOc,IAAS,GAAIC,SAAQ,SAAUC,GAAOC,EAAgBP,EAAQM,EAAKF,EAAOE,OAAYhB,OAAOkB,0BAA4BlB,OAAOmB,iBAAiBT,EAAQV,OAAOkB,0BAA0BJ,IAAWlB,EAAQI,OAAOc,IAASC,SAAQ,SAAUC,GAAOhB,OAAOoB,eAAeV,EAAQM,EAAKhB,OAAOK,yBAAyBS,EAAQE,OAAa,OAAON,EAEjf,SAASO,EAAgBI,EAAKL,EAAKM,GAAiK,OAApJN,KAAOK,EAAOrB,OAAOoB,eAAeC,EAAKL,EAAK,CAAEM,MAAOA,EAAOhB,YAAY,EAAMiB,cAAc,EAAMC,UAAU,IAAkBH,EAAIL,GAAOM,EAAgBD,EAS3M,SAASI,IACP,OAAO,YAAmB,yBAAyB,WACjD,MAAO,MASX,SAASC,EAAwBC,GAE/BF,IAA2BlB,KAAKoB,GAOlC,SAASC,EAAsBC,EAAYC,EAAOC,GAChD,IAAIC,EAAQpB,UAAUC,OAAS,QAAsBoB,IAAjBrB,UAAU,GAAmBA,UAAU,GAAK,EAChF,OAAO,IAAI,KAA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C,SAASinH,EAAgCC,GACvC,GAAKA,GAAoBA,EAAgB7tH,IAAzC,CAIA,IAAI8tH,EAAuBD,EAAgB7tH,IAG3C,MAAO,CACL/V,KAHS6jI,EAAqB7jI,KAI9B0V,QAHYmuH,EAAqBnuH,UAYrC,SAASouH,EAA2B9lI,EAAOqX,EAASQ,EAAQpL,GAC1D,IAAIoG,EAAyB7S,EAAMwG,uBAAyBxG,EAAMwG,sBAAsBqM,uBACxF,OAAOlU,EAAcA,EAAcA,EAAc,CAC/CmI,SAAU9G,EAAM8G,SAChBkuB,SAAS,IAAIC,MAAOC,eACnB7d,GAAW,CACZU,IAAKV,MACDQ,GAAUpL,GAAO,CACrBA,IAAK,YAAYA,KACfoG,GAA0B,CAC5BF,MAAO,YAAkBhU,EAAc,GAAIkU","file":"js/vendors~sentry-045ae54a7fea9018ed67.chunk.js","sourcesContent":["function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { SyncPromise, logger, isThenable, getGlobalSingleton } from '@sentry/utils';\nimport { DEBUG_BUILD } from './debug-build.js';\n/**\n * Returns the global event processors.\n * @deprecated Global event processors will be removed in v8.\n */\n\nfunction getGlobalEventProcessors() {\n return getGlobalSingleton('globalEventProcessors', function () {\n return [];\n });\n}\n/**\n * Add a EventProcessor to be kept globally.\n * @deprecated Use `addEventProcessor` instead. Global event processors will be removed in v8.\n */\n\n\nfunction addGlobalEventProcessor(callback) {\n // eslint-disable-next-line deprecation/deprecation\n getGlobalEventProcessors().push(callback);\n}\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\n\n\nfunction notifyEventProcessors(processors, event, hint) {\n var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n return new SyncPromise(function (resolve, reject) {\n var processor = processors[index];\n\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n var result = processor(_objectSpread({}, event), hint);\n DEBUG_BUILD && processor.id && result === null && logger.log(\"Event processor \\\"\".concat(processor.id, \"\\\" dropped event\"));\n\n if (isThenable(result)) {\n void result.then(function (final) {\n return notifyEventProcessors(processors, final, hint, index + 1).then(resolve);\n }).then(null, reject);\n } else {\n void notifyEventProcessors(processors, result, hint, index + 1).then(resolve).then(null, reject);\n }\n }\n });\n}\n\nexport { addGlobalEventProcessor, getGlobalEventProcessors, notifyEventProcessors };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport { isPlainObject, dateTimestampInSeconds, uuid4, logger } from '@sentry/utils';\nimport { getGlobalEventProcessors, notifyEventProcessors } from './eventProcessors.js';\nimport { updateSession } from './session.js';\nimport { applyScopeDataToEvent } from './utils/applyScopeDataToEvent.js';\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\n\nvar DEFAULT_MAX_BREADCRUMBS = 100;\n/**\n * The global scope is kept in this module.\n * When accessing this via `getGlobalScope()` we'll make sure to set one if none is currently present.\n */\n\nvar globalScope;\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\n\nvar Scope = /*#__PURE__*/function () {\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 /**\n * Transaction Name\n */\n\n /** Span */\n\n /** Session */\n\n /** Request Mode Session Status */\n\n /** The client on this scope */\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n function Scope() {\n _classCallCheck(this, Scope);\n\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 * Inherit values from the parent scope.\n * @deprecated Use `scope.clone()` and `new Scope()` instead.\n */\n\n\n _createClass(Scope, [{\n key: \"clone\",\n value:\n /**\n * Clone this scope instance.\n */\n function clone() {\n var newScope = new Scope();\n newScope._breadcrumbs = _toConsumableArray(this._breadcrumbs);\n newScope._tags = _objectSpread({}, this._tags);\n newScope._extra = _objectSpread({}, this._extra);\n newScope._contexts = _objectSpread({}, this._contexts);\n newScope._user = this._user;\n newScope._level = this._level;\n newScope._span = this._span;\n newScope._session = this._session;\n newScope._transactionName = this._transactionName;\n newScope._fingerprint = this._fingerprint;\n newScope._eventProcessors = _toConsumableArray(this._eventProcessors);\n newScope._requestSession = this._requestSession;\n newScope._attachments = _toConsumableArray(this._attachments);\n newScope._sdkProcessingMetadata = _objectSpread({}, this._sdkProcessingMetadata);\n newScope._propagationContext = _objectSpread({}, this._propagationContext);\n newScope._client = this._client;\n return newScope;\n }\n /** Update the client on the scope. */\n\n }, {\n key: \"setClient\",\n value: function setClient(client) {\n this._client = client;\n }\n /**\n * Get the client assigned to this scope.\n *\n * It is generally recommended to use the global function `Sentry.getClient()` instead, unless you know what you are doing.\n */\n\n }, {\n key: \"getClient\",\n value: function getClient() {\n return this._client;\n }\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n\n }, {\n key: \"addScopeListener\",\n value: function addScopeListener(callback) {\n this._scopeListeners.push(callback);\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"addEventProcessor\",\n value: function addEventProcessor(callback) {\n this._eventProcessors.push(callback);\n\n return this;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"setUser\",\n value: function setUser(user) {\n // If null is passed we want to unset everything, but still define keys,\n // so that later down in the pipeline any existing values are cleared.\n this._user = user || {\n email: undefined,\n id: undefined,\n ip_address: undefined,\n segment: undefined,\n username: undefined\n };\n\n if (this._session) {\n updateSession(this._session, {\n user: user\n });\n }\n\n this._notifyScopeListeners();\n\n return this;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"getUser\",\n value: function getUser() {\n return this._user;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"getRequestSession\",\n value: function getRequestSession() {\n return this._requestSession;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"setRequestSession\",\n value: function setRequestSession(requestSession) {\n this._requestSession = requestSession;\n return this;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"setTags\",\n value: function setTags(tags) {\n this._tags = _objectSpread(_objectSpread({}, this._tags), tags);\n\n this._notifyScopeListeners();\n\n return this;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"setTag\",\n value: function setTag(key, value) {\n this._tags = _objectSpread(_objectSpread({}, this._tags), {}, _defineProperty({}, key, value));\n\n this._notifyScopeListeners();\n\n return this;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"setExtras\",\n value: function setExtras(extras) {\n this._extra = _objectSpread(_objectSpread({}, this._extra), extras);\n\n this._notifyScopeListeners();\n\n return this;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"setExtra\",\n value: function setExtra(key, extra) {\n this._extra = _objectSpread(_objectSpread({}, this._extra), {}, _defineProperty({}, key, extra));\n\n this._notifyScopeListeners();\n\n return this;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"setFingerprint\",\n value: function setFingerprint(fingerprint) {\n this._fingerprint = fingerprint;\n\n this._notifyScopeListeners();\n\n return this;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"setLevel\",\n value: function setLevel( // eslint-disable-next-line deprecation/deprecation\n level) {\n this._level = level;\n\n this._notifyScopeListeners();\n\n return this;\n }\n /**\n * Sets the transaction name on the scope for future events.\n */\n\n }, {\n key: \"setTransactionName\",\n value: function setTransactionName(name) {\n this._transactionName = name;\n\n this._notifyScopeListeners();\n\n return this;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"setContext\",\n value: function 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\n return this;\n }\n /**\n * Sets the Span on the scope.\n * @param span Span\n * @deprecated Instead of setting a span on a scope, use `startSpan()`/`startSpanManual()` instead.\n */\n\n }, {\n key: \"setSpan\",\n value: function setSpan(span) {\n this._span = span;\n\n this._notifyScopeListeners();\n\n return this;\n }\n /**\n * Returns the `Span` if there is one.\n * @deprecated Use `getActiveSpan()` instead.\n */\n\n }, {\n key: \"getSpan\",\n value: function getSpan() {\n return this._span;\n }\n /**\n * Returns the `Transaction` attached to the scope (if there is one).\n * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.\n */\n\n }, {\n key: \"getTransaction\",\n value: function 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 var span = this._span; // Cannot replace with getRootSpan because getRootSpan returns a span, not a transaction\n // Also, this method will be removed anyway.\n // eslint-disable-next-line deprecation/deprecation\n\n return span && span.transaction;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"setSession\",\n value: function setSession(session) {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n\n this._notifyScopeListeners();\n\n return this;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"getSession\",\n value: function getSession() {\n return this._session;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"update\",\n value: function update(captureContext) {\n if (!captureContext) {\n return this;\n }\n\n var scopeToMerge = typeof captureContext === 'function' ? captureContext(this) : captureContext;\n\n if (scopeToMerge instanceof Scope) {\n var scopeData = scopeToMerge.getScopeData();\n this._tags = _objectSpread(_objectSpread({}, this._tags), scopeData.tags);\n this._extra = _objectSpread(_objectSpread({}, this._extra), scopeData.extra);\n this._contexts = _objectSpread(_objectSpread({}, this._contexts), scopeData.contexts);\n\n if (scopeData.user && Object.keys(scopeData.user).length) {\n this._user = scopeData.user;\n }\n\n if (scopeData.level) {\n this._level = scopeData.level;\n }\n\n if (scopeData.fingerprint.length) {\n this._fingerprint = scopeData.fingerprint;\n }\n\n if (scopeToMerge.getRequestSession()) {\n this._requestSession = scopeToMerge.getRequestSession();\n }\n\n if (scopeData.propagationContext) {\n this._propagationContext = scopeData.propagationContext;\n }\n } else if (isPlainObject(scopeToMerge)) {\n var scopeContext = captureContext;\n this._tags = _objectSpread(_objectSpread({}, this._tags), scopeContext.tags);\n this._extra = _objectSpread(_objectSpread({}, this._extra), scopeContext.extra);\n this._contexts = _objectSpread(_objectSpread({}, this._contexts), scopeContext.contexts);\n\n if (scopeContext.user) {\n this._user = scopeContext.user;\n }\n\n if (scopeContext.level) {\n this._level = scopeContext.level;\n }\n\n if (scopeContext.fingerprint) {\n this._fingerprint = scopeContext.fingerprint;\n }\n\n if (scopeContext.requestSession) {\n this._requestSession = scopeContext.requestSession;\n }\n\n if (scopeContext.propagationContext) {\n this._propagationContext = scopeContext.propagationContext;\n }\n }\n\n return this;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"clear\",\n value: function 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\n this._notifyScopeListeners();\n\n this._attachments = [];\n this._propagationContext = generatePropagationContext();\n return this;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"addBreadcrumb\",\n value: function addBreadcrumb(breadcrumb, maxBreadcrumbs) {\n var maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS; // No data has been changed, so don't notify scope listeners\n\n if (maxCrumbs <= 0) {\n return this;\n }\n\n var mergedBreadcrumb = _objectSpread({\n timestamp: dateTimestampInSeconds()\n }, breadcrumb);\n\n var 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 * @inheritDoc\n */\n\n }, {\n key: \"getLastBreadcrumb\",\n value: function getLastBreadcrumb() {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"clearBreadcrumbs\",\n value: function clearBreadcrumbs() {\n this._breadcrumbs = [];\n\n this._notifyScopeListeners();\n\n return this;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"addAttachment\",\n value: function addAttachment(attachment) {\n this._attachments.push(attachment);\n\n return this;\n }\n /**\n * @inheritDoc\n * @deprecated Use `getScopeData()` instead.\n */\n\n }, {\n key: \"getAttachments\",\n value: function getAttachments() {\n var data = this.getScopeData();\n return data.attachments;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"clearAttachments\",\n value: function clearAttachments() {\n this._attachments = [];\n return this;\n }\n /** @inheritDoc */\n\n }, {\n key: \"getScopeData\",\n value: function getScopeData() {\n var _breadcrumbs = this._breadcrumbs,\n _attachments = this._attachments,\n _contexts = this._contexts,\n _tags = this._tags,\n _extra = this._extra,\n _user = this._user,\n _level = this._level,\n _fingerprint = this._fingerprint,\n _eventProcessors = this._eventProcessors,\n _propagationContext = this._propagationContext,\n _sdkProcessingMetadata = this._sdkProcessingMetadata,\n _transactionName = this._transactionName,\n _span = this._span;\n return {\n breadcrumbs: _breadcrumbs,\n attachments: _attachments,\n contexts: _contexts,\n tags: _tags,\n extra: _extra,\n user: _user,\n level: _level,\n fingerprint: _fingerprint || [],\n eventProcessors: _eventProcessors,\n propagationContext: _propagationContext,\n sdkProcessingMetadata: _sdkProcessingMetadata,\n transactionName: _transactionName,\n span: _span\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 * @deprecated Use `applyScopeDataToEvent()` directly\n */\n\n }, {\n key: \"applyToEvent\",\n value: function applyToEvent(event) {\n var hint = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var additionalEventProcessors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n applyScopeDataToEvent(event, this.getScopeData()); // TODO (v8): Update this order to be: Global > Client > Scope\n\n var eventProcessors = [].concat(_toConsumableArray(additionalEventProcessors), _toConsumableArray(getGlobalEventProcessors()), _toConsumableArray(this._eventProcessors));\n return notifyEventProcessors(eventProcessors, event, hint);\n }\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry\n */\n\n }, {\n key: \"setSDKProcessingMetadata\",\n value: function setSDKProcessingMetadata(newData) {\n this._sdkProcessingMetadata = _objectSpread(_objectSpread({}, this._sdkProcessingMetadata), newData);\n return this;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"setPropagationContext\",\n value: function setPropagationContext(context) {\n this._propagationContext = context;\n return this;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"getPropagationContext\",\n value: function getPropagationContext() {\n return this._propagationContext;\n }\n /**\n * Capture an exception for this scope.\n *\n * @param exception The exception to capture.\n * @param hint Optinal additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\n\n }, {\n key: \"captureException\",\n value: function captureException(exception, hint) {\n var eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture exception!');\n return eventId;\n }\n\n var syntheticException = new Error('Sentry syntheticException');\n\n this._client.captureException(exception, _objectSpread(_objectSpread({\n originalException: exception,\n syntheticException: syntheticException\n }, hint), {}, {\n event_id: eventId\n }), this);\n\n return eventId;\n }\n /**\n * Capture a message for this scope.\n *\n * @param message The message to capture.\n * @param level An optional severity level to report the message with.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured message.\n */\n\n }, {\n key: \"captureMessage\",\n value: function captureMessage(message, level, hint) {\n var eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture message!');\n return eventId;\n }\n\n var syntheticException = new Error(message);\n\n this._client.captureMessage(message, level, _objectSpread(_objectSpread({\n originalException: message,\n syntheticException: syntheticException\n }, hint), {}, {\n event_id: eventId\n }), this);\n\n return eventId;\n }\n /**\n * Captures a manually created event for this scope and sends it to Sentry.\n *\n * @param exception The event to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\n\n }, {\n key: \"captureEvent\",\n value: function captureEvent(event, hint) {\n var eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture event!');\n return eventId;\n }\n\n this._client.captureEvent(event, _objectSpread(_objectSpread({}, hint), {}, {\n event_id: eventId\n }), this);\n\n return eventId;\n }\n /**\n * This will be called on every set call.\n */\n\n }, {\n key: \"_notifyScopeListeners\",\n value: function _notifyScopeListeners() {\n var _this = this;\n\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\n this._scopeListeners.forEach(function (callback) {\n callback(_this);\n });\n\n this._notifyingListeners = false;\n }\n }\n }], [{\n key: \"clone\",\n value: function clone(scope) {\n return scope ? scope.clone() : new Scope();\n }\n }]);\n\n return Scope;\n}();\n/**\n * Get the global scope.\n * This scope is applied to _all_ events.\n */\n\n\nfunction getGlobalScope() {\n if (!globalScope) {\n globalScope = new Scope();\n }\n\n return globalScope;\n}\n/**\n * This is mainly needed for tests.\n * DO NOT USE this, as this is an internal API and subject to change.\n * @hidden\n */\n\n\nfunction setGlobalScope(scope) {\n globalScope = scope;\n}\n\nfunction generatePropagationContext() {\n return {\n traceId: uuid4(),\n spanId: uuid4().substring(16)\n };\n}\n\nexport { Scope, getGlobalScope, setGlobalScope };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { isNaN, isVueViewModel, isSyntheticEvent } from './is.js';\nimport { memoBuilder } from './memo.js';\nimport { convertToPlainObject } from './object.js';\nimport { getFunctionName } from './stacktrace.js';\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\n\nfunction normalize(input) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;\n var maxProperties = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : +Infinity;\n\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 {\n ERROR: \"**non-serializable** (\".concat(err, \")\")\n };\n }\n}\n/** JSDoc */\n\n\nfunction normalizeToSize( // eslint-disable-next-line @typescript-eslint/no-explicit-any\nobject) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;\n var maxSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100 * 1024;\n var 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 * 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 */\n\n\nfunction visit(key, value) {\n var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : +Infinity;\n var maxProperties = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : +Infinity;\n var memo = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : memoBuilder();\n\n var _memo = _slicedToArray(memo, 2),\n memoize = _memo[0],\n unmemoize = _memo[1]; // Get the simple cases out of the way first\n\n\n if (value == null || // this matches null and undefined -> eqeq not eqeqeq\n ['number', 'boolean', 'string'].includes(_typeof(value)) && !isNaN(value)) {\n return value;\n }\n\n var stringified = stringifyValue(key, value); // 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\n if (!stringified.startsWith('[object ')) {\n 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\n\n if (value['__sentry_skip_normalization__']) {\n 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\n\n var remainingDepth = typeof value['__sentry_override_normalization_depth__'] === 'number' ? value['__sentry_override_normalization_depth__'] : depth; // We're also done if we've reached the max depth\n\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 } // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n\n\n if (memoize(value)) {\n return '[Circular ~]';\n } // If the value has a `toJSON` method, we call it to extract more information\n\n\n var valueWithToJSON = value;\n\n if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {\n try {\n var jsonValue = valueWithToJSON.toJSON(); // We need to normalize the return value of `.toJSON()` in case it has circular references\n\n return visit('', jsonValue, remainingDepth - 1, maxProperties, memo);\n } catch (err) {// 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\n\n var normalized = Array.isArray(value) ? [] : {};\n var numAdded = 0; // 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\n var visitable = convertToPlainObject(value);\n\n for (var 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 } // Recursively visit all the child nodes\n\n\n var visitValue = visitable[visitKey];\n normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo);\n numAdded++;\n } // Once we've visited all the branches, remove the parent from memo storage\n\n\n unmemoize(value); // Return accumulated values\n\n return normalized;\n}\n/* eslint-disable complexity */\n\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 */\n\n\nfunction 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) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n 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\n\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n } // eslint-disable-next-line no-restricted-globals\n\n\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n } // eslint-disable-next-line no-restricted-globals\n\n\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n\n if (isVueViewModel(value)) {\n return '[VueViewModel]';\n } // React's SyntheticEvent thingy\n\n\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: \".concat(getFunctionName(value), \"]\");\n }\n\n if (_typeof(value) === 'symbol') {\n return \"[\".concat(String(value), \"]\");\n } // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n\n\n if (typeof value === 'bigint') {\n return \"[BigInt: \".concat(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\n\n var objName = getConstructorName(value); // Handle HTML Elements\n\n if (/^HTML(\\w*)Element$/.test(objName)) {\n return \"[HTMLElement: \".concat(objName, \"]\");\n }\n\n return \"[object \".concat(objName, \"]\");\n } catch (err) {\n return \"**non-serializable** (\".concat(err, \")\");\n }\n}\n/* eslint-enable complexity */\n\n\nfunction getConstructorName(value) {\n var prototype = Object.getPrototypeOf(value);\n return prototype ? prototype.constructor.name : 'null prototype';\n}\n/** Calculates bytes size of input string */\n\n\nfunction utf8Length(value) {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n/** Calculates bytes size of input object */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nfunction jsonSize(value) {\n return utf8Length(JSON.stringify(value));\n}\n/**\n * Normalizes URLs in exceptions and stacktraces to a base path so Sentry can fingerprint\n * across platforms and working directory.\n *\n * @param url The URL to be normalized.\n * @param basePath The application base path.\n * @returns The normalized URL.\n */\n\n\nfunction normalizeUrlToBase(url, basePath) {\n var escapedBase = basePath // Backslash to forward\n .replace(/\\\\/g, '/') // Escape RegExp special characters\n .replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n var newUrl = url;\n\n try {\n newUrl = decodeURI(url);\n } catch (_Oo) {// Sometime this breaks\n }\n\n return newUrl.replace(/\\\\/g, '/').replace(/webpack:\\/?/g, '') // Remove intermediate base path\n // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor\n .replace(new RegExp(\"(file://)?/*\".concat(escapedBase, \"/*\"), 'ig'), 'app:///');\n}\n\nexport { normalize, normalizeToSize, normalizeUrlToBase, visit as walk };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { inboundFiltersIntegration, functionToStringIntegration, getIntegrationsToSetup, initAndBind, getReportDialogEndpoint, getCurrentHub, startSession, captureSession, getClient } from '@sentry/core';\nimport { stackParserFromStackParserOptions, supportsFetch, logger, addHistoryInstrumentationHandler } from '@sentry/utils';\nimport { BrowserClient } from './client.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { WINDOW, wrap as wrap$1 } from './helpers.js';\nimport { breadcrumbsIntegration } from './integrations/breadcrumbs.js';\nimport { dedupeIntegration } from './integrations/dedupe.js';\nimport { globalHandlersIntegration } from './integrations/globalhandlers.js';\nimport { httpContextIntegration } from './integrations/httpcontext.js';\nimport { linkedErrorsIntegration } from './integrations/linkederrors.js';\nimport { browserApiErrorsIntegration } from './integrations/trycatch.js';\nimport { defaultStackParser } from './stack-parsers.js';\nimport { makeFetchTransport } from './transports/fetch.js';\nimport { makeXHRTransport } from './transports/xhr.js';\n/** @deprecated Use `getDefaultIntegrations(options)` instead. */\n\nvar defaultIntegrations = [inboundFiltersIntegration(), functionToStringIntegration(), browserApiErrorsIntegration(), breadcrumbsIntegration(), globalHandlersIntegration(), linkedErrorsIntegration(), dedupeIntegration(), httpContextIntegration()];\n/** Get the default integrations for the browser SDK. */\n\nfunction getDefaultIntegrations(_options) {\n // We return a copy of the defaultIntegrations here to avoid mutating this\n return [].concat(defaultIntegrations);\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 */\n\n\nfunction init() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = getDefaultIntegrations();\n }\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 } // This supports the variable that sentry-webpack-plugin injects\n\n\n if (WINDOW.SENTRY_RELEASE && WINDOW.SENTRY_RELEASE.id) {\n options.release = WINDOW.SENTRY_RELEASE.id;\n }\n }\n\n if (options.autoSessionTracking === undefined) {\n options.autoSessionTracking = true;\n }\n\n if (options.sendClientReports === undefined) {\n options.sendClientReports = true;\n }\n\n var clientOptions = _objectSpread(_objectSpread({}, 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\nvar showReportDialog = function showReportDialog() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var hub = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentHub();\n\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 } // eslint-disable-next-line deprecation/deprecation\n\n\n var _hub$getStackTop = hub.getStackTop(),\n client = _hub$getStackTop.client,\n scope = _hub$getStackTop.scope;\n\n var dsn = options.dsn || client && client.getDsn();\n\n if (!dsn) {\n DEBUG_BUILD && logger.error('DSN not configured for showReportDialog call');\n return;\n }\n\n if (scope) {\n options.user = _objectSpread(_objectSpread({}, scope.getUser()), options.user);\n }\n\n if (!options.eventId) {\n // eslint-disable-next-line deprecation/deprecation\n options.eventId = hub.lastEventId();\n }\n\n var 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 var onClose = options.onClose;\n\n if (onClose) {\n var reportDialogClosedMessageHandler = function reportDialogClosedMessageHandler(event) {\n if (event.data === '__sentry_reportdialog_closed__') {\n try {\n onClose();\n } finally {\n WINDOW.removeEventListener('message', reportDialogClosedMessageHandler);\n }\n }\n };\n\n WINDOW.addEventListener('message', reportDialogClosedMessageHandler);\n }\n\n var injectionPoint = WINDOW.document.head || WINDOW.document.body;\n\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 * This function is here to be API compatible with the loader.\n * @hidden\n */\n\n\nfunction forceLoad() {// Noop\n}\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\n\n\nfunction onLoad(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 */\n// TODO(v8): Remove this function\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nfunction wrap(fn) {\n return wrap$1(fn)();\n}\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\n\n\nfunction startSessionTracking() {\n if (typeof WINDOW.document === 'undefined') {\n DEBUG_BUILD && logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');\n 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\n\n startSession({\n ignoreDuration: true\n });\n captureSession(); // We want to create a session for every navigation as well\n\n addHistoryInstrumentationHandler(function (_ref) {\n var from = _ref.from,\n to = _ref.to;\n\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 startSession({\n ignoreDuration: true\n });\n captureSession();\n }\n });\n}\n/**\n * Captures user feedback and sends it to Sentry.\n */\n\n\nfunction captureUserFeedback(feedback) {\n var client = getClient();\n\n if (client) {\n client.captureUserFeedback(feedback);\n }\n}\n\nexport { captureUserFeedback, defaultIntegrations, forceLoad, getDefaultIntegrations, init, onLoad, showReportDialog, wrap };","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { createStackParser } from '@sentry/utils'; // global reference to slice\n\nvar UNKNOWN_FUNCTION = '?';\nvar OPERA10_PRIORITY = 10;\nvar OPERA11_PRIORITY = 20;\nvar CHROME_PRIORITY = 30;\nvar WINJS_PRIORITY = 40;\nvar GECKO_PRIORITY = 50;\n\nfunction createFrame(filename, func, lineno, colno) {\n var frame = {\n filename: filename,\n function: func,\n in_app: true // All browser frames are considered in_app\n\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} // Chromium based browsers: Chrome, Brave, new Opera, new Edge\n\n\nvar chromeRegex = /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nvar chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/; // We cannot call this variable `chrome` because it can conflict with global `chrome` variable in certain environments\n// See: https://github.com/getsentry/sentry-javascript/issues/6880\n\nvar chromeStackParserFn = function chromeStackParserFn(line) {\n var parts = chromeRegex.exec(line);\n\n if (parts) {\n var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n\n if (isEval) {\n var 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\n parts[3] = subMatch[2]; // line\n\n parts[4] = subMatch[3]; // column\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\n\n var _extractSafariExtensi = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]),\n _extractSafariExtensi2 = _slicedToArray(_extractSafariExtensi, 2),\n func = _extractSafariExtensi2[0],\n filename = _extractSafariExtensi2[1];\n\n return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n }\n\n return;\n};\n\nvar chromeStackLineParser = [CHROME_PRIORITY, chromeStackParserFn]; // 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.\n\nvar geckoREgex = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nvar geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nvar gecko = function gecko(line) {\n var parts = geckoREgex.exec(line);\n\n if (parts) {\n var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n\n if (isEval) {\n var 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 var filename = parts[3];\n var func = parts[1] || UNKNOWN_FUNCTION;\n\n var _extractSafariExtensi3 = extractSafariExtensionDetails(func, filename);\n\n var _extractSafariExtensi4 = _slicedToArray(_extractSafariExtensi3, 2);\n\n func = _extractSafariExtensi4[0];\n filename = _extractSafariExtensi4[1];\n return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n }\n\n return;\n};\n\nvar geckoStackLineParser = [GECKO_PRIORITY, gecko];\nvar winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nvar winjs = function winjs(line) {\n var parts = winjsRegex.exec(line);\n return parts ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined) : undefined;\n};\n\nvar winjsStackLineParser = [WINJS_PRIORITY, winjs];\nvar opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n\nvar opera10 = function opera10(line) {\n var parts = opera10Regex.exec(line);\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\n\nvar opera10StackLineParser = [OPERA10_PRIORITY, opera10];\nvar opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\n\nvar opera11 = function opera11(line) {\n var parts = opera11Regex.exec(line);\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\n\nvar opera11StackLineParser = [OPERA11_PRIORITY, opera11];\nvar defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser, winjsStackLineParser];\nvar defaultStackParser = createStackParser.apply(void 0, defaultStackLineParsers);\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 */\n\nvar extractSafariExtensionDetails = function extractSafariExtensionDetails(func, filename) {\n var isSafariExtension = func.indexOf('safari-extension') !== -1;\n var isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n return isSafariExtension || isSafariWebExtension ? [func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION, isSafariExtension ? \"safari-extension:\".concat(filename) : \"safari-web-extension:\".concat(filename)] : [func, filename];\n};\n\nexport { chromeStackLineParser, defaultStackLineParsers, defaultStackParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser };","var DEFAULT_ENVIRONMENT = 'production';\nexport { DEFAULT_ENVIRONMENT };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport '@sentry-internal/tracing';\nimport { withScope, captureException } from '@sentry/core';\nimport { GLOBAL_OBJ, getOriginalFunction, markFunctionWrapped, addNonEnumerableProperty, addExceptionTypeValue, addExceptionMechanism } from '@sentry/utils';\nvar WINDOW = GLOBAL_OBJ;\nvar ignoreOnError = 0;\n/**\n * @hidden\n */\n\nfunction shouldIgnoreOnError() {\n return ignoreOnError > 0;\n}\n/**\n * @hidden\n */\n\n\nfunction ignoreNextOnError() {\n // onerror should trigger before setTimeout\n ignoreOnError++;\n setTimeout(function () {\n 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 */\n\n\nfunction wrap(fn) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var before // eslint-disable-next-line @typescript-eslint/no-explicit-any\n = arguments.length > 2 ? arguments[2] : undefined;\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 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 var wrapper = fn.__sentry_wrapped__;\n\n if (wrapper) {\n if (typeof wrapper === 'function') {\n return wrapper;\n } else {\n // If we find that the `__sentry_wrapped__` function is not a function at the time of accessing it, it means\n // that something messed with it. In that case we want to return the originally passed function.\n return fn;\n }\n } // We don't wanna wrap it twice\n\n\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 /* eslint-disable prefer-rest-params */\n // It is important that `sentryWrapped` is not an arrow function to preserve the context of `this`\n\n\n var sentryWrapped = function sentryWrapped() {\n var args = Array.prototype.slice.call(arguments);\n\n try {\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n } // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n\n\n var wrappedArguments = args.map(function (arg) {\n return wrap(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\n return fn.apply(this, wrappedArguments);\n } catch (ex) {\n ignoreNextOnError();\n withScope(function (scope) {\n scope.addEventProcessor(function (event) {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n\n event.extra = _objectSpread(_objectSpread({}, event.extra), {}, {\n arguments: args\n });\n return event;\n });\n captureException(ex);\n });\n throw ex;\n }\n };\n /* eslint-enable prefer-rest-params */\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n\n\n try {\n for (var 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 // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n\n\n markFunctionWrapped(sentryWrapped, fn);\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped); // Restore original function name (not all browsers allow that)\n\n try {\n var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');\n\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get: function get() {\n return fn.name;\n }\n });\n } // eslint-disable-next-line no-empty\n\n } catch (_oO) {}\n\n return sentryWrapped;\n}\n\nexport { WINDOW, ignoreNextOnError, shouldIgnoreOnError, wrap };","/** The status of an Span.\n *\n * @deprecated Use string literals - if you require type casting, cast to SpanStatusType type\n */\nvar SpanStatus;\n\n(function (SpanStatus) {\n /** The operation completed successfully. */\n var Ok = 'ok';\n SpanStatus[\"Ok\"] = Ok;\n /** Deadline expired before operation could complete. */\n\n var DeadlineExceeded = 'deadline_exceeded';\n SpanStatus[\"DeadlineExceeded\"] = DeadlineExceeded;\n /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */\n\n var Unauthenticated = 'unauthenticated';\n SpanStatus[\"Unauthenticated\"] = Unauthenticated;\n /** 403 Forbidden */\n\n var PermissionDenied = 'permission_denied';\n SpanStatus[\"PermissionDenied\"] = PermissionDenied;\n /** 404 Not Found. Some requested entity (file or directory) was not found. */\n\n var NotFound = 'not_found';\n SpanStatus[\"NotFound\"] = NotFound;\n /** 429 Too Many Requests */\n\n var ResourceExhausted = 'resource_exhausted';\n SpanStatus[\"ResourceExhausted\"] = ResourceExhausted;\n /** Client specified an invalid argument. 4xx. */\n\n var InvalidArgument = 'invalid_argument';\n SpanStatus[\"InvalidArgument\"] = InvalidArgument;\n /** 501 Not Implemented */\n\n var Unimplemented = 'unimplemented';\n SpanStatus[\"Unimplemented\"] = Unimplemented;\n /** 503 Service Unavailable */\n\n var Unavailable = 'unavailable';\n SpanStatus[\"Unavailable\"] = Unavailable;\n /** Other/generic 5xx. */\n\n var InternalError = 'internal_error';\n SpanStatus[\"InternalError\"] = InternalError;\n /** Unknown. Any non-standard HTTP status code. */\n\n var UnknownError = 'unknown_error';\n SpanStatus[\"UnknownError\"] = UnknownError;\n /** The operation was cancelled (typically by the user). */\n\n var Cancelled = 'cancelled';\n SpanStatus[\"Cancelled\"] = Cancelled;\n /** Already exists (409) */\n\n var AlreadyExists = 'already_exists';\n SpanStatus[\"AlreadyExists\"] = AlreadyExists;\n /** Operation was rejected because the system is not in a state required for the operation's */\n\n var FailedPrecondition = 'failed_precondition';\n SpanStatus[\"FailedPrecondition\"] = FailedPrecondition;\n /** The operation was aborted, typically due to a concurrency issue. */\n\n var Aborted = 'aborted';\n SpanStatus[\"Aborted\"] = Aborted;\n /** Operation was attempted past the valid range. */\n\n var OutOfRange = 'out_of_range';\n SpanStatus[\"OutOfRange\"] = OutOfRange;\n /** Unrecoverable data loss or corruption */\n\n var DataLoss = 'data_loss';\n SpanStatus[\"DataLoss\"] = DataLoss;\n})(SpanStatus || (SpanStatus = {}));\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 */\n\n\nfunction getSpanStatusFromHttpCode(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\n case 403:\n return 'permission_denied';\n\n case 404:\n return 'not_found';\n\n case 409:\n return 'already_exists';\n\n case 413:\n return 'failed_precondition';\n\n case 429:\n return 'resource_exhausted';\n\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\n case 503:\n return 'unavailable';\n\n case 504:\n return 'deadline_exceeded';\n\n default:\n return 'internal_error';\n }\n }\n\n return 'unknown_error';\n}\n/**\n * Converts a HTTP status code into a {@link SpanStatusType}.\n *\n * @deprecated Use {@link spanStatusFromHttpCode} instead.\n * This export will be removed in v8 as the signature contains a typo.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or unknown_error.\n */\n\n\nvar spanStatusfromHttpCode = getSpanStatusFromHttpCode;\n/**\n * Sets the Http status attributes on the current span based on the http code.\n * Additionally, the span's status is updated, depending on the http code.\n */\n\nfunction setHttpStatus(span, httpStatus) {\n // TODO (v8): Remove these calls\n // Relay does not require us to send the status code as a tag\n // For now, just because users might expect it to land as a tag we keep sending it.\n // Same with data.\n // In v8, we replace both, simply with\n // span.setAttribute('http.response.status_code', httpStatus);\n // eslint-disable-next-line deprecation/deprecation\n span.setTag('http.status_code', String(httpStatus)); // eslint-disable-next-line deprecation/deprecation\n\n span.setData('http.response.status_code', httpStatus);\n var spanStatus = getSpanStatusFromHttpCode(httpStatus);\n\n if (spanStatus !== 'unknown_error') {\n span.setStatus(spanStatus);\n }\n}\n\nexport { SpanStatus, getSpanStatusFromHttpCode, setHttpStatus, spanStatusfromHttpCode };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport { dropUndefinedKeys, arrayify } from '@sentry/utils';\nimport { getDynamicSamplingContextFromSpan } from '../tracing/dynamicSamplingContext.js';\nimport { getRootSpan } from './getRootSpan.js';\nimport { spanToTraceContext, spanToJSON } from './spanUtils.js';\n/**\n * Applies data from the scope to the event and runs all event processors on it.\n */\n\nfunction applyScopeDataToEvent(event, data) {\n var fingerprint = data.fingerprint,\n span = data.span,\n breadcrumbs = data.breadcrumbs,\n sdkProcessingMetadata = data.sdkProcessingMetadata; // Apply general data\n\n applyDataToEvent(event, data); // 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\n if (span) {\n applySpanToEvent(event, span);\n }\n\n applyFingerprintToEvent(event, fingerprint);\n applyBreadcrumbsToEvent(event, breadcrumbs);\n applySdkMetadataToEvent(event, sdkProcessingMetadata);\n}\n/** Merge data of two scopes together. */\n\n\nfunction mergeScopeData(data, mergeData) {\n var extra = mergeData.extra,\n tags = mergeData.tags,\n user = mergeData.user,\n contexts = mergeData.contexts,\n level = mergeData.level,\n sdkProcessingMetadata = mergeData.sdkProcessingMetadata,\n breadcrumbs = mergeData.breadcrumbs,\n fingerprint = mergeData.fingerprint,\n eventProcessors = mergeData.eventProcessors,\n attachments = mergeData.attachments,\n propagationContext = mergeData.propagationContext,\n transactionName = mergeData.transactionName,\n span = mergeData.span;\n mergeAndOverwriteScopeData(data, 'extra', extra);\n mergeAndOverwriteScopeData(data, 'tags', tags);\n mergeAndOverwriteScopeData(data, 'user', user);\n mergeAndOverwriteScopeData(data, 'contexts', contexts);\n mergeAndOverwriteScopeData(data, 'sdkProcessingMetadata', sdkProcessingMetadata);\n\n if (level) {\n data.level = level;\n }\n\n if (transactionName) {\n // eslint-disable-next-line deprecation/deprecation\n data.transactionName = transactionName;\n }\n\n if (span) {\n data.span = span;\n }\n\n if (breadcrumbs.length) {\n data.breadcrumbs = [].concat(_toConsumableArray(data.breadcrumbs), _toConsumableArray(breadcrumbs));\n }\n\n if (fingerprint.length) {\n data.fingerprint = [].concat(_toConsumableArray(data.fingerprint), _toConsumableArray(fingerprint));\n }\n\n if (eventProcessors.length) {\n data.eventProcessors = [].concat(_toConsumableArray(data.eventProcessors), _toConsumableArray(eventProcessors));\n }\n\n if (attachments.length) {\n data.attachments = [].concat(_toConsumableArray(data.attachments), _toConsumableArray(attachments));\n }\n\n data.propagationContext = _objectSpread(_objectSpread({}, data.propagationContext), propagationContext);\n}\n/**\n * Merges certain scope data. Undefined values will overwrite any existing values.\n * Exported only for tests.\n */\n\n\nfunction mergeAndOverwriteScopeData(data, prop, mergeVal) {\n if (mergeVal && Object.keys(mergeVal).length) {\n // Clone object\n data[prop] = _objectSpread({}, data[prop]);\n\n for (var key in mergeVal) {\n if (Object.prototype.hasOwnProperty.call(mergeVal, key)) {\n data[prop][key] = mergeVal[key];\n }\n }\n }\n}\n\nfunction applyDataToEvent(event, data) {\n var extra = data.extra,\n tags = data.tags,\n user = data.user,\n contexts = data.contexts,\n level = data.level,\n transactionName = data.transactionName;\n var cleanedExtra = dropUndefinedKeys(extra);\n\n if (cleanedExtra && Object.keys(cleanedExtra).length) {\n event.extra = _objectSpread(_objectSpread({}, cleanedExtra), event.extra);\n }\n\n var cleanedTags = dropUndefinedKeys(tags);\n\n if (cleanedTags && Object.keys(cleanedTags).length) {\n event.tags = _objectSpread(_objectSpread({}, cleanedTags), event.tags);\n }\n\n var cleanedUser = dropUndefinedKeys(user);\n\n if (cleanedUser && Object.keys(cleanedUser).length) {\n event.user = _objectSpread(_objectSpread({}, cleanedUser), event.user);\n }\n\n var cleanedContexts = dropUndefinedKeys(contexts);\n\n if (cleanedContexts && Object.keys(cleanedContexts).length) {\n event.contexts = _objectSpread(_objectSpread({}, cleanedContexts), event.contexts);\n }\n\n if (level) {\n event.level = level;\n }\n\n if (transactionName) {\n event.transaction = transactionName;\n }\n}\n\nfunction applyBreadcrumbsToEvent(event, breadcrumbs) {\n var mergedBreadcrumbs = [].concat(_toConsumableArray(event.breadcrumbs || []), _toConsumableArray(breadcrumbs));\n event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : undefined;\n}\n\nfunction applySdkMetadataToEvent(event, sdkProcessingMetadata) {\n event.sdkProcessingMetadata = _objectSpread(_objectSpread({}, event.sdkProcessingMetadata), sdkProcessingMetadata);\n}\n\nfunction applySpanToEvent(event, span) {\n event.contexts = _objectSpread({\n trace: spanToTraceContext(span)\n }, event.contexts);\n var rootSpan = getRootSpan(span);\n\n if (rootSpan) {\n event.sdkProcessingMetadata = _objectSpread({\n dynamicSamplingContext: getDynamicSamplingContextFromSpan(span)\n }, event.sdkProcessingMetadata);\n var transactionName = spanToJSON(rootSpan).description;\n\n if (transactionName) {\n event.tags = _objectSpread({\n transaction: transactionName\n }, event.tags);\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\n\nfunction applyFingerprintToEvent(event, fingerprint) {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint ? arrayify(event.fingerprint) : []; // If we have something on the scope, then merge it with event\n\n if (fingerprint) {\n event.fingerprint = event.fingerprint.concat(fingerprint);\n } // If we have no data at all, remove empty array default\n\n\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n}\n\nexport { applyScopeDataToEvent, mergeAndOverwriteScopeData, mergeScopeData };","/**\n * Returns the root span of a given span.\n *\n * As long as we use `Transaction`s internally, the returned root span\n * will be a `Transaction` but be aware that this might change in the future.\n *\n * If the given span has no root span or transaction, `undefined` is returned.\n */\nfunction getRootSpan(span) {\n // TODO (v8): Remove this check and just return span\n // eslint-disable-next-line deprecation/deprecation\n return span.transaction;\n}\n\nexport { getRootSpan };","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport { dropUndefinedKeys } from '@sentry/utils';\n/**\n * Generate bucket key from metric properties.\n */\n\nfunction getBucketKey(metricType, name, unit, tags) {\n var stringifiedTags = Object.entries(dropUndefinedKeys(tags)).sort(function (a, b) {\n return a[0].localeCompare(b[0]);\n });\n return \"\".concat(metricType).concat(name).concat(unit).concat(stringifiedTags);\n}\n/* eslint-disable no-bitwise */\n\n/**\n * Simple hash function for strings.\n */\n\n\nfunction simpleHash(s) {\n var rv = 0;\n\n for (var i = 0; i < s.length; i++) {\n var c = s.charCodeAt(i);\n rv = (rv << 5) - rv + c;\n rv &= rv;\n }\n\n return rv >>> 0;\n}\n/* eslint-enable no-bitwise */\n\n/**\n * Serialize metrics buckets into a string based on statsd format.\n *\n * Example of format:\n * metric.name@second:1:1.2|d|#a:value,b:anothervalue|T12345677\n * Segments:\n * name: metric.name\n * unit: second\n * value: [1, 1.2]\n * type of metric: d (distribution)\n * tags: { a: value, b: anothervalue }\n * timestamp: 12345677\n */\n\n\nfunction serializeMetricBuckets(metricBucketItems) {\n var out = '';\n\n var _iterator = _createForOfIteratorHelper(metricBucketItems),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var item = _step.value;\n var tagEntries = Object.entries(item.tags);\n var maybeTags = tagEntries.length > 0 ? \"|#\".concat(tagEntries.map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n\n return \"\".concat(key, \":\").concat(value);\n }).join(',')) : '';\n out += \"\".concat(item.name, \"@\").concat(item.unit, \":\").concat(item.metric, \"|\").concat(item.metricType).concat(maybeTags, \"|T\").concat(item.timestamp, \"\\n\");\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return out;\n}\n/** Sanitizes units */\n\n\nfunction sanitizeUnit(unit) {\n return unit.replace(/[^\\w]+/gi, '_');\n}\n/** Sanitizes metric keys */\n\n\nfunction sanitizeMetricKey(key) {\n return key.replace(/[^\\w\\-.]+/gi, '_');\n}\n\nfunction sanitizeTagKey(key) {\n return key.replace(/[^\\w\\-./]+/gi, '');\n}\n\nvar tagValueReplacements = [['\\n', '\\\\n'], ['\\r', '\\\\r'], ['\\t', '\\\\t'], ['\\\\', '\\\\\\\\'], ['|', \"\\\\u{7c}\"], [',', \"\\\\u{2c}\"]];\n\nfunction getCharOrReplacement(input) {\n var _iterator2 = _createForOfIteratorHelper(tagValueReplacements),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var _ref5 = _step2.value;\n\n var _ref4 = _slicedToArray(_ref5, 2);\n\n var search = _ref4[0];\n var replacement = _ref4[1];\n\n if (input === search) {\n return replacement;\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return input;\n}\n\nfunction sanitizeTagValue(value) {\n return _toConsumableArray(value).reduce(function (acc, char) {\n return acc + getCharOrReplacement(char);\n }, '');\n}\n/**\n * Sanitizes tags.\n */\n\n\nfunction sanitizeTags(unsanitizedTags) {\n var tags = {};\n\n for (var key in unsanitizedTags) {\n if (Object.prototype.hasOwnProperty.call(unsanitizedTags, key)) {\n var sanitizedKey = sanitizeTagKey(key);\n tags[sanitizedKey] = sanitizeTagValue(String(unsanitizedTags[key]));\n }\n }\n\n return tags;\n}\n\nexport { getBucketKey, sanitizeMetricKey, sanitizeTags, sanitizeUnit, serializeMetricBuckets, simpleHash };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { makeDsn, dsnToString, urlEncode } from '@sentry/utils';\nvar SENTRY_API_VERSION = '7';\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\n\nfunction getBaseApiEndpoint(dsn) {\n var protocol = dsn.protocol ? \"\".concat(dsn.protocol, \":\") : '';\n var port = dsn.port ? \":\".concat(dsn.port) : '';\n return \"\".concat(protocol, \"//\").concat(dsn.host).concat(port).concat(dsn.path ? \"/\".concat(dsn.path) : '', \"/api/\");\n}\n/** Returns the ingest API endpoint for target. */\n\n\nfunction _getIngestEndpoint(dsn) {\n return \"\".concat(getBaseApiEndpoint(dsn)).concat(dsn.projectId, \"/envelope/\");\n}\n/** Returns a URL-encoded string with auth config suitable for a query string. */\n\n\nfunction _encodedAuth(dsn, sdkInfo) {\n return urlEncode(_objectSpread({\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 && {\n sentry_client: \"\".concat(sdkInfo.name, \"/\").concat(sdkInfo.version)\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 */\n\n\nfunction getEnvelopeEndpointWithUrlEncodedAuth(dsn) {\n var tunnelOrOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n // TODO (v8): Use this code instead\n // const { tunnel, _metadata = {} } = options;\n // return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, _metadata.sdk)}`;\n var tunnel = typeof tunnelOrOptions === 'string' ? tunnelOrOptions : tunnelOrOptions.tunnel;\n var sdkInfo = typeof tunnelOrOptions === 'string' || !tunnelOrOptions._metadata ? undefined : tunnelOrOptions._metadata.sdk;\n return tunnel ? tunnel : \"\".concat(_getIngestEndpoint(dsn), \"?\").concat(_encodedAuth(dsn, sdkInfo));\n}\n/** Returns the url to the report dialog endpoint. */\n\n\nfunction getReportDialogEndpoint(dsnLike, dialogOptions) {\n var dsn = makeDsn(dsnLike);\n\n if (!dsn) {\n return '';\n }\n\n var endpoint = \"\".concat(getBaseApiEndpoint(dsn), \"embed/error-page/\");\n var encodedOptions = \"dsn=\".concat(dsnToString(dsn));\n\n for (var key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'onClose') {\n continue;\n }\n\n if (key === 'user') {\n var user = dialogOptions.user;\n\n if (!user) {\n continue;\n }\n\n if (user.name) {\n encodedOptions += \"&name=\".concat(encodeURIComponent(user.name));\n }\n\n if (user.email) {\n encodedOptions += \"&email=\".concat(encodeURIComponent(user.email));\n }\n } else {\n encodedOptions += \"&\".concat(encodeURIComponent(key), \"=\").concat(encodeURIComponent(dialogOptions[key]));\n }\n }\n\n return \"\".concat(endpoint, \"?\").concat(encodedOptions);\n}\n\nexport { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport { isThenable } from './is.js';\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\n/** SyncPromise internal states */\n\nvar States;\n\n(function (States) {\n /** Pending */\n var PENDING = 0;\n States[States[\"PENDING\"] = PENDING] = \"PENDING\";\n /** Resolved / OK */\n\n var RESOLVED = 1;\n States[States[\"RESOLVED\"] = RESOLVED] = \"RESOLVED\";\n /** Rejected / Error */\n\n var REJECTED = 2;\n States[States[\"REJECTED\"] = REJECTED] = \"REJECTED\";\n})(States || (States = {})); // 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 */\n\n\nfunction resolvedSyncPromise(value) {\n return new SyncPromise(function (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 */\n\n\nfunction rejectedSyncPromise(reason) {\n return new SyncPromise(function (_, 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 */\n\n\nvar SyncPromise = /*#__PURE__*/function () {\n function SyncPromise(executor) {\n _classCallCheck(this, SyncPromise);\n\n SyncPromise.prototype.__init.call(this);\n\n SyncPromise.prototype.__init2.call(this);\n\n SyncPromise.prototype.__init3.call(this);\n\n SyncPromise.prototype.__init4.call(this);\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 /** JSDoc */\n\n\n _createClass(SyncPromise, [{\n key: \"then\",\n value: function then(onfulfilled, onrejected) {\n var _this = this;\n\n return new SyncPromise(function (resolve, reject) {\n _this._handlers.push([false, function (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 }, function (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 /** JSDoc */\n\n }, {\n key: \"catch\",\n value: function _catch(onrejected) {\n return this.then(function (val) {\n return val;\n }, onrejected);\n }\n /** JSDoc */\n\n }, {\n key: \"finally\",\n value: function _finally(onfinally) {\n var _this2 = this;\n\n return new SyncPromise(function (resolve, reject) {\n var val;\n var isRejected;\n return _this2.then(function (value) {\n isRejected = false;\n val = value;\n\n if (onfinally) {\n onfinally();\n }\n }, function (reason) {\n isRejected = true;\n val = reason;\n\n if (onfinally) {\n onfinally();\n }\n }).then(function () {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val);\n });\n });\n }\n /** JSDoc */\n\n }, {\n key: \"__init\",\n value: function __init() {\n var _this3 = this;\n\n this._resolve = function (value) {\n _this3._setResult(States.RESOLVED, value);\n };\n }\n /** JSDoc */\n\n }, {\n key: \"__init2\",\n value: function __init2() {\n var _this4 = this;\n\n this._reject = function (reason) {\n _this4._setResult(States.REJECTED, reason);\n };\n }\n /** JSDoc */\n\n }, {\n key: \"__init3\",\n value: function __init3() {\n var _this5 = this;\n\n this._setResult = function (state, value) {\n if (_this5._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void value.then(_this5._resolve, _this5._reject);\n return;\n }\n\n _this5._state = state;\n _this5._value = value;\n\n _this5._executeHandlers();\n };\n }\n /** JSDoc */\n\n }, {\n key: \"__init4\",\n value: function __init4() {\n var _this6 = this;\n\n this._executeHandlers = function () {\n if (_this6._state === States.PENDING) {\n return;\n }\n\n var cachedHandlers = _this6._handlers.slice();\n\n _this6._handlers = [];\n cachedHandlers.forEach(function (handler) {\n if (handler[0]) {\n return;\n }\n\n if (_this6._state === States.RESOLVED) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](_this6._value);\n }\n\n if (_this6._state === States.REJECTED) {\n handler[2](_this6._value);\n }\n\n handler[0] = true;\n });\n };\n }\n }]);\n\n return SyncPromise;\n}();\n\nexport { SyncPromise, rejectedSyncPromise, resolvedSyncPromise };","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { consoleSandbox, logger } from './logger.js';\n/** Regular expression used to parse a Dsn. */\n\nvar DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction 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 */\n\n\nfunction dsnToString(dsn) {\n var withPassword = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var host = dsn.host,\n path = dsn.path,\n pass = dsn.pass,\n port = dsn.port,\n projectId = dsn.projectId,\n protocol = dsn.protocol,\n publicKey = dsn.publicKey;\n return \"\".concat(protocol, \"://\").concat(publicKey).concat(withPassword && pass ? \":\".concat(pass) : '') + \"@\".concat(host).concat(port ? \":\".concat(port) : '', \"/\").concat(path ? \"\".concat(path, \"/\") : path).concat(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 */\n\n\nfunction dsnFromString(str) {\n var match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n consoleSandbox(function () {\n // eslint-disable-next-line no-console\n console.error(\"Invalid Sentry Dsn: \".concat(str));\n });\n return undefined;\n }\n\n var _match$slice = match.slice(1),\n _match$slice2 = _slicedToArray(_match$slice, 6),\n protocol = _match$slice2[0],\n publicKey = _match$slice2[1],\n _match$slice2$ = _match$slice2[2],\n pass = _match$slice2$ === void 0 ? '' : _match$slice2$,\n host = _match$slice2[3],\n _match$slice2$2 = _match$slice2[4],\n port = _match$slice2$2 === void 0 ? '' : _match$slice2$2,\n lastPath = _match$slice2[5];\n\n var path = '';\n var projectId = lastPath;\n var split = projectId.split('/');\n\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop();\n }\n\n if (projectId) {\n var projectMatch = projectId.match(/^\\d+/);\n\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({\n host: host,\n pass: pass,\n path: path,\n projectId: projectId,\n port: port,\n protocol: protocol,\n publicKey: publicKey\n });\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 (!DEBUG_BUILD) {\n return true;\n }\n\n var port = dsn.port,\n projectId = dsn.projectId,\n protocol = dsn.protocol;\n var requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];\n var hasMissingRequiredComponent = requiredComponents.find(function (component) {\n if (!dsn[component]) {\n logger.error(\"Invalid Sentry Dsn: \".concat(component, \" missing\"));\n return true;\n }\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 \".concat(projectId));\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n logger.error(\"Invalid Sentry Dsn: Invalid protocol \".concat(protocol));\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n logger.error(\"Invalid Sentry Dsn: Invalid port \".concat(port));\n return false;\n }\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 */\n\n\nfunction makeDsn(from) {\n var components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n\n return components;\n}\n\nexport { dsnFromString, dsnToString, makeDsn };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nvar 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 */\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\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 */\n\n\nfunction isBuiltin(wat, className) {\n return objectToString.call(wat) === \"[object \".concat(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 */\n\n\nfunction isErrorEvent(wat) {\n return 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 */\n\n\nfunction isDOMError(wat) {\n return 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 */\n\n\nfunction isDOMException(wat) {\n return 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 */\n\n\nfunction isString(wat) {\n return isBuiltin(wat, 'String');\n}\n/**\n * Checks whether given string is parameterized\n * {@link isParameterizedString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\n\nfunction isParameterizedString(wat) {\n return _typeof(wat) === 'object' && wat !== null && '__sentry_template_string__' in wat && '__sentry_template_values__' in wat;\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 */\n\n\nfunction isPrimitive(wat) {\n return wat === null || isParameterizedString(wat) || _typeof(wat) !== 'object' && typeof wat !== 'function';\n}\n/**\n * Checks whether given value's type is an object literal, or a class instance.\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\n\nfunction isPlainObject(wat) {\n return 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 */\n\n\nfunction isEvent(wat) {\n return typeof Event !== 'undefined' && isInstanceOf(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 */\n\n\nfunction isElement(wat) {\n return typeof Element !== 'undefined' && isInstanceOf(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 */\n\n\nfunction isRegExp(wat) {\n return isBuiltin(wat, 'RegExp');\n}\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\n\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 * 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 */\n\n\nfunction isSyntheticEvent(wat) {\n return isPlainObject(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 */\n\n\nfunction isNaN(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 */\n\n\nfunction isInstanceOf(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 */\n\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, isParameterizedString, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable, isVueViewModel };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { defineIntegration, convertIntegrationFnToClass } from '@sentry/core';\nimport { fill, getFunctionName, getOriginalFunction } from '@sentry/utils';\nimport { WINDOW, wrap } from '../helpers.js';\nvar DEFAULT_EVENT_TARGET = ['EventTarget', 'Window', 'Node', 'ApplicationCache', 'AudioTrackList', 'BroadcastChannel', 'ChannelMergerNode', 'CryptoOperation', 'EventSource', 'FileReader', 'HTMLUnknownElement', 'IDBDatabase', 'IDBRequest', 'IDBTransaction', 'KeyOperation', 'MediaController', 'MessagePort', 'ModalWindow', 'Notification', 'SVGElementInstance', 'Screen', 'SharedWorker', 'TextTrack', 'TextTrackCue', 'TextTrackList', 'WebSocket', 'WebSocketWorker', 'Worker', 'XMLHttpRequest', 'XMLHttpRequestEventTarget', 'XMLHttpRequestUpload'];\nvar INTEGRATION_NAME = 'TryCatch';\n\nvar _browserApiErrorsIntegration = function _browserApiErrorsIntegration() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _options = _objectSpread({\n XMLHttpRequest: true,\n eventTarget: true,\n requestAnimationFrame: true,\n setInterval: true,\n setTimeout: true\n }, options);\n\n return {\n name: INTEGRATION_NAME,\n // TODO: This currently only works for the first client this is setup\n // We may want to adjust this to check for client etc.\n setupOnce: function setupOnce() {\n if (_options.setTimeout) {\n fill(WINDOW, 'setTimeout', _wrapTimeFunction);\n }\n\n if (_options.setInterval) {\n fill(WINDOW, 'setInterval', _wrapTimeFunction);\n }\n\n if (_options.requestAnimationFrame) {\n fill(WINDOW, 'requestAnimationFrame', _wrapRAF);\n }\n\n if (_options.XMLHttpRequest && 'XMLHttpRequest' in WINDOW) {\n fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n }\n\n var eventTargetOption = _options.eventTarget;\n\n if (eventTargetOption) {\n var eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(_wrapEventTarget);\n }\n }\n };\n};\n\nvar browserApiErrorsIntegration = defineIntegration(_browserApiErrorsIntegration);\n/**\n * Wrap timer functions and event targets to catch errors and provide better meta data.\n * @deprecated Use `browserApiErrorsIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\n\nvar TryCatch = convertIntegrationFnToClass(INTEGRATION_NAME, browserApiErrorsIntegration);\n\nfunction _wrapTimeFunction(original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: {\n function: getFunctionName(original)\n },\n handled: false,\n type: 'instrument'\n }\n });\n return original.apply(this, args);\n };\n} // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\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, [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\nfunction _wrapXHR(originalSend) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function () {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var xhr = this;\n var xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n xmlHttpRequestProps.forEach(function (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 var wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original)\n },\n handled: false,\n type: 'instrument'\n }\n }; // If Instrument integration has been called before TryCatch, get the name of original function\n\n var originalFunction = getOriginalFunction(original);\n\n if (originalFunction) {\n wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n } // Otherwise wrap directly\n\n\n return wrap(original, wrapOptions);\n });\n }\n });\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return originalSend.apply(this, args);\n };\n}\n\nfunction _wrapEventTarget(target) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var globalObject = WINDOW; // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\n var proto = globalObject[target] && globalObject[target].prototype; // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n 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') {\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: target\n },\n handled: false,\n type: 'instrument'\n }\n });\n }\n } catch (err) {// can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.apply(this, [eventName, // 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: target\n },\n handled: false,\n type: 'instrument'\n }\n }), options]);\n };\n });\n fill(proto, 'removeEventListener', function (originalRemoveEventListener // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) {\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 */\n var wrappedEventHandler = fn;\n\n try {\n var originalEventHandler = wrappedEventHandler && wrappedEventHandler.__sentry_wrapped__;\n\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n } catch (e) {// ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n\n return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);\n };\n });\n}\n\nexport { TryCatch, browserApiErrorsIntegration };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { defineIntegration, convertIntegrationFnToClass, getClient, addBreadcrumb } from '@sentry/core';\nimport { addConsoleInstrumentationHandler, addClickKeypressInstrumentationHandler, addXhrInstrumentationHandler, addFetchInstrumentationHandler, addHistoryInstrumentationHandler, getEventDescription, logger, htmlTreeAsString, getComponentName, severityLevelFromString, safeJoin, SENTRY_XHR_DATA_KEY, parseUrl } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n/* eslint-disable max-lines */\n\n/** maxStringLength gets capped to prevent 100 breadcrumbs exceeding 1MB event payload size */\n\nvar MAX_ALLOWED_STRING_LENGTH = 1024;\nvar INTEGRATION_NAME = 'Breadcrumbs';\n\nvar _breadcrumbsIntegration = function _breadcrumbsIntegration() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _options = _objectSpread({\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true\n }, options);\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce: function setupOnce() {},\n // eslint-disable-line @typescript-eslint/no-empty-function\n setup: function setup(client) {\n if (_options.console) {\n addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(client));\n }\n\n if (_options.dom) {\n addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(client, _options.dom));\n }\n\n if (_options.xhr) {\n addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(client));\n }\n\n if (_options.fetch) {\n addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(client));\n }\n\n if (_options.history) {\n addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(client));\n }\n\n if (_options.sentry && client.on) {\n client.on('beforeSendEvent', _getSentryBreadcrumbHandler(client));\n }\n }\n };\n};\n\nvar breadcrumbsIntegration = defineIntegration(_breadcrumbsIntegration);\n/**\n * Default Breadcrumbs instrumentations\n *\n * @deprecated Use `breadcrumbsIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\n\nvar Breadcrumbs = convertIntegrationFnToClass(INTEGRATION_NAME, breadcrumbsIntegration);\n/**\n * Adds a breadcrumb for Sentry events or transactions if this option is enabled.\n */\n\nfunction _getSentryBreadcrumbHandler(client) {\n return function addSentryBreadcrumb(event) {\n if (getClient() !== client) {\n return;\n }\n\n addBreadcrumb({\n category: \"sentry.\".concat(event.type === 'transaction' ? 'transaction' : 'event'),\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event)\n }, {\n event: event\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 */\n\n\nfunction _getDomBreadcrumbHandler(client, dom) {\n return function _innerDomBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n var target;\n var componentName;\n var keyAttrs = _typeof(dom) === 'object' ? dom.serializeAttribute : undefined;\n var maxStringLength = _typeof(dom) === 'object' && typeof dom.maxStringLength === 'number' ? dom.maxStringLength : undefined;\n\n if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {\n DEBUG_BUILD && logger.warn(\"`dom.maxStringLength` cannot exceed \".concat(MAX_ALLOWED_STRING_LENGTH, \", but a value of \").concat(maxStringLength, \" was configured. Sentry will use \").concat(MAX_ALLOWED_STRING_LENGTH, \" instead.\"));\n maxStringLength = MAX_ALLOWED_STRING_LENGTH;\n }\n\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n } // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n\n\n try {\n var event = handlerData.event;\n var element = _isEvent(event) ? event.target : event;\n target = htmlTreeAsString(element, {\n keyAttrs: keyAttrs,\n maxStringLength: maxStringLength\n });\n componentName = getComponentName(element);\n } catch (e) {\n target = '';\n }\n\n if (target.length === 0) {\n return;\n }\n\n var breadcrumb = {\n category: \"ui.\".concat(handlerData.name),\n message: target\n };\n\n if (componentName) {\n breadcrumb.data = {\n 'ui.component_name': componentName\n };\n }\n\n addBreadcrumb(breadcrumb, {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global\n });\n };\n}\n/**\n * Creates breadcrumbs from console API calls\n */\n\n\nfunction _getConsoleBreadcrumbHandler(client) {\n return function _consoleBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n var 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: \".concat(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 addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level\n });\n };\n}\n/**\n * Creates breadcrumbs from XHR API calls\n */\n\n\nfunction _getXhrBreadcrumbHandler(client) {\n return function _xhrBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n var startTimestamp = handlerData.startTimestamp,\n endTimestamp = handlerData.endTimestamp;\n var sentryXhrData = handlerData.xhr[SENTRY_XHR_DATA_KEY]; // We only capture complete, non-sentry requests\n\n if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n return;\n }\n\n var method = sentryXhrData.method,\n url = sentryXhrData.url,\n status_code = sentryXhrData.status_code,\n body = sentryXhrData.body;\n var data = {\n method: method,\n url: url,\n status_code: status_code\n };\n var hint = {\n xhr: handlerData.xhr,\n input: body,\n startTimestamp: startTimestamp,\n endTimestamp: endTimestamp\n };\n addBreadcrumb({\n category: 'xhr',\n data: data,\n type: 'http'\n }, hint);\n };\n}\n/**\n * Creates breadcrumbs from fetch API calls\n */\n\n\nfunction _getFetchBreadcrumbHandler(client) {\n return function _fetchBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n var startTimestamp = handlerData.startTimestamp,\n endTimestamp = handlerData.endTimestamp; // We only capture complete fetch requests\n\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 var data = handlerData.fetchData;\n var hint = {\n data: handlerData.error,\n input: handlerData.args,\n startTimestamp: startTimestamp,\n endTimestamp: endTimestamp\n };\n addBreadcrumb({\n category: 'fetch',\n data: data,\n level: 'error',\n type: 'http'\n }, hint);\n } else {\n var response = handlerData.response;\n\n var _data = _objectSpread(_objectSpread({}, handlerData.fetchData), {}, {\n status_code: response && response.status\n });\n\n var _hint = {\n input: handlerData.args,\n response: response,\n startTimestamp: startTimestamp,\n endTimestamp: endTimestamp\n };\n addBreadcrumb({\n category: 'fetch',\n data: _data,\n type: 'http'\n }, _hint);\n }\n };\n}\n/**\n * Creates breadcrumbs from history API calls\n */\n\n\nfunction _getHistoryBreadcrumbHandler(client) {\n return function _historyBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n var from = handlerData.from;\n var to = handlerData.to;\n var parsedLoc = parseUrl(WINDOW.location.href);\n var parsedFrom = from ? parseUrl(from) : undefined;\n var parsedTo = parseUrl(to); // Initial pushState doesn't provide `from` information\n\n if (!parsedFrom || !parsedFrom.path) {\n 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\n\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n\n addBreadcrumb({\n category: 'navigation',\n data: {\n from: from,\n to: to\n }\n });\n };\n}\n\nfunction _isEvent(event) {\n return !!event && !!event.target;\n}\n\nexport { Breadcrumbs, breadcrumbsIntegration };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { defineIntegration, convertIntegrationFnToClass, getClient, captureEvent } from '@sentry/core';\nimport { addGlobalErrorInstrumentationHandler, isString, addGlobalUnhandledRejectionInstrumentationHandler, isPrimitive, isErrorEvent, getLocationHref, logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { eventFromUnknownInput } from '../eventbuilder.js';\nimport { shouldIgnoreOnError } from '../helpers.js';\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n\nvar INTEGRATION_NAME = 'GlobalHandlers';\n\nvar _globalHandlersIntegration = function _globalHandlersIntegration() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _options = _objectSpread({\n onerror: true,\n onunhandledrejection: true\n }, options);\n\n return {\n name: INTEGRATION_NAME,\n setupOnce: function setupOnce() {\n Error.stackTraceLimit = 50;\n },\n setup: function setup(client) {\n if (_options.onerror) {\n _installGlobalOnErrorHandler(client);\n\n globalHandlerLog('onerror');\n }\n\n if (_options.onunhandledrejection) {\n _installGlobalOnUnhandledRejectionHandler(client);\n\n globalHandlerLog('onunhandledrejection');\n }\n }\n };\n};\n\nvar globalHandlersIntegration = defineIntegration(_globalHandlersIntegration);\n/**\n * Global handlers.\n * @deprecated Use `globalHandlersIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\n\nvar GlobalHandlers = convertIntegrationFnToClass(INTEGRATION_NAME, globalHandlersIntegration);\n\nfunction _installGlobalOnErrorHandler(client) {\n addGlobalErrorInstrumentationHandler(function (data) {\n var _getOptions = getOptions(),\n stackParser = _getOptions.stackParser,\n attachStacktrace = _getOptions.attachStacktrace;\n\n if (getClient() !== client || shouldIgnoreOnError()) {\n return;\n }\n\n var msg = data.msg,\n url = data.url,\n line = data.line,\n column = data.column,\n error = data.error;\n var event = error === undefined && isString(msg) ? _eventFromIncompleteOnError(msg, url, line, column) : _enhanceEventWithInitialFrame(eventFromUnknownInput(stackParser, error || msg, undefined, attachStacktrace, false), url, line, column);\n event.level = 'error';\n captureEvent(event, {\n originalException: error,\n mechanism: {\n handled: false,\n type: 'onerror'\n }\n });\n });\n}\n\nfunction _installGlobalOnUnhandledRejectionHandler(client) {\n addGlobalUnhandledRejectionInstrumentationHandler(function (e) {\n var _getOptions2 = getOptions(),\n stackParser = _getOptions2.stackParser,\n attachStacktrace = _getOptions2.attachStacktrace;\n\n if (getClient() !== client || shouldIgnoreOnError()) {\n return;\n }\n\n var error = _getUnhandledRejectionError(e);\n\n var event = isPrimitive(error) ? _eventFromRejectionWithPrimitive(error) : eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);\n event.level = 'error';\n captureEvent(event, {\n originalException: error,\n mechanism: {\n handled: false,\n type: 'onunhandledrejection'\n }\n });\n });\n}\n\nfunction _getUnhandledRejectionError(error) {\n if (isPrimitive(error)) {\n return error;\n } // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n var e = error; // dig the object of the rejection out of known event types\n\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 return e.reason;\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 return e.detail.reason;\n }\n } catch (e2) {} // eslint-disable-line no-empty\n\n\n return error;\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 */\n\n\nfunction _eventFromRejectionWithPrimitive(reason) {\n return {\n exception: {\n values: [{\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: \".concat(String(reason))\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\n\n\nfunction _eventFromIncompleteOnError(msg, url, line, column) {\n var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i; // If 'message' is ErrorEvent, get real message from inside\n\n var message = isErrorEvent(msg) ? msg.message : msg;\n var name = 'Error';\n var groups = message.match(ERROR_TYPES_RE);\n\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n\n var event = {\n exception: {\n values: [{\n type: name,\n value: message\n }]\n }\n };\n return _enhanceEventWithInitialFrame(event, url, line, column);\n} // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nfunction _enhanceEventWithInitialFrame(event, url, line, column) {\n // event.exception\n var e = event.exception = event.exception || {}; // event.exception.values\n\n var ev = e.values = e.values || []; // event.exception.values[0]\n\n var ev0 = ev[0] = ev[0] || {}; // event.exception.values[0].stacktrace\n\n var ev0s = ev0.stacktrace = ev0.stacktrace || {}; // event.exception.values[0].stacktrace.frames\n\n var ev0sf = ev0s.frames = ev0s.frames || [];\n var colno = isNaN(parseInt(column, 10)) ? undefined : column;\n var lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n var filename = isString(url) && url.length > 0 ? url : getLocationHref(); // event.exception.values[0].stacktrace.frames\n\n if (ev0sf.length === 0) {\n ev0sf.push({\n colno: colno,\n filename: filename,\n function: '?',\n in_app: true,\n lineno: lineno\n });\n }\n\n return event;\n}\n\nfunction globalHandlerLog(type) {\n DEBUG_BUILD && logger.log(\"Global Handler attached: \".concat(type));\n}\n\nfunction getOptions() {\n var client = getClient();\n var options = client && client.getOptions() || {\n stackParser: function stackParser() {\n return [];\n },\n attachStacktrace: false\n };\n return options;\n}\n\nexport { GlobalHandlers, globalHandlersIntegration };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { htmlTreeAsString } from './browser.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { isError, isEvent, isInstanceOf, isElement, isPlainObject, isPrimitive } from './is.js';\nimport { logger } from './logger.js';\nimport { truncate } from './string.js';\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 */\n\nfunction fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n\n var original = source[name];\n var wrapped = replacementFactory(original); // 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\n if (typeof wrapped === 'function') {\n markFunctionWrapped(wrapped, original);\n }\n\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 */\n\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 DEBUG_BUILD && logger.log(\"Failed to add non-enumerable property \\\"\".concat(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 */\n\n\nfunction markFunctionWrapped(wrapped, original) {\n try {\n var 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 */\n\n\nfunction getOriginalFunction(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 */\n\n\nfunction urlEncode(object) {\n return Object.keys(object).map(function (key) {\n return \"\".concat(encodeURIComponent(key), \"=\").concat(encodeURIComponent(object[key]));\n }).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 */\n\n\nfunction convertToPlainObject(value) {\n if (isError(value)) {\n return _objectSpread({\n message: value.message,\n name: value.name,\n stack: value.stack\n }, getOwnProperties(value));\n } else if (isEvent(value)) {\n var newObj = _objectSpread({\n type: value.type,\n target: serializeEventTarget(value.target),\n currentTarget: serializeEventTarget(value.currentTarget)\n }, getOwnProperties(value));\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/** Creates a string representation of the target of an `Event` object */\n\n\nfunction serializeEventTarget(target) {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return '';\n }\n}\n/** Filters out all but an object's own properties */\n\n\nfunction getOwnProperties(obj) {\n if (_typeof(obj) === 'object' && obj !== null) {\n var extractedProps = {};\n\n for (var property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = obj[property];\n }\n }\n\n return extractedProps;\n } else {\n return {};\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 */\n\n\nfunction extractExceptionKeysForMessage(exception) {\n var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 40;\n var 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 (var includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n var serialized = keys.slice(0, includedKeys).join(', ');\n\n if (serialized.length > maxLength) {\n continue;\n }\n\n if (includedKeys === keys.length) {\n return serialized;\n }\n\n return truncate(serialized, maxLength);\n }\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 */\n\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 var memoizationMap = new Map(); // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys(inputValue, memoizationMap) {\n if (isPojo(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 var memoVal = memoizationMap.get(inputValue);\n\n if (memoVal !== undefined) {\n return memoVal;\n }\n\n var returnValue = {}; // Store the mapping of this value in case we visit it again, in case of circular data\n\n memoizationMap.set(inputValue, returnValue);\n\n for (var _i = 0, _Object$keys = Object.keys(inputValue); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n\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 var _memoVal = memoizationMap.get(inputValue);\n\n if (_memoVal !== undefined) {\n return _memoVal;\n }\n\n var _returnValue = []; // Store the mapping of this value in case we visit it again, in case of circular data\n\n memoizationMap.set(inputValue, _returnValue);\n inputValue.forEach(function (item) {\n _returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n });\n return _returnValue;\n }\n\n return inputValue;\n}\n\nfunction isPojo(input) {\n if (!isPlainObject(input)) {\n return false;\n }\n\n try {\n var name = Object.getPrototypeOf(input).constructor.name;\n return !name || name === 'Object';\n } catch (e) {\n return true;\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 */\n\n\nfunction objectify(wat) {\n var objectified;\n\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\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\n case 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\n default:\n objectified = wat;\n break;\n }\n\n return objectified;\n}\n\nexport { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, urlEncode };","import { defineIntegration, convertIntegrationFnToClass } from '@sentry/core';\nimport { applyAggregateErrorsToEvent } from '@sentry/utils';\nimport { exceptionFromError } from '../eventbuilder.js';\nvar DEFAULT_KEY = 'cause';\nvar DEFAULT_LIMIT = 5;\nvar INTEGRATION_NAME = 'LinkedErrors';\n\nvar _linkedErrorsIntegration = function _linkedErrorsIntegration() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var limit = options.limit || DEFAULT_LIMIT;\n var key = options.key || DEFAULT_KEY;\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce: function setupOnce() {},\n // eslint-disable-line @typescript-eslint/no-empty-function\n preprocessEvent: function preprocessEvent(event, hint, client) {\n var options = client.getOptions();\n applyAggregateErrorsToEvent( // This differs from the LinkedErrors integration in core by using a different exceptionFromError function\n exceptionFromError, options.stackParser, options.maxValueLength, key, limit, event, hint);\n }\n };\n};\n\nvar linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration);\n/**\n * Aggregrate linked errors in an event.\n * @deprecated Use `linkedErrorsIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\n\nvar LinkedErrors = convertIntegrationFnToClass(INTEGRATION_NAME, linkedErrorsIntegration);\nexport { LinkedErrors, linkedErrorsIntegration };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { defineIntegration, convertIntegrationFnToClass } from '@sentry/core';\nimport { WINDOW } from '../helpers.js';\nvar INTEGRATION_NAME = 'HttpContext';\n\nvar _httpContextIntegration = function _httpContextIntegration() {\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce: function setupOnce() {},\n // eslint-disable-line @typescript-eslint/no-empty-function\n preprocessEvent: function 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 } // grab as much info as exists and add it to the event\n\n\n var url = event.request && event.request.url || WINDOW.location && WINDOW.location.href;\n\n var _ref = WINDOW.document || {},\n referrer = _ref.referrer;\n\n var _ref2 = WINDOW.navigator || {},\n userAgent = _ref2.userAgent;\n\n var headers = _objectSpread(_objectSpread(_objectSpread({}, event.request && event.request.headers), referrer && {\n Referer: referrer\n }), userAgent && {\n 'User-Agent': userAgent\n });\n\n var request = _objectSpread(_objectSpread(_objectSpread({}, event.request), url && {\n url: url\n }), {}, {\n headers: headers\n });\n\n event.request = request;\n }\n };\n};\n\nvar httpContextIntegration = defineIntegration(_httpContextIntegration);\n/**\n * HttpContext integration collects information about HTTP request headers.\n * @deprecated Use `httpContextIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\n\nvar HttpContext = convertIntegrationFnToClass(INTEGRATION_NAME, httpContextIntegration);\nexport { HttpContext, httpContextIntegration };","import { extractTraceparentData as extractTraceparentData$1 } from '@sentry/utils';\nexport { stripUrlQueryAndFragment } from '@sentry/utils';\nimport { getCurrentHub } from '../hub.js';\n/**\n * Grabs active transaction off scope.\n *\n * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.\n */\n// eslint-disable-next-line deprecation/deprecation\n\nfunction getActiveTransaction(maybeHub) {\n // eslint-disable-next-line deprecation/deprecation\n var hub = maybeHub || getCurrentHub(); // eslint-disable-next-line deprecation/deprecation\n\n var scope = hub.getScope(); // eslint-disable-next-line deprecation/deprecation\n\n return scope.getTransaction();\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 * See https://github.com/getsentry/sentry-javascript/issues/4642 for more details.\n *\n * @deprecated Import this function from `@sentry/utils` instead\n */\n\n\nvar extractTraceparentData = extractTraceparentData$1;\nexport { extractTraceparentData, getActiveTransaction };","var SDK_VERSION = '7.119.1';\nexport { SDK_VERSION };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport { uuid4, timestampInSeconds, logger, dropUndefinedKeys } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { getMetricSummaryJsonForSpan } from '../metrics/metric-summary.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_PROFILE_ID } from '../semanticAttributes.js';\nimport { getRootSpan } from '../utils/getRootSpan.js';\nimport { TRACE_FLAG_SAMPLED, TRACE_FLAG_NONE, spanToJSON, spanTimeInputToSeconds, spanToTraceHeader, spanToTraceContext } from '../utils/spanUtils.js';\nimport { setHttpStatus as _setHttpStatus } from './spanstatus.js';\n/**\n * Keeps track of finished spans for a given transaction\n * @internal\n * @hideconstructor\n * @hidden\n */\n\nvar SpanRecorder = /*#__PURE__*/function () {\n function SpanRecorder() {\n var maxlen = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1000;\n\n _classCallCheck(this, SpanRecorder);\n\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 */\n\n\n _createClass(SpanRecorder, [{\n key: \"add\",\n value: function add(span) {\n if (this.spans.length > this._maxlen) {\n // eslint-disable-next-line deprecation/deprecation\n span.spanRecorder = undefined;\n } else {\n this.spans.push(span);\n }\n }\n }]);\n\n return SpanRecorder;\n}();\n/**\n * Span contains all data about a span\n */\n\n\nvar Span = /*#__PURE__*/function () {\n /**\n * Tags for the span.\n * @deprecated Use `spanToJSON(span).atttributes` instead.\n */\n\n /**\n * Data for the span.\n * @deprecated Use `spanToJSON(span).atttributes` instead.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n /**\n * List of spans that were finalized\n *\n * @deprecated This property will no longer be public. Span recording will be handled internally.\n */\n\n /**\n * @inheritDoc\n * @deprecated Use top level `Sentry.getRootSpan()` instead\n */\n\n /**\n * The instrumenter that created this span.\n *\n * TODO (v8): This can probably be replaced by an `instanceOf` check of the span class.\n * the instrumenter can only be sentry or otel so we can check the span instance\n * to verify which one it is and remove this field entirely.\n *\n * @deprecated This field will be removed.\n */\n\n /** Epoch timestamp in seconds when the span started. */\n\n /** Epoch timestamp in seconds when the span ended. */\n\n /** Internal keeper of the status */\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 function Span() {\n var _objectSpread2;\n\n var spanContext = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, Span);\n\n this._traceId = spanContext.traceId || uuid4();\n this._spanId = spanContext.spanId || uuid4().substring(16);\n this._startTime = spanContext.startTimestamp || timestampInSeconds(); // eslint-disable-next-line deprecation/deprecation\n\n this.tags = spanContext.tags ? _objectSpread({}, spanContext.tags) : {}; // eslint-disable-next-line deprecation/deprecation\n\n this.data = spanContext.data ? _objectSpread({}, spanContext.data) : {}; // eslint-disable-next-line deprecation/deprecation\n\n this.instrumenter = spanContext.instrumenter || 'sentry';\n this._attributes = {};\n this.setAttributes(_objectSpread((_objectSpread2 = {}, _defineProperty(_objectSpread2, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, spanContext.origin || 'manual'), _defineProperty(_objectSpread2, SEMANTIC_ATTRIBUTE_SENTRY_OP, spanContext.op), _objectSpread2), spanContext.attributes)); // eslint-disable-next-line deprecation/deprecation\n\n this._name = spanContext.name || spanContext.description;\n\n if (spanContext.parentSpanId) {\n this._parentSpanId = spanContext.parentSpanId;\n } // We want to include booleans as well here\n\n\n if ('sampled' in spanContext) {\n this._sampled = spanContext.sampled;\n }\n\n if (spanContext.status) {\n this._status = spanContext.status;\n }\n\n if (spanContext.endTimestamp) {\n this._endTime = spanContext.endTimestamp;\n }\n\n if (spanContext.exclusiveTime !== undefined) {\n this._exclusiveTime = spanContext.exclusiveTime;\n }\n\n this._measurements = spanContext.measurements ? _objectSpread({}, spanContext.measurements) : {};\n } // This rule conflicts with another eslint rule :(\n\n /* eslint-disable @typescript-eslint/member-ordering */\n\n /**\n * An alias for `description` of the Span.\n * @deprecated Use `spanToJSON(span).description` instead.\n */\n\n\n _createClass(Span, [{\n key: \"name\",\n get: function get() {\n return this._name || '';\n }\n /**\n * Update the name of the span.\n * @deprecated Use `spanToJSON(span).description` instead.\n */\n ,\n set: function set(name) {\n this.updateName(name);\n }\n /**\n * Get the description of the Span.\n * @deprecated Use `spanToJSON(span).description` instead.\n */\n\n }, {\n key: \"description\",\n get: function get() {\n return this._name;\n }\n /**\n * Get the description of the Span.\n * @deprecated Use `spanToJSON(span).description` instead.\n */\n ,\n set: function set(description) {\n this._name = description;\n }\n /**\n * The ID of the trace.\n * @deprecated Use `spanContext().traceId` instead.\n */\n\n }, {\n key: \"traceId\",\n get: function get() {\n return this._traceId;\n }\n /**\n * The ID of the trace.\n * @deprecated You cannot update the traceId of a span after span creation.\n */\n ,\n set: function set(traceId) {\n this._traceId = traceId;\n }\n /**\n * The ID of the span.\n * @deprecated Use `spanContext().spanId` instead.\n */\n\n }, {\n key: \"spanId\",\n get: function get() {\n return this._spanId;\n }\n /**\n * The ID of the span.\n * @deprecated You cannot update the spanId of a span after span creation.\n */\n ,\n set: function set(spanId) {\n this._spanId = spanId;\n }\n /**\n * @inheritDoc\n *\n * @deprecated Use `startSpan` functions instead.\n */\n\n }, {\n key: \"parentSpanId\",\n get:\n /**\n * @inheritDoc\n *\n * @deprecated Use `spanToJSON(span).parent_span_id` instead.\n */\n function get() {\n return this._parentSpanId;\n }\n /**\n * Was this span chosen to be sent as part of the sample?\n * @deprecated Use `isRecording()` instead.\n */\n ,\n set: function set(string) {\n this._parentSpanId = string;\n }\n }, {\n key: \"sampled\",\n get: function get() {\n return this._sampled;\n }\n /**\n * Was this span chosen to be sent as part of the sample?\n * @deprecated You cannot update the sampling decision of a span after span creation.\n */\n ,\n set: function set(sampled) {\n this._sampled = sampled;\n }\n /**\n * Attributes for the span.\n * @deprecated Use `spanToJSON(span).atttributes` instead.\n */\n\n }, {\n key: \"attributes\",\n get: function get() {\n return this._attributes;\n }\n /**\n * Attributes for the span.\n * @deprecated Use `setAttributes()` instead.\n */\n ,\n set: function set(attributes) {\n this._attributes = attributes;\n }\n /**\n * Timestamp in seconds (epoch time) indicating when the span started.\n * @deprecated Use `spanToJSON()` instead.\n */\n\n }, {\n key: \"startTimestamp\",\n get: function get() {\n return this._startTime;\n }\n /**\n * Timestamp in seconds (epoch time) indicating when the span started.\n * @deprecated In v8, you will not be able to update the span start time after creation.\n */\n ,\n set: function set(startTime) {\n this._startTime = startTime;\n }\n /**\n * Timestamp in seconds when the span ended.\n * @deprecated Use `spanToJSON()` instead.\n */\n\n }, {\n key: \"endTimestamp\",\n get: function get() {\n return this._endTime;\n }\n /**\n * Timestamp in seconds when the span ended.\n * @deprecated Set the end time via `span.end()` instead.\n */\n ,\n set: function set(endTime) {\n this._endTime = endTime;\n }\n /**\n * The status of the span.\n *\n * @deprecated Use `spanToJSON().status` instead to get the status.\n */\n\n }, {\n key: \"status\",\n get: function get() {\n return this._status;\n }\n /**\n * The status of the span.\n *\n * @deprecated Use `.setStatus()` instead to set or update the status.\n */\n ,\n set: function set(status) {\n this._status = status;\n }\n /**\n * Operation of the span\n *\n * @deprecated Use `spanToJSON().op` to read the op instead.\n */\n\n }, {\n key: \"op\",\n get: function get() {\n return this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP];\n }\n /**\n * Operation of the span\n *\n * @deprecated Use `startSpan()` functions to set or `span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'op')\n * to update the span instead.\n */\n ,\n set: function set(op) {\n this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, op);\n }\n /**\n * The origin of the span, giving context about what created the span.\n *\n * @deprecated Use `spanToJSON().origin` to read the origin instead.\n */\n\n }, {\n key: \"origin\",\n get: function get() {\n return this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN];\n }\n /**\n * The origin of the span, giving context about what created the span.\n *\n * @deprecated Use `startSpan()` functions to set the origin instead.\n */\n ,\n set: function set(origin) {\n this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, origin);\n }\n /* eslint-enable @typescript-eslint/member-ordering */\n\n /** @inheritdoc */\n\n }, {\n key: \"spanContext\",\n value: function spanContext() {\n var spanId = this._spanId,\n traceId = this._traceId,\n sampled = this._sampled;\n return {\n spanId: spanId,\n traceId: traceId,\n traceFlags: sampled ? TRACE_FLAG_SAMPLED : TRACE_FLAG_NONE\n };\n }\n /**\n * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.\n * Also the `sampled` decision will be inherited.\n *\n * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.\n */\n\n }, {\n key: \"startChild\",\n value: function startChild(spanContext) {\n var childSpan = new Span(_objectSpread(_objectSpread({}, spanContext), {}, {\n parentSpanId: this._spanId,\n sampled: this._sampled,\n traceId: this._traceId\n })); // eslint-disable-next-line deprecation/deprecation\n\n childSpan.spanRecorder = this.spanRecorder; // eslint-disable-next-line deprecation/deprecation\n\n if (childSpan.spanRecorder) {\n // eslint-disable-next-line deprecation/deprecation\n childSpan.spanRecorder.add(childSpan);\n }\n\n var rootSpan = getRootSpan(this); // TODO: still set span.transaction here until we have a more permanent solution\n // Probably similarly to the weakmap we hold in node-experimental\n // eslint-disable-next-line deprecation/deprecation\n\n childSpan.transaction = rootSpan;\n\n if (DEBUG_BUILD && rootSpan) {\n var opStr = spanContext && spanContext.op || '< unknown op >';\n var nameStr = spanToJSON(childSpan).description || '< unknown name >';\n var idStr = rootSpan.spanContext().spanId;\n var logMessage = \"[Tracing] Starting '\".concat(opStr, \"' span on transaction '\").concat(nameStr, \"' (\").concat(idStr, \").\");\n logger.log(logMessage);\n this._logMessage = logMessage;\n }\n\n return childSpan;\n }\n /**\n * Sets the tag attribute on the current span.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key Tag key\n * @param value Tag value\n * @deprecated Use `setAttribute()` instead.\n */\n\n }, {\n key: \"setTag\",\n value: function setTag(key, value) {\n // eslint-disable-next-line deprecation/deprecation\n this.tags = _objectSpread(_objectSpread({}, this.tags), {}, _defineProperty({}, key, value));\n return this;\n }\n /**\n * Sets the data attribute on the current span\n * @param key Data key\n * @param value Data value\n * @deprecated Use `setAttribute()` instead.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n }, {\n key: \"setData\",\n value: function setData(key, value) {\n // eslint-disable-next-line deprecation/deprecation\n this.data = _objectSpread(_objectSpread({}, this.data), {}, _defineProperty({}, key, value));\n return this;\n }\n /** @inheritdoc */\n\n }, {\n key: \"setAttribute\",\n value: function setAttribute(key, value) {\n if (value === undefined) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._attributes[key];\n } else {\n this._attributes[key] = value;\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"setAttributes\",\n value: function setAttributes(attributes) {\n var _this = this;\n\n Object.keys(attributes).forEach(function (key) {\n return _this.setAttribute(key, attributes[key]);\n });\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"setStatus\",\n value: function setStatus(value) {\n this._status = value;\n return this;\n }\n /**\n * @inheritDoc\n * @deprecated Use top-level `setHttpStatus()` instead.\n */\n\n }, {\n key: \"setHttpStatus\",\n value: function setHttpStatus(httpStatus) {\n _setHttpStatus(this, httpStatus);\n\n return this;\n }\n /**\n * @inheritdoc\n *\n * @deprecated Use `.updateName()` instead.\n */\n\n }, {\n key: \"setName\",\n value: function setName(name) {\n this.updateName(name);\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"updateName\",\n value: function updateName(name) {\n this._name = name;\n return this;\n }\n /**\n * @inheritDoc\n *\n * @deprecated Use `spanToJSON(span).status === 'ok'` instead.\n */\n\n }, {\n key: \"isSuccess\",\n value: function isSuccess() {\n return this._status === 'ok';\n }\n /**\n * @inheritDoc\n *\n * @deprecated Use `.end()` instead.\n */\n\n }, {\n key: \"finish\",\n value: function finish(endTimestamp) {\n return this.end(endTimestamp);\n }\n /** @inheritdoc */\n\n }, {\n key: \"end\",\n value: function end(endTimestamp) {\n // If already ended, skip\n if (this._endTime) {\n return;\n }\n\n var rootSpan = getRootSpan(this);\n\n if (DEBUG_BUILD && // Don't call this for transactions\n rootSpan && rootSpan.spanContext().spanId !== this._spanId) {\n var logMessage = this._logMessage;\n\n if (logMessage) {\n logger.log(logMessage.replace('Starting', 'Finishing'));\n }\n }\n\n this._endTime = spanTimeInputToSeconds(endTimestamp);\n }\n /**\n * @inheritDoc\n *\n * @deprecated Use `spanToTraceHeader()` instead.\n */\n\n }, {\n key: \"toTraceparent\",\n value: function toTraceparent() {\n return spanToTraceHeader(this);\n }\n /**\n * @inheritDoc\n *\n * @deprecated Use `spanToJSON()` or access the fields directly instead.\n */\n\n }, {\n key: \"toContext\",\n value: function toContext() {\n return dropUndefinedKeys({\n data: this._getData(),\n description: this._name,\n endTimestamp: this._endTime,\n // eslint-disable-next-line deprecation/deprecation\n op: this.op,\n parentSpanId: this._parentSpanId,\n sampled: this._sampled,\n spanId: this._spanId,\n startTimestamp: this._startTime,\n status: this._status,\n // eslint-disable-next-line deprecation/deprecation\n tags: this.tags,\n traceId: this._traceId\n });\n }\n /**\n * @inheritDoc\n *\n * @deprecated Update the fields directly instead.\n */\n\n }, {\n key: \"updateWithContext\",\n value: function updateWithContext(spanContext) {\n // eslint-disable-next-line deprecation/deprecation\n this.data = spanContext.data || {}; // eslint-disable-next-line deprecation/deprecation\n\n this._name = spanContext.name || spanContext.description;\n this._endTime = spanContext.endTimestamp; // eslint-disable-next-line deprecation/deprecation\n\n this.op = spanContext.op;\n this._parentSpanId = spanContext.parentSpanId;\n this._sampled = spanContext.sampled;\n this._spanId = spanContext.spanId || this._spanId;\n this._startTime = spanContext.startTimestamp || this._startTime;\n this._status = spanContext.status; // eslint-disable-next-line deprecation/deprecation\n\n this.tags = spanContext.tags || {};\n this._traceId = spanContext.traceId || this._traceId;\n return this;\n }\n /**\n * @inheritDoc\n *\n * @deprecated Use `spanToTraceContext()` util function instead.\n */\n\n }, {\n key: \"getTraceContext\",\n value: function getTraceContext() {\n return spanToTraceContext(this);\n }\n /**\n * Get JSON representation of this span.\n *\n * @hidden\n * @internal This method is purely for internal purposes and should not be used outside\n * of SDK code. If you need to get a JSON representation of a span,\n * use `spanToJSON(span)` instead.\n */\n\n }, {\n key: \"getSpanJSON\",\n value: function getSpanJSON() {\n return dropUndefinedKeys({\n data: this._getData(),\n description: this._name,\n op: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n parent_span_id: this._parentSpanId,\n span_id: this._spanId,\n start_timestamp: this._startTime,\n status: this._status,\n // eslint-disable-next-line deprecation/deprecation\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n timestamp: this._endTime,\n trace_id: this._traceId,\n origin: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN],\n _metrics_summary: getMetricSummaryJsonForSpan(this),\n profile_id: this._attributes[SEMANTIC_ATTRIBUTE_PROFILE_ID],\n exclusive_time: this._exclusiveTime,\n measurements: Object.keys(this._measurements).length > 0 ? this._measurements : undefined\n });\n }\n /** @inheritdoc */\n\n }, {\n key: \"isRecording\",\n value: function isRecording() {\n return !this._endTime && !!this._sampled;\n }\n /**\n * Convert the object to JSON.\n * @deprecated Use `spanToJSON(span)` instead.\n */\n\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n return this.getSpanJSON();\n }\n /**\n * Get the merged data for this span.\n * For now, this combines `data` and `attributes` together,\n * until eventually we can ingest `attributes` directly.\n */\n\n }, {\n key: \"_getData\",\n value: function _getData() {\n // eslint-disable-next-line deprecation/deprecation\n var data = this.data,\n attributes = this._attributes;\n var hasData = Object.keys(data).length > 0;\n var hasAttributes = Object.keys(attributes).length > 0;\n\n if (!hasData && !hasAttributes) {\n return undefined;\n }\n\n if (hasData && hasAttributes) {\n return _objectSpread(_objectSpread({}, data), attributes);\n }\n\n return hasData ? data : attributes;\n }\n }]);\n\n return Span;\n}();\n\nexport { Span, SpanRecorder };","import { getClient } from '../exports.js'; // 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 */\n\nfunction hasTracingEnabled(maybeOptions) {\n if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) {\n return false;\n }\n\n var client = getClient();\n var options = maybeOptions || client && client.getOptions();\n return !!options && (options.enableTracing || 'tracesSampleRate' in options || 'tracesSampler' in options);\n}\n\nexport { hasTracingEnabled };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport { isThenable, uuid4, dateTimestampInSeconds, consoleSandbox, logger, GLOBAL_OBJ, getGlobalSingleton } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { Scope } from './scope.js';\nimport { closeSession, makeSession, updateSession } from './session.js';\nimport { SDK_VERSION } from './version.js';\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 */\n\nvar API_VERSION = parseFloat(SDK_VERSION);\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\n\nvar DEFAULT_BREADCRUMBS = 100;\n/**\n * @deprecated The `Hub` class will be removed in version 8 of the SDK in favour of `Scope` and `Client` objects.\n *\n * If you previously used the `Hub` class directly, replace it with `Scope` and `Client` objects. More information:\n * - [Multiple Sentry Instances](https://docs.sentry.io/platforms/javascript/best-practices/multiple-sentry-instances/)\n * - [Browser Extensions](https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/)\n *\n * Some of our APIs are typed with the Hub class instead of the interface (e.g. `getCurrentHub`). Most of them are deprecated\n * themselves and will also be removed in version 8. More information:\n * - [Migration Guide](https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md#deprecate-hub)\n */\n// eslint-disable-next-line deprecation/deprecation\n\nvar Hub = /*#__PURE__*/function () {\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 * @deprecated Instantiation of Hub objects is deprecated and the constructor will be removed in version 8 of the SDK.\n *\n * If you are currently using the Hub for multi-client use like so:\n *\n * ```\n * // OLD\n * const hub = new Hub();\n * hub.bindClient(client);\n * makeMain(hub)\n * ```\n *\n * instead initialize the client as follows:\n *\n * ```\n * // NEW\n * Sentry.withIsolationScope(() => {\n * Sentry.setCurrentClient(client);\n * client.init();\n * });\n * ```\n *\n * If you are using the Hub to capture events like so:\n *\n * ```\n * // OLD\n * const client = new Client();\n * const hub = new Hub(client);\n * hub.captureException()\n * ```\n *\n * instead capture isolated events as follows:\n *\n * ```\n * // NEW\n * const client = new Client();\n * const scope = new Scope();\n * scope.setClient(client);\n * scope.captureException();\n * ```\n */\n function Hub(client, scope, isolationScope) {\n var _version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : API_VERSION;\n\n _classCallCheck(this, Hub);\n\n this._version = _version;\n var assignedScope;\n\n if (!scope) {\n assignedScope = new Scope();\n assignedScope.setClient(client);\n } else {\n assignedScope = scope;\n }\n\n var assignedIsolationScope;\n\n if (!isolationScope) {\n assignedIsolationScope = new Scope();\n assignedIsolationScope.setClient(client);\n } else {\n assignedIsolationScope = isolationScope;\n }\n\n this._stack = [{\n scope: assignedScope\n }];\n\n if (client) {\n // eslint-disable-next-line deprecation/deprecation\n this.bindClient(client);\n }\n\n this._isolationScope = assignedIsolationScope;\n }\n /**\n * Checks if this hub's version is older than the given version.\n *\n * @param version A version number to compare to.\n * @return True if the given version is newer; otherwise false.\n *\n * @deprecated This will be removed in v8.\n */\n\n\n _createClass(Hub, [{\n key: \"isOlderThan\",\n value: function isOlderThan(version) {\n return this._version < version;\n }\n /**\n * This binds the given client to the current scope.\n * @param client An SDK client (client) instance.\n *\n * @deprecated Use `initAndBind()` directly, or `setCurrentClient()` and/or `client.init()` instead.\n */\n\n }, {\n key: \"bindClient\",\n value: function bindClient(client) {\n // eslint-disable-next-line deprecation/deprecation\n var top = this.getStackTop();\n top.client = client;\n top.scope.setClient(client); // eslint-disable-next-line deprecation/deprecation\n\n if (client && client.setupIntegrations) {\n // eslint-disable-next-line deprecation/deprecation\n client.setupIntegrations();\n }\n }\n /**\n * @inheritDoc\n *\n * @deprecated Use `withScope` instead.\n */\n\n }, {\n key: \"pushScope\",\n value: function pushScope() {\n // We want to clone the content of prev scope\n // eslint-disable-next-line deprecation/deprecation\n var scope = this.getScope().clone(); // eslint-disable-next-line deprecation/deprecation\n\n this.getStack().push({\n // eslint-disable-next-line deprecation/deprecation\n client: this.getClient(),\n scope: scope\n });\n return scope;\n }\n /**\n * @inheritDoc\n *\n * @deprecated Use `withScope` instead.\n */\n\n }, {\n key: \"popScope\",\n value: function popScope() {\n // eslint-disable-next-line deprecation/deprecation\n if (this.getStack().length <= 1) return false; // eslint-disable-next-line deprecation/deprecation\n\n return !!this.getStack().pop();\n }\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.withScope()` instead.\n */\n\n }, {\n key: \"withScope\",\n value: function withScope(callback) {\n var _this = this;\n\n // eslint-disable-next-line deprecation/deprecation\n var scope = this.pushScope();\n var maybePromiseResult;\n\n try {\n maybePromiseResult = callback(scope);\n } catch (e) {\n // eslint-disable-next-line deprecation/deprecation\n this.popScope();\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n // @ts-expect-error - isThenable returns the wrong type\n return maybePromiseResult.then(function (res) {\n // eslint-disable-next-line deprecation/deprecation\n _this.popScope();\n\n return res;\n }, function (e) {\n // eslint-disable-next-line deprecation/deprecation\n _this.popScope();\n\n throw e;\n });\n } // eslint-disable-next-line deprecation/deprecation\n\n\n this.popScope();\n return maybePromiseResult;\n }\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.getClient()` instead.\n */\n\n }, {\n key: \"getClient\",\n value: function getClient() {\n // eslint-disable-next-line deprecation/deprecation\n return this.getStackTop().client;\n }\n /**\n * Returns the scope of the top stack.\n *\n * @deprecated Use `Sentry.getCurrentScope()` instead.\n */\n\n }, {\n key: \"getScope\",\n value: function getScope() {\n // eslint-disable-next-line deprecation/deprecation\n return this.getStackTop().scope;\n }\n /**\n * @deprecated Use `Sentry.getIsolationScope()` instead.\n */\n\n }, {\n key: \"getIsolationScope\",\n value: function getIsolationScope() {\n return this._isolationScope;\n }\n /**\n * Returns the scope stack for domains or the process.\n * @deprecated This will be removed in v8.\n */\n\n }, {\n key: \"getStack\",\n value: function getStack() {\n return this._stack;\n }\n /**\n * Returns the topmost scope layer in the order domain > local > process.\n * @deprecated This will be removed in v8.\n */\n\n }, {\n key: \"getStackTop\",\n value: function getStackTop() {\n return this._stack[this._stack.length - 1];\n }\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.captureException()` instead.\n */\n\n }, {\n key: \"captureException\",\n value: function captureException(exception, hint) {\n var eventId = this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4();\n var syntheticException = new Error('Sentry syntheticException'); // eslint-disable-next-line deprecation/deprecation\n\n this.getScope().captureException(exception, _objectSpread(_objectSpread({\n originalException: exception,\n syntheticException: syntheticException\n }, hint), {}, {\n event_id: eventId\n }));\n return eventId;\n }\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.captureMessage()` instead.\n */\n\n }, {\n key: \"captureMessage\",\n value: function captureMessage(message, // eslint-disable-next-line deprecation/deprecation\n level, hint) {\n var eventId = this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4();\n var syntheticException = new Error(message); // eslint-disable-next-line deprecation/deprecation\n\n this.getScope().captureMessage(message, level, _objectSpread(_objectSpread({\n originalException: message,\n syntheticException: syntheticException\n }, hint), {}, {\n event_id: eventId\n }));\n return eventId;\n }\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.captureEvent()` instead.\n */\n\n }, {\n key: \"captureEvent\",\n value: function captureEvent(event, hint) {\n var eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!event.type) {\n this._lastEventId = eventId;\n } // eslint-disable-next-line deprecation/deprecation\n\n\n this.getScope().captureEvent(event, _objectSpread(_objectSpread({}, hint), {}, {\n event_id: eventId\n }));\n return eventId;\n }\n /**\n * @inheritDoc\n *\n * @deprecated This will be removed in v8.\n */\n\n }, {\n key: \"lastEventId\",\n value: function lastEventId() {\n return this._lastEventId;\n }\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.addBreadcrumb()` instead.\n */\n\n }, {\n key: \"addBreadcrumb\",\n value: function addBreadcrumb(breadcrumb, hint) {\n // eslint-disable-next-line deprecation/deprecation\n var _this$getStackTop = this.getStackTop(),\n scope = _this$getStackTop.scope,\n client = _this$getStackTop.client;\n\n if (!client) return;\n\n var _ref = client.getOptions && client.getOptions() || {},\n _ref$beforeBreadcrumb = _ref.beforeBreadcrumb,\n beforeBreadcrumb = _ref$beforeBreadcrumb === void 0 ? null : _ref$beforeBreadcrumb,\n _ref$maxBreadcrumbs = _ref.maxBreadcrumbs,\n maxBreadcrumbs = _ref$maxBreadcrumbs === void 0 ? DEFAULT_BREADCRUMBS : _ref$maxBreadcrumbs;\n\n if (maxBreadcrumbs <= 0) return;\n var timestamp = dateTimestampInSeconds();\n\n var mergedBreadcrumb = _objectSpread({\n timestamp: timestamp\n }, breadcrumb);\n\n var finalBreadcrumb = beforeBreadcrumb ? consoleSandbox(function () {\n return beforeBreadcrumb(mergedBreadcrumb, hint);\n }) : mergedBreadcrumb;\n if (finalBreadcrumb === null) return;\n\n if (client.emit) {\n client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n } // TODO(v8): I know this comment doesn't make much sense because the hub will be deprecated but I still wanted to\n // write it down. In theory, we would have to add the breadcrumbs to the isolation scope here, however, that would\n // duplicate all of the breadcrumbs. There was the possibility of adding breadcrumbs to both, the isolation scope\n // and the normal scope, and deduplicating it down the line in the event processing pipeline. However, that would\n // have been very fragile, because the breadcrumb objects would have needed to keep their identity all throughout\n // the event processing pipeline.\n // In the new implementation, the top level `Sentry.addBreadcrumb()` should ONLY write to the isolation scope.\n\n\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n }\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setUser()` instead.\n */\n\n }, {\n key: \"setUser\",\n value: function setUser(user) {\n // TODO(v8): The top level `Sentry.setUser()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setUser(user); // eslint-disable-next-line deprecation/deprecation\n\n this.getIsolationScope().setUser(user);\n }\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setTags()` instead.\n */\n\n }, {\n key: \"setTags\",\n value: function setTags(tags) {\n // TODO(v8): The top level `Sentry.setTags()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setTags(tags); // eslint-disable-next-line deprecation/deprecation\n\n this.getIsolationScope().setTags(tags);\n }\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setExtras()` instead.\n */\n\n }, {\n key: \"setExtras\",\n value: function setExtras(extras) {\n // TODO(v8): The top level `Sentry.setExtras()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setExtras(extras); // eslint-disable-next-line deprecation/deprecation\n\n this.getIsolationScope().setExtras(extras);\n }\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setTag()` instead.\n */\n\n }, {\n key: \"setTag\",\n value: function setTag(key, value) {\n // TODO(v8): The top level `Sentry.setTag()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setTag(key, value); // eslint-disable-next-line deprecation/deprecation\n\n this.getIsolationScope().setTag(key, value);\n }\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setExtra()` instead.\n */\n\n }, {\n key: \"setExtra\",\n value: function setExtra(key, extra) {\n // TODO(v8): The top level `Sentry.setExtra()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setExtra(key, extra); // eslint-disable-next-line deprecation/deprecation\n\n this.getIsolationScope().setExtra(key, extra);\n }\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setContext()` instead.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n }, {\n key: \"setContext\",\n value: function setContext(name, context) {\n // TODO(v8): The top level `Sentry.setContext()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setContext(name, context); // eslint-disable-next-line deprecation/deprecation\n\n this.getIsolationScope().setContext(name, context);\n }\n /**\n * @inheritDoc\n *\n * @deprecated Use `getScope()` directly.\n */\n\n }, {\n key: \"configureScope\",\n value: function configureScope(callback) {\n // eslint-disable-next-line deprecation/deprecation\n var _this$getStackTop2 = this.getStackTop(),\n scope = _this$getStackTop2.scope,\n client = _this$getStackTop2.client;\n\n if (client) {\n callback(scope);\n }\n }\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n\n }, {\n key: \"run\",\n value: function run(callback) {\n // eslint-disable-next-line deprecation/deprecation\n var oldHub = makeMain(this);\n\n try {\n callback(this);\n } finally {\n // eslint-disable-next-line deprecation/deprecation\n makeMain(oldHub);\n }\n }\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.getClient().getIntegrationByName()` instead.\n */\n\n }, {\n key: \"getIntegration\",\n value: function getIntegration(integration) {\n // eslint-disable-next-line deprecation/deprecation\n var client = this.getClient();\n if (!client) return null;\n\n try {\n // eslint-disable-next-line deprecation/deprecation\n return client.getIntegration(integration);\n } catch (_oO) {\n DEBUG_BUILD && logger.warn(\"Cannot retrieve integration \".concat(integration.id, \" from the current Hub\"));\n return null;\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 `.end()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\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 *\n * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.\n */\n\n }, {\n key: \"startTransaction\",\n value: function startTransaction(context, customSamplingContext) {\n var result = this._callExtensionMethod('startTransaction', context, customSamplingContext);\n\n if (DEBUG_BUILD && !result) {\n // eslint-disable-next-line deprecation/deprecation\n var client = this.getClient();\n\n if (!client) {\n logger.warn(\"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'\");\n } else {\n logger.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 * @inheritDoc\n * @deprecated Use `spanToTraceHeader()` instead.\n */\n\n }, {\n key: \"traceHeaders\",\n value: function traceHeaders() {\n return this._callExtensionMethod('traceHeaders');\n }\n /**\n * @inheritDoc\n *\n * @deprecated Use top level `captureSession` instead.\n */\n\n }, {\n key: \"captureSession\",\n value: function captureSession() {\n var endSession = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n // both send the update and pull the session from the scope\n if (endSession) {\n // eslint-disable-next-line deprecation/deprecation\n return this.endSession();\n } // only send the update\n\n\n this._sendSessionUpdate();\n }\n /**\n * @inheritDoc\n * @deprecated Use top level `endSession` instead.\n */\n\n }, {\n key: \"endSession\",\n value: function endSession() {\n // eslint-disable-next-line deprecation/deprecation\n var layer = this.getStackTop();\n var scope = layer.scope;\n var session = scope.getSession();\n\n if (session) {\n closeSession(session);\n }\n\n this._sendSessionUpdate(); // the session is over; take it off of the scope\n\n\n scope.setSession();\n }\n /**\n * @inheritDoc\n * @deprecated Use top level `startSession` instead.\n */\n\n }, {\n key: \"startSession\",\n value: function startSession(context) {\n // eslint-disable-next-line deprecation/deprecation\n var _this$getStackTop3 = this.getStackTop(),\n scope = _this$getStackTop3.scope,\n client = _this$getStackTop3.client;\n\n var _ref2 = client && client.getOptions() || {},\n release = _ref2.release,\n _ref2$environment = _ref2.environment,\n environment = _ref2$environment === void 0 ? DEFAULT_ENVIRONMENT : _ref2$environment; // Will fetch userAgent if called from browser sdk\n\n\n var _ref3 = GLOBAL_OBJ.navigator || {},\n userAgent = _ref3.userAgent;\n\n var session = makeSession(_objectSpread(_objectSpread({\n release: release,\n environment: environment,\n user: scope.getUser()\n }, userAgent && {\n userAgent: userAgent\n }), context)); // End existing session if there's one\n\n var currentSession = scope.getSession && scope.getSession();\n\n if (currentSession && currentSession.status === 'ok') {\n updateSession(currentSession, {\n status: 'exited'\n });\n } // eslint-disable-next-line deprecation/deprecation\n\n\n this.endSession(); // Afterwards we set the new session on the scope\n\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 *\n * @deprecated Use top-level `getClient().getOptions().sendDefaultPii` instead. This function\n * only unnecessarily increased API surface but only wrapped accessing the option.\n */\n\n }, {\n key: \"shouldSendDefaultPii\",\n value: function shouldSendDefaultPii() {\n // eslint-disable-next-line deprecation/deprecation\n var client = this.getClient();\n var options = client && client.getOptions();\n return Boolean(options && options.sendDefaultPii);\n }\n /**\n * Sends the current Session on the scope\n */\n\n }, {\n key: \"_sendSessionUpdate\",\n value: function _sendSessionUpdate() {\n // eslint-disable-next-line deprecation/deprecation\n var _this$getStackTop4 = this.getStackTop(),\n scope = _this$getStackTop4.scope,\n client = _this$getStackTop4.client;\n\n var session = scope.getSession();\n\n if (session && client && client.captureSession) {\n client.captureSession(session);\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\n }, {\n key: \"_callExtensionMethod\",\n value: function _callExtensionMethod(method) {\n var carrier = getMainCarrier();\n var sentry = carrier.__SENTRY__;\n\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return sentry.extensions[method].apply(this, args);\n }\n\n DEBUG_BUILD && logger.warn(\"Extension method \".concat(method, \" couldn't be found, doing nothing.\"));\n }\n }]);\n\n return Hub;\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 **/\n\n\nfunction getMainCarrier() {\n GLOBAL_OBJ.__SENTRY__ = GLOBAL_OBJ.__SENTRY__ || {\n extensions: {},\n hub: undefined\n };\n return 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 *\n * @deprecated Use `setCurrentClient()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\n\n\nfunction makeMain(hub) {\n var registry = getMainCarrier();\n var oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(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 *\n * @deprecated Use the respective replacement method directly instead.\n */\n// eslint-disable-next-line deprecation/deprecation\n\n\nfunction getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n var hub = registry.__SENTRY__.acs.getCurrentHub();\n\n if (hub) {\n return hub;\n }\n } // Return hub that lives on a global object\n\n\n return getGlobalHub(registry);\n}\n/**\n * Get the currently active isolation scope.\n * The isolation scope is active for the current exection context,\n * meaning that it will remain stable for the same Hub.\n */\n\n\nfunction getIsolationScope() {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().getIsolationScope();\n} // eslint-disable-next-line deprecation/deprecation\n\n\nfunction getGlobalHub() {\n var registry = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || // eslint-disable-next-line deprecation/deprecation\n getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n // eslint-disable-next-line deprecation/deprecation\n setHubOnCarrier(registry, new Hub());\n } // Return hub that lives on a global object\n\n\n return getHubFromCarrier(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 */\n// eslint-disable-next-line deprecation/deprecation\n\n\nfunction ensureHubOnCarrier(carrier) {\n var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getGlobalHub();\n\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(carrier) || // eslint-disable-next-line deprecation/deprecation\n getHubFromCarrier(carrier).isOlderThan(API_VERSION)) {\n // eslint-disable-next-line deprecation/deprecation\n var client = parent.getClient(); // eslint-disable-next-line deprecation/deprecation\n\n var scope = parent.getScope(); // eslint-disable-next-line deprecation/deprecation\n\n var isolationScope = parent.getIsolationScope(); // eslint-disable-next-line deprecation/deprecation\n\n setHubOnCarrier(carrier, new Hub(client, scope.clone(), isolationScope.clone()));\n }\n}\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */\n\n\nfunction setAsyncContextStrategy(strategy) {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\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 */\n\n\nfunction runWithAsyncContext(callback) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n return registry.__SENTRY__.acs.runWithAsyncContext(callback, options);\n } // if there was no strategy, fallback to just calling the callback\n\n\n return callback();\n}\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\n\n\nfunction 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 */\n// eslint-disable-next-line deprecation/deprecation\n\n\nfunction getHubFromCarrier(carrier) {\n // eslint-disable-next-line deprecation/deprecation\n return getGlobalSingleton('hub', function () {\n return new Hub();\n }, 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 */\n// eslint-disable-next-line deprecation/deprecation\n\n\nfunction setHubOnCarrier(carrier, hub) {\n if (!carrier) return false;\n\n var __SENTRY__ = carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n\n __SENTRY__.hub = hub;\n return true;\n}\n\nexport { API_VERSION, Hub, ensureHubOnCarrier, getCurrentHub, getHubFromCarrier, getIsolationScope, getMainCarrier, makeMain, runWithAsyncContext, setAsyncContextStrategy, setHubOnCarrier };","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport { logger, getEventDescription, stringMatchesSomePattern } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { convertIntegrationFnToClass, defineIntegration } from '../integration.js'; // \"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.\n\nvar DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/, /^ResizeObserver loop completed with undelivered notifications.$/, /^Cannot redefine property: googletag$/];\nvar DEFAULT_IGNORE_TRANSACTIONS = [/^.*\\/healthcheck$/, /^.*\\/healthy$/, /^.*\\/live$/, /^.*\\/ready$/, /^.*\\/heartbeat$/, /^.*\\/health$/, /^.*\\/healthz$/];\n/** Options for the InboundFilters integration */\n\nvar INTEGRATION_NAME = 'InboundFilters';\n\nvar _inboundFiltersIntegration = function _inboundFiltersIntegration() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce: function setupOnce() {},\n // eslint-disable-line @typescript-eslint/no-empty-function\n processEvent: function processEvent(event, _hint, client) {\n var clientOptions = client.getOptions();\n\n var mergedOptions = _mergeOptions(options, clientOptions);\n\n return _shouldDropEvent(event, mergedOptions) ? null : event;\n }\n };\n};\n\nvar inboundFiltersIntegration = defineIntegration(_inboundFiltersIntegration);\n/**\n * Inbound filters configurable by the user.\n * @deprecated Use `inboundFiltersIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\n\nvar InboundFilters = convertIntegrationFnToClass(INTEGRATION_NAME, inboundFiltersIntegration);\n\nfunction _mergeOptions() {\n var internalOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var clientOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return {\n allowUrls: [].concat(_toConsumableArray(internalOptions.allowUrls || []), _toConsumableArray(clientOptions.allowUrls || [])),\n denyUrls: [].concat(_toConsumableArray(internalOptions.denyUrls || []), _toConsumableArray(clientOptions.denyUrls || [])),\n ignoreErrors: [].concat(_toConsumableArray(internalOptions.ignoreErrors || []), _toConsumableArray(clientOptions.ignoreErrors || []), _toConsumableArray(internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS)),\n ignoreTransactions: [].concat(_toConsumableArray(internalOptions.ignoreTransactions || []), _toConsumableArray(clientOptions.ignoreTransactions || []), _toConsumableArray(internalOptions.disableTransactionDefaults ? [] : DEFAULT_IGNORE_TRANSACTIONS)),\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true\n };\n}\n\nfunction _shouldDropEvent(event, options) {\n if (options.ignoreInternal && _isSentryError(event)) {\n DEBUG_BUILD && logger.warn(\"Event dropped due to being internal Sentry Error.\\nEvent: \".concat(getEventDescription(event)));\n return true;\n }\n\n if (_isIgnoredError(event, options.ignoreErrors)) {\n DEBUG_BUILD && logger.warn(\"Event dropped due to being matched by `ignoreErrors` option.\\nEvent: \".concat(getEventDescription(event)));\n return true;\n }\n\n if (_isIgnoredTransaction(event, options.ignoreTransactions)) {\n DEBUG_BUILD && logger.warn(\"Event dropped due to being matched by `ignoreTransactions` option.\\nEvent: \".concat(getEventDescription(event)));\n return true;\n }\n\n if (_isDeniedUrl(event, options.denyUrls)) {\n DEBUG_BUILD && logger.warn(\"Event dropped due to being matched by `denyUrls` option.\\nEvent: \".concat(getEventDescription(event), \".\\nUrl: \").concat(_getEventFilterUrl(event)));\n return true;\n }\n\n if (!_isAllowedUrl(event, options.allowUrls)) {\n DEBUG_BUILD && logger.warn(\"Event dropped due to not being matched by `allowUrls` option.\\nEvent: \".concat(getEventDescription(event), \".\\nUrl: \").concat(_getEventFilterUrl(event)));\n return true;\n }\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(function (message) {\n return stringMatchesSomePattern(message, ignoreErrors);\n });\n}\n\nfunction _isIgnoredTransaction(event, ignoreTransactions) {\n if (event.type !== 'transaction' || !ignoreTransactions || !ignoreTransactions.length) {\n return false;\n }\n\n var 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\n var url = _getEventFilterUrl(event);\n\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\n var url = _getEventFilterUrl(event);\n\n return !url ? true : stringMatchesSomePattern(url, allowUrls);\n}\n\nfunction _getPossibleEventMessages(event) {\n var possibleMessages = [];\n\n if (event.message) {\n possibleMessages.push(event.message);\n }\n\n var lastException;\n\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) {// 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\n if (lastException.type) {\n possibleMessages.push(\"\".concat(lastException.type, \": \").concat(lastException.value));\n }\n }\n }\n\n if (DEBUG_BUILD && possibleMessages.length === 0) {\n logger.error(\"Could not extract message for event \".concat(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) {// ignore\n }\n\n return false;\n}\n\nfunction _getLastValidUrl() {\n var frames = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n for (var i = frames.length - 1; i >= 0; i--) {\n var 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 var frames;\n\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) {// ignore\n }\n\n return frames ? _getLastValidUrl(frames) : null;\n } catch (oO) {\n DEBUG_BUILD && logger.error(\"Cannot extract url for event \".concat(getEventDescription(event)));\n return null;\n }\n}\n\nexport { InboundFilters, inboundFiltersIntegration };","import { getOriginalFunction } from '@sentry/utils';\nimport { getClient } from '../exports.js';\nimport { convertIntegrationFnToClass, defineIntegration } from '../integration.js';\nvar originalFunctionToString;\nvar INTEGRATION_NAME = 'FunctionToString';\nvar SETUP_CLIENTS = new WeakMap();\n\nvar _functionToStringIntegration = function _functionToStringIntegration() {\n return {\n name: INTEGRATION_NAME,\n setupOnce: function setupOnce() {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString; // 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\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function () {\n var originalFunction = getOriginalFunction(this);\n var context = SETUP_CLIENTS.has(getClient()) && originalFunction !== undefined ? originalFunction : this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return originalFunctionToString.apply(context, args);\n };\n } catch (e) {// ignore errors here, just don't patch this\n }\n },\n setup: function setup(client) {\n SETUP_CLIENTS.set(client, true);\n }\n };\n};\n/**\n * Patch toString calls to return proper name for wrapped functions.\n *\n * ```js\n * Sentry.init({\n * integrations: [\n * functionToStringIntegration(),\n * ],\n * });\n * ```\n */\n\n\nvar functionToStringIntegration = defineIntegration(_functionToStringIntegration);\n/**\n * Patch toString calls to return proper name for wrapped functions.\n *\n * @deprecated Use `functionToStringIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\n\nvar FunctionToString = convertIntegrationFnToClass(INTEGRATION_NAME, functionToStringIntegration); // eslint-disable-next-line deprecation/deprecation\n\nexport { FunctionToString, functionToStringIntegration };","import { defineIntegration, convertIntegrationFnToClass } from '@sentry/core';\nimport { logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nvar INTEGRATION_NAME = 'Dedupe';\n\nvar _dedupeIntegration = function _dedupeIntegration() {\n var previousEvent;\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce: function setupOnce() {},\n // eslint-disable-line @typescript-eslint/no-empty-function\n processEvent: function 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 } // Juuust in case something goes wrong\n\n\n try {\n if (_shouldDropEvent(currentEvent, 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\n return previousEvent = currentEvent;\n }\n };\n};\n\nvar dedupeIntegration = defineIntegration(_dedupeIntegration);\n/**\n * Deduplication filter.\n * @deprecated Use `dedupeIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\n\nvar Dedupe = convertIntegrationFnToClass(INTEGRATION_NAME, dedupeIntegration);\n\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\nfunction _isSameMessageEvent(currentEvent, previousEvent) {\n var currentMessage = currentEvent.message;\n var previousMessage = previousEvent.message; // If neither event has a message property, they were both exceptions, so bail out\n\n if (!currentMessage && !previousMessage) {\n return false;\n } // If only one event has a stacktrace, but not the other one, they are not the same\n\n\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\nfunction _isSameExceptionEvent(currentEvent, previousEvent) {\n var previousException = _getExceptionFromEvent(previousEvent);\n\n var 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\nfunction _isSameStacktrace(currentEvent, previousEvent) {\n var currentFrames = _getFramesFromEvent(currentEvent);\n\n var previousFrames = _getFramesFromEvent(previousEvent); // If neither event has a stacktrace, they are assumed to be the same\n\n\n if (!currentFrames && !previousFrames) {\n return true;\n } // If only one event has a stacktrace, but not the other one, they are not the same\n\n\n if (currentFrames && !previousFrames || !currentFrames && previousFrames) {\n return false;\n }\n\n currentFrames = currentFrames;\n previousFrames = previousFrames; // If number of frames differ, they are not the same\n\n if (previousFrames.length !== currentFrames.length) {\n return false;\n } // Otherwise, compare the two\n\n\n for (var i = 0; i < previousFrames.length; i++) {\n var frameA = previousFrames[i];\n var frameB = currentFrames[i];\n\n if (frameA.filename !== frameB.filename || frameA.lineno !== frameB.lineno || frameA.colno !== frameB.colno || frameA.function !== frameB.function) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction _isSameFingerprint(currentEvent, previousEvent) {\n var currentFingerprint = currentEvent.fingerprint;\n var previousFingerprint = previousEvent.fingerprint; // If neither event has a fingerprint, they are assumed to be the same\n\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n } // If only one event has a fingerprint, but not the other one, they are not the same\n\n\n if (currentFingerprint && !previousFingerprint || !currentFingerprint && previousFingerprint) {\n return false;\n }\n\n currentFingerprint = currentFingerprint;\n previousFingerprint = previousFingerprint; // Otherwise, compare the two\n\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n}\n\nfunction _getExceptionFromEvent(event) {\n return event.exception && event.exception.values && event.exception.values[0];\n}\n\nfunction _getFramesFromEvent(event) {\n var 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\n return undefined;\n}\n\nexport { Dedupe, dedupeIntegration };","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { uuid4, dateTimestampInSeconds, addExceptionMechanism, truncate, GLOBAL_OBJ, normalize } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getGlobalEventProcessors, notifyEventProcessors } from '../eventProcessors.js';\nimport { getGlobalScope, Scope } from '../scope.js';\nimport { mergeScopeData, applyScopeDataToEvent } from './applyScopeDataToEvent.js';\nimport { spanToJSON } from './spanUtils.js';\n/**\n * This type makes sure that we get either a CaptureContext, OR an EventHint.\n * It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:\n * { user: { id: '123' }, mechanism: { handled: false } }\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 * 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 */\n\nfunction prepareEvent(options, event, hint, scope, client, isolationScope) {\n var _options$normalizeDep = options.normalizeDepth,\n normalizeDepth = _options$normalizeDep === void 0 ? 3 : _options$normalizeDep,\n _options$normalizeMax = options.normalizeMaxBreadth,\n normalizeMaxBreadth = _options$normalizeMax === void 0 ? 1000 : _options$normalizeMax;\n\n var prepared = _objectSpread(_objectSpread({}, event), {}, {\n event_id: event.event_id || hint.event_id || uuid4(),\n timestamp: event.timestamp || dateTimestampInSeconds()\n });\n\n var integrations = hint.integrations || options.integrations.map(function (i) {\n return i.name;\n });\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations); // Only put debug IDs onto frames for error events.\n\n if (event.type === undefined) {\n applyDebugIds(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\n\n var finalScope = getFinalScope(scope, hint.captureContext);\n\n if (hint.mechanism) {\n addExceptionMechanism(prepared, hint.mechanism);\n }\n\n var clientEventProcessors = client && client.getEventProcessors ? client.getEventProcessors() : []; // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n // Merge scope data together\n\n var data = getGlobalScope().getScopeData();\n\n if (isolationScope) {\n var isolationData = isolationScope.getScopeData();\n mergeScopeData(data, isolationData);\n }\n\n if (finalScope) {\n var finalScopeData = finalScope.getScopeData();\n mergeScopeData(data, finalScopeData);\n }\n\n var attachments = [].concat(_toConsumableArray(hint.attachments || []), _toConsumableArray(data.attachments));\n\n if (attachments.length) {\n hint.attachments = attachments;\n }\n\n applyScopeDataToEvent(prepared, data); // TODO (v8): Update this order to be: Global > Client > Scope\n\n var eventProcessors = [].concat(_toConsumableArray(clientEventProcessors), _toConsumableArray(getGlobalEventProcessors()), _toConsumableArray(data.eventProcessors));\n var result = notifyEventProcessors(eventProcessors, prepared, hint);\n return result.then(function (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\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 */\n\n\nfunction applyClientOptions(event, options) {\n var environment = options.environment,\n release = options.release,\n dist = options.dist,\n _options$maxValueLeng = options.maxValueLength,\n maxValueLength = _options$maxValueLeng === void 0 ? 250 : _options$maxValueLeng;\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 var exception = event.exception && event.exception.values && event.exception.values[0];\n\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n var request = event.request;\n\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n}\n\nvar debugIdStackParserCache = new WeakMap();\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\n\nfunction applyDebugIds(event, stackParser) {\n var debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n\n if (!debugIdMap) {\n return;\n }\n\n var debugIdStackFramesCache;\n var cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser);\n\n if (cachedDebugIdStackFrameCache) {\n debugIdStackFramesCache = cachedDebugIdStackFrameCache;\n } else {\n debugIdStackFramesCache = new Map();\n debugIdStackParserCache.set(stackParser, debugIdStackFramesCache);\n } // Build a map of filename -> debug_id\n\n\n var filenameDebugIdMap = Object.keys(debugIdMap).reduce(function (acc, debugIdStackTrace) {\n var parsedStack;\n var cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);\n\n if (cachedParsedStack) {\n parsedStack = cachedParsedStack;\n } else {\n parsedStack = stackParser(debugIdStackTrace);\n debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);\n }\n\n for (var i = parsedStack.length - 1; i >= 0; i--) {\n var stackFrame = parsedStack[i];\n\n if (stackFrame.filename) {\n acc[stackFrame.filename] = debugIdMap[debugIdStackTrace];\n break;\n }\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(function (exception) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(function (frame) {\n if (frame.filename) {\n frame.debug_id = filenameDebugIdMap[frame.filename];\n }\n });\n });\n } catch (e) {// 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 */\n\n\nfunction applyDebugMeta(event) {\n // Extract debug IDs and filenames from the stack frames on the event.\n var filenameDebugIdMap = {};\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(function (exception) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(function (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\n delete frame.debug_id;\n }\n });\n });\n } catch (e) {// 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 } // Fill debug_meta information\n\n\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n var images = event.debug_meta.images;\n Object.keys(filenameDebugIdMap).forEach(function (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 */\n\n\nfunction applyIntegrationsMetadata(event, integrationNames) {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [].concat(_toConsumableArray(event.sdk.integrations || []), _toConsumableArray(integrationNames));\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 */\n\n\nfunction normalizeEvent(event, depth, maxBreadth) {\n if (!event) {\n return null;\n }\n\n var normalized = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, event), event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(function (b) {\n return _objectSpread(_objectSpread({}, b), b.data && {\n data: normalize(b.data, depth, maxBreadth)\n });\n })\n }), event.user && {\n user: normalize(event.user, depth, maxBreadth)\n }), event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth)\n }), event.extra && {\n extra: normalize(event.extra, depth, maxBreadth)\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\n\n if (event.contexts && event.contexts.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace; // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n\n if (event.contexts.trace.data) {\n normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n }\n } // event.spans[].data may contain circular/dangerous data so we need to normalize it\n\n\n if (event.spans) {\n normalized.spans = event.spans.map(function (span) {\n var data = spanToJSON(span).data;\n\n if (data) {\n // This is a bit weird, as we generally have `Span` instances here, but to be safe we do not assume so\n // eslint-disable-next-line deprecation/deprecation\n span.data = normalize(data, depth, maxBreadth);\n }\n\n return span;\n });\n }\n\n return normalized;\n}\n\nfunction getFinalScope(scope, captureContext) {\n if (!captureContext) {\n return scope;\n }\n\n var finalScope = scope ? scope.clone() : new Scope();\n finalScope.update(captureContext);\n return finalScope;\n}\n/**\n * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.\n * This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.\n */\n\n\nfunction parseEventHintOrCaptureContext(hint) {\n if (!hint) {\n return undefined;\n } // If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext\n\n\n if (hintIsScopeOrFunction(hint)) {\n return {\n captureContext: hint\n };\n }\n\n if (hintIsScopeContext(hint)) {\n return {\n captureContext: hint\n };\n }\n\n return hint;\n}\n\nfunction hintIsScopeOrFunction(hint) {\n return hint instanceof Scope || typeof hint === 'function';\n}\n\nvar captureContextKeys = ['user', 'level', 'extra', 'contexts', 'tags', 'fingerprint', 'requestSession', 'propagationContext'];\n\nfunction hintIsScopeContext(hint) {\n return Object.keys(hint).some(function (key) {\n return captureContextKeys.includes(key);\n });\n}\n\nexport { applyDebugIds, applyDebugMeta, parseEventHintOrCaptureContext, prepareEvent };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport { getSdkMetadataForEnvelopeHeader, dsnToString, createEnvelope, createEventEnvelopeHeaders } from '@sentry/utils';\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\n\nfunction enhanceEventWithSdkInfo(event, sdkInfo) {\n if (!sdkInfo) {\n return event;\n }\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 = [].concat(_toConsumableArray(event.sdk.integrations || []), _toConsumableArray(sdkInfo.integrations || []));\n event.sdk.packages = [].concat(_toConsumableArray(event.sdk.packages || []), _toConsumableArray(sdkInfo.packages || []));\n return event;\n}\n/** Creates an envelope from a Session */\n\n\nfunction createSessionEnvelope(session, dsn, metadata, tunnel) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n\n var envelopeHeaders = _objectSpread(_objectSpread({\n sent_at: new Date().toISOString()\n }, sdkInfo && {\n sdk: sdkInfo\n }), !!tunnel && dsn && {\n dsn: dsnToString(dsn)\n });\n\n var envelopeItem = 'aggregates' in session ? [{\n type: 'sessions'\n }, session] : [{\n type: 'session'\n }, session.toJSON()];\n return createEnvelope(envelopeHeaders, [envelopeItem]);\n}\n/**\n * Create an Envelope from an event.\n */\n\n\nfunction createEventEnvelope(event, dsn, metadata, tunnel) {\n var sdkInfo = 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 */\n\n var eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';\n enhanceEventWithSdkInfo(event, metadata && metadata.sdk);\n var envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn); // 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\n delete event.sdkProcessingMetadata;\n var eventItem = [{\n type: eventType\n }, event];\n return createEnvelope(envelopeHeaders, [eventItem]);\n}\n\nexport { createEventEnvelope, createSessionEnvelope };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nimport { dropUndefinedKeys, logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { getCurrentHub } from '../hub.js';\nimport { getMetricSummaryJsonForSpan } from '../metrics/metric-summary.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '../semanticAttributes.js';\nimport { spanTimeInputToSeconds, spanToJSON, spanToTraceContext } from '../utils/spanUtils.js';\nimport { getDynamicSamplingContextFromSpan } from './dynamicSamplingContext.js';\nimport { Span, SpanRecorder } from './span.js';\nimport { getCapturedScopesOnSpan } from './trace.js';\n/** JSDoc */\n\nvar Transaction = /*#__PURE__*/function (_Span) {\n _inherits(Transaction, _Span);\n\n var _super = _createSuper(Transaction);\n\n /**\n * The reference to the current hub.\n */\n // eslint-disable-next-line deprecation/deprecation\n // DO NOT yet remove this property, it is used in a hack for v7 backwards compatibility.\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 * @deprecated Transactions will be removed in v8. Use spans instead.\n */\n // eslint-disable-next-line deprecation/deprecation\n function Transaction(transactionContext, hub) {\n var _this;\n\n _classCallCheck(this, Transaction);\n\n _this = _super.call(this, transactionContext);\n _this._contexts = {}; // eslint-disable-next-line deprecation/deprecation\n\n _this._hub = hub || getCurrentHub();\n _this._name = transactionContext.name || '';\n _this._metadata = _objectSpread({}, transactionContext.metadata);\n _this._trimEnd = transactionContext.trimEnd; // this is because transactions are also spans, and spans have a transaction pointer\n // TODO (v8): Replace this with another way to set the root span\n // eslint-disable-next-line deprecation/deprecation\n\n _this.transaction = _assertThisInitialized(_this); // 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\n var incomingDynamicSamplingContext = _this._metadata.dynamicSamplingContext;\n\n if (incomingDynamicSamplingContext) {\n // We shallow copy this in case anything writes to the original reference of the passed in `dynamicSamplingContext`\n _this._frozenDynamicSamplingContext = _objectSpread({}, incomingDynamicSamplingContext);\n }\n\n return _this;\n } // This sadly conflicts with the getter/setter ordering :(\n\n /* eslint-disable @typescript-eslint/member-ordering */\n\n /**\n * Getter for `name` property.\n * @deprecated Use `spanToJSON(span).description` instead.\n */\n\n\n _createClass(Transaction, [{\n key: \"name\",\n get: function get() {\n return this._name;\n }\n /**\n * Setter for `name` property, which also sets `source` as custom.\n * @deprecated Use `updateName()` and `setMetadata()` instead.\n */\n ,\n set: function set(newName) {\n // eslint-disable-next-line deprecation/deprecation\n this.setName(newName);\n }\n /**\n * Get the metadata for this transaction.\n * @deprecated Use `spanGetMetadata(transaction)` instead.\n */\n\n }, {\n key: \"metadata\",\n get: function get() {\n // We merge attributes in for backwards compatibility\n return _objectSpread(_objectSpread(_objectSpread({\n // Defaults\n // eslint-disable-next-line deprecation/deprecation\n source: 'custom',\n spanMetadata: {}\n }, this._metadata), this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] && {\n source: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]\n }), this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE] && {\n sampleRate: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]\n });\n }\n /**\n * Update the metadata for this transaction.\n * @deprecated Use `spanGetMetadata(transaction)` instead.\n */\n ,\n set: function set(metadata) {\n this._metadata = metadata;\n }\n /* eslint-enable @typescript-eslint/member-ordering */\n\n /**\n * Setter for `name` property, which also sets `source` on the metadata.\n *\n * @deprecated Use `.updateName()` and `.setAttribute()` instead.\n */\n\n }, {\n key: \"setName\",\n value: function setName(name) {\n var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'custom';\n this._name = name;\n this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source);\n }\n /** @inheritdoc */\n\n }, {\n key: \"updateName\",\n value: function updateName(name) {\n this._name = name;\n return this;\n }\n /**\n * Attaches SpanRecorder to the span itself\n * @param maxlen maximum number of spans that can be recorded\n */\n\n }, {\n key: \"initSpanRecorder\",\n value: function initSpanRecorder() {\n var maxlen = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1000;\n\n // eslint-disable-next-line deprecation/deprecation\n if (!this.spanRecorder) {\n // eslint-disable-next-line deprecation/deprecation\n this.spanRecorder = new SpanRecorder(maxlen);\n } // eslint-disable-next-line deprecation/deprecation\n\n\n this.spanRecorder.add(this);\n }\n /**\n * Set the context of a transaction event.\n * @deprecated Use either `.setAttribute()`, or set the context on the scope before creating the transaction.\n */\n\n }, {\n key: \"setContext\",\n value: function 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 * @inheritDoc\n *\n * @deprecated Use top-level `setMeasurement()` instead.\n */\n\n }, {\n key: \"setMeasurement\",\n value: function setMeasurement(name, value) {\n var unit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n this._measurements[name] = {\n value: value,\n unit: unit\n };\n }\n /**\n * Store metadata on this transaction.\n * @deprecated Use attributes or store data on the scope instead.\n */\n\n }, {\n key: \"setMetadata\",\n value: function setMetadata(newMetadata) {\n this._metadata = _objectSpread(_objectSpread({}, this._metadata), newMetadata);\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"end\",\n value: function end(endTimestamp) {\n var timestampInS = spanTimeInputToSeconds(endTimestamp);\n\n var transaction = this._finishTransaction(timestampInS);\n\n if (!transaction) {\n return undefined;\n } // eslint-disable-next-line deprecation/deprecation\n\n\n return this._hub.captureEvent(transaction);\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"toContext\",\n value: function toContext() {\n // eslint-disable-next-line deprecation/deprecation\n var spanContext = _get(_getPrototypeOf(Transaction.prototype), \"toContext\", this).call(this);\n\n return dropUndefinedKeys(_objectSpread(_objectSpread({}, spanContext), {}, {\n name: this._name,\n trimEnd: this._trimEnd\n }));\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"updateWithContext\",\n value: function updateWithContext(transactionContext) {\n // eslint-disable-next-line deprecation/deprecation\n _get(_getPrototypeOf(Transaction.prototype), \"updateWithContext\", this).call(this, transactionContext);\n\n this._name = transactionContext.name || '';\n this._trimEnd = transactionContext.trimEnd;\n return this;\n }\n /**\n * @inheritdoc\n *\n * @experimental\n *\n * @deprecated Use top-level `getDynamicSamplingContextFromSpan` instead.\n */\n\n }, {\n key: \"getDynamicSamplingContext\",\n value: function getDynamicSamplingContext() {\n return getDynamicSamplingContextFromSpan(this);\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 // eslint-disable-next-line deprecation/deprecation\n\n }, {\n key: \"setHub\",\n value: function setHub(hub) {\n this._hub = hub;\n }\n /**\n * Get the profile id of the transaction.\n */\n\n }, {\n key: \"getProfileId\",\n value: function getProfileId() {\n if (this._contexts !== undefined && this._contexts['profile'] !== undefined) {\n return this._contexts['profile'].profile_id;\n }\n\n return undefined;\n }\n /**\n * Finish the transaction & prepare the event to send to Sentry.\n */\n\n }, {\n key: \"_finishTransaction\",\n value: function _finishTransaction(endTimestamp) {\n var _this2 = this;\n\n // This transaction is already finished, so we should not flush it again.\n if (this._endTime !== 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 } // just sets the end timestamp\n\n\n _get(_getPrototypeOf(Transaction.prototype), \"end\", this).call(this, endTimestamp); // eslint-disable-next-line deprecation/deprecation\n\n\n var client = this._hub.getClient();\n\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 } // eslint-disable-next-line deprecation/deprecation\n\n\n var finishedSpans = this.spanRecorder ? // eslint-disable-next-line deprecation/deprecation\n this.spanRecorder.spans.filter(function (span) {\n return span !== _this2 && spanToJSON(span).timestamp;\n }) : [];\n\n if (this._trimEnd && finishedSpans.length > 0) {\n var endTimes = finishedSpans.map(function (span) {\n return spanToJSON(span).timestamp;\n }).filter(Boolean);\n this._endTime = endTimes.reduce(function (prev, current) {\n return prev > current ? prev : current;\n });\n }\n\n var _getCapturedScopesOnS = getCapturedScopesOnSpan(this),\n capturedSpanScope = _getCapturedScopesOnS.scope,\n capturedSpanIsolationScope = _getCapturedScopesOnS.isolationScope; // eslint-disable-next-line deprecation/deprecation\n\n\n var metadata = this.metadata; // eslint-disable-next-line deprecation/deprecation\n\n var source = metadata.source;\n\n var transaction = _objectSpread({\n contexts: _objectSpread(_objectSpread({}, this._contexts), {}, {\n // We don't want to override trace context\n trace: spanToTraceContext(this)\n }),\n // TODO: Pass spans serialized via `spanToJSON()` here instead in v8.\n spans: finishedSpans,\n start_timestamp: this._startTime,\n // eslint-disable-next-line deprecation/deprecation\n tags: this.tags,\n timestamp: this._endTime,\n transaction: this._name,\n type: 'transaction',\n sdkProcessingMetadata: _objectSpread(_objectSpread({}, metadata), {}, {\n capturedSpanScope: capturedSpanScope,\n capturedSpanIsolationScope: capturedSpanIsolationScope\n }, dropUndefinedKeys({\n dynamicSamplingContext: getDynamicSamplingContextFromSpan(this)\n })),\n _metrics_summary: getMetricSummaryJsonForSpan(this)\n }, source && {\n transaction_info: {\n source: source\n }\n });\n\n var hasMeasurements = Object.keys(this._measurements).length > 0;\n\n if (hasMeasurements) {\n DEBUG_BUILD && logger.log('[Measurements] Adding measurements to transaction', JSON.stringify(this._measurements, undefined, 2));\n transaction.measurements = this._measurements;\n } // eslint-disable-next-line deprecation/deprecation\n\n\n DEBUG_BUILD && logger.log(\"[Tracing] Finishing \".concat(this.op, \" transaction: \").concat(this._name, \".\"));\n return transaction;\n }\n }]);\n\n return Transaction;\n}(Span);\n\nexport { Transaction };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { addNonEnumerableProperty } from './object.js';\nimport { snipLine } from './string.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\n\nfunction uuid4() {\n var gbl = GLOBAL_OBJ;\n var crypto = gbl.crypto || gbl.msCrypto;\n\n var getRandomByte = function getRandomByte() {\n return Math.random() * 16;\n };\n\n try {\n if (crypto && crypto.randomUUID) {\n return crypto.randomUUID().replace(/-/g, '');\n }\n\n if (crypto && crypto.getRandomValues) {\n getRandomByte = function getRandomByte() {\n // crypto.getRandomValues might return undefined instead of the typed array\n // in old Chromium versions (e.g. 23.0.1235.0 (151422))\n // However, `typedArray` is still filled in-place.\n // @see https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues#typedarray\n var typedArray = new Uint8Array(1);\n crypto.getRandomValues(typedArray);\n return typedArray[0];\n };\n }\n } catch (_) {// some runtimes can crash invoking crypto\n // https://github.com/getsentry/sentry-javascript/issues/8935\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\n\n return ([1e7] + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, function (c) {\n return (// eslint-disable-next-line no-bitwise\n (c ^ (getRandomByte() & 15) >> c / 4).toString(16)\n );\n });\n}\n\nfunction 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 */\n\n\nfunction getEventDescription(event) {\n var message = event.message,\n eventId = event.event_id;\n\n if (message) {\n return message;\n }\n\n var firstException = getFirstException(event);\n\n if (firstException) {\n if (firstException.type && firstException.value) {\n return \"\".concat(firstException.type, \": \").concat(firstException.value);\n }\n\n return firstException.type || firstException.value || eventId || '';\n }\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 */\n\n\nfunction addExceptionTypeValue(event, value, type) {\n var exception = event.exception = event.exception || {};\n var values = exception.values = exception.values || [];\n var firstException = values[0] = values[0] || {};\n\n if (!firstException.value) {\n firstException.value = value || '';\n }\n\n if (!firstException.type) {\n firstException.type = type || 'Error';\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 */\n\n\nfunction addExceptionMechanism(event, newMechanism) {\n var firstException = getFirstException(event);\n\n if (!firstException) {\n return;\n }\n\n var defaultMechanism = {\n type: 'generic',\n handled: true\n };\n var currentMechanism = firstException.mechanism;\n firstException.mechanism = _objectSpread(_objectSpread(_objectSpread({}, defaultMechanism), currentMechanism), newMechanism);\n\n if (newMechanism && 'data' in newMechanism) {\n var mergedData = _objectSpread(_objectSpread({}, currentMechanism && currentMechanism.data), newMechanism.data);\n\n firstException.mechanism.data = mergedData;\n }\n} // https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n\n\nvar 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\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\n\nfunction parseSemver(input) {\n var match = input.match(SEMVER_REGEXP) || [];\n var major = parseInt(match[1], 10);\n var minor = parseInt(match[2], 10);\n var 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 */\n\n\nfunction addContextToFrame(lines, frame) {\n var linesOfContext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;\n\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 var maxLines = lines.length;\n var sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n frame.pre_context = lines.slice(Math.max(0, sourceLine - linesOfContext), sourceLine).map(function (line) {\n return snipLine(line, 0);\n });\n frame.context_line = 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(function (line) {\n return 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 */\n\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) {// `exception` is a primitive, so we can't mark it seen\n }\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 */\n\n\nfunction arrayify(maybeArray) {\n return Array.isArray(maybeArray) ? maybeArray : [maybeArray];\n}\n\nexport { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, arrayify, checkOrSetAlreadyCaught, getEventDescription, parseSemver, uuid4 };","function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { dropUndefinedKeys } from '@sentry/utils';\nimport '../debug-build.js';\nimport '../tracing/errors.js';\nimport '../tracing/spanstatus.js';\nimport { getActiveSpan } from '../tracing/trace.js';\n/**\n * key: bucketKey\n * value: [exportKey, MetricSummary]\n */\n\nvar SPAN_METRIC_SUMMARY;\n\nfunction getMetricStorageForSpan(span) {\n return SPAN_METRIC_SUMMARY ? SPAN_METRIC_SUMMARY.get(span) : undefined;\n}\n/**\n * Fetches the metric summary if it exists for the passed span\n */\n\n\nfunction getMetricSummaryJsonForSpan(span) {\n var storage = getMetricStorageForSpan(span);\n\n if (!storage) {\n return undefined;\n }\n\n var output = {};\n\n var _iterator = _createForOfIteratorHelper(storage),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _ref3 = _step.value;\n\n var _ref2 = _slicedToArray(_ref3, 2);\n\n var _ref2$ = _slicedToArray(_ref2[1], 2);\n\n var exportKey = _ref2$[0];\n var summary = _ref2$[1];\n\n if (!output[exportKey]) {\n output[exportKey] = [];\n }\n\n output[exportKey].push(dropUndefinedKeys(summary));\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return output;\n}\n/**\n * Updates the metric summary on the currently active span\n */\n\n\nfunction updateMetricSummaryOnActiveSpan(metricType, sanitizedName, value, unit, tags, bucketKey) {\n var span = getActiveSpan();\n\n if (span) {\n var storage = getMetricStorageForSpan(span) || new Map();\n var exportKey = \"\".concat(metricType, \":\").concat(sanitizedName, \"@\").concat(unit);\n var bucketItem = storage.get(bucketKey);\n\n if (bucketItem) {\n var _bucketItem = _slicedToArray(bucketItem, 2),\n summary = _bucketItem[1];\n\n storage.set(bucketKey, [exportKey, {\n min: Math.min(summary.min, value),\n max: Math.max(summary.max, value),\n count: summary.count += 1,\n sum: summary.sum += value,\n tags: summary.tags\n }]);\n } else {\n storage.set(bucketKey, [exportKey, {\n min: value,\n max: value,\n count: 1,\n sum: value,\n tags: tags\n }]);\n }\n\n if (!SPAN_METRIC_SUMMARY) {\n SPAN_METRIC_SUMMARY = new WeakMap();\n }\n\n SPAN_METRIC_SUMMARY.set(span, storage);\n }\n}\n\nexport { getMetricSummaryJsonForSpan, updateMetricSummaryOnActiveSpan };","import { isThenable } from '@sentry/utils';\n/**\n * Wrap a callback function with error handling.\n * If an error is thrown, it will be passed to the `onError` callback and re-thrown.\n *\n * If the return value of the function is a promise, it will be handled with `maybeHandlePromiseRejection`.\n *\n * If an `onFinally` callback is provided, this will be called when the callback has finished\n * - so if it returns a promise, once the promise resolved/rejected,\n * else once the callback has finished executing.\n * The `onFinally` callback will _always_ be called, no matter if an error was thrown or not.\n */\n\nfunction handleCallbackErrors(fn, onError) {\n var onFinally = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};\n var maybePromiseResult;\n\n try {\n maybePromiseResult = fn();\n } catch (e) {\n onError(e);\n onFinally();\n throw e;\n }\n\n return maybeHandlePromiseRejection(maybePromiseResult, onError, onFinally);\n}\n/**\n * Maybe handle a promise rejection.\n * This expects to be given a value that _may_ be a promise, or any other value.\n * If it is a promise, and it rejects, it will call the `onError` callback.\n * Other than this, it will generally return the given value as-is.\n */\n\n\nfunction maybeHandlePromiseRejection(value, onError, onFinally) {\n if (isThenable(value)) {\n // @ts-expect-error - the isThenable check returns the \"wrong\" type here\n return value.then(function (res) {\n onFinally();\n return res;\n }, function (e) {\n onError(e);\n onFinally();\n throw e;\n });\n }\n\n onFinally();\n return value;\n}\n\nexport { handleCallbackErrors };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n/** Internal global with common properties and Sentry extensions */\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/** Get's the global object for the current JavaScript runtime */\n\n\nvar GLOBAL_OBJ = (typeof globalThis === \"undefined\" ? \"undefined\" : _typeof(globalThis)) == 'object' && isGlobalObj(globalThis) || // eslint-disable-next-line no-restricted-globals\n(typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) == 'object' && isGlobalObj(window) || (typeof self === \"undefined\" ? \"undefined\" : _typeof(self)) == 'object' && isGlobalObj(self) || (typeof global === \"undefined\" ? \"undefined\" : _typeof(global)) == 'object' && isGlobalObj(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 */\n\n\nfunction getGlobalObject() {\n return GLOBAL_OBJ;\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 */\n\n\nfunction getGlobalSingleton(name, creator, obj) {\n var gbl = obj || GLOBAL_OBJ;\n\n var __SENTRY__ = gbl.__SENTRY__ = gbl.__SENTRY__ || {};\n\n var singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n}\n\nexport { GLOBAL_OBJ, getGlobalObject, getGlobalSingleton };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nimport { logger, timestampInSeconds } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { spanTimeInputToSeconds, spanToJSON } from '../utils/spanUtils.js';\nimport { SpanRecorder } from './span.js';\nimport { Transaction } from './transaction.js';\nvar TRACING_DEFAULTS = {\n idleTimeout: 1000,\n finalTimeout: 30000,\n heartbeatInterval: 5000\n};\nvar FINISH_REASON_TAG = 'finishReason';\nvar IDLE_TRANSACTION_FINISH_REASONS = ['heartbeatFailed', 'idleTimeout', 'documentHidden', 'finalTimeout', 'externalFinish', 'cancelled'];\n/**\n * @inheritDoc\n */\n\nvar IdleTransactionSpanRecorder = /*#__PURE__*/function (_SpanRecorder) {\n _inherits(IdleTransactionSpanRecorder, _SpanRecorder);\n\n var _super = _createSuper(IdleTransactionSpanRecorder);\n\n function IdleTransactionSpanRecorder(_pushActivity, _popActivity, transactionSpanId, maxlen) {\n var _this;\n\n _classCallCheck(this, IdleTransactionSpanRecorder);\n\n _this = _super.call(this, maxlen);\n _this._pushActivity = _pushActivity;\n _this._popActivity = _popActivity;\n _this.transactionSpanId = transactionSpanId;\n return _this;\n }\n /**\n * @inheritDoc\n */\n\n\n _createClass(IdleTransactionSpanRecorder, [{\n key: \"add\",\n value: function add(span) {\n var _this2 = this;\n\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.spanContext().spanId !== this.transactionSpanId) {\n // We patch span.end() to pop an activity after setting an endTimestamp.\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var originalEnd = span.end;\n\n span.end = function () {\n _this2._popActivity(span.spanContext().spanId);\n\n for (var _len = arguments.length, rest = new Array(_len), _key = 0; _key < _len; _key++) {\n rest[_key] = arguments[_key];\n }\n\n return originalEnd.apply(span, rest);\n }; // We should only push new activities if the span does not have an end timestamp.\n\n\n if (spanToJSON(span).timestamp === undefined) {\n this._pushActivity(span.spanContext().spanId);\n }\n }\n\n _get(_getPrototypeOf(IdleTransactionSpanRecorder.prototype), \"add\", this).call(this, span);\n }\n }]);\n\n return IdleTransactionSpanRecorder;\n}(SpanRecorder);\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 */\n\n\nvar IdleTransaction = /*#__PURE__*/function (_Transaction) {\n _inherits(IdleTransaction, _Transaction);\n\n var _super2 = _createSuper(IdleTransaction);\n\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 /**\n * Timer that tracks Transaction idleTimeout\n */\n\n /**\n * @deprecated Transactions will be removed in v8. Use spans instead.\n */\n function IdleTransaction(transactionContext, // eslint-disable-next-line deprecation/deprecation\n _idleHub) {\n var _this3;\n\n var _idleTimeout = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : TRACING_DEFAULTS.idleTimeout;\n\n var _finalTimeout = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : TRACING_DEFAULTS.finalTimeout;\n\n var _heartbeatInterval = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : TRACING_DEFAULTS.heartbeatInterval;\n\n var _onScope = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;\n\n var delayAutoFinishUntilSignal = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;\n\n _classCallCheck(this, IdleTransaction);\n\n _this3 = _super2.call(this, transactionContext, _idleHub);\n _this3._idleHub = _idleHub;\n _this3._idleTimeout = _idleTimeout;\n _this3._finalTimeout = _finalTimeout;\n _this3._heartbeatInterval = _heartbeatInterval;\n _this3._onScope = _onScope;\n _this3.activities = {};\n _this3._heartbeatCounter = 0;\n _this3._finished = false;\n _this3._idleTimeoutCanceledPermanently = false;\n _this3._beforeFinishCallbacks = [];\n _this3._finishReason = IDLE_TRANSACTION_FINISH_REASONS[4];\n _this3._autoFinishAllowed = !delayAutoFinishUntilSignal;\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: \".concat(_this3.spanContext().spanId)); // eslint-disable-next-line deprecation/deprecation\n\n _idleHub.getScope().setSpan(_assertThisInitialized(_this3));\n }\n\n if (!delayAutoFinishUntilSignal) {\n _this3._restartIdleTimeout();\n }\n\n setTimeout(function () {\n if (!_this3._finished) {\n _this3.setStatus('deadline_exceeded');\n\n _this3._finishReason = IDLE_TRANSACTION_FINISH_REASONS[3];\n\n _this3.end();\n }\n }, _this3._finalTimeout);\n return _this3;\n }\n /** {@inheritDoc} */\n\n\n _createClass(IdleTransaction, [{\n key: \"end\",\n value: function end(endTimestamp) {\n var _this4 = this;\n\n var endTimestampInS = spanTimeInputToSeconds(endTimestamp);\n this._finished = true;\n this.activities = {}; // eslint-disable-next-line deprecation/deprecation\n\n if (this.op === 'ui.action.click') {\n this.setAttribute(FINISH_REASON_TAG, this._finishReason);\n } // eslint-disable-next-line deprecation/deprecation\n\n\n if (this.spanRecorder) {\n DEBUG_BUILD && // eslint-disable-next-line deprecation/deprecation\n logger.log('[Tracing] finishing IdleTransaction', new Date(endTimestampInS * 1000).toISOString(), this.op);\n\n var _iterator = _createForOfIteratorHelper(this._beforeFinishCallbacks),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var callback = _step.value;\n callback(this, endTimestampInS);\n } // eslint-disable-next-line deprecation/deprecation\n\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n this.spanRecorder.spans = this.spanRecorder.spans.filter(function (span) {\n // If we are dealing with the transaction itself, we just return it\n if (span.spanContext().spanId === _this4.spanContext().spanId) {\n return true;\n } // We cancel all pending spans with status \"cancelled\" to indicate the idle transaction was finished early\n\n\n if (!spanToJSON(span).timestamp) {\n span.setStatus('cancelled');\n span.end(endTimestampInS);\n DEBUG_BUILD && logger.log('[Tracing] cancelling span since transaction ended early', JSON.stringify(span, undefined, 2));\n }\n\n var _spanToJSON = spanToJSON(span),\n startTime = _spanToJSON.start_timestamp,\n endTime = _spanToJSON.timestamp;\n\n var spanStartedBeforeTransactionFinish = startTime && startTime < endTimestampInS; // Add a delta with idle timeout so that we prevent false positives\n\n var timeoutWithMarginOfError = (_this4._finalTimeout + _this4._idleTimeout) / 1000;\n var spanEndedBeforeFinalTimeout = endTime && startTime && endTime - startTime < timeoutWithMarginOfError;\n\n if (DEBUG_BUILD) {\n var stringifiedSpan = JSON.stringify(span, undefined, 2);\n\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 DEBUG_BUILD && logger.log('[Tracing] flushing IdleTransaction');\n } else {\n DEBUG_BUILD && logger.log('[Tracing] No active IdleTransaction');\n } // if `this._onScope` is `true`, the transaction put itself on the scope when it started\n\n\n if (this._onScope) {\n // eslint-disable-next-line deprecation/deprecation\n var scope = this._idleHub.getScope(); // eslint-disable-next-line deprecation/deprecation\n\n\n if (scope.getTransaction() === this) {\n // eslint-disable-next-line deprecation/deprecation\n scope.setSpan(undefined);\n }\n }\n\n return _get(_getPrototypeOf(IdleTransaction.prototype), \"end\", this).call(this, endTimestamp);\n }\n /**\n * Register a callback function that gets executed 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\n }, {\n key: \"registerBeforeFinishCallback\",\n value: function registerBeforeFinishCallback(callback) {\n this._beforeFinishCallbacks.push(callback);\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"initSpanRecorder\",\n value: function initSpanRecorder(maxlen) {\n var _this5 = this;\n\n // eslint-disable-next-line deprecation/deprecation\n if (!this.spanRecorder) {\n var pushActivity = function pushActivity(id) {\n if (_this5._finished) {\n return;\n }\n\n _this5._pushActivity(id);\n };\n\n var popActivity = function popActivity(id) {\n if (_this5._finished) {\n return;\n }\n\n _this5._popActivity(id);\n }; // eslint-disable-next-line deprecation/deprecation\n\n\n this.spanRecorder = new IdleTransactionSpanRecorder(pushActivity, popActivity, this.spanContext().spanId, maxlen); // Start heartbeat so that transactions do not run forever.\n\n DEBUG_BUILD && logger.log('Starting heartbeat');\n\n this._pingHeartbeat();\n } // eslint-disable-next-line deprecation/deprecation\n\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 */\n\n }, {\n key: \"cancelIdleTimeout\",\n value: function cancelIdleTimeout(endTimestamp) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n restartOnChildSpanChange: true\n },\n restartOnChildSpanChange = _ref.restartOnChildSpanChange;\n\n this._idleTimeoutCanceledPermanently = restartOnChildSpanChange === false;\n\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.end(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 */\n\n }, {\n key: \"setFinishReason\",\n value: function setFinishReason(reason) {\n this._finishReason = reason;\n }\n /**\n * Permits the IdleTransaction to automatically end itself via the idle timeout and heartbeat mechanisms when the `delayAutoFinishUntilSignal` option was set to `true`.\n */\n\n }, {\n key: \"sendAutoFinishSignal\",\n value: function sendAutoFinishSignal() {\n if (!this._autoFinishAllowed) {\n DEBUG_BUILD && logger.log('[Tracing] Received finish signal for idle transaction.');\n\n this._restartIdleTimeout();\n\n this._autoFinishAllowed = true;\n }\n }\n /**\n * Restarts idle timeout, if there is no running idle timeout it will start one.\n */\n\n }, {\n key: \"_restartIdleTimeout\",\n value: function _restartIdleTimeout(endTimestamp) {\n var _this6 = this;\n\n this.cancelIdleTimeout();\n this._idleTimeoutID = setTimeout(function () {\n if (!_this6._finished && Object.keys(_this6.activities).length === 0) {\n _this6._finishReason = IDLE_TRANSACTION_FINISH_REASONS[1];\n\n _this6.end(endTimestamp);\n }\n }, this._idleTimeout);\n }\n /**\n * Start tracking a specific activity.\n * @param spanId The span id that represents the activity\n */\n\n }, {\n key: \"_pushActivity\",\n value: function _pushActivity(spanId) {\n this.cancelIdleTimeout(undefined, {\n restartOnChildSpanChange: !this._idleTimeoutCanceledPermanently\n });\n DEBUG_BUILD && logger.log(\"[Tracing] pushActivity: \".concat(spanId));\n this.activities[spanId] = true;\n DEBUG_BUILD && 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 */\n\n }, {\n key: \"_popActivity\",\n value: function _popActivity(spanId) {\n if (this.activities[spanId]) {\n DEBUG_BUILD && logger.log(\"[Tracing] popActivity \".concat(spanId)); // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n\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 var endTimestamp = timestampInSeconds();\n\n if (this._idleTimeoutCanceledPermanently) {\n if (this._autoFinishAllowed) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];\n this.end(endTimestamp);\n }\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 * Checks when entries of this.activities are not changing for 3 beats.\n * If this occurs we finish the transaction.\n */\n\n }, {\n key: \"_beat\",\n value: function _beat() {\n // We should not be running heartbeat if the idle transaction is finished.\n if (this._finished) {\n return;\n }\n\n var 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 if (this._autoFinishAllowed) {\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.end();\n }\n } else {\n this._pingHeartbeat();\n }\n }\n /**\n * Pings the heartbeat\n */\n\n }, {\n key: \"_pingHeartbeat\",\n value: function _pingHeartbeat() {\n var _this7 = this;\n\n DEBUG_BUILD && logger.log(\"pinging Heartbeat -> current counter: \".concat(this._heartbeatCounter));\n setTimeout(function () {\n _this7._beat();\n }, this._heartbeatInterval);\n }\n }]);\n\n return IdleTransaction;\n}(Transaction);\n\nexport { IdleTransaction, IdleTransactionSpanRecorder, TRACING_DEFAULTS };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nimport { isNaN, logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '../semanticAttributes.js';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\nimport { spanToJSON } from '../utils/spanUtils.js';\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 */\n\nfunction sampleTransaction(transaction, options, samplingContext) {\n // nothing to do if tracing is not enabled\n if (!hasTracingEnabled(options)) {\n // eslint-disable-next-line deprecation/deprecation\n transaction.sampled = false;\n return transaction;\n } // if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that\n // eslint-disable-next-line deprecation/deprecation\n\n\n if (transaction.sampled !== undefined) {\n // eslint-disable-next-line deprecation/deprecation\n transaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Number(transaction.sampled));\n return transaction;\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\n\n var sampleRate;\n\n if (typeof options.tracesSampler === 'function') {\n sampleRate = options.tracesSampler(samplingContext);\n transaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Number(sampleRate));\n } else if (samplingContext.parentSampled !== undefined) {\n sampleRate = samplingContext.parentSampled;\n } else if (typeof options.tracesSampleRate !== 'undefined') {\n sampleRate = options.tracesSampleRate;\n transaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Number(sampleRate));\n } else {\n // When `enableTracing === true`, we use a sample rate of 100%\n sampleRate = 1;\n transaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, sampleRate);\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\n\n if (!isValidSampleRate(sampleRate)) {\n DEBUG_BUILD && logger.warn('[Tracing] Discarding transaction because of invalid sample rate.'); // eslint-disable-next-line deprecation/deprecation\n\n transaction.sampled = false;\n return transaction;\n } // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n\n\n if (!sampleRate) {\n DEBUG_BUILD && logger.log(\"[Tracing] Discarding transaction because \".concat(typeof options.tracesSampler === 'function' ? 'tracesSampler returned 0 or false' : 'a negative sampling decision was inherited or tracesSampleRate is set to 0')); // eslint-disable-next-line deprecation/deprecation\n\n transaction.sampled = false;\n return transaction;\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 // eslint-disable-next-line deprecation/deprecation\n\n\n transaction.sampled = Math.random() < sampleRate; // if we're not going to keep it, we're done\n // eslint-disable-next-line deprecation/deprecation\n\n if (!transaction.sampled) {\n DEBUG_BUILD && logger.log(\"[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = \".concat(Number(sampleRate), \")\"));\n return transaction;\n }\n\n DEBUG_BUILD && // eslint-disable-next-line deprecation/deprecation\n logger.log(\"[Tracing] starting \".concat(transaction.op, \" transaction - \").concat(spanToJSON(transaction).description));\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 */\n\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 DEBUG_BUILD && logger.warn(\"[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got \".concat(JSON.stringify(rate), \" of type \").concat(JSON.stringify(_typeof(rate)), \".\"));\n return false;\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\n\n if (rate < 0 || rate > 1) {\n DEBUG_BUILD && logger.warn(\"[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got \".concat(rate, \".\"));\n return false;\n }\n\n return true;\n}\n\nexport { isValidSampleRate, sampleTransaction };","import { isString } from './is.js';\nimport { getGlobalObject } from './worldwide.js'; // eslint-disable-next-line deprecation/deprecation\n\nvar WINDOW = getGlobalObject();\nvar 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 */\n\nfunction htmlTreeAsString(elem) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!elem) {\n 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\n\n try {\n var currentElem = elem;\n var MAX_TRAVERSE_HEIGHT = 5;\n var out = [];\n var height = 0;\n var len = 0;\n var separator = ' > ';\n var sepLength = separator.length;\n var nextStr;\n var keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n var maxStringLength = !Array.isArray(options) && options.maxStringLength || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs); // 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\n if (nextStr === 'html' || height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength) {\n break;\n }\n\n out.push(nextStr);\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 * 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 */\n\n\nfunction _htmlElementAsString(el, keyAttrs) {\n var elem = el;\n var out = [];\n var className;\n var classes;\n var key;\n var attr;\n var i;\n\n if (!elem || !elem.tagName) {\n return '';\n } // @ts-expect-error WINDOW has HTMLElement\n\n\n if (WINDOW.HTMLElement) {\n // If using the component name annotation plugin, this value may be available on the DOM node\n if (elem instanceof HTMLElement && elem.dataset && elem.dataset['sentryComponent']) {\n return elem.dataset['sentryComponent'];\n }\n }\n\n out.push(elem.tagName.toLowerCase()); // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n\n var keyAttrPairs = keyAttrs && keyAttrs.length ? keyAttrs.filter(function (keyAttr) {\n return elem.getAttribute(keyAttr);\n }).map(function (keyAttr) {\n return [keyAttr, elem.getAttribute(keyAttr)];\n }) : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(function (keyAttrPair) {\n out.push(\"[\".concat(keyAttrPair[0], \"=\\\"\").concat(keyAttrPair[1], \"\\\"]\"));\n });\n } else {\n if (elem.id) {\n out.push(\"#\".concat(elem.id));\n } // eslint-disable-next-line prefer-const\n\n\n className = elem.className;\n\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n\n for (i = 0; i < classes.length; i++) {\n out.push(\".\".concat(classes[i]));\n }\n }\n }\n\n var allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n\n if (attr) {\n out.push(\"[\".concat(key, \"=\\\"\").concat(attr, \"\\\"]\"));\n }\n }\n\n return out.join('');\n}\n/**\n * A safe form of location.href\n */\n\n\nfunction getLocationHref() {\n try {\n return 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 */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nfunction getDomElement(selector) {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector);\n }\n\n return null;\n}\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` attribute. This attribute is added at build-time\n * by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\n\n\nfunction getComponentName(elem) {\n // @ts-expect-error WINDOW has HTMLElement\n if (!WINDOW.HTMLElement) {\n return null;\n }\n\n var currentElem = elem;\n var MAX_TRAVERSE_HEIGHT = 5;\n\n for (var i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {\n if (!currentElem) {\n return null;\n }\n\n if (currentElem instanceof HTMLElement && currentElem.dataset['sentryComponent']) {\n return currentElem.dataset['sentryComponent'];\n }\n\n currentElem = currentElem.parentNode;\n }\n\n return null;\n}\n\nexport { getComponentName, getDomElement, getLocationHref, htmlTreeAsString };","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nvar DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__;\nexport { DEBUG_BUILD };","import { dropUndefinedKeys, generateSentryTraceHeader, timestampInSeconds } from '@sentry/utils'; // These are aligned with OpenTelemetry trace flags\n\nvar TRACE_FLAG_NONE = 0x0;\nvar TRACE_FLAG_SAMPLED = 0x1;\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in an event.\n */\n\nfunction spanToTraceContext(span) {\n var _span$spanContext = span.spanContext(),\n span_id = _span$spanContext.spanId,\n trace_id = _span$spanContext.traceId;\n\n var _spanToJSON = spanToJSON(span),\n data = _spanToJSON.data,\n op = _spanToJSON.op,\n parent_span_id = _spanToJSON.parent_span_id,\n status = _spanToJSON.status,\n tags = _spanToJSON.tags,\n origin = _spanToJSON.origin;\n\n return dropUndefinedKeys({\n data: data,\n op: op,\n parent_span_id: parent_span_id,\n span_id: span_id,\n status: status,\n tags: tags,\n trace_id: trace_id,\n origin: origin\n });\n}\n/**\n * Convert a Span to a Sentry trace header.\n */\n\n\nfunction spanToTraceHeader(span) {\n var _span$spanContext2 = span.spanContext(),\n traceId = _span$spanContext2.traceId,\n spanId = _span$spanContext2.spanId;\n\n var sampled = spanIsSampled(span);\n return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n/**\n * Convert a span time input intp a timestamp in seconds.\n */\n\n\nfunction spanTimeInputToSeconds(input) {\n if (typeof input === 'number') {\n return ensureTimestampInSeconds(input);\n }\n\n if (Array.isArray(input)) {\n // See {@link HrTime} for the array-based time format\n return input[0] + input[1] / 1e9;\n }\n\n if (input instanceof Date) {\n return ensureTimestampInSeconds(input.getTime());\n }\n\n return timestampInSeconds();\n}\n/**\n * Converts a timestamp to second, if it was in milliseconds, or keeps it as second.\n */\n\n\nfunction ensureTimestampInSeconds(timestamp) {\n var isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n/**\n * Convert a span to a JSON representation.\n * Note that all fields returned here are optional and need to be guarded against.\n *\n * Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).\n * This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.\n * And `spanToJSON` needs the Span class from `span.ts` to check here.\n * TODO v8: When we remove the deprecated stuff from `span.ts`, we can remove the circular dependency again.\n */\n\n\nfunction spanToJSON(span) {\n if (spanIsSpanClass(span)) {\n return span.getSpanJSON();\n } // Fallback: We also check for `.toJSON()` here...\n // eslint-disable-next-line deprecation/deprecation\n\n\n if (typeof span.toJSON === 'function') {\n // eslint-disable-next-line deprecation/deprecation\n return span.toJSON();\n }\n\n return {};\n}\n/**\n * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.\n * :( So instead we approximate this by checking if it has the `getSpanJSON` method.\n */\n\n\nfunction spanIsSpanClass(span) {\n return typeof span.getSpanJSON === 'function';\n}\n/**\n * Returns true if a span is sampled.\n * In most cases, you should just use `span.isRecording()` instead.\n * However, this has a slightly different semantic, as it also returns false if the span is finished.\n * So in the case where this distinction is important, use this method.\n */\n\n\nfunction spanIsSampled(span) {\n // We align our trace flags with the ones OpenTelemetry use\n // So we also check for sampled the same way they do.\n var _span$spanContext3 = span.spanContext(),\n traceFlags = _span$spanContext3.traceFlags; // eslint-disable-next-line no-bitwise\n\n\n return Boolean(traceFlags & TRACE_FLAG_SAMPLED);\n}\n\nexport { TRACE_FLAG_NONE, TRACE_FLAG_SAMPLED, spanIsSampled, spanTimeInputToSeconds, spanToJSON, spanToTraceContext, spanToTraceHeader };","import { createTransport } from '@sentry/core';\nimport { SyncPromise } from '@sentry/utils';\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 */\n\nvar XHR_READYSTATE_DONE = 4;\n/**\n * Creates a Transport that uses the XMLHttpRequest API to send events to Sentry.\n */\n\nfunction makeXHRTransport(options) {\n function makeRequest(request) {\n return new SyncPromise(function (resolve, reject) {\n var xhr = new XMLHttpRequest();\n xhr.onerror = reject;\n\n xhr.onreadystatechange = function () {\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 (var 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 };","import { logger, consoleSandbox } from '@sentry/utils';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { getCurrentScope } from './exports.js';\nimport { getCurrentHub } from './hub.js';\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 */\n\nfunction initAndBind(clientClass, options) {\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 consoleSandbox(function () {\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 }\n\n var scope = getCurrentScope();\n scope.update(options.initialScope);\n var client = new clientClass(options);\n setCurrentClient(client);\n initializeClient(client);\n}\n/**\n * Make the given client the current client.\n */\n\n\nfunction setCurrentClient(client) {\n // eslint-disable-next-line deprecation/deprecation\n var hub = getCurrentHub(); // eslint-disable-next-line deprecation/deprecation\n\n var top = hub.getStackTop();\n top.client = client;\n top.scope.setClient(client);\n}\n/**\n * Initialize the client for the current scope.\n * Make sure to call this after `setCurrentClient()`.\n */\n\n\nfunction initializeClient(client) {\n if (client.init) {\n client.init(); // TODO v8: Remove this fallback\n // eslint-disable-next-line deprecation/deprecation\n } else if (client.setupIntegrations) {\n // eslint-disable-next-line deprecation/deprecation\n client.setupIntegrations();\n }\n}\n\nexport { initAndBind, setCurrentClient };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { dsnToString, createEnvelope } from '@sentry/utils';\n/**\n * Creates an envelope from a user feedback.\n */\n\nfunction createUserFeedbackEnvelope(feedback, _ref) {\n var metadata = _ref.metadata,\n tunnel = _ref.tunnel,\n dsn = _ref.dsn;\n\n var headers = _objectSpread(_objectSpread({\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 }), !!tunnel && !!dsn && {\n dsn: dsnToString(dsn)\n });\n\n var item = createUserFeedbackEnvelopeItem(feedback);\n return createEnvelope(headers, [item]);\n}\n\nfunction createUserFeedbackEnvelopeItem(feedback) {\n var feedbackHeaders = {\n type: 'user_report'\n };\n return [feedbackHeaders, feedback];\n}\n\nexport { createUserFeedbackEnvelope };","import { addGlobalErrorInstrumentationHandler, addGlobalUnhandledRejectionInstrumentationHandler, logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { getActiveTransaction } from './utils.js';\nvar errorsInstrumented = false;\n/**\n * Configures global error listeners\n */\n\nfunction registerErrorInstrumentation() {\n if (errorsInstrumented) {\n return;\n }\n\n errorsInstrumented = true;\n addGlobalErrorInstrumentationHandler(errorCallback);\n addGlobalUnhandledRejectionInstrumentationHandler(errorCallback);\n}\n/**\n * If an error or unhandled promise occurs, we mark the active transaction as failed\n */\n\n\nfunction errorCallback() {\n // eslint-disable-next-line deprecation/deprecation\n var activeTransaction = getActiveTransaction();\n\n if (activeTransaction) {\n var status = 'internal_error';\n DEBUG_BUILD && logger.log(\"[Tracing] Transaction: \".concat(status, \" -> Global error occured\"));\n activeTransaction.setStatus(status);\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\n\nerrorCallback.tag = 'sentry_tracingErrorCallback';\nexport { registerErrorInstrumentation };","import { isNativeFetch, logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\nvar 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 */\n\nfunction getNativeFetchImplementation() {\n if (cachedFetchImpl) {\n return cachedFetchImpl;\n }\n /* eslint-disable @typescript-eslint/unbound-method */\n // Fast path to avoid DOM I/O\n\n\n if (isNativeFetch(WINDOW.fetch)) {\n return cachedFetchImpl = WINDOW.fetch.bind(WINDOW);\n }\n\n var document = WINDOW.document;\n var fetchImpl = WINDOW.fetch; // eslint-disable-next-line deprecation/deprecation\n\n if (document && typeof document.createElement === 'function') {\n try {\n var sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n var contentWindow = sandbox.contentWindow;\n\n if (contentWindow && contentWindow.fetch) {\n fetchImpl = contentWindow.fetch;\n }\n\n document.head.removeChild(sandbox);\n } catch (e) {\n DEBUG_BUILD && 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/** Clears cached fetch impl */\n\n\nfunction clearCachedFetchImplementation() {\n cachedFetchImpl = undefined;\n}\n\nexport { clearCachedFetchImplementation, getNativeFetchImplementation };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { createTransport } from '@sentry/core';\nimport { rejectedSyncPromise } from '@sentry/utils';\nimport { getNativeFetchImplementation, clearCachedFetchImplementation } from './utils.js';\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\n\nfunction makeFetchTransport(options) {\n var nativeFetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getNativeFetchImplementation();\n var pendingBodySize = 0;\n var pendingCount = 0;\n\n function makeRequest(request) {\n var requestSize = request.body.length;\n pendingBodySize += requestSize;\n pendingCount++;\n\n var requestOptions = _objectSpread({\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(function (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 };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nimport { BaseClient, applySdkMetadata } from '@sentry/core';\nimport { getSDKSource, logger, createClientReportEnvelope, dsnToString } from '@sentry/utils';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { eventFromException as _eventFromException, eventFromMessage as _eventFromMessage } from './eventbuilder.js';\nimport { WINDOW } from './helpers.js';\nimport { createUserFeedbackEnvelope } from './userfeedback.js';\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 */\n\nvar BrowserClient = /*#__PURE__*/function (_BaseClient) {\n _inherits(BrowserClient, _BaseClient);\n\n var _super = _createSuper(BrowserClient);\n\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n function BrowserClient(options) {\n var _this;\n\n _classCallCheck(this, BrowserClient);\n\n var sdkSource = WINDOW.SENTRY_SDK_SOURCE || getSDKSource();\n applySdkMetadata(options, 'browser', ['browser'], sdkSource);\n _this = _super.call(this, options);\n\n if (options.sendClientReports && WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', function () {\n if (WINDOW.document.visibilityState === 'hidden') {\n _this._flushOutcomes();\n }\n });\n }\n\n return _this;\n }\n /**\n * @inheritDoc\n */\n\n\n _createClass(BrowserClient, [{\n key: \"eventFromException\",\n value: function eventFromException(exception, hint) {\n return _eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"eventFromMessage\",\n value: function eventFromMessage(message) {\n var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'info';\n var hint = arguments.length > 2 ? arguments[2] : undefined;\n return _eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n /**\n * Sends user feedback to Sentry.\n */\n\n }, {\n key: \"captureUserFeedback\",\n value: function captureUserFeedback(feedback) {\n if (!this._isEnabled()) {\n DEBUG_BUILD && logger.warn('SDK not enabled, will not capture user feedback.');\n return;\n }\n\n var envelope = createUserFeedbackEnvelope(feedback, {\n metadata: this.getSdkMetadata(),\n dsn: this.getDsn(),\n tunnel: this.getOptions().tunnel\n }); // _sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n\n this._sendEnvelope(envelope);\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"_prepareEvent\",\n value: function _prepareEvent(event, hint, scope) {\n event.platform = event.platform || 'javascript';\n return _get(_getPrototypeOf(BrowserClient.prototype), \"_prepareEvent\", this).call(this, event, hint, scope);\n }\n /**\n * Sends client reports as an envelope.\n */\n\n }, {\n key: \"_flushOutcomes\",\n value: function _flushOutcomes() {\n var outcomes = this._clearOutcomes();\n\n if (outcomes.length === 0) {\n DEBUG_BUILD && logger.log('No outcomes to send');\n return;\n } // This is really the only place where we want to check for a DSN and only send outcomes then\n\n\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 var envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn)); // _sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n\n this._sendEnvelope(envelope);\n }\n }]);\n\n return BrowserClient;\n}(BaseClient);\n\nexport { BrowserClient };","import { createEnvelope } from './envelope.js';\nimport { dateTimestampInSeconds } from './time.js';\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 */\n\nfunction createClientReportEnvelope(discarded_events, dsn, timestamp) {\n var clientReportItem = [{\n type: 'client_report'\n }, {\n timestamp: timestamp || dateTimestampInSeconds(),\n discarded_events: discarded_events\n }];\n return createEnvelope(dsn ? {\n dsn: dsn\n } : {}, [clientReportItem]);\n}\n\nexport { createClientReportEnvelope };","/**\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 var match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n } // coerce to undefined values to empty string so we don't get 'undefined'\n\n\n var query = match[6] || '';\n var 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 */\n\n\nfunction stripUrlQueryAndFragment(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 */\n\n\nfunction getNumberOfUrlSegments(url) {\n // split at '/' or at '\\/' to split regex urls correctly\n return url.split(/\\\\?\\//).filter(function (s) {\n return s.length > 0 && s !== ',';\n }).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 */\n\n\nfunction getSanitizedUrlString(url) {\n var protocol = url.protocol,\n host = url.host,\n path = url.path;\n var 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 // TODO: Use new URL global if it exists\n .replace(/(:80)$/, '').replace(/(:443)$/, '') || '';\n return \"\".concat(protocol ? \"\".concat(protocol, \"://\") : '').concat(filteredHost).concat(path);\n}\n\nexport { getNumberOfUrlSegments, getSanitizedUrlString, parseUrl, stripUrlQueryAndFragment };","function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport { arrayify, logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { addGlobalEventProcessor } from './eventProcessors.js';\nimport { getClient } from './exports.js';\nimport { getCurrentHub } from './hub.js';\nvar installedIntegrations = [];\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 */\n\nfunction filterDuplicates(integrations) {\n var integrationsByName = {};\n integrations.forEach(function (currentInstance) {\n var name = currentInstance.name;\n var existingInstance = integrationsByName[name]; // 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\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n\n integrationsByName[name] = currentInstance;\n });\n return Object.keys(integrationsByName).map(function (k) {\n return integrationsByName[k];\n });\n}\n/** Gets integrations to install */\n\n\nfunction getIntegrationsToSetup(options) {\n var defaultIntegrations = options.defaultIntegrations || [];\n var userIntegrations = options.integrations; // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n\n defaultIntegrations.forEach(function (integration) {\n integration.isDefaultInstance = true;\n });\n var integrations;\n\n if (Array.isArray(userIntegrations)) {\n integrations = [].concat(_toConsumableArray(defaultIntegrations), _toConsumableArray(userIntegrations));\n } else if (typeof userIntegrations === 'function') {\n integrations = arrayify(userIntegrations(defaultIntegrations));\n } else {\n integrations = defaultIntegrations;\n }\n\n var finalIntegrations = filterDuplicates(integrations); // 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\n var debugIndex = findIndex(finalIntegrations, function (integration) {\n return integration.name === 'Debug';\n });\n\n if (debugIndex !== -1) {\n var _finalIntegrations$sp = finalIntegrations.splice(debugIndex, 1),\n _finalIntegrations$sp2 = _slicedToArray(_finalIntegrations$sp, 1),\n debugInstance = _finalIntegrations$sp2[0];\n\n finalIntegrations.push(debugInstance);\n }\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 */\n\n\nfunction setupIntegrations(client, integrations) {\n var integrationIndex = {};\n integrations.forEach(function (integration) {\n // guard against empty provided integrations\n if (integration) {\n setupIntegration(client, integration, integrationIndex);\n }\n });\n return integrationIndex;\n}\n/**\n * Execute the `afterAllSetup` hooks of the given integrations.\n */\n\n\nfunction afterSetupIntegrations(client, integrations) {\n var _iterator = _createForOfIteratorHelper(integrations),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var integration = _step.value;\n\n // guard against empty provided integrations\n if (integration && integration.afterAllSetup) {\n integration.afterAllSetup(client);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n}\n/** Setup a single integration. */\n\n\nfunction setupIntegration(client, integration, integrationIndex) {\n if (integrationIndex[integration.name]) {\n DEBUG_BUILD && logger.log(\"Integration skipped because it was already installed: \".concat(integration.name));\n return;\n }\n\n integrationIndex[integration.name] = integration; // `setupOnce` is only called the first time\n\n if (installedIntegrations.indexOf(integration.name) === -1) {\n // eslint-disable-next-line deprecation/deprecation\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n } // `setup` is run for each client\n\n\n if (integration.setup && typeof integration.setup === 'function') {\n integration.setup(client);\n }\n\n if (client.on && typeof integration.preprocessEvent === 'function') {\n var callback = integration.preprocessEvent.bind(integration);\n client.on('preprocessEvent', function (event, hint) {\n return callback(event, hint, client);\n });\n }\n\n if (client.addEventProcessor && typeof integration.processEvent === 'function') {\n var _callback = integration.processEvent.bind(integration);\n\n var processor = Object.assign(function (event, hint) {\n return _callback(event, hint, client);\n }, {\n id: integration.name\n });\n client.addEventProcessor(processor);\n }\n\n DEBUG_BUILD && logger.log(\"Integration installed: \".concat(integration.name));\n}\n/** Add an integration to the current hub's client. */\n\n\nfunction addIntegration(integration) {\n var client = getClient();\n\n if (!client || !client.addIntegration) {\n DEBUG_BUILD && logger.warn(\"Cannot add integration \\\"\".concat(integration.name, \"\\\" because no SDK Client is available.\"));\n return;\n }\n\n client.addIntegration(integration);\n} // Polyfill for Array.findIndex(), which is not supported in ES5\n\n\nfunction findIndex(arr, callback) {\n for (var i = 0; i < arr.length; i++) {\n if (callback(arr[i]) === true) {\n return i;\n }\n }\n\n return -1;\n}\n/**\n * Convert a new integration function to the legacy class syntax.\n * In v8, we can remove this and instead export the integration functions directly.\n *\n * @deprecated This will be removed in v8!\n */\n\n\nfunction convertIntegrationFnToClass(name, fn) {\n return Object.assign(function ConvertedIntegration() {\n return fn.apply(void 0, arguments);\n }, {\n id: name\n });\n}\n/**\n * Define an integration function that can be used to create an integration instance.\n * Note that this by design hides the implementation details of the integration, as they are considered internal.\n */\n\n\nfunction defineIntegration(fn) {\n return fn;\n}\n\nexport { addIntegration, afterSetupIntegrations, convertIntegrationFnToClass, defineIntegration, getIntegrationsToSetup, installedIntegrations, setupIntegration, setupIntegrations };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { isError, isPlainObject, isParameterizedString } from './is.js';\nimport { addExceptionTypeValue, addExceptionMechanism } from './misc.js';\nimport { normalizeToSize } from './normalize.js';\nimport { extractExceptionKeysForMessage } from './object.js';\n/**\n * Extracts stack frames from the error.stack string\n */\n\nfunction parseStackFrames(stackParser, error) {\n return stackParser(error.stack || '', 1);\n}\n/**\n * Extracts stack frames from the error and builds a Sentry Exception\n */\n\n\nfunction exceptionFromError(stackParser, error) {\n var exception = {\n type: error.name || error.constructor.name,\n value: error.message\n };\n var frames = parseStackFrames(stackParser, error);\n\n if (frames.length) {\n exception.stacktrace = {\n frames: frames\n };\n }\n\n return exception;\n}\n\nfunction getMessageForObject(exception) {\n if ('name' in exception && typeof exception.name === 'string') {\n var message = \"'\".concat(exception.name, \"' captured as exception\");\n\n if ('message' in exception && typeof exception.message === 'string') {\n message += \" with message '\".concat(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: \".concat(extractExceptionKeysForMessage(exception));\n }\n}\n/**\n * Builds and Event from a Exception\n *\n * TODO(v8): Remove getHub fallback\n * @hidden\n */\n\n\nfunction eventFromUnknownInput( // eslint-disable-next-line deprecation/deprecation\ngetHubOrClient, stackParser, exception, hint) {\n var client = typeof getHubOrClient === 'function' ? // eslint-disable-next-line deprecation/deprecation\n getHubOrClient().getClient() : getHubOrClient;\n var ex = exception;\n var providedMechanism = hint && hint.data && hint.data.mechanism;\n var mechanism = providedMechanism || {\n handled: true,\n type: 'generic'\n };\n var extras;\n\n if (!isError(exception)) {\n if (isPlainObject(exception)) {\n var normalizeDepth = client && client.getOptions().normalizeDepth;\n extras = _defineProperty({}, '__serialized__', normalizeToSize(exception, normalizeDepth));\n var 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\n mechanism.synthetic = true;\n }\n\n var event = {\n exception: {\n values: [exceptionFromError(stackParser, ex)]\n }\n };\n\n if (extras) {\n event.extra = extras;\n }\n\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, mechanism);\n return _objectSpread(_objectSpread({}, event), {}, {\n event_id: hint && hint.event_id\n });\n}\n/**\n * Builds and Event from a Message\n * @hidden\n */\n\n\nfunction eventFromMessage(stackParser, message) {\n var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'info';\n var hint = arguments.length > 3 ? arguments[3] : undefined;\n var attachStacktrace = arguments.length > 4 ? arguments[4] : undefined;\n var event = {\n event_id: hint && hint.event_id,\n level: level\n };\n\n if (attachStacktrace && hint && hint.syntheticException) {\n var frames = parseStackFrames(stackParser, hint.syntheticException);\n\n if (frames.length) {\n event.exception = {\n values: [{\n value: message,\n stacktrace: {\n frames: frames\n }\n }]\n };\n }\n }\n\n if (isParameterizedString(message)) {\n var __sentry_template_string__ = message.__sentry_template_string__,\n __sentry_template_values__ = message.__sentry_template_values__;\n event.logentry = {\n message: __sentry_template_string__,\n params: __sentry_template_values__\n };\n return event;\n }\n\n event.message = message;\n return event;\n}\n\nexport { eventFromMessage, eventFromUnknownInput, exceptionFromError, parseStackFrames };","import { applyAggregateErrorsToEvent, exceptionFromError } from '@sentry/utils';\nimport { convertIntegrationFnToClass, defineIntegration } from '../integration.js';\nvar DEFAULT_KEY = 'cause';\nvar DEFAULT_LIMIT = 5;\nvar INTEGRATION_NAME = 'LinkedErrors';\n\nvar _linkedErrorsIntegration = function _linkedErrorsIntegration() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var limit = options.limit || DEFAULT_LIMIT;\n var key = options.key || DEFAULT_KEY;\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce: function setupOnce() {},\n // eslint-disable-line @typescript-eslint/no-empty-function\n preprocessEvent: function preprocessEvent(event, hint, client) {\n var options = client.getOptions();\n applyAggregateErrorsToEvent(exceptionFromError, options.stackParser, options.maxValueLength, key, limit, event, hint);\n }\n };\n};\n\nvar linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration);\n/**\n * Adds SDK info to an event.\n * @deprecated Use `linkedErrorsIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\n\nvar LinkedErrors = convertIntegrationFnToClass(INTEGRATION_NAME, linkedErrorsIntegration);\nexport { LinkedErrors, linkedErrorsIntegration };","export { addTracingExtensions, startIdleTransaction } from './tracing/hubextensions.js';\nexport { IdleTransaction, TRACING_DEFAULTS } from './tracing/idletransaction.js';\nexport { Span } from './tracing/span.js';\nexport { Transaction } from './tracing/transaction.js';\nexport { extractTraceparentData, getActiveTransaction } from './tracing/utils.js';\nexport { SpanStatus, getSpanStatusFromHttpCode, setHttpStatus, spanStatusfromHttpCode } from './tracing/spanstatus.js';\nexport { continueTrace, getActiveSpan, startActiveSpan, startInactiveSpan, startSpan, startSpanManual, trace } from './tracing/trace.js';\nexport { getDynamicSamplingContextFromClient, getDynamicSamplingContextFromSpan } from './tracing/dynamicSamplingContext.js';\nexport { setMeasurement } from './tracing/measurement.js';\nexport { isValidSampleRate } from './tracing/sampling.js';\nexport { SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from './semanticAttributes.js';\nexport { createEventEnvelope, createSessionEnvelope } from './envelope.js';\nexport { addBreadcrumb, captureCheckIn, captureEvent, captureException, captureMessage, captureSession, close, configureScope, endSession, flush, getClient, getCurrentScope, isInitialized, lastEventId, setContext, setExtra, setExtras, setTag, setTags, setUser, startSession, startTransaction, withActiveSpan, withIsolationScope, withMonitor, withScope } from './exports.js';\nexport { Hub, ensureHubOnCarrier, getCurrentHub, getHubFromCarrier, getIsolationScope, getMainCarrier, makeMain, runWithAsyncContext, setAsyncContextStrategy, setHubOnCarrier } from './hub.js';\nexport { closeSession, makeSession, updateSession } from './session.js';\nexport { SessionFlusher } from './sessionflusher.js';\nexport { Scope, getGlobalScope, setGlobalScope } from './scope.js';\nexport { addGlobalEventProcessor, notifyEventProcessors } from './eventProcessors.js';\nexport { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint } from './api.js';\nexport { BaseClient, addEventProcessor } from './baseclient.js';\nexport { ServerRuntimeClient } from './server-runtime-client.js';\nexport { initAndBind, setCurrentClient } from './sdk.js';\nexport { createTransport } from './transports/base.js';\nexport { makeOfflineTransport } from './transports/offline.js';\nexport { makeMultiplexedTransport } from './transports/multiplexed.js';\nexport { SDK_VERSION } from './version.js';\nexport { addIntegration, convertIntegrationFnToClass, defineIntegration, getIntegrationsToSetup } from './integration.js';\nexport { applyScopeDataToEvent, mergeScopeData } from './utils/applyScopeDataToEvent.js';\nexport { prepareEvent } from './utils/prepareEvent.js';\nexport { createCheckInEnvelope } from './checkin.js';\nexport { createSpanEnvelope } from './span.js';\nexport { hasTracingEnabled } from './utils/hasTracingEnabled.js';\nexport { isSentryRequestUrl } from './utils/isSentryRequestUrl.js';\nexport { handleCallbackErrors } from './utils/handleCallbackErrors.js';\nexport { parameterize } from './utils/parameterize.js';\nexport { spanIsSampled, spanToJSON, spanToTraceContext, spanToTraceHeader } from './utils/spanUtils.js';\nexport { getRootSpan } from './utils/getRootSpan.js';\nexport { applySdkMetadata } from './utils/sdkMetadata.js';\nexport { DEFAULT_ENVIRONMENT } from './constants.js';\nexport { ModuleMetadata, moduleMetadataIntegration } from './integrations/metadata.js';\nexport { RequestData, requestDataIntegration } from './integrations/requestdata.js';\nexport { InboundFilters, inboundFiltersIntegration } from './integrations/inboundfilters.js';\nexport { FunctionToString, functionToStringIntegration } from './integrations/functiontostring.js';\nexport { LinkedErrors, linkedErrorsIntegration } from './integrations/linkederrors.js';\nimport * as index from './integrations/index.js';\nexport { metrics } from './metrics/exports.js';\n/** @deprecated Import the integration function directly, e.g. `inboundFiltersIntegration()` instead of `new Integrations.InboundFilter(). */\n\nvar Integrations = index;\nexport { Integrations };","function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../logger.js';\nimport { getFunctionName } from '../stacktrace.js'; // We keep the handlers globally\n\nvar handlers = {};\nvar instrumented = {};\n/** Add a handler function. */\n\nfunction addHandler(type, handler) {\n handlers[type] = handlers[type] || [];\n handlers[type].push(handler);\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 */\n\n\nfunction resetInstrumentationHandlers() {\n Object.keys(handlers).forEach(function (key) {\n handlers[key] = undefined;\n });\n}\n/** Maybe run an instrumentation function, unless it was already called. */\n\n\nfunction maybeInstrument(type, instrumentFn) {\n if (!instrumented[type]) {\n instrumentFn();\n instrumented[type] = true;\n }\n}\n/** Trigger handlers for a given instrumentation type. */\n\n\nfunction triggerHandlers(type, data) {\n var typeHandlers = type && handlers[type];\n\n if (!typeHandlers) {\n return;\n }\n\n var _iterator = _createForOfIteratorHelper(typeHandlers),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var handler = _step.value;\n\n try {\n handler(data);\n } catch (e) {\n DEBUG_BUILD && logger.error(\"Error while triggering instrumentation handler.\\nType: \".concat(type, \"\\nName: \").concat(getFunctionName(handler), \"\\nError:\"), e);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n}\n\nexport { addHandler, maybeInstrument, resetInstrumentationHandlers, triggerHandlers };","import { DEBUG_BUILD } from './debug-build.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n/** Prefix for logging strings */\n\nvar PREFIX = 'Sentry Logger ';\nvar CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'];\n/** This may be mutated by the console instrumentation. */\n\nvar originalConsoleMethods = {};\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 */\n\nfunction consoleSandbox(callback) {\n if (!('console' in GLOBAL_OBJ)) {\n return callback();\n }\n\n var console = GLOBAL_OBJ.console;\n var wrappedFuncs = {};\n var wrappedLevels = Object.keys(originalConsoleMethods); // Restore all wrapped console methods\n\n wrappedLevels.forEach(function (level) {\n var 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(function (level) {\n console[level] = wrappedFuncs[level];\n });\n }\n}\n\nfunction makeLogger() {\n var enabled = false;\n var logger = {\n enable: function enable() {\n enabled = true;\n },\n disable: function disable() {\n enabled = false;\n },\n isEnabled: function isEnabled() {\n return enabled;\n }\n };\n\n if (DEBUG_BUILD) {\n CONSOLE_LEVELS.forEach(function (name) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logger[name] = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (enabled) {\n consoleSandbox(function () {\n var _GLOBAL_OBJ$console;\n\n (_GLOBAL_OBJ$console = GLOBAL_OBJ.console)[name].apply(_GLOBAL_OBJ$console, [\"\".concat(PREFIX, \"[\").concat(name, \"]:\")].concat(args));\n });\n }\n };\n });\n } else {\n CONSOLE_LEVELS.forEach(function (name) {\n logger[name] = function () {\n return undefined;\n };\n });\n }\n\n return logger;\n}\n\nvar logger = makeLogger();\nexport { CONSOLE_LEVELS, consoleSandbox, logger, originalConsoleMethods };","/**\n * Use this attribute to represent the source of a span.\n * Should be one of: custom, url, route, view, component, task, unknown\n *\n */\nvar SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = 'sentry.source';\n/**\n * Use this attribute to represent the sample rate used for a span.\n */\n\nvar SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = 'sentry.sample_rate';\n/**\n * Use this attribute to represent the operation of a span.\n */\n\nvar SEMANTIC_ATTRIBUTE_SENTRY_OP = 'sentry.op';\n/**\n * Use this attribute to represent the origin of a span.\n */\n\nvar SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = 'sentry.origin';\n/**\n * The id of the profile that this span occured in.\n */\n\nvar SEMANTIC_ATTRIBUTE_PROFILE_ID = 'profile_id';\nexport { SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE };","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nvar DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__;\nexport { DEBUG_BUILD };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { getMainCarrier } from '../hub.js';\nimport { spanToTraceHeader } from '../utils/spanUtils.js';\nimport { registerErrorInstrumentation } from './errors.js';\nimport { IdleTransaction } from './idletransaction.js';\nimport { sampleTransaction } from './sampling.js';\nimport { Transaction } from './transaction.js';\n/** Returns all trace headers that are currently on the top scope. */\n// eslint-disable-next-line deprecation/deprecation\n\nfunction traceHeaders() {\n // eslint-disable-next-line deprecation/deprecation\n var scope = this.getScope(); // eslint-disable-next-line deprecation/deprecation\n\n var span = scope.getSpan();\n return span ? {\n 'sentry-trace': spanToTraceHeader(span)\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 */\n\n\nfunction _startTransaction( // eslint-disable-next-line deprecation/deprecation\ntransactionContext, customSamplingContext) {\n // eslint-disable-next-line deprecation/deprecation\n var client = this.getClient();\n var options = client && client.getOptions() || {};\n var configInstrumenter = options.instrumenter || 'sentry';\n var transactionInstrumenter = transactionContext.instrumenter || 'sentry';\n\n if (configInstrumenter !== transactionInstrumenter) {\n DEBUG_BUILD && logger.error(\"A transaction was started with instrumenter=`\".concat(transactionInstrumenter, \"`, but the SDK is configured with the `\").concat(configInstrumenter, \"` instrumenter.\\nThe transaction will not be sampled. Please use the \").concat(configInstrumenter, \" instrumentation to start transactions.\")); // eslint-disable-next-line deprecation/deprecation\n\n transactionContext.sampled = false;\n } // eslint-disable-next-line deprecation/deprecation\n\n\n var transaction = new Transaction(transactionContext, this);\n transaction = sampleTransaction(transaction, options, _objectSpread({\n name: transactionContext.name,\n parentSampled: transactionContext.parentSampled,\n transactionContext: transactionContext,\n attributes: _objectSpread(_objectSpread({}, transactionContext.data), transactionContext.attributes)\n }, customSamplingContext));\n\n if (transaction.isRecording()) {\n transaction.initSpanRecorder(options._experiments && options._experiments.maxSpans);\n }\n\n if (client && client.emit) {\n client.emit('startTransaction', transaction);\n }\n\n return transaction;\n}\n/**\n * Create new idle transaction.\n */\n\n\nfunction startIdleTransaction( // eslint-disable-next-line deprecation/deprecation\nhub, transactionContext, idleTimeout, finalTimeout, onScope, customSamplingContext, heartbeatInterval) {\n var delayAutoFinishUntilSignal = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;\n // eslint-disable-next-line deprecation/deprecation\n var client = hub.getClient();\n var options = client && client.getOptions() || {}; // eslint-disable-next-line deprecation/deprecation\n\n var transaction = new IdleTransaction(transactionContext, hub, idleTimeout, finalTimeout, heartbeatInterval, onScope, delayAutoFinishUntilSignal);\n transaction = sampleTransaction(transaction, options, _objectSpread({\n name: transactionContext.name,\n parentSampled: transactionContext.parentSampled,\n transactionContext: transactionContext,\n attributes: _objectSpread(_objectSpread({}, transactionContext.data), transactionContext.attributes)\n }, customSamplingContext));\n\n if (transaction.isRecording()) {\n transaction.initSpanRecorder(options._experiments && options._experiments.maxSpans);\n }\n\n if (client && client.emit) {\n client.emit('startTransaction', transaction);\n }\n\n return transaction;\n}\n/**\n * Adds tracing extensions to the global hub.\n */\n\n\nfunction addTracingExtensions() {\n var carrier = getMainCarrier();\n\n if (!carrier.__SENTRY__) {\n return;\n }\n\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n\n if (!carrier.__SENTRY__.extensions.startTransaction) {\n carrier.__SENTRY__.extensions.startTransaction = _startTransaction;\n }\n\n if (!carrier.__SENTRY__.extensions.traceHeaders) {\n carrier.__SENTRY__.extensions.traceHeaders = traceHeaders;\n }\n\n registerErrorInstrumentation();\n}\n\nexport { addTracingExtensions, startIdleTransaction };","import { dsnToString, createEnvelope } from '@sentry/utils';\nimport { serializeMetricBuckets } from './utils.js';\n/**\n * Create envelope from a metric aggregate.\n */\n\nfunction createMetricEnvelope(metricBucketItems, dsn, metadata, tunnel) {\n var headers = {\n sent_at: new Date().toISOString()\n };\n\n if (metadata && metadata.sdk) {\n headers.sdk = {\n name: metadata.sdk.name,\n version: metadata.sdk.version\n };\n }\n\n if (!!tunnel && dsn) {\n headers.dsn = dsnToString(dsn);\n }\n\n var item = createMetricEnvelopeItem(metricBucketItems);\n return createEnvelope(headers, [item]);\n}\n\nfunction createMetricEnvelopeItem(metricBucketItems) {\n var payload = serializeMetricBuckets(metricBucketItems);\n var metricHeaders = {\n type: 'statsd',\n length: payload.length\n };\n return [metricHeaders, payload];\n}\n\nexport { createMetricEnvelope };","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport { makeDsn, logger, checkOrSetAlreadyCaught, isParameterizedString, isPrimitive, resolvedSyncPromise, addItemToEnvelope, createAttachmentEnvelopeItem, SyncPromise, rejectedSyncPromise, SentryError, isThenable, isPlainObject } from '@sentry/utils';\nimport { getEnvelopeEndpointWithUrlEncodedAuth } from './api.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope.js';\nimport { getClient } from './exports.js';\nimport { getIsolationScope } from './hub.js';\nimport { setupIntegration, afterSetupIntegrations, setupIntegrations } from './integration.js';\nimport { createMetricEnvelope } from './metrics/envelope.js';\nimport { updateSession } from './session.js';\nimport { getDynamicSamplingContextFromClient } from './tracing/dynamicSamplingContext.js';\nimport { prepareEvent } from './utils/prepareEvent.js';\nvar 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 */\n\nvar BaseClient = /*#__PURE__*/function () {\n /**\n * A reference to a metrics aggregator\n *\n * @experimental Note this is alpha API. It may experience breaking changes in the future.\n */\n\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 // 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 function BaseClient(options) {\n _classCallCheck(this, BaseClient);\n\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 var url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options);\n this._transport = options.transport(_objectSpread(_objectSpread({\n tunnel: this._options.tunnel,\n recordDroppedEvent: this.recordDroppedEvent.bind(this)\n }, options.transportOptions), {}, {\n url: url\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 _createClass(BaseClient, [{\n key: \"captureException\",\n value: function captureException(exception, hint, scope) {\n var _this = this;\n\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 var eventId = hint && hint.event_id;\n\n this._process(this.eventFromException(exception, hint).then(function (event) {\n return _this._captureEvent(event, hint, scope);\n }).then(function (result) {\n eventId = result;\n }));\n\n return eventId;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"captureMessage\",\n value: function captureMessage(message, // eslint-disable-next-line deprecation/deprecation\n level, hint, scope) {\n var _this2 = this;\n\n var eventId = hint && hint.event_id;\n var eventMessage = isParameterizedString(message) ? message : String(message);\n var promisedEvent = isPrimitive(message) ? this.eventFromMessage(eventMessage, level, hint) : this.eventFromException(message, hint);\n\n this._process(promisedEvent.then(function (event) {\n return _this2._captureEvent(event, hint, scope);\n }).then(function (result) {\n eventId = result;\n }));\n\n return eventId;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"captureEvent\",\n value: function captureEvent(event, hint, scope) {\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 var eventId = hint && hint.event_id;\n var sdkProcessingMetadata = event.sdkProcessingMetadata || {};\n var capturedSpanScope = sdkProcessingMetadata.capturedSpanScope;\n\n this._process(this._captureEvent(event, hint, capturedSpanScope || scope).then(function (result) {\n eventId = result;\n }));\n\n return eventId;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"captureSession\",\n value: function captureSession(session) {\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); // After sending, we set init false to indicate it's not the first occurrence\n\n updateSession(session, {\n init: false\n });\n }\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"getDsn\",\n value: function getDsn() {\n return this._dsn;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"getOptions\",\n value: function getOptions() {\n return this._options;\n }\n /**\n * @see SdkMetadata in @sentry/types\n *\n * @return The metadata of the SDK\n */\n\n }, {\n key: \"getSdkMetadata\",\n value: function getSdkMetadata() {\n return this._options._metadata;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"getTransport\",\n value: function getTransport() {\n return this._transport;\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"flush\",\n value: function flush(timeout) {\n var transport = this._transport;\n\n if (transport) {\n if (this.metricsAggregator) {\n this.metricsAggregator.flush();\n }\n\n return this._isClientDoneProcessing(timeout).then(function (clientFinished) {\n return transport.flush(timeout).then(function (transportFlushed) {\n return clientFinished && transportFlushed;\n });\n });\n } else {\n return resolvedSyncPromise(true);\n }\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"close\",\n value: function close(timeout) {\n var _this3 = this;\n\n return this.flush(timeout).then(function (result) {\n _this3.getOptions().enabled = false;\n\n if (_this3.metricsAggregator) {\n _this3.metricsAggregator.close();\n }\n\n return result;\n });\n }\n /** Get all installed event processors. */\n\n }, {\n key: \"getEventProcessors\",\n value: function getEventProcessors() {\n return this._eventProcessors;\n }\n /** @inheritDoc */\n\n }, {\n key: \"addEventProcessor\",\n value: function addEventProcessor(eventProcessor) {\n this._eventProcessors.push(eventProcessor);\n }\n /**\n * This is an internal function to setup all integrations that should run on the client.\n * @deprecated Use `client.init()` instead.\n */\n\n }, {\n key: \"setupIntegrations\",\n value: function setupIntegrations(forceInitialize) {\n if (forceInitialize && !this._integrationsInitialized || this._isEnabled() && !this._integrationsInitialized) {\n this._setupIntegrations();\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"init\",\n value: function init() {\n if (this._isEnabled()) {\n this._setupIntegrations();\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 * @deprecated Use `getIntegrationByName()` instead.\n */\n\n }, {\n key: \"getIntegrationById\",\n value: function getIntegrationById(integrationId) {\n return this.getIntegrationByName(integrationId);\n }\n /**\n * Gets an installed integration by its name.\n *\n * @returns The installed integration or `undefined` if no integration with that `name` was installed.\n */\n\n }, {\n key: \"getIntegrationByName\",\n value: function getIntegrationByName(integrationName) {\n return this._integrations[integrationName];\n }\n /**\n * Returns the client's instance of the given integration class, it any.\n * @deprecated Use `getIntegrationByName()` instead.\n */\n\n }, {\n key: \"getIntegration\",\n value: function getIntegration(integration) {\n try {\n return this._integrations[integration.id] || null;\n } catch (_oO) {\n DEBUG_BUILD && logger.warn(\"Cannot retrieve integration \".concat(integration.id, \" from the current Client\"));\n return null;\n }\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"addIntegration\",\n value: function addIntegration(integration) {\n var isAlreadyInstalled = this._integrations[integration.name]; // This hook takes care of only installing if not already installed\n\n setupIntegration(this, integration, this._integrations); // Here we need to check manually to make sure to not run this multiple times\n\n if (!isAlreadyInstalled) {\n afterSetupIntegrations(this, [integration]);\n }\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"sendEvent\",\n value: function sendEvent(event) {\n var _this4 = this;\n\n var hint = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.emit('beforeSendEvent', event, hint);\n var env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n\n var _iterator = _createForOfIteratorHelper(hint.attachments || []),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var attachment = _step.value;\n env = addItemToEnvelope(env, createAttachmentEnvelopeItem(attachment, this._options.transportOptions && this._options.transportOptions.textEncoder));\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n var promise = this._sendEnvelope(env);\n\n if (promise) {\n promise.then(function (sendResponse) {\n return _this4.emit('afterSendEvent', event, sendResponse);\n }, null);\n }\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"sendSession\",\n value: function sendSession(session) {\n var env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel); // _sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n\n this._sendEnvelope(env);\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"recordDroppedEvent\",\n value: function recordDroppedEvent(reason, category, eventOrCount) {\n if (this._options.sendClientReports) {\n // TODO v9: We do not need the `event` passed as third argument anymore, and can possibly remove this overload\n // If event is passed as third argument, we assume this is a count of 1\n var count = typeof eventOrCount === 'number' ? eventOrCount : 1; // 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\n var key = \"\".concat(reason, \":\").concat(category);\n DEBUG_BUILD && logger.log(\"Recording outcome: \\\"\".concat(key, \"\\\"\").concat(count > 1 ? \" (\".concat(count, \" times)\") : ''));\n this._outcomes[key] = (this._outcomes[key] || 0) + count;\n }\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"captureAggregateMetrics\",\n value: function captureAggregateMetrics(metricBucketItems) {\n DEBUG_BUILD && logger.log(\"Flushing aggregated metrics, number of metrics: \".concat(metricBucketItems.length));\n var metricsEnvelope = createMetricEnvelope(metricBucketItems, this._dsn, this._options._metadata, this._options.tunnel); // _sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n\n this._sendEnvelope(metricsEnvelope);\n } // Keep on() & emit() signatures in sync with types' client.ts interface\n\n /* eslint-disable @typescript-eslint/unified-signatures */\n\n /** @inheritdoc */\n\n /** @inheritdoc */\n\n }, {\n key: \"on\",\n value: function on(hook, callback) {\n if (!this._hooks[hook]) {\n this._hooks[hook] = [];\n } // @ts-expect-error We assue the types are correct\n\n\n this._hooks[hook].push(callback);\n }\n /** @inheritdoc */\n\n /** @inheritdoc */\n\n }, {\n key: \"emit\",\n value: function emit(hook) {\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n if (this._hooks[hook]) {\n this._hooks[hook].forEach(function (callback) {\n return callback.apply(void 0, rest);\n });\n }\n }\n /* eslint-enable @typescript-eslint/unified-signatures */\n\n /** Setup integrations for this client. */\n\n }, {\n key: \"_setupIntegrations\",\n value: function _setupIntegrations() {\n var integrations = this._options.integrations;\n this._integrations = setupIntegrations(this, integrations);\n afterSetupIntegrations(this, integrations); // TODO v8: We don't need this flag anymore\n\n this._integrationsInitialized = true;\n }\n /** Updates existing session based on the provided event */\n\n }, {\n key: \"_updateSessionFromEvent\",\n value: function _updateSessionFromEvent(session, event) {\n var crashed = false;\n var errored = false;\n var exceptions = event.exception && event.exception.values;\n\n if (exceptions) {\n errored = true;\n\n var _iterator2 = _createForOfIteratorHelper(exceptions),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var ex = _step2.value;\n var mechanism = ex.mechanism;\n\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\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\n\n var sessionNonTerminal = session.status === 'ok';\n var shouldUpdateAndSend = sessionNonTerminal && session.errors === 0 || sessionNonTerminal && crashed;\n\n if (shouldUpdateAndSend) {\n updateSession(session, _objectSpread(_objectSpread({}, 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 */\n\n }, {\n key: \"_isClientDoneProcessing\",\n value: function _isClientDoneProcessing(timeout) {\n var _this5 = this;\n\n return new SyncPromise(function (resolve) {\n var ticked = 0;\n var tick = 1;\n var interval = setInterval(function () {\n if (_this5._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n\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. */\n\n }, {\n key: \"_isEnabled\",\n value: function _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 */\n\n }, {\n key: \"_prepareEvent\",\n value: function _prepareEvent(event, hint, scope) {\n var _this6 = this;\n\n var isolationScope = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : getIsolationScope();\n var options = this.getOptions();\n var integrations = Object.keys(this._integrations);\n\n if (!hint.integrations && integrations.length > 0) {\n hint.integrations = integrations;\n }\n\n this.emit('preprocessEvent', event, hint);\n return prepareEvent(options, event, hint, scope, this, isolationScope).then(function (evt) {\n if (evt === null) {\n return evt;\n }\n\n var propagationContext = _objectSpread(_objectSpread({}, isolationScope.getPropagationContext()), scope ? scope.getPropagationContext() : undefined);\n\n var trace = evt.contexts && evt.contexts.trace;\n\n if (!trace && propagationContext) {\n var trace_id = propagationContext.traceId,\n spanId = propagationContext.spanId,\n parentSpanId = propagationContext.parentSpanId,\n dsc = propagationContext.dsc;\n evt.contexts = _objectSpread({\n trace: {\n trace_id: trace_id,\n span_id: spanId,\n parent_span_id: parentSpanId\n }\n }, evt.contexts);\n var dynamicSamplingContext = dsc ? dsc : getDynamicSamplingContextFromClient(trace_id, _this6, scope);\n evt.sdkProcessingMetadata = _objectSpread({\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 */\n\n }, {\n key: \"_captureEvent\",\n value: function _captureEvent(event) {\n var hint = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var scope = arguments.length > 2 ? arguments[2] : undefined;\n return this._processEvent(event, hint, scope).then(function (finalEvent) {\n return finalEvent.event_id;\n }, function (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 var sentryError = reason;\n\n if (sentryError.logLevel === 'log') {\n logger.log(sentryError.message);\n } else {\n logger.warn(sentryError);\n }\n }\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 */\n\n }, {\n key: \"_processEvent\",\n value: function _processEvent(event, hint, scope) {\n var _this7 = this;\n\n var options = this.getOptions();\n var sampleRate = options.sampleRate;\n var isTransaction = isTransactionEvent(event);\n var isError = isErrorEvent(event);\n var eventType = event.type || 'error';\n var beforeSendLabel = \"before send for type `\".concat(eventType, \"`\"); // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n\n if (isError && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n this.recordDroppedEvent('sample_rate', 'error', event);\n return rejectedSyncPromise(new SentryError(\"Discarding event because it's not included in the random sample (sampling rate = \".concat(sampleRate, \")\"), 'log'));\n }\n\n var dataCategory = eventType === 'replay_event' ? 'replay' : eventType;\n var sdkProcessingMetadata = event.sdkProcessingMetadata || {};\n var capturedSpanIsolationScope = sdkProcessingMetadata.capturedSpanIsolationScope;\n return this._prepareEvent(event, hint, scope, capturedSpanIsolationScope).then(function (prepared) {\n if (prepared === null) {\n _this7.recordDroppedEvent('event_processor', dataCategory, event);\n\n throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n var isInternalException = hint.data && hint.data.__sentry__ === true;\n\n if (isInternalException) {\n return prepared;\n }\n\n var result = processBeforeSend(options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n }).then(function (processedEvent) {\n if (processedEvent === null) {\n _this7.recordDroppedEvent('before_send', dataCategory, event);\n\n if (isTransaction) {\n var spans = event.spans || []; // the transaction itself counts as one span, plus all the child spans that are added\n\n var spanCount = 1 + spans.length;\n\n _this7.recordDroppedEvent('before_send', 'span', spanCount);\n }\n\n throw new SentryError(\"\".concat(beforeSendLabel, \" returned `null`, will not send event.\"), 'log');\n }\n\n var session = scope && scope.getSession();\n\n if (!isTransaction && session) {\n _this7._updateSessionFromEvent(session, processedEvent);\n }\n\n if (isTransaction) {\n var spanCountBefore = processedEvent.sdkProcessingMetadata && processedEvent.sdkProcessingMetadata.spanCountBeforeProcessing || 0;\n var spanCountAfter = processedEvent.spans ? processedEvent.spans.length : 0;\n var droppedSpanCount = spanCountBefore - spanCountAfter;\n\n if (droppedSpanCount > 0) {\n _this7.recordDroppedEvent('before_send', 'span', droppedSpanCount);\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\n\n var transactionInfo = processedEvent.transaction_info;\n\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n var source = 'custom';\n processedEvent.transaction_info = _objectSpread(_objectSpread({}, transactionInfo), {}, {\n source: source\n });\n }\n\n _this7.sendEvent(processedEvent, hint);\n\n return processedEvent;\n }).then(null, function (reason) {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n _this7.captureException(reason, {\n data: {\n __sentry__: true\n },\n originalException: reason\n });\n\n throw new SentryError(\"Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: \".concat(reason));\n });\n }\n /**\n * Occupies the client with processing and event\n */\n\n }, {\n key: \"_process\",\n value: function _process(promise) {\n var _this8 = this;\n\n this._numProcessing++;\n void promise.then(function (value) {\n _this8._numProcessing--;\n return value;\n }, function (reason) {\n _this8._numProcessing--;\n return reason;\n });\n }\n /**\n * @inheritdoc\n */\n\n }, {\n key: \"_sendEnvelope\",\n value: function _sendEnvelope(envelope) {\n this.emit('beforeEnvelope', envelope);\n\n if (this._isEnabled() && this._transport) {\n return this._transport.send(envelope).then(null, function (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 * Clears outcomes on this client and returns them.\n */\n\n }, {\n key: \"_clearOutcomes\",\n value: function _clearOutcomes() {\n var outcomes = this._outcomes;\n this._outcomes = {};\n return Object.keys(outcomes).map(function (key) {\n var _key$split = key.split(':'),\n _key$split2 = _slicedToArray(_key$split, 2),\n reason = _key$split2[0],\n category = _key$split2[1];\n\n return {\n reason: reason,\n category: category,\n quantity: outcomes[key]\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 return BaseClient;\n}();\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */\n\n\nfunction _validateBeforeSendResult(beforeSendResult, beforeSendLabel) {\n var invalidValueError = \"\".concat(beforeSendLabel, \" must return `null` or a valid event.\");\n\n if (isThenable(beforeSendResult)) {\n return beforeSendResult.then(function (event) {\n if (!isPlainObject(event) && event !== null) {\n throw new SentryError(invalidValueError);\n }\n\n return event;\n }, function (e) {\n throw new SentryError(\"\".concat(beforeSendLabel, \" rejected with \").concat(e));\n });\n } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n throw new SentryError(invalidValueError);\n }\n\n return beforeSendResult;\n}\n/**\n * Process the matching `beforeSendXXX` callback.\n */\n\n\nfunction processBeforeSend(options, event, hint) {\n var beforeSend = options.beforeSend,\n beforeSendTransaction = options.beforeSendTransaction;\n\n if (isErrorEvent(event) && beforeSend) {\n return beforeSend(event, hint);\n }\n\n if (isTransactionEvent(event) && beforeSendTransaction) {\n if (event.spans) {\n // We store the # of spans before processing in SDK metadata,\n // so we can compare it afterwards to determine how many spans were dropped\n var spanCountBefore = event.spans.length;\n event.sdkProcessingMetadata = _objectSpread(_objectSpread({}, event.sdkProcessingMetadata), {}, {\n spanCountBeforeProcessing: spanCountBefore\n });\n }\n\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/**\n * Add an event processor to the current client.\n * This event processor will run for all events processed by this client.\n */\n\n\nfunction addEventProcessor(callback) {\n var client = getClient();\n\n if (!client || !client.addEventProcessor) {\n return;\n }\n\n client.addEventProcessor(callback);\n}\n\nexport { BaseClient, addEventProcessor };","function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport { GLOBAL_OBJ } from '@sentry/utils';\n/** Keys are source filename/url, values are metadata objects. */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\nvar filenameMetadataMap = new Map();\n/** Set of stack strings that have already been parsed. */\n\nvar parsedStacks = new Set();\n\nfunction ensureMetadataStacksAreParsed(parser) {\n if (!GLOBAL_OBJ._sentryModuleMetadata) {\n return;\n }\n\n for (var _i = 0, _Object$keys = Object.keys(GLOBAL_OBJ._sentryModuleMetadata); _i < _Object$keys.length; _i++) {\n var stack = _Object$keys[_i];\n var metadata = GLOBAL_OBJ._sentryModuleMetadata[stack];\n\n if (parsedStacks.has(stack)) {\n continue;\n } // Ensure this stack doesn't get parsed again\n\n\n parsedStacks.add(stack);\n var frames = parser(stack); // Go through the frames starting from the top of the stack and find the first one with a filename\n\n var _iterator = _createForOfIteratorHelper(frames.reverse()),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var frame = _step.value;\n\n if (frame.filename) {\n // Save the metadata for this filename\n filenameMetadataMap.set(frame.filename, metadata);\n break;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n}\n/**\n * Retrieve metadata for a specific JavaScript file URL.\n *\n * Metadata is injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nfunction getMetadataForUrl(parser, filename) {\n ensureMetadataStacksAreParsed(parser);\n return filenameMetadataMap.get(filename);\n}\n/**\n * Adds metadata to stack frames.\n *\n * Metadata is injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option.\n */\n\n\nfunction addMetadataToStackFrames(parser, event) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(function (exception) {\n if (!exception.stacktrace) {\n return;\n }\n\n var _iterator2 = _createForOfIteratorHelper(exception.stacktrace.frames || []),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var frame = _step2.value;\n\n if (!frame.filename) {\n continue;\n }\n\n var metadata = getMetadataForUrl(parser, frame.filename);\n\n if (metadata) {\n frame.module_metadata = metadata;\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n });\n } catch (_) {// 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 * Strips metadata from stack frames.\n */\n\n\nfunction stripMetadataFromStackFrames(event) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(function (exception) {\n if (!exception.stacktrace) {\n return;\n }\n\n var _iterator3 = _createForOfIteratorHelper(exception.stacktrace.frames || []),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var frame = _step3.value;\n delete frame.module_metadata;\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n });\n } catch (_) {// To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\nexport { addMetadataToStackFrames, getMetadataForUrl, stripMetadataFromStackFrames };","import { forEachEnvelopeItem } from '@sentry/utils';\nimport { convertIntegrationFnToClass, defineIntegration } from '../integration.js';\nimport { stripMetadataFromStackFrames, addMetadataToStackFrames } from '../metadata.js';\nvar INTEGRATION_NAME = 'ModuleMetadata';\n\nvar _moduleMetadataIntegration = function _moduleMetadataIntegration() {\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce: function setupOnce() {},\n // eslint-disable-line @typescript-eslint/no-empty-function\n setup: function setup(client) {\n if (typeof client.on !== 'function') {\n return;\n } // We need to strip metadata from stack frames before sending them to Sentry since these are client side only.\n\n\n client.on('beforeEnvelope', function (envelope) {\n forEachEnvelopeItem(envelope, function (item, type) {\n if (type === 'event') {\n var event = Array.isArray(item) ? item[1] : undefined;\n\n if (event) {\n stripMetadataFromStackFrames(event);\n item[1] = event;\n }\n }\n });\n });\n },\n processEvent: function processEvent(event, _hint, client) {\n var stackParser = client.getOptions().stackParser;\n addMetadataToStackFrames(stackParser, event);\n return event;\n }\n };\n};\n\nvar moduleMetadataIntegration = defineIntegration(_moduleMetadataIntegration);\n/**\n * Adds module metadata to stack frames.\n *\n * Metadata can be injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option.\n *\n * When this integration is added, the metadata passed to the bundler plugin is added to the stack frames of all events\n * under the `module_metadata` property. This can be used to help in tagging or routing of events from different teams\n * our sources\n *\n * @deprecated Use `moduleMetadataIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\n\nvar ModuleMetadata = convertIntegrationFnToClass(INTEGRATION_NAME, moduleMetadataIntegration);\nexport { ModuleMetadata, moduleMetadataIntegration };","import { SentryError } from './error.js';\nimport { rejectedSyncPromise, SyncPromise, resolvedSyncPromise } from './syncpromise.js';\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 */\n\nfunction makePromiseBuffer(limit) {\n var buffer = [];\n\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 */\n\n\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 */\n\n\n function add(taskProducer) {\n if (!isReady()) {\n return rejectedSyncPromise(new SentryError('Not adding Promise because buffer limit was reached.'));\n } // start the task and add its promise to the queue\n\n\n var task = taskProducer();\n\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n\n void task.then(function () {\n return 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, function () {\n return remove(task).then(null, function () {// We have to add another catch here because `remove()` starts a new promise chain.\n });\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 */\n\n\n function drain(timeout) {\n return new SyncPromise(function (resolve, reject) {\n var counter = buffer.length;\n\n if (!counter) {\n return resolve(true);\n } // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n\n\n var capturedSetTimeout = setTimeout(function () {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout); // if all promises resolve in time, cancel the timer and resolve to `true`\n\n buffer.forEach(function (item) {\n void resolvedSyncPromise(item).then(function () {\n if (! --counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n\n return {\n $: buffer,\n add: add,\n drain: drain\n };\n}\n\nexport { makePromiseBuffer };","import { makePromiseBuffer, forEachEnvelopeItem, envelopeItemTypeToDataCategory, isRateLimited, resolvedSyncPromise, createEnvelope, SentryError, logger, serializeEnvelope, updateRateLimits } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nvar DEFAULT_TRANSPORT_BUFFER_SIZE = 30;\n/**\n * Creates an instance of a Sentry `Transport`\n *\n * @param options\n * @param makeRequest\n */\n\nfunction createTransport(options, makeRequest) {\n var buffer = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : makePromiseBuffer(options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE);\n var rateLimits = {};\n\n var flush = function flush(timeout) {\n return buffer.drain(timeout);\n };\n\n function send(envelope) {\n var filteredEnvelopeItems = []; // Drop rate limited items from envelope\n\n forEachEnvelopeItem(envelope, function (item, type) {\n var dataCategory = envelopeItemTypeToDataCategory(type);\n\n if (isRateLimited(rateLimits, dataCategory)) {\n var event = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent('ratelimit_backoff', dataCategory, event);\n } else {\n filteredEnvelopeItems.push(item);\n }\n }); // Skip sending if envelope is empty after filtering out rate limited events\n\n if (filteredEnvelopeItems.length === 0) {\n return resolvedSyncPromise();\n } // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n var filteredEnvelope = createEnvelope(envelope[0], filteredEnvelopeItems); // Creates client report for each item in an envelope\n\n var recordEnvelopeLoss = function recordEnvelopeLoss(reason) {\n forEachEnvelopeItem(filteredEnvelope, function (item, type) {\n var event = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type), event);\n });\n };\n\n var requestTask = function requestTask() {\n return makeRequest({\n body: serializeEnvelope(filteredEnvelope, options.textEncoder)\n }).then(function (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 \".concat(response.statusCode, \" to sent event.\"));\n }\n\n rateLimits = updateRateLimits(rateLimits, response);\n return response;\n }, function (error) {\n recordEnvelopeLoss('network_error');\n throw error;\n });\n };\n\n return buffer.add(requestTask).then(function (result) {\n return result;\n }, function (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 } // 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\n\n send.__sentry__baseTransport__ = true;\n return {\n send: send,\n flush: 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 };","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { isString } from './is.js';\nimport { logger } from './logger.js';\nvar BAGGAGE_HEADER_NAME = 'baggage';\nvar SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\nvar SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\n\nvar MAX_BAGGAGE_STRING_LENGTH = 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 */\n\nfunction baggageHeaderToDynamicSamplingContext( // Very liberal definition of what any incoming header might look like\nbaggageHeader) {\n if (!isString(baggageHeader) && !Array.isArray(baggageHeader)) {\n 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\n\n var 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(function (acc, curr) {\n var currBaggageObject = baggageHeaderToObject(curr);\n\n for (var _i = 0, _Object$keys = Object.keys(currBaggageObject); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n acc[key] = currBaggageObject[key];\n }\n\n return acc;\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 } // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n\n\n var dynamicSamplingContext = Object.entries(baggageObject).reduce(function (acc, _ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n var nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n\n return acc;\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\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext;\n } else {\n return undefined;\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 */\n\n\nfunction dynamicSamplingContextToSentryBaggageHeader( // this also takes undefined for convenience and bundle size in other places\ndynamicSamplingContext) {\n if (!dynamicSamplingContext) {\n return undefined;\n } // Prefix all DSC keys with \"sentry-\" and put them into a new object\n\n\n var sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce(function (acc, _ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n dscKey = _ref4[0],\n dscValue = _ref4[1];\n\n if (dscValue) {\n acc[\"\".concat(SENTRY_BAGGAGE_KEY_PREFIX).concat(dscKey)] = dscValue;\n }\n\n return acc;\n }, {});\n return 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 */\n\n\nfunction baggageHeaderToObject(baggageHeader) {\n return baggageHeader.split(',').map(function (baggageEntry) {\n return baggageEntry.split('=').map(function (keyOrValue) {\n return decodeURIComponent(keyOrValue.trim());\n });\n }).reduce(function (acc, _ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n key = _ref6[0],\n value = _ref6[1];\n\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 */\n\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(function (baggageHeader, _ref7, currentIndex) {\n var _ref8 = _slicedToArray(_ref7, 2),\n objectKey = _ref8[0],\n objectValue = _ref8[1];\n\n var baggageEntry = \"\".concat(encodeURIComponent(objectKey), \"=\").concat(encodeURIComponent(objectValue));\n var newBaggageHeader = currentIndex === 0 ? baggageEntry : \"\".concat(baggageHeader, \",\").concat(baggageEntry);\n\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n DEBUG_BUILD && logger.warn(\"Not adding key: \".concat(objectKey, \" with val: \").concat(objectValue, \" to baggage header due to exceeding baggage size limits.\"));\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 };","import { DEBUG_BUILD } from './debug-build.js';\nimport { logger } from './logger.js';\nimport { getGlobalObject } from './worldwide.js'; // eslint-disable-next-line deprecation/deprecation\n\nvar WINDOW = getGlobalObject();\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\n\nfunction supportsErrorEvent() {\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 */\n\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 * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\n\n\nfunction supportsDOMException() {\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 */\n\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\n\n\nfunction isNativeFetch(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 */\n\n\nfunction supportsNativeFetch() {\n if (typeof EdgeRuntime === 'string') {\n return true;\n }\n\n if (!supportsFetch()) {\n return false;\n } // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n\n\n if (isNativeFetch(WINDOW.fetch)) {\n 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\n\n var result = false;\n var doc = WINDOW.document; // eslint-disable-next-line deprecation/deprecation\n\n if (doc && typeof doc.createElement === 'function') {\n try {\n var sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n\n doc.head.removeChild(sandbox);\n } catch (err) {\n DEBUG_BUILD && 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 * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\n\n\nfunction supportsReportingObserver() {\n return 'ReportingObserver' in WINDOW;\n}\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\n\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 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 };","import { baggageHeaderToDynamicSamplingContext } from './baggage.js';\nimport { uuid4 } from './misc.js'; // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- RegExp is used for readability here\n\nvar TRACEPARENT_REGEXP = new RegExp('^[ \\\\t]*' + // whitespace\n'([0-9a-f]{32})?' + // trace_id\n'-?([0-9a-f]{16})?' + // span_id\n'-?([01])?' + // sampled\n'[ \\\\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 */\n\nfunction extractTraceparentData(traceparent) {\n if (!traceparent) {\n return undefined;\n }\n\n var matches = traceparent.match(TRACEPARENT_REGEXP);\n\n if (!matches) {\n return undefined;\n }\n\n var parentSampled;\n\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: parentSampled,\n parentSpanId: matches[2]\n };\n}\n/**\n * Create tracing context from incoming headers.\n *\n * @deprecated Use `propagationContextFromHeaders` instead.\n */\n// TODO(v8): Remove this function\n\n\nfunction tracingContextFromHeaders(sentryTrace, baggage) {\n var traceparentData = extractTraceparentData(sentryTrace);\n var dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage);\n\n var _ref = traceparentData || {},\n traceId = _ref.traceId,\n parentSpanId = _ref.parentSpanId,\n parentSampled = _ref.parentSampled;\n\n if (!traceparentData) {\n return {\n traceparentData: traceparentData,\n dynamicSamplingContext: undefined,\n propagationContext: {\n traceId: traceId || uuid4(),\n spanId: uuid4().substring(16)\n }\n };\n } else {\n return {\n traceparentData: traceparentData,\n dynamicSamplingContext: dynamicSamplingContext || {},\n // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it\n propagationContext: {\n traceId: traceId || uuid4(),\n parentSpanId: parentSpanId || uuid4().substring(16),\n spanId: uuid4().substring(16),\n sampled: parentSampled,\n dsc: dynamicSamplingContext || {} // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it\n\n }\n };\n }\n}\n/**\n * Create a propagation context from incoming headers.\n */\n\n\nfunction propagationContextFromHeaders(sentryTrace, baggage) {\n var traceparentData = extractTraceparentData(sentryTrace);\n var dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage);\n\n var _ref2 = traceparentData || {},\n traceId = _ref2.traceId,\n parentSpanId = _ref2.parentSpanId,\n parentSampled = _ref2.parentSampled;\n\n if (!traceparentData) {\n return {\n traceId: traceId || uuid4(),\n spanId: uuid4().substring(16)\n };\n } else {\n return {\n traceId: traceId || uuid4(),\n parentSpanId: parentSpanId || uuid4().substring(16),\n spanId: uuid4().substring(16),\n sampled: parentSampled,\n dsc: dynamicSamplingContext || {} // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it\n\n };\n }\n}\n/**\n * Create sentry-trace header from span context values.\n */\n\n\nfunction generateSentryTraceHeader() {\n var traceId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : uuid4();\n var spanId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : uuid4().substring(16);\n var sampled = arguments.length > 2 ? arguments[2] : undefined;\n var sampledString = '';\n\n if (sampled !== undefined) {\n sampledString = sampled ? '-1' : '-0';\n }\n\n return \"\".concat(traceId, \"-\").concat(spanId).concat(sampledString);\n}\n\nexport { TRACEPARENT_REGEXP, extractTraceparentData, generateSentryTraceHeader, propagationContextFromHeaders, tracingContextFromHeaders };","import { isVueViewModel, isString, isRegExp } from './is.js';\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 */\n\nfunction truncate(str) {\n var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n\n return str.length <= max ? str : \"\".concat(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 */\n\n\nfunction snipLine(line, colno) {\n var newLine = line;\n var lineLength = newLine.length;\n\n if (lineLength <= 150) {\n return newLine;\n }\n\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n\n var start = Math.max(colno - 60, 0);\n\n if (start < 5) {\n start = 0;\n }\n\n var end = Math.min(start + 140, lineLength);\n\n if (end > lineLength - 5) {\n end = lineLength;\n }\n\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n\n if (start > 0) {\n newLine = \"'{snip} \".concat(newLine);\n }\n\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n\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 */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nfunction safeJoin(input, delimiter) {\n if (!Array.isArray(input)) {\n return '';\n }\n\n var output = []; // eslint-disable-next-line @typescript-eslint/prefer-for-of\n\n for (var i = 0; i < input.length; i++) {\n var value = input[i];\n\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 * 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 */\n\n\nfunction isMatchingPattern(value, pattern) {\n var requireExactStringMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n\n if (isString(pattern)) {\n return requireExactStringMatch ? value === pattern : value.includes(pattern);\n }\n\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 */\n\n\nfunction stringMatchesSomePattern(testString) {\n var patterns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var requireExactStringMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n return patterns.some(function (pattern) {\n return isMatchingPattern(testString, pattern, requireExactStringMatch);\n });\n}\n\nexport { isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate };","import { SDK_VERSION } from '../version.js';\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\n\nfunction applySdkMetadata(options, name) {\n var names = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [name];\n var source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'npm';\n var metadata = options._metadata || {};\n\n if (!metadata.sdk) {\n metadata.sdk = {\n name: \"sentry.javascript.\".concat(name),\n packages: names.map(function (name) {\n return {\n name: \"\".concat(source, \":@sentry/\").concat(name),\n version: SDK_VERSION\n };\n }),\n version: SDK_VERSION\n };\n }\n\n options._metadata = metadata;\n}\n\nexport { applySdkMetadata };","function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport _regeneratorRuntime from \"@babel/runtime/regenerator\";\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { createEnvelope, dsnFromString, forEachEnvelopeItem } from '@sentry/utils';\nimport { getEnvelopeEndpointWithUrlEncodedAuth } from '../api.js';\n/**\n * Gets an event from an envelope.\n *\n * This is only exported for use in the tests\n */\n\nfunction eventFromEnvelope(env, types) {\n var event;\n forEachEnvelopeItem(env, function (item, type) {\n if (types.includes(type)) {\n event = Array.isArray(item) ? item[1] : undefined;\n } // bail out if we found an event\n\n\n return !!event;\n });\n return event;\n}\n/**\n * Creates a transport that overrides the release on all events.\n */\n\n\nfunction makeOverrideReleaseTransport(createTransport, release) {\n return function (options) {\n var transport = createTransport(options);\n return _objectSpread(_objectSpread({}, transport), {}, {\n send: function () {\n var _send = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(envelope) {\n var event;\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n event = eventFromEnvelope(envelope, ['event', 'transaction', 'profile', 'replay_event']);\n\n if (event) {\n event.release = release;\n }\n\n return _context.abrupt(\"return\", transport.send(envelope));\n\n case 3:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n\n function send(_x) {\n return _send.apply(this, arguments);\n }\n\n return send;\n }()\n });\n };\n}\n/** Overrides the DSN in the envelope header */\n\n\nfunction overrideDsn(envelope, dsn) {\n return createEnvelope(dsn ? _objectSpread(_objectSpread({}, envelope[0]), {}, {\n dsn: dsn\n }) : envelope[0], envelope[1]);\n}\n/**\n * Creates a transport that can send events to different DSNs depending on the envelope contents.\n */\n\n\nfunction makeMultiplexedTransport(createTransport, matcher) {\n return function (options) {\n var fallbackTransport = createTransport(options);\n var otherTransports = new Map();\n\n function getTransport(dsn, release) {\n // We create a transport for every unique dsn/release combination as there may be code from multiple releases in\n // use at the same time\n var key = release ? \"\".concat(dsn, \":\").concat(release) : dsn;\n var transport = otherTransports.get(key);\n\n if (!transport) {\n var validatedDsn = dsnFromString(dsn);\n\n if (!validatedDsn) {\n return undefined;\n }\n\n var url = getEnvelopeEndpointWithUrlEncodedAuth(validatedDsn, options.tunnel);\n transport = release ? makeOverrideReleaseTransport(createTransport, release)(_objectSpread(_objectSpread({}, options), {}, {\n url: url\n })) : createTransport(_objectSpread(_objectSpread({}, options), {}, {\n url: url\n }));\n otherTransports.set(key, transport);\n }\n\n return [dsn, transport];\n }\n\n function send(_x2) {\n return _send2.apply(this, arguments);\n }\n\n function _send2() {\n _send2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(envelope) {\n var getEvent, transports, results;\n return _regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n getEvent = function _getEvent(types) {\n var eventTypes = types && types.length ? types : ['event'];\n return eventFromEnvelope(envelope, eventTypes);\n };\n\n transports = matcher({\n envelope: envelope,\n getEvent: getEvent\n }).map(function (result) {\n if (typeof result === 'string') {\n return getTransport(result, undefined);\n } else {\n return getTransport(result.dsn, result.release);\n }\n }).filter(function (t) {\n return !!t;\n }); // If we have no transports to send to, use the fallback transport\n\n if (transports.length === 0) {\n // Don't override the DSN in the header for the fallback transport. '' is falsy\n transports.push(['', fallbackTransport]);\n }\n\n _context2.next = 5;\n return Promise.all(transports.map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n dsn = _ref2[0],\n transport = _ref2[1];\n\n return transport.send(overrideDsn(envelope, dsn));\n }));\n\n case 5:\n results = _context2.sent;\n return _context2.abrupt(\"return\", results[0]);\n\n case 7:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n return _send2.apply(this, arguments);\n }\n\n function flush(_x3) {\n return _flush.apply(this, arguments);\n }\n\n function _flush() {\n _flush = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(timeout) {\n var promises, _iterator, _step, _ref5, _ref4, transport;\n\n return _regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _context3.next = 2;\n return fallbackTransport.flush(timeout);\n\n case 2:\n _context3.t0 = _context3.sent;\n promises = [_context3.t0];\n _iterator = _createForOfIteratorHelper(otherTransports);\n _context3.prev = 5;\n\n _iterator.s();\n\n case 7:\n if ((_step = _iterator.n()).done) {\n _context3.next = 18;\n break;\n }\n\n _ref5 = _step.value;\n _ref4 = _slicedToArray(_ref5, 2);\n transport = _ref4[1];\n _context3.t1 = promises;\n _context3.next = 14;\n return transport.flush(timeout);\n\n case 14:\n _context3.t2 = _context3.sent;\n\n _context3.t1.push.call(_context3.t1, _context3.t2);\n\n case 16:\n _context3.next = 7;\n break;\n\n case 18:\n _context3.next = 23;\n break;\n\n case 20:\n _context3.prev = 20;\n _context3.t3 = _context3[\"catch\"](5);\n\n _iterator.e(_context3.t3);\n\n case 23:\n _context3.prev = 23;\n\n _iterator.f();\n\n return _context3.finish(23);\n\n case 26:\n return _context3.abrupt(\"return\", promises.every(function (r) {\n return r;\n }));\n\n case 27:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, null, [[5, 20, 23, 26]]);\n }));\n return _flush.apply(this, arguments);\n }\n\n return {\n send: send,\n flush: flush\n };\n };\n}\n\nexport { eventFromEnvelope, makeMultiplexedTransport };","/**\n * Tagged template function which returns paramaterized representation of the message\n * For example: parameterize`This is a log statement with ${x} and ${y} params`, would return:\n * \"__sentry_template_string__\": 'This is a log statement with %s and %s params',\n * \"__sentry_template_values__\": ['first', 'second']\n * @param strings An array of string values splitted between expressions\n * @param values Expressions extracted from template string\n * @returns String with template information in __sentry_template_string__ and __sentry_template_values__ properties\n */\nfunction parameterize(strings) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n var formatted = new String(String.raw.apply(String, [strings].concat(values)));\n formatted.__sentry_template_string__ = strings.join('\\x00').replace(/%/g, '%%').replace(/\\0/g, '%s');\n formatted.__sentry_template_values__ = values;\n return formatted;\n}\n\nexport { parameterize };","import { getActiveTransaction } from './utils.js';\n/**\n * Adds a measurement to the current active transaction.\n */\n\nfunction setMeasurement(name, value, unit) {\n // eslint-disable-next-line deprecation/deprecation\n var transaction = getActiveTransaction();\n\n if (transaction) {\n // eslint-disable-next-line deprecation/deprecation\n transaction.setMeasurement(name, value, unit);\n }\n}\n\nexport { setMeasurement };","/**\n * Checks whether given url points to Sentry server\n * @param url url to verify\n *\n * TODO(v8): Remove Hub fallback type\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction isSentryRequestUrl(url, hubOrClient) {\n var client = hubOrClient && isHub(hubOrClient) ? // eslint-disable-next-line deprecation/deprecation\n hubOrClient.getClient() : hubOrClient;\n var dsn = client && client.getDsn();\n var tunnel = client && client.getOptions().tunnel;\n return checkDsn(url, dsn) || checkTunnel(url, tunnel);\n}\n\nfunction checkTunnel(url, tunnel) {\n if (!tunnel) {\n return false;\n }\n\n return removeTrailingSlash(url) === removeTrailingSlash(tunnel);\n}\n\nfunction checkDsn(url, dsn) {\n return dsn ? url.includes(dsn.host) : false;\n}\n\nfunction removeTrailingSlash(str) {\n return str[str.length - 1] === '/' ? str.slice(0, -1) : str;\n} // eslint-disable-next-line deprecation/deprecation\n\n\nfunction isHub(hubOrClient) {\n // eslint-disable-next-line deprecation/deprecation\n return hubOrClient.getClient !== undefined;\n}\n\nexport { isSentryRequestUrl };","import { dsnToString, createEnvelope } from '@sentry/utils';\n/**\n * Create envelope from Span item.\n */\n\nfunction createSpanEnvelope(spans, dsn) {\n var headers = {\n sent_at: new Date().toISOString()\n };\n\n if (dsn) {\n headers.dsn = dsnToString(dsn);\n }\n\n var items = spans.map(createSpanItem);\n return createEnvelope(headers, items);\n}\n\nfunction createSpanItem(span) {\n var spanHeaders = {\n type: 'span'\n };\n return [spanHeaders, span];\n}\n\nexport { createSpanEnvelope };","import _regeneratorRuntime from \"@babel/runtime/regenerator\";\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nimport { parseRetryAfterHeader, logger, envelopeContainsItemType } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nvar MIN_DELAY = 100; // 100 ms\n\nvar START_DELAY = 5000; // 5 seconds\n\nvar MAX_DELAY = 3.6e6; // 1 hour\n\nfunction log(msg, error) {\n DEBUG_BUILD && logger.info(\"[Offline]: \".concat(msg), error);\n}\n/**\n * Wraps a transport and stores and retries events when they fail to send.\n *\n * @param createTransport The transport to wrap.\n */\n\n\nfunction makeOfflineTransport(createTransport) {\n return function (options) {\n var transport = createTransport(options);\n var store = options.createStore ? options.createStore(options) : undefined;\n var retryDelay = START_DELAY;\n var flushTimer;\n\n function shouldQueue(env, error, retryDelay) {\n // We don't queue Session Replay envelopes because they are:\n // - Ordered and Replay relies on the response status to know when they're successfully sent.\n // - Likely to fill the queue quickly and block other events from being sent.\n // We also want to drop client reports because they can be generated when we retry sending events while offline.\n if (envelopeContainsItemType(env, ['replay_event', 'replay_recording', 'client_report'])) {\n return false;\n }\n\n if (options.shouldStore) {\n return options.shouldStore(env, error, retryDelay);\n }\n\n return true;\n }\n\n function flushIn(delay) {\n if (!store) {\n return;\n }\n\n if (flushTimer) {\n clearTimeout(flushTimer);\n }\n\n flushTimer = setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {\n var found;\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n flushTimer = undefined;\n _context.next = 3;\n return store.pop();\n\n case 3:\n found = _context.sent;\n\n if (found) {\n log('Attempting to send previously queued event');\n void send(found).catch(function (e) {\n log('Failed to retry sending', e);\n });\n }\n\n case 5:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n })), delay); // We need to unref the timer in node.js, otherwise the node process never exit.\n\n if (typeof flushTimer !== 'number' && flushTimer.unref) {\n flushTimer.unref();\n }\n }\n\n function flushWithBackOff() {\n if (flushTimer) {\n return;\n }\n\n flushIn(retryDelay);\n retryDelay = Math.min(retryDelay * 2, MAX_DELAY);\n }\n\n function send(_x) {\n return _send.apply(this, arguments);\n }\n\n function _send() {\n _send = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(envelope) {\n var result, delay;\n return _regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.prev = 0;\n _context2.next = 3;\n return transport.send(envelope);\n\n case 3:\n result = _context2.sent;\n delay = MIN_DELAY;\n\n if (!result) {\n _context2.next = 12;\n break;\n }\n\n if (!(result.headers && result.headers['retry-after'])) {\n _context2.next = 10;\n break;\n }\n\n delay = parseRetryAfterHeader(result.headers['retry-after']);\n _context2.next = 12;\n break;\n\n case 10:\n if (!((result.statusCode || 0) >= 400)) {\n _context2.next = 12;\n break;\n }\n\n return _context2.abrupt(\"return\", result);\n\n case 12:\n flushIn(delay);\n retryDelay = START_DELAY;\n return _context2.abrupt(\"return\", result);\n\n case 17:\n _context2.prev = 17;\n _context2.t0 = _context2[\"catch\"](0);\n _context2.t1 = store;\n\n if (!_context2.t1) {\n _context2.next = 24;\n break;\n }\n\n _context2.next = 23;\n return shouldQueue(envelope, _context2.t0, retryDelay);\n\n case 23:\n _context2.t1 = _context2.sent;\n\n case 24:\n if (!_context2.t1) {\n _context2.next = 32;\n break;\n }\n\n _context2.next = 27;\n return store.insert(envelope);\n\n case 27:\n flushWithBackOff();\n log('Error sending. Event queued', _context2.t0);\n return _context2.abrupt(\"return\", {});\n\n case 32:\n throw _context2.t0;\n\n case 33:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, null, [[0, 17]]);\n }));\n return _send.apply(this, arguments);\n }\n\n if (options.flushAtStartup) {\n flushWithBackOff();\n }\n\n return {\n send: send,\n flush: function flush(t) {\n return transport.flush(t);\n }\n };\n };\n}\n\nexport { MIN_DELAY, START_DELAY, makeOfflineTransport };","var _METRIC_MAP;\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport { COUNTER_METRIC_TYPE, GAUGE_METRIC_TYPE, DISTRIBUTION_METRIC_TYPE, SET_METRIC_TYPE } from './constants.js';\nimport { simpleHash } from './utils.js';\n/**\n * A metric instance representing a counter.\n */\n\nvar CounterMetric = /*#__PURE__*/function () {\n function CounterMetric(_value) {\n _classCallCheck(this, CounterMetric);\n\n this._value = _value;\n }\n /** @inheritDoc */\n\n\n _createClass(CounterMetric, [{\n key: \"weight\",\n get: function get() {\n return 1;\n }\n /** @inheritdoc */\n\n }, {\n key: \"add\",\n value: function add(value) {\n this._value += value;\n }\n /** @inheritdoc */\n\n }, {\n key: \"toString\",\n value: function toString() {\n return \"\".concat(this._value);\n }\n }]);\n\n return CounterMetric;\n}();\n/**\n * A metric instance representing a gauge.\n */\n\n\nvar GaugeMetric = /*#__PURE__*/function () {\n function GaugeMetric(value) {\n _classCallCheck(this, GaugeMetric);\n\n this._last = value;\n this._min = value;\n this._max = value;\n this._sum = value;\n this._count = 1;\n }\n /** @inheritDoc */\n\n\n _createClass(GaugeMetric, [{\n key: \"weight\",\n get: function get() {\n return 5;\n }\n /** @inheritdoc */\n\n }, {\n key: \"add\",\n value: function add(value) {\n this._last = value;\n\n if (value < this._min) {\n this._min = value;\n }\n\n if (value > this._max) {\n this._max = value;\n }\n\n this._sum += value;\n this._count++;\n }\n /** @inheritdoc */\n\n }, {\n key: \"toString\",\n value: function toString() {\n return \"\".concat(this._last, \":\").concat(this._min, \":\").concat(this._max, \":\").concat(this._sum, \":\").concat(this._count);\n }\n }]);\n\n return GaugeMetric;\n}();\n/**\n * A metric instance representing a distribution.\n */\n\n\nvar DistributionMetric = /*#__PURE__*/function () {\n function DistributionMetric(first) {\n _classCallCheck(this, DistributionMetric);\n\n this._value = [first];\n }\n /** @inheritDoc */\n\n\n _createClass(DistributionMetric, [{\n key: \"weight\",\n get: function get() {\n return this._value.length;\n }\n /** @inheritdoc */\n\n }, {\n key: \"add\",\n value: function add(value) {\n this._value.push(value);\n }\n /** @inheritdoc */\n\n }, {\n key: \"toString\",\n value: function toString() {\n return this._value.join(':');\n }\n }]);\n\n return DistributionMetric;\n}();\n/**\n * A metric instance representing a set.\n */\n\n\nvar SetMetric = /*#__PURE__*/function () {\n function SetMetric(first) {\n _classCallCheck(this, SetMetric);\n\n this.first = first;\n this._value = new Set([first]);\n }\n /** @inheritDoc */\n\n\n _createClass(SetMetric, [{\n key: \"weight\",\n get: function get() {\n return this._value.size;\n }\n /** @inheritdoc */\n\n }, {\n key: \"add\",\n value: function add(value) {\n this._value.add(value);\n }\n /** @inheritdoc */\n\n }, {\n key: \"toString\",\n value: function toString() {\n return Array.from(this._value).map(function (val) {\n return typeof val === 'string' ? simpleHash(val) : val;\n }).join(':');\n }\n }]);\n\n return SetMetric;\n}();\n\nvar METRIC_MAP = (_METRIC_MAP = {}, _defineProperty(_METRIC_MAP, COUNTER_METRIC_TYPE, CounterMetric), _defineProperty(_METRIC_MAP, GAUGE_METRIC_TYPE, GaugeMetric), _defineProperty(_METRIC_MAP, DISTRIBUTION_METRIC_TYPE, DistributionMetric), _defineProperty(_METRIC_MAP, SET_METRIC_TYPE, SetMetric), _METRIC_MAP);\nexport { CounterMetric, DistributionMetric, GaugeMetric, METRIC_MAP, SetMetric };","var COUNTER_METRIC_TYPE = 'c';\nvar GAUGE_METRIC_TYPE = 'g';\nvar SET_METRIC_TYPE = 's';\nvar DISTRIBUTION_METRIC_TYPE = 'd';\n/**\n * This does not match spec in https://develop.sentry.dev/sdk/metrics\n * but was chosen to optimize for the most common case in browser environments.\n */\n\nvar DEFAULT_BROWSER_FLUSH_INTERVAL = 5000;\n/**\n * SDKs are required to bucket into 10 second intervals (rollup in seconds)\n * which is the current lower bound of metric accuracy.\n */\n\nvar DEFAULT_FLUSH_INTERVAL = 10000;\n/**\n * The maximum number of metrics that should be stored in memory.\n */\n\nvar MAX_WEIGHT = 10000;\nexport { COUNTER_METRIC_TYPE, DEFAULT_BROWSER_FLUSH_INTERVAL, DEFAULT_FLUSH_INTERVAL, DISTRIBUTION_METRIC_TYPE, GAUGE_METRIC_TYPE, MAX_WEIGHT, SET_METRIC_TYPE };","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport { timestampInSeconds } from '@sentry/utils';\nimport { DEFAULT_BROWSER_FLUSH_INTERVAL, SET_METRIC_TYPE } from './constants.js';\nimport { METRIC_MAP } from './instance.js';\nimport { updateMetricSummaryOnActiveSpan } from './metric-summary.js';\nimport { sanitizeMetricKey, sanitizeTags, sanitizeUnit, getBucketKey } from './utils.js';\n/**\n * A simple metrics aggregator that aggregates metrics in memory and flushes them periodically.\n * Default flush interval is 5 seconds.\n *\n * @experimental This API is experimental and might change in the future.\n */\n\nvar BrowserMetricsAggregator = /*#__PURE__*/function () {\n // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets\n // when the aggregator is garbage collected.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n function BrowserMetricsAggregator(_client) {\n var _this = this;\n\n _classCallCheck(this, BrowserMetricsAggregator);\n\n this._client = _client;\n this._buckets = new Map();\n this._interval = setInterval(function () {\n return _this.flush();\n }, DEFAULT_BROWSER_FLUSH_INTERVAL);\n }\n /**\n * @inheritDoc\n */\n\n\n _createClass(BrowserMetricsAggregator, [{\n key: \"add\",\n value: function add(metricType, unsanitizedName, value) {\n var unsanitizedUnit = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'none';\n var unsanitizedTags = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\n var maybeFloatTimestamp = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : timestampInSeconds();\n var timestamp = Math.floor(maybeFloatTimestamp);\n var name = sanitizeMetricKey(unsanitizedName);\n var tags = sanitizeTags(unsanitizedTags);\n var unit = sanitizeUnit(unsanitizedUnit);\n var bucketKey = getBucketKey(metricType, name, unit, tags);\n\n var bucketItem = this._buckets.get(bucketKey); // If this is a set metric, we need to calculate the delta from the previous weight.\n\n\n var previousWeight = bucketItem && metricType === SET_METRIC_TYPE ? bucketItem.metric.weight : 0;\n\n if (bucketItem) {\n bucketItem.metric.add(value); // TODO(abhi): Do we need this check?\n\n if (bucketItem.timestamp < timestamp) {\n bucketItem.timestamp = timestamp;\n }\n } else {\n bucketItem = {\n // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size.\n metric: new METRIC_MAP[metricType](value),\n timestamp: timestamp,\n metricType: metricType,\n name: name,\n unit: unit,\n tags: tags\n };\n\n this._buckets.set(bucketKey, bucketItem);\n } // If value is a string, it's a set metric so calculate the delta from the previous weight.\n\n\n var val = typeof value === 'string' ? bucketItem.metric.weight - previousWeight : value;\n updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey);\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"flush\",\n value: function flush() {\n // short circuit if buckets are empty.\n if (this._buckets.size === 0) {\n return;\n }\n\n if (this._client.captureAggregateMetrics) {\n // TODO(@anonrig): Use Object.values() when we support ES6+\n var metricBuckets = Array.from(this._buckets).map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n bucketItem = _ref2[1];\n\n return bucketItem;\n });\n\n this._client.captureAggregateMetrics(metricBuckets);\n }\n\n this._buckets.clear();\n }\n /**\n * @inheritDoc\n */\n\n }, {\n key: \"close\",\n value: function close() {\n clearInterval(this._interval);\n this.flush();\n }\n }]);\n\n return BrowserMetricsAggregator;\n}();\n\nexport { BrowserMetricsAggregator };","import { convertIntegrationFnToClass, defineIntegration } from '../integration.js';\nimport { BrowserMetricsAggregator } from './browser-aggregator.js';\nvar INTEGRATION_NAME = 'MetricsAggregator';\n\nvar _metricsAggregatorIntegration = function _metricsAggregatorIntegration() {\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce: function setupOnce() {},\n // eslint-disable-line @typescript-eslint/no-empty-function\n setup: function setup(client) {\n client.metricsAggregator = new BrowserMetricsAggregator(client);\n }\n };\n};\n\nvar metricsAggregatorIntegration = defineIntegration(_metricsAggregatorIntegration);\n/**\n * Enables Sentry metrics monitoring.\n *\n * @experimental This API is experimental and might having breaking changes in the future.\n * @deprecated Use `metricsAggegratorIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\n\nvar MetricsAggregator = convertIntegrationFnToClass(INTEGRATION_NAME, metricsAggregatorIntegration);\nexport { MetricsAggregator, metricsAggregatorIntegration };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { getClient, getCurrentScope } from '../exports.js';\nimport { spanToJSON } from '../utils/spanUtils.js';\nimport { COUNTER_METRIC_TYPE, DISTRIBUTION_METRIC_TYPE, SET_METRIC_TYPE, GAUGE_METRIC_TYPE } from './constants.js';\nimport { MetricsAggregator, metricsAggregatorIntegration } from './integration.js';\n\nfunction addToMetricsAggregator(metricType, name, value) {\n var data = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var client = getClient();\n var scope = getCurrentScope();\n\n if (client) {\n if (!client.metricsAggregator) {\n DEBUG_BUILD && logger.warn('No metrics aggregator enabled. Please add the MetricsAggregator integration to use metrics APIs');\n return;\n }\n\n var unit = data.unit,\n tags = data.tags,\n timestamp = data.timestamp;\n\n var _client$getOptions = client.getOptions(),\n release = _client$getOptions.release,\n environment = _client$getOptions.environment; // eslint-disable-next-line deprecation/deprecation\n\n\n var transaction = scope.getTransaction();\n var metricTags = {};\n\n if (release) {\n metricTags.release = release;\n }\n\n if (environment) {\n metricTags.environment = environment;\n }\n\n if (transaction) {\n metricTags.transaction = spanToJSON(transaction).description || '';\n }\n\n DEBUG_BUILD && logger.log(\"Adding value of \".concat(value, \" to \").concat(metricType, \" metric \").concat(name));\n client.metricsAggregator.add(metricType, name, value, unit, _objectSpread(_objectSpread({}, metricTags), tags), timestamp);\n }\n}\n/**\n * Adds a value to a counter metric\n *\n * @experimental This API is experimental and might have breaking changes in the future.\n */\n\n\nfunction increment(name) {\n var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var data = arguments.length > 2 ? arguments[2] : undefined;\n addToMetricsAggregator(COUNTER_METRIC_TYPE, name, value, data);\n}\n/**\n * Adds a value to a distribution metric\n *\n * @experimental This API is experimental and might have breaking changes in the future.\n */\n\n\nfunction distribution(name, value, data) {\n addToMetricsAggregator(DISTRIBUTION_METRIC_TYPE, name, value, data);\n}\n/**\n * Adds a value to a set metric. Value must be a string or integer.\n *\n * @experimental This API is experimental and might have breaking changes in the future.\n */\n\n\nfunction set(name, value, data) {\n addToMetricsAggregator(SET_METRIC_TYPE, name, value, data);\n}\n/**\n * Adds a value to a gauge metric\n *\n * @experimental This API is experimental and might have breaking changes in the future.\n */\n\n\nfunction gauge(name, value, data) {\n addToMetricsAggregator(GAUGE_METRIC_TYPE, name, value, data);\n}\n\nvar metrics = {\n increment: increment,\n distribution: distribution,\n set: set,\n gauge: gauge,\n\n /** @deprecated Use `metrics.metricsAggregratorIntegration()` instead. */\n // eslint-disable-next-line deprecation/deprecation\n MetricsAggregator: MetricsAggregator,\n metricsAggregatorIntegration: metricsAggregatorIntegration\n};\nexport { distribution, gauge, increment, metrics, set };","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Helper to decycle json objects\n */\nfunction memoBuilder() {\n var hasWeakSet = typeof WeakSet === 'function';\n var inner = hasWeakSet ? new WeakSet() : [];\n\n function memoize(obj) {\n if (hasWeakSet) {\n if (inner.has(obj)) {\n return true;\n }\n\n inner.add(obj);\n return false;\n } // eslint-disable-next-line @typescript-eslint/prefer-for-of\n\n\n for (var i = 0; i < inner.length; i++) {\n var value = inner[i];\n\n if (value === obj) {\n return true;\n }\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 (var i = 0; i < inner.length; i++) {\n if (inner[i] === obj) {\n inner.splice(i, 1);\n break;\n }\n }\n }\n }\n\n return [memoize, unmemoize];\n}\n\nexport { memoBuilder };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/** An error emitted by Sentry SDKs and related utilities. */\nvar SentryError = /*#__PURE__*/function (_Error) {\n _inherits(SentryError, _Error);\n\n var _super = _createSuper(SentryError);\n\n /** Display name of this error instance. */\n function SentryError(message) {\n var _this;\n\n var logLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'warn';\n\n _classCallCheck(this, SentryError);\n\n _this = _super.call(this, message);\n _this.message = message;\n _this.name = (this instanceof SentryError ? this.constructor : void 0).prototype.constructor.name; // 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\n Object.setPrototypeOf(_assertThisInitialized(_this), (this instanceof SentryError ? this.constructor : void 0).prototype);\n _this.logLevel = logLevel;\n return _this;\n }\n\n return _createClass(SentryError);\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nexport { SentryError };","/*\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 * Get source of SDK.\n */\n\n\nfunction getSDKSource() {\n // @ts-expect-error \"npm\" is injected by rollup during build process\n return \"npm\";\n}\n\nexport { getSDKSource, isBrowserBundle };","import { isBrowserBundle } from './env.js';\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 */\n\nfunction isNodeEnv() {\n // explicitly check for browser bundles as those can be optimized statically\n // by terser/rollup.\n return !isBrowserBundle() && Object.prototype.toString.call(typeof process !== 'undefined' ? process : 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 */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\n\n\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 */\n\n\nfunction loadModule(moduleName) {\n var mod;\n\n try {\n mod = dynamicRequire(module, moduleName);\n } catch (e) {// no-empty\n }\n\n try {\n var _dynamicRequire = dynamicRequire(module, 'process'),\n cwd = _dynamicRequire.cwd;\n\n mod = dynamicRequire(module, \"\".concat(cwd(), \"/node_modules/\").concat(moduleName));\n } catch (e) {// no-empty\n }\n\n return mod;\n}\n\nexport { dynamicRequire, isNodeEnv, loadModule };","/**\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 var lastAccessLHS = undefined;\n var value = ops[0];\n var i = 1;\n\n while (i < ops.length) {\n var op = ops[i];\n var fn = ops[i + 1];\n i += 2; // by checking for loose equality to `null`, we catch both `null` and `undefined`\n\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\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn(function () {\n var _value;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return (_value = value).call.apply(_value, [lastAccessLHS].concat(args));\n });\n lastAccessLHS = undefined;\n }\n }\n\n return value;\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\n\nexport { _optionalChain };","import { isNodeEnv } from './node.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n/**\n * Returns true if we are in the browser.\n */\n\nfunction isBrowser() {\n // eslint-disable-next-line no-restricted-globals\n return typeof window !== 'undefined' && (!isNodeEnv() || isElectronNodeRenderer());\n} // Electron renderers with nodeIntegration enabled are detected as Node.js so we specifically test for them\n\n\nfunction isElectronNodeRenderer() {\n return (// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n GLOBAL_OBJ.process !== undefined && GLOBAL_OBJ.process.type === 'renderer'\n );\n}\n\nexport { isBrowser };","import { observe } from '../observe.js';\nvar interactionCountEstimate = 0;\nvar minKnownInteractionId = Infinity;\nvar maxKnownInteractionId = 0;\n\nvar updateEstimate = function updateEstimate(entries) {\n entries.forEach(function (e) {\n if (e.interactionId) {\n minKnownInteractionId = Math.min(minKnownInteractionId, e.interactionId);\n maxKnownInteractionId = Math.max(maxKnownInteractionId, e.interactionId);\n interactionCountEstimate = maxKnownInteractionId ? (maxKnownInteractionId - minKnownInteractionId) / 7 + 1 : 0;\n }\n });\n};\n\nvar po;\n/**\n * Returns the `interactionCount` value using the native API (if available)\n * or the polyfill estimate in this module.\n */\n\nvar getInteractionCount = function getInteractionCount() {\n return po ? interactionCountEstimate : performance.interactionCount || 0;\n};\n/**\n * Feature detects native support or initializes the polyfill if needed.\n */\n\n\nvar initInteractionCountPolyfill = function initInteractionCountPolyfill() {\n if ('interactionCount' in performance || po) return;\n po = observe('event', updateEstimate, {\n type: 'event',\n buffered: true,\n durationThreshold: 0\n });\n};\n\nexport { getInteractionCount, initInteractionCountPolyfill };","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nvar DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__;\nexport { DEBUG_BUILD };","var bindReporter = function bindReporter(callback, metric, reportAllChanges) {\n var prevValue;\n var delta;\n return function (forceReport) {\n if (metric.value >= 0) {\n if (forceReport || reportAllChanges) {\n delta = metric.value - (prevValue || 0); // 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\n if (delta || prevValue === undefined) {\n prevValue = metric.value;\n metric.delta = delta;\n callback(metric);\n }\n }\n }\n };\n};\n\nexport { bindReporter };","import { GLOBAL_OBJ } from '@sentry/utils';\nvar WINDOW = GLOBAL_OBJ;\nexport { WINDOW };","import { WINDOW } from '../../types.js';\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\nvar getNavigationEntryFromPerformanceTiming = function getNavigationEntryFromPerformanceTiming() {\n // eslint-disable-next-line deprecation/deprecation\n var timing = WINDOW.performance.timing; // eslint-disable-next-line deprecation/deprecation\n\n var type = WINDOW.performance.navigation.type;\n var navigationEntry = {\n entryType: 'navigation',\n startTime: 0,\n type: type == 2 ? 'back_forward' : type === 1 ? 'reload' : 'navigate'\n };\n\n for (var 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\n return navigationEntry;\n};\n\nvar getNavigationEntry = function getNavigationEntry() {\n if (WINDOW.__WEB_VITALS_POLYFILL__) {\n return WINDOW.performance && (performance.getEntriesByType && performance.getEntriesByType('navigation')[0] || getNavigationEntryFromPerformanceTiming());\n } else {\n return WINDOW.performance && performance.getEntriesByType && performance.getEntriesByType('navigation')[0];\n }\n};\n\nexport { getNavigationEntry };","import { getNavigationEntry } from './getNavigationEntry.js';\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\nvar getActivationStart = function getActivationStart() {\n var navEntry = getNavigationEntry();\n return navEntry && navEntry.activationStart || 0;\n};\n\nexport { getActivationStart };","import { WINDOW } from '../../types.js';\nimport { generateUniqueID } from './generateUniqueID.js';\nimport { getActivationStart } from './getActivationStart.js';\nimport { getNavigationEntry } from './getNavigationEntry.js';\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\nvar initMetric = function initMetric(name, value) {\n var navEntry = getNavigationEntry();\n var navigationType = 'navigate';\n\n if (navEntry) {\n if (WINDOW.document && WINDOW.document.prerendering || getActivationStart() > 0) {\n navigationType = 'prerender';\n } else {\n navigationType = navEntry.type.replace(/_/g, '-');\n }\n }\n\n return {\n name: name,\n value: typeof value === 'undefined' ? -1 : value,\n rating: 'good',\n // Will be updated if the value changes.\n delta: 0,\n entries: [],\n id: generateUniqueID(),\n navigationType: navigationType\n };\n};\n\nexport { initMetric };","/*\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 */\nvar generateUniqueID = function generateUniqueID() {\n return \"v3-\".concat(Date.now(), \"-\").concat(Math.floor(Math.random() * (9e12 - 1)) + 1e12);\n};\n\nexport { generateUniqueID };","/**\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 */\nvar observe = function observe(type, callback, opts) {\n try {\n if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n var po = new PerformanceObserver(function (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) {// Do nothing.\n }\n\n return;\n};\n\nexport { observe };","import { WINDOW } from '../../types.js';\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\nvar onHidden = function onHidden(cb, once) {\n var onHiddenOrPageHide = function onHiddenOrPageHide(event) {\n if (event.type === 'pagehide' || WINDOW.document.visibilityState === 'hidden') {\n cb(event);\n\n if (once) {\n removeEventListener('visibilitychange', onHiddenOrPageHide, true);\n removeEventListener('pagehide', onHiddenOrPageHide, true);\n }\n }\n };\n\n if (WINDOW.document) {\n addEventListener('visibilitychange', onHiddenOrPageHide, true); // Some browsers have buggy implementations of visibilitychange,\n // so we use pagehide in addition, just to be safe.\n\n addEventListener('pagehide', onHiddenOrPageHide, true);\n }\n};\n\nexport { onHidden };","import { WINDOW } from '../../types.js';\nimport { onHidden } from './onHidden.js';\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\nvar firstHiddenTime = -1;\n\nvar initHiddenTime = function 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 if (WINDOW.document && WINDOW.document.visibilityState) {\n firstHiddenTime = WINDOW.document.visibilityState === 'hidden' && !WINDOW.document.prerendering ? 0 : Infinity;\n }\n};\n\nvar trackChanges = function trackChanges() {\n // Update the time if/when the document becomes hidden.\n onHidden(function (_ref) {\n var timeStamp = _ref.timeStamp;\n firstHiddenTime = timeStamp;\n }, true);\n};\n\nvar getVisibilityWatcher = function getVisibilityWatcher() {\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 initHiddenTime();\n trackChanges();\n }\n\n return {\n get firstHiddenTime() {\n return firstHiddenTime;\n }\n\n };\n};\n\nexport { getVisibilityWatcher };","import { bindReporter } from './lib/bindReporter.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\nimport { initInteractionCountPolyfill, getInteractionCount } from './lib/polyfills/interactionCountPolyfill.js';\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\n/**\n * Returns the interaction count since the last bfcache restore (or for the\n * full page lifecycle if there were no bfcache restores).\n */\n\nvar getInteractionCountForNavigation = function getInteractionCountForNavigation() {\n return getInteractionCount();\n}; // To prevent unnecessary memory usage on pages with lots of interactions,\n// store at most 10 of the longest interactions to consider as INP candidates.\n\n\nvar MAX_INTERACTIONS_TO_CONSIDER = 10; // A list of longest interactions on the page (by latency) sorted so the\n// longest one is first. The list is as most MAX_INTERACTIONS_TO_CONSIDER long.\n\nvar longestInteractionList = []; // A mapping of longest interactions by their interaction ID.\n// This is used for faster lookup.\n\nvar longestInteractionMap = {};\n/**\n * Takes a performance entry and adds it to the list of worst interactions\n * if its duration is long enough to make it among the worst. If the\n * entry is part of an existing interaction, it is merged and the latency\n * and entries list is updated as needed.\n */\n\nvar processEntry = function processEntry(entry) {\n // The least-long of the 10 longest interactions.\n var minLongestInteraction = longestInteractionList[longestInteractionList.length - 1]; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\n var existingInteraction = longestInteractionMap[entry.interactionId]; // Only process the entry if it's possibly one of the ten longest,\n // or if it's part of an existing interaction.\n\n if (existingInteraction || longestInteractionList.length < MAX_INTERACTIONS_TO_CONSIDER || entry.duration > minLongestInteraction.latency) {\n // If the interaction already exists, update it. Otherwise create one.\n if (existingInteraction) {\n existingInteraction.entries.push(entry);\n existingInteraction.latency = Math.max(existingInteraction.latency, entry.duration);\n } else {\n var interaction = {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n id: entry.interactionId,\n latency: entry.duration,\n entries: [entry]\n };\n longestInteractionMap[interaction.id] = interaction;\n longestInteractionList.push(interaction);\n } // Sort the entries by latency (descending) and keep only the top ten.\n\n\n longestInteractionList.sort(function (a, b) {\n return b.latency - a.latency;\n });\n longestInteractionList.splice(MAX_INTERACTIONS_TO_CONSIDER).forEach(function (i) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete longestInteractionMap[i.id];\n });\n }\n};\n/**\n * Returns the estimated p98 longest interaction based on the stored\n * interaction candidates and the interaction count for the current page.\n */\n\n\nvar estimateP98LongestInteraction = function estimateP98LongestInteraction() {\n var candidateInteractionIndex = Math.min(longestInteractionList.length - 1, Math.floor(getInteractionCountForNavigation() / 50));\n return longestInteractionList[candidateInteractionIndex];\n};\n/**\n * Calculates the [INP](https://web.dev/responsiveness/) value for the current\n * page and calls the `callback` function once the value is ready, along with\n * the `event` performance entries reported for that interaction. The reported\n * value is a `DOMHighResTimeStamp`.\n *\n * A custom `durationThreshold` configuration option can optionally be passed to\n * control what `event-timing` entries are considered for INP reporting. The\n * default threshold is `40`, which means INP scores of less than 40 are\n * reported as 0. Note that this will not affect your 75th percentile INP value\n * unless that value is also less than 40 (well below the recommended\n * [good](https://web.dev/inp/#what-is-a-good-inp-score) threshold).\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:** INP 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 */\n\n\nvar onINP = function onINP(onReport, opts) {\n // Set defaults\n // eslint-disable-next-line no-param-reassign\n opts = opts || {}; // https://web.dev/inp/#what's-a-%22good%22-inp-value\n // const thresholds = [200, 500];\n // TODO(philipwalton): remove once the polyfill is no longer needed.\n\n initInteractionCountPolyfill();\n var metric = initMetric('INP'); // eslint-disable-next-line prefer-const\n\n var report;\n\n var handleEntries = function handleEntries(entries) {\n entries.forEach(function (entry) {\n if (entry.interactionId) {\n processEntry(entry);\n } // Entries of type `first-input` don't currently have an `interactionId`,\n // so to consider them in INP we have to first check that an existing\n // entry doesn't match the `duration` and `startTime`.\n // Note that this logic assumes that `event` entries are dispatched\n // before `first-input` entries. This is true in Chrome but it is not\n // true in Firefox; however, Firefox doesn't support interactionId, so\n // it's not an issue at the moment.\n // TODO(philipwalton): remove once crbug.com/1325826 is fixed.\n\n\n if (entry.entryType === 'first-input') {\n var noMatchingEntry = !longestInteractionList.some(function (interaction) {\n return interaction.entries.some(function (prevEntry) {\n return entry.duration === prevEntry.duration && entry.startTime === prevEntry.startTime;\n });\n });\n\n if (noMatchingEntry) {\n processEntry(entry);\n }\n }\n });\n var inp = estimateP98LongestInteraction();\n\n if (inp && inp.latency !== metric.value) {\n metric.value = inp.latency;\n metric.entries = inp.entries;\n report();\n }\n };\n\n var po = observe('event', handleEntries, {\n // Event Timing entries have their durations rounded to the nearest 8ms,\n // so a duration of 40ms would be any event that spans 2.5 or more frames\n // at 60Hz. This threshold is chosen to strike a balance between usefulness\n // and performance. Running this callback for any interaction that spans\n // just one or two frames is likely not worth the insight that could be\n // gained.\n durationThreshold: opts.durationThreshold || 40\n });\n report = bindReporter(onReport, metric, opts.reportAllChanges);\n\n if (po) {\n // Also observe entries of type `first-input`. This is useful in cases\n // where the first interaction is less than the `durationThreshold`.\n po.observe({\n type: 'first-input',\n buffered: true\n });\n onHidden(function () {\n handleEntries(po.takeRecords()); // If the interaction count shows that there were interactions but\n // none were captured by the PerformanceObserver, report a latency of 0.\n\n if (metric.value < 0 && getInteractionCountForNavigation() > 0) {\n metric.value = 0;\n metric.entries = [];\n }\n\n report(true);\n });\n }\n};\n\nexport { onINP };","import { WINDOW } from '../types.js';\nimport { 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 * 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\nvar 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 */\n\nvar onLCP = function onLCP(onReport) {\n var visibilityWatcher = getVisibilityWatcher();\n var metric = initMetric('LCP');\n var report;\n\n var handleEntries = function handleEntries(entries) {\n var lastEntry = entries[entries.length - 1];\n\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 var value = Math.max(lastEntry.startTime - getActivationStart(), 0); // Only report if the page wasn't hidden prior to LCP.\n\n if (value < visibilityWatcher.firstHiddenTime) {\n metric.value = value;\n metric.entries = [lastEntry];\n report();\n }\n }\n };\n\n var po = observe('largest-contentful-paint', handleEntries);\n\n if (po) {\n report = bindReporter(onReport, metric);\n\n var stopListening = function stopListening() {\n if (!reportedMetricIDs[metric.id]) {\n handleEntries(po.takeRecords());\n po.disconnect();\n reportedMetricIDs[metric.id] = true;\n report(true);\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\n ['keydown', 'click'].forEach(function (type) {\n if (WINDOW.document) {\n addEventListener(type, stopListening, {\n once: true,\n capture: true\n });\n }\n });\n onHidden(stopListening, true);\n return stopListening;\n }\n\n return;\n};\n\nexport { onLCP };","import { WINDOW } from '../types.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getNavigationEntry } from './lib/getNavigationEntry.js';\nimport { initMetric } from './lib/initMetric.js';\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 * Runs in the next task after the page is done loading and/or prerendering.\n * @param callback\n */\n\nvar whenReady = function whenReady(callback) {\n if (!WINDOW.document) {\n return;\n }\n\n if (WINDOW.document.prerendering) {\n addEventListener('prerenderingchange', function () {\n return whenReady(callback);\n }, true);\n } else if (WINDOW.document.readyState !== 'complete') {\n addEventListener('load', function () {\n return whenReady(callback);\n }, true);\n } else {\n // Queue a task so the callback runs after `loadEventEnd`.\n setTimeout(callback, 0);\n }\n};\n/**\n * Calculates the [TTFB](https://web.dev/time-to-first-byte/) value for the\n * current page and calls the `callback` function once the page has loaded,\n * along with the relevant `navigation` performance entry used to determine the\n * value. The reported value is a `DOMHighResTimeStamp`.\n *\n * Note, this function waits until after the page is loaded to call `callback`\n * in order to ensure all properties of the `navigation` entry are populated.\n * This is useful if you want to report on other metrics exposed by the\n * [Navigation Timing API](https://w3c.github.io/navigation-timing/). For\n * example, the TTFB metric starts from the page's [time\n * origin](https://www.w3.org/TR/hr-time-2/#sec-time-origin), which means it\n * includes time spent on DNS lookup, connection negotiation, network latency,\n * and server processing time.\n */\n\n\nvar onTTFB = function onTTFB(onReport, opts) {\n // Set defaults\n // eslint-disable-next-line no-param-reassign\n opts = opts || {}; // https://web.dev/ttfb/#what-is-a-good-ttfb-score\n // const thresholds = [800, 1800];\n\n var metric = initMetric('TTFB');\n var report = bindReporter(onReport, metric, opts.reportAllChanges);\n whenReady(function () {\n var navEntry = getNavigationEntry();\n\n if (navEntry) {\n // The activationStart reference is used because TTFB should be\n // relative to page activation rather than navigation start if the\n // page was prerendered. But in cases where `activationStart` occurs\n // after the first byte is received, this time should be clamped at 0.\n metric.value = Math.max(navEntry.responseStart - getActivationStart(), 0); // In some cases the value reported is negative or is larger\n // than the current page time. Ignore these cases:\n // https://github.com/GoogleChrome/web-vitals/issues/137\n // https://github.com/GoogleChrome/web-vitals/issues/162\n\n if (metric.value < 0 || metric.value > performance.now()) return;\n metric.entries = [navEntry];\n report(true);\n }\n });\n};\n\nexport { onTTFB };","function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport { logger, getFunctionName } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../common/debug-build.js';\nimport { onCLS } from './web-vitals/getCLS.js';\nimport { onFID } from './web-vitals/getFID.js';\nimport { onINP } from './web-vitals/getINP.js';\nimport { onLCP } from './web-vitals/getLCP.js';\nimport { observe } from './web-vitals/lib/observe.js';\nimport { onTTFB } from './web-vitals/onTTFB.js';\nvar handlers = {};\nvar instrumented = {};\n\nvar _previousCls;\n\nvar _previousFid;\n\nvar _previousLcp;\n\nvar _previousTtfb;\n\nvar _previousInp;\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 *\n * Pass `stopOnCallback = true` to stop listening for CLS when the cleanup callback is called.\n * This will lead to the CLS being finalized and frozen.\n */\n\n\nfunction addClsInstrumentationHandler(callback) {\n var stopOnCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return addMetricObserver('cls', callback, instrumentCls, _previousCls, stopOnCallback);\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 *\n * Pass `stopOnCallback = true` to stop listening for LCP when the cleanup callback is called.\n * This will lead to the LCP being finalized and frozen.\n */\n\n\nfunction addLcpInstrumentationHandler(callback) {\n var stopOnCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return addMetricObserver('lcp', callback, instrumentLcp, _previousLcp, stopOnCallback);\n}\n/**\n * Add a callback that will be triggered when a FID metric is available.\n */\n\n\nfunction addTtfbInstrumentationHandler(callback) {\n return addMetricObserver('ttfb', callback, instrumentTtfb, _previousTtfb);\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 */\n\n\nfunction addFidInstrumentationHandler(callback) {\n return addMetricObserver('fid', callback, instrumentFid, _previousFid);\n}\n/**\n * Add a callback that will be triggered when a INP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\n\n\nfunction addInpInstrumentationHandler(callback) {\n return addMetricObserver('inp', callback, instrumentInp, _previousInp);\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 */\n\n\nfunction addPerformanceInstrumentationHandler(type, callback) {\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/** Trigger all handlers of a given type. */\n\n\nfunction triggerHandlers(type, data) {\n var typeHandlers = handlers[type];\n\n if (!typeHandlers || !typeHandlers.length) {\n return;\n }\n\n var _iterator = _createForOfIteratorHelper(typeHandlers),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var handler = _step.value;\n\n try {\n handler(data);\n } catch (e) {\n DEBUG_BUILD && logger.error(\"Error while triggering instrumentation handler.\\nType: \".concat(type, \"\\nName: \").concat(getFunctionName(handler), \"\\nError:\"), e);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n}\n\nfunction instrumentCls() {\n return onCLS(function (metric) {\n triggerHandlers('cls', {\n metric: metric\n });\n _previousCls = metric;\n }, {\n reportAllChanges: true\n });\n}\n\nfunction instrumentFid() {\n return onFID(function (metric) {\n triggerHandlers('fid', {\n metric: metric\n });\n _previousFid = metric;\n });\n}\n\nfunction instrumentLcp() {\n return onLCP(function (metric) {\n triggerHandlers('lcp', {\n metric: metric\n });\n _previousLcp = metric;\n });\n}\n\nfunction instrumentTtfb() {\n return onTTFB(function (metric) {\n triggerHandlers('ttfb', {\n metric: metric\n });\n _previousTtfb = metric;\n });\n}\n\nfunction instrumentInp() {\n return onINP(function (metric) {\n triggerHandlers('inp', {\n metric: metric\n });\n _previousInp = metric;\n });\n}\n\nfunction addMetricObserver(type, callback, instrumentFn, previousValue) {\n var stopOnCallback = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n addHandler(type, callback);\n var stopListening;\n\n if (!instrumented[type]) {\n stopListening = instrumentFn();\n instrumented[type] = true;\n }\n\n if (previousValue) {\n callback({\n metric: previousValue\n });\n }\n\n return getCleanupCallback(type, callback, stopOnCallback ? stopListening : undefined);\n}\n\nfunction instrumentPerformanceObserver(type) {\n var options = {}; // Special per-type options we want to use\n\n if (type === 'event') {\n options.durationThreshold = 0;\n }\n\n observe(type, function (entries) {\n triggerHandlers(type, {\n entries: entries\n });\n }, options);\n}\n\nfunction addHandler(type, handler) {\n handlers[type] = handlers[type] || [];\n handlers[type].push(handler);\n} // Get a callback which can be called to remove the instrumentation handler\n\n\nfunction getCleanupCallback(type, callback, stopListening) {\n return function () {\n if (stopListening) {\n stopListening();\n }\n\n var typeHandlers = handlers[type];\n\n if (!typeHandlers) {\n return;\n }\n\n var index = typeHandlers.indexOf(callback);\n\n if (index !== -1) {\n typeHandlers.splice(index, 1);\n }\n };\n}\n\nexport { addClsInstrumentationHandler, addFidInstrumentationHandler, addInpInstrumentationHandler, addLcpInstrumentationHandler, addPerformanceInstrumentationHandler, addTtfbInstrumentationHandler };","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 * 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 */\n\nvar onCLS = function onCLS(onReport) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var metric = initMetric('CLS', 0);\n var report;\n var sessionValue = 0;\n var sessionEntries = []; // const handleEntries = (entries: Metric['entries']) => {\n\n var handleEntries = function handleEntries(entries) {\n entries.forEach(function (entry) {\n // Only count layout shifts without recent user input.\n if (!entry.hadRecentInput) {\n var firstSessionEntry = sessionEntries[0];\n var lastSessionEntry = sessionEntries[sessionEntries.length - 1]; // 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\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 = [entry];\n } // If the current session value is larger than the current CLS value,\n // update CLS and the entries contributing to it.\n\n\n if (sessionValue > metric.value) {\n metric.value = sessionValue;\n metric.entries = sessionEntries;\n\n if (report) {\n report();\n }\n }\n }\n });\n };\n\n var po = observe('layout-shift', handleEntries);\n\n if (po) {\n report = bindReporter(onReport, metric, options.reportAllChanges);\n\n var stopListening = function stopListening() {\n handleEntries(po.takeRecords());\n report(true);\n };\n\n onHidden(stopListening);\n return stopListening;\n }\n\n return;\n};\n\nexport { onCLS };","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 * 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 */\n\nvar onFID = function onFID(onReport) {\n var visibilityWatcher = getVisibilityWatcher();\n var metric = initMetric('FID'); // eslint-disable-next-line prefer-const\n\n var report;\n\n var handleEntry = function 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 var handleEntries = function handleEntries(entries) {\n entries.forEach(handleEntry);\n };\n\n var po = observe('first-input', handleEntries);\n report = bindReporter(onReport, metric);\n\n if (po) {\n onHidden(function () {\n handleEntries(po.takeRecords());\n po.disconnect();\n }, true);\n }\n};\n\nexport { onFID };","import _regeneratorRuntime from \"@babel/runtime/regenerator\";\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport { _nullishCoalesce, _optionalChain } from '@sentry/utils';\nimport { addBreadcrumb, getClient, isSentryRequestUrl, getCurrentScope, addEventProcessor, prepareEvent, getIsolationScope, setContext, captureException, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core';\nimport { GLOBAL_OBJ, normalize, fill, htmlTreeAsString, browserPerformanceTimeOrigin, logger, uuid4, SENTRY_XHR_DATA_KEY, dropUndefinedKeys, stringMatchesSomePattern, addFetchInstrumentationHandler, addXhrInstrumentationHandler, addClickKeypressInstrumentationHandler, addHistoryInstrumentationHandler, createEnvelope, createEventEnvelopeHeaders, getSdkMetadataForEnvelopeHeader, updateRateLimits, isRateLimited, consoleSandbox, isBrowser } from '@sentry/utils';\nimport { addPerformanceInstrumentationHandler, addLcpInstrumentationHandler } from '@sentry-internal/tracing'; // exporting a separate copy of `WINDOW` rather than exporting the one from `@sentry/browser`\n// prevents the browser package from being bundled in the CDN bundle, and avoids a\n// circular dependency between the browser and replay packages should `@sentry/browser` import\n// from `@sentry/replay` in the future\n\nvar WINDOW = GLOBAL_OBJ;\nvar REPLAY_SESSION_KEY = 'sentryReplaySession';\nvar REPLAY_EVENT_NAME = 'replay_event';\nvar UNABLE_TO_SEND_REPLAY = 'Unable to send Replay'; // The idle limit for a session after which recording is paused.\n\nvar SESSION_IDLE_PAUSE_DURATION = 300000; // 5 minutes in ms\n// The idle limit for a session after which the session expires.\n\nvar SESSION_IDLE_EXPIRE_DURATION = 900000; // 15 minutes in ms\n\n/** Default flush delays */\n\nvar DEFAULT_FLUSH_MIN_DELAY = 5000; // XXX: Temp fix for our debounce logic where `maxWait` would never occur if it\n// was the same as `wait`\n\nvar DEFAULT_FLUSH_MAX_DELAY = 5500;\n/* How long to wait for error checkouts */\n\nvar BUFFER_CHECKOUT_TIME = 60000;\nvar RETRY_BASE_INTERVAL = 5000;\nvar RETRY_MAX_COUNT = 3;\n/* The max (uncompressed) size in bytes of a network body. Any body larger than this will be truncated. */\n\nvar NETWORK_BODY_MAX_SIZE = 150000;\n/* The max size of a single console arg that is captured. Any arg larger than this will be truncated. */\n\nvar CONSOLE_ARG_MAX_SIZE = 5000;\n/* Min. time to wait before we consider something a slow click. */\n\nvar SLOW_CLICK_THRESHOLD = 3000;\n/* For scroll actions after a click, we only look for a very short time period to detect programmatic scrolling. */\n\nvar SLOW_CLICK_SCROLL_TIMEOUT = 300;\n/** When encountering a total segment size exceeding this size, stop the replay (as we cannot properly ingest it). */\n\nvar REPLAY_MAX_EVENT_BUFFER_SIZE = 20000000; // ~20MB\n\n/** Replays must be min. 5s long before we send them. */\n\nvar MIN_REPLAY_DURATION = 4999;\n/* The max. allowed value that the minReplayDuration can be set to. */\n\nvar MIN_REPLAY_DURATION_LIMIT = 15000;\n/** The max. length of a replay. */\n\nvar MAX_REPLAY_DURATION = 3600000; // 60 minutes in ms;\n\nfunction _nullishCoalesce$1(lhs, rhsFn) {\n if (lhs != null) {\n return lhs;\n } else {\n return rhsFn();\n }\n}\n\nfunction _optionalChain$5(ops) {\n var lastAccessLHS = undefined;\n var value = ops[0];\n var i = 1;\n\n while (i < ops.length) {\n var op = ops[i];\n var fn = ops[i + 1];\n i += 2;\n\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n return undefined;\n }\n\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn(function () {\n var _value2;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return (_value2 = value).call.apply(_value2, [lastAccessLHS].concat(args));\n });\n lastAccessLHS = undefined;\n }\n }\n\n return value;\n}\n\nvar NodeType$1;\n\n(function (NodeType) {\n NodeType[NodeType[\"Document\"] = 0] = \"Document\";\n NodeType[NodeType[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType[NodeType[\"Element\"] = 2] = \"Element\";\n NodeType[NodeType[\"Text\"] = 3] = \"Text\";\n NodeType[NodeType[\"CDATA\"] = 4] = \"CDATA\";\n NodeType[NodeType[\"Comment\"] = 5] = \"Comment\";\n})(NodeType$1 || (NodeType$1 = {}));\n\nfunction isElement$1(n) {\n return n.nodeType === n.ELEMENT_NODE;\n}\n\nfunction isShadowRoot(n) {\n var host = _optionalChain$5([n, 'optionalAccess', function (_) {\n return _.host;\n }]);\n\n return Boolean(_optionalChain$5([host, 'optionalAccess', function (_2) {\n return _2.shadowRoot;\n }]) === n);\n}\n\nfunction isNativeShadowDom(shadowRoot) {\n return Object.prototype.toString.call(shadowRoot) === '[object ShadowRoot]';\n}\n\nfunction fixBrowserCompatibilityIssuesInCSS(cssText) {\n if (cssText.includes(' background-clip: text;') && !cssText.includes(' -webkit-background-clip: text;')) {\n cssText = cssText.replace(' background-clip: text;', ' -webkit-background-clip: text; background-clip: text;');\n }\n\n return cssText;\n}\n\nfunction escapeImportStatement(rule) {\n var cssText = rule.cssText;\n if (cssText.split('\"').length < 3) return cssText;\n var statement = ['@import', \"url(\".concat(JSON.stringify(rule.href), \")\")];\n\n if (rule.layerName === '') {\n statement.push(\"layer\");\n } else if (rule.layerName) {\n statement.push(\"layer(\".concat(rule.layerName, \")\"));\n }\n\n if (rule.supportsText) {\n statement.push(\"supports(\".concat(rule.supportsText, \")\"));\n }\n\n if (rule.media.length) {\n statement.push(rule.media.mediaText);\n }\n\n return statement.join(' ') + ';';\n}\n\nfunction stringifyStylesheet(s) {\n try {\n var rules = s.rules || s.cssRules;\n return rules ? fixBrowserCompatibilityIssuesInCSS(Array.from(rules, stringifyRule).join('')) : null;\n } catch (error) {\n return null;\n }\n}\n\nfunction stringifyRule(rule) {\n var importStringified;\n\n if (isCSSImportRule(rule)) {\n try {\n importStringified = stringifyStylesheet(rule.styleSheet) || escapeImportStatement(rule);\n } catch (error) {}\n } else if (isCSSStyleRule(rule) && rule.selectorText.includes(':')) {\n return fixSafariColons(rule.cssText);\n }\n\n return importStringified || rule.cssText;\n}\n\nfunction fixSafariColons(cssStringified) {\n var regex = /(\\[(?:[\\w-]+)[^\\\\])(:(?:[\\w-]+)\\])/gm;\n return cssStringified.replace(regex, '$1\\\\$2');\n}\n\nfunction isCSSImportRule(rule) {\n return 'styleSheet' in rule;\n}\n\nfunction isCSSStyleRule(rule) {\n return 'selectorText' in rule;\n}\n\nvar Mirror = /*#__PURE__*/function () {\n function Mirror() {\n _classCallCheck(this, Mirror);\n\n this.idNodeMap = new Map();\n this.nodeMetaMap = new WeakMap();\n }\n\n _createClass(Mirror, [{\n key: \"getId\",\n value: function getId(n) {\n if (!n) return -1;\n\n var id = _optionalChain$5([this, 'access', function (_3) {\n return _3.getMeta;\n }, 'call', function (_4) {\n return _4(n);\n }, 'optionalAccess', function (_5) {\n return _5.id;\n }]);\n\n return _nullishCoalesce$1(id, function () {\n return -1;\n });\n }\n }, {\n key: \"getNode\",\n value: function getNode(id) {\n return this.idNodeMap.get(id) || null;\n }\n }, {\n key: \"getIds\",\n value: function getIds() {\n return Array.from(this.idNodeMap.keys());\n }\n }, {\n key: \"getMeta\",\n value: function getMeta(n) {\n return this.nodeMetaMap.get(n) || null;\n }\n }, {\n key: \"removeNodeFromMap\",\n value: function removeNodeFromMap(n) {\n var _this = this;\n\n var id = this.getId(n);\n this.idNodeMap.delete(id);\n\n if (n.childNodes) {\n n.childNodes.forEach(function (childNode) {\n return _this.removeNodeFromMap(childNode);\n });\n }\n }\n }, {\n key: \"has\",\n value: function has(id) {\n return this.idNodeMap.has(id);\n }\n }, {\n key: \"hasNode\",\n value: function hasNode(node) {\n return this.nodeMetaMap.has(node);\n }\n }, {\n key: \"add\",\n value: function add(n, meta) {\n var id = meta.id;\n this.idNodeMap.set(id, n);\n this.nodeMetaMap.set(n, meta);\n }\n }, {\n key: \"replace\",\n value: function replace(id, n) {\n var oldNode = this.getNode(id);\n\n if (oldNode) {\n var meta = this.nodeMetaMap.get(oldNode);\n if (meta) this.nodeMetaMap.set(n, meta);\n }\n\n this.idNodeMap.set(id, n);\n }\n }, {\n key: \"reset\",\n value: function reset() {\n this.idNodeMap = new Map();\n this.nodeMetaMap = new WeakMap();\n }\n }]);\n\n return Mirror;\n}();\n\nfunction createMirror() {\n return new Mirror();\n}\n\nfunction shouldMaskInput(_ref) {\n var maskInputOptions = _ref.maskInputOptions,\n tagName = _ref.tagName,\n type = _ref.type;\n\n if (tagName === 'OPTION') {\n tagName = 'SELECT';\n }\n\n return Boolean(maskInputOptions[tagName.toLowerCase()] || type && maskInputOptions[type] || type === 'password' || tagName === 'INPUT' && !type && maskInputOptions['text']);\n}\n\nfunction maskInputValue(_ref2) {\n var isMasked = _ref2.isMasked,\n element = _ref2.element,\n value = _ref2.value,\n maskInputFn = _ref2.maskInputFn;\n var text = value || '';\n\n if (!isMasked) {\n return text;\n }\n\n if (maskInputFn) {\n text = maskInputFn(text, element);\n }\n\n return '*'.repeat(text.length);\n}\n\nfunction toLowerCase(str) {\n return str.toLowerCase();\n}\n\nfunction toUpperCase(str) {\n return str.toUpperCase();\n}\n\nvar ORIGINAL_ATTRIBUTE_NAME = '__rrweb_original__';\n\nfunction is2DCanvasBlank(canvas) {\n var ctx = canvas.getContext('2d');\n if (!ctx) return true;\n var chunkSize = 50;\n\n for (var x = 0; x < canvas.width; x += chunkSize) {\n for (var y = 0; y < canvas.height; y += chunkSize) {\n var getImageData = ctx.getImageData;\n var originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData ? getImageData[ORIGINAL_ATTRIBUTE_NAME] : getImageData;\n var pixelBuffer = new Uint32Array(originalGetImageData.call(ctx, x, y, Math.min(chunkSize, canvas.width - x), Math.min(chunkSize, canvas.height - y)).data.buffer);\n if (pixelBuffer.some(function (pixel) {\n return pixel !== 0;\n })) return false;\n }\n }\n\n return true;\n}\n\nfunction getInputType(element) {\n var type = element.type;\n return element.hasAttribute('data-rr-is-password') ? 'password' : type ? toLowerCase(type) : null;\n}\n\nfunction getInputValue(el, tagName, type) {\n if (tagName === 'INPUT' && (type === 'radio' || type === 'checkbox')) {\n return el.getAttribute('value') || '';\n }\n\n return el.value;\n}\n\nvar _id = 1;\nvar tagNameRegex = new RegExp('[^a-z0-9-_:]');\nvar IGNORED_NODE = -2;\n\nfunction genId() {\n return _id++;\n}\n\nfunction getValidTagName(element) {\n if (element instanceof HTMLFormElement) {\n return 'form';\n }\n\n var processedTagName = toLowerCase(element.tagName);\n\n if (tagNameRegex.test(processedTagName)) {\n return 'div';\n }\n\n return processedTagName;\n}\n\nfunction extractOrigin(url) {\n var origin = '';\n\n if (url.indexOf('//') > -1) {\n origin = url.split('/').slice(0, 3).join('/');\n } else {\n origin = url.split('/')[0];\n }\n\n origin = origin.split('?')[0];\n return origin;\n}\n\nvar canvasService;\nvar canvasCtx;\nvar URL_IN_CSS_REF = /url\\((?:(')([^']*)'|(\")(.*?)\"|([^)]*))\\)/gm;\nvar URL_PROTOCOL_MATCH = /^(?:[a-z+]+:)?\\/\\//i;\nvar URL_WWW_MATCH = /^www\\..*/i;\nvar DATA_URI = /^(data:)([^,]*),(.*)/i;\n\nfunction absoluteToStylesheet(cssText, href) {\n return (cssText || '').replace(URL_IN_CSS_REF, function (origin, quote1, path1, quote2, path2, path3) {\n var filePath = path1 || path2 || path3;\n var maybeQuote = quote1 || quote2 || '';\n\n if (!filePath) {\n return origin;\n }\n\n if (URL_PROTOCOL_MATCH.test(filePath) || URL_WWW_MATCH.test(filePath)) {\n return \"url(\".concat(maybeQuote).concat(filePath).concat(maybeQuote, \")\");\n }\n\n if (DATA_URI.test(filePath)) {\n return \"url(\".concat(maybeQuote).concat(filePath).concat(maybeQuote, \")\");\n }\n\n if (filePath[0] === '/') {\n return \"url(\".concat(maybeQuote).concat(extractOrigin(href) + filePath).concat(maybeQuote, \")\");\n }\n\n var stack = href.split('/');\n var parts = filePath.split('/');\n stack.pop();\n\n var _iterator = _createForOfIteratorHelper(parts),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var part = _step.value;\n\n if (part === '.') {\n continue;\n } else if (part === '..') {\n stack.pop();\n } else {\n stack.push(part);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return \"url(\".concat(maybeQuote).concat(stack.join('/')).concat(maybeQuote, \")\");\n });\n}\n\nvar SRCSET_NOT_SPACES = /^[^ \\t\\n\\r\\u000c]+/;\nvar SRCSET_COMMAS_OR_SPACES = /^[, \\t\\n\\r\\u000c]+/;\n\nfunction getAbsoluteSrcsetString(doc, attributeValue) {\n if (attributeValue.trim() === '') {\n return attributeValue;\n }\n\n var pos = 0;\n\n function collectCharacters(regEx) {\n var chars;\n var match = regEx.exec(attributeValue.substring(pos));\n\n if (match) {\n chars = match[0];\n pos += chars.length;\n return chars;\n }\n\n return '';\n }\n\n var output = [];\n\n while (true) {\n collectCharacters(SRCSET_COMMAS_OR_SPACES);\n\n if (pos >= attributeValue.length) {\n break;\n }\n\n var url = collectCharacters(SRCSET_NOT_SPACES);\n\n if (url.slice(-1) === ',') {\n url = absoluteToDoc(doc, url.substring(0, url.length - 1));\n output.push(url);\n } else {\n var descriptorsStr = '';\n url = absoluteToDoc(doc, url);\n var inParens = false;\n\n while (true) {\n var c = attributeValue.charAt(pos);\n\n if (c === '') {\n output.push((url + descriptorsStr).trim());\n break;\n } else if (!inParens) {\n if (c === ',') {\n pos += 1;\n output.push((url + descriptorsStr).trim());\n break;\n } else if (c === '(') {\n inParens = true;\n }\n } else {\n if (c === ')') {\n inParens = false;\n }\n }\n\n descriptorsStr += c;\n pos += 1;\n }\n }\n }\n\n return output.join(', ');\n}\n\nfunction absoluteToDoc(doc, attributeValue) {\n if (!attributeValue || attributeValue.trim() === '') {\n return attributeValue;\n }\n\n var a = doc.createElement('a');\n a.href = attributeValue;\n return a.href;\n}\n\nfunction isSVGElement(el) {\n return Boolean(el.tagName === 'svg' || el.ownerSVGElement);\n}\n\nfunction getHref() {\n var a = document.createElement('a');\n a.href = '';\n return a.href;\n}\n\nfunction transformAttribute(doc, tagName, name, value, element, maskAttributeFn) {\n if (!value) {\n return value;\n }\n\n if (name === 'src' || name === 'href' && !(tagName === 'use' && value[0] === '#')) {\n return absoluteToDoc(doc, value);\n } else if (name === 'xlink:href' && value[0] !== '#') {\n return absoluteToDoc(doc, value);\n } else if (name === 'background' && (tagName === 'table' || tagName === 'td' || tagName === 'th')) {\n return absoluteToDoc(doc, value);\n } else if (name === 'srcset') {\n return getAbsoluteSrcsetString(doc, value);\n } else if (name === 'style') {\n return absoluteToStylesheet(value, getHref());\n } else if (tagName === 'object' && name === 'data') {\n return absoluteToDoc(doc, value);\n }\n\n if (typeof maskAttributeFn === 'function') {\n return maskAttributeFn(name, value, element);\n }\n\n return value;\n}\n\nfunction ignoreAttribute(tagName, name, _value) {\n return (tagName === 'video' || tagName === 'audio') && name === 'autoplay';\n}\n\nfunction _isBlockedElement(element, blockClass, blockSelector, unblockSelector) {\n try {\n if (unblockSelector && element.matches(unblockSelector)) {\n return false;\n }\n\n if (typeof blockClass === 'string') {\n if (element.classList.contains(blockClass)) {\n return true;\n }\n } else {\n for (var eIndex = element.classList.length; eIndex--;) {\n var className = element.classList[eIndex];\n\n if (blockClass.test(className)) {\n return true;\n }\n }\n }\n\n if (blockSelector) {\n return element.matches(blockSelector);\n }\n } catch (e) {}\n\n return false;\n}\n\nfunction elementClassMatchesRegex(el, regex) {\n for (var eIndex = el.classList.length; eIndex--;) {\n var className = el.classList[eIndex];\n\n if (regex.test(className)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction distanceToMatch(node, matchPredicate) {\n var limit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Infinity;\n var distance = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n if (!node) return -1;\n if (node.nodeType !== node.ELEMENT_NODE) return -1;\n if (distance > limit) return -1;\n if (matchPredicate(node)) return distance;\n return distanceToMatch(node.parentNode, matchPredicate, limit, distance + 1);\n}\n\nfunction createMatchPredicate(className, selector) {\n return function (node) {\n var el = node;\n if (el === null) return false;\n\n try {\n if (className) {\n if (typeof className === 'string') {\n if (el.matches(\".\".concat(className))) return true;\n } else if (elementClassMatchesRegex(el, className)) {\n return true;\n }\n }\n\n if (selector && el.matches(selector)) return true;\n return false;\n } catch (e2) {\n return false;\n }\n };\n}\n\nfunction needMaskingText(node, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, maskAllText) {\n try {\n var el = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;\n if (el === null) return false;\n\n if (el.tagName === 'INPUT') {\n var autocomplete = el.getAttribute('autocomplete');\n var disallowedAutocompleteValues = ['current-password', 'new-password', 'cc-number', 'cc-exp', 'cc-exp-month', 'cc-exp-year', 'cc-csc'];\n\n if (disallowedAutocompleteValues.includes(autocomplete)) {\n return true;\n }\n }\n\n var maskDistance = -1;\n var unmaskDistance = -1;\n\n if (maskAllText) {\n unmaskDistance = distanceToMatch(el, createMatchPredicate(unmaskTextClass, unmaskTextSelector));\n\n if (unmaskDistance < 0) {\n return true;\n }\n\n maskDistance = distanceToMatch(el, createMatchPredicate(maskTextClass, maskTextSelector), unmaskDistance >= 0 ? unmaskDistance : Infinity);\n } else {\n maskDistance = distanceToMatch(el, createMatchPredicate(maskTextClass, maskTextSelector));\n\n if (maskDistance < 0) {\n return false;\n }\n\n unmaskDistance = distanceToMatch(el, createMatchPredicate(unmaskTextClass, unmaskTextSelector), maskDistance >= 0 ? maskDistance : Infinity);\n }\n\n return maskDistance >= 0 ? unmaskDistance >= 0 ? maskDistance <= unmaskDistance : true : unmaskDistance >= 0 ? false : !!maskAllText;\n } catch (e) {}\n\n return !!maskAllText;\n}\n\nfunction onceIframeLoaded(iframeEl, listener, iframeLoadTimeout) {\n var win = iframeEl.contentWindow;\n\n if (!win) {\n return;\n }\n\n var fired = false;\n var readyState;\n\n try {\n readyState = win.document.readyState;\n } catch (error) {\n return;\n }\n\n if (readyState !== 'complete') {\n var timer = setTimeout(function () {\n if (!fired) {\n listener();\n fired = true;\n }\n }, iframeLoadTimeout);\n iframeEl.addEventListener('load', function () {\n clearTimeout(timer);\n fired = true;\n listener();\n });\n return;\n }\n\n var blankUrl = 'about:blank';\n\n if (win.location.href !== blankUrl || iframeEl.src === blankUrl || iframeEl.src === '') {\n setTimeout(listener, 0);\n return iframeEl.addEventListener('load', listener);\n }\n\n iframeEl.addEventListener('load', listener);\n}\n\nfunction onceStylesheetLoaded(link, listener, styleSheetLoadTimeout) {\n var fired = false;\n var styleSheetLoaded;\n\n try {\n styleSheetLoaded = link.sheet;\n } catch (error) {\n return;\n }\n\n if (styleSheetLoaded) return;\n var timer = setTimeout(function () {\n if (!fired) {\n listener();\n fired = true;\n }\n }, styleSheetLoadTimeout);\n link.addEventListener('load', function () {\n clearTimeout(timer);\n fired = true;\n listener();\n });\n}\n\nfunction serializeNode(n, options) {\n var doc = options.doc,\n mirror = options.mirror,\n blockClass = options.blockClass,\n blockSelector = options.blockSelector,\n unblockSelector = options.unblockSelector,\n maskAllText = options.maskAllText,\n maskAttributeFn = options.maskAttributeFn,\n maskTextClass = options.maskTextClass,\n unmaskTextClass = options.unmaskTextClass,\n maskTextSelector = options.maskTextSelector,\n unmaskTextSelector = options.unmaskTextSelector,\n inlineStylesheet = options.inlineStylesheet,\n _options$maskInputOpt = options.maskInputOptions,\n maskInputOptions = _options$maskInputOpt === void 0 ? {} : _options$maskInputOpt,\n maskTextFn = options.maskTextFn,\n maskInputFn = options.maskInputFn,\n _options$dataURLOptio = options.dataURLOptions,\n dataURLOptions = _options$dataURLOptio === void 0 ? {} : _options$dataURLOptio,\n inlineImages = options.inlineImages,\n recordCanvas = options.recordCanvas,\n keepIframeSrcFn = options.keepIframeSrcFn,\n _options$newlyAddedEl = options.newlyAddedElement,\n newlyAddedElement = _options$newlyAddedEl === void 0 ? false : _options$newlyAddedEl;\n var rootId = getRootId(doc, mirror);\n\n switch (n.nodeType) {\n case n.DOCUMENT_NODE:\n if (n.compatMode !== 'CSS1Compat') {\n return {\n type: NodeType$1.Document,\n childNodes: [],\n compatMode: n.compatMode\n };\n } else {\n return {\n type: NodeType$1.Document,\n childNodes: []\n };\n }\n\n case n.DOCUMENT_TYPE_NODE:\n return {\n type: NodeType$1.DocumentType,\n name: n.name,\n publicId: n.publicId,\n systemId: n.systemId,\n rootId: rootId\n };\n\n case n.ELEMENT_NODE:\n return serializeElementNode(n, {\n doc: doc,\n blockClass: blockClass,\n blockSelector: blockSelector,\n unblockSelector: unblockSelector,\n inlineStylesheet: inlineStylesheet,\n maskAttributeFn: maskAttributeFn,\n maskInputOptions: maskInputOptions,\n maskInputFn: maskInputFn,\n dataURLOptions: dataURLOptions,\n inlineImages: inlineImages,\n recordCanvas: recordCanvas,\n keepIframeSrcFn: keepIframeSrcFn,\n newlyAddedElement: newlyAddedElement,\n rootId: rootId,\n maskAllText: maskAllText,\n maskTextClass: maskTextClass,\n unmaskTextClass: unmaskTextClass,\n maskTextSelector: maskTextSelector,\n unmaskTextSelector: unmaskTextSelector\n });\n\n case n.TEXT_NODE:\n return serializeTextNode(n, {\n maskAllText: maskAllText,\n maskTextClass: maskTextClass,\n unmaskTextClass: unmaskTextClass,\n maskTextSelector: maskTextSelector,\n unmaskTextSelector: unmaskTextSelector,\n maskTextFn: maskTextFn,\n maskInputOptions: maskInputOptions,\n maskInputFn: maskInputFn,\n rootId: rootId\n });\n\n case n.CDATA_SECTION_NODE:\n return {\n type: NodeType$1.CDATA,\n textContent: '',\n rootId: rootId\n };\n\n case n.COMMENT_NODE:\n return {\n type: NodeType$1.Comment,\n textContent: n.textContent || '',\n rootId: rootId\n };\n\n default:\n return false;\n }\n}\n\nfunction getRootId(doc, mirror) {\n if (!mirror.hasNode(doc)) return undefined;\n var docId = mirror.getId(doc);\n return docId === 1 ? undefined : docId;\n}\n\nfunction serializeTextNode(n, options) {\n var maskAllText = options.maskAllText,\n maskTextClass = options.maskTextClass,\n unmaskTextClass = options.unmaskTextClass,\n maskTextSelector = options.maskTextSelector,\n unmaskTextSelector = options.unmaskTextSelector,\n maskTextFn = options.maskTextFn,\n maskInputOptions = options.maskInputOptions,\n maskInputFn = options.maskInputFn,\n rootId = options.rootId;\n var parentTagName = n.parentNode && n.parentNode.tagName;\n var textContent = n.textContent;\n var isStyle = parentTagName === 'STYLE' ? true : undefined;\n var isScript = parentTagName === 'SCRIPT' ? true : undefined;\n var isTextarea = parentTagName === 'TEXTAREA' ? true : undefined;\n\n if (isStyle && textContent) {\n try {\n if (n.nextSibling || n.previousSibling) {} else if (_optionalChain$5([n, 'access', function (_6) {\n return _6.parentNode;\n }, 'access', function (_7) {\n return _7.sheet;\n }, 'optionalAccess', function (_8) {\n return _8.cssRules;\n }])) {\n textContent = stringifyStylesheet(n.parentNode.sheet);\n }\n } catch (err) {\n console.warn(\"Cannot get CSS styles from text's parentNode. Error: \".concat(err), n);\n }\n\n textContent = absoluteToStylesheet(textContent, getHref());\n }\n\n if (isScript) {\n textContent = 'SCRIPT_PLACEHOLDER';\n }\n\n var forceMask = needMaskingText(n, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, maskAllText);\n\n if (!isStyle && !isScript && !isTextarea && textContent && forceMask) {\n textContent = maskTextFn ? maskTextFn(textContent, n.parentElement) : textContent.replace(/[\\S]/g, '*');\n }\n\n if (isTextarea && textContent && (maskInputOptions.textarea || forceMask)) {\n textContent = maskInputFn ? maskInputFn(textContent, n.parentNode) : textContent.replace(/[\\S]/g, '*');\n }\n\n if (parentTagName === 'OPTION' && textContent) {\n var isInputMasked = shouldMaskInput({\n type: null,\n tagName: parentTagName,\n maskInputOptions: maskInputOptions\n });\n textContent = maskInputValue({\n isMasked: needMaskingText(n, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, isInputMasked),\n element: n,\n value: textContent,\n maskInputFn: maskInputFn\n });\n }\n\n return {\n type: NodeType$1.Text,\n textContent: textContent || '',\n isStyle: isStyle,\n rootId: rootId\n };\n}\n\nfunction serializeElementNode(n, options) {\n var doc = options.doc,\n blockClass = options.blockClass,\n blockSelector = options.blockSelector,\n unblockSelector = options.unblockSelector,\n inlineStylesheet = options.inlineStylesheet,\n _options$maskInputOpt2 = options.maskInputOptions,\n maskInputOptions = _options$maskInputOpt2 === void 0 ? {} : _options$maskInputOpt2,\n maskAttributeFn = options.maskAttributeFn,\n maskInputFn = options.maskInputFn,\n _options$dataURLOptio2 = options.dataURLOptions,\n dataURLOptions = _options$dataURLOptio2 === void 0 ? {} : _options$dataURLOptio2,\n inlineImages = options.inlineImages,\n recordCanvas = options.recordCanvas,\n keepIframeSrcFn = options.keepIframeSrcFn,\n _options$newlyAddedEl2 = options.newlyAddedElement,\n newlyAddedElement = _options$newlyAddedEl2 === void 0 ? false : _options$newlyAddedEl2,\n rootId = options.rootId,\n maskAllText = options.maskAllText,\n maskTextClass = options.maskTextClass,\n unmaskTextClass = options.unmaskTextClass,\n maskTextSelector = options.maskTextSelector,\n unmaskTextSelector = options.unmaskTextSelector;\n\n var needBlock = _isBlockedElement(n, blockClass, blockSelector, unblockSelector);\n\n var tagName = getValidTagName(n);\n var attributes = {};\n var len = n.attributes.length;\n\n for (var i = 0; i < len; i++) {\n var attr = n.attributes[i];\n\n if (attr.name && !ignoreAttribute(tagName, attr.name, attr.value)) {\n attributes[attr.name] = transformAttribute(doc, tagName, toLowerCase(attr.name), attr.value, n, maskAttributeFn);\n }\n }\n\n if (tagName === 'link' && inlineStylesheet) {\n var stylesheet = Array.from(doc.styleSheets).find(function (s) {\n return s.href === n.href;\n });\n var cssText = null;\n\n if (stylesheet) {\n cssText = stringifyStylesheet(stylesheet);\n }\n\n if (cssText) {\n delete attributes.rel;\n delete attributes.href;\n attributes._cssText = absoluteToStylesheet(cssText, stylesheet.href);\n }\n }\n\n if (tagName === 'style' && n.sheet && !(n.innerText || n.textContent || '').trim().length) {\n var _cssText = stringifyStylesheet(n.sheet);\n\n if (_cssText) {\n attributes._cssText = absoluteToStylesheet(_cssText, getHref());\n }\n }\n\n if (tagName === 'input' || tagName === 'textarea' || tagName === 'select' || tagName === 'option') {\n var el = n;\n var type = getInputType(el);\n var value = getInputValue(el, toUpperCase(tagName), type);\n var checked = el.checked;\n\n if (type !== 'submit' && type !== 'button' && value) {\n var forceMask = needMaskingText(el, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, shouldMaskInput({\n type: type,\n tagName: toUpperCase(tagName),\n maskInputOptions: maskInputOptions\n }));\n attributes.value = maskInputValue({\n isMasked: forceMask,\n element: el,\n value: value,\n maskInputFn: maskInputFn\n });\n }\n\n if (checked) {\n attributes.checked = checked;\n }\n }\n\n if (tagName === 'option') {\n if (n.selected && !maskInputOptions['select']) {\n attributes.selected = true;\n } else {\n delete attributes.selected;\n }\n }\n\n if (tagName === 'canvas' && recordCanvas) {\n if (n.__context === '2d') {\n if (!is2DCanvasBlank(n)) {\n attributes.rr_dataURL = n.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n }\n } else if (!('__context' in n)) {\n var canvasDataURL = n.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n var blankCanvas = document.createElement('canvas');\n blankCanvas.width = n.width;\n blankCanvas.height = n.height;\n var blankCanvasDataURL = blankCanvas.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n\n if (canvasDataURL !== blankCanvasDataURL) {\n attributes.rr_dataURL = canvasDataURL;\n }\n }\n }\n\n if (tagName === 'img' && inlineImages) {\n if (!canvasService) {\n canvasService = doc.createElement('canvas');\n canvasCtx = canvasService.getContext('2d');\n }\n\n var image = n;\n var oldValue = image.crossOrigin;\n image.crossOrigin = 'anonymous';\n\n var recordInlineImage = function recordInlineImage() {\n image.removeEventListener('load', recordInlineImage);\n\n try {\n canvasService.width = image.naturalWidth;\n canvasService.height = image.naturalHeight;\n canvasCtx.drawImage(image, 0, 0);\n attributes.rr_dataURL = canvasService.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n } catch (err) {\n console.warn(\"Cannot inline img src=\".concat(image.currentSrc, \"! Error: \").concat(err));\n }\n\n oldValue ? attributes.crossOrigin = oldValue : image.removeAttribute('crossorigin');\n };\n\n if (image.complete && image.naturalWidth !== 0) recordInlineImage();else image.addEventListener('load', recordInlineImage);\n }\n\n if (tagName === 'audio' || tagName === 'video') {\n attributes.rr_mediaState = n.paused ? 'paused' : 'played';\n attributes.rr_mediaCurrentTime = n.currentTime;\n }\n\n if (!newlyAddedElement) {\n if (n.scrollLeft) {\n attributes.rr_scrollLeft = n.scrollLeft;\n }\n\n if (n.scrollTop) {\n attributes.rr_scrollTop = n.scrollTop;\n }\n }\n\n if (needBlock) {\n var _n$getBoundingClientR = n.getBoundingClientRect(),\n width = _n$getBoundingClientR.width,\n height = _n$getBoundingClientR.height;\n\n attributes = {\n class: attributes.class,\n rr_width: \"\".concat(width, \"px\"),\n rr_height: \"\".concat(height, \"px\")\n };\n }\n\n if (tagName === 'iframe' && !keepIframeSrcFn(attributes.src)) {\n if (!n.contentDocument) {\n attributes.rr_src = attributes.src;\n }\n\n delete attributes.src;\n }\n\n var isCustomElement;\n\n try {\n if (customElements.get(tagName)) isCustomElement = true;\n } catch (e) {}\n\n return {\n type: NodeType$1.Element,\n tagName: tagName,\n attributes: attributes,\n childNodes: [],\n isSVG: isSVGElement(n) || undefined,\n needBlock: needBlock,\n rootId: rootId,\n isCustom: isCustomElement\n };\n}\n\nfunction lowerIfExists(maybeAttr) {\n if (maybeAttr === undefined || maybeAttr === null) {\n return '';\n } else {\n return maybeAttr.toLowerCase();\n }\n}\n\nfunction slimDOMExcluded(sn, slimDOMOptions) {\n if (slimDOMOptions.comment && sn.type === NodeType$1.Comment) {\n return true;\n } else if (sn.type === NodeType$1.Element) {\n if (slimDOMOptions.script && (sn.tagName === 'script' || sn.tagName === 'link' && (sn.attributes.rel === 'preload' || sn.attributes.rel === 'modulepreload') && sn.attributes.as === 'script' || sn.tagName === 'link' && sn.attributes.rel === 'prefetch' && typeof sn.attributes.href === 'string' && sn.attributes.href.endsWith('.js'))) {\n return true;\n } else if (slimDOMOptions.headFavicon && (sn.tagName === 'link' && sn.attributes.rel === 'shortcut icon' || sn.tagName === 'meta' && (lowerIfExists(sn.attributes.name).match(/^msapplication-tile(image|color)$/) || lowerIfExists(sn.attributes.name) === 'application-name' || lowerIfExists(sn.attributes.rel) === 'icon' || lowerIfExists(sn.attributes.rel) === 'apple-touch-icon' || lowerIfExists(sn.attributes.rel) === 'shortcut icon'))) {\n return true;\n } else if (sn.tagName === 'meta') {\n if (slimDOMOptions.headMetaDescKeywords && lowerIfExists(sn.attributes.name).match(/^description|keywords$/)) {\n return true;\n } else if (slimDOMOptions.headMetaSocial && (lowerIfExists(sn.attributes.property).match(/^(og|twitter|fb):/) || lowerIfExists(sn.attributes.name).match(/^(og|twitter):/) || lowerIfExists(sn.attributes.name) === 'pinterest')) {\n return true;\n } else if (slimDOMOptions.headMetaRobots && (lowerIfExists(sn.attributes.name) === 'robots' || lowerIfExists(sn.attributes.name) === 'googlebot' || lowerIfExists(sn.attributes.name) === 'bingbot')) {\n return true;\n } else if (slimDOMOptions.headMetaHttpEquiv && sn.attributes['http-equiv'] !== undefined) {\n return true;\n } else if (slimDOMOptions.headMetaAuthorship && (lowerIfExists(sn.attributes.name) === 'author' || lowerIfExists(sn.attributes.name) === 'generator' || lowerIfExists(sn.attributes.name) === 'framework' || lowerIfExists(sn.attributes.name) === 'publisher' || lowerIfExists(sn.attributes.name) === 'progid' || lowerIfExists(sn.attributes.property).match(/^article:/) || lowerIfExists(sn.attributes.property).match(/^product:/))) {\n return true;\n } else if (slimDOMOptions.headMetaVerification && (lowerIfExists(sn.attributes.name) === 'google-site-verification' || lowerIfExists(sn.attributes.name) === 'yandex-verification' || lowerIfExists(sn.attributes.name) === 'csrf-token' || lowerIfExists(sn.attributes.name) === 'p:domain_verify' || lowerIfExists(sn.attributes.name) === 'verify-v1' || lowerIfExists(sn.attributes.name) === 'verification' || lowerIfExists(sn.attributes.name) === 'shopify-checkout-api-token')) {\n return true;\n }\n }\n }\n\n return false;\n}\n\nfunction serializeNodeWithId(n, options) {\n var doc = options.doc,\n mirror = options.mirror,\n blockClass = options.blockClass,\n blockSelector = options.blockSelector,\n unblockSelector = options.unblockSelector,\n maskAllText = options.maskAllText,\n maskTextClass = options.maskTextClass,\n unmaskTextClass = options.unmaskTextClass,\n maskTextSelector = options.maskTextSelector,\n unmaskTextSelector = options.unmaskTextSelector,\n _options$skipChild = options.skipChild,\n skipChild = _options$skipChild === void 0 ? false : _options$skipChild,\n _options$inlineStyles = options.inlineStylesheet,\n inlineStylesheet = _options$inlineStyles === void 0 ? true : _options$inlineStyles,\n _options$maskInputOpt3 = options.maskInputOptions,\n maskInputOptions = _options$maskInputOpt3 === void 0 ? {} : _options$maskInputOpt3,\n maskAttributeFn = options.maskAttributeFn,\n maskTextFn = options.maskTextFn,\n maskInputFn = options.maskInputFn,\n slimDOMOptions = options.slimDOMOptions,\n _options$dataURLOptio3 = options.dataURLOptions,\n dataURLOptions = _options$dataURLOptio3 === void 0 ? {} : _options$dataURLOptio3,\n _options$inlineImages = options.inlineImages,\n inlineImages = _options$inlineImages === void 0 ? false : _options$inlineImages,\n _options$recordCanvas = options.recordCanvas,\n recordCanvas = _options$recordCanvas === void 0 ? false : _options$recordCanvas,\n onSerialize = options.onSerialize,\n onIframeLoad = options.onIframeLoad,\n _options$iframeLoadTi = options.iframeLoadTimeout,\n iframeLoadTimeout = _options$iframeLoadTi === void 0 ? 5000 : _options$iframeLoadTi,\n onStylesheetLoad = options.onStylesheetLoad,\n _options$stylesheetLo = options.stylesheetLoadTimeout,\n stylesheetLoadTimeout = _options$stylesheetLo === void 0 ? 5000 : _options$stylesheetLo,\n _options$keepIframeSr = options.keepIframeSrcFn,\n keepIframeSrcFn = _options$keepIframeSr === void 0 ? function () {\n return false;\n } : _options$keepIframeSr,\n _options$newlyAddedEl3 = options.newlyAddedElement,\n newlyAddedElement = _options$newlyAddedEl3 === void 0 ? false : _options$newlyAddedEl3;\n var _options$preserveWhit = options.preserveWhiteSpace,\n preserveWhiteSpace = _options$preserveWhit === void 0 ? true : _options$preserveWhit;\n\n var _serializedNode = serializeNode(n, {\n doc: doc,\n mirror: mirror,\n blockClass: blockClass,\n blockSelector: blockSelector,\n maskAllText: maskAllText,\n unblockSelector: unblockSelector,\n maskTextClass: maskTextClass,\n unmaskTextClass: unmaskTextClass,\n maskTextSelector: maskTextSelector,\n unmaskTextSelector: unmaskTextSelector,\n inlineStylesheet: inlineStylesheet,\n maskInputOptions: maskInputOptions,\n maskAttributeFn: maskAttributeFn,\n maskTextFn: maskTextFn,\n maskInputFn: maskInputFn,\n dataURLOptions: dataURLOptions,\n inlineImages: inlineImages,\n recordCanvas: recordCanvas,\n keepIframeSrcFn: keepIframeSrcFn,\n newlyAddedElement: newlyAddedElement\n });\n\n if (!_serializedNode) {\n console.warn(n, 'not serialized');\n return null;\n }\n\n var id;\n\n if (mirror.hasNode(n)) {\n id = mirror.getId(n);\n } else if (slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === NodeType$1.Text && !_serializedNode.isStyle && !_serializedNode.textContent.replace(/^\\s+|\\s+$/gm, '').length) {\n id = IGNORED_NODE;\n } else {\n id = genId();\n }\n\n var serializedNode = Object.assign(_serializedNode, {\n id: id\n });\n mirror.add(n, serializedNode);\n\n if (id === IGNORED_NODE) {\n return null;\n }\n\n if (onSerialize) {\n onSerialize(n);\n }\n\n var recordChild = !skipChild;\n\n if (serializedNode.type === NodeType$1.Element) {\n recordChild = recordChild && !serializedNode.needBlock;\n delete serializedNode.needBlock;\n var shadowRoot = n.shadowRoot;\n if (shadowRoot && isNativeShadowDom(shadowRoot)) serializedNode.isShadowHost = true;\n }\n\n if ((serializedNode.type === NodeType$1.Document || serializedNode.type === NodeType$1.Element) && recordChild) {\n if (slimDOMOptions.headWhitespace && serializedNode.type === NodeType$1.Element && serializedNode.tagName === 'head') {\n preserveWhiteSpace = false;\n }\n\n var bypassOptions = {\n doc: doc,\n mirror: mirror,\n blockClass: blockClass,\n blockSelector: blockSelector,\n maskAllText: maskAllText,\n unblockSelector: unblockSelector,\n maskTextClass: maskTextClass,\n unmaskTextClass: unmaskTextClass,\n maskTextSelector: maskTextSelector,\n unmaskTextSelector: unmaskTextSelector,\n skipChild: skipChild,\n inlineStylesheet: inlineStylesheet,\n maskInputOptions: maskInputOptions,\n maskAttributeFn: maskAttributeFn,\n maskTextFn: maskTextFn,\n maskInputFn: maskInputFn,\n slimDOMOptions: slimDOMOptions,\n dataURLOptions: dataURLOptions,\n inlineImages: inlineImages,\n recordCanvas: recordCanvas,\n preserveWhiteSpace: preserveWhiteSpace,\n onSerialize: onSerialize,\n onIframeLoad: onIframeLoad,\n iframeLoadTimeout: iframeLoadTimeout,\n onStylesheetLoad: onStylesheetLoad,\n stylesheetLoadTimeout: stylesheetLoadTimeout,\n keepIframeSrcFn: keepIframeSrcFn\n };\n\n for (var _i = 0, _Array$from = Array.from(n.childNodes); _i < _Array$from.length; _i++) {\n var childN = _Array$from[_i];\n var serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n\n if (serializedChildNode) {\n serializedNode.childNodes.push(serializedChildNode);\n }\n }\n\n if (isElement$1(n) && n.shadowRoot) {\n for (var _i2 = 0, _Array$from2 = Array.from(n.shadowRoot.childNodes); _i2 < _Array$from2.length; _i2++) {\n var _childN = _Array$from2[_i2];\n\n var _serializedChildNode = serializeNodeWithId(_childN, bypassOptions);\n\n if (_serializedChildNode) {\n isNativeShadowDom(n.shadowRoot) && (_serializedChildNode.isShadow = true);\n serializedNode.childNodes.push(_serializedChildNode);\n }\n }\n }\n }\n\n if (n.parentNode && isShadowRoot(n.parentNode) && isNativeShadowDom(n.parentNode)) {\n serializedNode.isShadow = true;\n }\n\n if (serializedNode.type === NodeType$1.Element && serializedNode.tagName === 'iframe') {\n onceIframeLoaded(n, function () {\n var iframeDoc = n.contentDocument;\n\n if (iframeDoc && onIframeLoad) {\n var serializedIframeNode = serializeNodeWithId(iframeDoc, {\n doc: iframeDoc,\n mirror: mirror,\n blockClass: blockClass,\n blockSelector: blockSelector,\n unblockSelector: unblockSelector,\n maskAllText: maskAllText,\n maskTextClass: maskTextClass,\n unmaskTextClass: unmaskTextClass,\n maskTextSelector: maskTextSelector,\n unmaskTextSelector: unmaskTextSelector,\n skipChild: false,\n inlineStylesheet: inlineStylesheet,\n maskInputOptions: maskInputOptions,\n maskAttributeFn: maskAttributeFn,\n maskTextFn: maskTextFn,\n maskInputFn: maskInputFn,\n slimDOMOptions: slimDOMOptions,\n dataURLOptions: dataURLOptions,\n inlineImages: inlineImages,\n recordCanvas: recordCanvas,\n preserveWhiteSpace: preserveWhiteSpace,\n onSerialize: onSerialize,\n onIframeLoad: onIframeLoad,\n iframeLoadTimeout: iframeLoadTimeout,\n onStylesheetLoad: onStylesheetLoad,\n stylesheetLoadTimeout: stylesheetLoadTimeout,\n keepIframeSrcFn: keepIframeSrcFn\n });\n\n if (serializedIframeNode) {\n onIframeLoad(n, serializedIframeNode);\n }\n }\n }, iframeLoadTimeout);\n }\n\n if (serializedNode.type === NodeType$1.Element && serializedNode.tagName === 'link' && serializedNode.attributes.rel === 'stylesheet') {\n onceStylesheetLoaded(n, function () {\n if (onStylesheetLoad) {\n var serializedLinkNode = serializeNodeWithId(n, {\n doc: doc,\n mirror: mirror,\n blockClass: blockClass,\n blockSelector: blockSelector,\n unblockSelector: unblockSelector,\n maskAllText: maskAllText,\n maskTextClass: maskTextClass,\n unmaskTextClass: unmaskTextClass,\n maskTextSelector: maskTextSelector,\n unmaskTextSelector: unmaskTextSelector,\n skipChild: false,\n inlineStylesheet: inlineStylesheet,\n maskInputOptions: maskInputOptions,\n maskAttributeFn: maskAttributeFn,\n maskTextFn: maskTextFn,\n maskInputFn: maskInputFn,\n slimDOMOptions: slimDOMOptions,\n dataURLOptions: dataURLOptions,\n inlineImages: inlineImages,\n recordCanvas: recordCanvas,\n preserveWhiteSpace: preserveWhiteSpace,\n onSerialize: onSerialize,\n onIframeLoad: onIframeLoad,\n iframeLoadTimeout: iframeLoadTimeout,\n onStylesheetLoad: onStylesheetLoad,\n stylesheetLoadTimeout: stylesheetLoadTimeout,\n keepIframeSrcFn: keepIframeSrcFn\n });\n\n if (serializedLinkNode) {\n onStylesheetLoad(n, serializedLinkNode);\n }\n }\n }, stylesheetLoadTimeout);\n }\n\n return serializedNode;\n}\n\nfunction snapshot(n, options) {\n var _ref3 = options || {},\n _ref3$mirror = _ref3.mirror,\n mirror = _ref3$mirror === void 0 ? new Mirror() : _ref3$mirror,\n _ref3$blockClass = _ref3.blockClass,\n blockClass = _ref3$blockClass === void 0 ? 'rr-block' : _ref3$blockClass,\n _ref3$blockSelector = _ref3.blockSelector,\n blockSelector = _ref3$blockSelector === void 0 ? null : _ref3$blockSelector,\n _ref3$unblockSelector = _ref3.unblockSelector,\n unblockSelector = _ref3$unblockSelector === void 0 ? null : _ref3$unblockSelector,\n _ref3$maskAllText = _ref3.maskAllText,\n maskAllText = _ref3$maskAllText === void 0 ? false : _ref3$maskAllText,\n _ref3$maskTextClass = _ref3.maskTextClass,\n maskTextClass = _ref3$maskTextClass === void 0 ? 'rr-mask' : _ref3$maskTextClass,\n _ref3$unmaskTextClass = _ref3.unmaskTextClass,\n unmaskTextClass = _ref3$unmaskTextClass === void 0 ? null : _ref3$unmaskTextClass,\n _ref3$maskTextSelecto = _ref3.maskTextSelector,\n maskTextSelector = _ref3$maskTextSelecto === void 0 ? null : _ref3$maskTextSelecto,\n _ref3$unmaskTextSelec = _ref3.unmaskTextSelector,\n unmaskTextSelector = _ref3$unmaskTextSelec === void 0 ? null : _ref3$unmaskTextSelec,\n _ref3$inlineStyleshee = _ref3.inlineStylesheet,\n inlineStylesheet = _ref3$inlineStyleshee === void 0 ? true : _ref3$inlineStyleshee,\n _ref3$inlineImages = _ref3.inlineImages,\n inlineImages = _ref3$inlineImages === void 0 ? false : _ref3$inlineImages,\n _ref3$recordCanvas = _ref3.recordCanvas,\n recordCanvas = _ref3$recordCanvas === void 0 ? false : _ref3$recordCanvas,\n _ref3$maskAllInputs = _ref3.maskAllInputs,\n maskAllInputs = _ref3$maskAllInputs === void 0 ? false : _ref3$maskAllInputs,\n maskAttributeFn = _ref3.maskAttributeFn,\n maskTextFn = _ref3.maskTextFn,\n maskInputFn = _ref3.maskInputFn,\n _ref3$slimDOM = _ref3.slimDOM,\n slimDOM = _ref3$slimDOM === void 0 ? false : _ref3$slimDOM,\n dataURLOptions = _ref3.dataURLOptions,\n preserveWhiteSpace = _ref3.preserveWhiteSpace,\n onSerialize = _ref3.onSerialize,\n onIframeLoad = _ref3.onIframeLoad,\n iframeLoadTimeout = _ref3.iframeLoadTimeout,\n onStylesheetLoad = _ref3.onStylesheetLoad,\n stylesheetLoadTimeout = _ref3.stylesheetLoadTimeout,\n _ref3$keepIframeSrcFn = _ref3.keepIframeSrcFn,\n keepIframeSrcFn = _ref3$keepIframeSrcFn === void 0 ? function () {\n return false;\n } : _ref3$keepIframeSrcFn;\n\n var maskInputOptions = maskAllInputs === true ? {\n color: true,\n date: true,\n 'datetime-local': true,\n email: true,\n month: true,\n number: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true,\n textarea: true,\n select: true\n } : maskAllInputs === false ? {} : maskAllInputs;\n var slimDOMOptions = slimDOM === true || slimDOM === 'all' ? {\n script: true,\n comment: true,\n headFavicon: true,\n headWhitespace: true,\n headMetaDescKeywords: slimDOM === 'all',\n headMetaSocial: true,\n headMetaRobots: true,\n headMetaHttpEquiv: true,\n headMetaAuthorship: true,\n headMetaVerification: true\n } : slimDOM === false ? {} : slimDOM;\n return serializeNodeWithId(n, {\n doc: n,\n mirror: mirror,\n blockClass: blockClass,\n blockSelector: blockSelector,\n unblockSelector: unblockSelector,\n maskAllText: maskAllText,\n maskTextClass: maskTextClass,\n unmaskTextClass: unmaskTextClass,\n maskTextSelector: maskTextSelector,\n unmaskTextSelector: unmaskTextSelector,\n skipChild: false,\n inlineStylesheet: inlineStylesheet,\n maskInputOptions: maskInputOptions,\n maskAttributeFn: maskAttributeFn,\n maskTextFn: maskTextFn,\n maskInputFn: maskInputFn,\n slimDOMOptions: slimDOMOptions,\n dataURLOptions: dataURLOptions,\n inlineImages: inlineImages,\n recordCanvas: recordCanvas,\n preserveWhiteSpace: preserveWhiteSpace,\n onSerialize: onSerialize,\n onIframeLoad: onIframeLoad,\n iframeLoadTimeout: iframeLoadTimeout,\n onStylesheetLoad: onStylesheetLoad,\n stylesheetLoadTimeout: stylesheetLoadTimeout,\n keepIframeSrcFn: keepIframeSrcFn,\n newlyAddedElement: false\n });\n}\n\nfunction _optionalChain$4(ops) {\n var lastAccessLHS = undefined;\n var value = ops[0];\n var i = 1;\n\n while (i < ops.length) {\n var op = ops[i];\n var fn = ops[i + 1];\n i += 2;\n\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n return undefined;\n }\n\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn(function () {\n var _value3;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return (_value3 = value).call.apply(_value3, [lastAccessLHS].concat(args));\n });\n lastAccessLHS = undefined;\n }\n }\n\n return value;\n}\n\nfunction on(type, fn) {\n var target = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : document;\n var options = {\n capture: true,\n passive: true\n };\n target.addEventListener(type, fn, options);\n return function () {\n return target.removeEventListener(type, fn, options);\n };\n}\n\nvar DEPARTED_MIRROR_ACCESS_WARNING = 'Please stop import mirror directly. Instead of that,' + '\\r\\n' + 'now you can use replayer.getMirror() to access the mirror instance of a replayer,' + '\\r\\n' + 'or you can use record.mirror to access the mirror instance during recording.';\nvar _mirror = {\n map: {},\n getId: function getId() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return -1;\n },\n getNode: function getNode() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return null;\n },\n removeNodeFromMap: function removeNodeFromMap() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n },\n has: function has() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return false;\n },\n reset: function reset() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n }\n};\n\nif (typeof window !== 'undefined' && window.Proxy && window.Reflect) {\n _mirror = new Proxy(_mirror, {\n get: function get(target, prop, receiver) {\n if (prop === 'map') {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n }\n\n return Reflect.get(target, prop, receiver);\n }\n });\n}\n\nfunction throttle$1(func, wait) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var timeout = null;\n var previous = 0;\n return function () {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n var now = Date.now();\n\n if (!previous && options.leading === false) {\n previous = now;\n }\n\n var remaining = wait - (now - previous);\n var context = this;\n\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout$1(timeout);\n timeout = null;\n }\n\n previous = now;\n func.apply(context, args);\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout$1(function () {\n previous = options.leading === false ? 0 : Date.now();\n timeout = null;\n func.apply(context, args);\n }, remaining);\n }\n };\n}\n\nfunction hookSetter(target, key, d, isRevoked) {\n var win = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : window;\n var original = win.Object.getOwnPropertyDescriptor(target, key);\n win.Object.defineProperty(target, key, isRevoked ? d : {\n set: function set(value) {\n var _this2 = this;\n\n setTimeout$1(function () {\n d.set.call(_this2, value);\n }, 0);\n\n if (original && original.set) {\n original.set.call(this, value);\n }\n }\n });\n return function () {\n return hookSetter(target, key, original || {}, true);\n };\n}\n\nfunction patch(source, name, replacement) {\n try {\n if (!(name in source)) {\n return function () {};\n }\n\n var original = source[name];\n var wrapped = replacement(original);\n\n if (typeof wrapped === 'function') {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __rrweb_original__: {\n enumerable: false,\n value: original\n }\n });\n }\n\n source[name] = wrapped;\n return function () {\n source[name] = original;\n };\n } catch (e2) {\n return function () {};\n }\n}\n\nvar nowTimestamp = Date.now;\n\nif (!/[1-9][0-9]{12}/.test(Date.now().toString())) {\n nowTimestamp = function nowTimestamp() {\n return new Date().getTime();\n };\n}\n\nfunction getWindowScroll(win) {\n var doc = win.document;\n return {\n left: doc.scrollingElement ? doc.scrollingElement.scrollLeft : win.pageXOffset !== undefined ? win.pageXOffset : _optionalChain$4([doc, 'optionalAccess', function (_) {\n return _.documentElement;\n }, 'access', function (_2) {\n return _2.scrollLeft;\n }]) || _optionalChain$4([doc, 'optionalAccess', function (_3) {\n return _3.body;\n }, 'optionalAccess', function (_4) {\n return _4.parentElement;\n }, 'optionalAccess', function (_5) {\n return _5.scrollLeft;\n }]) || _optionalChain$4([doc, 'optionalAccess', function (_6) {\n return _6.body;\n }, 'optionalAccess', function (_7) {\n return _7.scrollLeft;\n }]) || 0,\n top: doc.scrollingElement ? doc.scrollingElement.scrollTop : win.pageYOffset !== undefined ? win.pageYOffset : _optionalChain$4([doc, 'optionalAccess', function (_8) {\n return _8.documentElement;\n }, 'access', function (_9) {\n return _9.scrollTop;\n }]) || _optionalChain$4([doc, 'optionalAccess', function (_10) {\n return _10.body;\n }, 'optionalAccess', function (_11) {\n return _11.parentElement;\n }, 'optionalAccess', function (_12) {\n return _12.scrollTop;\n }]) || _optionalChain$4([doc, 'optionalAccess', function (_13) {\n return _13.body;\n }, 'optionalAccess', function (_14) {\n return _14.scrollTop;\n }]) || 0\n };\n}\n\nfunction getWindowHeight() {\n return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight;\n}\n\nfunction getWindowWidth() {\n return window.innerWidth || document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth;\n}\n\nfunction closestElementOfNode(node) {\n if (!node) {\n return null;\n }\n\n var el = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;\n return el;\n}\n\nfunction isBlocked(node, blockClass, blockSelector, unblockSelector, checkAncestors) {\n if (!node) {\n return false;\n }\n\n var el = closestElementOfNode(node);\n\n if (!el) {\n return false;\n }\n\n var blockedPredicate = createMatchPredicate(blockClass, blockSelector);\n\n if (!checkAncestors) {\n var isUnblocked = unblockSelector && el.matches(unblockSelector);\n return blockedPredicate(el) && !isUnblocked;\n }\n\n var blockDistance = distanceToMatch(el, blockedPredicate);\n var unblockDistance = -1;\n\n if (blockDistance < 0) {\n return false;\n }\n\n if (unblockSelector) {\n unblockDistance = distanceToMatch(el, createMatchPredicate(null, unblockSelector));\n }\n\n if (blockDistance > -1 && unblockDistance < 0) {\n return true;\n }\n\n return blockDistance < unblockDistance;\n}\n\nfunction isSerialized(n, mirror) {\n return mirror.getId(n) !== -1;\n}\n\nfunction isIgnored(n, mirror) {\n return mirror.getId(n) === IGNORED_NODE;\n}\n\nfunction isAncestorRemoved(target, mirror) {\n if (isShadowRoot(target)) {\n return false;\n }\n\n var id = mirror.getId(target);\n\n if (!mirror.has(id)) {\n return true;\n }\n\n if (target.parentNode && target.parentNode.nodeType === target.DOCUMENT_NODE) {\n return false;\n }\n\n if (!target.parentNode) {\n return true;\n }\n\n return isAncestorRemoved(target.parentNode, mirror);\n}\n\nfunction legacy_isTouchEvent(event) {\n return Boolean(event.changedTouches);\n}\n\nfunction polyfill() {\n var _this3 = this;\n\n var win = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;\n\n if ('NodeList' in win && !win.NodeList.prototype.forEach) {\n win.NodeList.prototype.forEach = Array.prototype.forEach;\n }\n\n if ('DOMTokenList' in win && !win.DOMTokenList.prototype.forEach) {\n win.DOMTokenList.prototype.forEach = Array.prototype.forEach;\n }\n\n if (!Node.prototype.contains) {\n Node.prototype.contains = function () {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n var node = args[0];\n\n if (!(0 in args)) {\n throw new TypeError('1 argument is required');\n }\n\n do {\n if (_this3 === node) {\n return true;\n }\n } while (node = node && node.parentNode);\n\n return false;\n };\n }\n}\n\nfunction isSerializedIframe(n, mirror) {\n return Boolean(n.nodeName === 'IFRAME' && mirror.getMeta(n));\n}\n\nfunction isSerializedStylesheet(n, mirror) {\n return Boolean(n.nodeName === 'LINK' && n.nodeType === n.ELEMENT_NODE && n.getAttribute && n.getAttribute('rel') === 'stylesheet' && mirror.getMeta(n));\n}\n\nfunction hasShadowRoot(n) {\n return Boolean(_optionalChain$4([n, 'optionalAccess', function (_18) {\n return _18.shadowRoot;\n }]));\n}\n\nvar StyleSheetMirror = /*#__PURE__*/function () {\n function StyleSheetMirror() {\n _classCallCheck(this, StyleSheetMirror);\n\n this.id = 1;\n this.styleIDMap = new WeakMap();\n this.idStyleMap = new Map();\n }\n\n _createClass(StyleSheetMirror, [{\n key: \"getId\",\n value: function getId(stylesheet) {\n return _nullishCoalesce(this.styleIDMap.get(stylesheet), function () {\n return -1;\n });\n }\n }, {\n key: \"has\",\n value: function has(stylesheet) {\n return this.styleIDMap.has(stylesheet);\n }\n }, {\n key: \"add\",\n value: function add(stylesheet, id) {\n if (this.has(stylesheet)) return this.getId(stylesheet);\n var newId;\n\n if (id === undefined) {\n newId = this.id++;\n } else newId = id;\n\n this.styleIDMap.set(stylesheet, newId);\n this.idStyleMap.set(newId, stylesheet);\n return newId;\n }\n }, {\n key: \"getStyle\",\n value: function getStyle(id) {\n return this.idStyleMap.get(id) || null;\n }\n }, {\n key: \"reset\",\n value: function reset() {\n this.styleIDMap = new WeakMap();\n this.idStyleMap = new Map();\n this.id = 1;\n }\n }, {\n key: \"generateId\",\n value: function generateId() {\n return this.id++;\n }\n }]);\n\n return StyleSheetMirror;\n}();\n\nfunction getShadowHost(n) {\n var shadowHost = null;\n if (_optionalChain$4([n, 'access', function (_19) {\n return _19.getRootNode;\n }, 'optionalCall', function (_20) {\n return _20();\n }, 'optionalAccess', function (_21) {\n return _21.nodeType;\n }]) === Node.DOCUMENT_FRAGMENT_NODE && n.getRootNode().host) shadowHost = n.getRootNode().host;\n return shadowHost;\n}\n\nfunction getRootShadowHost(n) {\n var rootShadowHost = n;\n var shadowHost;\n\n while (shadowHost = getShadowHost(rootShadowHost)) {\n rootShadowHost = shadowHost;\n }\n\n return rootShadowHost;\n}\n\nfunction shadowHostInDom(n) {\n var doc = n.ownerDocument;\n if (!doc) return false;\n var shadowHost = getRootShadowHost(n);\n return doc.contains(shadowHost);\n}\n\nfunction inDom(n) {\n var doc = n.ownerDocument;\n if (!doc) return false;\n return doc.contains(n) || shadowHostInDom(n);\n}\n\nvar cachedImplementations = {};\n\nfunction getImplementation(name) {\n var cached = cachedImplementations[name];\n\n if (cached) {\n return cached;\n }\n\n var document = window.document;\n var impl = window[name];\n\n if (document && typeof document.createElement === 'function') {\n try {\n var sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n var contentWindow = sandbox.contentWindow;\n\n if (contentWindow && contentWindow[name]) {\n impl = contentWindow[name];\n }\n\n document.head.removeChild(sandbox);\n } catch (e) {}\n }\n\n return cachedImplementations[name] = impl.bind(window);\n}\n\nfunction onRequestAnimationFrame() {\n return getImplementation('requestAnimationFrame').apply(void 0, arguments);\n}\n\nfunction setTimeout$1() {\n return getImplementation('setTimeout').apply(void 0, arguments);\n}\n\nfunction clearTimeout$1() {\n return getImplementation('clearTimeout').apply(void 0, arguments);\n}\n\nvar EventType = /* @__PURE__ */function (EventType2) {\n EventType2[EventType2[\"DomContentLoaded\"] = 0] = \"DomContentLoaded\";\n EventType2[EventType2[\"Load\"] = 1] = \"Load\";\n EventType2[EventType2[\"FullSnapshot\"] = 2] = \"FullSnapshot\";\n EventType2[EventType2[\"IncrementalSnapshot\"] = 3] = \"IncrementalSnapshot\";\n EventType2[EventType2[\"Meta\"] = 4] = \"Meta\";\n EventType2[EventType2[\"Custom\"] = 5] = \"Custom\";\n EventType2[EventType2[\"Plugin\"] = 6] = \"Plugin\";\n return EventType2;\n}(EventType || {});\n\nvar IncrementalSource = /* @__PURE__ */function (IncrementalSource2) {\n IncrementalSource2[IncrementalSource2[\"Mutation\"] = 0] = \"Mutation\";\n IncrementalSource2[IncrementalSource2[\"MouseMove\"] = 1] = \"MouseMove\";\n IncrementalSource2[IncrementalSource2[\"MouseInteraction\"] = 2] = \"MouseInteraction\";\n IncrementalSource2[IncrementalSource2[\"Scroll\"] = 3] = \"Scroll\";\n IncrementalSource2[IncrementalSource2[\"ViewportResize\"] = 4] = \"ViewportResize\";\n IncrementalSource2[IncrementalSource2[\"Input\"] = 5] = \"Input\";\n IncrementalSource2[IncrementalSource2[\"TouchMove\"] = 6] = \"TouchMove\";\n IncrementalSource2[IncrementalSource2[\"MediaInteraction\"] = 7] = \"MediaInteraction\";\n IncrementalSource2[IncrementalSource2[\"StyleSheetRule\"] = 8] = \"StyleSheetRule\";\n IncrementalSource2[IncrementalSource2[\"CanvasMutation\"] = 9] = \"CanvasMutation\";\n IncrementalSource2[IncrementalSource2[\"Font\"] = 10] = \"Font\";\n IncrementalSource2[IncrementalSource2[\"Log\"] = 11] = \"Log\";\n IncrementalSource2[IncrementalSource2[\"Drag\"] = 12] = \"Drag\";\n IncrementalSource2[IncrementalSource2[\"StyleDeclaration\"] = 13] = \"StyleDeclaration\";\n IncrementalSource2[IncrementalSource2[\"Selection\"] = 14] = \"Selection\";\n IncrementalSource2[IncrementalSource2[\"AdoptedStyleSheet\"] = 15] = \"AdoptedStyleSheet\";\n IncrementalSource2[IncrementalSource2[\"CustomElement\"] = 16] = \"CustomElement\";\n return IncrementalSource2;\n}(IncrementalSource || {});\n\nvar MouseInteractions = /* @__PURE__ */function (MouseInteractions2) {\n MouseInteractions2[MouseInteractions2[\"MouseUp\"] = 0] = \"MouseUp\";\n MouseInteractions2[MouseInteractions2[\"MouseDown\"] = 1] = \"MouseDown\";\n MouseInteractions2[MouseInteractions2[\"Click\"] = 2] = \"Click\";\n MouseInteractions2[MouseInteractions2[\"ContextMenu\"] = 3] = \"ContextMenu\";\n MouseInteractions2[MouseInteractions2[\"DblClick\"] = 4] = \"DblClick\";\n MouseInteractions2[MouseInteractions2[\"Focus\"] = 5] = \"Focus\";\n MouseInteractions2[MouseInteractions2[\"Blur\"] = 6] = \"Blur\";\n MouseInteractions2[MouseInteractions2[\"TouchStart\"] = 7] = \"TouchStart\";\n MouseInteractions2[MouseInteractions2[\"TouchMove_Departed\"] = 8] = \"TouchMove_Departed\";\n MouseInteractions2[MouseInteractions2[\"TouchEnd\"] = 9] = \"TouchEnd\";\n MouseInteractions2[MouseInteractions2[\"TouchCancel\"] = 10] = \"TouchCancel\";\n return MouseInteractions2;\n}(MouseInteractions || {});\n\nvar PointerTypes = /* @__PURE__ */function (PointerTypes2) {\n PointerTypes2[PointerTypes2[\"Mouse\"] = 0] = \"Mouse\";\n PointerTypes2[PointerTypes2[\"Pen\"] = 1] = \"Pen\";\n PointerTypes2[PointerTypes2[\"Touch\"] = 2] = \"Touch\";\n return PointerTypes2;\n}(PointerTypes || {});\n\nfunction _optionalChain$3(ops) {\n var lastAccessLHS = undefined;\n var value = ops[0];\n var i = 1;\n\n while (i < ops.length) {\n var op = ops[i];\n var fn = ops[i + 1];\n i += 2;\n\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n return undefined;\n }\n\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn(function () {\n var _value4;\n\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n\n return (_value4 = value).call.apply(_value4, [lastAccessLHS].concat(args));\n });\n lastAccessLHS = undefined;\n }\n }\n\n return value;\n}\n\nfunction isNodeInLinkedList(n) {\n return '__ln' in n;\n}\n\nvar DoubleLinkedList = /*#__PURE__*/function () {\n function DoubleLinkedList() {\n _classCallCheck(this, DoubleLinkedList);\n\n this.length = 0;\n this.head = null;\n this.tail = null;\n }\n\n _createClass(DoubleLinkedList, [{\n key: \"get\",\n value: function get(position) {\n if (position >= this.length) {\n throw new Error('Position outside of list range');\n }\n\n var current = this.head;\n\n for (var index = 0; index < position; index++) {\n current = _optionalChain$3([current, 'optionalAccess', function (_) {\n return _.next;\n }]) || null;\n }\n\n return current;\n }\n }, {\n key: \"addNode\",\n value: function addNode(n) {\n var node = {\n value: n,\n previous: null,\n next: null\n };\n n.__ln = node;\n\n if (n.previousSibling && isNodeInLinkedList(n.previousSibling)) {\n var current = n.previousSibling.__ln.next;\n node.next = current;\n node.previous = n.previousSibling.__ln;\n n.previousSibling.__ln.next = node;\n\n if (current) {\n current.previous = node;\n }\n } else if (n.nextSibling && isNodeInLinkedList(n.nextSibling) && n.nextSibling.__ln.previous) {\n var _current = n.nextSibling.__ln.previous;\n node.previous = _current;\n node.next = n.nextSibling.__ln;\n n.nextSibling.__ln.previous = node;\n\n if (_current) {\n _current.next = node;\n }\n } else {\n if (this.head) {\n this.head.previous = node;\n }\n\n node.next = this.head;\n this.head = node;\n }\n\n if (node.next === null) {\n this.tail = node;\n }\n\n this.length++;\n }\n }, {\n key: \"removeNode\",\n value: function removeNode(n) {\n var current = n.__ln;\n\n if (!this.head) {\n return;\n }\n\n if (!current.previous) {\n this.head = current.next;\n\n if (this.head) {\n this.head.previous = null;\n } else {\n this.tail = null;\n }\n } else {\n current.previous.next = current.next;\n\n if (current.next) {\n current.next.previous = current.previous;\n } else {\n this.tail = current.previous;\n }\n }\n\n if (n.__ln) {\n delete n.__ln;\n }\n\n this.length--;\n }\n }]);\n\n return DoubleLinkedList;\n}();\n\nvar moveKey = function moveKey(id, parentId) {\n return \"\".concat(id, \"@\").concat(parentId);\n};\n\nvar MutationBuffer = /*#__PURE__*/function () {\n function MutationBuffer() {\n var _this4 = this;\n\n _classCallCheck(this, MutationBuffer);\n\n this.frozen = false;\n this.locked = false;\n this.texts = [];\n this.attributes = [];\n this.attributeMap = new WeakMap();\n this.removes = [];\n this.mapRemoves = [];\n this.movedMap = {};\n this.addedSet = new Set();\n this.movedSet = new Set();\n this.droppedSet = new Set();\n\n this.processMutations = function (mutations) {\n mutations.forEach(_this4.processMutation);\n\n _this4.emit();\n };\n\n this.emit = function () {\n if (_this4.frozen || _this4.locked) {\n return;\n }\n\n var adds = [];\n var addedIds = new Set();\n var addList = new DoubleLinkedList();\n\n var getNextId = function getNextId(n) {\n var ns = n;\n var nextId = IGNORED_NODE;\n\n while (nextId === IGNORED_NODE) {\n ns = ns && ns.nextSibling;\n nextId = ns && _this4.mirror.getId(ns);\n }\n\n return nextId;\n };\n\n var pushAdd = function pushAdd(n) {\n if (!n.parentNode || !inDom(n)) {\n return;\n }\n\n var parentId = isShadowRoot(n.parentNode) ? _this4.mirror.getId(getShadowHost(n)) : _this4.mirror.getId(n.parentNode);\n var nextId = getNextId(n);\n\n if (parentId === -1 || nextId === -1) {\n return addList.addNode(n);\n }\n\n var sn = serializeNodeWithId(n, {\n doc: _this4.doc,\n mirror: _this4.mirror,\n blockClass: _this4.blockClass,\n blockSelector: _this4.blockSelector,\n maskAllText: _this4.maskAllText,\n unblockSelector: _this4.unblockSelector,\n maskTextClass: _this4.maskTextClass,\n unmaskTextClass: _this4.unmaskTextClass,\n maskTextSelector: _this4.maskTextSelector,\n unmaskTextSelector: _this4.unmaskTextSelector,\n skipChild: true,\n newlyAddedElement: true,\n inlineStylesheet: _this4.inlineStylesheet,\n maskInputOptions: _this4.maskInputOptions,\n maskAttributeFn: _this4.maskAttributeFn,\n maskTextFn: _this4.maskTextFn,\n maskInputFn: _this4.maskInputFn,\n slimDOMOptions: _this4.slimDOMOptions,\n dataURLOptions: _this4.dataURLOptions,\n recordCanvas: _this4.recordCanvas,\n inlineImages: _this4.inlineImages,\n onSerialize: function onSerialize(currentN) {\n if (isSerializedIframe(currentN, _this4.mirror)) {\n _this4.iframeManager.addIframe(currentN);\n }\n\n if (isSerializedStylesheet(currentN, _this4.mirror)) {\n _this4.stylesheetManager.trackLinkElement(currentN);\n }\n\n if (hasShadowRoot(n)) {\n _this4.shadowDomManager.addShadowRoot(n.shadowRoot, _this4.doc);\n }\n },\n onIframeLoad: function onIframeLoad(iframe, childSn) {\n _this4.iframeManager.attachIframe(iframe, childSn);\n\n _this4.shadowDomManager.observeAttachShadow(iframe);\n },\n onStylesheetLoad: function onStylesheetLoad(link, childSn) {\n _this4.stylesheetManager.attachLinkElement(link, childSn);\n }\n });\n\n if (sn) {\n adds.push({\n parentId: parentId,\n nextId: nextId,\n node: sn\n });\n addedIds.add(sn.id);\n }\n };\n\n while (_this4.mapRemoves.length) {\n _this4.mirror.removeNodeFromMap(_this4.mapRemoves.shift());\n }\n\n var _iterator2 = _createForOfIteratorHelper(_this4.movedSet),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var n = _step2.value;\n\n if (isParentRemoved(_this4.removes, n, _this4.mirror) && !_this4.movedSet.has(n.parentNode)) {\n continue;\n }\n\n pushAdd(n);\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n var _iterator3 = _createForOfIteratorHelper(_this4.addedSet),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var _n = _step3.value;\n\n if (!isAncestorInSet(_this4.droppedSet, _n) && !isParentRemoved(_this4.removes, _n, _this4.mirror)) {\n pushAdd(_n);\n } else if (isAncestorInSet(_this4.movedSet, _n)) {\n pushAdd(_n);\n } else {\n _this4.droppedSet.add(_n);\n }\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n var candidate = null;\n\n while (addList.length) {\n var node = null;\n\n if (candidate) {\n var parentId = _this4.mirror.getId(candidate.value.parentNode);\n\n var nextId = getNextId(candidate.value);\n\n if (parentId !== -1 && nextId !== -1) {\n node = candidate;\n }\n }\n\n if (!node) {\n var tailNode = addList.tail;\n\n while (tailNode) {\n var _node = tailNode;\n tailNode = tailNode.previous;\n\n if (_node) {\n var _parentId = _this4.mirror.getId(_node.value.parentNode);\n\n var _nextId = getNextId(_node.value);\n\n if (_nextId === -1) continue;else if (_parentId !== -1) {\n node = _node;\n break;\n } else {\n var unhandledNode = _node.value;\n\n if (unhandledNode.parentNode && unhandledNode.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n var shadowHost = unhandledNode.parentNode.host;\n\n var _parentId2 = _this4.mirror.getId(shadowHost);\n\n if (_parentId2 !== -1) {\n node = _node;\n break;\n }\n }\n }\n }\n }\n }\n\n if (!node) {\n while (addList.head) {\n addList.removeNode(addList.head.value);\n }\n\n break;\n }\n\n candidate = node.previous;\n addList.removeNode(node.value);\n pushAdd(node.value);\n }\n\n var payload = {\n texts: _this4.texts.map(function (text) {\n return {\n id: _this4.mirror.getId(text.node),\n value: text.value\n };\n }).filter(function (text) {\n return !addedIds.has(text.id);\n }).filter(function (text) {\n return _this4.mirror.has(text.id);\n }),\n attributes: _this4.attributes.map(function (attribute) {\n var attributes = attribute.attributes;\n\n if (typeof attributes.style === 'string') {\n var diffAsStr = JSON.stringify(attribute.styleDiff);\n var unchangedAsStr = JSON.stringify(attribute._unchangedStyles);\n\n if (diffAsStr.length < attributes.style.length) {\n if ((diffAsStr + unchangedAsStr).split('var(').length === attributes.style.split('var(').length) {\n attributes.style = attribute.styleDiff;\n }\n }\n }\n\n return {\n id: _this4.mirror.getId(attribute.node),\n attributes: attributes\n };\n }).filter(function (attribute) {\n return !addedIds.has(attribute.id);\n }).filter(function (attribute) {\n return _this4.mirror.has(attribute.id);\n }),\n removes: _this4.removes,\n adds: adds\n };\n\n if (!payload.texts.length && !payload.attributes.length && !payload.removes.length && !payload.adds.length) {\n return;\n }\n\n _this4.texts = [];\n _this4.attributes = [];\n _this4.attributeMap = new WeakMap();\n _this4.removes = [];\n _this4.addedSet = new Set();\n _this4.movedSet = new Set();\n _this4.droppedSet = new Set();\n _this4.movedMap = {};\n\n _this4.mutationCb(payload);\n };\n\n this.processMutation = function (m) {\n if (isIgnored(m.target, _this4.mirror)) {\n return;\n }\n\n switch (m.type) {\n case 'characterData':\n {\n var value = m.target.textContent;\n\n if (!isBlocked(m.target, _this4.blockClass, _this4.blockSelector, _this4.unblockSelector, false) && value !== m.oldValue) {\n _this4.texts.push({\n value: needMaskingText(m.target, _this4.maskTextClass, _this4.maskTextSelector, _this4.unmaskTextClass, _this4.unmaskTextSelector, _this4.maskAllText) && value ? _this4.maskTextFn ? _this4.maskTextFn(value, closestElementOfNode(m.target)) : value.replace(/[\\S]/g, '*') : value,\n node: m.target\n });\n }\n\n break;\n }\n\n case 'attributes':\n {\n var target = m.target;\n var attributeName = m.attributeName;\n\n var _value5 = m.target.getAttribute(attributeName);\n\n if (attributeName === 'value') {\n var type = getInputType(target);\n var tagName = target.tagName;\n _value5 = getInputValue(target, tagName, type);\n var isInputMasked = shouldMaskInput({\n maskInputOptions: _this4.maskInputOptions,\n tagName: tagName,\n type: type\n });\n var forceMask = needMaskingText(m.target, _this4.maskTextClass, _this4.maskTextSelector, _this4.unmaskTextClass, _this4.unmaskTextSelector, isInputMasked);\n _value5 = maskInputValue({\n isMasked: forceMask,\n element: target,\n value: _value5,\n maskInputFn: _this4.maskInputFn\n });\n }\n\n if (isBlocked(m.target, _this4.blockClass, _this4.blockSelector, _this4.unblockSelector, false) || _value5 === m.oldValue) {\n return;\n }\n\n var item = _this4.attributeMap.get(m.target);\n\n if (target.tagName === 'IFRAME' && attributeName === 'src' && !_this4.keepIframeSrcFn(_value5)) {\n if (!target.contentDocument) {\n attributeName = 'rr_src';\n } else {\n return;\n }\n }\n\n if (!item) {\n item = {\n node: m.target,\n attributes: {},\n styleDiff: {},\n _unchangedStyles: {}\n };\n\n _this4.attributes.push(item);\n\n _this4.attributeMap.set(m.target, item);\n }\n\n if (attributeName === 'type' && target.tagName === 'INPUT' && (m.oldValue || '').toLowerCase() === 'password') {\n target.setAttribute('data-rr-is-password', 'true');\n }\n\n if (!ignoreAttribute(target.tagName, attributeName)) {\n item.attributes[attributeName] = transformAttribute(_this4.doc, toLowerCase(target.tagName), toLowerCase(attributeName), _value5, target, _this4.maskAttributeFn);\n\n if (attributeName === 'style') {\n if (!_this4.unattachedDoc) {\n try {\n _this4.unattachedDoc = document.implementation.createHTMLDocument();\n } catch (e) {\n _this4.unattachedDoc = _this4.doc;\n }\n }\n\n var old = _this4.unattachedDoc.createElement('span');\n\n if (m.oldValue) {\n old.setAttribute('style', m.oldValue);\n }\n\n for (var _i3 = 0, _Array$from3 = Array.from(target.style); _i3 < _Array$from3.length; _i3++) {\n var pname = _Array$from3[_i3];\n var newValue = target.style.getPropertyValue(pname);\n var newPriority = target.style.getPropertyPriority(pname);\n\n if (newValue !== old.style.getPropertyValue(pname) || newPriority !== old.style.getPropertyPriority(pname)) {\n if (newPriority === '') {\n item.styleDiff[pname] = newValue;\n } else {\n item.styleDiff[pname] = [newValue, newPriority];\n }\n } else {\n item._unchangedStyles[pname] = [newValue, newPriority];\n }\n }\n\n for (var _i4 = 0, _Array$from4 = Array.from(old.style); _i4 < _Array$from4.length; _i4++) {\n var _pname = _Array$from4[_i4];\n\n if (target.style.getPropertyValue(_pname) === '') {\n item.styleDiff[_pname] = false;\n }\n }\n }\n }\n\n break;\n }\n\n case 'childList':\n {\n if (isBlocked(m.target, _this4.blockClass, _this4.blockSelector, _this4.unblockSelector, true)) {\n return;\n }\n\n m.addedNodes.forEach(function (n) {\n return _this4.genAdds(n, m.target);\n });\n m.removedNodes.forEach(function (n) {\n var nodeId = _this4.mirror.getId(n);\n\n var parentId = isShadowRoot(m.target) ? _this4.mirror.getId(m.target.host) : _this4.mirror.getId(m.target);\n\n if (isBlocked(m.target, _this4.blockClass, _this4.blockSelector, _this4.unblockSelector, false) || isIgnored(n, _this4.mirror) || !isSerialized(n, _this4.mirror)) {\n return;\n }\n\n if (_this4.addedSet.has(n)) {\n deepDelete(_this4.addedSet, n);\n\n _this4.droppedSet.add(n);\n } else if (_this4.addedSet.has(m.target) && nodeId === -1) ;else if (isAncestorRemoved(m.target, _this4.mirror)) ;else if (_this4.movedSet.has(n) && _this4.movedMap[moveKey(nodeId, parentId)]) {\n deepDelete(_this4.movedSet, n);\n } else {\n _this4.removes.push({\n parentId: parentId,\n id: nodeId,\n isShadow: isShadowRoot(m.target) && isNativeShadowDom(m.target) ? true : undefined\n });\n }\n\n _this4.mapRemoves.push(n);\n });\n break;\n }\n }\n };\n\n this.genAdds = function (n, target) {\n if (_this4.processedNodeManager.inOtherBuffer(n, _this4)) return;\n if (_this4.addedSet.has(n) || _this4.movedSet.has(n)) return;\n\n if (_this4.mirror.hasNode(n)) {\n if (isIgnored(n, _this4.mirror)) {\n return;\n }\n\n _this4.movedSet.add(n);\n\n var targetId = null;\n\n if (target && _this4.mirror.hasNode(target)) {\n targetId = _this4.mirror.getId(target);\n }\n\n if (targetId && targetId !== -1) {\n _this4.movedMap[moveKey(_this4.mirror.getId(n), targetId)] = true;\n }\n } else {\n _this4.addedSet.add(n);\n\n _this4.droppedSet.delete(n);\n }\n\n if (!isBlocked(n, _this4.blockClass, _this4.blockSelector, _this4.unblockSelector, false)) {\n n.childNodes.forEach(function (childN) {\n return _this4.genAdds(childN);\n });\n\n if (hasShadowRoot(n)) {\n n.shadowRoot.childNodes.forEach(function (childN) {\n _this4.processedNodeManager.add(childN, _this4);\n\n _this4.genAdds(childN, n);\n });\n }\n }\n };\n }\n\n _createClass(MutationBuffer, [{\n key: \"init\",\n value: function init(options) {\n var _this5 = this;\n\n ['mutationCb', 'blockClass', 'blockSelector', 'unblockSelector', 'maskAllText', 'maskTextClass', 'unmaskTextClass', 'maskTextSelector', 'unmaskTextSelector', 'inlineStylesheet', 'maskInputOptions', 'maskAttributeFn', 'maskTextFn', 'maskInputFn', 'keepIframeSrcFn', 'recordCanvas', 'inlineImages', 'slimDOMOptions', 'dataURLOptions', 'doc', 'mirror', 'iframeManager', 'stylesheetManager', 'shadowDomManager', 'canvasManager', 'processedNodeManager'].forEach(function (key) {\n _this5[key] = options[key];\n });\n }\n }, {\n key: \"freeze\",\n value: function freeze() {\n this.frozen = true;\n this.canvasManager.freeze();\n }\n }, {\n key: \"unfreeze\",\n value: function unfreeze() {\n this.frozen = false;\n this.canvasManager.unfreeze();\n this.emit();\n }\n }, {\n key: \"isFrozen\",\n value: function isFrozen() {\n return this.frozen;\n }\n }, {\n key: \"lock\",\n value: function lock() {\n this.locked = true;\n this.canvasManager.lock();\n }\n }, {\n key: \"unlock\",\n value: function unlock() {\n this.locked = false;\n this.canvasManager.unlock();\n this.emit();\n }\n }, {\n key: \"reset\",\n value: function reset() {\n this.shadowDomManager.reset();\n this.canvasManager.reset();\n }\n }]);\n\n return MutationBuffer;\n}();\n\nfunction deepDelete(addsSet, n) {\n addsSet.delete(n);\n n.childNodes.forEach(function (childN) {\n return deepDelete(addsSet, childN);\n });\n}\n\nfunction isParentRemoved(removes, n, mirror) {\n if (removes.length === 0) return false;\n return _isParentRemoved(removes, n, mirror);\n}\n\nfunction _isParentRemoved(removes, n, mirror) {\n var parentNode = n.parentNode;\n\n if (!parentNode) {\n return false;\n }\n\n var parentId = mirror.getId(parentNode);\n\n if (removes.some(function (r) {\n return r.id === parentId;\n })) {\n return true;\n }\n\n return _isParentRemoved(removes, parentNode, mirror);\n}\n\nfunction isAncestorInSet(set, n) {\n if (set.size === 0) return false;\n return _isAncestorInSet(set, n);\n}\n\nfunction _isAncestorInSet(set, n) {\n var parentNode = n.parentNode;\n\n if (!parentNode) {\n return false;\n }\n\n if (set.has(parentNode)) {\n return true;\n }\n\n return _isAncestorInSet(set, parentNode);\n}\n\nvar errorHandler;\n\nfunction registerErrorHandler(handler) {\n errorHandler = handler;\n}\n\nfunction unregisterErrorHandler() {\n errorHandler = undefined;\n}\n\nvar callbackWrapper = function callbackWrapper(cb) {\n if (!errorHandler) {\n return cb;\n }\n\n var rrwebWrapped = function rrwebWrapped() {\n try {\n return cb.apply(void 0, arguments);\n } catch (error) {\n if (errorHandler && errorHandler(error) === true) {\n return function () {};\n }\n\n throw error;\n }\n };\n\n return rrwebWrapped;\n};\n\nfunction _optionalChain$2(ops) {\n var lastAccessLHS = undefined;\n var value = ops[0];\n var i = 1;\n\n while (i < ops.length) {\n var op = ops[i];\n var fn = ops[i + 1];\n i += 2;\n\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n return undefined;\n }\n\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn(function () {\n var _value6;\n\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n\n return (_value6 = value).call.apply(_value6, [lastAccessLHS].concat(args));\n });\n lastAccessLHS = undefined;\n }\n }\n\n return value;\n}\n\nvar mutationBuffers = [];\n\nfunction getEventTarget(event) {\n try {\n if ('composedPath' in event) {\n var path = event.composedPath();\n\n if (path.length) {\n return path[0];\n }\n } else if ('path' in event && event.path.length) {\n return event.path[0];\n }\n } catch (e2) {}\n\n return event && event.target;\n}\n\nfunction initMutationObserver(options, rootEl) {\n var mutationBuffer = new MutationBuffer();\n mutationBuffers.push(mutationBuffer);\n mutationBuffer.init(options);\n var mutationObserverCtor = window.MutationObserver || window.__rrMutationObserver;\n\n var angularZoneSymbol = _optionalChain$2([window, 'optionalAccess', function (_) {\n return _.Zone;\n }, 'optionalAccess', function (_2) {\n return _2.__symbol__;\n }, 'optionalCall', function (_3) {\n return _3('MutationObserver');\n }]);\n\n if (angularZoneSymbol && window[angularZoneSymbol]) {\n mutationObserverCtor = window[angularZoneSymbol];\n }\n\n var observer = new mutationObserverCtor(callbackWrapper(function (mutations) {\n if (options.onMutation && options.onMutation(mutations) === false) {\n return;\n }\n\n mutationBuffer.processMutations.bind(mutationBuffer)(mutations);\n }));\n observer.observe(rootEl, {\n attributes: true,\n attributeOldValue: true,\n characterData: true,\n characterDataOldValue: true,\n childList: true,\n subtree: true\n });\n return observer;\n}\n\nfunction initMoveObserver(_ref4) {\n var mousemoveCb = _ref4.mousemoveCb,\n sampling = _ref4.sampling,\n doc = _ref4.doc,\n mirror = _ref4.mirror;\n\n if (sampling.mousemove === false) {\n return function () {};\n }\n\n var threshold = typeof sampling.mousemove === 'number' ? sampling.mousemove : 50;\n var callbackThreshold = typeof sampling.mousemoveCallback === 'number' ? sampling.mousemoveCallback : 500;\n var positions = [];\n var timeBaseline;\n var wrappedCb = throttle$1(callbackWrapper(function (source) {\n var totalOffset = Date.now() - timeBaseline;\n mousemoveCb(positions.map(function (p) {\n p.timeOffset -= totalOffset;\n return p;\n }), source);\n positions = [];\n timeBaseline = null;\n }), callbackThreshold);\n var updatePosition = callbackWrapper(throttle$1(callbackWrapper(function (evt) {\n var target = getEventTarget(evt);\n\n var _ref5 = legacy_isTouchEvent(evt) ? evt.changedTouches[0] : evt,\n clientX = _ref5.clientX,\n clientY = _ref5.clientY;\n\n if (!timeBaseline) {\n timeBaseline = nowTimestamp();\n }\n\n positions.push({\n x: clientX,\n y: clientY,\n id: mirror.getId(target),\n timeOffset: nowTimestamp() - timeBaseline\n });\n wrappedCb(typeof DragEvent !== 'undefined' && evt instanceof DragEvent ? IncrementalSource.Drag : evt instanceof MouseEvent ? IncrementalSource.MouseMove : IncrementalSource.TouchMove);\n }), threshold, {\n trailing: false\n }));\n var handlers = [on('mousemove', updatePosition, doc), on('touchmove', updatePosition, doc), on('drag', updatePosition, doc)];\n return callbackWrapper(function () {\n handlers.forEach(function (h) {\n return h();\n });\n });\n}\n\nfunction initMouseInteractionObserver(_ref6) {\n var mouseInteractionCb = _ref6.mouseInteractionCb,\n doc = _ref6.doc,\n mirror = _ref6.mirror,\n blockClass = _ref6.blockClass,\n blockSelector = _ref6.blockSelector,\n unblockSelector = _ref6.unblockSelector,\n sampling = _ref6.sampling;\n\n if (sampling.mouseInteraction === false) {\n return function () {};\n }\n\n var disableMap = sampling.mouseInteraction === true || sampling.mouseInteraction === undefined ? {} : sampling.mouseInteraction;\n var handlers = [];\n var currentPointerType = null;\n\n var getHandler = function getHandler(eventKey) {\n return function (event) {\n var target = getEventTarget(event);\n\n if (isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n return;\n }\n\n var pointerType = null;\n var thisEventKey = eventKey;\n\n if ('pointerType' in event) {\n switch (event.pointerType) {\n case 'mouse':\n pointerType = PointerTypes.Mouse;\n break;\n\n case 'touch':\n pointerType = PointerTypes.Touch;\n break;\n\n case 'pen':\n pointerType = PointerTypes.Pen;\n break;\n }\n\n if (pointerType === PointerTypes.Touch) {\n if (MouseInteractions[eventKey] === MouseInteractions.MouseDown) {\n thisEventKey = 'TouchStart';\n } else if (MouseInteractions[eventKey] === MouseInteractions.MouseUp) {\n thisEventKey = 'TouchEnd';\n }\n } else if (pointerType === PointerTypes.Pen) ;\n } else if (legacy_isTouchEvent(event)) {\n pointerType = PointerTypes.Touch;\n }\n\n if (pointerType !== null) {\n currentPointerType = pointerType;\n\n if (thisEventKey.startsWith('Touch') && pointerType === PointerTypes.Touch || thisEventKey.startsWith('Mouse') && pointerType === PointerTypes.Mouse) {\n pointerType = null;\n }\n } else if (MouseInteractions[eventKey] === MouseInteractions.Click) {\n pointerType = currentPointerType;\n currentPointerType = null;\n }\n\n var e = legacy_isTouchEvent(event) ? event.changedTouches[0] : event;\n\n if (!e) {\n return;\n }\n\n var id = mirror.getId(target);\n var clientX = e.clientX,\n clientY = e.clientY;\n callbackWrapper(mouseInteractionCb)(_objectSpread({\n type: MouseInteractions[thisEventKey],\n id: id,\n x: clientX,\n y: clientY\n }, pointerType !== null && {\n pointerType: pointerType\n }));\n };\n };\n\n Object.keys(MouseInteractions).filter(function (key) {\n return Number.isNaN(Number(key)) && !key.endsWith('_Departed') && disableMap[key] !== false;\n }).forEach(function (eventKey) {\n var eventName = toLowerCase(eventKey);\n var handler = getHandler(eventKey);\n\n if (window.PointerEvent) {\n switch (MouseInteractions[eventKey]) {\n case MouseInteractions.MouseDown:\n case MouseInteractions.MouseUp:\n eventName = eventName.replace('mouse', 'pointer');\n break;\n\n case MouseInteractions.TouchStart:\n case MouseInteractions.TouchEnd:\n return;\n }\n }\n\n handlers.push(on(eventName, handler, doc));\n });\n return callbackWrapper(function () {\n handlers.forEach(function (h) {\n return h();\n });\n });\n}\n\nfunction initScrollObserver(_ref7) {\n var scrollCb = _ref7.scrollCb,\n doc = _ref7.doc,\n mirror = _ref7.mirror,\n blockClass = _ref7.blockClass,\n blockSelector = _ref7.blockSelector,\n unblockSelector = _ref7.unblockSelector,\n sampling = _ref7.sampling;\n var updatePosition = callbackWrapper(throttle$1(callbackWrapper(function (evt) {\n var target = getEventTarget(evt);\n\n if (!target || isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n return;\n }\n\n var id = mirror.getId(target);\n\n if (target === doc && doc.defaultView) {\n var scrollLeftTop = getWindowScroll(doc.defaultView);\n scrollCb({\n id: id,\n x: scrollLeftTop.left,\n y: scrollLeftTop.top\n });\n } else {\n scrollCb({\n id: id,\n x: target.scrollLeft,\n y: target.scrollTop\n });\n }\n }), sampling.scroll || 100));\n return on('scroll', updatePosition, doc);\n}\n\nfunction initViewportResizeObserver(_ref8, _ref9) {\n var viewportResizeCb = _ref8.viewportResizeCb;\n var win = _ref9.win;\n var lastH = -1;\n var lastW = -1;\n var updateDimension = callbackWrapper(throttle$1(callbackWrapper(function () {\n var height = getWindowHeight();\n var width = getWindowWidth();\n\n if (lastH !== height || lastW !== width) {\n viewportResizeCb({\n width: Number(width),\n height: Number(height)\n });\n lastH = height;\n lastW = width;\n }\n }), 200));\n return on('resize', updateDimension, win);\n}\n\nvar INPUT_TAGS = ['INPUT', 'TEXTAREA', 'SELECT'];\nvar lastInputValueMap = new WeakMap();\n\nfunction initInputObserver(_ref10) {\n var inputCb = _ref10.inputCb,\n doc = _ref10.doc,\n mirror = _ref10.mirror,\n blockClass = _ref10.blockClass,\n blockSelector = _ref10.blockSelector,\n unblockSelector = _ref10.unblockSelector,\n ignoreClass = _ref10.ignoreClass,\n ignoreSelector = _ref10.ignoreSelector,\n maskInputOptions = _ref10.maskInputOptions,\n maskInputFn = _ref10.maskInputFn,\n sampling = _ref10.sampling,\n userTriggeredOnInput = _ref10.userTriggeredOnInput,\n maskTextClass = _ref10.maskTextClass,\n unmaskTextClass = _ref10.unmaskTextClass,\n maskTextSelector = _ref10.maskTextSelector,\n unmaskTextSelector = _ref10.unmaskTextSelector;\n\n function eventHandler(event) {\n var target = getEventTarget(event);\n var userTriggered = event.isTrusted;\n var tagName = target && toUpperCase(target.tagName);\n if (tagName === 'OPTION') target = target.parentElement;\n\n if (!target || !tagName || INPUT_TAGS.indexOf(tagName) < 0 || isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n return;\n }\n\n var el = target;\n\n if (el.classList.contains(ignoreClass) || ignoreSelector && el.matches(ignoreSelector)) {\n return;\n }\n\n var type = getInputType(target);\n var text = getInputValue(el, tagName, type);\n var isChecked = false;\n var isInputMasked = shouldMaskInput({\n maskInputOptions: maskInputOptions,\n tagName: tagName,\n type: type\n });\n var forceMask = needMaskingText(target, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, isInputMasked);\n\n if (type === 'radio' || type === 'checkbox') {\n isChecked = target.checked;\n }\n\n text = maskInputValue({\n isMasked: forceMask,\n element: target,\n value: text,\n maskInputFn: maskInputFn\n });\n cbWithDedup(target, userTriggeredOnInput ? {\n text: text,\n isChecked: isChecked,\n userTriggered: userTriggered\n } : {\n text: text,\n isChecked: isChecked\n });\n var name = target.name;\n\n if (type === 'radio' && name && isChecked) {\n doc.querySelectorAll(\"input[type=\\\"radio\\\"][name=\\\"\".concat(name, \"\\\"]\")).forEach(function (el) {\n if (el !== target) {\n var _text = maskInputValue({\n isMasked: forceMask,\n element: el,\n value: getInputValue(el, tagName, type),\n maskInputFn: maskInputFn\n });\n\n cbWithDedup(el, userTriggeredOnInput ? {\n text: _text,\n isChecked: !isChecked,\n userTriggered: false\n } : {\n text: _text,\n isChecked: !isChecked\n });\n }\n });\n }\n }\n\n function cbWithDedup(target, v) {\n var lastInputValue = lastInputValueMap.get(target);\n\n if (!lastInputValue || lastInputValue.text !== v.text || lastInputValue.isChecked !== v.isChecked) {\n lastInputValueMap.set(target, v);\n var id = mirror.getId(target);\n callbackWrapper(inputCb)(_objectSpread(_objectSpread({}, v), {}, {\n id: id\n }));\n }\n }\n\n var events = sampling.input === 'last' ? ['change'] : ['input', 'change'];\n var handlers = events.map(function (eventName) {\n return on(eventName, callbackWrapper(eventHandler), doc);\n });\n var currentWindow = doc.defaultView;\n\n if (!currentWindow) {\n return function () {\n handlers.forEach(function (h) {\n return h();\n });\n };\n }\n\n var propertyDescriptor = currentWindow.Object.getOwnPropertyDescriptor(currentWindow.HTMLInputElement.prototype, 'value');\n var hookProperties = [[currentWindow.HTMLInputElement.prototype, 'value'], [currentWindow.HTMLInputElement.prototype, 'checked'], [currentWindow.HTMLSelectElement.prototype, 'value'], [currentWindow.HTMLTextAreaElement.prototype, 'value'], [currentWindow.HTMLSelectElement.prototype, 'selectedIndex'], [currentWindow.HTMLOptionElement.prototype, 'selected']];\n\n if (propertyDescriptor && propertyDescriptor.set) {\n handlers.push.apply(handlers, _toConsumableArray(hookProperties.map(function (p) {\n return hookSetter(p[0], p[1], {\n set: function set() {\n callbackWrapper(eventHandler)({\n target: this,\n isTrusted: false\n });\n }\n }, false, currentWindow);\n })));\n }\n\n return callbackWrapper(function () {\n handlers.forEach(function (h) {\n return h();\n });\n });\n}\n\nfunction getNestedCSSRulePositions(rule) {\n var positions = [];\n\n function recurse(childRule, pos) {\n if (hasNestedCSSRule('CSSGroupingRule') && childRule.parentRule instanceof CSSGroupingRule || hasNestedCSSRule('CSSMediaRule') && childRule.parentRule instanceof CSSMediaRule || hasNestedCSSRule('CSSSupportsRule') && childRule.parentRule instanceof CSSSupportsRule || hasNestedCSSRule('CSSConditionRule') && childRule.parentRule instanceof CSSConditionRule) {\n var rules = Array.from(childRule.parentRule.cssRules);\n var index = rules.indexOf(childRule);\n pos.unshift(index);\n } else if (childRule.parentStyleSheet) {\n var _rules = Array.from(childRule.parentStyleSheet.cssRules);\n\n var _index = _rules.indexOf(childRule);\n\n pos.unshift(_index);\n }\n\n return pos;\n }\n\n return recurse(rule, positions);\n}\n\nfunction getIdAndStyleId(sheet, mirror, styleMirror) {\n var id, styleId;\n if (!sheet) return {};\n if (sheet.ownerNode) id = mirror.getId(sheet.ownerNode);else styleId = styleMirror.getId(sheet);\n return {\n styleId: styleId,\n id: id\n };\n}\n\nfunction initStyleSheetObserver(_ref11, _ref12) {\n var styleSheetRuleCb = _ref11.styleSheetRuleCb,\n mirror = _ref11.mirror,\n stylesheetManager = _ref11.stylesheetManager;\n var win = _ref12.win;\n\n if (!win.CSSStyleSheet || !win.CSSStyleSheet.prototype) {\n return function () {};\n }\n\n var insertRule = win.CSSStyleSheet.prototype.insertRule;\n win.CSSStyleSheet.prototype.insertRule = new Proxy(insertRule, {\n apply: callbackWrapper(function (target, thisArg, argumentsList) {\n var _argumentsList = _slicedToArray(argumentsList, 2),\n rule = _argumentsList[0],\n index = _argumentsList[1];\n\n var _getIdAndStyleId = getIdAndStyleId(thisArg, mirror, stylesheetManager.styleMirror),\n id = _getIdAndStyleId.id,\n styleId = _getIdAndStyleId.styleId;\n\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleSheetRuleCb({\n id: id,\n styleId: styleId,\n adds: [{\n rule: rule,\n index: index\n }]\n });\n }\n\n return target.apply(thisArg, argumentsList);\n })\n });\n var deleteRule = win.CSSStyleSheet.prototype.deleteRule;\n win.CSSStyleSheet.prototype.deleteRule = new Proxy(deleteRule, {\n apply: callbackWrapper(function (target, thisArg, argumentsList) {\n var _argumentsList2 = _slicedToArray(argumentsList, 1),\n index = _argumentsList2[0];\n\n var _getIdAndStyleId2 = getIdAndStyleId(thisArg, mirror, stylesheetManager.styleMirror),\n id = _getIdAndStyleId2.id,\n styleId = _getIdAndStyleId2.styleId;\n\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleSheetRuleCb({\n id: id,\n styleId: styleId,\n removes: [{\n index: index\n }]\n });\n }\n\n return target.apply(thisArg, argumentsList);\n })\n });\n var replace;\n\n if (win.CSSStyleSheet.prototype.replace) {\n replace = win.CSSStyleSheet.prototype.replace;\n win.CSSStyleSheet.prototype.replace = new Proxy(replace, {\n apply: callbackWrapper(function (target, thisArg, argumentsList) {\n var _argumentsList3 = _slicedToArray(argumentsList, 1),\n text = _argumentsList3[0];\n\n var _getIdAndStyleId3 = getIdAndStyleId(thisArg, mirror, stylesheetManager.styleMirror),\n id = _getIdAndStyleId3.id,\n styleId = _getIdAndStyleId3.styleId;\n\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleSheetRuleCb({\n id: id,\n styleId: styleId,\n replace: text\n });\n }\n\n return target.apply(thisArg, argumentsList);\n })\n });\n }\n\n var replaceSync;\n\n if (win.CSSStyleSheet.prototype.replaceSync) {\n replaceSync = win.CSSStyleSheet.prototype.replaceSync;\n win.CSSStyleSheet.prototype.replaceSync = new Proxy(replaceSync, {\n apply: callbackWrapper(function (target, thisArg, argumentsList) {\n var _argumentsList4 = _slicedToArray(argumentsList, 1),\n text = _argumentsList4[0];\n\n var _getIdAndStyleId4 = getIdAndStyleId(thisArg, mirror, stylesheetManager.styleMirror),\n id = _getIdAndStyleId4.id,\n styleId = _getIdAndStyleId4.styleId;\n\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleSheetRuleCb({\n id: id,\n styleId: styleId,\n replaceSync: text\n });\n }\n\n return target.apply(thisArg, argumentsList);\n })\n });\n }\n\n var supportedNestedCSSRuleTypes = {};\n\n if (canMonkeyPatchNestedCSSRule('CSSGroupingRule')) {\n supportedNestedCSSRuleTypes.CSSGroupingRule = win.CSSGroupingRule;\n } else {\n if (canMonkeyPatchNestedCSSRule('CSSMediaRule')) {\n supportedNestedCSSRuleTypes.CSSMediaRule = win.CSSMediaRule;\n }\n\n if (canMonkeyPatchNestedCSSRule('CSSConditionRule')) {\n supportedNestedCSSRuleTypes.CSSConditionRule = win.CSSConditionRule;\n }\n\n if (canMonkeyPatchNestedCSSRule('CSSSupportsRule')) {\n supportedNestedCSSRuleTypes.CSSSupportsRule = win.CSSSupportsRule;\n }\n }\n\n var unmodifiedFunctions = {};\n Object.entries(supportedNestedCSSRuleTypes).forEach(function (_ref13) {\n var _ref14 = _slicedToArray(_ref13, 2),\n typeKey = _ref14[0],\n type = _ref14[1];\n\n unmodifiedFunctions[typeKey] = {\n insertRule: type.prototype.insertRule,\n deleteRule: type.prototype.deleteRule\n };\n type.prototype.insertRule = new Proxy(unmodifiedFunctions[typeKey].insertRule, {\n apply: callbackWrapper(function (target, thisArg, argumentsList) {\n var _argumentsList5 = _slicedToArray(argumentsList, 2),\n rule = _argumentsList5[0],\n index = _argumentsList5[1];\n\n var _getIdAndStyleId5 = getIdAndStyleId(thisArg.parentStyleSheet, mirror, stylesheetManager.styleMirror),\n id = _getIdAndStyleId5.id,\n styleId = _getIdAndStyleId5.styleId;\n\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleSheetRuleCb({\n id: id,\n styleId: styleId,\n adds: [{\n rule: rule,\n index: [].concat(_toConsumableArray(getNestedCSSRulePositions(thisArg)), [index || 0])\n }]\n });\n }\n\n return target.apply(thisArg, argumentsList);\n })\n });\n type.prototype.deleteRule = new Proxy(unmodifiedFunctions[typeKey].deleteRule, {\n apply: callbackWrapper(function (target, thisArg, argumentsList) {\n var _argumentsList6 = _slicedToArray(argumentsList, 1),\n index = _argumentsList6[0];\n\n var _getIdAndStyleId6 = getIdAndStyleId(thisArg.parentStyleSheet, mirror, stylesheetManager.styleMirror),\n id = _getIdAndStyleId6.id,\n styleId = _getIdAndStyleId6.styleId;\n\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleSheetRuleCb({\n id: id,\n styleId: styleId,\n removes: [{\n index: [].concat(_toConsumableArray(getNestedCSSRulePositions(thisArg)), [index])\n }]\n });\n }\n\n return target.apply(thisArg, argumentsList);\n })\n });\n });\n return callbackWrapper(function () {\n win.CSSStyleSheet.prototype.insertRule = insertRule;\n win.CSSStyleSheet.prototype.deleteRule = deleteRule;\n replace && (win.CSSStyleSheet.prototype.replace = replace);\n replaceSync && (win.CSSStyleSheet.prototype.replaceSync = replaceSync);\n Object.entries(supportedNestedCSSRuleTypes).forEach(function (_ref15) {\n var _ref16 = _slicedToArray(_ref15, 2),\n typeKey = _ref16[0],\n type = _ref16[1];\n\n type.prototype.insertRule = unmodifiedFunctions[typeKey].insertRule;\n type.prototype.deleteRule = unmodifiedFunctions[typeKey].deleteRule;\n });\n });\n}\n\nfunction initAdoptedStyleSheetObserver(_ref17, host) {\n var mirror = _ref17.mirror,\n stylesheetManager = _ref17.stylesheetManager;\n var hostId = null;\n if (host.nodeName === '#document') hostId = mirror.getId(host);else hostId = mirror.getId(host.host);\n var patchTarget = host.nodeName === '#document' ? _optionalChain$2([host, 'access', function (_4) {\n return _4.defaultView;\n }, 'optionalAccess', function (_5) {\n return _5.Document;\n }]) : _optionalChain$2([host, 'access', function (_6) {\n return _6.ownerDocument;\n }, 'optionalAccess', function (_7) {\n return _7.defaultView;\n }, 'optionalAccess', function (_8) {\n return _8.ShadowRoot;\n }]);\n var originalPropertyDescriptor = _optionalChain$2([patchTarget, 'optionalAccess', function (_9) {\n return _9.prototype;\n }]) ? Object.getOwnPropertyDescriptor(_optionalChain$2([patchTarget, 'optionalAccess', function (_10) {\n return _10.prototype;\n }]), 'adoptedStyleSheets') : undefined;\n if (hostId === null || hostId === -1 || !patchTarget || !originalPropertyDescriptor) return function () {};\n Object.defineProperty(host, 'adoptedStyleSheets', {\n configurable: originalPropertyDescriptor.configurable,\n enumerable: originalPropertyDescriptor.enumerable,\n get: function get() {\n var _this6 = this;\n\n return _optionalChain$2([originalPropertyDescriptor, 'access', function (_11) {\n return _11.get;\n }, 'optionalAccess', function (_12) {\n return _12.call;\n }, 'call', function (_13) {\n return _13(_this6);\n }]);\n },\n set: function set(sheets) {\n var _this7 = this;\n\n var result = _optionalChain$2([originalPropertyDescriptor, 'access', function (_14) {\n return _14.set;\n }, 'optionalAccess', function (_15) {\n return _15.call;\n }, 'call', function (_16) {\n return _16(_this7, sheets);\n }]);\n\n if (hostId !== null && hostId !== -1) {\n try {\n stylesheetManager.adoptStyleSheets(sheets, hostId);\n } catch (e) {}\n }\n\n return result;\n }\n });\n return callbackWrapper(function () {\n Object.defineProperty(host, 'adoptedStyleSheets', {\n configurable: originalPropertyDescriptor.configurable,\n enumerable: originalPropertyDescriptor.enumerable,\n get: originalPropertyDescriptor.get,\n set: originalPropertyDescriptor.set\n });\n });\n}\n\nfunction initStyleDeclarationObserver(_ref18, _ref19) {\n var styleDeclarationCb = _ref18.styleDeclarationCb,\n mirror = _ref18.mirror,\n ignoreCSSAttributes = _ref18.ignoreCSSAttributes,\n stylesheetManager = _ref18.stylesheetManager;\n var win = _ref19.win;\n var setProperty = win.CSSStyleDeclaration.prototype.setProperty;\n win.CSSStyleDeclaration.prototype.setProperty = new Proxy(setProperty, {\n apply: callbackWrapper(function (target, thisArg, argumentsList) {\n var _argumentsList7 = _slicedToArray(argumentsList, 3),\n property = _argumentsList7[0],\n value = _argumentsList7[1],\n priority = _argumentsList7[2];\n\n if (ignoreCSSAttributes.has(property)) {\n return setProperty.apply(thisArg, [property, value, priority]);\n }\n\n var _getIdAndStyleId7 = getIdAndStyleId(_optionalChain$2([thisArg, 'access', function (_17) {\n return _17.parentRule;\n }, 'optionalAccess', function (_18) {\n return _18.parentStyleSheet;\n }]), mirror, stylesheetManager.styleMirror),\n id = _getIdAndStyleId7.id,\n styleId = _getIdAndStyleId7.styleId;\n\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleDeclarationCb({\n id: id,\n styleId: styleId,\n set: {\n property: property,\n value: value,\n priority: priority\n },\n index: getNestedCSSRulePositions(thisArg.parentRule)\n });\n }\n\n return target.apply(thisArg, argumentsList);\n })\n });\n var removeProperty = win.CSSStyleDeclaration.prototype.removeProperty;\n win.CSSStyleDeclaration.prototype.removeProperty = new Proxy(removeProperty, {\n apply: callbackWrapper(function (target, thisArg, argumentsList) {\n var _argumentsList8 = _slicedToArray(argumentsList, 1),\n property = _argumentsList8[0];\n\n if (ignoreCSSAttributes.has(property)) {\n return removeProperty.apply(thisArg, [property]);\n }\n\n var _getIdAndStyleId8 = getIdAndStyleId(_optionalChain$2([thisArg, 'access', function (_19) {\n return _19.parentRule;\n }, 'optionalAccess', function (_20) {\n return _20.parentStyleSheet;\n }]), mirror, stylesheetManager.styleMirror),\n id = _getIdAndStyleId8.id,\n styleId = _getIdAndStyleId8.styleId;\n\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleDeclarationCb({\n id: id,\n styleId: styleId,\n remove: {\n property: property\n },\n index: getNestedCSSRulePositions(thisArg.parentRule)\n });\n }\n\n return target.apply(thisArg, argumentsList);\n })\n });\n return callbackWrapper(function () {\n win.CSSStyleDeclaration.prototype.setProperty = setProperty;\n win.CSSStyleDeclaration.prototype.removeProperty = removeProperty;\n });\n}\n\nfunction initMediaInteractionObserver(_ref20) {\n var mediaInteractionCb = _ref20.mediaInteractionCb,\n blockClass = _ref20.blockClass,\n blockSelector = _ref20.blockSelector,\n unblockSelector = _ref20.unblockSelector,\n mirror = _ref20.mirror,\n sampling = _ref20.sampling,\n doc = _ref20.doc;\n var handler = callbackWrapper(function (type) {\n return throttle$1(callbackWrapper(function (event) {\n var target = getEventTarget(event);\n\n if (!target || isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n return;\n }\n\n var currentTime = target.currentTime,\n volume = target.volume,\n muted = target.muted,\n playbackRate = target.playbackRate;\n mediaInteractionCb({\n type: type,\n id: mirror.getId(target),\n currentTime: currentTime,\n volume: volume,\n muted: muted,\n playbackRate: playbackRate\n });\n }), sampling.media || 500);\n });\n var handlers = [on('play', handler(0), doc), on('pause', handler(1), doc), on('seeked', handler(2), doc), on('volumechange', handler(3), doc), on('ratechange', handler(4), doc)];\n return callbackWrapper(function () {\n handlers.forEach(function (h) {\n return h();\n });\n });\n}\n\nfunction initFontObserver(_ref21) {\n var fontCb = _ref21.fontCb,\n doc = _ref21.doc;\n var win = doc.defaultView;\n\n if (!win) {\n return function () {};\n }\n\n var handlers = [];\n var fontMap = new WeakMap();\n var originalFontFace = win.FontFace;\n\n win.FontFace = function FontFace(family, source, descriptors) {\n var fontFace = new originalFontFace(family, source, descriptors);\n fontMap.set(fontFace, {\n family: family,\n buffer: typeof source !== 'string',\n descriptors: descriptors,\n fontSource: typeof source === 'string' ? source : JSON.stringify(Array.from(new Uint8Array(source)))\n });\n return fontFace;\n };\n\n var restoreHandler = patch(doc.fonts, 'add', function (original) {\n return function (fontFace) {\n setTimeout$1(callbackWrapper(function () {\n var p = fontMap.get(fontFace);\n\n if (p) {\n fontCb(p);\n fontMap.delete(fontFace);\n }\n }), 0);\n return original.apply(this, [fontFace]);\n };\n });\n handlers.push(function () {\n win.FontFace = originalFontFace;\n });\n handlers.push(restoreHandler);\n return callbackWrapper(function () {\n handlers.forEach(function (h) {\n return h();\n });\n });\n}\n\nfunction initSelectionObserver(param) {\n var doc = param.doc,\n mirror = param.mirror,\n blockClass = param.blockClass,\n blockSelector = param.blockSelector,\n unblockSelector = param.unblockSelector,\n selectionCb = param.selectionCb;\n var collapsed = true;\n var updateSelection = callbackWrapper(function () {\n var selection = doc.getSelection();\n if (!selection || collapsed && _optionalChain$2([selection, 'optionalAccess', function (_21) {\n return _21.isCollapsed;\n }])) return;\n collapsed = selection.isCollapsed || false;\n var ranges = [];\n var count = selection.rangeCount || 0;\n\n for (var i = 0; i < count; i++) {\n var range = selection.getRangeAt(i);\n var startContainer = range.startContainer,\n startOffset = range.startOffset,\n endContainer = range.endContainer,\n endOffset = range.endOffset;\n var blocked = isBlocked(startContainer, blockClass, blockSelector, unblockSelector, true) || isBlocked(endContainer, blockClass, blockSelector, unblockSelector, true);\n if (blocked) continue;\n ranges.push({\n start: mirror.getId(startContainer),\n startOffset: startOffset,\n end: mirror.getId(endContainer),\n endOffset: endOffset\n });\n }\n\n selectionCb({\n ranges: ranges\n });\n });\n updateSelection();\n return on('selectionchange', updateSelection);\n}\n\nfunction initCustomElementObserver(_ref22) {\n var doc = _ref22.doc,\n customElementCb = _ref22.customElementCb;\n var win = doc.defaultView;\n if (!win || !win.customElements) return function () {};\n var restoreHandler = patch(win.customElements, 'define', function (original) {\n return function (name, constructor, options) {\n try {\n customElementCb({\n define: {\n name: name\n }\n });\n } catch (e) {}\n\n return original.apply(this, [name, constructor, options]);\n };\n });\n return restoreHandler;\n}\n\nfunction initObservers(o) {\n var _hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var currentWindow = o.doc.defaultView;\n\n if (!currentWindow) {\n return function () {};\n }\n\n var mutationObserver = initMutationObserver(o, o.doc);\n var mousemoveHandler = initMoveObserver(o);\n var mouseInteractionHandler = initMouseInteractionObserver(o);\n var scrollHandler = initScrollObserver(o);\n var viewportResizeHandler = initViewportResizeObserver(o, {\n win: currentWindow\n });\n var inputHandler = initInputObserver(o);\n var mediaInteractionHandler = initMediaInteractionObserver(o);\n var styleSheetObserver = initStyleSheetObserver(o, {\n win: currentWindow\n });\n var adoptedStyleSheetObserver = initAdoptedStyleSheetObserver(o, o.doc);\n var styleDeclarationObserver = initStyleDeclarationObserver(o, {\n win: currentWindow\n });\n var fontObserver = o.collectFonts ? initFontObserver(o) : function () {};\n var selectionObserver = initSelectionObserver(o);\n var customElementObserver = initCustomElementObserver(o);\n var pluginHandlers = [];\n\n var _iterator4 = _createForOfIteratorHelper(o.plugins),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var plugin = _step4.value;\n pluginHandlers.push(plugin.observer(plugin.callback, currentWindow, plugin.options));\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n\n return callbackWrapper(function () {\n mutationBuffers.forEach(function (b) {\n return b.reset();\n });\n mutationObserver.disconnect();\n mousemoveHandler();\n mouseInteractionHandler();\n scrollHandler();\n viewportResizeHandler();\n inputHandler();\n mediaInteractionHandler();\n styleSheetObserver();\n adoptedStyleSheetObserver();\n styleDeclarationObserver();\n fontObserver();\n selectionObserver();\n customElementObserver();\n pluginHandlers.forEach(function (h) {\n return h();\n });\n });\n}\n\nfunction hasNestedCSSRule(prop) {\n return typeof window[prop] !== 'undefined';\n}\n\nfunction canMonkeyPatchNestedCSSRule(prop) {\n return Boolean(typeof window[prop] !== 'undefined' && window[prop].prototype && 'insertRule' in window[prop].prototype && 'deleteRule' in window[prop].prototype);\n}\n\nvar CrossOriginIframeMirror = /*#__PURE__*/function () {\n function CrossOriginIframeMirror(generateIdFn) {\n _classCallCheck(this, CrossOriginIframeMirror);\n\n this.generateIdFn = generateIdFn;\n this.iframeIdToRemoteIdMap = new WeakMap();\n this.iframeRemoteIdToIdMap = new WeakMap();\n }\n\n _createClass(CrossOriginIframeMirror, [{\n key: \"getId\",\n value: function getId(iframe, remoteId, idToRemoteMap, remoteToIdMap) {\n var idToRemoteIdMap = idToRemoteMap || this.getIdToRemoteIdMap(iframe);\n var remoteIdToIdMap = remoteToIdMap || this.getRemoteIdToIdMap(iframe);\n var id = idToRemoteIdMap.get(remoteId);\n\n if (!id) {\n id = this.generateIdFn();\n idToRemoteIdMap.set(remoteId, id);\n remoteIdToIdMap.set(id, remoteId);\n }\n\n return id;\n }\n }, {\n key: \"getIds\",\n value: function getIds(iframe, remoteId) {\n var _this8 = this;\n\n var idToRemoteIdMap = this.getIdToRemoteIdMap(iframe);\n var remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\n return remoteId.map(function (id) {\n return _this8.getId(iframe, id, idToRemoteIdMap, remoteIdToIdMap);\n });\n }\n }, {\n key: \"getRemoteId\",\n value: function getRemoteId(iframe, id, map) {\n var remoteIdToIdMap = map || this.getRemoteIdToIdMap(iframe);\n if (typeof id !== 'number') return id;\n var remoteId = remoteIdToIdMap.get(id);\n if (!remoteId) return -1;\n return remoteId;\n }\n }, {\n key: \"getRemoteIds\",\n value: function getRemoteIds(iframe, ids) {\n var _this9 = this;\n\n var remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\n return ids.map(function (id) {\n return _this9.getRemoteId(iframe, id, remoteIdToIdMap);\n });\n }\n }, {\n key: \"reset\",\n value: function reset(iframe) {\n if (!iframe) {\n this.iframeIdToRemoteIdMap = new WeakMap();\n this.iframeRemoteIdToIdMap = new WeakMap();\n return;\n }\n\n this.iframeIdToRemoteIdMap.delete(iframe);\n this.iframeRemoteIdToIdMap.delete(iframe);\n }\n }, {\n key: \"getIdToRemoteIdMap\",\n value: function getIdToRemoteIdMap(iframe) {\n var idToRemoteIdMap = this.iframeIdToRemoteIdMap.get(iframe);\n\n if (!idToRemoteIdMap) {\n idToRemoteIdMap = new Map();\n this.iframeIdToRemoteIdMap.set(iframe, idToRemoteIdMap);\n }\n\n return idToRemoteIdMap;\n }\n }, {\n key: \"getRemoteIdToIdMap\",\n value: function getRemoteIdToIdMap(iframe) {\n var remoteIdToIdMap = this.iframeRemoteIdToIdMap.get(iframe);\n\n if (!remoteIdToIdMap) {\n remoteIdToIdMap = new Map();\n this.iframeRemoteIdToIdMap.set(iframe, remoteIdToIdMap);\n }\n\n return remoteIdToIdMap;\n }\n }]);\n\n return CrossOriginIframeMirror;\n}();\n\nfunction _optionalChain$1(ops) {\n var lastAccessLHS = undefined;\n var value = ops[0];\n var i = 1;\n\n while (i < ops.length) {\n var op = ops[i];\n var fn = ops[i + 1];\n i += 2;\n\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n return undefined;\n }\n\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn(function () {\n var _value7;\n\n for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n args[_key7] = arguments[_key7];\n }\n\n return (_value7 = value).call.apply(_value7, [lastAccessLHS].concat(args));\n });\n lastAccessLHS = undefined;\n }\n }\n\n return value;\n}\n\nvar IframeManagerNoop = /*#__PURE__*/function () {\n function IframeManagerNoop() {\n _classCallCheck(this, IframeManagerNoop);\n\n this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n this.crossOriginIframeRootIdMap = new WeakMap();\n }\n\n _createClass(IframeManagerNoop, [{\n key: \"addIframe\",\n value: function addIframe() {}\n }, {\n key: \"addLoadListener\",\n value: function addLoadListener() {}\n }, {\n key: \"attachIframe\",\n value: function attachIframe() {}\n }]);\n\n return IframeManagerNoop;\n}();\n\nvar IframeManager = /*#__PURE__*/function () {\n function IframeManager(options) {\n _classCallCheck(this, IframeManager);\n\n this.iframes = new WeakMap();\n this.crossOriginIframeMap = new WeakMap();\n this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n this.crossOriginIframeRootIdMap = new WeakMap();\n this.mutationCb = options.mutationCb;\n this.wrappedEmit = options.wrappedEmit;\n this.stylesheetManager = options.stylesheetManager;\n this.recordCrossOriginIframes = options.recordCrossOriginIframes;\n this.crossOriginIframeStyleMirror = new CrossOriginIframeMirror(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror));\n this.mirror = options.mirror;\n\n if (this.recordCrossOriginIframes) {\n window.addEventListener('message', this.handleMessage.bind(this));\n }\n }\n\n _createClass(IframeManager, [{\n key: \"addIframe\",\n value: function addIframe(iframeEl) {\n this.iframes.set(iframeEl, true);\n if (iframeEl.contentWindow) this.crossOriginIframeMap.set(iframeEl.contentWindow, iframeEl);\n }\n }, {\n key: \"addLoadListener\",\n value: function addLoadListener(cb) {\n this.loadListener = cb;\n }\n }, {\n key: \"attachIframe\",\n value: function attachIframe(iframeEl, childSn) {\n this.mutationCb({\n adds: [{\n parentId: this.mirror.getId(iframeEl),\n nextId: null,\n node: childSn\n }],\n removes: [],\n texts: [],\n attributes: [],\n isAttachIframe: true\n });\n\n _optionalChain$1([this, 'access', function (_) {\n return _.loadListener;\n }, 'optionalCall', function (_2) {\n return _2(iframeEl);\n }]);\n\n if (iframeEl.contentDocument && iframeEl.contentDocument.adoptedStyleSheets && iframeEl.contentDocument.adoptedStyleSheets.length > 0) this.stylesheetManager.adoptStyleSheets(iframeEl.contentDocument.adoptedStyleSheets, this.mirror.getId(iframeEl.contentDocument));\n }\n }, {\n key: \"handleMessage\",\n value: function handleMessage(message) {\n var crossOriginMessageEvent = message;\n if (crossOriginMessageEvent.data.type !== 'rrweb' || crossOriginMessageEvent.origin !== crossOriginMessageEvent.data.origin) return;\n var iframeSourceWindow = message.source;\n if (!iframeSourceWindow) return;\n var iframeEl = this.crossOriginIframeMap.get(message.source);\n if (!iframeEl) return;\n var transformedEvent = this.transformCrossOriginEvent(iframeEl, crossOriginMessageEvent.data.event);\n if (transformedEvent) this.wrappedEmit(transformedEvent, crossOriginMessageEvent.data.isCheckout);\n }\n }, {\n key: \"transformCrossOriginEvent\",\n value: function transformCrossOriginEvent(iframeEl, e) {\n var _this10 = this;\n\n switch (e.type) {\n case EventType.FullSnapshot:\n {\n this.crossOriginIframeMirror.reset(iframeEl);\n this.crossOriginIframeStyleMirror.reset(iframeEl);\n this.replaceIdOnNode(e.data.node, iframeEl);\n var rootId = e.data.node.id;\n this.crossOriginIframeRootIdMap.set(iframeEl, rootId);\n this.patchRootIdOnNode(e.data.node, rootId);\n return {\n timestamp: e.timestamp,\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Mutation,\n adds: [{\n parentId: this.mirror.getId(iframeEl),\n nextId: null,\n node: e.data.node\n }],\n removes: [],\n texts: [],\n attributes: [],\n isAttachIframe: true\n }\n };\n }\n\n case EventType.Meta:\n case EventType.Load:\n case EventType.DomContentLoaded:\n {\n return false;\n }\n\n case EventType.Plugin:\n {\n return e;\n }\n\n case EventType.Custom:\n {\n this.replaceIds(e.data.payload, iframeEl, ['id', 'parentId', 'previousId', 'nextId']);\n return e;\n }\n\n case EventType.IncrementalSnapshot:\n {\n switch (e.data.source) {\n case IncrementalSource.Mutation:\n {\n e.data.adds.forEach(function (n) {\n _this10.replaceIds(n, iframeEl, ['parentId', 'nextId', 'previousId']);\n\n _this10.replaceIdOnNode(n.node, iframeEl);\n\n var rootId = _this10.crossOriginIframeRootIdMap.get(iframeEl);\n\n rootId && _this10.patchRootIdOnNode(n.node, rootId);\n });\n e.data.removes.forEach(function (n) {\n _this10.replaceIds(n, iframeEl, ['parentId', 'id']);\n });\n e.data.attributes.forEach(function (n) {\n _this10.replaceIds(n, iframeEl, ['id']);\n });\n e.data.texts.forEach(function (n) {\n _this10.replaceIds(n, iframeEl, ['id']);\n });\n return e;\n }\n\n case IncrementalSource.Drag:\n case IncrementalSource.TouchMove:\n case IncrementalSource.MouseMove:\n {\n e.data.positions.forEach(function (p) {\n _this10.replaceIds(p, iframeEl, ['id']);\n });\n return e;\n }\n\n case IncrementalSource.ViewportResize:\n {\n return false;\n }\n\n case IncrementalSource.MediaInteraction:\n case IncrementalSource.MouseInteraction:\n case IncrementalSource.Scroll:\n case IncrementalSource.CanvasMutation:\n case IncrementalSource.Input:\n {\n this.replaceIds(e.data, iframeEl, ['id']);\n return e;\n }\n\n case IncrementalSource.StyleSheetRule:\n case IncrementalSource.StyleDeclaration:\n {\n this.replaceIds(e.data, iframeEl, ['id']);\n this.replaceStyleIds(e.data, iframeEl, ['styleId']);\n return e;\n }\n\n case IncrementalSource.Font:\n {\n return e;\n }\n\n case IncrementalSource.Selection:\n {\n e.data.ranges.forEach(function (range) {\n _this10.replaceIds(range, iframeEl, ['start', 'end']);\n });\n return e;\n }\n\n case IncrementalSource.AdoptedStyleSheet:\n {\n this.replaceIds(e.data, iframeEl, ['id']);\n this.replaceStyleIds(e.data, iframeEl, ['styleIds']);\n\n _optionalChain$1([e, 'access', function (_3) {\n return _3.data;\n }, 'access', function (_4) {\n return _4.styles;\n }, 'optionalAccess', function (_5) {\n return _5.forEach;\n }, 'call', function (_6) {\n return _6(function (style) {\n _this10.replaceStyleIds(style, iframeEl, ['styleId']);\n });\n }]);\n\n return e;\n }\n }\n }\n }\n\n return false;\n }\n }, {\n key: \"replace\",\n value: function replace(iframeMirror, obj, iframeEl, keys) {\n var _iterator5 = _createForOfIteratorHelper(keys),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var key = _step5.value;\n if (!Array.isArray(obj[key]) && typeof obj[key] !== 'number') continue;\n\n if (Array.isArray(obj[key])) {\n obj[key] = iframeMirror.getIds(iframeEl, obj[key]);\n } else {\n obj[key] = iframeMirror.getId(iframeEl, obj[key]);\n }\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n\n return obj;\n }\n }, {\n key: \"replaceIds\",\n value: function replaceIds(obj, iframeEl, keys) {\n return this.replace(this.crossOriginIframeMirror, obj, iframeEl, keys);\n }\n }, {\n key: \"replaceStyleIds\",\n value: function replaceStyleIds(obj, iframeEl, keys) {\n return this.replace(this.crossOriginIframeStyleMirror, obj, iframeEl, keys);\n }\n }, {\n key: \"replaceIdOnNode\",\n value: function replaceIdOnNode(node, iframeEl) {\n var _this11 = this;\n\n this.replaceIds(node, iframeEl, ['id', 'rootId']);\n\n if ('childNodes' in node) {\n node.childNodes.forEach(function (child) {\n _this11.replaceIdOnNode(child, iframeEl);\n });\n }\n }\n }, {\n key: \"patchRootIdOnNode\",\n value: function patchRootIdOnNode(node, rootId) {\n var _this12 = this;\n\n if (node.type !== NodeType$1.Document && !node.rootId) node.rootId = rootId;\n\n if ('childNodes' in node) {\n node.childNodes.forEach(function (child) {\n _this12.patchRootIdOnNode(child, rootId);\n });\n }\n }\n }]);\n\n return IframeManager;\n}();\n\nvar ShadowDomManagerNoop = /*#__PURE__*/function () {\n function ShadowDomManagerNoop() {\n _classCallCheck(this, ShadowDomManagerNoop);\n }\n\n _createClass(ShadowDomManagerNoop, [{\n key: \"init\",\n value: function init() {}\n }, {\n key: \"addShadowRoot\",\n value: function addShadowRoot() {}\n }, {\n key: \"observeAttachShadow\",\n value: function observeAttachShadow() {}\n }, {\n key: \"reset\",\n value: function reset() {}\n }]);\n\n return ShadowDomManagerNoop;\n}();\n\nvar ShadowDomManager = /*#__PURE__*/function () {\n function ShadowDomManager(options) {\n _classCallCheck(this, ShadowDomManager);\n\n this.shadowDoms = new WeakSet();\n this.restoreHandlers = [];\n this.mutationCb = options.mutationCb;\n this.scrollCb = options.scrollCb;\n this.bypassOptions = options.bypassOptions;\n this.mirror = options.mirror;\n this.init();\n }\n\n _createClass(ShadowDomManager, [{\n key: \"init\",\n value: function init() {\n this.reset();\n this.patchAttachShadow(Element, document);\n }\n }, {\n key: \"addShadowRoot\",\n value: function addShadowRoot(shadowRoot, doc) {\n var _this13 = this;\n\n if (!isNativeShadowDom(shadowRoot)) return;\n if (this.shadowDoms.has(shadowRoot)) return;\n this.shadowDoms.add(shadowRoot);\n var observer = initMutationObserver(_objectSpread(_objectSpread({}, this.bypassOptions), {}, {\n doc: doc,\n mutationCb: this.mutationCb,\n mirror: this.mirror,\n shadowDomManager: this\n }), shadowRoot);\n this.restoreHandlers.push(function () {\n return observer.disconnect();\n });\n this.restoreHandlers.push(initScrollObserver(_objectSpread(_objectSpread({}, this.bypassOptions), {}, {\n scrollCb: this.scrollCb,\n doc: shadowRoot,\n mirror: this.mirror\n })));\n setTimeout$1(function () {\n if (shadowRoot.adoptedStyleSheets && shadowRoot.adoptedStyleSheets.length > 0) _this13.bypassOptions.stylesheetManager.adoptStyleSheets(shadowRoot.adoptedStyleSheets, _this13.mirror.getId(shadowRoot.host));\n\n _this13.restoreHandlers.push(initAdoptedStyleSheetObserver({\n mirror: _this13.mirror,\n stylesheetManager: _this13.bypassOptions.stylesheetManager\n }, shadowRoot));\n }, 0);\n }\n }, {\n key: \"observeAttachShadow\",\n value: function observeAttachShadow(iframeElement) {\n if (!iframeElement.contentWindow || !iframeElement.contentDocument) return;\n this.patchAttachShadow(iframeElement.contentWindow.Element, iframeElement.contentDocument);\n }\n }, {\n key: \"patchAttachShadow\",\n value: function patchAttachShadow(element, doc) {\n var manager = this;\n this.restoreHandlers.push(patch(element.prototype, 'attachShadow', function (original) {\n return function (option) {\n var shadowRoot = original.call(this, option);\n if (this.shadowRoot && inDom(this)) manager.addShadowRoot(this.shadowRoot, doc);\n return shadowRoot;\n };\n }));\n }\n }, {\n key: \"reset\",\n value: function reset() {\n this.restoreHandlers.forEach(function (handler) {\n try {\n handler();\n } catch (e) {}\n });\n this.restoreHandlers = [];\n this.shadowDoms = new WeakSet();\n }\n }]);\n\n return ShadowDomManager;\n}();\n\nvar CanvasManagerNoop = /*#__PURE__*/function () {\n function CanvasManagerNoop() {\n _classCallCheck(this, CanvasManagerNoop);\n }\n\n _createClass(CanvasManagerNoop, [{\n key: \"reset\",\n value: function reset() {}\n }, {\n key: \"freeze\",\n value: function freeze() {}\n }, {\n key: \"unfreeze\",\n value: function unfreeze() {}\n }, {\n key: \"lock\",\n value: function lock() {}\n }, {\n key: \"unlock\",\n value: function unlock() {}\n }, {\n key: \"snapshot\",\n value: function snapshot() {}\n }]);\n\n return CanvasManagerNoop;\n}();\n\nvar StylesheetManager = /*#__PURE__*/function () {\n function StylesheetManager(options) {\n _classCallCheck(this, StylesheetManager);\n\n this.trackedLinkElements = new WeakSet();\n this.styleMirror = new StyleSheetMirror();\n this.mutationCb = options.mutationCb;\n this.adoptedStyleSheetCb = options.adoptedStyleSheetCb;\n }\n\n _createClass(StylesheetManager, [{\n key: \"attachLinkElement\",\n value: function attachLinkElement(linkEl, childSn) {\n if ('_cssText' in childSn.attributes) this.mutationCb({\n adds: [],\n removes: [],\n texts: [],\n attributes: [{\n id: childSn.id,\n attributes: childSn.attributes\n }]\n });\n this.trackLinkElement(linkEl);\n }\n }, {\n key: \"trackLinkElement\",\n value: function trackLinkElement(linkEl) {\n if (this.trackedLinkElements.has(linkEl)) return;\n this.trackedLinkElements.add(linkEl);\n this.trackStylesheetInLinkElement(linkEl);\n }\n }, {\n key: \"adoptStyleSheets\",\n value: function adoptStyleSheets(sheets, hostId) {\n if (sheets.length === 0) return;\n var adoptedStyleSheetData = {\n id: hostId,\n styleIds: []\n };\n var styles = [];\n\n var _iterator6 = _createForOfIteratorHelper(sheets),\n _step6;\n\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n var sheet = _step6.value;\n var styleId = void 0;\n\n if (!this.styleMirror.has(sheet)) {\n styleId = this.styleMirror.add(sheet);\n styles.push({\n styleId: styleId,\n rules: Array.from(sheet.rules || CSSRule, function (r, index) {\n return {\n rule: stringifyRule(r),\n index: index\n };\n })\n });\n } else styleId = this.styleMirror.getId(sheet);\n\n adoptedStyleSheetData.styleIds.push(styleId);\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n\n if (styles.length > 0) adoptedStyleSheetData.styles = styles;\n this.adoptedStyleSheetCb(adoptedStyleSheetData);\n }\n }, {\n key: \"reset\",\n value: function reset() {\n this.styleMirror.reset();\n this.trackedLinkElements = new WeakSet();\n }\n }, {\n key: \"trackStylesheetInLinkElement\",\n value: function trackStylesheetInLinkElement(linkEl) {}\n }]);\n\n return StylesheetManager;\n}();\n\nvar ProcessedNodeManager = /*#__PURE__*/function () {\n function ProcessedNodeManager() {\n _classCallCheck(this, ProcessedNodeManager);\n\n this.nodeMap = new WeakMap();\n this.loop = true;\n this.periodicallyClear();\n }\n\n _createClass(ProcessedNodeManager, [{\n key: \"periodicallyClear\",\n value: function periodicallyClear() {\n var _this14 = this;\n\n onRequestAnimationFrame(function () {\n _this14.clear();\n\n if (_this14.loop) _this14.periodicallyClear();\n });\n }\n }, {\n key: \"inOtherBuffer\",\n value: function inOtherBuffer(node, thisBuffer) {\n var buffers = this.nodeMap.get(node);\n return buffers && Array.from(buffers).some(function (buffer) {\n return buffer !== thisBuffer;\n });\n }\n }, {\n key: \"add\",\n value: function add(node, buffer) {\n this.nodeMap.set(node, (this.nodeMap.get(node) || new Set()).add(buffer));\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.nodeMap = new WeakMap();\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.loop = false;\n }\n }]);\n\n return ProcessedNodeManager;\n}();\n\nvar wrappedEmit;\n\nvar _takeFullSnapshot;\n\nvar mirror = createMirror();\n\nfunction record() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var emit = options.emit,\n checkoutEveryNms = options.checkoutEveryNms,\n checkoutEveryNth = options.checkoutEveryNth,\n _options$blockClass = options.blockClass,\n blockClass = _options$blockClass === void 0 ? 'rr-block' : _options$blockClass,\n _options$blockSelecto = options.blockSelector,\n blockSelector = _options$blockSelecto === void 0 ? null : _options$blockSelecto,\n _options$unblockSelec = options.unblockSelector,\n unblockSelector = _options$unblockSelec === void 0 ? null : _options$unblockSelec,\n _options$ignoreClass = options.ignoreClass,\n ignoreClass = _options$ignoreClass === void 0 ? 'rr-ignore' : _options$ignoreClass,\n _options$ignoreSelect = options.ignoreSelector,\n ignoreSelector = _options$ignoreSelect === void 0 ? null : _options$ignoreSelect,\n _options$maskAllText = options.maskAllText,\n maskAllText = _options$maskAllText === void 0 ? false : _options$maskAllText,\n _options$maskTextClas = options.maskTextClass,\n maskTextClass = _options$maskTextClas === void 0 ? 'rr-mask' : _options$maskTextClas,\n _options$unmaskTextCl = options.unmaskTextClass,\n unmaskTextClass = _options$unmaskTextCl === void 0 ? null : _options$unmaskTextCl,\n _options$maskTextSele = options.maskTextSelector,\n maskTextSelector = _options$maskTextSele === void 0 ? null : _options$maskTextSele,\n _options$unmaskTextSe = options.unmaskTextSelector,\n unmaskTextSelector = _options$unmaskTextSe === void 0 ? null : _options$unmaskTextSe,\n _options$inlineStyles2 = options.inlineStylesheet,\n inlineStylesheet = _options$inlineStyles2 === void 0 ? true : _options$inlineStyles2,\n maskAllInputs = options.maskAllInputs,\n _maskInputOptions = options.maskInputOptions,\n _slimDOMOptions = options.slimDOMOptions,\n maskAttributeFn = options.maskAttributeFn,\n maskInputFn = options.maskInputFn,\n maskTextFn = options.maskTextFn,\n _options$maxCanvasSiz = options.maxCanvasSize,\n maxCanvasSize = _options$maxCanvasSiz === void 0 ? null : _options$maxCanvasSiz,\n packFn = options.packFn,\n _options$sampling = options.sampling,\n sampling = _options$sampling === void 0 ? {} : _options$sampling,\n _options$dataURLOptio4 = options.dataURLOptions,\n dataURLOptions = _options$dataURLOptio4 === void 0 ? {} : _options$dataURLOptio4,\n mousemoveWait = options.mousemoveWait,\n _options$recordCanvas2 = options.recordCanvas,\n recordCanvas = _options$recordCanvas2 === void 0 ? false : _options$recordCanvas2,\n _options$recordCrossO = options.recordCrossOriginIframes,\n recordCrossOriginIframes = _options$recordCrossO === void 0 ? false : _options$recordCrossO,\n _options$recordAfter = options.recordAfter,\n recordAfter = _options$recordAfter === void 0 ? options.recordAfter === 'DOMContentLoaded' ? options.recordAfter : 'load' : _options$recordAfter,\n _options$userTriggere = options.userTriggeredOnInput,\n userTriggeredOnInput = _options$userTriggere === void 0 ? false : _options$userTriggere,\n _options$collectFonts = options.collectFonts,\n collectFonts = _options$collectFonts === void 0 ? false : _options$collectFonts,\n _options$inlineImages2 = options.inlineImages,\n inlineImages = _options$inlineImages2 === void 0 ? false : _options$inlineImages2,\n plugins = options.plugins,\n _options$keepIframeSr2 = options.keepIframeSrcFn,\n keepIframeSrcFn = _options$keepIframeSr2 === void 0 ? function () {\n return false;\n } : _options$keepIframeSr2,\n _options$ignoreCSSAtt = options.ignoreCSSAttributes,\n ignoreCSSAttributes = _options$ignoreCSSAtt === void 0 ? new Set([]) : _options$ignoreCSSAtt,\n errorHandler = options.errorHandler,\n onMutation = options.onMutation,\n getCanvasManager = options.getCanvasManager;\n registerErrorHandler(errorHandler);\n var inEmittingFrame = recordCrossOriginIframes ? window.parent === window : true;\n var passEmitsToParent = false;\n\n if (!inEmittingFrame) {\n try {\n if (window.parent.document) {\n passEmitsToParent = false;\n }\n } catch (e) {\n passEmitsToParent = true;\n }\n }\n\n if (inEmittingFrame && !emit) {\n throw new Error('emit function is required');\n }\n\n if (mousemoveWait !== undefined && sampling.mousemove === undefined) {\n sampling.mousemove = mousemoveWait;\n }\n\n mirror.reset();\n var maskInputOptions = maskAllInputs === true ? {\n color: true,\n date: true,\n 'datetime-local': true,\n email: true,\n month: true,\n number: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true,\n textarea: true,\n select: true,\n radio: true,\n checkbox: true\n } : _maskInputOptions !== undefined ? _maskInputOptions : {};\n var slimDOMOptions = _slimDOMOptions === true || _slimDOMOptions === 'all' ? {\n script: true,\n comment: true,\n headFavicon: true,\n headWhitespace: true,\n headMetaSocial: true,\n headMetaRobots: true,\n headMetaHttpEquiv: true,\n headMetaVerification: true,\n headMetaAuthorship: _slimDOMOptions === 'all',\n headMetaDescKeywords: _slimDOMOptions === 'all'\n } : _slimDOMOptions ? _slimDOMOptions : {};\n polyfill();\n var lastFullSnapshotEvent;\n var incrementalSnapshotCount = 0;\n\n var eventProcessor = function eventProcessor(e) {\n var _iterator7 = _createForOfIteratorHelper(plugins || []),\n _step7;\n\n try {\n for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n var plugin = _step7.value;\n\n if (plugin.eventProcessor) {\n e = plugin.eventProcessor(e);\n }\n }\n } catch (err) {\n _iterator7.e(err);\n } finally {\n _iterator7.f();\n }\n\n if (packFn && !passEmitsToParent) {\n e = packFn(e);\n }\n\n return e;\n };\n\n wrappedEmit = function wrappedEmit(r, isCheckout) {\n var e = r;\n e.timestamp = nowTimestamp();\n\n if (_optionalChain([mutationBuffers, 'access', function (_) {\n return _[0];\n }, 'optionalAccess', function (_2) {\n return _2.isFrozen;\n }, 'call', function (_3) {\n return _3();\n }]) && e.type !== EventType.FullSnapshot && !(e.type === EventType.IncrementalSnapshot && e.data.source === IncrementalSource.Mutation)) {\n mutationBuffers.forEach(function (buf) {\n return buf.unfreeze();\n });\n }\n\n if (inEmittingFrame) {\n _optionalChain([emit, 'optionalCall', function (_4) {\n return _4(eventProcessor(e), isCheckout);\n }]);\n } else if (passEmitsToParent) {\n var message = {\n type: 'rrweb',\n event: eventProcessor(e),\n origin: window.location.origin,\n isCheckout: isCheckout\n };\n window.parent.postMessage(message, '*');\n }\n\n if (e.type === EventType.FullSnapshot) {\n lastFullSnapshotEvent = e;\n incrementalSnapshotCount = 0;\n } else if (e.type === EventType.IncrementalSnapshot) {\n if (e.data.source === IncrementalSource.Mutation && e.data.isAttachIframe) {\n return;\n }\n\n incrementalSnapshotCount++;\n var exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;\n var exceedTime = checkoutEveryNms && lastFullSnapshotEvent && e.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;\n\n if (exceedCount || exceedTime) {\n takeFullSnapshot(true);\n }\n }\n };\n\n var wrappedMutationEmit = function wrappedMutationEmit(m) {\n wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: _objectSpread({\n source: IncrementalSource.Mutation\n }, m)\n });\n };\n\n var wrappedScrollEmit = function wrappedScrollEmit(p) {\n return wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: _objectSpread({\n source: IncrementalSource.Scroll\n }, p)\n });\n };\n\n var wrappedCanvasMutationEmit = function wrappedCanvasMutationEmit(p) {\n return wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: _objectSpread({\n source: IncrementalSource.CanvasMutation\n }, p)\n });\n };\n\n var wrappedAdoptedStyleSheetEmit = function wrappedAdoptedStyleSheetEmit(a) {\n return wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: _objectSpread({\n source: IncrementalSource.AdoptedStyleSheet\n }, a)\n });\n };\n\n var stylesheetManager = new StylesheetManager({\n mutationCb: wrappedMutationEmit,\n adoptedStyleSheetCb: wrappedAdoptedStyleSheetEmit\n });\n var iframeManager = typeof __RRWEB_EXCLUDE_IFRAME__ === 'boolean' && __RRWEB_EXCLUDE_IFRAME__ ? new IframeManagerNoop() : new IframeManager({\n mirror: mirror,\n mutationCb: wrappedMutationEmit,\n stylesheetManager: stylesheetManager,\n recordCrossOriginIframes: recordCrossOriginIframes,\n wrappedEmit: wrappedEmit\n });\n\n var _iterator8 = _createForOfIteratorHelper(plugins || []),\n _step8;\n\n try {\n for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {\n var plugin = _step8.value;\n if (plugin.getMirror) plugin.getMirror({\n nodeMirror: mirror,\n crossOriginIframeMirror: iframeManager.crossOriginIframeMirror,\n crossOriginIframeStyleMirror: iframeManager.crossOriginIframeStyleMirror\n });\n }\n } catch (err) {\n _iterator8.e(err);\n } finally {\n _iterator8.f();\n }\n\n var processedNodeManager = new ProcessedNodeManager();\n\n var canvasManager = _getCanvasManager(getCanvasManager, {\n mirror: mirror,\n win: window,\n mutationCb: function mutationCb(p) {\n return wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: _objectSpread({\n source: IncrementalSource.CanvasMutation\n }, p)\n });\n },\n recordCanvas: recordCanvas,\n blockClass: blockClass,\n blockSelector: blockSelector,\n unblockSelector: unblockSelector,\n maxCanvasSize: maxCanvasSize,\n sampling: sampling['canvas'],\n dataURLOptions: dataURLOptions,\n errorHandler: errorHandler\n });\n\n var shadowDomManager = typeof __RRWEB_EXCLUDE_SHADOW_DOM__ === 'boolean' && __RRWEB_EXCLUDE_SHADOW_DOM__ ? new ShadowDomManagerNoop() : new ShadowDomManager({\n mutationCb: wrappedMutationEmit,\n scrollCb: wrappedScrollEmit,\n bypassOptions: {\n onMutation: onMutation,\n blockClass: blockClass,\n blockSelector: blockSelector,\n unblockSelector: unblockSelector,\n maskAllText: maskAllText,\n maskTextClass: maskTextClass,\n unmaskTextClass: unmaskTextClass,\n maskTextSelector: maskTextSelector,\n unmaskTextSelector: unmaskTextSelector,\n inlineStylesheet: inlineStylesheet,\n maskInputOptions: maskInputOptions,\n dataURLOptions: dataURLOptions,\n maskAttributeFn: maskAttributeFn,\n maskTextFn: maskTextFn,\n maskInputFn: maskInputFn,\n recordCanvas: recordCanvas,\n inlineImages: inlineImages,\n sampling: sampling,\n slimDOMOptions: slimDOMOptions,\n iframeManager: iframeManager,\n stylesheetManager: stylesheetManager,\n canvasManager: canvasManager,\n keepIframeSrcFn: keepIframeSrcFn,\n processedNodeManager: processedNodeManager\n },\n mirror: mirror\n });\n\n var takeFullSnapshot = function takeFullSnapshot() {\n var isCheckout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n wrappedEmit({\n type: EventType.Meta,\n data: {\n href: window.location.href,\n width: getWindowWidth(),\n height: getWindowHeight()\n }\n }, isCheckout);\n stylesheetManager.reset();\n shadowDomManager.init();\n mutationBuffers.forEach(function (buf) {\n return buf.lock();\n });\n var node = snapshot(document, {\n mirror: mirror,\n blockClass: blockClass,\n blockSelector: blockSelector,\n unblockSelector: unblockSelector,\n maskAllText: maskAllText,\n maskTextClass: maskTextClass,\n unmaskTextClass: unmaskTextClass,\n maskTextSelector: maskTextSelector,\n unmaskTextSelector: unmaskTextSelector,\n inlineStylesheet: inlineStylesheet,\n maskAllInputs: maskInputOptions,\n maskAttributeFn: maskAttributeFn,\n maskInputFn: maskInputFn,\n maskTextFn: maskTextFn,\n slimDOM: slimDOMOptions,\n dataURLOptions: dataURLOptions,\n recordCanvas: recordCanvas,\n inlineImages: inlineImages,\n onSerialize: function onSerialize(n) {\n if (isSerializedIframe(n, mirror)) {\n iframeManager.addIframe(n);\n }\n\n if (isSerializedStylesheet(n, mirror)) {\n stylesheetManager.trackLinkElement(n);\n }\n\n if (hasShadowRoot(n)) {\n shadowDomManager.addShadowRoot(n.shadowRoot, document);\n }\n },\n onIframeLoad: function onIframeLoad(iframe, childSn) {\n iframeManager.attachIframe(iframe, childSn);\n shadowDomManager.observeAttachShadow(iframe);\n },\n onStylesheetLoad: function onStylesheetLoad(linkEl, childSn) {\n stylesheetManager.attachLinkElement(linkEl, childSn);\n },\n keepIframeSrcFn: keepIframeSrcFn\n });\n\n if (!node) {\n return console.warn('Failed to snapshot the document');\n }\n\n wrappedEmit({\n type: EventType.FullSnapshot,\n data: {\n node: node,\n initialOffset: getWindowScroll(window)\n }\n });\n mutationBuffers.forEach(function (buf) {\n return buf.unlock();\n });\n if (document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0) stylesheetManager.adoptStyleSheets(document.adoptedStyleSheets, mirror.getId(document));\n };\n\n _takeFullSnapshot = takeFullSnapshot;\n\n try {\n var _handlers = [];\n\n var observe = function observe(doc) {\n return callbackWrapper(initObservers)({\n onMutation: onMutation,\n mutationCb: wrappedMutationEmit,\n mousemoveCb: function mousemoveCb(positions, source) {\n return wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: source,\n positions: positions\n }\n });\n },\n mouseInteractionCb: function mouseInteractionCb(d) {\n return wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: _objectSpread({\n source: IncrementalSource.MouseInteraction\n }, d)\n });\n },\n scrollCb: wrappedScrollEmit,\n viewportResizeCb: function viewportResizeCb(d) {\n return wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: _objectSpread({\n source: IncrementalSource.ViewportResize\n }, d)\n });\n },\n inputCb: function inputCb(v) {\n return wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: _objectSpread({\n source: IncrementalSource.Input\n }, v)\n });\n },\n mediaInteractionCb: function mediaInteractionCb(p) {\n return wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: _objectSpread({\n source: IncrementalSource.MediaInteraction\n }, p)\n });\n },\n styleSheetRuleCb: function styleSheetRuleCb(r) {\n return wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: _objectSpread({\n source: IncrementalSource.StyleSheetRule\n }, r)\n });\n },\n styleDeclarationCb: function styleDeclarationCb(r) {\n return wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: _objectSpread({\n source: IncrementalSource.StyleDeclaration\n }, r)\n });\n },\n canvasMutationCb: wrappedCanvasMutationEmit,\n fontCb: function fontCb(p) {\n return wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: _objectSpread({\n source: IncrementalSource.Font\n }, p)\n });\n },\n selectionCb: function selectionCb(p) {\n wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: _objectSpread({\n source: IncrementalSource.Selection\n }, p)\n });\n },\n customElementCb: function customElementCb(c) {\n wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: _objectSpread({\n source: IncrementalSource.CustomElement\n }, c)\n });\n },\n blockClass: blockClass,\n ignoreClass: ignoreClass,\n ignoreSelector: ignoreSelector,\n maskAllText: maskAllText,\n maskTextClass: maskTextClass,\n unmaskTextClass: unmaskTextClass,\n maskTextSelector: maskTextSelector,\n unmaskTextSelector: unmaskTextSelector,\n maskInputOptions: maskInputOptions,\n inlineStylesheet: inlineStylesheet,\n sampling: sampling,\n recordCanvas: recordCanvas,\n inlineImages: inlineImages,\n userTriggeredOnInput: userTriggeredOnInput,\n collectFonts: collectFonts,\n doc: doc,\n maskAttributeFn: maskAttributeFn,\n maskInputFn: maskInputFn,\n maskTextFn: maskTextFn,\n keepIframeSrcFn: keepIframeSrcFn,\n blockSelector: blockSelector,\n unblockSelector: unblockSelector,\n slimDOMOptions: slimDOMOptions,\n dataURLOptions: dataURLOptions,\n mirror: mirror,\n iframeManager: iframeManager,\n stylesheetManager: stylesheetManager,\n shadowDomManager: shadowDomManager,\n processedNodeManager: processedNodeManager,\n canvasManager: canvasManager,\n ignoreCSSAttributes: ignoreCSSAttributes,\n plugins: _optionalChain([plugins, 'optionalAccess', function (_5) {\n return _5.filter;\n }, 'call', function (_6) {\n return _6(function (p) {\n return p.observer;\n });\n }, 'optionalAccess', function (_7) {\n return _7.map;\n }, 'call', function (_8) {\n return _8(function (p) {\n return {\n observer: p.observer,\n options: p.options,\n callback: function callback(payload) {\n return wrappedEmit({\n type: EventType.Plugin,\n data: {\n plugin: p.name,\n payload: payload\n }\n });\n }\n };\n });\n }]) || []\n }, {});\n };\n\n iframeManager.addLoadListener(function (iframeEl) {\n try {\n _handlers.push(observe(iframeEl.contentDocument));\n } catch (error) {\n console.warn(error);\n }\n });\n\n var init = function init() {\n takeFullSnapshot();\n\n _handlers.push(observe(document));\n };\n\n if (document.readyState === 'interactive' || document.readyState === 'complete') {\n init();\n } else {\n _handlers.push(on('DOMContentLoaded', function () {\n wrappedEmit({\n type: EventType.DomContentLoaded,\n data: {}\n });\n if (recordAfter === 'DOMContentLoaded') init();\n }));\n\n _handlers.push(on('load', function () {\n wrappedEmit({\n type: EventType.Load,\n data: {}\n });\n if (recordAfter === 'load') init();\n }, window));\n }\n\n return function () {\n _handlers.forEach(function (h) {\n return h();\n });\n\n processedNodeManager.destroy();\n _takeFullSnapshot = undefined;\n unregisterErrorHandler();\n };\n } catch (error) {\n console.warn(error);\n }\n}\n\nfunction takeFullSnapshot(isCheckout) {\n if (!_takeFullSnapshot) {\n throw new Error('please take full snapshot after start recording');\n }\n\n _takeFullSnapshot(isCheckout);\n}\n\nrecord.mirror = mirror;\nrecord.takeFullSnapshot = takeFullSnapshot;\n\nfunction _getCanvasManager(getCanvasManagerFn, options) {\n try {\n return getCanvasManagerFn ? getCanvasManagerFn(options) : new CanvasManagerNoop();\n } catch (e2) {\n console.warn('Unable to initialize CanvasManager');\n return new CanvasManagerNoop();\n }\n}\n\nvar ReplayEventTypeIncrementalSnapshot = 3;\nvar ReplayEventTypeCustom = 5;\n/**\n * Converts a timestamp to ms, if it was in s, or keeps it as ms.\n */\n\nfunction timestampToMs(timestamp) {\n var isMs = timestamp > 9999999999;\n return isMs ? timestamp : timestamp * 1000;\n}\n/**\n * Converts a timestamp to s, if it was in ms, or keeps it as s.\n */\n\n\nfunction timestampToS(timestamp) {\n var isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n/**\n * Add a breadcrumb event to replay.\n */\n\n\nfunction addBreadcrumbEvent(replay, breadcrumb) {\n if (breadcrumb.category === 'sentry.transaction') {\n return;\n }\n\n if (['ui.click', 'ui.input'].includes(breadcrumb.category)) {\n replay.triggerUserActivity();\n } else {\n replay.checkAndHandleExpiredSession();\n }\n\n replay.addUpdate(function () {\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n replay.throttledAddEvent({\n type: EventType.Custom,\n // TODO: We were converting from ms to seconds for breadcrumbs, spans,\n // but maybe we should just keep them as milliseconds\n timestamp: (breadcrumb.timestamp || 0) * 1000,\n data: {\n tag: 'breadcrumb',\n // normalize to max. 10 depth and 1_000 properties per object\n payload: normalize(breadcrumb, 10, 1000)\n }\n }); // Do not flush after console log messages\n\n return breadcrumb.category === 'console';\n });\n}\n\nvar INTERACTIVE_SELECTOR = 'button,a';\n/** Get the closest interactive parent element, or else return the given element. */\n\nfunction getClosestInteractive(element) {\n var closestInteractive = element.closest(INTERACTIVE_SELECTOR);\n return closestInteractive || element;\n}\n/**\n * For clicks, we check if the target is inside of a button or link\n * If so, we use this as the target instead\n * This is useful because if you click on the image in ,\n * The target will be the image, not the button, which we don't want here\n */\n\n\nfunction getClickTargetNode(event) {\n var target = getTargetNode(event);\n\n if (!target || !(target instanceof Element)) {\n return target;\n }\n\n return getClosestInteractive(target);\n}\n/** Get the event target node. */\n\n\nfunction getTargetNode(event) {\n if (isEventWithTarget(event)) {\n return event.target;\n }\n\n return event;\n}\n\nfunction isEventWithTarget(event) {\n return _typeof(event) === 'object' && !!event && 'target' in event;\n}\n\nvar handlers;\n/**\n * Register a handler to be called when `window.open()` is called.\n * Returns a cleanup function.\n */\n\nfunction onWindowOpen(cb) {\n // Ensure to only register this once\n if (!handlers) {\n handlers = [];\n monkeyPatchWindowOpen();\n }\n\n handlers.push(cb);\n return function () {\n var pos = handlers ? handlers.indexOf(cb) : -1;\n\n if (pos > -1) {\n handlers.splice(pos, 1);\n }\n };\n}\n\nfunction monkeyPatchWindowOpen() {\n fill(WINDOW, 'open', function (originalWindowOpen) {\n return function () {\n if (handlers) {\n try {\n handlers.forEach(function (handler) {\n return handler();\n });\n } catch (e) {// ignore errors in here\n }\n }\n\n for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n args[_key8] = arguments[_key8];\n }\n\n return originalWindowOpen.apply(WINDOW, args);\n };\n });\n}\n/** Handle a click. */\n\n\nfunction handleClick(clickDetector, clickBreadcrumb, node) {\n clickDetector.handleClick(clickBreadcrumb, node);\n}\n/** A click detector class that can be used to detect slow or rage clicks on elements. */\n\n\nvar ClickDetector = /*#__PURE__*/function () {\n // protected for testing\n function ClickDetector(replay, slowClickConfig) {\n var _addBreadcrumbEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : addBreadcrumbEvent;\n\n _classCallCheck(this, ClickDetector);\n\n this._lastMutation = 0;\n this._lastScroll = 0;\n this._clicks = []; // We want everything in s, but options are in ms\n\n this._timeout = slowClickConfig.timeout / 1000;\n this._threshold = slowClickConfig.threshold / 1000;\n this._scollTimeout = slowClickConfig.scrollTimeout / 1000;\n this._replay = replay;\n this._ignoreSelector = slowClickConfig.ignoreSelector;\n this._addBreadcrumbEvent = _addBreadcrumbEvent;\n }\n /** Register click detection handlers on mutation or scroll. */\n\n\n _createClass(ClickDetector, [{\n key: \"addListeners\",\n value: function addListeners() {\n var _this15 = this;\n\n var cleanupWindowOpen = onWindowOpen(function () {\n // Treat window.open as mutation\n _this15._lastMutation = nowInSeconds();\n });\n\n this._teardown = function () {\n cleanupWindowOpen();\n _this15._clicks = [];\n _this15._lastMutation = 0;\n _this15._lastScroll = 0;\n };\n }\n /** Clean up listeners. */\n\n }, {\n key: \"removeListeners\",\n value: function removeListeners() {\n if (this._teardown) {\n this._teardown();\n }\n\n if (this._checkClickTimeout) {\n clearTimeout(this._checkClickTimeout);\n }\n }\n /** @inheritDoc */\n\n }, {\n key: \"handleClick\",\n value: function handleClick(breadcrumb, node) {\n if (ignoreElement(node, this._ignoreSelector) || !isClickBreadcrumb(breadcrumb)) {\n return;\n }\n\n var newClick = {\n timestamp: timestampToS(breadcrumb.timestamp),\n clickBreadcrumb: breadcrumb,\n // Set this to 0 so we know it originates from the click breadcrumb\n clickCount: 0,\n node: node\n }; // If there was a click in the last 1s on the same element, ignore it - only keep a single reference per second\n\n if (this._clicks.some(function (click) {\n return click.node === newClick.node && Math.abs(click.timestamp - newClick.timestamp) < 1;\n })) {\n return;\n }\n\n this._clicks.push(newClick); // If this is the first new click, set a timeout to check for multi clicks\n\n\n if (this._clicks.length === 1) {\n this._scheduleCheckClicks();\n }\n }\n /** @inheritDoc */\n\n }, {\n key: \"registerMutation\",\n value: function registerMutation() {\n var timestamp = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Date.now();\n this._lastMutation = timestampToS(timestamp);\n }\n /** @inheritDoc */\n\n }, {\n key: \"registerScroll\",\n value: function registerScroll() {\n var timestamp = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Date.now();\n this._lastScroll = timestampToS(timestamp);\n }\n /** @inheritDoc */\n\n }, {\n key: \"registerClick\",\n value: function registerClick(element) {\n var node = getClosestInteractive(element);\n\n this._handleMultiClick(node);\n }\n /** Count multiple clicks on elements. */\n\n }, {\n key: \"_handleMultiClick\",\n value: function _handleMultiClick(node) {\n this._getClicks(node).forEach(function (click) {\n click.clickCount++;\n });\n }\n /** Get all pending clicks for a given node. */\n\n }, {\n key: \"_getClicks\",\n value: function _getClicks(node) {\n return this._clicks.filter(function (click) {\n return click.node === node;\n });\n }\n /** Check the clicks that happened. */\n\n }, {\n key: \"_checkClicks\",\n value: function _checkClicks() {\n var _this16 = this;\n\n var timedOutClicks = [];\n var now = nowInSeconds();\n\n this._clicks.forEach(function (click) {\n if (!click.mutationAfter && _this16._lastMutation) {\n click.mutationAfter = click.timestamp <= _this16._lastMutation ? _this16._lastMutation - click.timestamp : undefined;\n }\n\n if (!click.scrollAfter && _this16._lastScroll) {\n click.scrollAfter = click.timestamp <= _this16._lastScroll ? _this16._lastScroll - click.timestamp : undefined;\n } // All of these are in seconds!\n\n\n if (click.timestamp + _this16._timeout <= now) {\n timedOutClicks.push(click);\n }\n }); // Remove \"old\" clicks\n\n\n for (var _i5 = 0, _timedOutClicks = timedOutClicks; _i5 < _timedOutClicks.length; _i5++) {\n var click = _timedOutClicks[_i5];\n\n var pos = this._clicks.indexOf(click);\n\n if (pos > -1) {\n this._generateBreadcrumbs(click);\n\n this._clicks.splice(pos, 1);\n }\n } // Trigger new check, unless no clicks left\n\n\n if (this._clicks.length) {\n this._scheduleCheckClicks();\n }\n }\n /** Generate matching breadcrumb(s) for the click. */\n\n }, {\n key: \"_generateBreadcrumbs\",\n value: function _generateBreadcrumbs(click) {\n var replay = this._replay;\n var hadScroll = click.scrollAfter && click.scrollAfter <= this._scollTimeout;\n var hadMutation = click.mutationAfter && click.mutationAfter <= this._threshold;\n var isSlowClick = !hadScroll && !hadMutation;\n var clickCount = click.clickCount,\n clickBreadcrumb = click.clickBreadcrumb; // Slow click\n\n if (isSlowClick) {\n // If `mutationAfter` is set, it means a mutation happened after the threshold, but before the timeout\n // If not, it means we just timed out without scroll & mutation\n var timeAfterClickMs = Math.min(click.mutationAfter || this._timeout, this._timeout) * 1000;\n var endReason = timeAfterClickMs < this._timeout * 1000 ? 'mutation' : 'timeout';\n var breadcrumb = {\n type: 'default',\n message: clickBreadcrumb.message,\n timestamp: clickBreadcrumb.timestamp,\n category: 'ui.slowClickDetected',\n data: _objectSpread(_objectSpread({}, clickBreadcrumb.data), {}, {\n url: WINDOW.location.href,\n route: replay.getCurrentRoute(),\n timeAfterClickMs: timeAfterClickMs,\n endReason: endReason,\n // If clickCount === 0, it means multiClick was not correctly captured here\n // - we still want to send 1 in this case\n clickCount: clickCount || 1\n })\n };\n\n this._addBreadcrumbEvent(replay, breadcrumb);\n\n return;\n } // Multi click\n\n\n if (clickCount > 1) {\n var _breadcrumb = {\n type: 'default',\n message: clickBreadcrumb.message,\n timestamp: clickBreadcrumb.timestamp,\n category: 'ui.multiClick',\n data: _objectSpread(_objectSpread({}, clickBreadcrumb.data), {}, {\n url: WINDOW.location.href,\n route: replay.getCurrentRoute(),\n clickCount: clickCount,\n metric: true\n })\n };\n\n this._addBreadcrumbEvent(replay, _breadcrumb);\n }\n }\n /** Schedule to check current clicks. */\n\n }, {\n key: \"_scheduleCheckClicks\",\n value: function _scheduleCheckClicks() {\n var _this17 = this;\n\n if (this._checkClickTimeout) {\n clearTimeout(this._checkClickTimeout);\n }\n\n this._checkClickTimeout = setTimeout(function () {\n return _this17._checkClicks();\n }, 1000);\n }\n }]);\n\n return ClickDetector;\n}();\n\nvar SLOW_CLICK_TAGS = ['A', 'BUTTON', 'INPUT'];\n/** exported for tests only */\n\nfunction ignoreElement(node, ignoreSelector) {\n if (!SLOW_CLICK_TAGS.includes(node.tagName)) {\n return true;\n } // If tag, we only want to consider input[type='submit'] & input[type='button']\n\n\n if (node.tagName === 'INPUT' && !['submit', 'button'].includes(node.getAttribute('type') || '')) {\n return true;\n } // If tag, detect special variants that may not lead to an action\n // If target !== _self, we may open the link somewhere else, which would lead to no action\n // Also, when downloading a file, we may not leave the page, but still not trigger an action\n\n\n if (node.tagName === 'A' && (node.hasAttribute('download') || node.hasAttribute('target') && node.getAttribute('target') !== '_self')) {\n return true;\n }\n\n if (ignoreSelector && node.matches(ignoreSelector)) {\n return true;\n }\n\n return false;\n}\n\nfunction isClickBreadcrumb(breadcrumb) {\n return !!(breadcrumb.data && typeof breadcrumb.data.nodeId === 'number' && breadcrumb.timestamp);\n} // This is good enough for us, and is easier to test/mock than `timestampInSeconds`\n\n\nfunction nowInSeconds() {\n return Date.now() / 1000;\n}\n/** Update the click detector based on a recording event of rrweb. */\n\n\nfunction updateClickDetectorForRecordingEvent(clickDetector, event) {\n try {\n // note: We only consider incremental snapshots here\n // This means that any full snapshot is ignored for mutation detection - the reason is that we simply cannot know if a mutation happened here.\n // E.g. think that we are buffering, an error happens and we take a full snapshot because we switched to session mode -\n // in this scenario, we would not know if a dead click happened because of the error, which is a key dead click scenario.\n // Instead, by ignoring full snapshots, we have the risk that we generate a false positive\n // (if a mutation _did_ happen but was \"swallowed\" by the full snapshot)\n // But this should be more unlikely as we'd generally capture the incremental snapshot right away\n if (!isIncrementalEvent(event)) {\n return;\n }\n\n var source = event.data.source;\n\n if (source === IncrementalSource.Mutation) {\n clickDetector.registerMutation(event.timestamp);\n }\n\n if (source === IncrementalSource.Scroll) {\n clickDetector.registerScroll(event.timestamp);\n }\n\n if (isIncrementalMouseInteraction(event)) {\n var _event$data = event.data,\n type = _event$data.type,\n id = _event$data.id;\n var node = record.mirror.getNode(id);\n\n if (node instanceof HTMLElement && type === MouseInteractions.Click) {\n clickDetector.registerClick(node);\n }\n }\n } catch (e) {// ignore errors here, e.g. if accessing something that does not exist\n }\n}\n\nfunction isIncrementalEvent(event) {\n return event.type === ReplayEventTypeIncrementalSnapshot;\n}\n\nfunction isIncrementalMouseInteraction(event) {\n return event.data.source === IncrementalSource.MouseInteraction;\n}\n/**\n * Create a breadcrumb for a replay.\n */\n\n\nfunction createBreadcrumb(breadcrumb) {\n return _objectSpread({\n timestamp: Date.now() / 1000,\n type: 'default'\n }, breadcrumb);\n}\n\nvar NodeType;\n\n(function (NodeType) {\n NodeType[NodeType[\"Document\"] = 0] = \"Document\";\n NodeType[NodeType[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType[NodeType[\"Element\"] = 2] = \"Element\";\n NodeType[NodeType[\"Text\"] = 3] = \"Text\";\n NodeType[NodeType[\"CDATA\"] = 4] = \"CDATA\";\n NodeType[NodeType[\"Comment\"] = 5] = \"Comment\";\n})(NodeType || (NodeType = {})); // Note that these are the serialized attributes and not attributes directly on\n// the DOM Node. Attributes we are interested in:\n\n\nvar ATTRIBUTES_TO_RECORD = new Set(['id', 'class', 'aria-label', 'role', 'name', 'alt', 'title', 'data-test-id', 'data-testid', 'disabled', 'aria-disabled', 'data-sentry-component']);\n/**\n * Inclusion list of attributes that we want to record from the DOM element\n */\n\nfunction getAttributesToRecord(attributes) {\n var obj = {};\n\n for (var key in attributes) {\n if (ATTRIBUTES_TO_RECORD.has(key)) {\n var normalizedKey = key;\n\n if (key === 'data-testid' || key === 'data-test-id') {\n normalizedKey = 'testId';\n }\n\n obj[normalizedKey] = attributes[key];\n }\n }\n\n return obj;\n}\n\nvar handleDomListener = function handleDomListener(replay) {\n return function (handlerData) {\n if (!replay.isEnabled()) {\n return;\n }\n\n var result = handleDom(handlerData);\n\n if (!result) {\n return;\n }\n\n var isClick = handlerData.name === 'click';\n var event = isClick ? handlerData.event : undefined; // Ignore clicks if ctrl/alt/meta/shift keys are held down as they alter behavior of clicks (e.g. open in new tab)\n\n if (isClick && replay.clickDetector && event && event.target && !event.altKey && !event.metaKey && !event.ctrlKey && !event.shiftKey) {\n handleClick(replay.clickDetector, result, getClickTargetNode(handlerData.event));\n }\n\n addBreadcrumbEvent(replay, result);\n };\n};\n/** Get the base DOM breadcrumb. */\n\n\nfunction getBaseDomBreadcrumb(target, message) {\n var nodeId = record.mirror.getId(target);\n var node = nodeId && record.mirror.getNode(nodeId);\n var meta = node && record.mirror.getMeta(node);\n var element = meta && isElement(meta) ? meta : null;\n return {\n message: message,\n data: element ? {\n nodeId: nodeId,\n node: {\n id: nodeId,\n tagName: element.tagName,\n textContent: Array.from(element.childNodes).map(function (node) {\n return node.type === NodeType.Text && node.textContent;\n }).filter(Boolean) // filter out empty values\n .map(function (text) {\n return text.trim();\n }).join(''),\n attributes: getAttributesToRecord(element.attributes)\n }\n } : {}\n };\n}\n/**\n * An event handler to react to DOM events.\n * Exported for tests.\n */\n\n\nfunction handleDom(handlerData) {\n var _getDomTarget = getDomTarget(handlerData),\n target = _getDomTarget.target,\n message = _getDomTarget.message;\n\n return createBreadcrumb(_objectSpread({\n category: \"ui.\".concat(handlerData.name)\n }, getBaseDomBreadcrumb(target, message)));\n}\n\nfunction getDomTarget(handlerData) {\n var isClick = handlerData.name === 'click';\n var message;\n var target = null; // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n\n try {\n target = isClick ? getClickTargetNode(handlerData.event) : getTargetNode(handlerData.event);\n message = htmlTreeAsString(target, {\n maxStringLength: 200\n }) || '';\n } catch (e) {\n message = '';\n }\n\n return {\n target: target,\n message: message\n };\n}\n\nfunction isElement(node) {\n return node.type === NodeType.Element;\n}\n/** Handle keyboard events & create breadcrumbs. */\n\n\nfunction handleKeyboardEvent(replay, event) {\n if (!replay.isEnabled()) {\n return;\n } // Update user activity, but do not restart recording as it can create\n // noisy/low-value replays (e.g. user comes back from idle, hits alt-tab, new\n // session with a single \"keydown\" breadcrumb is created)\n\n\n replay.updateUserActivity();\n var breadcrumb = getKeyboardBreadcrumb(event);\n\n if (!breadcrumb) {\n return;\n }\n\n addBreadcrumbEvent(replay, breadcrumb);\n}\n/** exported only for tests */\n\n\nfunction getKeyboardBreadcrumb(event) {\n var metaKey = event.metaKey,\n shiftKey = event.shiftKey,\n ctrlKey = event.ctrlKey,\n altKey = event.altKey,\n key = event.key,\n target = event.target; // never capture for input fields\n\n if (!target || isInputElement(target) || !key) {\n return null;\n } // Note: We do not consider shift here, as that means \"uppercase\"\n\n\n var hasModifierKey = metaKey || ctrlKey || altKey;\n var isCharacterKey = key.length === 1; // other keys like Escape, Tab, etc have a longer length\n // Do not capture breadcrumb if only a word key is pressed\n // This could leak e.g. user input\n\n if (!hasModifierKey && isCharacterKey) {\n return null;\n }\n\n var message = htmlTreeAsString(target, {\n maxStringLength: 200\n }) || '';\n var baseBreadcrumb = getBaseDomBreadcrumb(target, message);\n return createBreadcrumb({\n category: 'ui.keyDown',\n message: message,\n data: _objectSpread(_objectSpread({}, baseBreadcrumb.data), {}, {\n metaKey: metaKey,\n shiftKey: shiftKey,\n ctrlKey: ctrlKey,\n altKey: altKey,\n key: key\n })\n });\n}\n\nfunction isInputElement(target) {\n return target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable;\n} // Map entryType -> function to normalize data for event\n\n\nvar ENTRY_TYPES = {\n // @ts-expect-error TODO: entry type does not fit the create* functions entry type\n resource: createResourceEntry,\n paint: createPaintEntry,\n // @ts-expect-error TODO: entry type does not fit the create* functions entry type\n navigation: createNavigationEntry\n};\n/**\n * Create replay performance entries from the browser performance entries.\n */\n\nfunction createPerformanceEntries(entries) {\n return entries.map(createPerformanceEntry).filter(Boolean);\n}\n\nfunction createPerformanceEntry(entry) {\n if (!ENTRY_TYPES[entry.entryType]) {\n return null;\n }\n\n return ENTRY_TYPES[entry.entryType](entry);\n}\n\nfunction getAbsoluteTime(time) {\n // browserPerformanceTimeOrigin can be undefined if `performance` or\n // `performance.now` doesn't exist, but this is already checked by this integration\n return ((browserPerformanceTimeOrigin || WINDOW.performance.timeOrigin) + time) / 1000;\n}\n\nfunction createPaintEntry(entry) {\n var duration = entry.duration,\n entryType = entry.entryType,\n name = entry.name,\n startTime = entry.startTime;\n var start = getAbsoluteTime(startTime);\n return {\n type: entryType,\n name: name,\n start: start,\n end: start + duration,\n data: undefined\n };\n}\n\nfunction createNavigationEntry(entry) {\n var entryType = entry.entryType,\n name = entry.name,\n decodedBodySize = entry.decodedBodySize,\n duration = entry.duration,\n domComplete = entry.domComplete,\n encodedBodySize = entry.encodedBodySize,\n domContentLoadedEventStart = entry.domContentLoadedEventStart,\n domContentLoadedEventEnd = entry.domContentLoadedEventEnd,\n domInteractive = entry.domInteractive,\n loadEventStart = entry.loadEventStart,\n loadEventEnd = entry.loadEventEnd,\n redirectCount = entry.redirectCount,\n startTime = entry.startTime,\n transferSize = entry.transferSize,\n type = entry.type; // Ignore entries with no duration, they do not seem to be useful and cause dupes\n\n if (duration === 0) {\n return null;\n }\n\n return {\n type: \"\".concat(entryType, \".\").concat(type),\n start: getAbsoluteTime(startTime),\n end: getAbsoluteTime(domComplete),\n name: name,\n data: {\n size: transferSize,\n decodedBodySize: decodedBodySize,\n encodedBodySize: encodedBodySize,\n duration: duration,\n domInteractive: domInteractive,\n domContentLoadedEventStart: domContentLoadedEventStart,\n domContentLoadedEventEnd: domContentLoadedEventEnd,\n loadEventStart: loadEventStart,\n loadEventEnd: loadEventEnd,\n domComplete: domComplete,\n redirectCount: redirectCount\n }\n };\n}\n\nfunction createResourceEntry(entry) {\n var entryType = entry.entryType,\n initiatorType = entry.initiatorType,\n name = entry.name,\n responseEnd = entry.responseEnd,\n startTime = entry.startTime,\n decodedBodySize = entry.decodedBodySize,\n encodedBodySize = entry.encodedBodySize,\n responseStatus = entry.responseStatus,\n transferSize = entry.transferSize; // Core SDK handles these\n\n if (['fetch', 'xmlhttprequest'].includes(initiatorType)) {\n return null;\n }\n\n return {\n type: \"\".concat(entryType, \".\").concat(initiatorType),\n start: getAbsoluteTime(startTime),\n end: getAbsoluteTime(responseEnd),\n name: name,\n data: {\n size: transferSize,\n statusCode: responseStatus,\n decodedBodySize: decodedBodySize,\n encodedBodySize: encodedBodySize\n }\n };\n}\n/**\n * Add a LCP event to the replay based on an LCP metric.\n */\n\n\nfunction getLargestContentfulPaint(metric) {\n var entries = metric.entries;\n var lastEntry = entries[entries.length - 1];\n var element = lastEntry ? lastEntry.element : undefined;\n var value = metric.value;\n var end = getAbsoluteTime(value);\n var data = {\n type: 'largest-contentful-paint',\n name: 'largest-contentful-paint',\n start: end,\n end: end,\n data: {\n value: value,\n size: value,\n nodeId: element ? record.mirror.getId(element) : undefined\n }\n };\n return data;\n}\n/**\n * Sets up a PerformanceObserver to listen to all performance entry types.\n * Returns a callback to stop observing.\n */\n\n\nfunction setupPerformanceObserver(replay) {\n function addPerformanceEntry(entry) {\n // It is possible for entries to come up multiple times\n if (!replay.performanceEntries.includes(entry)) {\n replay.performanceEntries.push(entry);\n }\n }\n\n function onEntries(_ref23) {\n var entries = _ref23.entries;\n entries.forEach(addPerformanceEntry);\n }\n\n var clearCallbacks = [];\n ['navigation', 'paint', 'resource'].forEach(function (type) {\n clearCallbacks.push(addPerformanceInstrumentationHandler(type, onEntries));\n });\n clearCallbacks.push(addLcpInstrumentationHandler(function (_ref24) {\n var metric = _ref24.metric;\n replay.replayPerformanceEntries.push(getLargestContentfulPaint(metric));\n })); // A callback to cleanup all handlers\n\n return function () {\n clearCallbacks.forEach(function (clearCallback) {\n return clearCallback();\n });\n };\n}\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\n\n\nvar DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__;\nvar r = \"var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a>h]=l}else for(o=new n(i),a=0;a>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=[\\\"unexpected EOF\\\",\\\"invalid block type\\\",\\\"invalid length/literal\\\",\\\"invalid distance\\\",\\\"stream finished\\\",\\\"no stream handler\\\",,\\\"no callback\\\",\\\"invalid UTF-8 data\\\",\\\"extra field too long\\\",\\\"date not in range 1980-2099\\\",\\\"filename too long\\\",\\\"stream finishing\\\",\\\"invalid zip data\\\"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;ad&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<e))break;p+=m-(1<>=y;p>0;){var M=o[a].s;g[M]=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;Pnt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if(\\\"function\\\"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G=\\\"undefined\\\"!=typeof TextEncoder&&new TextEncoder,H=\\\"undefined\\\"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i>1)),o=0,f=function(t){s[o++]=t};for(i=0;is.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error(\\\"Adding invalid event\\\");const n=this._hasEvents?\\\",\\\":\\\"\\\";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push(\\\"]\\\",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push(\\\"[\\\")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener(\\\"message\\\",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&\\\"function\\\"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:\\\"init\\\",success:!0,response:void 0});\";\n\nfunction e() {\n var e = new Blob([r]);\n return URL.createObjectURL(e);\n}\n/**\n * Log a message in debug mode, and add a breadcrumb when _experiment.traceInternals is enabled.\n */\n\n\nfunction logInfo(message, shouldAddBreadcrumb) {\n if (!DEBUG_BUILD) {\n return;\n }\n\n logger.info(message);\n\n if (shouldAddBreadcrumb) {\n addLogBreadcrumb(message);\n }\n}\n/**\n * Log a message, and add a breadcrumb in the next tick.\n * This is necessary when the breadcrumb may be added before the replay is initialized.\n */\n\n\nfunction logInfoNextTick(message, shouldAddBreadcrumb) {\n if (!DEBUG_BUILD) {\n return;\n }\n\n logger.info(message);\n\n if (shouldAddBreadcrumb) {\n // Wait a tick here to avoid race conditions for some initial logs\n // which may be added before replay is initialized\n setTimeout(function () {\n addLogBreadcrumb(message);\n }, 0);\n }\n}\n\nfunction addLogBreadcrumb(message) {\n addBreadcrumb({\n category: 'console',\n data: {\n logger: 'replay'\n },\n level: 'info',\n message: message\n }, {\n level: 'info'\n });\n}\n/** This error indicates that the event buffer size exceeded the limit.. */\n\n\nvar EventBufferSizeExceededError = /*#__PURE__*/function (_Error) {\n _inherits(EventBufferSizeExceededError, _Error);\n\n var _super = _createSuper(EventBufferSizeExceededError);\n\n function EventBufferSizeExceededError() {\n _classCallCheck(this, EventBufferSizeExceededError);\n\n return _super.call(this, \"Event buffer exceeded maximum size of \".concat(REPLAY_MAX_EVENT_BUFFER_SIZE, \".\"));\n }\n\n return _createClass(EventBufferSizeExceededError);\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n/**\n * A basic event buffer that does not do any compression.\n * Used as fallback if the compression worker cannot be loaded or is disabled.\n */\n\n\nvar EventBufferArray = /*#__PURE__*/function () {\n /** All the events that are buffered to be sent. */\n\n /** @inheritdoc */\n function EventBufferArray() {\n _classCallCheck(this, EventBufferArray);\n\n this.events = [];\n this._totalSize = 0;\n this.hasCheckout = false;\n }\n /** @inheritdoc */\n\n\n _createClass(EventBufferArray, [{\n key: \"hasEvents\",\n get: function get() {\n return this.events.length > 0;\n }\n /** @inheritdoc */\n\n }, {\n key: \"type\",\n get: function get() {\n return 'sync';\n }\n /** @inheritdoc */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.events = [];\n }\n /** @inheritdoc */\n\n }, {\n key: \"addEvent\",\n value: function () {\n var _addEvent2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(event) {\n var eventSize;\n return _regeneratorRuntime.wrap(function _callee$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n eventSize = JSON.stringify(event).length;\n this._totalSize += eventSize;\n\n if (!(this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE)) {\n _context2.next = 4;\n break;\n }\n\n throw new EventBufferSizeExceededError();\n\n case 4:\n this.events.push(event);\n\n case 5:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee, this);\n }));\n\n function addEvent(_x) {\n return _addEvent2.apply(this, arguments);\n }\n\n return addEvent;\n }()\n /** @inheritdoc */\n\n }, {\n key: \"finish\",\n value: function finish() {\n var _this18 = this;\n\n return new Promise(function (resolve) {\n // Make a copy of the events array reference and immediately clear the\n // events member so that we do not lose new events while uploading\n // attachment.\n var eventsRet = _this18.events;\n\n _this18.clear();\n\n resolve(JSON.stringify(eventsRet));\n });\n }\n /** @inheritdoc */\n\n }, {\n key: \"clear\",\n value: function clear() {\n this.events = [];\n this._totalSize = 0;\n this.hasCheckout = false;\n }\n /** @inheritdoc */\n\n }, {\n key: \"getEarliestTimestamp\",\n value: function getEarliestTimestamp() {\n var timestamp = this.events.map(function (event) {\n return event.timestamp;\n }).sort()[0];\n\n if (!timestamp) {\n return null;\n }\n\n return timestampToMs(timestamp);\n }\n }]);\n\n return EventBufferArray;\n}();\n/**\n * Event buffer that uses a web worker to compress events.\n * Exported only for testing.\n */\n\n\nvar WorkerHandler = /*#__PURE__*/function () {\n function WorkerHandler(worker) {\n _classCallCheck(this, WorkerHandler);\n\n this._worker = worker;\n this._id = 0;\n }\n /**\n * Ensure the worker is ready (or not).\n * This will either resolve when the worker is ready, or reject if an error occured.\n */\n\n\n _createClass(WorkerHandler, [{\n key: \"ensureReady\",\n value: function ensureReady() {\n var _this19 = this;\n\n // Ensure we only check once\n if (this._ensureReadyPromise) {\n return this._ensureReadyPromise;\n }\n\n this._ensureReadyPromise = new Promise(function (resolve, reject) {\n _this19._worker.addEventListener('message', function (_ref25) {\n var data = _ref25.data;\n\n if (data.success) {\n resolve();\n } else {\n reject();\n }\n }, {\n once: true\n });\n\n _this19._worker.addEventListener('error', function (error) {\n reject(error);\n }, {\n once: true\n });\n });\n return this._ensureReadyPromise;\n }\n /**\n * Destroy the worker.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n logInfo('[Replay] Destroying compression worker');\n\n this._worker.terminate();\n }\n /**\n * Post message to worker and wait for response before resolving promise.\n */\n\n }, {\n key: \"postMessage\",\n value: function postMessage(method, arg) {\n var _this20 = this;\n\n var id = this._getAndIncrementId();\n\n return new Promise(function (resolve, reject) {\n var listener = function listener(_ref26) {\n var data = _ref26.data;\n var response = data;\n\n if (response.method !== method) {\n return;\n } // There can be multiple listeners for a single method, the id ensures\n // that the response matches the caller.\n\n\n if (response.id !== id) {\n return;\n } // At this point, we'll always want to remove listener regardless of result status\n\n\n _this20._worker.removeEventListener('message', listener);\n\n if (!response.success) {\n // TODO: Do some error handling, not sure what\n DEBUG_BUILD && logger.error('[Replay]', response.response);\n reject(new Error('Error in compression worker'));\n return;\n }\n\n resolve(response.response);\n }; // Note: we can't use `once` option because it's possible it needs to\n // listen to multiple messages\n\n\n _this20._worker.addEventListener('message', listener);\n\n _this20._worker.postMessage({\n id: id,\n method: method,\n arg: arg\n });\n });\n }\n /** Get the current ID and increment it for the next call. */\n\n }, {\n key: \"_getAndIncrementId\",\n value: function _getAndIncrementId() {\n return this._id++;\n }\n }]);\n\n return WorkerHandler;\n}();\n/**\n * Event buffer that uses a web worker to compress events.\n * Exported only for testing.\n */\n\n\nvar EventBufferCompressionWorker = /*#__PURE__*/function () {\n /** @inheritdoc */\n function EventBufferCompressionWorker(worker) {\n _classCallCheck(this, EventBufferCompressionWorker);\n\n this._worker = new WorkerHandler(worker);\n this._earliestTimestamp = null;\n this._totalSize = 0;\n this.hasCheckout = false;\n }\n /** @inheritdoc */\n\n\n _createClass(EventBufferCompressionWorker, [{\n key: \"hasEvents\",\n get: function get() {\n return !!this._earliestTimestamp;\n }\n /** @inheritdoc */\n\n }, {\n key: \"type\",\n get: function get() {\n return 'worker';\n }\n /**\n * Ensure the worker is ready (or not).\n * This will either resolve when the worker is ready, or reject if an error occured.\n */\n\n }, {\n key: \"ensureReady\",\n value: function ensureReady() {\n return this._worker.ensureReady();\n }\n /**\n * Destroy the event buffer.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this._worker.destroy();\n }\n /**\n * Add an event to the event buffer.\n *\n * Returns true if event was successfuly received and processed by worker.\n */\n\n }, {\n key: \"addEvent\",\n value: function addEvent(event) {\n var timestamp = timestampToMs(event.timestamp);\n\n if (!this._earliestTimestamp || timestamp < this._earliestTimestamp) {\n this._earliestTimestamp = timestamp;\n }\n\n var data = JSON.stringify(event);\n this._totalSize += data.length;\n\n if (this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE) {\n return Promise.reject(new EventBufferSizeExceededError());\n }\n\n return this._sendEventToWorker(data);\n }\n /**\n * Finish the event buffer and return the compressed data.\n */\n\n }, {\n key: \"finish\",\n value: function finish() {\n return this._finishRequest();\n }\n /** @inheritdoc */\n\n }, {\n key: \"clear\",\n value: function clear() {\n this._earliestTimestamp = null;\n this._totalSize = 0;\n this.hasCheckout = false; // We do not wait on this, as we assume the order of messages is consistent for the worker\n\n this._worker.postMessage('clear').then(null, function (e) {\n DEBUG_BUILD && logger.warn('[Replay] Sending \"clear\" message to worker failed', e);\n });\n }\n /** @inheritdoc */\n\n }, {\n key: \"getEarliestTimestamp\",\n value: function getEarliestTimestamp() {\n return this._earliestTimestamp;\n }\n /**\n * Send the event to the worker.\n */\n\n }, {\n key: \"_sendEventToWorker\",\n value: function _sendEventToWorker(data) {\n return this._worker.postMessage('addEvent', data);\n }\n /**\n * Finish the request and return the compressed data from the worker.\n */\n\n }, {\n key: \"_finishRequest\",\n value: function () {\n var _finishRequest2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {\n var response;\n return _regeneratorRuntime.wrap(function _callee2$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _context3.next = 2;\n return this._worker.postMessage('finish');\n\n case 2:\n response = _context3.sent;\n this._earliestTimestamp = null;\n this._totalSize = 0;\n return _context3.abrupt(\"return\", response);\n\n case 6:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function _finishRequest() {\n return _finishRequest2.apply(this, arguments);\n }\n\n return _finishRequest;\n }()\n }]);\n\n return EventBufferCompressionWorker;\n}();\n/**\n * This proxy will try to use the compression worker, and fall back to use the simple buffer if an error occurs there.\n * This can happen e.g. if the worker cannot be loaded.\n * Exported only for testing.\n */\n\n\nvar EventBufferProxy = /*#__PURE__*/function () {\n function EventBufferProxy(worker) {\n _classCallCheck(this, EventBufferProxy);\n\n this._fallback = new EventBufferArray();\n this._compression = new EventBufferCompressionWorker(worker);\n this._used = this._fallback;\n this._ensureWorkerIsLoadedPromise = this._ensureWorkerIsLoaded();\n }\n /** @inheritdoc */\n\n\n _createClass(EventBufferProxy, [{\n key: \"type\",\n get: function get() {\n return this._used.type;\n }\n /** @inheritDoc */\n\n }, {\n key: \"hasEvents\",\n get: function get() {\n return this._used.hasEvents;\n }\n /** @inheritdoc */\n\n }, {\n key: \"hasCheckout\",\n get: function get() {\n return this._used.hasCheckout;\n }\n /** @inheritdoc */\n ,\n set: function set(value) {\n this._used.hasCheckout = value;\n }\n /** @inheritDoc */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this._fallback.destroy();\n\n this._compression.destroy();\n }\n /** @inheritdoc */\n\n }, {\n key: \"clear\",\n value: function clear() {\n return this._used.clear();\n }\n /** @inheritdoc */\n\n }, {\n key: \"getEarliestTimestamp\",\n value: function getEarliestTimestamp() {\n return this._used.getEarliestTimestamp();\n }\n /**\n * Add an event to the event buffer.\n *\n * Returns true if event was successfully added.\n */\n\n }, {\n key: \"addEvent\",\n value: function addEvent(event) {\n return this._used.addEvent(event);\n }\n /** @inheritDoc */\n\n }, {\n key: \"finish\",\n value: function () {\n var _finish = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {\n return _regeneratorRuntime.wrap(function _callee3$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return this.ensureWorkerIsLoaded();\n\n case 2:\n return _context4.abrupt(\"return\", this._used.finish());\n\n case 3:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function finish() {\n return _finish.apply(this, arguments);\n }\n\n return finish;\n }()\n /** Ensure the worker has loaded. */\n\n }, {\n key: \"ensureWorkerIsLoaded\",\n value: function ensureWorkerIsLoaded() {\n return this._ensureWorkerIsLoadedPromise;\n }\n /** Actually check if the worker has been loaded. */\n\n }, {\n key: \"_ensureWorkerIsLoaded\",\n value: function () {\n var _ensureWorkerIsLoaded2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {\n return _regeneratorRuntime.wrap(function _callee4$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n _context5.prev = 0;\n _context5.next = 3;\n return this._compression.ensureReady();\n\n case 3:\n _context5.next = 9;\n break;\n\n case 5:\n _context5.prev = 5;\n _context5.t0 = _context5[\"catch\"](0);\n // If the worker fails to load, we fall back to the simple buffer.\n // Nothing more to do from our side here\n logInfo('[Replay] Failed to load the compression worker, falling back to simple buffer');\n return _context5.abrupt(\"return\");\n\n case 9:\n _context5.next = 11;\n return this._switchToCompressionWorker();\n\n case 11:\n case \"end\":\n return _context5.stop();\n }\n }\n }, _callee4, this, [[0, 5]]);\n }));\n\n function _ensureWorkerIsLoaded() {\n return _ensureWorkerIsLoaded2.apply(this, arguments);\n }\n\n return _ensureWorkerIsLoaded;\n }()\n /** Switch the used buffer to the compression worker. */\n\n }, {\n key: \"_switchToCompressionWorker\",\n value: function () {\n var _switchToCompressionWorker2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {\n var _this$_fallback, events, hasCheckout, addEventPromises, _iterator9, _step9, event;\n\n return _regeneratorRuntime.wrap(function _callee5$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n _this$_fallback = this._fallback, events = _this$_fallback.events, hasCheckout = _this$_fallback.hasCheckout;\n addEventPromises = [];\n _iterator9 = _createForOfIteratorHelper(events);\n\n try {\n for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {\n event = _step9.value;\n addEventPromises.push(this._compression.addEvent(event));\n }\n } catch (err) {\n _iterator9.e(err);\n } finally {\n _iterator9.f();\n }\n\n this._compression.hasCheckout = hasCheckout; // We switch over to the new buffer immediately - any further events will be added\n // after the previously buffered ones\n\n this._used = this._compression; // Wait for original events to be re-added before resolving\n\n _context6.prev = 6;\n _context6.next = 9;\n return Promise.all(addEventPromises);\n\n case 9:\n _context6.next = 14;\n break;\n\n case 11:\n _context6.prev = 11;\n _context6.t0 = _context6[\"catch\"](6);\n DEBUG_BUILD && logger.warn('[Replay] Failed to add events when switching buffers.', _context6.t0);\n\n case 14:\n case \"end\":\n return _context6.stop();\n }\n }\n }, _callee5, this, [[6, 11]]);\n }));\n\n function _switchToCompressionWorker() {\n return _switchToCompressionWorker2.apply(this, arguments);\n }\n\n return _switchToCompressionWorker;\n }()\n }]);\n\n return EventBufferProxy;\n}();\n/**\n * Create an event buffer for replays.\n */\n\n\nfunction createEventBuffer(_ref27) {\n var useCompression = _ref27.useCompression,\n customWorkerUrl = _ref27.workerUrl;\n\n if (useCompression && // eslint-disable-next-line no-restricted-globals\n window.Worker) {\n var worker = _loadWorker(customWorkerUrl);\n\n if (worker) {\n return worker;\n }\n }\n\n logInfo('[Replay] Using simple buffer');\n return new EventBufferArray();\n}\n\nfunction _loadWorker(customWorkerUrl) {\n try {\n var workerUrl = customWorkerUrl || _getWorkerUrl();\n\n if (!workerUrl) {\n return;\n }\n\n logInfo(\"[Replay] Using compression worker\".concat(customWorkerUrl ? \" from \".concat(customWorkerUrl) : ''));\n var worker = new Worker(workerUrl);\n return new EventBufferProxy(worker);\n } catch (error) {\n logInfo('[Replay] Failed to create compression worker'); // Fall back to use simple event buffer array\n }\n}\n\nfunction _getWorkerUrl() {\n if (typeof __SENTRY_EXCLUDE_REPLAY_WORKER__ === 'undefined' || !__SENTRY_EXCLUDE_REPLAY_WORKER__) {\n return e();\n }\n\n return '';\n}\n/** If sessionStorage is available. */\n\n\nfunction hasSessionStorage() {\n try {\n // This can throw, e.g. when being accessed in a sandboxed iframe\n return 'sessionStorage' in WINDOW && !!WINDOW.sessionStorage;\n } catch (e) {\n return false;\n }\n}\n/**\n * Removes the session from Session Storage and unsets session in replay instance\n */\n\n\nfunction clearSession(replay) {\n deleteSession();\n replay.session = undefined;\n}\n/**\n * Deletes a session from storage\n */\n\n\nfunction deleteSession() {\n if (!hasSessionStorage()) {\n return;\n }\n\n try {\n WINDOW.sessionStorage.removeItem(REPLAY_SESSION_KEY);\n } catch (e) {// Ignore potential SecurityError exceptions\n }\n}\n/**\n * Given a sample rate, returns true if replay should be sampled.\n *\n * 1.0 = 100% sampling\n * 0.0 = 0% sampling\n */\n\n\nfunction isSampled(sampleRate) {\n if (sampleRate === undefined) {\n return false;\n } // Math.random() returns a number in range of 0 to 1 (inclusive of 0, but not 1)\n\n\n return Math.random() < sampleRate;\n}\n/**\n * Get a session with defaults & applied sampling.\n */\n\n\nfunction makeSession(session) {\n var now = Date.now();\n var id = session.id || uuid4(); // Note that this means we cannot set a started/lastActivity of `0`, but this should not be relevant outside of tests.\n\n var started = session.started || now;\n var lastActivity = session.lastActivity || now;\n var segmentId = session.segmentId || 0;\n var sampled = session.sampled;\n var previousSessionId = session.previousSessionId;\n return {\n id: id,\n started: started,\n lastActivity: lastActivity,\n segmentId: segmentId,\n sampled: sampled,\n previousSessionId: previousSessionId\n };\n}\n/**\n * Save a session to session storage.\n */\n\n\nfunction saveSession(session) {\n if (!hasSessionStorage()) {\n return;\n }\n\n try {\n WINDOW.sessionStorage.setItem(REPLAY_SESSION_KEY, JSON.stringify(session));\n } catch (e) {// Ignore potential SecurityError exceptions\n }\n}\n/**\n * Get the sampled status for a session based on sample rates & current sampled status.\n */\n\n\nfunction getSessionSampleType(sessionSampleRate, allowBuffering) {\n return isSampled(sessionSampleRate) ? 'session' : allowBuffering ? 'buffer' : false;\n}\n/**\n * Create a new session, which in its current implementation is a Sentry event\n * that all replays will be saved to as attachments. Currently, we only expect\n * one of these Sentry events per \"replay session\".\n */\n\n\nfunction createSession(_ref28) {\n var sessionSampleRate = _ref28.sessionSampleRate,\n allowBuffering = _ref28.allowBuffering,\n _ref28$stickySession = _ref28.stickySession,\n stickySession = _ref28$stickySession === void 0 ? false : _ref28$stickySession;\n\n var _ref29 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n previousSessionId = _ref29.previousSessionId;\n\n var sampled = getSessionSampleType(sessionSampleRate, allowBuffering);\n var session = makeSession({\n sampled: sampled,\n previousSessionId: previousSessionId\n });\n\n if (stickySession) {\n saveSession(session);\n }\n\n return session;\n}\n/**\n * Fetches a session from storage\n */\n\n\nfunction fetchSession(traceInternals) {\n if (!hasSessionStorage()) {\n return null;\n }\n\n try {\n // This can throw if cookies are disabled\n var sessionStringFromStorage = WINDOW.sessionStorage.getItem(REPLAY_SESSION_KEY);\n\n if (!sessionStringFromStorage) {\n return null;\n }\n\n var sessionObj = JSON.parse(sessionStringFromStorage);\n logInfoNextTick('[Replay] Loading existing session', traceInternals);\n return makeSession(sessionObj);\n } catch (e) {\n return null;\n }\n}\n/**\n * Given an initial timestamp and an expiry duration, checks to see if current\n * time should be considered as expired.\n */\n\n\nfunction isExpired(initialTime, expiry) {\n var targetTime = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : +new Date();\n\n // Always expired if < 0\n if (initialTime === null || expiry === undefined || expiry < 0) {\n return true;\n } // Never expires if == 0\n\n\n if (expiry === 0) {\n return false;\n }\n\n return initialTime + expiry <= targetTime;\n}\n/**\n * Checks to see if session is expired\n */\n\n\nfunction isSessionExpired(session, _ref30) {\n var maxReplayDuration = _ref30.maxReplayDuration,\n sessionIdleExpire = _ref30.sessionIdleExpire,\n _ref30$targetTime = _ref30.targetTime,\n targetTime = _ref30$targetTime === void 0 ? Date.now() : _ref30$targetTime;\n return (// First, check that maximum session length has not been exceeded\n isExpired(session.started, maxReplayDuration, targetTime) || // check that the idle timeout has not been exceeded (i.e. user has\n // performed an action within the last `sessionIdleExpire` ms)\n isExpired(session.lastActivity, sessionIdleExpire, targetTime)\n );\n}\n/** If the session should be refreshed or not. */\n\n\nfunction shouldRefreshSession(session, _ref31) {\n var sessionIdleExpire = _ref31.sessionIdleExpire,\n maxReplayDuration = _ref31.maxReplayDuration;\n\n // If not expired, all good, just keep the session\n if (!isSessionExpired(session, {\n sessionIdleExpire: sessionIdleExpire,\n maxReplayDuration: maxReplayDuration\n })) {\n return false;\n } // If we are buffering & haven't ever flushed yet, always continue\n\n\n if (session.sampled === 'buffer' && session.segmentId === 0) {\n return false;\n }\n\n return true;\n}\n/**\n * Get or create a session, when initializing the replay.\n * Returns a session that may be unsampled.\n */\n\n\nfunction loadOrCreateSession(_ref32, sessionOptions) {\n var traceInternals = _ref32.traceInternals,\n sessionIdleExpire = _ref32.sessionIdleExpire,\n maxReplayDuration = _ref32.maxReplayDuration,\n previousSessionId = _ref32.previousSessionId;\n var existingSession = sessionOptions.stickySession && fetchSession(traceInternals); // No session exists yet, just create a new one\n\n if (!existingSession) {\n logInfoNextTick('[Replay] Creating new session', traceInternals);\n return createSession(sessionOptions, {\n previousSessionId: previousSessionId\n });\n }\n\n if (!shouldRefreshSession(existingSession, {\n sessionIdleExpire: sessionIdleExpire,\n maxReplayDuration: maxReplayDuration\n })) {\n return existingSession;\n }\n\n logInfoNextTick('[Replay] Session in sessionStorage is expired, creating new one...');\n return createSession(sessionOptions, {\n previousSessionId: existingSession.id\n });\n}\n\nfunction isCustomEvent(event) {\n return event.type === EventType.Custom;\n}\n/**\n * Add an event to the event buffer.\n * In contrast to `addEvent`, this does not return a promise & does not wait for the adding of the event to succeed/fail.\n * Instead this returns `true` if we tried to add the event, else false.\n * It returns `false` e.g. if we are paused, disabled, or out of the max replay duration.\n *\n * `isCheckout` is true if this is either the very first event, or an event triggered by `checkoutEveryNms`.\n */\n\n\nfunction addEventSync(replay, event, isCheckout) {\n if (!shouldAddEvent(replay, event)) {\n return false;\n } // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n\n\n _addEvent(replay, event, isCheckout);\n\n return true;\n}\n/**\n * Add an event to the event buffer.\n * Resolves to `null` if no event was added, else to `void`.\n *\n * `isCheckout` is true if this is either the very first event, or an event triggered by `checkoutEveryNms`.\n */\n\n\nfunction addEvent(replay, event, isCheckout) {\n if (!shouldAddEvent(replay, event)) {\n return Promise.resolve(null);\n }\n\n return _addEvent(replay, event, isCheckout);\n}\n\nfunction _addEvent(_x2, _x3, _x4) {\n return _addEvent3.apply(this, arguments);\n}\n/** Exported only for tests. */\n\n\nfunction _addEvent3() {\n _addEvent3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(replay, event, isCheckout) {\n var replayOptions, eventAfterPossibleCallback, reason, client;\n return _regeneratorRuntime.wrap(function _callee11$(_context12) {\n while (1) {\n switch (_context12.prev = _context12.next) {\n case 0:\n if (replay.eventBuffer) {\n _context12.next = 2;\n break;\n }\n\n return _context12.abrupt(\"return\", null);\n\n case 2:\n _context12.prev = 2;\n\n if (isCheckout && replay.recordingMode === 'buffer') {\n replay.eventBuffer.clear();\n }\n\n if (isCheckout) {\n replay.eventBuffer.hasCheckout = true;\n }\n\n replayOptions = replay.getOptions();\n eventAfterPossibleCallback = maybeApplyCallback(event, replayOptions.beforeAddRecordingEvent);\n\n if (eventAfterPossibleCallback) {\n _context12.next = 9;\n break;\n }\n\n return _context12.abrupt(\"return\");\n\n case 9:\n _context12.next = 11;\n return replay.eventBuffer.addEvent(eventAfterPossibleCallback);\n\n case 11:\n return _context12.abrupt(\"return\", _context12.sent);\n\n case 14:\n _context12.prev = 14;\n _context12.t0 = _context12[\"catch\"](2);\n reason = _context12.t0 && _context12.t0 instanceof EventBufferSizeExceededError ? 'addEventSizeExceeded' : 'addEvent';\n DEBUG_BUILD && logger.error(_context12.t0);\n _context12.next = 20;\n return replay.stop({\n reason: reason\n });\n\n case 20:\n client = getClient();\n\n if (client) {\n client.recordDroppedEvent('internal_sdk_error', 'replay');\n }\n\n case 22:\n case \"end\":\n return _context12.stop();\n }\n }\n }, _callee11, null, [[2, 14]]);\n }));\n return _addEvent3.apply(this, arguments);\n}\n\nfunction shouldAddEvent(replay, event) {\n if (!replay.eventBuffer || replay.isPaused() || !replay.isEnabled()) {\n return false;\n }\n\n var timestampInMs = timestampToMs(event.timestamp); // Throw out events that happen more than 5 minutes ago. This can happen if\n // page has been left open and idle for a long period of time and user\n // comes back to trigger a new session. The performance entries rely on\n // `performance.timeOrigin`, which is when the page first opened.\n\n if (timestampInMs + replay.timeouts.sessionIdlePause < Date.now()) {\n return false;\n } // Throw out events that are +60min from the initial timestamp\n\n\n if (timestampInMs > replay.getContext().initialTimestamp + replay.getOptions().maxReplayDuration) {\n logInfo(\"[Replay] Skipping event with timestamp \".concat(timestampInMs, \" because it is after maxReplayDuration\"), replay.getOptions()._experiments.traceInternals);\n return false;\n }\n\n return true;\n}\n\nfunction maybeApplyCallback(event, callback) {\n try {\n if (typeof callback === 'function' && isCustomEvent(event)) {\n return callback(event);\n }\n } catch (error) {\n DEBUG_BUILD && logger.error('[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...', error);\n return null;\n }\n\n return event;\n}\n/** If the event is an error event */\n\n\nfunction isErrorEvent(event) {\n return !event.type;\n}\n/** If the event is a transaction event */\n\n\nfunction isTransactionEvent(event) {\n return event.type === 'transaction';\n}\n/** If the event is an replay event */\n\n\nfunction isReplayEvent(event) {\n return event.type === 'replay_event';\n}\n/** If the event is a feedback event */\n\n\nfunction isFeedbackEvent(event) {\n return event.type === 'feedback';\n}\n/**\n * Returns a listener to be added to `client.on('afterSendErrorEvent, listener)`.\n */\n\n\nfunction handleAfterSendEvent(replay) {\n // Custom transports may still be returning `Promise`, which means we cannot expect the status code to be available there\n // TODO (v8): remove this check as it will no longer be necessary\n var enforceStatusCode = isBaseTransportSend();\n return function (event, sendResponse) {\n if (!replay.isEnabled() || !isErrorEvent(event) && !isTransactionEvent(event)) {\n return;\n }\n\n var statusCode = sendResponse && sendResponse.statusCode; // We only want to do stuff on successful error sending, otherwise you get error replays without errors attached\n // If not using the base transport, we allow `undefined` response (as a custom transport may not implement this correctly yet)\n // If we do use the base transport, we skip if we encountered an non-OK status code\n\n if (enforceStatusCode && (!statusCode || statusCode < 200 || statusCode >= 300)) {\n return;\n }\n\n if (isTransactionEvent(event)) {\n handleTransactionEvent(replay, event);\n return;\n }\n\n handleErrorEvent(replay, event);\n };\n}\n\nfunction handleTransactionEvent(replay, event) {\n var replayContext = replay.getContext(); // Collect traceIds in _context regardless of `recordingMode`\n // In error mode, _context gets cleared on every checkout\n // We limit to max. 100 transactions linked\n\n if (event.contexts && event.contexts.trace && event.contexts.trace.trace_id && replayContext.traceIds.size < 100) {\n replayContext.traceIds.add(event.contexts.trace.trace_id);\n }\n}\n\nfunction handleErrorEvent(replay, event) {\n var replayContext = replay.getContext(); // Add error to list of errorIds of replay. This is ok to do even if not\n // sampled because context will get reset at next checkout.\n // XXX: There is also a race condition where it's possible to capture an\n // error to Sentry before Replay SDK has loaded, but response returns after\n // it was loaded, and this gets called.\n // We limit to max. 100 errors linked\n\n if (event.event_id && replayContext.errorIds.size < 100) {\n replayContext.errorIds.add(event.event_id);\n } // If error event is tagged with replay id it means it was sampled (when in buffer mode)\n // Need to be very careful that this does not cause an infinite loop\n\n\n if (replay.recordingMode !== 'buffer' || !event.tags || !event.tags.replayId) {\n return;\n }\n\n var _replay$getOptions = replay.getOptions(),\n beforeErrorSampling = _replay$getOptions.beforeErrorSampling;\n\n if (typeof beforeErrorSampling === 'function' && !beforeErrorSampling(event)) {\n return;\n }\n\n setTimeout(function () {\n // Capture current event buffer as new replay\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n replay.sendBufferedReplayOrFlush();\n });\n}\n\nfunction isBaseTransportSend() {\n var client = getClient();\n\n if (!client) {\n return false;\n }\n\n var transport = client.getTransport();\n\n if (!transport) {\n return false;\n }\n\n return transport.send.__sentry__baseTransport__ || false;\n}\n/**\n * Returns a listener to be added to `client.on('afterSendErrorEvent, listener)`.\n */\n\n\nfunction handleBeforeSendEvent(replay) {\n return function (event) {\n if (!replay.isEnabled() || !isErrorEvent(event)) {\n return;\n }\n\n handleHydrationError(replay, event);\n };\n}\n\nfunction handleHydrationError(replay, event) {\n var exceptionValue = event.exception && event.exception.values && event.exception.values[0].value;\n\n if (typeof exceptionValue !== 'string') {\n return;\n }\n\n if ( // Only matches errors in production builds of react-dom\n // Example https://reactjs.org/docs/error-decoder.html?invariant=423\n exceptionValue.match(/reactjs\\.org\\/docs\\/error-decoder\\.html\\?invariant=(418|419|422|423|425)/) || // Development builds of react-dom\n // Error 1: Hydration failed because the initial UI does not match what was rendered on the server.\n // Error 2: Text content does not match server-rendered HTML. Warning: Text content did not match.\n exceptionValue.match(/(does not match server-rendered HTML|Hydration failed because)/i)) {\n var breadcrumb = createBreadcrumb({\n category: 'replay.hydrate-error'\n });\n addBreadcrumbEvent(replay, breadcrumb);\n }\n}\n/**\n * Returns true if we think the given event is an error originating inside of rrweb.\n */\n\n\nfunction isRrwebError(event, hint) {\n if (event.type || !event.exception || !event.exception.values || !event.exception.values.length) {\n return false;\n } // @ts-expect-error this may be set by rrweb when it finds errors\n\n\n if (hint.originalException && hint.originalException.__rrweb__) {\n return true;\n }\n\n return false;\n}\n/**\n * Add a feedback breadcrumb event to replay.\n */\n\n\nfunction addFeedbackBreadcrumb(replay, event) {\n replay.triggerUserActivity();\n replay.addUpdate(function () {\n if (!event.timestamp) {\n // Ignore events that don't have timestamps (this shouldn't happen, more of a typing issue)\n // Return true here so that we don't flush\n return true;\n } // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n\n\n replay.throttledAddEvent({\n type: EventType.Custom,\n timestamp: event.timestamp * 1000,\n data: {\n tag: 'breadcrumb',\n payload: {\n timestamp: event.timestamp,\n type: 'default',\n category: 'sentry.feedback',\n data: {\n feedbackId: event.event_id\n }\n }\n }\n });\n return false;\n });\n}\n/**\n * Determine if event should be sampled (only applies in buffer mode).\n * When an event is captured by `hanldleGlobalEvent`, when in buffer mode\n * we determine if we want to sample the error or not.\n */\n\n\nfunction shouldSampleForBufferEvent(replay, event) {\n if (replay.recordingMode !== 'buffer') {\n return false;\n } // ignore this error because otherwise we could loop indefinitely with\n // trying to capture replay and failing\n\n\n if (event.message === UNABLE_TO_SEND_REPLAY) {\n return false;\n } // Require the event to be an error event & to have an exception\n\n\n if (!event.exception || event.type) {\n return false;\n }\n\n return isSampled(replay.getOptions().errorSampleRate);\n}\n/**\n * Returns a listener to be added to `addEventProcessor(listener)`.\n */\n\n\nfunction handleGlobalEventListener(replay) {\n var includeAfterSendEventHandling = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var afterSendHandler = includeAfterSendEventHandling ? handleAfterSendEvent(replay) : undefined;\n return Object.assign(function (event, hint) {\n // Do nothing if replay has been disabled\n if (!replay.isEnabled()) {\n return event;\n }\n\n if (isReplayEvent(event)) {\n // Replays have separate set of breadcrumbs, do not include breadcrumbs\n // from core SDK\n delete event.breadcrumbs;\n return event;\n } // We only want to handle errors, transactions, and feedbacks, nothing else\n\n\n if (!isErrorEvent(event) && !isTransactionEvent(event) && !isFeedbackEvent(event)) {\n return event;\n } // Ensure we do not add replay_id if the session is expired\n\n\n var isSessionActive = replay.checkAndHandleExpiredSession();\n\n if (!isSessionActive) {\n return event;\n }\n\n if (isFeedbackEvent(event)) {\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n replay.flush();\n event.contexts.feedback.replay_id = replay.getSessionId(); // Add a replay breadcrumb for this piece of feedback\n\n addFeedbackBreadcrumb(replay, event);\n return event;\n } // Unless `captureExceptions` is enabled, we want to ignore errors coming from rrweb\n // As there can be a bunch of stuff going wrong in internals there, that we don't want to bubble up to users\n\n\n if (isRrwebError(event, hint) && !replay.getOptions()._experiments.captureExceptions) {\n DEBUG_BUILD && logger.log('[Replay] Ignoring error from rrweb internals', event);\n return null;\n } // When in buffer mode, we decide to sample here.\n // Later, in `handleAfterSendEvent`, if the replayId is set, we know that we sampled\n // And convert the buffer session to a full session\n\n\n var isErrorEventSampled = shouldSampleForBufferEvent(replay, event); // Tag errors if it has been sampled in buffer mode, or if it is session mode\n // Only tag transactions if in session mode\n\n var shouldTagReplayId = isErrorEventSampled || replay.recordingMode === 'session';\n\n if (shouldTagReplayId) {\n event.tags = _objectSpread(_objectSpread({}, event.tags), {}, {\n replayId: replay.getSessionId()\n });\n } // In cases where a custom client is used that does not support the new hooks (yet),\n // we manually call this hook method here\n\n\n if (afterSendHandler) {\n // Pretend the error had a 200 response so we always capture it\n afterSendHandler(event, {\n statusCode: 200\n });\n }\n\n return event;\n }, {\n id: 'Replay'\n });\n}\n/**\n * Create a \"span\" for each performance entry.\n */\n\n\nfunction createPerformanceSpans(replay, entries) {\n return entries.map(function (_ref33) {\n var type = _ref33.type,\n start = _ref33.start,\n end = _ref33.end,\n name = _ref33.name,\n data = _ref33.data;\n var response = replay.throttledAddEvent({\n type: EventType.Custom,\n timestamp: start,\n data: {\n tag: 'performanceSpan',\n payload: {\n op: type,\n description: name,\n startTimestamp: start,\n endTimestamp: end,\n data: data\n }\n }\n }); // If response is a string, it means its either THROTTLED or SKIPPED\n\n return typeof response === 'string' ? Promise.resolve(null) : response;\n });\n}\n\nfunction handleHistory(handlerData) {\n var from = handlerData.from,\n to = handlerData.to;\n var now = Date.now() / 1000;\n return {\n type: 'navigation.push',\n start: now,\n end: now,\n name: to,\n data: {\n previous: from\n }\n };\n}\n/**\n * Returns a listener to be added to `addHistoryInstrumentationHandler(listener)`.\n */\n\n\nfunction handleHistorySpanListener(replay) {\n return function (handlerData) {\n if (!replay.isEnabled()) {\n return;\n }\n\n var result = handleHistory(handlerData);\n\n if (result === null) {\n return;\n } // Need to collect visited URLs\n\n\n replay.getContext().urls.push(result.name);\n replay.triggerUserActivity();\n replay.addUpdate(function () {\n createPerformanceSpans(replay, [result]); // Returning false to flush\n\n return false;\n });\n };\n}\n/**\n * Check whether a given request URL should be filtered out. This is so we\n * don't log Sentry ingest requests.\n */\n\n\nfunction shouldFilterRequest(replay, url) {\n // If we enabled the `traceInternals` experiment, we want to trace everything\n if (DEBUG_BUILD && replay.getOptions()._experiments.traceInternals) {\n return false;\n }\n\n return isSentryRequestUrl(url, getClient());\n}\n/** Add a performance entry breadcrumb */\n\n\nfunction addNetworkBreadcrumb(replay, result) {\n if (!replay.isEnabled()) {\n return;\n }\n\n if (result === null) {\n return;\n }\n\n if (shouldFilterRequest(replay, result.name)) {\n return;\n }\n\n replay.addUpdate(function () {\n createPerformanceSpans(replay, [result]); // Returning true will cause `addUpdate` to not flush\n // We do not want network requests to cause a flush. This will prevent\n // recurring/polling requests from keeping the replay session alive.\n\n return true;\n });\n}\n/** only exported for tests */\n\n\nfunction handleFetch(handlerData) {\n var startTimestamp = handlerData.startTimestamp,\n endTimestamp = handlerData.endTimestamp,\n fetchData = handlerData.fetchData,\n response = handlerData.response;\n\n if (!endTimestamp) {\n return null;\n } // This is only used as a fallback, so we know the body sizes are never set here\n\n\n var method = fetchData.method,\n url = fetchData.url;\n return {\n type: 'resource.fetch',\n start: startTimestamp / 1000,\n end: endTimestamp / 1000,\n name: url,\n data: {\n method: method,\n statusCode: response ? response.status : undefined\n }\n };\n}\n/**\n * Returns a listener to be added to `addFetchInstrumentationHandler(listener)`.\n */\n\n\nfunction handleFetchSpanListener(replay) {\n return function (handlerData) {\n if (!replay.isEnabled()) {\n return;\n }\n\n var result = handleFetch(handlerData);\n addNetworkBreadcrumb(replay, result);\n };\n}\n/** only exported for tests */\n\n\nfunction handleXhr(handlerData) {\n var startTimestamp = handlerData.startTimestamp,\n endTimestamp = handlerData.endTimestamp,\n xhr = handlerData.xhr;\n var sentryXhrData = xhr[SENTRY_XHR_DATA_KEY];\n\n if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n return null;\n } // This is only used as a fallback, so we know the body sizes are never set here\n\n\n var method = sentryXhrData.method,\n url = sentryXhrData.url,\n statusCode = sentryXhrData.status_code;\n\n if (url === undefined) {\n return null;\n }\n\n return {\n type: 'resource.xhr',\n name: url,\n start: startTimestamp / 1000,\n end: endTimestamp / 1000,\n data: {\n method: method,\n statusCode: statusCode\n }\n };\n}\n/**\n * Returns a listener to be added to `addXhrInstrumentationHandler(listener)`.\n */\n\n\nfunction handleXhrSpanListener(replay) {\n return function (handlerData) {\n if (!replay.isEnabled()) {\n return;\n }\n\n var result = handleXhr(handlerData);\n addNetworkBreadcrumb(replay, result);\n };\n}\n/** Get the size of a body. */\n\n\nfunction getBodySize(body, textEncoder) {\n if (!body) {\n return undefined;\n }\n\n try {\n if (typeof body === 'string') {\n return textEncoder.encode(body).length;\n }\n\n if (body instanceof URLSearchParams) {\n return textEncoder.encode(body.toString()).length;\n }\n\n if (body instanceof FormData) {\n var formDataStr = _serializeFormData(body);\n\n return textEncoder.encode(formDataStr).length;\n }\n\n if (body instanceof Blob) {\n return body.size;\n }\n\n if (body instanceof ArrayBuffer) {\n return body.byteLength;\n } // Currently unhandled types: ArrayBufferView, ReadableStream\n\n } catch (e) {// just return undefined\n }\n\n return undefined;\n}\n/** Convert a Content-Length header to number/undefined. */\n\n\nfunction parseContentLengthHeader(header) {\n if (!header) {\n return undefined;\n }\n\n var size = parseInt(header, 10);\n return isNaN(size) ? undefined : size;\n}\n/** Get the string representation of a body. */\n\n\nfunction getBodyString(body) {\n try {\n if (typeof body === 'string') {\n return [body];\n }\n\n if (body instanceof URLSearchParams) {\n return [body.toString()];\n }\n\n if (body instanceof FormData) {\n return [_serializeFormData(body)];\n }\n\n if (!body) {\n return [undefined];\n }\n } catch (e2) {\n DEBUG_BUILD && logger.warn('[Replay] Failed to serialize body', body);\n return [undefined, 'BODY_PARSE_ERROR'];\n }\n\n DEBUG_BUILD && logger.info('[Replay] Skipping network body because of body type', body);\n return [undefined, 'UNPARSEABLE_BODY_TYPE'];\n}\n/** Merge a warning into an existing network request/response. */\n\n\nfunction mergeWarning(info, warning) {\n if (!info) {\n return {\n headers: {},\n size: undefined,\n _meta: {\n warnings: [warning]\n }\n };\n }\n\n var newMeta = _objectSpread({}, info._meta);\n\n var existingWarnings = newMeta.warnings || [];\n newMeta.warnings = [].concat(_toConsumableArray(existingWarnings), [warning]);\n info._meta = newMeta;\n return info;\n}\n/** Convert ReplayNetworkRequestData to a PerformanceEntry. */\n\n\nfunction makeNetworkReplayBreadcrumb(type, data) {\n if (!data) {\n return null;\n }\n\n var startTimestamp = data.startTimestamp,\n endTimestamp = data.endTimestamp,\n url = data.url,\n method = data.method,\n statusCode = data.statusCode,\n request = data.request,\n response = data.response;\n var result = {\n type: type,\n start: startTimestamp / 1000,\n end: endTimestamp / 1000,\n name: url,\n data: dropUndefinedKeys({\n method: method,\n statusCode: statusCode,\n request: request,\n response: response\n })\n };\n return result;\n}\n/** Build the request or response part of a replay network breadcrumb that was skipped. */\n\n\nfunction buildSkippedNetworkRequestOrResponse(bodySize) {\n return {\n headers: {},\n size: bodySize,\n _meta: {\n warnings: ['URL_SKIPPED']\n }\n };\n}\n/** Build the request or response part of a replay network breadcrumb. */\n\n\nfunction buildNetworkRequestOrResponse(headers, bodySize, body) {\n if (!bodySize && Object.keys(headers).length === 0) {\n return undefined;\n }\n\n if (!bodySize) {\n return {\n headers: headers\n };\n }\n\n if (!body) {\n return {\n headers: headers,\n size: bodySize\n };\n }\n\n var info = {\n headers: headers,\n size: bodySize\n };\n\n var _normalizeNetworkBody = normalizeNetworkBody(body),\n normalizedBody = _normalizeNetworkBody.body,\n warnings = _normalizeNetworkBody.warnings;\n\n info.body = normalizedBody;\n\n if (warnings && warnings.length > 0) {\n info._meta = {\n warnings: warnings\n };\n }\n\n return info;\n}\n/** Filter a set of headers */\n\n\nfunction getAllowedHeaders(headers, allowedHeaders) {\n return Object.keys(headers).reduce(function (filteredHeaders, key) {\n var normalizedKey = key.toLowerCase(); // Avoid putting empty strings into the headers\n\n if (allowedHeaders.includes(normalizedKey) && headers[key]) {\n filteredHeaders[normalizedKey] = headers[key];\n }\n\n return filteredHeaders;\n }, {});\n}\n\nfunction _serializeFormData(formData) {\n // This is a bit simplified, but gives us a decent estimate\n // This converts e.g. { name: 'Anne Smith', age: 13 } to 'name=Anne+Smith&age=13'\n // @ts-expect-error passing FormData to URLSearchParams actually works\n return new URLSearchParams(formData).toString();\n}\n\nfunction normalizeNetworkBody(body) {\n if (!body || typeof body !== 'string') {\n return {\n body: body\n };\n }\n\n var exceedsSizeLimit = body.length > NETWORK_BODY_MAX_SIZE;\n\n var isProbablyJson = _strIsProbablyJson(body);\n\n if (exceedsSizeLimit) {\n var truncatedBody = body.slice(0, NETWORK_BODY_MAX_SIZE);\n\n if (isProbablyJson) {\n return {\n body: truncatedBody,\n warnings: ['MAYBE_JSON_TRUNCATED']\n };\n }\n\n return {\n body: \"\".concat(truncatedBody, \"\\u2026\"),\n warnings: ['TEXT_TRUNCATED']\n };\n }\n\n if (isProbablyJson) {\n try {\n var jsonBody = JSON.parse(body);\n return {\n body: jsonBody\n };\n } catch (e3) {// fall back to just send the body as string\n }\n }\n\n return {\n body: body\n };\n}\n\nfunction _strIsProbablyJson(str) {\n var first = str[0];\n var last = str[str.length - 1]; // Simple check: If this does not start & end with {} or [], it's not JSON\n\n return first === '[' && last === ']' || first === '{' && last === '}';\n}\n/** Match an URL against a list of strings/Regex. */\n\n\nfunction urlMatches(url, urls) {\n var fullUrl = getFullUrl(url);\n return stringMatchesSomePattern(fullUrl, urls);\n}\n/** exported for tests */\n\n\nfunction getFullUrl(url) {\n var baseURI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : WINDOW.document.baseURI;\n\n // Short circuit for common cases:\n if (url.startsWith('http://') || url.startsWith('https://') || url.startsWith(WINDOW.location.origin)) {\n return url;\n }\n\n var fixedUrl = new URL(url, baseURI); // If these do not match, we are not dealing with a relative URL, so just return it\n\n if (fixedUrl.origin !== new URL(baseURI).origin) {\n return url;\n }\n\n var fullUrl = fixedUrl.href; // Remove trailing slashes, if they don't match the original URL\n\n if (!url.endsWith('/') && fullUrl.endsWith('/')) {\n return fullUrl.slice(0, -1);\n }\n\n return fullUrl;\n}\n/**\n * Capture a fetch breadcrumb to a replay.\n * This adds additional data (where approriate).\n */\n\n\nfunction captureFetchBreadcrumbToReplay(_x5, _x6, _x7) {\n return _captureFetchBreadcrumbToReplay.apply(this, arguments);\n}\n/**\n * Enrich a breadcrumb with additional data.\n * This has to be sync & mutate the given breadcrumb,\n * as the breadcrumb is afterwards consumed by other handlers.\n */\n\n\nfunction _captureFetchBreadcrumbToReplay() {\n _captureFetchBreadcrumbToReplay = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(breadcrumb, hint, options) {\n var data, result;\n return _regeneratorRuntime.wrap(function _callee12$(_context13) {\n while (1) {\n switch (_context13.prev = _context13.next) {\n case 0:\n _context13.prev = 0;\n _context13.next = 3;\n return _prepareFetchData(breadcrumb, hint, options);\n\n case 3:\n data = _context13.sent;\n // Create a replay performance entry from this breadcrumb\n result = makeNetworkReplayBreadcrumb('resource.fetch', data);\n addNetworkBreadcrumb(options.replay, result);\n _context13.next = 11;\n break;\n\n case 8:\n _context13.prev = 8;\n _context13.t0 = _context13[\"catch\"](0);\n DEBUG_BUILD && logger.error('[Replay] Failed to capture fetch breadcrumb', _context13.t0);\n\n case 11:\n case \"end\":\n return _context13.stop();\n }\n }\n }, _callee12, null, [[0, 8]]);\n }));\n return _captureFetchBreadcrumbToReplay.apply(this, arguments);\n}\n\nfunction enrichFetchBreadcrumb(breadcrumb, hint, options) {\n var input = hint.input,\n response = hint.response;\n var body = input ? _getFetchRequestArgBody(input) : undefined;\n var reqSize = getBodySize(body, options.textEncoder);\n var resSize = response ? parseContentLengthHeader(response.headers.get('content-length')) : undefined;\n\n if (reqSize !== undefined) {\n breadcrumb.data.request_body_size = reqSize;\n }\n\n if (resSize !== undefined) {\n breadcrumb.data.response_body_size = resSize;\n }\n}\n\nfunction _prepareFetchData(_x8, _x9, _x10) {\n return _prepareFetchData2.apply(this, arguments);\n}\n\nfunction _prepareFetchData2() {\n _prepareFetchData2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(breadcrumb, hint, options) {\n var now, _hint$startTimestamp2, startTimestamp, _hint$endTimestamp2, endTimestamp, _breadcrumb$data2, url, method, _breadcrumb$data2$sta, statusCode, requestBodySize, responseBodySize, captureDetails, request, response;\n\n return _regeneratorRuntime.wrap(function _callee13$(_context14) {\n while (1) {\n switch (_context14.prev = _context14.next) {\n case 0:\n now = Date.now();\n _hint$startTimestamp2 = hint.startTimestamp, startTimestamp = _hint$startTimestamp2 === void 0 ? now : _hint$startTimestamp2, _hint$endTimestamp2 = hint.endTimestamp, endTimestamp = _hint$endTimestamp2 === void 0 ? now : _hint$endTimestamp2;\n _breadcrumb$data2 = breadcrumb.data, url = _breadcrumb$data2.url, method = _breadcrumb$data2.method, _breadcrumb$data2$sta = _breadcrumb$data2.status_code, statusCode = _breadcrumb$data2$sta === void 0 ? 0 : _breadcrumb$data2$sta, requestBodySize = _breadcrumb$data2.request_body_size, responseBodySize = _breadcrumb$data2.response_body_size;\n captureDetails = urlMatches(url, options.networkDetailAllowUrls) && !urlMatches(url, options.networkDetailDenyUrls);\n request = captureDetails ? _getRequestInfo(options, hint.input, requestBodySize) : buildSkippedNetworkRequestOrResponse(requestBodySize);\n _context14.next = 7;\n return _getResponseInfo(captureDetails, options, hint.response, responseBodySize);\n\n case 7:\n response = _context14.sent;\n return _context14.abrupt(\"return\", {\n startTimestamp: startTimestamp,\n endTimestamp: endTimestamp,\n url: url,\n method: method,\n statusCode: statusCode,\n request: request,\n response: response\n });\n\n case 9:\n case \"end\":\n return _context14.stop();\n }\n }\n }, _callee13);\n }));\n return _prepareFetchData2.apply(this, arguments);\n}\n\nfunction _getRequestInfo(_ref34, input, requestBodySize) {\n var networkCaptureBodies = _ref34.networkCaptureBodies,\n networkRequestHeaders = _ref34.networkRequestHeaders;\n var headers = input ? getRequestHeaders(input, networkRequestHeaders) : {};\n\n if (!networkCaptureBodies) {\n return buildNetworkRequestOrResponse(headers, requestBodySize, undefined);\n } // We only want to transmit string or string-like bodies\n\n\n var requestBody = _getFetchRequestArgBody(input);\n\n var _getBodyString = getBodyString(requestBody),\n _getBodyString2 = _slicedToArray(_getBodyString, 2),\n bodyStr = _getBodyString2[0],\n warning = _getBodyString2[1];\n\n var data = buildNetworkRequestOrResponse(headers, requestBodySize, bodyStr);\n\n if (warning) {\n return mergeWarning(data, warning);\n }\n\n return data;\n}\n/** Exported only for tests. */\n\n\nfunction _getResponseInfo(_x11, _x12, _x13, _x14) {\n return _getResponseInfo2.apply(this, arguments);\n}\n\nfunction _getResponseInfo2() {\n _getResponseInfo2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(captureDetails, _ref35, response, responseBodySize) {\n var networkCaptureBodies, textEncoder, networkResponseHeaders, headers, _yield$_parseFetchRes, _yield$_parseFetchRes2, bodyText, warning, result;\n\n return _regeneratorRuntime.wrap(function _callee14$(_context15) {\n while (1) {\n switch (_context15.prev = _context15.next) {\n case 0:\n networkCaptureBodies = _ref35.networkCaptureBodies, textEncoder = _ref35.textEncoder, networkResponseHeaders = _ref35.networkResponseHeaders;\n\n if (!(!captureDetails && responseBodySize !== undefined)) {\n _context15.next = 3;\n break;\n }\n\n return _context15.abrupt(\"return\", buildSkippedNetworkRequestOrResponse(responseBodySize));\n\n case 3:\n headers = response ? getAllHeaders(response.headers, networkResponseHeaders) : {};\n\n if (!(!response || !networkCaptureBodies && responseBodySize !== undefined)) {\n _context15.next = 6;\n break;\n }\n\n return _context15.abrupt(\"return\", buildNetworkRequestOrResponse(headers, responseBodySize, undefined));\n\n case 6:\n _context15.next = 8;\n return _parseFetchResponseBody(response);\n\n case 8:\n _yield$_parseFetchRes = _context15.sent;\n _yield$_parseFetchRes2 = _slicedToArray(_yield$_parseFetchRes, 2);\n bodyText = _yield$_parseFetchRes2[0];\n warning = _yield$_parseFetchRes2[1];\n result = getResponseData(bodyText, {\n networkCaptureBodies: networkCaptureBodies,\n textEncoder: textEncoder,\n responseBodySize: responseBodySize,\n captureDetails: captureDetails,\n headers: headers\n });\n\n if (!warning) {\n _context15.next = 15;\n break;\n }\n\n return _context15.abrupt(\"return\", mergeWarning(result, warning));\n\n case 15:\n return _context15.abrupt(\"return\", result);\n\n case 16:\n case \"end\":\n return _context15.stop();\n }\n }\n }, _callee14);\n }));\n return _getResponseInfo2.apply(this, arguments);\n}\n\nfunction getResponseData(bodyText, _ref36) {\n var networkCaptureBodies = _ref36.networkCaptureBodies,\n textEncoder = _ref36.textEncoder,\n responseBodySize = _ref36.responseBodySize,\n captureDetails = _ref36.captureDetails,\n headers = _ref36.headers;\n\n try {\n var size = bodyText && bodyText.length && responseBodySize === undefined ? getBodySize(bodyText, textEncoder) : responseBodySize;\n\n if (!captureDetails) {\n return buildSkippedNetworkRequestOrResponse(size);\n }\n\n if (networkCaptureBodies) {\n return buildNetworkRequestOrResponse(headers, size, bodyText);\n }\n\n return buildNetworkRequestOrResponse(headers, size, undefined);\n } catch (error) {\n DEBUG_BUILD && logger.warn('[Replay] Failed to serialize response body', error); // fallback\n\n return buildNetworkRequestOrResponse(headers, responseBodySize, undefined);\n }\n}\n\nfunction _parseFetchResponseBody(_x15) {\n return _parseFetchResponseBody2.apply(this, arguments);\n}\n\nfunction _parseFetchResponseBody2() {\n _parseFetchResponseBody2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(response) {\n var res, text;\n return _regeneratorRuntime.wrap(function _callee15$(_context16) {\n while (1) {\n switch (_context16.prev = _context16.next) {\n case 0:\n res = _tryCloneResponse(response);\n\n if (res) {\n _context16.next = 3;\n break;\n }\n\n return _context16.abrupt(\"return\", [undefined, 'BODY_PARSE_ERROR']);\n\n case 3:\n _context16.prev = 3;\n _context16.next = 6;\n return _tryGetResponseText(res);\n\n case 6:\n text = _context16.sent;\n return _context16.abrupt(\"return\", [text]);\n\n case 10:\n _context16.prev = 10;\n _context16.t0 = _context16[\"catch\"](3);\n DEBUG_BUILD && logger.warn('[Replay] Failed to get text body from response', _context16.t0);\n return _context16.abrupt(\"return\", [undefined, 'BODY_PARSE_ERROR']);\n\n case 14:\n case \"end\":\n return _context16.stop();\n }\n }\n }, _callee15, null, [[3, 10]]);\n }));\n return _parseFetchResponseBody2.apply(this, arguments);\n}\n\nfunction _getFetchRequestArgBody() {\n var fetchArgs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n // We only support getting the body from the fetch options\n if (fetchArgs.length !== 2 || _typeof(fetchArgs[1]) !== 'object') {\n return undefined;\n }\n\n return fetchArgs[1].body;\n}\n\nfunction getAllHeaders(headers, allowedHeaders) {\n var allHeaders = {};\n allowedHeaders.forEach(function (header) {\n if (headers.get(header)) {\n allHeaders[header] = headers.get(header);\n }\n });\n return allHeaders;\n}\n\nfunction getRequestHeaders(fetchArgs, allowedHeaders) {\n if (fetchArgs.length === 1 && typeof fetchArgs[0] !== 'string') {\n return getHeadersFromOptions(fetchArgs[0], allowedHeaders);\n }\n\n if (fetchArgs.length === 2) {\n return getHeadersFromOptions(fetchArgs[1], allowedHeaders);\n }\n\n return {};\n}\n\nfunction getHeadersFromOptions(input, allowedHeaders) {\n if (!input) {\n return {};\n }\n\n var headers = input.headers;\n\n if (!headers) {\n return {};\n }\n\n if (headers instanceof Headers) {\n return getAllHeaders(headers, allowedHeaders);\n } // We do not support this, as it is not really documented (anymore?)\n\n\n if (Array.isArray(headers)) {\n return {};\n }\n\n return getAllowedHeaders(headers, allowedHeaders);\n}\n\nfunction _tryCloneResponse(response) {\n try {\n // We have to clone this, as the body can only be read once\n return response.clone();\n } catch (error) {\n // this can throw if the response was already consumed before\n DEBUG_BUILD && logger.warn('[Replay] Failed to clone response body', error);\n }\n}\n/**\n * Get the response body of a fetch request, or timeout after 500ms.\n * Fetch can return a streaming body, that may not resolve (or not for a long time).\n * If that happens, we rather abort after a short time than keep waiting for this.\n */\n\n\nfunction _tryGetResponseText(response) {\n return new Promise(function (resolve, reject) {\n var timeout = setTimeout(function () {\n return reject(new Error('Timeout while trying to read response body'));\n }, 500);\n\n _getResponseText(response).then(function (txt) {\n return resolve(txt);\n }, function (reason) {\n return reject(reason);\n }).finally(function () {\n return clearTimeout(timeout);\n });\n });\n}\n\nfunction _getResponseText(_x16) {\n return _getResponseText2.apply(this, arguments);\n}\n/**\n * Capture an XHR breadcrumb to a replay.\n * This adds additional data (where approriate).\n */\n\n\nfunction _getResponseText2() {\n _getResponseText2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(response) {\n return _regeneratorRuntime.wrap(function _callee16$(_context17) {\n while (1) {\n switch (_context17.prev = _context17.next) {\n case 0:\n _context17.next = 2;\n return response.text();\n\n case 2:\n return _context17.abrupt(\"return\", _context17.sent);\n\n case 3:\n case \"end\":\n return _context17.stop();\n }\n }\n }, _callee16);\n }));\n return _getResponseText2.apply(this, arguments);\n}\n\nfunction captureXhrBreadcrumbToReplay(_x17, _x18, _x19) {\n return _captureXhrBreadcrumbToReplay.apply(this, arguments);\n}\n/**\n * Enrich a breadcrumb with additional data.\n * This has to be sync & mutate the given breadcrumb,\n * as the breadcrumb is afterwards consumed by other handlers.\n */\n\n\nfunction _captureXhrBreadcrumbToReplay() {\n _captureXhrBreadcrumbToReplay = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(breadcrumb, hint, options) {\n var data, result;\n return _regeneratorRuntime.wrap(function _callee17$(_context18) {\n while (1) {\n switch (_context18.prev = _context18.next) {\n case 0:\n try {\n data = _prepareXhrData(breadcrumb, hint, options); // Create a replay performance entry from this breadcrumb\n\n result = makeNetworkReplayBreadcrumb('resource.xhr', data);\n addNetworkBreadcrumb(options.replay, result);\n } catch (error) {\n DEBUG_BUILD && logger.error('[Replay] Failed to capture xhr breadcrumb', error);\n }\n\n case 1:\n case \"end\":\n return _context18.stop();\n }\n }\n }, _callee17);\n }));\n return _captureXhrBreadcrumbToReplay.apply(this, arguments);\n}\n\nfunction enrichXhrBreadcrumb(breadcrumb, hint, options) {\n var xhr = hint.xhr,\n input = hint.input;\n\n if (!xhr) {\n return;\n }\n\n var reqSize = getBodySize(input, options.textEncoder);\n var resSize = xhr.getResponseHeader('content-length') ? parseContentLengthHeader(xhr.getResponseHeader('content-length')) : _getBodySize(xhr.response, xhr.responseType, options.textEncoder);\n\n if (reqSize !== undefined) {\n breadcrumb.data.request_body_size = reqSize;\n }\n\n if (resSize !== undefined) {\n breadcrumb.data.response_body_size = resSize;\n }\n}\n\nfunction _prepareXhrData(breadcrumb, hint, options) {\n var now = Date.now();\n var _hint$startTimestamp = hint.startTimestamp,\n startTimestamp = _hint$startTimestamp === void 0 ? now : _hint$startTimestamp,\n _hint$endTimestamp = hint.endTimestamp,\n endTimestamp = _hint$endTimestamp === void 0 ? now : _hint$endTimestamp,\n input = hint.input,\n xhr = hint.xhr;\n var _breadcrumb$data = breadcrumb.data,\n url = _breadcrumb$data.url,\n method = _breadcrumb$data.method,\n _breadcrumb$data$stat = _breadcrumb$data.status_code,\n statusCode = _breadcrumb$data$stat === void 0 ? 0 : _breadcrumb$data$stat,\n requestBodySize = _breadcrumb$data.request_body_size,\n responseBodySize = _breadcrumb$data.response_body_size;\n\n if (!url) {\n return null;\n }\n\n if (!xhr || !urlMatches(url, options.networkDetailAllowUrls) || urlMatches(url, options.networkDetailDenyUrls)) {\n var _request = buildSkippedNetworkRequestOrResponse(requestBodySize);\n\n var _response = buildSkippedNetworkRequestOrResponse(responseBodySize);\n\n return {\n startTimestamp: startTimestamp,\n endTimestamp: endTimestamp,\n url: url,\n method: method,\n statusCode: statusCode,\n request: _request,\n response: _response\n };\n }\n\n var xhrInfo = xhr[SENTRY_XHR_DATA_KEY];\n var networkRequestHeaders = xhrInfo ? getAllowedHeaders(xhrInfo.request_headers, options.networkRequestHeaders) : {};\n var networkResponseHeaders = getAllowedHeaders(getResponseHeaders(xhr), options.networkResponseHeaders);\n\n var _ref37 = options.networkCaptureBodies ? getBodyString(input) : [undefined],\n _ref38 = _slicedToArray(_ref37, 2),\n requestBody = _ref38[0],\n requestWarning = _ref38[1];\n\n var _ref39 = options.networkCaptureBodies ? _getXhrResponseBody(xhr) : [undefined],\n _ref40 = _slicedToArray(_ref39, 2),\n responseBody = _ref40[0],\n responseWarning = _ref40[1];\n\n var request = buildNetworkRequestOrResponse(networkRequestHeaders, requestBodySize, requestBody);\n var response = buildNetworkRequestOrResponse(networkResponseHeaders, responseBodySize, responseBody);\n return {\n startTimestamp: startTimestamp,\n endTimestamp: endTimestamp,\n url: url,\n method: method,\n statusCode: statusCode,\n request: requestWarning ? mergeWarning(request, requestWarning) : request,\n response: responseWarning ? mergeWarning(response, responseWarning) : response\n };\n}\n\nfunction getResponseHeaders(xhr) {\n var headers = xhr.getAllResponseHeaders();\n\n if (!headers) {\n return {};\n }\n\n return headers.split('\\r\\n').reduce(function (acc, line) {\n var _line$split = line.split(': '),\n _line$split2 = _slicedToArray(_line$split, 2),\n key = _line$split2[0],\n value = _line$split2[1];\n\n acc[key.toLowerCase()] = value;\n return acc;\n }, {});\n}\n\nfunction _getXhrResponseBody(xhr) {\n // We collect errors that happen, but only log them if we can't get any response body\n var errors = [];\n\n try {\n return [xhr.responseText];\n } catch (e) {\n errors.push(e);\n } // Try to manually parse the response body, if responseText fails\n\n\n try {\n return _parseXhrResponse(xhr.response, xhr.responseType);\n } catch (e) {\n errors.push(e);\n }\n\n DEBUG_BUILD && logger.warn.apply(logger, ['[Replay] Failed to get xhr response body'].concat(errors));\n return [undefined];\n}\n/**\n * Get the string representation of the XHR response.\n * Based on MDN, these are the possible types of the response:\n * string\n * ArrayBuffer\n * Blob\n * Document\n * POJO\n *\n * Exported only for tests.\n */\n\n\nfunction _parseXhrResponse(body, responseType) {\n try {\n if (typeof body === 'string') {\n return [body];\n }\n\n if (body instanceof Document) {\n return [body.body.outerHTML];\n }\n\n if (responseType === 'json' && body && _typeof(body) === 'object') {\n return [JSON.stringify(body)];\n }\n\n if (!body) {\n return [undefined];\n }\n } catch (e2) {\n DEBUG_BUILD && logger.warn('[Replay] Failed to serialize body', body);\n return [undefined, 'BODY_PARSE_ERROR'];\n }\n\n DEBUG_BUILD && logger.info('[Replay] Skipping network body because of body type', body);\n return [undefined, 'UNPARSEABLE_BODY_TYPE'];\n}\n\nfunction _getBodySize(body, responseType, textEncoder) {\n try {\n var bodyStr = responseType === 'json' && body && _typeof(body) === 'object' ? JSON.stringify(body) : body;\n return getBodySize(bodyStr, textEncoder);\n } catch (e3) {\n return undefined;\n }\n}\n/**\n * This method does two things:\n * - It enriches the regular XHR/fetch breadcrumbs with request/response size data\n * - It captures the XHR/fetch breadcrumbs to the replay\n * (enriching it with further data that is _not_ added to the regular breadcrumbs)\n */\n\n\nfunction handleNetworkBreadcrumbs(replay) {\n var client = getClient();\n\n try {\n var textEncoder = new TextEncoder();\n\n var _replay$getOptions2 = replay.getOptions(),\n networkDetailAllowUrls = _replay$getOptions2.networkDetailAllowUrls,\n networkDetailDenyUrls = _replay$getOptions2.networkDetailDenyUrls,\n networkCaptureBodies = _replay$getOptions2.networkCaptureBodies,\n networkRequestHeaders = _replay$getOptions2.networkRequestHeaders,\n networkResponseHeaders = _replay$getOptions2.networkResponseHeaders;\n\n var options = {\n replay: replay,\n textEncoder: textEncoder,\n networkDetailAllowUrls: networkDetailAllowUrls,\n networkDetailDenyUrls: networkDetailDenyUrls,\n networkCaptureBodies: networkCaptureBodies,\n networkRequestHeaders: networkRequestHeaders,\n networkResponseHeaders: networkResponseHeaders\n };\n\n if (client && client.on) {\n client.on('beforeAddBreadcrumb', function (breadcrumb, hint) {\n return beforeAddNetworkBreadcrumb(options, breadcrumb, hint);\n });\n } else {\n // Fallback behavior\n addFetchInstrumentationHandler(handleFetchSpanListener(replay));\n addXhrInstrumentationHandler(handleXhrSpanListener(replay));\n }\n } catch (e2) {// Do nothing\n }\n}\n/** just exported for tests */\n\n\nfunction beforeAddNetworkBreadcrumb(options, breadcrumb, hint) {\n if (!breadcrumb.data) {\n return;\n }\n\n try {\n if (_isXhrBreadcrumb(breadcrumb) && _isXhrHint(hint)) {\n // This has to be sync, as we need to ensure the breadcrumb is enriched in the same tick\n // Because the hook runs synchronously, and the breadcrumb is afterwards passed on\n // So any async mutations to it will not be reflected in the final breadcrumb\n enrichXhrBreadcrumb(breadcrumb, hint, options); // This call should not reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n\n captureXhrBreadcrumbToReplay(breadcrumb, hint, options);\n }\n\n if (_isFetchBreadcrumb(breadcrumb) && _isFetchHint(hint)) {\n // This has to be sync, as we need to ensure the breadcrumb is enriched in the same tick\n // Because the hook runs synchronously, and the breadcrumb is afterwards passed on\n // So any async mutations to it will not be reflected in the final breadcrumb\n enrichFetchBreadcrumb(breadcrumb, hint, options); // This call should not reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n\n captureFetchBreadcrumbToReplay(breadcrumb, hint, options);\n }\n } catch (e) {\n DEBUG_BUILD && logger.warn('Error when enriching network breadcrumb');\n }\n}\n\nfunction _isXhrBreadcrumb(breadcrumb) {\n return breadcrumb.category === 'xhr';\n}\n\nfunction _isFetchBreadcrumb(breadcrumb) {\n return breadcrumb.category === 'fetch';\n}\n\nfunction _isXhrHint(hint) {\n return hint && hint.xhr;\n}\n\nfunction _isFetchHint(hint) {\n return hint && hint.response;\n}\n\nvar _LAST_BREADCRUMB = null;\n\nfunction isBreadcrumbWithCategory(breadcrumb) {\n return !!breadcrumb.category;\n}\n\nvar handleScopeListener = function handleScopeListener(replay) {\n return function (scope) {\n if (!replay.isEnabled()) {\n return;\n }\n\n var result = handleScope(scope);\n\n if (!result) {\n return;\n }\n\n addBreadcrumbEvent(replay, result);\n };\n};\n/**\n * An event handler to handle scope changes.\n */\n\n\nfunction handleScope(scope) {\n // TODO (v8): Remove this guard. This was put in place because we introduced\n // Scope.getLastBreadcrumb mid-v7 which caused incompatibilities with older SDKs.\n // For now, we'll just return null if the method doesn't exist but we should eventually\n // get rid of this guard.\n var newBreadcrumb = scope.getLastBreadcrumb && scope.getLastBreadcrumb(); // Listener can be called when breadcrumbs have not changed, so we store the\n // reference to the last crumb and only return a crumb if it has changed\n\n if (_LAST_BREADCRUMB === newBreadcrumb || !newBreadcrumb) {\n return null;\n }\n\n _LAST_BREADCRUMB = newBreadcrumb;\n\n if (!isBreadcrumbWithCategory(newBreadcrumb) || ['fetch', 'xhr', 'sentry.event', 'sentry.transaction'].includes(newBreadcrumb.category) || newBreadcrumb.category.startsWith('ui.')) {\n return null;\n }\n\n if (newBreadcrumb.category === 'console') {\n return normalizeConsoleBreadcrumb(newBreadcrumb);\n }\n\n return createBreadcrumb(newBreadcrumb);\n}\n/** exported for tests only */\n\n\nfunction normalizeConsoleBreadcrumb(breadcrumb) {\n var args = breadcrumb.data && breadcrumb.data.arguments;\n\n if (!Array.isArray(args) || args.length === 0) {\n return createBreadcrumb(breadcrumb);\n }\n\n var isTruncated = false; // Avoid giant args captures\n\n var normalizedArgs = args.map(function (arg) {\n if (!arg) {\n return arg;\n }\n\n if (typeof arg === 'string') {\n if (arg.length > CONSOLE_ARG_MAX_SIZE) {\n isTruncated = true;\n return \"\".concat(arg.slice(0, CONSOLE_ARG_MAX_SIZE), \"\\u2026\");\n }\n\n return arg;\n }\n\n if (_typeof(arg) === 'object') {\n try {\n var normalizedArg = normalize(arg, 7);\n var stringified = JSON.stringify(normalizedArg);\n\n if (stringified.length > CONSOLE_ARG_MAX_SIZE) {\n isTruncated = true; // We use the pretty printed JSON string here as a base\n\n return \"\".concat(JSON.stringify(normalizedArg, null, 2).slice(0, CONSOLE_ARG_MAX_SIZE), \"\\u2026\");\n }\n\n return normalizedArg;\n } catch (e) {// fall back to default\n }\n }\n\n return arg;\n });\n return createBreadcrumb(_objectSpread(_objectSpread({}, breadcrumb), {}, {\n data: _objectSpread(_objectSpread({}, breadcrumb.data), {}, {\n arguments: normalizedArgs\n }, isTruncated ? {\n _meta: {\n warnings: ['CONSOLE_ARG_TRUNCATED']\n }\n } : {})\n }));\n}\n/**\n * Add global listeners that cannot be removed.\n */\n\n\nfunction addGlobalListeners(replay) {\n // Listeners from core SDK //\n var scope = getCurrentScope();\n var client = getClient();\n scope.addScopeListener(handleScopeListener(replay));\n addClickKeypressInstrumentationHandler(handleDomListener(replay));\n addHistoryInstrumentationHandler(handleHistorySpanListener(replay));\n handleNetworkBreadcrumbs(replay); // Tag all (non replay) events that get sent to Sentry with the current\n // replay ID so that we can reference them later in the UI\n\n var eventProcessor = handleGlobalEventListener(replay, !hasHooks(client));\n\n if (client && client.addEventProcessor) {\n client.addEventProcessor(eventProcessor);\n } else {\n addEventProcessor(eventProcessor);\n } // If a custom client has no hooks yet, we continue to use the \"old\" implementation\n\n\n if (hasHooks(client)) {\n client.on('beforeSendEvent', handleBeforeSendEvent(replay));\n client.on('afterSendEvent', handleAfterSendEvent(replay));\n client.on('createDsc', function (dsc) {\n var replayId = replay.getSessionId(); // We do not want to set the DSC when in buffer mode, as that means the replay has not been sent (yet)\n\n if (replayId && replay.isEnabled() && replay.recordingMode === 'session') {\n // Ensure to check that the session is still active - it could have expired in the meanwhile\n var isSessionActive = replay.checkAndHandleExpiredSession();\n\n if (isSessionActive) {\n dsc.replay_id = replayId;\n }\n }\n });\n client.on('startTransaction', function (transaction) {\n replay.lastTransaction = transaction;\n }); // We may be missing the initial startTransaction due to timing issues,\n // so we capture it on finish again.\n\n client.on('finishTransaction', function (transaction) {\n replay.lastTransaction = transaction;\n }); // We want to flush replay\n\n client.on('beforeSendFeedback', function (feedbackEvent, options) {\n var replayId = replay.getSessionId();\n\n if (options && options.includeReplay && replay.isEnabled() && replayId) {\n // This should never reject\n if (feedbackEvent.contexts && feedbackEvent.contexts.feedback) {\n feedbackEvent.contexts.feedback.replay_id = replayId;\n }\n }\n });\n }\n} // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nfunction hasHooks(client) {\n return !!(client && client.on);\n}\n/**\n * Create a \"span\" for the total amount of memory being used by JS objects\n * (including v8 internal objects).\n */\n\n\nfunction addMemoryEntry(_x20) {\n return _addMemoryEntry.apply(this, arguments);\n}\n\nfunction _addMemoryEntry() {\n _addMemoryEntry = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(replay) {\n return _regeneratorRuntime.wrap(function _callee18$(_context19) {\n while (1) {\n switch (_context19.prev = _context19.next) {\n case 0:\n _context19.prev = 0;\n return _context19.abrupt(\"return\", Promise.all(createPerformanceSpans(replay, [// @ts-expect-error memory doesn't exist on type Performance as the API is non-standard (we check that it exists above)\n createMemoryEntry(WINDOW.performance.memory)])));\n\n case 4:\n _context19.prev = 4;\n _context19.t0 = _context19[\"catch\"](0);\n return _context19.abrupt(\"return\", []);\n\n case 7:\n case \"end\":\n return _context19.stop();\n }\n }\n }, _callee18, null, [[0, 4]]);\n }));\n return _addMemoryEntry.apply(this, arguments);\n}\n\nfunction createMemoryEntry(memoryEntry) {\n var jsHeapSizeLimit = memoryEntry.jsHeapSizeLimit,\n totalJSHeapSize = memoryEntry.totalJSHeapSize,\n usedJSHeapSize = memoryEntry.usedJSHeapSize; // we don't want to use `getAbsoluteTime` because it adds the event time to the\n // time origin, so we get the current timestamp instead\n\n var time = Date.now() / 1000;\n return {\n type: 'memory',\n name: 'memory',\n start: time,\n end: time,\n data: {\n memory: {\n jsHeapSizeLimit: jsHeapSizeLimit,\n totalJSHeapSize: totalJSHeapSize,\n usedJSHeapSize: usedJSHeapSize\n }\n }\n };\n}\n/**\n * Heavily simplified debounce function based on lodash.debounce.\n *\n * This function takes a callback function (@param fun) and delays its invocation\n * by @param wait milliseconds. Optionally, a maxWait can be specified in @param options,\n * which ensures that the callback is invoked at least once after the specified max. wait time.\n *\n * @param func the function whose invocation is to be debounced\n * @param wait the minimum time until the function is invoked after it was called once\n * @param options the options object, which can contain the `maxWait` property\n *\n * @returns the debounced version of the function, which needs to be called at least once to start the\n * debouncing process. Subsequent calls will reset the debouncing timer and, in case @paramfunc\n * was already invoked in the meantime, return @param func's return value.\n * The debounced function has two additional properties:\n * - `flush`: Invokes the debounced function immediately and returns its return value\n * - `cancel`: Cancels the debouncing process and resets the debouncing timer\n */\n\n\nfunction debounce(func, wait, options) {\n var callbackReturnValue;\n var timerId;\n var maxTimerId;\n var maxWait = options && options.maxWait ? Math.max(options.maxWait, wait) : 0;\n\n function invokeFunc() {\n cancelTimers();\n callbackReturnValue = func();\n return callbackReturnValue;\n }\n\n function cancelTimers() {\n timerId !== undefined && clearTimeout(timerId);\n maxTimerId !== undefined && clearTimeout(maxTimerId);\n timerId = maxTimerId = undefined;\n }\n\n function flush() {\n if (timerId !== undefined || maxTimerId !== undefined) {\n return invokeFunc();\n }\n\n return callbackReturnValue;\n }\n\n function debounced() {\n if (timerId) {\n clearTimeout(timerId);\n }\n\n timerId = setTimeout(invokeFunc, wait);\n\n if (maxWait && maxTimerId === undefined) {\n maxTimerId = setTimeout(invokeFunc, maxWait);\n }\n\n return callbackReturnValue;\n }\n\n debounced.cancel = cancelTimers;\n debounced.flush = flush;\n return debounced;\n}\n/**\n * Handler for recording events.\n *\n * Adds to event buffer, and has varying flushing behaviors if the event was a checkout.\n */\n\n\nfunction getHandleRecordingEmit(replay) {\n var hadFirstEvent = false;\n return function (event, _isCheckout) {\n // If this is false, it means session is expired, create and a new session and wait for checkout\n if (!replay.checkAndHandleExpiredSession()) {\n DEBUG_BUILD && logger.warn('[Replay] Received replay event after session expired.');\n return;\n } // `_isCheckout` is only set when the checkout is due to `checkoutEveryNms`\n // We also want to treat the first event as a checkout, so we handle this specifically here\n\n\n var isCheckout = _isCheckout || !hadFirstEvent;\n hadFirstEvent = true;\n\n if (replay.clickDetector) {\n updateClickDetectorForRecordingEvent(replay.clickDetector, event);\n } // The handler returns `true` if we do not want to trigger debounced flush, `false` if we want to debounce flush.\n\n\n replay.addUpdate(function () {\n // The session is always started immediately on pageload/init, but for\n // error-only replays, it should reflect the most recent checkout\n // when an error occurs. Clear any state that happens before this current\n // checkout. This needs to happen before `addEvent()` which updates state\n // dependent on this reset.\n if (replay.recordingMode === 'buffer' && isCheckout) {\n replay.setInitialState();\n } // If the event is not added (e.g. due to being paused, disabled, or out of the max replay duration),\n // Skip all further steps\n\n\n if (!addEventSync(replay, event, isCheckout)) {\n // Return true to skip scheduling a debounced flush\n return true;\n } // Different behavior for full snapshots (type=2), ignore other event types\n // See https://github.com/rrweb-io/rrweb/blob/d8f9290ca496712aa1e7d472549480c4e7876594/packages/rrweb/src/types.ts#L16\n\n\n if (!isCheckout) {\n return false;\n } // Additionally, create a meta event that will capture certain SDK settings.\n // In order to handle buffer mode, this needs to either be done when we\n // receive checkout events or at flush time.\n //\n // `isCheckout` is always true, but want to be explicit that it should\n // only be added for checkouts\n\n\n addSettingsEvent(replay, isCheckout); // If there is a previousSessionId after a full snapshot occurs, then\n // the replay session was started due to session expiration. The new session\n // is started before triggering a new checkout and contains the id\n // of the previous session. Do not immediately flush in this case\n // to avoid capturing only the checkout and instead the replay will\n // be captured if they perform any follow-up actions.\n\n if (replay.session && replay.session.previousSessionId) {\n return true;\n } // When in buffer mode, make sure we adjust the session started date to the current earliest event of the buffer\n // this should usually be the timestamp of the checkout event, but to be safe...\n\n\n if (replay.recordingMode === 'buffer' && replay.session && replay.eventBuffer) {\n var earliestEvent = replay.eventBuffer.getEarliestTimestamp();\n\n if (earliestEvent) {\n logInfo(\"[Replay] Updating session start time to earliest event in buffer to \".concat(new Date(earliestEvent)), replay.getOptions()._experiments.traceInternals);\n replay.session.started = earliestEvent;\n\n if (replay.getOptions().stickySession) {\n saveSession(replay.session);\n }\n }\n }\n\n if (replay.recordingMode === 'session') {\n // If the full snapshot is due to an initial load, we will not have\n // a previous session ID. In this case, we want to buffer events\n // for a set amount of time before flushing. This can help avoid\n // capturing replays of users that immediately close the window.\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n void replay.flush();\n }\n\n return true;\n });\n };\n}\n/**\n * Exported for tests\n */\n\n\nfunction createOptionsEvent(replay) {\n var options = replay.getOptions();\n return {\n type: EventType.Custom,\n timestamp: Date.now(),\n data: {\n tag: 'options',\n payload: {\n shouldRecordCanvas: replay.isRecordingCanvas(),\n sessionSampleRate: options.sessionSampleRate,\n errorSampleRate: options.errorSampleRate,\n useCompressionOption: options.useCompression,\n blockAllMedia: options.blockAllMedia,\n maskAllText: options.maskAllText,\n maskAllInputs: options.maskAllInputs,\n useCompression: replay.eventBuffer ? replay.eventBuffer.type === 'worker' : false,\n networkDetailHasUrls: options.networkDetailAllowUrls.length > 0,\n networkCaptureBodies: options.networkCaptureBodies,\n networkRequestHasHeaders: options.networkRequestHeaders.length > 0,\n networkResponseHasHeaders: options.networkResponseHeaders.length > 0\n }\n }\n };\n}\n/**\n * Add a \"meta\" event that contains a simplified view on current configuration\n * options. This should only be included on the first segment of a recording.\n */\n\n\nfunction addSettingsEvent(replay, isCheckout) {\n // Only need to add this event when sending the first segment\n if (!isCheckout || !replay.session || replay.session.segmentId !== 0) {\n return;\n }\n\n addEventSync(replay, createOptionsEvent(replay), false);\n}\n/**\n * Create a replay envelope ready to be sent.\n * This includes both the replay event, as well as the recording data.\n */\n\n\nfunction createReplayEnvelope(replayEvent, recordingData, dsn, tunnel) {\n return createEnvelope(createEventEnvelopeHeaders(replayEvent, getSdkMetadataForEnvelopeHeader(replayEvent), tunnel, dsn), [[{\n type: 'replay_event'\n }, replayEvent], [{\n type: 'replay_recording',\n // If string then we need to encode to UTF8, otherwise will have\n // wrong size. TextEncoder has similar browser support to\n // MutationObserver, although it does not accept IE11.\n length: typeof recordingData === 'string' ? new TextEncoder().encode(recordingData).length : recordingData.length\n }, recordingData]]);\n}\n/**\n * Prepare the recording data ready to be sent.\n */\n\n\nfunction prepareRecordingData(_ref41) {\n var recordingData = _ref41.recordingData,\n headers = _ref41.headers;\n var payloadWithSequence; // XXX: newline is needed to separate sequence id from events\n\n var replayHeaders = \"\".concat(JSON.stringify(headers), \"\\n\");\n\n if (typeof recordingData === 'string') {\n payloadWithSequence = \"\".concat(replayHeaders).concat(recordingData);\n } else {\n var enc = new TextEncoder(); // XXX: newline is needed to separate sequence id from events\n\n var sequence = enc.encode(replayHeaders); // Merge the two Uint8Arrays\n\n payloadWithSequence = new Uint8Array(sequence.length + recordingData.length);\n payloadWithSequence.set(sequence);\n payloadWithSequence.set(recordingData, sequence.length);\n }\n\n return payloadWithSequence;\n}\n/**\n * Prepare a replay event & enrich it with the SDK metadata.\n */\n\n\nfunction prepareReplayEvent(_x21) {\n return _prepareReplayEvent.apply(this, arguments);\n}\n/**\n * Send replay attachment using `fetch()`\n */\n\n\nfunction _prepareReplayEvent() {\n _prepareReplayEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(_ref42) {\n var client, scope, event_id, event, integrations, eventHint, preparedEvent, metadata, _ref52, name, version;\n\n return _regeneratorRuntime.wrap(function _callee19$(_context20) {\n while (1) {\n switch (_context20.prev = _context20.next) {\n case 0:\n client = _ref42.client, scope = _ref42.scope, event_id = _ref42.replayId, event = _ref42.event;\n integrations = _typeof(client._integrations) === 'object' && client._integrations !== null && !Array.isArray(client._integrations) ? Object.keys(client._integrations) : undefined;\n eventHint = {\n event_id: event_id,\n integrations: integrations\n };\n\n if (client.emit) {\n client.emit('preprocessEvent', event, eventHint);\n }\n\n _context20.next = 6;\n return prepareEvent(client.getOptions(), event, eventHint, scope, client, getIsolationScope());\n\n case 6:\n preparedEvent = _context20.sent;\n\n if (preparedEvent) {\n _context20.next = 9;\n break;\n }\n\n return _context20.abrupt(\"return\", null);\n\n case 9:\n // This normally happens in browser client \"_prepareEvent\"\n // but since we do not use this private method from the client, but rather the plain import\n // we need to do this manually.\n preparedEvent.platform = preparedEvent.platform || 'javascript'; // extract the SDK name because `client._prepareEvent` doesn't add it to the event\n\n metadata = client.getSdkMetadata && client.getSdkMetadata();\n _ref52 = metadata && metadata.sdk || {}, name = _ref52.name, version = _ref52.version;\n preparedEvent.sdk = _objectSpread(_objectSpread({}, preparedEvent.sdk), {}, {\n name: name || 'sentry.javascript.unknown',\n version: version || '0.0.0'\n });\n return _context20.abrupt(\"return\", preparedEvent);\n\n case 14:\n case \"end\":\n return _context20.stop();\n }\n }\n }, _callee19);\n }));\n return _prepareReplayEvent.apply(this, arguments);\n}\n\nfunction sendReplayRequest(_x22) {\n return _sendReplayRequest.apply(this, arguments);\n}\n/**\n * This error indicates that the transport returned an invalid status code.\n */\n\n\nfunction _sendReplayRequest() {\n _sendReplayRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(_ref43) {\n var recordingData, replayId, segment_id, eventContext, timestamp, session, preparedRecordingData, urls, errorIds, traceIds, initialTimestamp, client, scope, transport, dsn, baseEvent, replayEvent, envelope, response, error, rateLimits;\n return _regeneratorRuntime.wrap(function _callee20$(_context21) {\n while (1) {\n switch (_context21.prev = _context21.next) {\n case 0:\n recordingData = _ref43.recordingData, replayId = _ref43.replayId, segment_id = _ref43.segmentId, eventContext = _ref43.eventContext, timestamp = _ref43.timestamp, session = _ref43.session;\n preparedRecordingData = prepareRecordingData({\n recordingData: recordingData,\n headers: {\n segment_id: segment_id\n }\n });\n urls = eventContext.urls, errorIds = eventContext.errorIds, traceIds = eventContext.traceIds, initialTimestamp = eventContext.initialTimestamp;\n client = getClient();\n scope = getCurrentScope();\n transport = client && client.getTransport();\n dsn = client && client.getDsn();\n\n if (!(!client || !transport || !dsn || !session.sampled)) {\n _context21.next = 9;\n break;\n }\n\n return _context21.abrupt(\"return\");\n\n case 9:\n baseEvent = {\n type: REPLAY_EVENT_NAME,\n replay_start_timestamp: initialTimestamp / 1000,\n timestamp: timestamp / 1000,\n error_ids: errorIds,\n trace_ids: traceIds,\n urls: urls,\n replay_id: replayId,\n segment_id: segment_id,\n replay_type: session.sampled\n };\n _context21.next = 12;\n return prepareReplayEvent({\n scope: scope,\n client: client,\n replayId: replayId,\n event: baseEvent\n });\n\n case 12:\n replayEvent = _context21.sent;\n\n if (replayEvent) {\n _context21.next = 17;\n break;\n }\n\n // Taken from baseclient's `_processEvent` method, where this is handled for errors/transactions\n client.recordDroppedEvent('event_processor', 'replay', baseEvent);\n logInfo('An event processor returned `null`, will not send event.');\n return _context21.abrupt(\"return\");\n\n case 17:\n /*\n For reference, the fully built event looks something like this:\n {\n \"type\": \"replay_event\",\n \"timestamp\": 1670837008.634,\n \"error_ids\": [\n \"errorId\"\n ],\n \"trace_ids\": [\n \"traceId\"\n ],\n \"urls\": [\n \"https://example.com\"\n ],\n \"replay_id\": \"eventId\",\n \"segment_id\": 3,\n \"replay_type\": \"error\",\n \"platform\": \"javascript\",\n \"event_id\": \"eventId\",\n \"environment\": \"production\",\n \"sdk\": {\n \"integrations\": [\n \"BrowserTracing\",\n \"Replay\"\n ],\n \"name\": \"sentry.javascript.browser\",\n \"version\": \"7.25.0\"\n },\n \"sdkProcessingMetadata\": {},\n \"contexts\": {\n },\n }\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 replayEvent.sdkProcessingMetadata;\n envelope = createReplayEnvelope(replayEvent, preparedRecordingData, dsn, client.getOptions().tunnel);\n _context21.prev = 19;\n _context21.next = 22;\n return transport.send(envelope);\n\n case 22:\n response = _context21.sent;\n _context21.next = 30;\n break;\n\n case 25:\n _context21.prev = 25;\n _context21.t0 = _context21[\"catch\"](19);\n error = new Error(UNABLE_TO_SEND_REPLAY);\n\n try {\n // In case browsers don't allow this property to be writable\n // @ts-expect-error This needs lib es2022 and newer\n error.cause = _context21.t0;\n } catch (e) {// nothing to do\n }\n\n throw error;\n\n case 30:\n if (response) {\n _context21.next = 32;\n break;\n }\n\n return _context21.abrupt(\"return\", response);\n\n case 32:\n if (!(typeof response.statusCode === 'number' && (response.statusCode < 200 || response.statusCode >= 300))) {\n _context21.next = 34;\n break;\n }\n\n throw new TransportStatusCodeError(response.statusCode);\n\n case 34:\n rateLimits = updateRateLimits({}, response);\n\n if (!isRateLimited(rateLimits, 'replay')) {\n _context21.next = 37;\n break;\n }\n\n throw new RateLimitError(rateLimits);\n\n case 37:\n return _context21.abrupt(\"return\", response);\n\n case 38:\n case \"end\":\n return _context21.stop();\n }\n }\n }, _callee20, null, [[19, 25]]);\n }));\n return _sendReplayRequest.apply(this, arguments);\n}\n\nvar TransportStatusCodeError = /*#__PURE__*/function (_Error2) {\n _inherits(TransportStatusCodeError, _Error2);\n\n var _super2 = _createSuper(TransportStatusCodeError);\n\n function TransportStatusCodeError(statusCode) {\n _classCallCheck(this, TransportStatusCodeError);\n\n return _super2.call(this, \"Transport returned status code \".concat(statusCode));\n }\n\n return _createClass(TransportStatusCodeError);\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n/**\n * This error indicates that we hit a rate limit API error.\n */\n\n\nvar RateLimitError = /*#__PURE__*/function (_Error3) {\n _inherits(RateLimitError, _Error3);\n\n var _super3 = _createSuper(RateLimitError);\n\n function RateLimitError(rateLimits) {\n var _this21;\n\n _classCallCheck(this, RateLimitError);\n\n _this21 = _super3.call(this, 'Rate limit hit');\n _this21.rateLimits = rateLimits;\n return _this21;\n }\n\n return _createClass(RateLimitError);\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n/**\n * Finalize and send the current replay event to Sentry\n */\n\n\nfunction sendReplay(_x23) {\n return _sendReplay.apply(this, arguments);\n}\n\nfunction _sendReplay() {\n _sendReplay = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(replayData) {\n var retryConfig,\n recordingData,\n options,\n error,\n _args22 = arguments;\n return _regeneratorRuntime.wrap(function _callee22$(_context23) {\n while (1) {\n switch (_context23.prev = _context23.next) {\n case 0:\n retryConfig = _args22.length > 1 && _args22[1] !== undefined ? _args22[1] : {\n count: 0,\n interval: RETRY_BASE_INTERVAL\n };\n recordingData = replayData.recordingData, options = replayData.options; // short circuit if there's no events to upload (this shouldn't happen as _runFlush makes this check)\n\n if (recordingData.length) {\n _context23.next = 4;\n break;\n }\n\n return _context23.abrupt(\"return\");\n\n case 4:\n _context23.prev = 4;\n _context23.next = 7;\n return sendReplayRequest(replayData);\n\n case 7:\n return _context23.abrupt(\"return\", true);\n\n case 10:\n _context23.prev = 10;\n _context23.t0 = _context23[\"catch\"](4);\n\n if (!(_context23.t0 instanceof TransportStatusCodeError || _context23.t0 instanceof RateLimitError)) {\n _context23.next = 14;\n break;\n }\n\n throw _context23.t0;\n\n case 14:\n // Capture error for every failed replay\n setContext('Replays', {\n _retryCount: retryConfig.count\n });\n\n if (DEBUG_BUILD && options._experiments && options._experiments.captureExceptions) {\n captureException(_context23.t0);\n } // If an error happened here, it's likely that uploading the attachment\n // failed, we'll can retry with the same events payload\n\n\n if (!(retryConfig.count >= RETRY_MAX_COUNT)) {\n _context23.next = 20;\n break;\n }\n\n error = new Error(\"\".concat(UNABLE_TO_SEND_REPLAY, \" - max retries exceeded\"));\n\n try {\n // In case browsers don't allow this property to be writable\n // @ts-expect-error This needs lib es2022 and newer\n error.cause = _context23.t0;\n } catch (e) {// nothing to do\n }\n\n throw error;\n\n case 20:\n // will retry in intervals of 5, 10, 30\n retryConfig.interval *= ++retryConfig.count;\n return _context23.abrupt(\"return\", new Promise(function (resolve, reject) {\n setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21() {\n return _regeneratorRuntime.wrap(function _callee21$(_context22) {\n while (1) {\n switch (_context22.prev = _context22.next) {\n case 0:\n _context22.prev = 0;\n _context22.next = 3;\n return sendReplay(replayData, retryConfig);\n\n case 3:\n resolve(true);\n _context22.next = 9;\n break;\n\n case 6:\n _context22.prev = 6;\n _context22.t0 = _context22[\"catch\"](0);\n reject(_context22.t0);\n\n case 9:\n case \"end\":\n return _context22.stop();\n }\n }\n }, _callee21, null, [[0, 6]]);\n })), retryConfig.interval);\n }));\n\n case 22:\n case \"end\":\n return _context23.stop();\n }\n }\n }, _callee22, null, [[4, 10]]);\n }));\n return _sendReplay.apply(this, arguments);\n}\n\nvar THROTTLED = '__THROTTLED';\nvar SKIPPED = '__SKIPPED';\n/**\n * Create a throttled function off a given function.\n * When calling the throttled function, it will call the original function only\n * if it hasn't been called more than `maxCount` times in the last `durationSeconds`.\n *\n * Returns `THROTTLED` if throttled for the first time, after that `SKIPPED`,\n * or else the return value of the original function.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\nfunction throttle(fn, maxCount, durationSeconds) {\n var counter = new Map();\n\n var _cleanup = function _cleanup(now) {\n var threshold = now - durationSeconds;\n counter.forEach(function (_value, key) {\n if (key < threshold) {\n counter.delete(key);\n }\n });\n };\n\n var _getTotalCount = function _getTotalCount() {\n return _toConsumableArray(counter.values()).reduce(function (a, b) {\n return a + b;\n }, 0);\n };\n\n var isThrottled = false;\n return function () {\n // Date in second-precision, which we use as basis for the throttling\n var now = Math.floor(Date.now() / 1000); // First, make sure to delete any old entries\n\n _cleanup(now); // If already over limit, do nothing\n\n\n if (_getTotalCount() >= maxCount) {\n var wasThrottled = isThrottled;\n isThrottled = true;\n return wasThrottled ? SKIPPED : THROTTLED;\n }\n\n isThrottled = false;\n var count = counter.get(now) || 0;\n counter.set(now, count + 1);\n return fn.apply(void 0, arguments);\n };\n}\n/* eslint-disable max-lines */\n// TODO: We might want to split this file up\n\n/**\n * The main replay container class, which holds all the state and methods for recording and sending replays.\n */\n\n\nvar ReplayContainer = /*#__PURE__*/function () {\n /**\n * Recording can happen in one of three modes:\n * - session: Record the whole session, sending it continuously\n * - buffer: Always keep the last 60s of recording, requires:\n * - having replaysOnErrorSampleRate > 0 to capture replay when an error occurs\n * - or calling `flush()` to send the replay\n */\n\n /**\n * The current or last active transcation.\n * This is only available when performance is enabled.\n */\n\n /**\n * These are here so we can overwrite them in tests etc.\n * @hidden\n */\n\n /**\n * Options to pass to `rrweb.record()`\n */\n\n /**\n * Timestamp of the last user activity. This lives across sessions.\n */\n\n /**\n * Is the integration currently active?\n */\n\n /**\n * Paused is a state where:\n * - DOM Recording is not listening at all\n * - Nothing will be added to event buffer (e.g. core SDK events)\n */\n\n /**\n * Have we attached listeners to the core SDK?\n * Note we have to track this as there is no way to remove instrumentation handlers.\n */\n\n /**\n * Function to stop recording\n */\n\n /**\n * Internal use for canvas recording options\n */\n function ReplayContainer(_ref44) {\n var _this22 = this;\n\n var options = _ref44.options,\n recordingOptions = _ref44.recordingOptions;\n\n _classCallCheck(this, ReplayContainer);\n\n ReplayContainer.prototype.__init.call(this);\n\n ReplayContainer.prototype.__init2.call(this);\n\n ReplayContainer.prototype.__init3.call(this);\n\n ReplayContainer.prototype.__init4.call(this);\n\n ReplayContainer.prototype.__init5.call(this);\n\n ReplayContainer.prototype.__init6.call(this);\n\n this.eventBuffer = null;\n this.performanceEntries = [];\n this.replayPerformanceEntries = [];\n this.recordingMode = 'session';\n this.timeouts = {\n sessionIdlePause: SESSION_IDLE_PAUSE_DURATION,\n sessionIdleExpire: SESSION_IDLE_EXPIRE_DURATION\n };\n this._lastActivity = Date.now();\n this._isEnabled = false;\n this._isPaused = false;\n this._hasInitializedCoreListeners = false;\n this._context = {\n errorIds: new Set(),\n traceIds: new Set(),\n urls: [],\n initialTimestamp: Date.now(),\n initialUrl: ''\n };\n this._recordingOptions = recordingOptions;\n this._options = options;\n this._debouncedFlush = debounce(function () {\n return _this22._flush();\n }, this._options.flushMinDelay, {\n maxWait: this._options.flushMaxDelay\n });\n this._throttledAddEvent = throttle(function (event, isCheckout) {\n return addEvent(_this22, event, isCheckout);\n }, // Max 300 events...\n 300, // ... per 5s\n 5);\n\n var _this$getOptions = this.getOptions(),\n slowClickTimeout = _this$getOptions.slowClickTimeout,\n slowClickIgnoreSelectors = _this$getOptions.slowClickIgnoreSelectors;\n\n var slowClickConfig = slowClickTimeout ? {\n threshold: Math.min(SLOW_CLICK_THRESHOLD, slowClickTimeout),\n timeout: slowClickTimeout,\n scrollTimeout: SLOW_CLICK_SCROLL_TIMEOUT,\n ignoreSelector: slowClickIgnoreSelectors ? slowClickIgnoreSelectors.join(',') : ''\n } : undefined;\n\n if (slowClickConfig) {\n this.clickDetector = new ClickDetector(this, slowClickConfig);\n }\n }\n /** Get the event context. */\n\n\n _createClass(ReplayContainer, [{\n key: \"getContext\",\n value: function getContext() {\n return this._context;\n }\n /** If recording is currently enabled. */\n\n }, {\n key: \"isEnabled\",\n value: function isEnabled() {\n return this._isEnabled;\n }\n /** If recording is currently paused. */\n\n }, {\n key: \"isPaused\",\n value: function isPaused() {\n return this._isPaused;\n }\n /**\n * Determine if canvas recording is enabled\n */\n\n }, {\n key: \"isRecordingCanvas\",\n value: function isRecordingCanvas() {\n return Boolean(this._canvas);\n }\n /** Get the replay integration options. */\n\n }, {\n key: \"getOptions\",\n value: function getOptions() {\n return this._options;\n }\n /**\n * Initializes the plugin based on sampling configuration. Should not be\n * called outside of constructor.\n */\n\n }, {\n key: \"initializeSampling\",\n value: function initializeSampling(previousSessionId) {\n var _this$_options = this._options,\n errorSampleRate = _this$_options.errorSampleRate,\n sessionSampleRate = _this$_options.sessionSampleRate; // If neither sample rate is > 0, then do nothing - user will need to call one of\n // `start()` or `startBuffering` themselves.\n\n if (errorSampleRate <= 0 && sessionSampleRate <= 0) {\n return;\n } // Otherwise if there is _any_ sample rate set, try to load an existing\n // session, or create a new one.\n\n\n this._initializeSessionForSampling(previousSessionId);\n\n if (!this.session) {\n // This should not happen, something wrong has occurred\n this._handleException(new Error('Unable to initialize and create session'));\n\n return;\n }\n\n if (this.session.sampled === false) {\n // This should only occur if `errorSampleRate` is 0 and was unsampled for\n // session-based replay. In this case there is nothing to do.\n return;\n } // If segmentId > 0, it means we've previously already captured this session\n // In this case, we still want to continue in `session` recording mode\n\n\n this.recordingMode = this.session.sampled === 'buffer' && this.session.segmentId === 0 ? 'buffer' : 'session';\n logInfoNextTick(\"[Replay] Starting replay in \".concat(this.recordingMode, \" mode\"), this._options._experiments.traceInternals);\n\n this._initializeRecording();\n }\n /**\n * Start a replay regardless of sampling rate. Calling this will always\n * create a new session. Will throw an error if replay is already in progress.\n *\n * Creates or loads a session, attaches listeners to varying events (DOM,\n * _performanceObserver, Recording, Sentry SDK, etc)\n */\n\n }, {\n key: \"start\",\n value: function start() {\n if (this._isEnabled && this.recordingMode === 'session') {\n throw new Error('Replay recording is already in progress');\n }\n\n if (this._isEnabled && this.recordingMode === 'buffer') {\n throw new Error('Replay buffering is in progress, call `flush()` to save the replay');\n }\n\n logInfoNextTick('[Replay] Starting replay in session mode', this._options._experiments.traceInternals); // Required as user activity is initially set in\n // constructor, so if `start()` is called after\n // session idle expiration, a replay will not be\n // created due to an idle timeout.\n\n this._updateUserActivity();\n\n var session = loadOrCreateSession({\n maxReplayDuration: this._options.maxReplayDuration,\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n traceInternals: this._options._experiments.traceInternals\n }, {\n stickySession: this._options.stickySession,\n // This is intentional: create a new session-based replay when calling `start()`\n sessionSampleRate: 1,\n allowBuffering: false\n });\n this.session = session;\n\n this._initializeRecording();\n }\n /**\n * Start replay buffering. Buffers until `flush()` is called or, if\n * `replaysOnErrorSampleRate` > 0, an error occurs.\n */\n\n }, {\n key: \"startBuffering\",\n value: function startBuffering() {\n if (this._isEnabled) {\n throw new Error('Replay recording is already in progress');\n }\n\n logInfoNextTick('[Replay] Starting replay in buffer mode', this._options._experiments.traceInternals);\n var session = loadOrCreateSession({\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n maxReplayDuration: this._options.maxReplayDuration,\n traceInternals: this._options._experiments.traceInternals\n }, {\n stickySession: this._options.stickySession,\n sessionSampleRate: 0,\n allowBuffering: true\n });\n this.session = session;\n this.recordingMode = 'buffer';\n\n this._initializeRecording();\n }\n /**\n * Start recording.\n *\n * Note that this will cause a new DOM checkout\n */\n\n }, {\n key: \"startRecording\",\n value: function startRecording() {\n try {\n var canvasOptions = this._canvas;\n this._stopRecording = record(_objectSpread(_objectSpread(_objectSpread({}, this._recordingOptions), this.recordingMode === 'buffer' && {\n checkoutEveryNms: BUFFER_CHECKOUT_TIME\n }), {}, {\n emit: getHandleRecordingEmit(this),\n onMutation: this._onMutationHandler\n }, canvasOptions ? {\n recordCanvas: canvasOptions.recordCanvas,\n getCanvasManager: canvasOptions.getCanvasManager,\n sampling: canvasOptions.sampling,\n dataURLOptions: canvasOptions.dataURLOptions\n } : {}));\n } catch (err) {\n this._handleException(err);\n }\n }\n /**\n * Stops the recording, if it was running.\n *\n * Returns true if it was previously stopped, or is now stopped,\n * otherwise false.\n */\n\n }, {\n key: \"stopRecording\",\n value: function stopRecording() {\n try {\n if (this._stopRecording) {\n this._stopRecording();\n\n this._stopRecording = undefined;\n }\n\n return true;\n } catch (err) {\n this._handleException(err);\n\n return false;\n }\n }\n /**\n * Currently, this needs to be manually called (e.g. for tests). Sentry SDK\n * does not support a teardown\n */\n\n }, {\n key: \"stop\",\n value: function () {\n var _stop = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {\n var _ref45,\n _ref45$forceFlush,\n forceFlush,\n reason,\n _args6 = arguments;\n\n return _regeneratorRuntime.wrap(function _callee6$(_context7) {\n while (1) {\n switch (_context7.prev = _context7.next) {\n case 0:\n _ref45 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, _ref45$forceFlush = _ref45.forceFlush, forceFlush = _ref45$forceFlush === void 0 ? false : _ref45$forceFlush, reason = _ref45.reason;\n\n if (this._isEnabled) {\n _context7.next = 3;\n break;\n }\n\n return _context7.abrupt(\"return\");\n\n case 3:\n // We can't move `_isEnabled` after awaiting a flush, otherwise we can\n // enter into an infinite loop when `stop()` is called while flushing.\n this._isEnabled = false;\n _context7.prev = 4;\n logInfo(\"[Replay] Stopping Replay\".concat(reason ? \" triggered by \".concat(reason) : ''), this._options._experiments.traceInternals);\n\n this._removeListeners();\n\n this.stopRecording();\n\n this._debouncedFlush.cancel(); // See comment above re: `_isEnabled`, we \"force\" a flush, ignoring the\n // `_isEnabled` state of the plugin since it was disabled above.\n\n\n if (!forceFlush) {\n _context7.next = 12;\n break;\n }\n\n _context7.next = 12;\n return this._flush({\n force: true\n });\n\n case 12:\n // After flush, destroy event buffer\n this.eventBuffer && this.eventBuffer.destroy();\n this.eventBuffer = null; // Clear session from session storage, note this means if a new session\n // is started after, it will not have `previousSessionId`\n\n clearSession(this);\n _context7.next = 20;\n break;\n\n case 17:\n _context7.prev = 17;\n _context7.t0 = _context7[\"catch\"](4);\n\n this._handleException(_context7.t0);\n\n case 20:\n case \"end\":\n return _context7.stop();\n }\n }\n }, _callee6, this, [[4, 17]]);\n }));\n\n function stop() {\n return _stop.apply(this, arguments);\n }\n\n return stop;\n }()\n /**\n * Pause some replay functionality. See comments for `_isPaused`.\n * This differs from stop as this only stops DOM recording, it is\n * not as thorough of a shutdown as `stop()`.\n */\n\n }, {\n key: \"pause\",\n value: function pause() {\n if (this._isPaused) {\n return;\n }\n\n this._isPaused = true;\n this.stopRecording();\n logInfo('[Replay] Pausing replay', this._options._experiments.traceInternals);\n }\n /**\n * Resumes recording, see notes for `pause().\n *\n * Note that calling `startRecording()` here will cause a\n * new DOM checkout.`\n */\n\n }, {\n key: \"resume\",\n value: function resume() {\n if (!this._isPaused || !this._checkSession()) {\n return;\n }\n\n this._isPaused = false;\n this.startRecording();\n logInfo('[Replay] Resuming replay', this._options._experiments.traceInternals);\n }\n /**\n * If not in \"session\" recording mode, flush event buffer which will create a new replay.\n * Unless `continueRecording` is false, the replay will continue to record and\n * behave as a \"session\"-based replay.\n *\n * Otherwise, queue up a flush.\n */\n\n }, {\n key: \"sendBufferedReplayOrFlush\",\n value: function () {\n var _sendBufferedReplayOrFlush = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {\n var _ref46,\n _ref46$continueRecord,\n continueRecording,\n activityTime,\n hasStoppedRecording,\n _args7 = arguments;\n\n return _regeneratorRuntime.wrap(function _callee7$(_context8) {\n while (1) {\n switch (_context8.prev = _context8.next) {\n case 0:\n _ref46 = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}, _ref46$continueRecord = _ref46.continueRecording, continueRecording = _ref46$continueRecord === void 0 ? true : _ref46$continueRecord;\n\n if (!(this.recordingMode === 'session')) {\n _context8.next = 3;\n break;\n }\n\n return _context8.abrupt(\"return\", this.flushImmediate());\n\n case 3:\n activityTime = Date.now();\n logInfo('[Replay] Converting buffer to session', this._options._experiments.traceInternals); // Allow flush to complete before resuming as a session recording, otherwise\n // the checkout from `startRecording` may be included in the payload.\n // Prefer to keep the error replay as a separate (and smaller) segment\n // than the session replay.\n\n _context8.next = 7;\n return this.flushImmediate();\n\n case 7:\n hasStoppedRecording = this.stopRecording();\n\n if (!(!continueRecording || !hasStoppedRecording)) {\n _context8.next = 10;\n break;\n }\n\n return _context8.abrupt(\"return\");\n\n case 10:\n if (!(this.recordingMode === 'session')) {\n _context8.next = 12;\n break;\n }\n\n return _context8.abrupt(\"return\");\n\n case 12:\n // Re-start recording in session-mode\n this.recordingMode = 'session'; // Once this session ends, we do not want to refresh it\n\n if (this.session) {\n this._updateUserActivity(activityTime);\n\n this._updateSessionActivity(activityTime);\n\n this._maybeSaveSession();\n }\n\n this.startRecording();\n\n case 15:\n case \"end\":\n return _context8.stop();\n }\n }\n }, _callee7, this);\n }));\n\n function sendBufferedReplayOrFlush() {\n return _sendBufferedReplayOrFlush.apply(this, arguments);\n }\n\n return sendBufferedReplayOrFlush;\n }()\n /**\n * We want to batch uploads of replay events. Save events only if\n * `` milliseconds have elapsed since the last event\n * *OR* if `` milliseconds have elapsed.\n *\n * Accepts a callback to perform side-effects and returns true to stop batch\n * processing and hand back control to caller.\n */\n\n }, {\n key: \"addUpdate\",\n value: function addUpdate(cb) {\n // We need to always run `cb` (e.g. in the case of `this.recordingMode == 'buffer'`)\n var cbResult = cb(); // If this option is turned on then we will only want to call `flush`\n // explicitly\n\n if (this.recordingMode === 'buffer') {\n return;\n } // If callback is true, we do not want to continue with flushing -- the\n // caller will need to handle it.\n\n\n if (cbResult === true) {\n return;\n } // addUpdate is called quite frequently - use _debouncedFlush so that it\n // respects the flush delays and does not flush immediately\n\n\n this._debouncedFlush();\n }\n /**\n * Updates the user activity timestamp and resumes recording. This should be\n * called in an event handler for a user action that we consider as the user\n * being \"active\" (e.g. a mouse click).\n */\n\n }, {\n key: \"triggerUserActivity\",\n value: function triggerUserActivity() {\n this._updateUserActivity(); // This case means that recording was once stopped due to inactivity.\n // Ensure that recording is resumed.\n\n\n if (!this._stopRecording) {\n // Create a new session, otherwise when the user action is flushed, it\n // will get rejected due to an expired session.\n if (!this._checkSession()) {\n return;\n } // Note: This will cause a new DOM checkout\n\n\n this.resume();\n return;\n } // Otherwise... recording was never suspended, continue as normalish\n\n\n this.checkAndHandleExpiredSession();\n\n this._updateSessionActivity();\n }\n /**\n * Updates the user activity timestamp *without* resuming\n * recording. Some user events (e.g. keydown) can be create\n * low-value replays that only contain the keypress as a\n * breadcrumb. Instead this would require other events to\n * create a new replay after a session has expired.\n */\n\n }, {\n key: \"updateUserActivity\",\n value: function updateUserActivity() {\n this._updateUserActivity();\n\n this._updateSessionActivity();\n }\n /**\n * Only flush if `this.recordingMode === 'session'`\n */\n\n }, {\n key: \"conditionalFlush\",\n value: function conditionalFlush() {\n if (this.recordingMode === 'buffer') {\n return Promise.resolve();\n }\n\n return this.flushImmediate();\n }\n /**\n * Flush using debounce flush\n */\n\n }, {\n key: \"flush\",\n value: function flush() {\n return this._debouncedFlush();\n }\n /**\n * Always flush via `_debouncedFlush` so that we do not have flushes triggered\n * from calling both `flush` and `_debouncedFlush`. Otherwise, there could be\n * cases of mulitple flushes happening closely together.\n */\n\n }, {\n key: \"flushImmediate\",\n value: function flushImmediate() {\n this._debouncedFlush(); // `.flush` is provided by the debounced function, analogously to lodash.debounce\n\n\n return this._debouncedFlush.flush();\n }\n /**\n * Cancels queued up flushes.\n */\n\n }, {\n key: \"cancelFlush\",\n value: function cancelFlush() {\n this._debouncedFlush.cancel();\n }\n /** Get the current sesion (=replay) ID */\n\n }, {\n key: \"getSessionId\",\n value: function getSessionId() {\n return this.session && this.session.id;\n }\n /**\n * Checks if recording should be stopped due to user inactivity. Otherwise\n * check if session is expired and create a new session if so. Triggers a new\n * full snapshot on new session.\n *\n * Returns true if session is not expired, false otherwise.\n * @hidden\n */\n\n }, {\n key: \"checkAndHandleExpiredSession\",\n value: function checkAndHandleExpiredSession() {\n // Prevent starting a new session if the last user activity is older than\n // SESSION_IDLE_PAUSE_DURATION. Otherwise non-user activity can trigger a new\n // session+recording. This creates noisy replays that do not have much\n // content in them.\n if (this._lastActivity && isExpired(this._lastActivity, this.timeouts.sessionIdlePause) && this.session && this.session.sampled === 'session') {\n // Pause recording only for session-based replays. Otherwise, resuming\n // will create a new replay and will conflict with users who only choose\n // to record error-based replays only. (e.g. the resumed replay will not\n // contain a reference to an error)\n this.pause();\n return;\n } // --- There is recent user activity --- //\n // This will create a new session if expired, based on expiry length\n\n\n if (!this._checkSession()) {\n // Check session handles the refreshing itself\n return false;\n }\n\n return true;\n }\n /**\n * Capture some initial state that can change throughout the lifespan of the\n * replay. This is required because otherwise they would be captured at the\n * first flush.\n */\n\n }, {\n key: \"setInitialState\",\n value: function setInitialState() {\n var urlPath = \"\".concat(WINDOW.location.pathname).concat(WINDOW.location.hash).concat(WINDOW.location.search);\n var url = \"\".concat(WINDOW.location.origin).concat(urlPath);\n this.performanceEntries = [];\n this.replayPerformanceEntries = []; // Reset _context as well\n\n this._clearContext();\n\n this._context.initialUrl = url;\n this._context.initialTimestamp = Date.now();\n\n this._context.urls.push(url);\n }\n /**\n * Add a breadcrumb event, that may be throttled.\n * If it was throttled, we add a custom breadcrumb to indicate that.\n */\n\n }, {\n key: \"throttledAddEvent\",\n value: function throttledAddEvent(event, isCheckout) {\n var _this23 = this;\n\n var res = this._throttledAddEvent(event, isCheckout); // If this is THROTTLED, it means we have throttled the event for the first time\n // In this case, we want to add a breadcrumb indicating that something was skipped\n\n\n if (res === THROTTLED) {\n var breadcrumb = createBreadcrumb({\n category: 'replay.throttled'\n });\n this.addUpdate(function () {\n // Return `false` if the event _was_ added, as that means we schedule a flush\n return !addEventSync(_this23, {\n type: ReplayEventTypeCustom,\n timestamp: breadcrumb.timestamp || 0,\n data: {\n tag: 'breadcrumb',\n payload: breadcrumb,\n metric: true\n }\n });\n });\n }\n\n return res;\n }\n /**\n * This will get the parametrized route name of the current page.\n * This is only available if performance is enabled, and if an instrumented router is used.\n */\n\n }, {\n key: \"getCurrentRoute\",\n value: function getCurrentRoute() {\n // eslint-disable-next-line deprecation/deprecation\n var lastTransaction = this.lastTransaction || getCurrentScope().getTransaction();\n var attributes = lastTransaction && spanToJSON(lastTransaction).data || {};\n var source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n\n if (!lastTransaction || !source || !['route', 'custom'].includes(source)) {\n return undefined;\n }\n\n return spanToJSON(lastTransaction).description;\n }\n /**\n * Initialize and start all listeners to varying events (DOM,\n * Performance Observer, Recording, Sentry SDK, etc)\n */\n\n }, {\n key: \"_initializeRecording\",\n value: function _initializeRecording() {\n this.setInitialState(); // this method is generally called on page load or manually - in both cases\n // we should treat it as an activity\n\n this._updateSessionActivity();\n\n this.eventBuffer = createEventBuffer({\n useCompression: this._options.useCompression,\n workerUrl: this._options.workerUrl\n });\n\n this._removeListeners();\n\n this._addListeners(); // Need to set as enabled before we start recording, as `record()` can trigger a flush with a new checkout\n\n\n this._isEnabled = true;\n this._isPaused = false;\n this.startRecording();\n }\n /** A wrapper to conditionally capture exceptions. */\n\n }, {\n key: \"_handleException\",\n value: function _handleException(error) {\n DEBUG_BUILD && logger.error('[Replay]', error);\n\n if (DEBUG_BUILD && this._options._experiments && this._options._experiments.captureExceptions) {\n captureException(error);\n }\n }\n /**\n * Loads (or refreshes) the current session.\n */\n\n }, {\n key: \"_initializeSessionForSampling\",\n value: function _initializeSessionForSampling(previousSessionId) {\n // Whenever there is _any_ error sample rate, we always allow buffering\n // Because we decide on sampling when an error occurs, we need to buffer at all times if sampling for errors\n var allowBuffering = this._options.errorSampleRate > 0;\n var session = loadOrCreateSession({\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n maxReplayDuration: this._options.maxReplayDuration,\n traceInternals: this._options._experiments.traceInternals,\n previousSessionId: previousSessionId\n }, {\n stickySession: this._options.stickySession,\n sessionSampleRate: this._options.sessionSampleRate,\n allowBuffering: allowBuffering\n });\n this.session = session;\n }\n /**\n * Checks and potentially refreshes the current session.\n * Returns false if session is not recorded.\n */\n\n }, {\n key: \"_checkSession\",\n value: function _checkSession() {\n // If there is no session yet, we do not want to refresh anything\n // This should generally not happen, but to be safe....\n if (!this.session) {\n return false;\n }\n\n var currentSession = this.session;\n\n if (shouldRefreshSession(currentSession, {\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n maxReplayDuration: this._options.maxReplayDuration\n })) {\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this._refreshSession(currentSession);\n\n return false;\n }\n\n return true;\n }\n /**\n * Refresh a session with a new one.\n * This stops the current session (without forcing a flush, as that would never work since we are expired),\n * and then does a new sampling based on the refreshed session.\n */\n\n }, {\n key: \"_refreshSession\",\n value: function () {\n var _refreshSession2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(session) {\n return _regeneratorRuntime.wrap(function _callee8$(_context9) {\n while (1) {\n switch (_context9.prev = _context9.next) {\n case 0:\n if (this._isEnabled) {\n _context9.next = 2;\n break;\n }\n\n return _context9.abrupt(\"return\");\n\n case 2:\n _context9.next = 4;\n return this.stop({\n reason: 'refresh session'\n });\n\n case 4:\n this.initializeSampling(session.id);\n\n case 5:\n case \"end\":\n return _context9.stop();\n }\n }\n }, _callee8, this);\n }));\n\n function _refreshSession(_x24) {\n return _refreshSession2.apply(this, arguments);\n }\n\n return _refreshSession;\n }()\n /**\n * Adds listeners to record events for the replay\n */\n\n }, {\n key: \"_addListeners\",\n value: function _addListeners() {\n try {\n WINDOW.document.addEventListener('visibilitychange', this._handleVisibilityChange);\n WINDOW.addEventListener('blur', this._handleWindowBlur);\n WINDOW.addEventListener('focus', this._handleWindowFocus);\n WINDOW.addEventListener('keydown', this._handleKeyboardEvent);\n\n if (this.clickDetector) {\n this.clickDetector.addListeners();\n } // There is no way to remove these listeners, so ensure they are only added once\n\n\n if (!this._hasInitializedCoreListeners) {\n addGlobalListeners(this);\n this._hasInitializedCoreListeners = true;\n }\n } catch (err) {\n this._handleException(err);\n }\n\n this._performanceCleanupCallback = setupPerformanceObserver(this);\n }\n /**\n * Cleans up listeners that were created in `_addListeners`\n */\n\n }, {\n key: \"_removeListeners\",\n value: function _removeListeners() {\n try {\n WINDOW.document.removeEventListener('visibilitychange', this._handleVisibilityChange);\n WINDOW.removeEventListener('blur', this._handleWindowBlur);\n WINDOW.removeEventListener('focus', this._handleWindowFocus);\n WINDOW.removeEventListener('keydown', this._handleKeyboardEvent);\n\n if (this.clickDetector) {\n this.clickDetector.removeListeners();\n }\n\n if (this._performanceCleanupCallback) {\n this._performanceCleanupCallback();\n }\n } catch (err) {\n this._handleException(err);\n }\n }\n /**\n * Handle when visibility of the page content changes. Opening a new tab will\n * cause the state to change to hidden because of content of current page will\n * be hidden. Likewise, moving a different window to cover the contents of the\n * page will also trigger a change to a hidden state.\n */\n\n }, {\n key: \"__init\",\n value: function __init() {\n var _this24 = this;\n\n this._handleVisibilityChange = function () {\n if (WINDOW.document.visibilityState === 'visible') {\n _this24._doChangeToForegroundTasks();\n } else {\n _this24._doChangeToBackgroundTasks();\n }\n };\n }\n /**\n * Handle when page is blurred\n */\n\n }, {\n key: \"__init2\",\n value: function __init2() {\n var _this25 = this;\n\n this._handleWindowBlur = function () {\n var breadcrumb = createBreadcrumb({\n category: 'ui.blur'\n }); // Do not count blur as a user action -- it's part of the process of them\n // leaving the page\n\n _this25._doChangeToBackgroundTasks(breadcrumb);\n };\n }\n /**\n * Handle when page is focused\n */\n\n }, {\n key: \"__init3\",\n value: function __init3() {\n var _this26 = this;\n\n this._handleWindowFocus = function () {\n var breadcrumb = createBreadcrumb({\n category: 'ui.focus'\n }); // Do not count focus as a user action -- instead wait until they focus and\n // interactive with page\n\n _this26._doChangeToForegroundTasks(breadcrumb);\n };\n }\n /** Ensure page remains active when a key is pressed. */\n\n }, {\n key: \"__init4\",\n value: function __init4() {\n var _this27 = this;\n\n this._handleKeyboardEvent = function (event) {\n handleKeyboardEvent(_this27, event);\n };\n }\n /**\n * Tasks to run when we consider a page to be hidden (via blurring and/or visibility)\n */\n\n }, {\n key: \"_doChangeToBackgroundTasks\",\n value: function _doChangeToBackgroundTasks(breadcrumb) {\n if (!this.session) {\n return;\n }\n\n var expired = isSessionExpired(this.session, {\n maxReplayDuration: this._options.maxReplayDuration,\n sessionIdleExpire: this.timeouts.sessionIdleExpire\n });\n\n if (expired) {\n return;\n }\n\n if (breadcrumb) {\n this._createCustomBreadcrumb(breadcrumb);\n } // Send replay when the page/tab becomes hidden. There is no reason to send\n // replay if it becomes visible, since no actions we care about were done\n // while it was hidden\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n\n\n void this.conditionalFlush();\n }\n /**\n * Tasks to run when we consider a page to be visible (via focus and/or visibility)\n */\n\n }, {\n key: \"_doChangeToForegroundTasks\",\n value: function _doChangeToForegroundTasks(breadcrumb) {\n if (!this.session) {\n return;\n }\n\n var isSessionActive = this.checkAndHandleExpiredSession();\n\n if (!isSessionActive) {\n // If the user has come back to the page within SESSION_IDLE_PAUSE_DURATION\n // ms, we will re-use the existing session, otherwise create a new\n // session\n logInfo('[Replay] Document has become active, but session has expired');\n return;\n }\n\n if (breadcrumb) {\n this._createCustomBreadcrumb(breadcrumb);\n }\n }\n /**\n * Update user activity (across session lifespans)\n */\n\n }, {\n key: \"_updateUserActivity\",\n value: function _updateUserActivity() {\n var _lastActivity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Date.now();\n\n this._lastActivity = _lastActivity;\n }\n /**\n * Updates the session's last activity timestamp\n */\n\n }, {\n key: \"_updateSessionActivity\",\n value: function _updateSessionActivity() {\n var _lastActivity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Date.now();\n\n if (this.session) {\n this.session.lastActivity = _lastActivity;\n\n this._maybeSaveSession();\n }\n }\n /**\n * Helper to create (and buffer) a replay breadcrumb from a core SDK breadcrumb\n */\n\n }, {\n key: \"_createCustomBreadcrumb\",\n value: function _createCustomBreadcrumb(breadcrumb) {\n var _this28 = this;\n\n this.addUpdate(function () {\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n _this28.throttledAddEvent({\n type: EventType.Custom,\n timestamp: breadcrumb.timestamp || 0,\n data: {\n tag: 'breadcrumb',\n payload: breadcrumb\n }\n });\n });\n }\n /**\n * Observed performance events are added to `this.performanceEntries`. These\n * are included in the replay event before it is finished and sent to Sentry.\n */\n\n }, {\n key: \"_addPerformanceEntries\",\n value: function _addPerformanceEntries() {\n var performanceEntries = createPerformanceEntries(this.performanceEntries).concat(this.replayPerformanceEntries);\n this.performanceEntries = [];\n this.replayPerformanceEntries = [];\n return Promise.all(createPerformanceSpans(this, performanceEntries));\n }\n /**\n * Clear _context\n */\n\n }, {\n key: \"_clearContext\",\n value: function _clearContext() {\n // XXX: `initialTimestamp` and `initialUrl` do not get cleared\n this._context.errorIds.clear();\n\n this._context.traceIds.clear();\n\n this._context.urls = [];\n }\n /** Update the initial timestamp based on the buffer content. */\n\n }, {\n key: \"_updateInitialTimestampFromEventBuffer\",\n value: function _updateInitialTimestampFromEventBuffer() {\n var session = this.session,\n eventBuffer = this.eventBuffer;\n\n if (!session || !eventBuffer) {\n return;\n } // we only ever update this on the initial segment\n\n\n if (session.segmentId) {\n return;\n }\n\n var earliestEvent = eventBuffer.getEarliestTimestamp();\n\n if (earliestEvent && earliestEvent < this._context.initialTimestamp) {\n this._context.initialTimestamp = earliestEvent;\n }\n }\n /**\n * Return and clear _context\n */\n\n }, {\n key: \"_popEventContext\",\n value: function _popEventContext() {\n var _context = {\n initialTimestamp: this._context.initialTimestamp,\n initialUrl: this._context.initialUrl,\n errorIds: Array.from(this._context.errorIds),\n traceIds: Array.from(this._context.traceIds),\n urls: this._context.urls\n };\n\n this._clearContext();\n\n return _context;\n }\n /**\n * Flushes replay event buffer to Sentry.\n *\n * Performance events are only added right before flushing - this is\n * due to the buffered performance observer events.\n *\n * Should never be called directly, only by `flush`\n */\n\n }, {\n key: \"_runFlush\",\n value: function () {\n var _runFlush2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {\n var replayId, timestamp, eventContext, segmentId, recordingData, client;\n return _regeneratorRuntime.wrap(function _callee9$(_context10) {\n while (1) {\n switch (_context10.prev = _context10.next) {\n case 0:\n replayId = this.getSessionId();\n\n if (!(!this.session || !this.eventBuffer || !replayId)) {\n _context10.next = 4;\n break;\n }\n\n DEBUG_BUILD && logger.error('[Replay] No session or eventBuffer found to flush.');\n return _context10.abrupt(\"return\");\n\n case 4:\n _context10.next = 6;\n return this._addPerformanceEntries();\n\n case 6:\n if (!(!this.eventBuffer || !this.eventBuffer.hasEvents)) {\n _context10.next = 8;\n break;\n }\n\n return _context10.abrupt(\"return\");\n\n case 8:\n _context10.next = 10;\n return addMemoryEntry(this);\n\n case 10:\n if (this.eventBuffer) {\n _context10.next = 12;\n break;\n }\n\n return _context10.abrupt(\"return\");\n\n case 12:\n if (!(replayId !== this.getSessionId())) {\n _context10.next = 14;\n break;\n }\n\n return _context10.abrupt(\"return\");\n\n case 14:\n _context10.prev = 14;\n\n // This uses the data from the eventBuffer, so we need to call this before `finish()\n this._updateInitialTimestampFromEventBuffer();\n\n timestamp = Date.now(); // Check total duration again, to avoid sending outdated stuff\n // We leave 30s wiggle room to accomodate late flushing etc.\n // This _could_ happen when the browser is suspended during flushing, in which case we just want to stop\n\n if (!(timestamp - this._context.initialTimestamp > this._options.maxReplayDuration + 30000)) {\n _context10.next = 19;\n break;\n }\n\n throw new Error('Session is too long, not sending replay');\n\n case 19:\n eventContext = this._popEventContext(); // Always increment segmentId regardless of outcome of sending replay\n\n segmentId = this.session.segmentId++;\n\n this._maybeSaveSession(); // Note this empties the event buffer regardless of outcome of sending replay\n\n\n _context10.next = 24;\n return this.eventBuffer.finish();\n\n case 24:\n recordingData = _context10.sent;\n _context10.next = 27;\n return sendReplay({\n replayId: replayId,\n recordingData: recordingData,\n segmentId: segmentId,\n eventContext: eventContext,\n session: this.session,\n options: this.getOptions(),\n timestamp: timestamp\n });\n\n case 27:\n _context10.next = 35;\n break;\n\n case 29:\n _context10.prev = 29;\n _context10.t0 = _context10[\"catch\"](14);\n\n this._handleException(_context10.t0); // This means we retried 3 times and all of them failed,\n // or we ran into a problem we don't want to retry, like rate limiting.\n // In this case, we want to completely stop the replay - otherwise, we may get inconsistent segments\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n\n\n this.stop({\n reason: 'sendReplay'\n });\n client = getClient();\n\n if (client) {\n client.recordDroppedEvent('send_error', 'replay');\n }\n\n case 35:\n case \"end\":\n return _context10.stop();\n }\n }\n }, _callee9, this, [[14, 29]]);\n }));\n\n function _runFlush() {\n return _runFlush2.apply(this, arguments);\n }\n\n return _runFlush;\n }()\n /**\n * Flush recording data to Sentry. Creates a lock so that only a single flush\n * can be active at a time. Do not call this directly.\n */\n\n }, {\n key: \"__init5\",\n value: function __init5() {\n var _this29 = this;\n\n this._flush = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10() {\n var _ref48,\n _ref48$force,\n force,\n start,\n now,\n duration,\n tooShort,\n tooLong,\n eventBuffer,\n _args10 = arguments;\n\n return _regeneratorRuntime.wrap(function _callee10$(_context11) {\n while (1) {\n switch (_context11.prev = _context11.next) {\n case 0:\n _ref48 = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {}, _ref48$force = _ref48.force, force = _ref48$force === void 0 ? false : _ref48$force;\n\n if (!(!_this29._isEnabled && !force)) {\n _context11.next = 3;\n break;\n }\n\n return _context11.abrupt(\"return\");\n\n case 3:\n if (_this29.checkAndHandleExpiredSession()) {\n _context11.next = 6;\n break;\n }\n\n DEBUG_BUILD && logger.error('[Replay] Attempting to finish replay event after session expired.');\n return _context11.abrupt(\"return\");\n\n case 6:\n if (_this29.session) {\n _context11.next = 8;\n break;\n }\n\n return _context11.abrupt(\"return\");\n\n case 8:\n start = _this29.session.started;\n now = Date.now();\n duration = now - start; // A flush is about to happen, cancel any queued flushes\n\n _this29._debouncedFlush.cancel(); // If session is too short, or too long (allow some wiggle room over maxReplayDuration), do not send it\n // This _should_ not happen, but it may happen if flush is triggered due to a page activity change or similar\n\n\n tooShort = duration < _this29._options.minReplayDuration;\n tooLong = duration > _this29._options.maxReplayDuration + 5000;\n\n if (!(tooShort || tooLong)) {\n _context11.next = 18;\n break;\n }\n\n logInfo(\"[Replay] Session duration (\".concat(Math.floor(duration / 1000), \"s) is too \").concat(tooShort ? 'short' : 'long', \", not sending replay.\"), _this29._options._experiments.traceInternals);\n\n if (tooShort) {\n _this29._debouncedFlush();\n }\n\n return _context11.abrupt(\"return\");\n\n case 18:\n eventBuffer = _this29.eventBuffer;\n\n if (eventBuffer && _this29.session.segmentId === 0 && !eventBuffer.hasCheckout) {\n logInfo('[Replay] Flushing initial segment without checkout.', _this29._options._experiments.traceInternals); // TODO FN: Evaluate if we want to stop here, or remove this again?\n } // this._flushLock acts as a lock so that future calls to `_flush()`\n // will be blocked until this promise resolves\n\n\n if (_this29._flushLock) {\n _context11.next = 26;\n break;\n }\n\n _this29._flushLock = _this29._runFlush();\n _context11.next = 24;\n return _this29._flushLock;\n\n case 24:\n _this29._flushLock = undefined;\n return _context11.abrupt(\"return\");\n\n case 26:\n _context11.prev = 26;\n _context11.next = 29;\n return _this29._flushLock;\n\n case 29:\n _context11.next = 34;\n break;\n\n case 31:\n _context11.prev = 31;\n _context11.t0 = _context11[\"catch\"](26);\n DEBUG_BUILD && logger.error(_context11.t0);\n\n case 34:\n _context11.prev = 34;\n\n _this29._debouncedFlush();\n\n return _context11.finish(34);\n\n case 37:\n case \"end\":\n return _context11.stop();\n }\n }\n }, _callee10, null, [[26, 31, 34, 37]]);\n }));\n }\n /** Save the session, if it is sticky */\n\n }, {\n key: \"_maybeSaveSession\",\n value: function _maybeSaveSession() {\n if (this.session && this._options.stickySession) {\n saveSession(this.session);\n }\n }\n /** Handler for rrweb.record.onMutation */\n\n }, {\n key: \"__init6\",\n value: function __init6() {\n var _this30 = this;\n\n this._onMutationHandler = function (mutations) {\n var count = mutations.length;\n var mutationLimit = _this30._options.mutationLimit;\n var mutationBreadcrumbLimit = _this30._options.mutationBreadcrumbLimit;\n var overMutationLimit = mutationLimit && count > mutationLimit; // Create a breadcrumb if a lot of mutations happen at the same time\n // We can show this in the UI as an information with potential performance improvements\n\n if (count > mutationBreadcrumbLimit || overMutationLimit) {\n var breadcrumb = createBreadcrumb({\n category: 'replay.mutations',\n data: {\n count: count,\n limit: overMutationLimit\n }\n });\n\n _this30._createCustomBreadcrumb(breadcrumb);\n } // Stop replay if over the mutation limit\n\n\n if (overMutationLimit) {\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n _this30.stop({\n reason: 'mutationLimit',\n forceFlush: _this30.recordingMode === 'session'\n });\n\n return false;\n } // `true` means we use the regular mutation handling by rrweb\n\n\n return true;\n };\n }\n }]);\n\n return ReplayContainer;\n}();\n\nfunction getOption(selectors, defaultSelectors, deprecatedClassOption, deprecatedSelectorOption) {\n var deprecatedSelectors = typeof deprecatedSelectorOption === 'string' ? deprecatedSelectorOption.split(',') : [];\n var allSelectors = [].concat(_toConsumableArray(selectors), _toConsumableArray(deprecatedSelectors), _toConsumableArray(defaultSelectors)); // @deprecated\n\n if (typeof deprecatedClassOption !== 'undefined') {\n // NOTE: No support for RegExp\n if (typeof deprecatedClassOption === 'string') {\n allSelectors.push(\".\".concat(deprecatedClassOption));\n }\n\n consoleSandbox(function () {\n // eslint-disable-next-line no-console\n console.warn('[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.');\n });\n }\n\n return allSelectors.join(',');\n}\n/**\n * Returns privacy related configuration for use in rrweb\n */\n\n\nfunction getPrivacyOptions(_ref49) {\n var mask = _ref49.mask,\n unmask = _ref49.unmask,\n block = _ref49.block,\n unblock = _ref49.unblock,\n ignore = _ref49.ignore,\n blockClass = _ref49.blockClass,\n blockSelector = _ref49.blockSelector,\n maskTextClass = _ref49.maskTextClass,\n maskTextSelector = _ref49.maskTextSelector,\n ignoreClass = _ref49.ignoreClass;\n var defaultBlockedElements = ['base[href=\"/\"]'];\n var maskSelector = getOption(mask, ['.sentry-mask', '[data-sentry-mask]'], maskTextClass, maskTextSelector);\n var unmaskSelector = getOption(unmask, ['.sentry-unmask', '[data-sentry-unmask]']);\n var options = {\n // We are making the decision to make text and input selectors the same\n maskTextSelector: maskSelector,\n unmaskTextSelector: unmaskSelector,\n blockSelector: getOption(block, ['.sentry-block', '[data-sentry-block]'].concat(defaultBlockedElements), blockClass, blockSelector),\n unblockSelector: getOption(unblock, ['.sentry-unblock', '[data-sentry-unblock]']),\n ignoreSelector: getOption(ignore, ['.sentry-ignore', '[data-sentry-ignore]', 'input[type=\"file\"]'], ignoreClass)\n };\n\n if (blockClass instanceof RegExp) {\n options.blockClass = blockClass;\n }\n\n if (maskTextClass instanceof RegExp) {\n options.maskTextClass = maskTextClass;\n }\n\n return options;\n}\n/**\n * Masks an attribute if necessary, otherwise return attribute value as-is.\n */\n\n\nfunction maskAttribute(_ref50) {\n var el = _ref50.el,\n key = _ref50.key,\n maskAttributes = _ref50.maskAttributes,\n maskAllText = _ref50.maskAllText,\n privacyOptions = _ref50.privacyOptions,\n value = _ref50.value;\n\n // We only mask attributes if `maskAllText` is true\n if (!maskAllText) {\n return value;\n } // unmaskTextSelector takes precendence\n\n\n if (privacyOptions.unmaskTextSelector && el.matches(privacyOptions.unmaskTextSelector)) {\n return value;\n }\n\n if (maskAttributes.includes(key) || // Need to mask `value` attribute for `` if it's a button-like\n // type\n key === 'value' && el.tagName === 'INPUT' && ['submit', 'button'].includes(el.getAttribute('type') || '')) {\n return value.replace(/[\\S]/g, '*');\n }\n\n return value;\n}\n\nvar MEDIA_SELECTORS = 'img,image,svg,video,object,picture,embed,map,audio,link[rel=\"icon\"],link[rel=\"apple-touch-icon\"]';\nvar DEFAULT_NETWORK_HEADERS = ['content-length', 'content-type', 'accept'];\nvar _initialized = false;\n\nvar replayIntegration$1 = function replayIntegration$1(options) {\n // eslint-disable-next-line deprecation/deprecation\n return new Replay$1(options);\n};\n/**\n * The main replay integration class, to be passed to `init({ integrations: [] })`.\n * @deprecated Use `replayIntegration()` instead.\n */\n\n\nvar Replay$1 = /*#__PURE__*/function () {\n /**\n * @inheritDoc\n */\n\n /**\n * Options to pass to `rrweb.record()`\n */\n\n /**\n * Initial options passed to the replay integration, merged with default values.\n * Note: `sessionSampleRate` and `errorSampleRate` are not required here, as they\n * can only be finally set when setupOnce() is called.\n *\n * @private\n */\n function Replay$1() {\n var _ref51 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref51$flushMinDelay = _ref51.flushMinDelay,\n flushMinDelay = _ref51$flushMinDelay === void 0 ? DEFAULT_FLUSH_MIN_DELAY : _ref51$flushMinDelay,\n _ref51$flushMaxDelay = _ref51.flushMaxDelay,\n flushMaxDelay = _ref51$flushMaxDelay === void 0 ? DEFAULT_FLUSH_MAX_DELAY : _ref51$flushMaxDelay,\n _ref51$minReplayDurat = _ref51.minReplayDuration,\n minReplayDuration = _ref51$minReplayDurat === void 0 ? MIN_REPLAY_DURATION : _ref51$minReplayDurat,\n _ref51$maxReplayDurat = _ref51.maxReplayDuration,\n maxReplayDuration = _ref51$maxReplayDurat === void 0 ? MAX_REPLAY_DURATION : _ref51$maxReplayDurat,\n _ref51$stickySession = _ref51.stickySession,\n stickySession = _ref51$stickySession === void 0 ? true : _ref51$stickySession,\n _ref51$useCompression = _ref51.useCompression,\n useCompression = _ref51$useCompression === void 0 ? true : _ref51$useCompression,\n workerUrl = _ref51.workerUrl,\n _ref51$_experiments = _ref51._experiments,\n _experiments = _ref51$_experiments === void 0 ? {} : _ref51$_experiments,\n sessionSampleRate = _ref51.sessionSampleRate,\n errorSampleRate = _ref51.errorSampleRate,\n _ref51$maskAllText = _ref51.maskAllText,\n maskAllText = _ref51$maskAllText === void 0 ? true : _ref51$maskAllText,\n _ref51$maskAllInputs = _ref51.maskAllInputs,\n maskAllInputs = _ref51$maskAllInputs === void 0 ? true : _ref51$maskAllInputs,\n _ref51$blockAllMedia = _ref51.blockAllMedia,\n blockAllMedia = _ref51$blockAllMedia === void 0 ? true : _ref51$blockAllMedia,\n _ref51$mutationBreadc = _ref51.mutationBreadcrumbLimit,\n mutationBreadcrumbLimit = _ref51$mutationBreadc === void 0 ? 750 : _ref51$mutationBreadc,\n _ref51$mutationLimit = _ref51.mutationLimit,\n mutationLimit = _ref51$mutationLimit === void 0 ? 10000 : _ref51$mutationLimit,\n _ref51$slowClickTimeo = _ref51.slowClickTimeout,\n slowClickTimeout = _ref51$slowClickTimeo === void 0 ? 7000 : _ref51$slowClickTimeo,\n _ref51$slowClickIgnor = _ref51.slowClickIgnoreSelectors,\n slowClickIgnoreSelectors = _ref51$slowClickIgnor === void 0 ? [] : _ref51$slowClickIgnor,\n _ref51$networkDetailA = _ref51.networkDetailAllowUrls,\n networkDetailAllowUrls = _ref51$networkDetailA === void 0 ? [] : _ref51$networkDetailA,\n _ref51$networkDetailD = _ref51.networkDetailDenyUrls,\n networkDetailDenyUrls = _ref51$networkDetailD === void 0 ? [] : _ref51$networkDetailD,\n _ref51$networkCapture = _ref51.networkCaptureBodies,\n networkCaptureBodies = _ref51$networkCapture === void 0 ? true : _ref51$networkCapture,\n _ref51$networkRequest = _ref51.networkRequestHeaders,\n networkRequestHeaders = _ref51$networkRequest === void 0 ? [] : _ref51$networkRequest,\n _ref51$networkRespons = _ref51.networkResponseHeaders,\n networkResponseHeaders = _ref51$networkRespons === void 0 ? [] : _ref51$networkRespons,\n _ref51$mask = _ref51.mask,\n mask = _ref51$mask === void 0 ? [] : _ref51$mask,\n _ref51$maskAttributes = _ref51.maskAttributes,\n maskAttributes = _ref51$maskAttributes === void 0 ? ['title', 'placeholder'] : _ref51$maskAttributes,\n _ref51$unmask = _ref51.unmask,\n unmask = _ref51$unmask === void 0 ? [] : _ref51$unmask,\n _ref51$block = _ref51.block,\n block = _ref51$block === void 0 ? [] : _ref51$block,\n _ref51$unblock = _ref51.unblock,\n unblock = _ref51$unblock === void 0 ? [] : _ref51$unblock,\n _ref51$ignore = _ref51.ignore,\n ignore = _ref51$ignore === void 0 ? [] : _ref51$ignore,\n maskFn = _ref51.maskFn,\n beforeAddRecordingEvent = _ref51.beforeAddRecordingEvent,\n beforeErrorSampling = _ref51.beforeErrorSampling,\n blockClass = _ref51.blockClass,\n blockSelector = _ref51.blockSelector,\n maskInputOptions = _ref51.maskInputOptions,\n maskTextClass = _ref51.maskTextClass,\n maskTextSelector = _ref51.maskTextSelector,\n ignoreClass = _ref51.ignoreClass;\n\n _classCallCheck(this, Replay$1);\n\n // eslint-disable-next-line deprecation/deprecation\n this.name = Replay$1.id;\n var privacyOptions = getPrivacyOptions({\n mask: mask,\n unmask: unmask,\n block: block,\n unblock: unblock,\n ignore: ignore,\n blockClass: blockClass,\n blockSelector: blockSelector,\n maskTextClass: maskTextClass,\n maskTextSelector: maskTextSelector,\n ignoreClass: ignoreClass\n });\n this._recordingOptions = _objectSpread(_objectSpread({\n maskAllInputs: maskAllInputs,\n maskAllText: maskAllText,\n maskInputOptions: _objectSpread(_objectSpread({}, maskInputOptions || {}), {}, {\n password: true\n }),\n maskTextFn: maskFn,\n maskInputFn: maskFn,\n maskAttributeFn: function maskAttributeFn(key, value, el) {\n return maskAttribute({\n maskAttributes: maskAttributes,\n maskAllText: maskAllText,\n privacyOptions: privacyOptions,\n key: key,\n value: value,\n el: el\n });\n }\n }, privacyOptions), {}, {\n // Our defaults\n slimDOMOptions: 'all',\n inlineStylesheet: true,\n // Disable inline images as it will increase segment/replay size\n inlineImages: false,\n // collect fonts, but be aware that `sentry.io` needs to be an allowed\n // origin for playback\n collectFonts: true,\n errorHandler: function errorHandler(err) {\n try {\n err.__rrweb__ = true;\n } catch (error) {// ignore errors here\n // this can happen if the error is frozen or does not allow mutation for other reasons\n }\n }\n });\n this._initialOptions = {\n flushMinDelay: flushMinDelay,\n flushMaxDelay: flushMaxDelay,\n minReplayDuration: Math.min(minReplayDuration, MIN_REPLAY_DURATION_LIMIT),\n maxReplayDuration: Math.min(maxReplayDuration, MAX_REPLAY_DURATION),\n stickySession: stickySession,\n sessionSampleRate: sessionSampleRate,\n errorSampleRate: errorSampleRate,\n useCompression: useCompression,\n workerUrl: workerUrl,\n blockAllMedia: blockAllMedia,\n maskAllInputs: maskAllInputs,\n maskAllText: maskAllText,\n mutationBreadcrumbLimit: mutationBreadcrumbLimit,\n mutationLimit: mutationLimit,\n slowClickTimeout: slowClickTimeout,\n slowClickIgnoreSelectors: slowClickIgnoreSelectors,\n networkDetailAllowUrls: networkDetailAllowUrls,\n networkDetailDenyUrls: networkDetailDenyUrls,\n networkCaptureBodies: networkCaptureBodies,\n networkRequestHeaders: _getMergedNetworkHeaders(networkRequestHeaders),\n networkResponseHeaders: _getMergedNetworkHeaders(networkResponseHeaders),\n beforeAddRecordingEvent: beforeAddRecordingEvent,\n beforeErrorSampling: beforeErrorSampling,\n _experiments: _experiments\n };\n\n if (typeof sessionSampleRate === 'number') {\n // eslint-disable-next-line\n console.warn(\"[Replay] You are passing `sessionSampleRate` to the Replay integration.\\nThis option is deprecated and will be removed soon.\\nInstead, configure `replaysSessionSampleRate` directly in the SDK init options, e.g.:\\nSentry.init({ replaysSessionSampleRate: \".concat(sessionSampleRate, \" })\"));\n this._initialOptions.sessionSampleRate = sessionSampleRate;\n }\n\n if (typeof errorSampleRate === 'number') {\n // eslint-disable-next-line\n console.warn(\"[Replay] You are passing `errorSampleRate` to the Replay integration.\\nThis option is deprecated and will be removed soon.\\nInstead, configure `replaysOnErrorSampleRate` directly in the SDK init options, e.g.:\\nSentry.init({ replaysOnErrorSampleRate: \".concat(errorSampleRate, \" })\"));\n this._initialOptions.errorSampleRate = errorSampleRate;\n }\n\n if (this._initialOptions.blockAllMedia) {\n // `blockAllMedia` is a more user friendly option to configure blocking\n // embedded media elements\n this._recordingOptions.blockSelector = !this._recordingOptions.blockSelector ? MEDIA_SELECTORS : \"\".concat(this._recordingOptions.blockSelector, \",\").concat(MEDIA_SELECTORS);\n }\n\n if (this._isInitialized && isBrowser()) {\n throw new Error('Multiple Sentry Session Replay instances are not supported');\n }\n\n this._isInitialized = true;\n }\n /** If replay has already been initialized */\n\n\n _createClass(Replay$1, [{\n key: \"_isInitialized\",\n get: function get() {\n return _initialized;\n }\n /** Update _isInitialized */\n ,\n set: function set(value) {\n _initialized = value;\n }\n /**\n * Setup and initialize replay container\n */\n\n }, {\n key: \"setupOnce\",\n value: function setupOnce() {\n var _this31 = this;\n\n if (!isBrowser()) {\n return;\n }\n\n this._setup(); // Once upon a time, we tried to create a transaction in `setupOnce` and it would\n // potentially create a transaction before some native SDK integrations have run\n // and applied their own global event processor. An example is:\n // https://github.com/getsentry/sentry-javascript/blob/b47ceafbdac7f8b99093ce6023726ad4687edc48/packages/browser/src/integrations/useragent.ts\n //\n // So we call `this._initialize()` in next event loop as a workaround to wait for other\n // global event processors to finish. This is no longer needed, but keeping it\n // here to avoid any future issues.\n\n\n setTimeout(function () {\n return _this31._initialize();\n });\n }\n /**\n * Start a replay regardless of sampling rate. Calling this will always\n * create a new session. Will throw an error if replay is already in progress.\n *\n * Creates or loads a session, attaches listeners to varying events (DOM,\n * PerformanceObserver, Recording, Sentry SDK, etc)\n */\n\n }, {\n key: \"start\",\n value: function start() {\n if (!this._replay) {\n return;\n }\n\n this._replay.start();\n }\n /**\n * Start replay buffering. Buffers until `flush()` is called or, if\n * `replaysOnErrorSampleRate` > 0, until an error occurs.\n */\n\n }, {\n key: \"startBuffering\",\n value: function startBuffering() {\n if (!this._replay) {\n return;\n }\n\n this._replay.startBuffering();\n }\n /**\n * Currently, this needs to be manually called (e.g. for tests). Sentry SDK\n * does not support a teardown\n */\n\n }, {\n key: \"stop\",\n value: function stop() {\n if (!this._replay) {\n return Promise.resolve();\n }\n\n return this._replay.stop({\n forceFlush: this._replay.recordingMode === 'session'\n });\n }\n /**\n * If not in \"session\" recording mode, flush event buffer which will create a new replay.\n * Unless `continueRecording` is false, the replay will continue to record and\n * behave as a \"session\"-based replay.\n *\n * Otherwise, queue up a flush.\n */\n\n }, {\n key: \"flush\",\n value: function flush(options) {\n if (!this._replay || !this._replay.isEnabled()) {\n return Promise.resolve();\n }\n\n return this._replay.sendBufferedReplayOrFlush(options);\n }\n /**\n * Get the current session ID.\n */\n\n }, {\n key: \"getReplayId\",\n value: function getReplayId() {\n if (!this._replay || !this._replay.isEnabled()) {\n return;\n }\n\n return this._replay.getSessionId();\n }\n /**\n * Initializes replay.\n */\n\n }, {\n key: \"_initialize\",\n value: function _initialize() {\n if (!this._replay) {\n return;\n } // We have to run this in _initialize, because this runs in setTimeout\n // So when this runs all integrations have been added\n // Before this, we cannot access integrations on the client,\n // so we need to mutate the options here\n\n\n this._maybeLoadFromReplayCanvasIntegration();\n\n this._replay.initializeSampling();\n }\n /** Setup the integration. */\n\n }, {\n key: \"_setup\",\n value: function _setup() {\n // Client is not available in constructor, so we need to wait until setupOnce\n var finalOptions = loadReplayOptionsFromClient(this._initialOptions);\n this._replay = new ReplayContainer({\n options: finalOptions,\n recordingOptions: this._recordingOptions\n });\n }\n /** Get canvas options from ReplayCanvas integration, if it is also added. */\n\n }, {\n key: \"_maybeLoadFromReplayCanvasIntegration\",\n value: function _maybeLoadFromReplayCanvasIntegration() {\n // To save bundle size, we skip checking for stuff here\n // and instead just try-catch everything - as generally this should all be defined\n\n /* eslint-disable @typescript-eslint/no-non-null-assertion */\n try {\n var client = getClient();\n var canvasIntegration = client.getIntegrationByName('ReplayCanvas');\n\n if (!canvasIntegration) {\n return;\n }\n\n this._replay['_canvas'] = canvasIntegration.getOptions();\n } catch (e) {// ignore errors here\n }\n /* eslint-enable @typescript-eslint/no-non-null-assertion */\n\n }\n }], [{\n key: \"__initStatic\",\n value:\n /**\n * @inheritDoc\n */\n function __initStatic() {\n this.id = 'Replay';\n }\n }]);\n\n return Replay$1;\n}();\n\nReplay$1.__initStatic();\n/** Parse Replay-related options from SDK options */\n\n\nfunction loadReplayOptionsFromClient(initialOptions) {\n var client = getClient();\n var opt = client && client.getOptions();\n\n var finalOptions = _objectSpread({\n sessionSampleRate: 0,\n errorSampleRate: 0\n }, dropUndefinedKeys(initialOptions));\n\n if (!opt) {\n consoleSandbox(function () {\n // eslint-disable-next-line no-console\n console.warn('SDK client is not available.');\n });\n return finalOptions;\n }\n\n if (initialOptions.sessionSampleRate == null && // TODO remove once deprecated rates are removed\n initialOptions.errorSampleRate == null && // TODO remove once deprecated rates are removed\n opt.replaysSessionSampleRate == null && opt.replaysOnErrorSampleRate == null) {\n consoleSandbox(function () {\n // eslint-disable-next-line no-console\n console.warn('Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.');\n });\n }\n\n if (typeof opt.replaysSessionSampleRate === 'number') {\n finalOptions.sessionSampleRate = opt.replaysSessionSampleRate;\n }\n\n if (typeof opt.replaysOnErrorSampleRate === 'number') {\n finalOptions.errorSampleRate = opt.replaysOnErrorSampleRate;\n }\n\n return finalOptions;\n}\n\nfunction _getMergedNetworkHeaders(headers) {\n return [].concat(DEFAULT_NETWORK_HEADERS, _toConsumableArray(headers.map(function (header) {\n return header.toLowerCase();\n })));\n}\n/**\n * This is a small utility to get a type-safe instance of the Replay integration.\n */\n// eslint-disable-next-line deprecation/deprecation\n\n\nfunction getReplay$1() {\n var client = getClient();\n return client && client.getIntegrationByName && client.getIntegrationByName('Replay');\n} // eslint-disable-next-line deprecation/deprecation\n\n/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */\n\n\nvar getReplay = getReplay$1;\n/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */\n\nvar replayIntegration = replayIntegration$1;\n/** @deprecated Use the export from `@sentry/replay` or from framework-specific SDKs like `@sentry/react` or `@sentry/vue` */\n// eslint-disable-next-line deprecation/deprecation\n\nvar Replay = /*#__PURE__*/function (_Replay$) {\n _inherits(Replay, _Replay$);\n\n var _super4 = _createSuper(Replay);\n\n function Replay() {\n _classCallCheck(this, Replay);\n\n return _super4.apply(this, arguments);\n }\n\n return _createClass(Replay);\n}(Replay$1);\n\nexport { Replay$1 as InternalReplay, Replay, getReplay, getReplay$1 as internalGetReplay, replayIntegration$1 as internalReplayIntegration, replayIntegration };","// 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\n/**\n * Polyfill for the nullish coalescing operator (`??`).\n *\n * Note that the RHS is wrapped in a function so that if it's a computed value, that evaluation won't happen unless the\n * LHS evaluates to a nullish value, to mimic the operator's short-circuiting behavior.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase)\n *\n * @param lhs The value of the expression to the left of the `??`\n * @param rhsFn A function returning the value of the expression to the right of the `??`\n * @returns The LHS value, unless it's `null` or `undefined`, in which case, the RHS value\n */\nfunction _nullishCoalesce(lhs, rhsFn) {\n // by checking for loose equality to `null`, we catch both `null` and `undefined`\n return lhs != null ? lhs : rhsFn();\n} // Sucrase version:\n// function _nullishCoalesce(lhs, rhsFn) {\n// if (lhs != null) {\n// return lhs;\n// } else {\n// return rhsFn();\n// }\n// }\n\n\nexport { _nullishCoalesce };","var _excluded = [\"type\"];\nimport _regeneratorRuntime from \"@babel/runtime/regenerator\";\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nimport { _optionalChain } from '@sentry/utils';\nimport { defineIntegration, convertIntegrationFnToClass } from '@sentry/core';\nvar NodeType;\n\n(function (NodeType) {\n NodeType[NodeType[\"Document\"] = 0] = \"Document\";\n NodeType[NodeType[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType[NodeType[\"Element\"] = 2] = \"Element\";\n NodeType[NodeType[\"Text\"] = 3] = \"Text\";\n NodeType[NodeType[\"CDATA\"] = 4] = \"CDATA\";\n NodeType[NodeType[\"Comment\"] = 5] = \"Comment\";\n})(NodeType || (NodeType = {}));\n\nfunction elementClassMatchesRegex(el, regex) {\n for (var eIndex = el.classList.length; eIndex--;) {\n var className = el.classList[eIndex];\n\n if (regex.test(className)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction distanceToMatch(node, matchPredicate) {\n var limit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Infinity;\n var distance = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n if (!node) return -1;\n if (node.nodeType !== node.ELEMENT_NODE) return -1;\n if (distance > limit) return -1;\n if (matchPredicate(node)) return distance;\n return distanceToMatch(node.parentNode, matchPredicate, limit, distance + 1);\n}\n\nfunction createMatchPredicate(className, selector) {\n return function (node) {\n var el = node;\n if (el === null) return false;\n\n try {\n if (className) {\n if (typeof className === 'string') {\n if (el.matches(\".\".concat(className))) return true;\n } else if (elementClassMatchesRegex(el, className)) {\n return true;\n }\n }\n\n if (selector && el.matches(selector)) return true;\n return false;\n } catch (e2) {\n return false;\n }\n };\n}\n\nvar DEPARTED_MIRROR_ACCESS_WARNING = 'Please stop import mirror directly. Instead of that,' + '\\r\\n' + 'now you can use replayer.getMirror() to access the mirror instance of a replayer,' + '\\r\\n' + 'or you can use record.mirror to access the mirror instance during recording.';\nvar _mirror = {\n map: {},\n getId: function getId() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return -1;\n },\n getNode: function getNode() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return null;\n },\n removeNodeFromMap: function removeNodeFromMap() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n },\n has: function has() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return false;\n },\n reset: function reset() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n }\n};\n\nif (typeof window !== 'undefined' && window.Proxy && window.Reflect) {\n _mirror = new Proxy(_mirror, {\n get: function get(target, prop, receiver) {\n if (prop === 'map') {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n }\n\n return Reflect.get(target, prop, receiver);\n }\n });\n}\n\nfunction hookSetter(target, key, d, isRevoked) {\n var win = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : window;\n var original = win.Object.getOwnPropertyDescriptor(target, key);\n win.Object.defineProperty(target, key, isRevoked ? d : {\n set: function set(value) {\n var _this = this;\n\n setTimeout(function () {\n d.set.call(_this, value);\n }, 0);\n\n if (original && original.set) {\n original.set.call(this, value);\n }\n }\n });\n return function () {\n return hookSetter(target, key, original || {}, true);\n };\n}\n\nfunction patch(source, name, replacement) {\n try {\n if (!(name in source)) {\n return function () {};\n }\n\n var original = source[name];\n var wrapped = replacement(original);\n\n if (typeof wrapped === 'function') {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __rrweb_original__: {\n enumerable: false,\n value: original\n }\n });\n }\n\n source[name] = wrapped;\n return function () {\n source[name] = original;\n };\n } catch (e2) {\n return function () {};\n }\n}\n\nif (!/[1-9][0-9]{12}/.test(Date.now().toString())) ;\n\nfunction closestElementOfNode(node) {\n if (!node) {\n return null;\n }\n\n var el = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;\n return el;\n}\n\nfunction isBlocked(node, blockClass, blockSelector, unblockSelector, checkAncestors) {\n if (!node) {\n return false;\n }\n\n var el = closestElementOfNode(node);\n\n if (!el) {\n return false;\n }\n\n var blockedPredicate = createMatchPredicate(blockClass, blockSelector);\n\n if (!checkAncestors) {\n var isUnblocked = unblockSelector && el.matches(unblockSelector);\n return blockedPredicate(el) && !isUnblocked;\n }\n\n var blockDistance = distanceToMatch(el, blockedPredicate);\n var unblockDistance = -1;\n\n if (blockDistance < 0) {\n return false;\n }\n\n if (unblockSelector) {\n unblockDistance = distanceToMatch(el, createMatchPredicate(null, unblockSelector));\n }\n\n if (blockDistance > -1 && unblockDistance < 0) {\n return true;\n }\n\n return blockDistance < unblockDistance;\n}\n\nvar cachedImplementations = {};\n\nfunction getImplementation(name) {\n var cached = cachedImplementations[name];\n\n if (cached) {\n return cached;\n }\n\n var document = window.document;\n var impl = window[name];\n\n if (document && typeof document.createElement === 'function') {\n try {\n var sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n var contentWindow = sandbox.contentWindow;\n\n if (contentWindow && contentWindow[name]) {\n impl = contentWindow[name];\n }\n\n document.head.removeChild(sandbox);\n } catch (e) {}\n }\n\n return cachedImplementations[name] = impl.bind(window);\n}\n\nfunction onRequestAnimationFrame() {\n return getImplementation('requestAnimationFrame').apply(void 0, arguments);\n}\n\nfunction setTimeout() {\n return getImplementation('setTimeout').apply(void 0, arguments);\n}\n\nvar CanvasContext = /* @__PURE__ */function (CanvasContext2) {\n CanvasContext2[CanvasContext2[\"2D\"] = 0] = \"2D\";\n CanvasContext2[CanvasContext2[\"WebGL\"] = 1] = \"WebGL\";\n CanvasContext2[CanvasContext2[\"WebGL2\"] = 2] = \"WebGL2\";\n return CanvasContext2;\n}(CanvasContext || {});\n\nvar errorHandler;\n\nfunction registerErrorHandler(handler) {\n errorHandler = handler;\n}\n\nvar callbackWrapper = function callbackWrapper(cb) {\n if (!errorHandler) {\n return cb;\n }\n\n var rrwebWrapped = function rrwebWrapped() {\n try {\n return cb.apply(void 0, arguments);\n } catch (error) {\n if (errorHandler && errorHandler(error) === true) {\n return function () {};\n }\n\n throw error;\n }\n };\n\n return rrwebWrapped;\n};\n/*\n * base64-arraybuffer 1.0.1 \n * Copyright (c) 2021 Niklas von Hertzen \n * Released under MIT License\n */\n\n\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; // Use a lookup table to find the index.\n\nvar lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\n\nfor (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\n\nvar encode = function encode(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer),\n i,\n len = bytes.length,\n base64 = '';\n\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n base64 += chars[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n base64 += chars[bytes[i + 2] & 63];\n }\n\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n\n return base64;\n};\n\nvar canvasVarMap = new Map();\n\nfunction variableListFor(ctx, ctor) {\n var contextMap = canvasVarMap.get(ctx);\n\n if (!contextMap) {\n contextMap = new Map();\n canvasVarMap.set(ctx, contextMap);\n }\n\n if (!contextMap.has(ctor)) {\n contextMap.set(ctor, []);\n }\n\n return contextMap.get(ctor);\n}\n\nvar saveWebGLVar = function saveWebGLVar(value, win, ctx) {\n if (!value || !(isInstanceOfWebGLObject(value, win) || _typeof(value) === 'object')) return;\n var name = value.constructor.name;\n var list = variableListFor(ctx, name);\n var index = list.indexOf(value);\n\n if (index === -1) {\n index = list.length;\n list.push(value);\n }\n\n return index;\n};\n\nfunction serializeArg(value, win, ctx) {\n if (value instanceof Array) {\n return value.map(function (arg) {\n return serializeArg(arg, win, ctx);\n });\n } else if (value === null) {\n return value;\n } else if (value instanceof Float32Array || value instanceof Float64Array || value instanceof Int32Array || value instanceof Uint32Array || value instanceof Uint8Array || value instanceof Uint16Array || value instanceof Int16Array || value instanceof Int8Array || value instanceof Uint8ClampedArray) {\n var name = value.constructor.name;\n return {\n rr_type: name,\n args: [Object.values(value)]\n };\n } else if (value instanceof ArrayBuffer) {\n var _name = value.constructor.name;\n var base64 = encode(value);\n return {\n rr_type: _name,\n base64: base64\n };\n } else if (value instanceof DataView) {\n var _name2 = value.constructor.name;\n return {\n rr_type: _name2,\n args: [serializeArg(value.buffer, win, ctx), value.byteOffset, value.byteLength]\n };\n } else if (value instanceof HTMLImageElement) {\n var _name3 = value.constructor.name;\n var src = value.src;\n return {\n rr_type: _name3,\n src: src\n };\n } else if (value instanceof HTMLCanvasElement) {\n var _name4 = 'HTMLImageElement';\n\n var _src = value.toDataURL();\n\n return {\n rr_type: _name4,\n src: _src\n };\n } else if (value instanceof ImageData) {\n var _name5 = value.constructor.name;\n return {\n rr_type: _name5,\n args: [serializeArg(value.data, win, ctx), value.width, value.height]\n };\n } else if (isInstanceOfWebGLObject(value, win) || _typeof(value) === 'object') {\n var _name6 = value.constructor.name;\n var index = saveWebGLVar(value, win, ctx);\n return {\n rr_type: _name6,\n index: index\n };\n }\n\n return value;\n}\n\nvar serializeArgs = function serializeArgs(args, win, ctx) {\n return args.map(function (arg) {\n return serializeArg(arg, win, ctx);\n });\n};\n\nvar isInstanceOfWebGLObject = function isInstanceOfWebGLObject(value, win) {\n var webGLConstructorNames = ['WebGLActiveInfo', 'WebGLBuffer', 'WebGLFramebuffer', 'WebGLProgram', 'WebGLRenderbuffer', 'WebGLShader', 'WebGLShaderPrecisionFormat', 'WebGLTexture', 'WebGLUniformLocation', 'WebGLVertexArrayObject', 'WebGLVertexArrayObjectOES'];\n var supportedWebGLConstructorNames = webGLConstructorNames.filter(function (name) {\n return typeof win[name] === 'function';\n });\n return Boolean(supportedWebGLConstructorNames.find(function (name) {\n return value instanceof win[name];\n }));\n};\n\nfunction initCanvas2DMutationObserver(cb, win, blockClass, blockSelector, unblockSelector) {\n var handlers = [];\n var props2D = Object.getOwnPropertyNames(win.CanvasRenderingContext2D.prototype);\n\n var _iterator = _createForOfIteratorHelper(props2D),\n _step;\n\n try {\n var _loop = function _loop() {\n var prop = _step.value;\n\n try {\n if (typeof win.CanvasRenderingContext2D.prototype[prop] !== 'function') {\n return \"continue\";\n }\n\n var restoreHandler = patch(win.CanvasRenderingContext2D.prototype, prop, function (original) {\n return function () {\n var _this2 = this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (!isBlocked(this.canvas, blockClass, blockSelector, unblockSelector, true)) {\n setTimeout(function () {\n var recordArgs = serializeArgs(args, win, _this2);\n cb(_this2.canvas, {\n type: CanvasContext['2D'],\n property: prop,\n args: recordArgs\n });\n }, 0);\n }\n\n return original.apply(this, args);\n };\n });\n handlers.push(restoreHandler);\n } catch (e) {\n var hookHandler = hookSetter(win.CanvasRenderingContext2D.prototype, prop, {\n set: function set(v) {\n cb(this.canvas, {\n type: CanvasContext['2D'],\n property: prop,\n args: [v],\n setter: true\n });\n }\n });\n handlers.push(hookHandler);\n }\n };\n\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _ret = _loop();\n\n if (_ret === \"continue\") continue;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return function () {\n handlers.forEach(function (h) {\n return h();\n });\n };\n}\n\nfunction getNormalizedContextName(contextType) {\n return contextType === 'experimental-webgl' ? 'webgl' : contextType;\n}\n\nfunction initCanvasContextObserver(win, blockClass, blockSelector, unblockSelector, setPreserveDrawingBufferToTrue) {\n var handlers = [];\n\n try {\n var restoreHandler = patch(win.HTMLCanvasElement.prototype, 'getContext', function (original) {\n return function (contextType) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n if (!isBlocked(this, blockClass, blockSelector, unblockSelector, true)) {\n var ctxName = getNormalizedContextName(contextType);\n if (!('__context' in this)) this.__context = ctxName;\n\n if (setPreserveDrawingBufferToTrue && ['webgl', 'webgl2'].includes(ctxName)) {\n if (args[0] && _typeof(args[0]) === 'object') {\n var contextAttributes = args[0];\n\n if (!contextAttributes.preserveDrawingBuffer) {\n contextAttributes.preserveDrawingBuffer = true;\n }\n } else {\n args.splice(0, 1, {\n preserveDrawingBuffer: true\n });\n }\n }\n }\n\n return original.apply(this, [contextType].concat(args));\n };\n });\n handlers.push(restoreHandler);\n } catch (e) {\n console.error('failed to patch HTMLCanvasElement.prototype.getContext');\n }\n\n return function () {\n handlers.forEach(function (h) {\n return h();\n });\n };\n}\n\nfunction patchGLPrototype(prototype, type, cb, blockClass, blockSelector, unblockSelector, mirror, win) {\n var handlers = [];\n var props = Object.getOwnPropertyNames(prototype);\n\n var _iterator2 = _createForOfIteratorHelper(props),\n _step2;\n\n try {\n var _loop2 = function _loop2() {\n var prop = _step2.value;\n\n if (['isContextLost', 'canvas', 'drawingBufferWidth', 'drawingBufferHeight'].includes(prop)) {\n return \"continue\";\n }\n\n try {\n if (typeof prototype[prop] !== 'function') {\n return \"continue\";\n }\n\n var restoreHandler = patch(prototype, prop, function (original) {\n return function () {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n var result = original.apply(this, args);\n saveWebGLVar(result, win, this);\n\n if ('tagName' in this.canvas && !isBlocked(this.canvas, blockClass, blockSelector, unblockSelector, true)) {\n var recordArgs = serializeArgs(args, win, this);\n var mutation = {\n type: type,\n property: prop,\n args: recordArgs\n };\n cb(this.canvas, mutation);\n }\n\n return result;\n };\n });\n handlers.push(restoreHandler);\n } catch (e) {\n var hookHandler = hookSetter(prototype, prop, {\n set: function set(v) {\n cb(this.canvas, {\n type: type,\n property: prop,\n args: [v],\n setter: true\n });\n }\n });\n handlers.push(hookHandler);\n }\n };\n\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var _ret2 = _loop2();\n\n if (_ret2 === \"continue\") continue;\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return handlers;\n}\n\nfunction initCanvasWebGLMutationObserver(cb, win, blockClass, blockSelector, unblockSelector, mirror) {\n var handlers = [];\n handlers.push.apply(handlers, _toConsumableArray(patchGLPrototype(win.WebGLRenderingContext.prototype, CanvasContext.WebGL, cb, blockClass, blockSelector, unblockSelector, mirror, win)));\n\n if (typeof win.WebGL2RenderingContext !== 'undefined') {\n handlers.push.apply(handlers, _toConsumableArray(patchGLPrototype(win.WebGL2RenderingContext.prototype, CanvasContext.WebGL2, cb, blockClass, blockSelector, unblockSelector, mirror, win)));\n }\n\n return function () {\n handlers.forEach(function (h) {\n return h();\n });\n };\n}\n\nvar r = \"for(var e=\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\",t=\\\"undefined\\\"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s=\\\"\\\";for(a=0;a>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+\\\"=\\\":r%3==1&&(s=s.substring(0,s.length-2)+\\\"==\\\"),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!(\\\"OffscreenCanvas\\\"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+\\\"-\\\"+t;if(\\\"OffscreenCanvas\\\"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext(\\\"2d\\\");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return\\\"\\\"}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext(\\\"bitmaprenderer\\\"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:\\\"low\\\"});w.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};\";\n\nfunction t() {\n var t = new Blob([r]);\n return URL.createObjectURL(t);\n}\n\nvar CanvasManager = /*#__PURE__*/function () {\n function CanvasManager(options) {\n var _this3 = this;\n\n _classCallCheck(this, CanvasManager);\n\n this.pendingCanvasMutations = new Map();\n this.rafStamps = {\n latestId: 0,\n invokeId: null\n };\n this.frozen = false;\n this.locked = false;\n\n this.processMutation = function (target, mutation) {\n var newFrame = _this3.rafStamps.invokeId && _this3.rafStamps.latestId !== _this3.rafStamps.invokeId;\n if (newFrame || !_this3.rafStamps.invokeId) _this3.rafStamps.invokeId = _this3.rafStamps.latestId;\n\n if (!_this3.pendingCanvasMutations.has(target)) {\n _this3.pendingCanvasMutations.set(target, []);\n }\n\n _this3.pendingCanvasMutations.get(target).push(mutation);\n };\n\n var _options$sampling = options.sampling,\n sampling = _options$sampling === void 0 ? 'all' : _options$sampling,\n win = options.win,\n blockClass = options.blockClass,\n blockSelector = options.blockSelector,\n unblockSelector = options.unblockSelector,\n maxCanvasSize = options.maxCanvasSize,\n recordCanvas = options.recordCanvas,\n dataURLOptions = options.dataURLOptions,\n errorHandler = options.errorHandler;\n this.mutationCb = options.mutationCb;\n this.mirror = options.mirror;\n this.options = options;\n\n if (errorHandler) {\n registerErrorHandler(errorHandler);\n }\n\n if (options.enableManualSnapshot) {\n return;\n }\n\n callbackWrapper(function () {\n if (recordCanvas && sampling === 'all') _this3.initCanvasMutationObserver(win, blockClass, blockSelector, unblockSelector);\n if (recordCanvas && typeof sampling === 'number') _this3.initCanvasFPSObserver(sampling, win, blockClass, blockSelector, unblockSelector, maxCanvasSize, {\n dataURLOptions: dataURLOptions\n });\n })();\n }\n\n _createClass(CanvasManager, [{\n key: \"reset\",\n value: function reset() {\n this.pendingCanvasMutations.clear();\n this.resetObservers && this.resetObservers();\n }\n }, {\n key: \"freeze\",\n value: function freeze() {\n this.frozen = true;\n }\n }, {\n key: \"unfreeze\",\n value: function unfreeze() {\n this.frozen = false;\n }\n }, {\n key: \"lock\",\n value: function lock() {\n this.locked = true;\n }\n }, {\n key: \"unlock\",\n value: function unlock() {\n this.locked = false;\n }\n }, {\n key: \"initCanvasFPSObserver\",\n value: function initCanvasFPSObserver(fps, win, blockClass, blockSelector, unblockSelector, maxCanvasSize, options) {\n var canvasContextReset = initCanvasContextObserver(win, blockClass, blockSelector, unblockSelector, true);\n var rafId = this.takeSnapshot(false, fps, win, blockClass, blockSelector, unblockSelector, maxCanvasSize, options.dataURLOptions);\n\n this.resetObservers = function () {\n canvasContextReset();\n cancelAnimationFrame(rafId);\n };\n }\n }, {\n key: \"initCanvasMutationObserver\",\n value: function initCanvasMutationObserver(win, blockClass, blockSelector, unblockSelector) {\n this.startRAFTimestamping();\n this.startPendingCanvasMutationFlusher();\n var canvasContextReset = initCanvasContextObserver(win, blockClass, blockSelector, unblockSelector, false);\n var canvas2DReset = initCanvas2DMutationObserver(this.processMutation.bind(this), win, blockClass, blockSelector, unblockSelector);\n var canvasWebGL1and2Reset = initCanvasWebGLMutationObserver(this.processMutation.bind(this), win, blockClass, blockSelector, unblockSelector, this.mirror);\n\n this.resetObservers = function () {\n canvasContextReset();\n canvas2DReset();\n canvasWebGL1and2Reset();\n };\n }\n }, {\n key: \"snapshot\",\n value: function snapshot(canvasElement) {\n var options = this.options;\n var rafId = this.takeSnapshot(true, options.sampling === 'all' ? 2 : options.sampling || 2, options.win, options.blockClass, options.blockSelector, options.unblockSelector, options.maxCanvasSize, options.dataURLOptions, canvasElement);\n\n this.resetObservers = function () {\n cancelAnimationFrame(rafId);\n };\n }\n }, {\n key: \"takeSnapshot\",\n value: function takeSnapshot(isManualSnapshot, fps, win, blockClass, blockSelector, unblockSelector, maxCanvasSize, dataURLOptions, canvasElement) {\n var _this4 = this;\n\n var snapshotInProgressMap = new Map();\n var worker = new Worker(t());\n\n worker.onmessage = function (e) {\n var data = e.data;\n var id = data.id;\n snapshotInProgressMap.set(id, false);\n if (!('base64' in data)) return;\n var base64 = data.base64,\n type = data.type,\n width = data.width,\n height = data.height;\n\n _this4.mutationCb({\n id: id,\n type: CanvasContext['2D'],\n commands: [{\n property: 'clearRect',\n args: [0, 0, width, height]\n }, {\n property: 'drawImage',\n args: [{\n rr_type: 'ImageBitmap',\n args: [{\n rr_type: 'Blob',\n data: [{\n rr_type: 'ArrayBuffer',\n base64: base64\n }],\n type: type\n }]\n }, 0, 0, width, height]\n }]\n });\n };\n\n var timeBetweenSnapshots = 1000 / fps;\n var lastSnapshotTime = 0;\n var rafId;\n\n var getCanvas = function getCanvas(canvasElement) {\n if (canvasElement) {\n return [canvasElement];\n }\n\n var matchedCanvas = [];\n win.document.querySelectorAll('canvas').forEach(function (canvas) {\n if (!isBlocked(canvas, blockClass, blockSelector, unblockSelector, true)) {\n matchedCanvas.push(canvas);\n }\n });\n return matchedCanvas;\n };\n\n var takeCanvasSnapshots = function takeCanvasSnapshots(timestamp) {\n if (lastSnapshotTime && timestamp - lastSnapshotTime < timeBetweenSnapshots) {\n rafId = onRequestAnimationFrame(takeCanvasSnapshots);\n return;\n }\n\n lastSnapshotTime = timestamp;\n getCanvas(canvasElement).forEach(function (canvas) {\n var id = _this4.mirror.getId(canvas);\n\n if (snapshotInProgressMap.get(id)) return;\n if (!canvas.width || !canvas.height) return;\n snapshotInProgressMap.set(id, true);\n\n if (!isManualSnapshot && ['webgl', 'webgl2'].includes(canvas.__context)) {\n var context = canvas.getContext(canvas.__context);\n\n if (_optionalChain([context, 'optionalAccess', function (_) {\n return _.getContextAttributes;\n }, 'call', function (_2) {\n return _2();\n }, 'optionalAccess', function (_3) {\n return _3.preserveDrawingBuffer;\n }]) === false) {\n context.clear(context.COLOR_BUFFER_BIT);\n }\n }\n\n createImageBitmap(canvas).then(function (bitmap) {\n worker.postMessage({\n id: id,\n bitmap: bitmap,\n width: canvas.width,\n height: canvas.height,\n dataURLOptions: dataURLOptions,\n maxCanvasSize: maxCanvasSize\n }, [bitmap]);\n }).catch(function (error) {\n callbackWrapper(function () {\n throw error;\n })();\n });\n });\n rafId = onRequestAnimationFrame(takeCanvasSnapshots);\n };\n\n rafId = onRequestAnimationFrame(takeCanvasSnapshots);\n return rafId;\n }\n }, {\n key: \"startPendingCanvasMutationFlusher\",\n value: function startPendingCanvasMutationFlusher() {\n var _this5 = this;\n\n onRequestAnimationFrame(function () {\n return _this5.flushPendingCanvasMutations();\n });\n }\n }, {\n key: \"startRAFTimestamping\",\n value: function startRAFTimestamping() {\n var _this6 = this;\n\n var setLatestRAFTimestamp = function setLatestRAFTimestamp(timestamp) {\n _this6.rafStamps.latestId = timestamp;\n onRequestAnimationFrame(setLatestRAFTimestamp);\n };\n\n onRequestAnimationFrame(setLatestRAFTimestamp);\n }\n }, {\n key: \"flushPendingCanvasMutations\",\n value: function flushPendingCanvasMutations() {\n var _this7 = this;\n\n this.pendingCanvasMutations.forEach(function (values, canvas) {\n var id = _this7.mirror.getId(canvas);\n\n _this7.flushPendingCanvasMutationFor(canvas, id);\n });\n onRequestAnimationFrame(function () {\n return _this7.flushPendingCanvasMutations();\n });\n }\n }, {\n key: \"flushPendingCanvasMutationFor\",\n value: function flushPendingCanvasMutationFor(canvas, id) {\n if (this.frozen || this.locked) {\n return;\n }\n\n var valuesWithType = this.pendingCanvasMutations.get(canvas);\n if (!valuesWithType || id === -1) return;\n var values = valuesWithType.map(function (value) {\n var type = value.type,\n rest = _objectWithoutProperties(value, _excluded);\n\n return rest;\n });\n var type = valuesWithType[0].type;\n this.mutationCb({\n id: id,\n type: type,\n commands: values\n });\n this.pendingCanvasMutations.delete(canvas);\n }\n }]);\n\n return CanvasManager;\n}();\n\nvar CANVAS_QUALITY = {\n low: {\n sampling: {\n canvas: 1\n },\n dataURLOptions: {\n type: 'image/webp',\n quality: 0.25\n }\n },\n medium: {\n sampling: {\n canvas: 2\n },\n dataURLOptions: {\n type: 'image/webp',\n quality: 0.4\n }\n },\n high: {\n sampling: {\n canvas: 4\n },\n dataURLOptions: {\n type: 'image/webp',\n quality: 0.5\n }\n }\n};\nvar INTEGRATION_NAME = 'ReplayCanvas';\nvar DEFAULT_MAX_CANVAS_SIZE = 1280;\n/** Exported only for type safe tests. */\n\nvar _replayCanvasIntegration = function _replayCanvasIntegration() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _ref = options.maxCanvasSize || [],\n _ref2 = _slicedToArray(_ref, 2),\n maxCanvasWidth = _ref2[0],\n maxCanvasHeight = _ref2[1];\n\n var _canvasOptions = {\n quality: options.quality || 'medium',\n enableManualSnapshot: options.enableManualSnapshot,\n maxCanvasSize: [maxCanvasWidth ? Math.min(maxCanvasWidth, DEFAULT_MAX_CANVAS_SIZE) : DEFAULT_MAX_CANVAS_SIZE, maxCanvasHeight ? Math.min(maxCanvasHeight, DEFAULT_MAX_CANVAS_SIZE) : DEFAULT_MAX_CANVAS_SIZE]\n };\n var canvasManagerResolve;\n\n var _canvasManager = new Promise(function (resolve) {\n return canvasManagerResolve = resolve;\n });\n\n return {\n name: INTEGRATION_NAME,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n setupOnce: function setupOnce() {},\n getOptions: function getOptions() {\n var quality = _canvasOptions.quality,\n enableManualSnapshot = _canvasOptions.enableManualSnapshot,\n maxCanvasSize = _canvasOptions.maxCanvasSize;\n return _objectSpread({\n enableManualSnapshot: enableManualSnapshot,\n recordCanvas: true,\n getCanvasManager: function getCanvasManager(getCanvasManagerOptions) {\n var manager = new CanvasManager(_objectSpread(_objectSpread({}, getCanvasManagerOptions), {}, {\n enableManualSnapshot: enableManualSnapshot,\n maxCanvasSize: maxCanvasSize,\n errorHandler: function errorHandler(err) {\n try {\n if (_typeof(err) === 'object') {\n err.__rrweb__ = true;\n }\n } catch (error) {// ignore errors here\n // this can happen if the error is frozen or does not allow mutation for other reasons\n }\n }\n }));\n canvasManagerResolve(manager);\n return manager;\n }\n }, CANVAS_QUALITY[quality || 'medium'] || CANVAS_QUALITY.medium);\n },\n snapshot: function snapshot(canvasElement) {\n return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {\n var canvasManager;\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return _canvasManager;\n\n case 2:\n canvasManager = _context.sent;\n canvasManager.snapshot(canvasElement);\n\n case 4:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }))();\n }\n };\n};\n/**\n * Add this in addition to `replayIntegration()` to enable canvas recording.\n */\n\n\nvar replayCanvasIntegration = defineIntegration(_replayCanvasIntegration);\n/**\n * @deprecated Use `replayCanvasIntegration()` instead\n */\n// eslint-disable-next-line deprecation/deprecation\n\nvar ReplayCanvas = convertIntegrationFnToClass(INTEGRATION_NAME, replayCanvasIntegration);\nexport { ReplayCanvas, replayCanvasIntegration };","var _excluded = [\"formTitle\", \"showBranding\", \"showName\", \"showEmail\", \"isNameRequired\", \"isEmailRequired\", \"colorScheme\", \"defaultName\", \"defaultEmail\", \"onClosed\", \"onCancel\", \"onSubmit\"],\n _excluded2 = [\"shouldCreateActor\"];\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport _regeneratorRuntime from \"@babel/runtime/regenerator\";\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { GLOBAL_OBJ, getLocationHref, logger, isBrowser } from '@sentry/utils';\nimport { prepareEvent, getIsolationScope, getClient, withScope, createEventEnvelope, getCurrentScope } from '@sentry/core'; // exporting a separate copy of `WINDOW` rather than exporting the one from `@sentry/browser`\n// prevents the browser package from being bundled in the CDN bundle, and avoids a\n// circular dependency between the browser and feedback packages\n\nvar WINDOW = GLOBAL_OBJ;\nvar LIGHT_BACKGROUND = '#ffffff';\nvar INHERIT = 'inherit';\nvar SUBMIT_COLOR = 'rgba(108, 95, 199, 1)';\nvar LIGHT_THEME = {\n fontFamily: \"system-ui, 'Helvetica Neue', Arial, sans-serif\",\n fontSize: '14px',\n background: LIGHT_BACKGROUND,\n backgroundHover: '#f6f6f7',\n foreground: '#2b2233',\n border: '1.5px solid rgba(41, 35, 47, 0.13)',\n borderRadius: '25px',\n boxShadow: '0px 4px 24px 0px rgba(43, 34, 51, 0.12)',\n success: '#268d75',\n error: '#df3338',\n submitBackground: 'rgba(88, 74, 192, 1)',\n submitBackgroundHover: SUBMIT_COLOR,\n submitBorder: SUBMIT_COLOR,\n submitOutlineFocus: '#29232f',\n submitForeground: LIGHT_BACKGROUND,\n submitForegroundHover: LIGHT_BACKGROUND,\n cancelBackground: 'transparent',\n cancelBackgroundHover: 'var(--background-hover)',\n cancelBorder: 'var(--border)',\n cancelOutlineFocus: 'var(--input-outline-focus)',\n cancelForeground: 'var(--foreground)',\n cancelForegroundHover: 'var(--foreground)',\n inputBackground: INHERIT,\n inputForeground: INHERIT,\n inputBorder: 'var(--border)',\n inputOutlineFocus: SUBMIT_COLOR,\n formBorderRadius: '20px',\n formContentBorderRadius: '6px'\n};\nvar DEFAULT_THEME = {\n light: LIGHT_THEME,\n dark: _objectSpread(_objectSpread({}, LIGHT_THEME), {}, {\n background: '#29232f',\n backgroundHover: '#352f3b',\n foreground: '#ebe6ef',\n border: '1.5px solid rgba(235, 230, 239, 0.15)',\n success: '#2da98c',\n error: '#f55459'\n })\n};\nvar ACTOR_LABEL = 'Report a Bug';\nvar CANCEL_BUTTON_LABEL = 'Cancel';\nvar SUBMIT_BUTTON_LABEL = 'Send Bug Report';\nvar FORM_TITLE = 'Report a Bug';\nvar EMAIL_PLACEHOLDER = 'your.email@example.org';\nvar EMAIL_LABEL = 'Email';\nvar MESSAGE_PLACEHOLDER = \"What's the bug? What did you expect?\";\nvar MESSAGE_LABEL = 'Description';\nvar NAME_PLACEHOLDER = 'Your Name';\nvar NAME_LABEL = 'Name';\nvar IS_REQUIRED_LABEL = '(required)';\nvar SUCCESS_MESSAGE_TEXT = 'Thank you for your report!';\nvar FEEDBACK_WIDGET_SOURCE = 'widget';\nvar FEEDBACK_API_SOURCE = 'api';\n/**\n * Prepare a feedback event & enrich it with the SDK metadata.\n */\n\nfunction prepareFeedbackEvent(_x) {\n return _prepareFeedbackEvent.apply(this, arguments);\n}\n/**\n * Send feedback using transport\n */\n\n\nfunction _prepareFeedbackEvent() {\n _prepareFeedbackEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref) {\n var client, scope, event, eventHint, preparedEvent;\n return _regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n client = _ref.client, scope = _ref.scope, event = _ref.event;\n eventHint = {};\n\n if (client.emit) {\n client.emit('preprocessEvent', event, eventHint);\n }\n\n _context2.next = 5;\n return prepareEvent(client.getOptions(), event, eventHint, scope, client, getIsolationScope());\n\n case 5:\n preparedEvent = _context2.sent;\n\n if (!(preparedEvent === null)) {\n _context2.next = 9;\n break;\n }\n\n // Taken from baseclient's `_processEvent` method, where this is handled for errors/transactions\n client.recordDroppedEvent('event_processor', 'feedback', event);\n return _context2.abrupt(\"return\", null);\n\n case 9:\n // This normally happens in browser client \"_prepareEvent\"\n // but since we do not use this private method from the client, but rather the plain import\n // we need to do this manually.\n preparedEvent.platform = preparedEvent.platform || 'javascript';\n return _context2.abrupt(\"return\", preparedEvent);\n\n case 11:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n return _prepareFeedbackEvent.apply(this, arguments);\n}\n\nfunction sendFeedbackRequest(_x2) {\n return _sendFeedbackRequest.apply(this, arguments);\n}\n/*\n * For reference, the fully built event looks something like this:\n * {\n * \"type\": \"feedback\",\n * \"event_id\": \"d2132d31b39445f1938d7e21b6bf0ec4\",\n * \"timestamp\": 1597977777.6189718,\n * \"dist\": \"1.12\",\n * \"platform\": \"javascript\",\n * \"environment\": \"production\",\n * \"release\": 42,\n * \"tags\": {\"transaction\": \"/organizations/:orgId/performance/:eventSlug/\"},\n * \"sdk\": {\"name\": \"name\", \"version\": \"version\"},\n * \"user\": {\n * \"id\": \"123\",\n * \"username\": \"user\",\n * \"email\": \"user@site.com\",\n * \"ip_address\": \"192.168.11.12\",\n * },\n * \"request\": {\n * \"url\": None,\n * \"headers\": {\n * \"user-Agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15\"\n * },\n * },\n * \"contexts\": {\n * \"feedback\": {\n * \"message\": \"test message\",\n * \"contact_email\": \"test@example.com\",\n * \"type\": \"feedback\",\n * },\n * \"trace\": {\n * \"trace_id\": \"4C79F60C11214EB38604F4AE0781BFB2\",\n * \"span_id\": \"FA90FDEAD5F74052\",\n * \"type\": \"trace\",\n * },\n * \"replay\": {\n * \"replay_id\": \"e2d42047b1c5431c8cba85ee2a8ab25d\",\n * },\n * },\n * }\n */\n\n/**\n * Public API to send a Feedback item to Sentry\n */\n\n\nfunction _sendFeedbackRequest() {\n _sendFeedbackRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref2) {\n var _ref2$feedback,\n message,\n email,\n name,\n source,\n url,\n _ref19,\n _ref19$includeReplay,\n includeReplay,\n client,\n transport,\n dsn,\n baseEvent,\n _args4 = arguments;\n\n return _regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _ref2$feedback = _ref2.feedback, message = _ref2$feedback.message, email = _ref2$feedback.email, name = _ref2$feedback.name, source = _ref2$feedback.source, url = _ref2$feedback.url;\n _ref19 = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {}, _ref19$includeReplay = _ref19.includeReplay, includeReplay = _ref19$includeReplay === void 0 ? true : _ref19$includeReplay;\n client = getClient();\n transport = client && client.getTransport();\n dsn = client && client.getDsn();\n\n if (!(!client || !transport || !dsn)) {\n _context4.next = 7;\n break;\n }\n\n return _context4.abrupt(\"return\");\n\n case 7:\n baseEvent = {\n contexts: {\n feedback: {\n contact_email: email,\n name: name,\n message: message,\n url: url,\n source: source\n }\n },\n type: 'feedback'\n };\n return _context4.abrupt(\"return\", withScope( /*#__PURE__*/function () {\n var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(scope) {\n var feedbackEvent, envelope, response, error;\n return _regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n // No use for breadcrumbs in feedback\n scope.clearBreadcrumbs();\n\n if ([FEEDBACK_API_SOURCE, FEEDBACK_WIDGET_SOURCE].includes(String(source))) {\n scope.setLevel('info');\n }\n\n _context3.next = 4;\n return prepareFeedbackEvent({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n scope: scope,\n client: client,\n event: baseEvent\n });\n\n case 4:\n feedbackEvent = _context3.sent;\n\n if (feedbackEvent) {\n _context3.next = 7;\n break;\n }\n\n return _context3.abrupt(\"return\");\n\n case 7:\n if (client.emit) {\n client.emit('beforeSendFeedback', feedbackEvent, {\n includeReplay: Boolean(includeReplay)\n });\n }\n\n envelope = createEventEnvelope(feedbackEvent, dsn, client.getOptions()._metadata, client.getOptions().tunnel);\n _context3.prev = 9;\n _context3.next = 12;\n return transport.send(envelope);\n\n case 12:\n response = _context3.sent;\n _context3.next = 20;\n break;\n\n case 15:\n _context3.prev = 15;\n _context3.t0 = _context3[\"catch\"](9);\n error = new Error('Unable to send Feedback');\n\n try {\n // In case browsers don't allow this property to be writable\n // @ts-expect-error This needs lib es2022 and newer\n error.cause = _context3.t0;\n } catch (e) {// nothing to do\n }\n\n throw error;\n\n case 20:\n if (response) {\n _context3.next = 22;\n break;\n }\n\n return _context3.abrupt(\"return\");\n\n case 22:\n if (!(typeof response.statusCode === 'number' && (response.statusCode < 200 || response.statusCode >= 300))) {\n _context3.next = 24;\n break;\n }\n\n throw new Error('Unable to send Feedback');\n\n case 24:\n return _context3.abrupt(\"return\", response);\n\n case 25:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, null, [[9, 15]]);\n }));\n\n return function (_x7) {\n return _ref20.apply(this, arguments);\n };\n }()));\n\n case 9:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4);\n }));\n return _sendFeedbackRequest.apply(this, arguments);\n}\n\nfunction sendFeedback(_ref3) {\n var name = _ref3.name,\n email = _ref3.email,\n message = _ref3.message,\n _ref3$source = _ref3.source,\n source = _ref3$source === void 0 ? FEEDBACK_API_SOURCE : _ref3$source,\n _ref3$url = _ref3.url,\n url = _ref3$url === void 0 ? getLocationHref() : _ref3$url;\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!message) {\n throw new Error('Unable to submit feedback with empty message');\n }\n\n return sendFeedbackRequest({\n feedback: {\n name: name,\n email: email,\n message: message,\n url: url,\n source: source\n }\n }, options);\n}\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\n\n\nvar DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__;\n/**\n * Quick and dirty deep merge for the Feedback integration options\n */\n\nfunction mergeOptions(defaultOptions, optionOverrides) {\n return _objectSpread(_objectSpread(_objectSpread({}, defaultOptions), optionOverrides), {}, {\n themeDark: _objectSpread(_objectSpread({}, defaultOptions.themeDark), optionOverrides.themeDark),\n themeLight: _objectSpread(_objectSpread({}, defaultOptions.themeLight), optionOverrides.themeLight)\n });\n}\n/**\n * Creates