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lers$2","handler","typeHandlers","index","maybeInstrument","instrumentFn","e","DEBUG_BUILD$3","debug","triggerHandlers","data","getFunctionName","_oldOnErrorHandler","addGlobalErrorInstrumentationHandler","addHandler$1","instrumentError","GLOBAL_OBJ","triggerHandlers$1","_oldOnUnhandledRejectionHandler","addGlobalUnhandledRejectionInstrumentationHandler","instrumentUnhandledRejection","handlerData","parseSampleRate","sampleRate","rate","logIgnoredSpan","debug$1","droppedSpan","shouldIgnoreSpan","ignoreSpans","pattern","isStringOrRegExp","span","isMatchingPattern","hasAttributes","nameMatches","opMatches","attrsMatch","key","valuePattern","_matchesAttributeValue","actual","pat","v","i","reparentChildSpans","droppedSpanParentId","dropSpan","droppedSpanId","spans","value","isStreamedBeforeSendSpanCallback","callback","createEnvelope","headers","items","addItemToEnvelope","envelope","newItem","forEachEnvelopeItem","envelopeItems","envelopeItem","envelopeItemType","envelopeContainsItemType","types","encodeUTF8","carrier","getSentryCarrier","input","serializeEnvelope","envHeaders","parts","append","next","item","itemHeaders","payload","stringifiedPayload","normalize","concatBuffers","totalLength","buffers","acc","buf","merged","offset","buffer","createAttachmentEnvelopeItem","attachment","DATA_CATEGORY_OVERRIDES","_isOverriddenType","envelopeItemTypeToDataCategory","getSdkMetadataForEnvelopeHeader","metadataOrEvent","createEventEnvelopeHeaders","dynamicSamplingContext","event","safeDateNow","sdkInfo","tunnel","dsn","dsnToString","_enhanceEventWithSdkInfo","newSdkInfo","eventSdkInfo","createSessionEnvelope","metadata","session","createEventEnvelope","eventType","envelopeHeaders","hasSpanStreamingEnabled","client","debounce","callbackReturnValue","timerId","maxTimerId","maxWait","options","wait","setTimeoutImpl","invokeFunc","cancelTimers","func","flush","debounced","Qu","safeSetSpanJSONAttributes","originalAttributes","spanJSON","newAttributes","safeUnref","timer","getBaseApiEndpoint","protocol","port","_getIngestEndpoint","_encodedAuth","params","getEnvelopeEndpointWithUrlEncodedAuth","installedIntegrations","filterDuplicates","integrationsByName","integrations","currentInstance","existingInstance","name","getIntegrationsToSetup","defaultIntegrations","userIntegrations","resolvedUserIntegrations","setupIntegrations","integrationIndex","integration","setupIntegration","afterSetupIntegrations","hint","processor","hook","defineIntegration","fn","isBrowserBundle","getSDKSource","isNodeEnv","isBrowser","isElectronNodeRenderer","createLogContainerEnvelopeItem","inferSetting","inferUserData","createLogEnvelope","logs","_INTERNAL_flushLogsBuffer","logBuffer","maybeLogBuffer","_INTERNAL_getLogBuffer","clientOptions","_getBufferMap$1","_getBufferMap","getGlobalSingleton","createMetricContainerEnvelopeItem","createMetricEnvelope","metrics","_INTERNAL_flushMetricsBuffer","metricBuffer","maybeMetricBuffer","_INTERNAL_getMetricBuffer","spanJsonToSerializedStreamedSpan","streamedSpan","streamedSpanJsonToSerializedSpan","extractGenAiSpansFromEvent","genAiSpans","remainingSpans","SENTRY_BUFFER_FULL_ERROR","makePromiseBuffer","isReady","limit","remove","task","add","rejectedSyncPromise","taskProducer","drain","resolvedSyncPromise","drainPromise","timeout","promises","resolve","DEFAULT_RETRY_AFTER","parseRetryAfterHeader","headerDelay","header","headerDate","now","disabledUntil","limits","dataCategory","isRateLimited","updateRateLimits","updatedRateLimits","rateLimitHeader","retryAfterHeader","retryAfter","categories","namespaces","delay","category","statusCode","createTransport","rateLimits","send","filteredEnvelopeItems","filteredEnvelope","recordEnvelopeLoss","reason","makeRequest","response","DEBUG_BUILD","error","result","createClientReportEnvelope","clientReportItem","timestamp","dateTimestampInSeconds","getPossibleEventMessages","possibleMessages","lastException","convertTransactionEventToSpanJson","span_id","trace_id","SEMANTIC_ATTRIBUTE_PROFILE_ID","SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME","convertSpanJsonToTransactionEvent","FILTERED_VALUE","PII_HEADER_SNIPPETS","SENSITIVE_KEY_SNIPPETS","defaultPiiToCollectionOptions","sendDefaultPii","DEFAULTS","isCollectBehavior","resolveHttpHeaders","httpHeaders","base","resolveDataCollectionOptions","dc","ALREADY_SEEN_ERROR","MISSING_RELEASE_FOR_SESSION_ERROR","INTERNAL_ERROR_SYMBOL","DO_NOT_SEND_EVENT_SYMBOL","DEFAULT_FLUSH_INTERVAL","_makeInternalError","_makeDoNotSendEventError","_isInternalError","isObjectLike","_isDoNotSendEventError","setupWeightBasedFlushing","weight","flushTimeout","isTimerActive","flushHook","afterCaptureHook","estimateSizeFn","flushFn","flushInterval","Client","makeDsn","url","estimateLogSizeInBytes","estimateMetricSizeInBytes","eventId","uuid4","checkOrSetAlreadyCaught","exception","hintWithEventId","scope","res","eventMessage","isParameterizedString","message","isMessage","isPrimitive","promisedEvent","level","currentScope","sdkProcessingMetadata","capturedSpanScope","capturedSpanIsolationScope","getDataCategoryByType","updateSession","transport","clientFinished","transportFlushed","eventProcessor","integrationName","isAlreadyInstalled","genAiSpanItem","env","sendResponse","clientReleaseOption","clientEnvironmentOption","DEFAULT_ENVIRONMENT","sessionAttrs","count","hookCallbacks","uniqueCallback","args","rest","callbacks","crashed","errored","exceptions","ex","sessionNonTerminal","ticked","isolationScope","prepareEvent","evt","getTraceContextFromScope","getDynamicSamplingContextFromScope","getCurrentScope","getIsolationScope","isErrorEvent","finalEvent","isTransaction","isTransactionEvent","isError","beforeSendLabel","parsedSampleRate","prepared","_validateBeforeSendResult","processBeforeSend","processedEvent","spanCount","safeMathRandom","droppedSpanCount","transactionInfo","outcomes","quantity","invalidValueError","isThenable","beforeSendResult","isPlainObject","beforeSendSpan","beforeSend","rootSpanJson","processedRootSpanJson","merge","showSpanDropWarning","processedSpans","initialSpans","processedSpan","droppedSpans","beforeSendTransaction","spanCountBefore","metric","estimateAttributesSizeInBytes","log","attributes","estimatePrimitiveSizeInBytes","initAndBind","consoleSandbox","clientClass","setCurrentClient","isSensitiveKey","denySnippets","lower","snippet","shouldFilterDataKey","behavior","lowerKey","additionalDenyTerms","matchesConfiguredTerm","term","filterQueryParams","queryString","separatorIndex","pair","encodedKey","filterUrlQuery","fragmentStart","queryEnd","queryStart","prefix","query","suffix","filtered","urlQueryParamsBehavior","getClient","filterCollectedUrl","DEFAULT_BASE_URL","isURLObjectRelative","parseStringToURLObject","isRelative","urlBase","fullUrlObject","parseUrl","match","fragment","stripDataUrlContent","mimeType","isBase64","dataStart","dataPrefix","includeDataPrefix","isSentryRequestUrl","checkDsn","checkTunnel","removeTrailingSlash","urlParts","hostnameMatchesDsnHost","hostname","dsnHost","str","addAutoIpAddressToSession","\"ip_address\"","applySdkMetadata","sdk","names","source","name2","SDK_VERSION","DEFAULT_BREADCRUMBS","addBreadcrumb","maxBreadcrumbs","mergedBreadcrumb","breadcrumb","finalBreadcrumb","beforeBreadcrumb","INTEGRATION_NAME","SETUP_CLIENTS","functionToStringIntegration","originalFunctionToString","originalFunction","getOriginalFunction","unwrappedFunction","DEFAULT_IGNORE_ERRORS","eventFiltersIntegration","mergedOptions","_mergeOptions","_shouldDropEvent","inboundFiltersIntegration","internalOptions","_isIgnoredError","getEventDescription","_isUselessError","_isDeniedUrl","_getEventFilterUrl","_isAllowedUrl","_isIgnoredTransaction","ignoreErrors","stringMatchesSomePattern","ignoreTransactions","denyUrls","allowUrls","_getLastValidUrl","frames","frame","applyAggregateErrorsToEvent","originalException","aggregateExceptionsFromError","exceptionFromErrorImplementation","parser","prevExceptions","newExceptions","applyExceptionGroupFieldsForParentException","exceptionId","newException","newExceptionId","applyExceptionGroupFieldsForChildException","isExceptionGroup","childError","parentId","hasSentryFetchUrlHost","_enhanceErrorWithSentryInfo","_filter","addConsoleInstrumentationHandler","removeHandler","instrumentConsole","instrumentedLevels","CONSOLE_LEVELS$1","fill","originalConsoleMethod","firstArg","originalConsoleMethods","isFiltered","severityLevelFromString","dedupeIntegration","previousEvent","currentEvent","_isSameMessageEvent","_isSameExceptionEvent","currentMessage","previousMessage","_isSameFingerprint","_isSameStacktrace","previousException","_getExceptionFromEvent","currentException","currentFrames","getFramesFromEvent","previousFrames","frameA","frameB","currentFingerprint","previousFingerprint","conversationIdIntegration","scopeData","isolationScopeData","conversationId","spanToJSON","op","GEN_AI_CONVERSATION_ID_ATTRIBUTE","getBreadcrumbLogLevelFromHttpStatusCode","WINDOW","supportsHistory","_isFetchSupported","isNativeFunction","supportsNativeFetch","doc","sandbox","err","addFetchInstrumentationHandler","instrumentFetch","skipNativeFetchCheck","virtualError","parseFetchArgs","timestampInSeconds","getHeadersFromFetchArgs","onFetchResolved","originalFetch","addNonEnumerableProperty","enhanceOption","hasProp","obj","prop","getUrlFromResource","resource","fetchArgs","isRequest","arg","requestArgument","optionsArgument","getLocationHref","getComponentName","currentElem","elem","maxTraverseHeight","\"sentryComponent\"","\"sentryElement\"","ignoreOnError","shouldIgnoreOnError","ignoreNextOnError","wrap","isFunction","fn2","wrapper","sentryWrapped","wrappedArguments","withScope","addExceptionTypeValue","addExceptionMechanism","captureException","property","markFunctionWrapped","getHttpRequestData","referrer","userAgent","exceptionFromError","parseStackFrames","stackParser","extractType","extractMessage","eventFromPlainObject","normalizeDepth","errorFromProp","getErrorPropertyFromObject","extra","normalizeToSize","isEvent","isUnhandledRejection","getNonErrorObjectExceptionValue","syntheticException","eventFromError","stacktrace","skipLines","getSkipFirstStackStringLines","framesToPop","getPopFirstTopFrames","reactMinifiedRegexp","isWebAssemblyException","_INTERNAL_enhanceErrorWithSentryInfo","eventFromException","eventFromUnknownInput","attachStacktrace","eventFromMessage","eventFromString","errorEvent","isDOMError","isDOMException","domException","firstException","objectException","__sentry_template_string__","__sentry_template_values__","keys","extractExceptionKeysForMessage","captureType","getObjectClassName","prototype","BrowserClient","opts","applyDefaultOptions","userInfo","WINDOW$2","sendClientReports","optionsArg","getRating","thresholds","bindReporter","prevValue","delta","forceReport","reportAllChanges","getNavigationEntry","navigationEntry","checkResponseStart","getActivationStart","addPageListener","WINDOW$1","listener","removePageListener","firstHiddenTime","onHiddenFunctions","initHiddenTime","onVisibilityUpdate","isPageHidden","onHiddenFunction","getVisibilityWatcher","activationStart","cb","generateUniqueID","initMetric","navEntry","navigationType","instanceMap","initUnique","identityObj","ClassObj","LayoutShiftManager","entry","firstSessionEntry","lastSessionEntry","observe","po","list","runOnce","called","whenActivated","FCPThresholds","onFCP","visibilityWatcher","report","entries","onReport","CLSThresholds","onCLS","layoutShiftManager","handleEntries","interactionCountEstimate","minKnownInteractionId","maxKnownInteractionId","updateEstimate","getInteractionCount","initInteractionCountPolyfill","MAX_INTERACTIONS_TO_CONSIDER","prevInteractionCount","getInteractionCountForNavigation","InteractionManager","candidateInteractionIndex","minLongestInteraction","interaction","b","a","removedInteractions","interaction2","whenIdleOrHidden","rIC","INPThresholds","DEFAULT_DURATION_THRESHOLD","onINP","interactionManager","inp","LCPEntryManager","LCPThresholds","onLCP","lcpEntryManager","stopListening","stopListeningWrapper","_previousCls","_previousLcp","_previousInp","addClsInstrumentationHandler","addMetricObserver","instrumentCls","stopOnCallback","addLcpInstrumentationHandler","instrumentLcp","addInpInstrumentationHandler","instrumentInp","addPerformanceInstrumentationHandler","instrumentPerformanceObserver","getCleanupCallback","DEBUG_BUILD$2","previousValue","handlers$1","DEFAULT_MAX_STRING_LENGTH","accessors","_safeRead","el","val","htmlTreeAsString","out","height","len","nextStr","keyAttrs","maxStringLength","_htmlElementAsString","tagName","dataset","keyAttrPairs","keyAttr","keyAttrPair","id","className","isString","classes","c","k","attr","DEBOUNCE_DURATION","debounceTimerID","lastCapturedEventType","lastCapturedEventTargetId","addClickKeypressInstrumentationHandler","instrumentDOM","triggerDOMHandler","globalDOMEventHandler","makeDOMEventHandler","proto","globalObject","target","handlerForType","originalAddEventListener","originalRemoveEventListener","isSimilarToLastCapturedEvent","shouldSkipDOMEvent","\"_sentryCaptured\"","getEventTarget","globalListener","lastHref","addHistoryInstrumentationHandler","instrumentHistory","to","from","historyReplacementFunction","getAbsoluteUrl","originalHistoryFunction","urlOrPath","cachedImplementations","getNativeImplementation","cached","impl","document","contentWindow","clearCachedImplementation","setTimeout","fallback","SENTRY_XHR_DATA_KEY","addXhrInstrumentationHandler","instrumentXHR","xhrproto","startTimestamp","method","xhrOpenArgArray","parseXhrUrlArg","originalOpen","xhrOpenThisArg","onreadystatechangeHandler","xhrInfo","originalOnreadystatechange","onreadystatechangeThisArg","onreadystatechangeArgArray","setRequestHeaderArgArray","setRequestHeaderThisArg","originalSetRequestHeader","sentryXhrData","sendThisArg","sendArgArray","originalSend","ORIGINAL_REQ_BODY","serializeFormData","formData","getBodyString","body","_debug","getFetchRequestArgBody","originalBody","parseXhrResponseHeaders","xhr","line","isElement","wat","DEFAULT_BROWSER_TRANSPORT_BUFFER_SIZE","makeFetchTransport","pendingBodySize","pendingCount","requestSize","request","requestOptions","nativeFetch","CHROME_PRIORITY","GECKO_PRIORITY","createFrame","lineno","colno","chromeRegexNoFnName","chromeRegex","chromeEvalRegex","chromeDataUriRegex","chromeStackLineParser","dataUriMatch","noFnParts","filename","line2","col","subMatch","extractSafariExtensionDetails","geckoREgex","geckoEvalRegex","defaultStackParser","createStackParser","isSafariExtension","isSafariWebExtension","MAX_ALLOWED_STRING_LENGTH","breadcrumbsIntegration","_options","_getConsoleBreadcrumbHandler","_getDomBreadcrumbHandler","_getXhrBreadcrumbHandler","_getFetchBreadcrumbHandler","_getHistoryBreadcrumbHandler","_getSentryBreadcrumbHandler","componentName","dom","DEBUG_BUILD$1","element","_isEvent","safeJoin","endTimestamp","status_code","parsedLoc","parsedFrom","parsedTo","DEFAULT_EVENT_TARGET","browserApiErrorsIntegration","_wrapTimeFunction","_wrapRAF","_wrapXHR","eventTargetOption","_wrapEventTarget","originalCallback","original","wrapOptions","isEventListenerObject","integrationOptions","unregisterOriginalCallback","eventName","originalEventHandler","browserSessionIntegration","lifecycle","startSession","initialSessionSent","captureSession","previousUser","maybeNewUser","cultureContextIntegration","culture","getCultureContext","intl","globalHandlersIntegration","_installGlobalOnErrorHandler","globalHandlerLog","_installGlobalOnUnhandledRejectionHandler","getOptions","_enhanceEventWithInitialFrame","msg","column","captureEvent","_getUnhandledRejectionError","_eventFromRejectionWithPrimitive","ev","ev0","ev0s","ev0sf","getFilenameFromUrl","httpContextIntegration","reqData","USER_AGENT_ORIGINAL","\"Referer\"","DEFAULT_KEY","DEFAULT_LIMIT","linkedErrorsIntegration","HTML_ELEMENT_CONSTRUCTOR_NAME_REGEX","normalizeStringifyValue","objName","getConstructorName","checkAndWarnIfIsEmbeddedBrowserExtension","_isEmbeddedBrowserExtension","_window","\"chrome\"","\"browser\"","href","getDefaultIntegrations","init","shouldDisableBecauseIsBrowserExtenstion","stackParserFromStackParserOptions","setNormalizeStringifier","REPLAY_SESSION_KEY","REPLAY_EVENT_NAME","UNABLE_TO_SEND_REPLAY","SESSION_IDLE_PAUSE_DURATION","SESSION_IDLE_EXPIRE_DURATION","DEFAULT_FLUSH_MIN_DELAY","DEFAULT_FLUSH_MAX_DELAY","BUFFER_CHECKOUT_TIME","RETRY_BASE_INTERVAL","RETRY_MAX_COUNT","NETWORK_BODY_MAX_SIZE","CONSOLE_ARG_MAX_SIZE","SLOW_CLICK_THRESHOLD","SLOW_CLICK_SCROLL_TIMEOUT","REPLAY_MAX_EVENT_BUFFER_SIZE","MIN_REPLAY_DURATION","MIN_REPLAY_DURATION_LIMIT","MAX_REPLAY_DURATION","__defProp","__defNormalProp","__publicField","NodeType$1","\"Document\"","\"DocumentType\"","\"Element\"","\"Text\"","\"CDATA\"","\"Comment\"","NodeType2","isElement$1","n","isShadowRoot","isNativeShadowDom","shadowRoot","fixBrowserCompatibilityIssuesInCSS","cssText","escapeImportStatement","rule","statement","stringifyStylesheet","rules","s","stringifyRule","fixAllCssProperty","styles","i2","styleDeclaration","attribute","isImportant","importStringified","isCSSImportRule","isCSSStyleRule","needsSafariColonFix","needsAllFix","\"all\"","fixSafariColons","cssStringified","Mirror","childNode","node","meta","oldNode","createMirror","shouldMaskInput","maskInputOptions","\"text\"","maskInputValue","text","isMasked","maskInputFn","toLowerCase","toUpperCase","ORIGINAL_ATTRIBUTE_NAME","is2DCanvasBlank","ctx","canvas","x","y","getImageData","originalGetImageData","pixel","getInputType","getInputValue","extractFileExtension","path","baseURL","cachedImplementations$1","getImplementation$1","windowImpl","document2","sandboxImpl","setTimeout$1","clearTimeout$1","getIFrameContentDocument$1","iframe","getIFrameContentWindow$1","_id","tagNameRegex","IGNORED_NODE","genId","getValidTagName","processedTagName","extractOrigin","origin","canvasService","canvasCtx","URL_IN_CSS_REF","URL_PROTOCOL_MATCH","URL_WWW_MATCH","DATA_URI","filterCSSPropertiesFromInlineStyle","ignoredProperties","properties","filteredProperties","colonIndex","propertyName","absoluteToStylesheet","filePath","path1","path2","path3","maybeQuote","quote1","quote2","stack","part","SRCSET_NOT_SPACES","SRCSET_COMMAS_OR_SPACES","getAbsoluteSrcsetString","attributeValue","pos","collectCharacters","chars2","regEx","output","absoluteToDoc","descriptorsStr","inParens","cachedDocument","getHref","isSVGElement","customHref","transformAttribute","processedStyle","ignoreCSSAttributes","maskAttributeFn","ignoreAttribute","_isBlockedElement","unblockSelector","blockClass","eIndex","blockSelector","elementClassMatchesRegex","regex","distanceToMatch","matchPredicate","distance","createMatchPredicate","selector","needMaskingText","autocomplete","maskDistance","unmaskDistance","maskAllText","unmaskTextClass","unmaskTextSelector","maskTextClass","maskTextSelector","onceIframeLoaded","win","iframeEl","fired","readyState","iframeLoadTimeout","blankUrl","onceStylesheetLoaded","styleSheetLoaded","link","styleSheetLoadTimeout","serializeNode","rootId","getRootId","mirror","serializeElementNode","serializeTextNode","docId","parentTagName","textContent","isStyle","isScript","isTextarea","forceMask","maskTextFn","needBlock","attributes2","inlineStylesheet","stylesheet","checked","\"select\"","recordCanvas","dataURLOptions","canvasDataURL","blankCanvas","inlineImages","image","imageSrc","priorCrossOrigin","recordInlineImage","newlyAddedElement","width","keepIframeSrcFn","isCustomElement","lowerIfExists","maybeAttr","slimDOMExcluded","slimDOMOptions","sn","serializeNodeWithId","_serializedNode","preserveWhiteSpace","serializedNode2","onSerialize","recordChild","skipChild","bypassOptions","childNodes","childN","serializedChildNode","iframeDoc","onIframeLoad","serializedIframeNode","updateImageDimensions","onBlockedImageLoad","rect","onStylesheetLoad","serializedLinkNode","stylesheetLoadTimeout","snapshot","maskAllInputs","slimDOM","on","DEPARTED_MIRROR_ACCESS_WARNING","_mirror","receiver","throttle$1","previous","remaining","context","clearTimeout$2","setTimeout$2","hookSetter","isRevoked","d","patch","wrapped","replacement","nowTimestamp","getWindowScroll","getWindowHeight","getWindowWidth","closestElementOfNode$1","isBlocked","blockedPredicate","checkAncestors","isUnblocked","blockDistance","unblockDistance","isSerialized","isIgnored","isAncestorRemoved","legacy_isTouchEvent","polyfill","isSerializedIframe","isSerializedStylesheet","hasShadowRoot","StyleSheetMirror","newId","getShadowHost","shadowHost","getRootShadowHost","rootShadowHost","shadowHostInDom","inDom","getImplementation","onRequestAnimationFrame","EventType","\"DomContentLoaded\"","\"Load\"","\"FullSnapshot\"","\"IncrementalSnapshot\"","\"Meta\"","\"Custom\"","\"Plugin\"","EventType2","IncrementalSource","\"Mutation\"","\"MouseMove\"","\"MouseInteraction\"","\"Scroll\"","\"ViewportResize\"","\"Input\"","\"TouchMove\"","\"MediaInteraction\"","\"StyleSheetRule\"","\"CanvasMutation\"","\"Font\"","\"Log\"","\"Drag\"","\"StyleDeclaration\"","\"Selection\"","\"AdoptedStyleSheet\"","\"CustomElement\"","IncrementalSource2","MouseInteractions","\"MouseUp\"","\"MouseDown\"","\"Click\"","\"ContextMenu\"","\"DblClick\"","\"Focus\"","\"Blur\"","\"TouchStart\"","\"TouchMove_Departed\"","\"TouchEnd\"","\"TouchCancel\"","MouseInteractions2","PointerTypes","\"Mouse\"","\"Pen\"","\"Touch\"","PointerTypes2","MediaInteractions","\"Play\"","\"Pause\"","\"Seeked\"","\"VolumeChange\"","\"RateChange\"","MediaInteractions2","errorHandler","registerErrorHandler","unregisterErrorHandler","callbackWrapper","chars","lookup","CanvasManagerNoop","getIFrameContentDocument","getIFrameContentWindow","StyleDeclarationParser","styleText","sheet","old","isNodeInLinkedList","n2","DoubleLinkedList","position","current","moveKey","MutationBuffer","mutations","adds","addedIds","addList","getNextId","ns","nextId","pushAdd","currentN","childSn","serializedNode","isAncestorInSet","isParentRemoved","candidate","tailNode","_node","unhandledNode","diffAsStr","unchangedAsStr","m","attributeName","isInputMasked","oldStyle","pname","newValue","newPriority","nodeId","deepDelete","targetId","addsSet","removes","_isParentRemoved","mirror2","r2","set","_isAncestorInSet","parentNode","mutationBuffers","initMutationObserver","mutationBuffer","mutationObserverCtor","angularZoneSymbol","observer","rootEl","initMoveObserver","sampling","threshold","callbackThreshold","positions","timeBaseline","wrappedCb","totalOffset","mousemoveCb","p","updatePosition","clientX","clientY","h","initMouseInteractionObserver","disableMap","currentPointerType","getHandler","pointerType","thisEventKey","eventKey","e2","mouseInteractionCb","initScrollObserver","scrollLeftTop","scrollCb","initViewportResizeObserver","lastH","lastW","viewportResizeCb","INPUT_TAGS","lastInputValueMap","initInputObserver","eventHandler","userTriggered","ignoreClass","ignoreSelector","isChecked","cbWithDedup","userTriggeredOnInput","el2","text2","lastInputValue","v2","inputCb","currentWindow","propertyDescriptor","hookProperties","getNestedCSSRulePositions","recurse","hasNestedCSSRule","childRule","getIdAndStyleId","styleId","styleMirror","initStyleSheetObserver","insertRule","argumentsList","thisArg","stylesheetManager","styleSheetRuleCb","deleteRule","replace","replaceSync","supportedNestedCSSRuleTypes","canMonkeyPatchNestedCSSRule","unmodifiedFunctions","typeKey","initAdoptedStyleSheetObserver","hostId","host","patchTarget","originalPropertyDescriptor","sheets","initStyleDeclarationObserver","setProperty","priority","styleDeclarationCb","removeProperty","initMediaInteractionObserver","mediaInteractionCb","initFontObserver","fontMap","originalFontFace","fontFace","family","descriptors","restoreHandler","fontCb","initSelectionObserver","param","collapsed","updateSelection","selection","ranges","startContainer","endContainer","selectionCb","initCustomElementObserver","customElementCb","constructor","initObservers","o2","mutationObserver","mousemoveHandler","mouseInteractionHandler","scrollHandler","viewportResizeHandler","inputHandler","mediaInteractionHandler","styleSheetObserver","adoptedStyleSheetObserver","styleDeclarationObserver","fontObserver","selectionObserver","customElementObserver","pluginHandlers","plugin","CrossOriginIframeMirror","generateIdFn","idToRemoteIdMap","idToRemoteMap","remoteIdToIdMap","remoteToIdMap","remoteId","map","ids","IframeManagerNoop","IframeManager","crossOriginMessageEvent","transformedEvent","range","style","iframeMirror","child","ShadowDomManagerNoop","ShadowDomManager","iframeElement","iframeWindow","iframeElementConstructor","manager","option","StylesheetManager","linkEl","adoptedStyleSheetData","ProcessedNodeManager","thisBuffer","wrappedEmit","_takeFullSnapshot","cleanFrame","record","_maskInputOptions","_slimDOMOptions","inEmittingFrame","passEmitsToParent","emit","mousemoveWait","lastFullSnapshotEvent","incrementalSnapshotCount","plugins","packFn","isCheckout","exceedCount","checkoutEveryNth","exceedTime","checkoutEveryNms","takeFullSnapshot2","wrappedMutationEmit","wrappedScrollEmit","wrappedCanvasMutationEmit","a2","iframeManager","processedNodeManager","canvasManager","_getCanvasManager","getCanvasManager","\"canvas\"","shadowDomManager","recordDOM","c2","recordAfter","takeFullSnapshot","getCanvasManagerFn","ReplayEventTypeIncrementalSnapshot","ReplayEventTypeCustom","timestampToMs","timestampToS","addBreadcrumbEvent","replay","INTERACTIVE_SELECTOR","getClosestInteractive","getClickTargetNode","getTargetNode","isEventWithTarget","onWindowOpen","monkeyPatchWindowOpen","originalWindowOpen","IncrementalMutationSources","handleClick","clickDetector","clickBreadcrumb","ClickDetector","slowClickConfig","_addBreadcrumbEvent","cleanupWindowOpen","nowInSeconds","ignoreElement","isClickBreadcrumb","newClick","click","timedOutClicks","hadScroll","hadMutation","isSlowClick","timeAfterClickMs","endReason","clickCount","setTimeout$3","SLOW_CLICK_TAGS","updateClickDetectorForRecordingEvent","isIncrementalEvent","isIncrementalMouseInteraction","createBreadcrumb","NodeType","ATTRIBUTES_TO_RECORD","BREADCRUMB_RELEVANT_ATTRIBUTES","getAttributesToRecord","normalizedKey","handleDomListener","handleDom","isClick","getBaseDomBreadcrumb","node2","getDomTarget","handleKeyboardEvent","getKeyboardBreadcrumb","isInputElement","hasModifierKey","metaKey","ctrlKey","altKey","isCharacterKey","ENTRY_TYPES","createResourceEntry","createPaintEntry","createNavigationEntry","webVitalHandler","getter","createPerformanceEntries","createPerformanceEntry","entryType","getAbsoluteTime","browserPerformanceTimeOrigin","time","start","startTime","duration","domComplete","transferSize","initiatorType","responseEnd","responseStatus","getLargestContentfulPaint","lastEntry","getWebVital","isLayoutShift","getCumulativeLayoutShift","layoutShifts","nodes","nodeIds","getInteractionToNextPaint","rating","end","setupPerformanceObserver","addPerformanceEntry","onEntries","clearCallbacks","clearCallback","t","CONSOLE_LEVELS","PREFIX","_addBreadcrumb","makeReplayDebugLogger","_capture","_trace","EventBufferSizeExceededError","WorkerDestroyedError","EventBufferArray","eventSize","eventsRet","ts","WorkerHandler","pending","worker","reject","EventBufferCompressionWorker","EventBufferProxy","addEventPromises","events","hasCheckout","waitForCheckout","createEventBuffer","customWorkerUrl","useCompression","_loadWorker","workerUrl","_getWorkerUrl","hasSessionStorage","clearSession","deleteSession","isSampled","saveSession","makeSession","getSessionSampleType","sessionSampleRate","allowBuffering","createSession","stickySession","fetchSession","sessionStringFromStorage","sessionObj","isExpired","initialTime","expiry","targetTime","isSessionExpired","maxReplayDuration","sessionIdleExpire","shouldRefreshSession","loadOrCreateSession","existingSession","sessionOptions","isCustomEvent","addEventSync","shouldAddEvent","_addEvent","addEvent","eventBuffer","isBufferMode","eventAfterPossibleCallback","maybeApplyCallback","isExceeded","dropReason","timestampInMs","MAX_CONTEXT_VALUES","addSegmentDetailsToContext","replayContext","traceId","segmentName","handleProcessSegmentSpan","isReplayEvent","isFeedbackEvent","handleAfterSendEvent","handleTransactionEvent","handleErrorEvent","beforeErrorSampling","handleBeforeSendEvent","handleHydrationError","exceptionValue","handleBreadcrumbs","beforeAddBreadcrumb","isBreadcrumbWithCategory","normalizeBreadcrumb","normalizeConsoleBreadcrumb","isTruncated","normalizedArgs","normalizedArg","isRrwebError","resetReplayIdOnDynamicSamplingContext","dsc","activeSpan","getActiveSpan","dsc2","getDynamicSamplingContextFromSpan","setReplayIdOnDynamicSamplingContext","replayId","addFeedbackBreadcrumb","shouldSampleForBufferEvent","handleGlobalEventListener","isErrorEventSampled","createPerformanceSpans","handleHistory","handleHistorySpanListener","shouldFilterRequest","addNetworkBreadcrumb","getBodySize","textEncoder","formDataStr","parseContentLengthHeader","size","mergeWarning","info","warning","newMeta","makeNetworkReplayBreadcrumb","buildSkippedNetworkRequestOrResponse","bodySize","buildNetworkRequestOrResponse","normalizedBody","normalizeNetworkBody","warnings","getAllowedHeaders","allowedHeaders","filteredHeaders","exceedsSizeLimit","isProbablyJson","_strIsProbablyJson","truncatedBody","first","last","urlMatches","fullUrl","getFullUrl","urls","fixedUrl","baseURI","captureFetchBreadcrumbToReplay","_prepareFetchData","enrichFetchBreadcrumb","reqSize","resSize","requestBodySize","responseBodySize","captureDetails","_getRequestInfo","_getResponseInfo","getRequestHeaders","networkRequestHeaders","networkCaptureBodies","bodyStr","getAllHeaders","networkResponseHeaders","bodyText","_parseFetchResponseBody","getResponseData","_tryCloneResponse","_tryGetResponseText","allHeaders","getHeadersFromOptions","_getResponseText","txt","captureXhrBreadcrumbToReplay","_prepareXhrData","enrichXhrBreadcrumb","_getBodySize","requestBody","requestWarning","responseBody","responseWarning","_getXhrResponseBody","errors","_parseXhrResponse","responseType","handleNetworkBreadcrumbs","beforeAddNetworkBreadcrumb","_isXhrBreadcrumb","_isXhrHint","_isFetchBreadcrumb","_isFetchHint","addGlobalListeners","addEventProcessor","feedbackEvent","addMemoryEntry","createMemoryEntry","memoryEntry","debounce$1","NAVIGATOR","getRecordingSamplingOptions","getHandleRecordingEmit","hadFirstEvent","_isCheckout","syncMirrorAttributesFromMutationEvent","addSettingsEvent","earliestEvent","mutation","changed","createOptionsEvent","closestElementOfNode","createReplayEnvelope","replayEvent","recordingData","prepareRecordingData","payloadWithSequence","replayHeaders","sequence","prepareReplayEvent","event_id","eventHint","\"_integrations\"","preparedEvent","version","sendReplayRequest","segment_id","preparedRecordingData","eventContext","initialTimestamp","errorIds","traceIds","segmentNames","RateLimitError","TransportStatusCodeError","ReplayDurationLimitError","sendReplay","replayData","setContext","retryConfig","onError","err2","THROTTLED","SKIPPED","throttle","counter","_cleanup","durationSeconds","_getTotalCount","isThrottled","maxCount","wasThrottled","ReplayContainer","recordingOptions","slowClickTimeout","slowClickIgnoreSelectors","experiments","requiresManualStart","errorSampleRate","previousSessionId","canvasOptions","stopReason","forceFlush","activityTime","hasStoppedRecording","continueRecording","cbResult","urlPath","lastActiveSpan","lastRootSpan","getRootSpan","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","currentSession","_lastActivity","performanceEntries","initialTimestampInSeconds","_context","segmentId","force","tooShort","tooLong","_flushInProgress","ignoreMutations","mutationLimit","mutationBreadcrumbLimit","overMutationLimit","getOption","selectors","defaultSelectors","getPrivacyOptions","mask","unmask","block","unblock","ignore","maskAttribute","privacyOptions","masksNamedAttribute","maskAttributes","masksSubmitButtonValue","MEDIA_SELECTORS","DEFAULT_NETWORK_HEADERS","ORIGINAL_BODY","_initialized","_isRequestInstrumented","_INTERNAL_instrumentRequestInterface","OriginalRequest","SentryRequest","replayIntegration","Replay","maskFn","_experiments","minReplayDuration","_getMergedNetworkHeaders","onlyIfSampled","finalOptions","loadReplayOptionsFromClient","canvasIntegration","\"_canvas\"","opt","initialOptions","replaysSessionSampleRate","replaysOnErrorSampleRate","getReplay","FrameLoadingStyle","FrameElement","frameLoadingStyleFromString","drive","activateScriptElement","createdScriptElement","cspNonce","getCspNonce","copyElementAttributes","sourceElement","destinationElement","createDocumentFragment","template","html","dispatch","cancelEvent","nextRepaint","nextEventLoopTick","nextAnimationFrame","parseHTMLDocument","unindent","values","lines","interpolate","strings","indent","string","uuid","getAttribute","elements","hasAttribute","markAsBusy","clearBusyState","waitForLoad","onComplete","timeoutInMilliseconds","getHistoryMethodForAction","action","isAction","getVisitAction","getMetaElement","getMetaContent","nonce","content","setMetaContent","findClosestRecursively","elementIsFocusable","queryAutofocusableElement","elementOrDocumentFragment","around","before","reader","doesNotTargetIFrame","findLinkFromClickTarget","linkTarget","timeoutId","submitter","\"disabled\"","config","#submitter","expandURL","locatable","getAnchor","anchorMatch","getAction$1","form","getExtension","getLastPathComponent","isPrefixedBy","addTrailingSlash","locationIsVisitable","location","rootLocation","getLocationForLink","getRequestURL","anchor","toCacheKey","urlsAreEqual","left","right","getPathComponents","FetchResponse","recentRequests","maxSize","oldestValue","fetchWithTurboHeaders","modifiedHeaders","requestUID","fetchMethodFromString","FetchMethod","fetchEnctypeFromString","encoding","FetchEnctype","FetchRequest","buildResourceAndBody","enctype","delegate","fetchBody","fetchMethod","#allowRequestToBeIntercepted","fetchOptions","#willDelegateErrorHandling","fetchResponse","isSafe","\"Accept\"","requestInterception","#resolveRequestPromise","searchParams","entriesExcludingFiles","mergeIntoURLSearchParams","AppearanceObserver","StreamMessage","importStreamElements","streamElement","inertScriptElement","identity","LRUCache","#toCacheKey","PREFETCH_DELAY","PrefetchCache","prefetchDelay","#prefetchTimeout","ttl","cacheTtl","#maxAges","maxAge","prefetchCache","FormSubmissionState","FormSubmission","getMethod","formElement","getAction","getFormAction","buildFormData","getEnctype","mustRedirect","confirmationMessage","initialized","requesting","stopping","stopped","token","getCookieValue","responseSucceededWithoutRedirect","cookieName","cookie","formElementAction","formAction","Snapshot","queryPermanentElementsAll","getPermanentElementById","permanentElementMap","currentPermanentElement","newPermanentElement","FormSubmitObserver","eventTarget","submissionDoesNotDismissDialog","submissionDoesNotTargetIFrame","View","renderer","shouldInvalidate","willRender","shouldRender","#resolveRenderPromise","renderInterception","#resolveInterceptionPromise","isPreview","direction","FrameView","LinkInterceptor","LinkClickObserver","FormLinkClickObserver","originalEvent","turboFrame","turboAction","turboConfirm","Bardo","bardo","placeholder","createPlaceholderForPermanentElement","permanentElement","clone","Renderer","currentSnapshot","newSnapshot","#activeElement","FrameRenderer","destinationRange","currentElement","frameElement","newElement","sourceRange","renderElement","readScrollLogicalPosition","readScrollBehavior","activatedScriptElement","defaultValue","Idiomorph","noOp","defaults","elt","morph","normalizeElement","newNode","normalizeParent","newContent","createMorphContext","morphedNodes","saveAndRestoreFocus","withHeadBlocking","morphChildren","morphOuterHTML","oldParent","activeElement","activeElementId","results","selectionEnd","selectionStart","newParent","newChild","insertionPoint","endPoint","bestMatch","findBestMatch","removeNodesBetween","morphNode","newChildId","movedChild","moveBeforeById","insertedNode","createNode","tempNode","removeNode","newEmptyChild","newClonedChild","softMatch","nextSibling","siblingSoftMatchCount","cursor","startPoint","isSoftMatch","isIdSetMatch","oldSet","newSet","oldElt","newElt","moveBefore","startInclusive","endExclusive","removeElementFromAncestorsIdMaps","after","idSet","handleHeadElement","morphAttributes","ignoreValueOfActiveElement","oldAttributes","newAttribute","oldAttribute","syncInputValue","oldElement","oldValue","syncBooleanAttribute","newLiveValue","ignoreUpdate","updateType","possibleActiveElement","oldHead","newHead","added","removed","preserved","nodesToAppend","srcToNewHeadNodes","newHeadChild","currentHeadElt","inNewContent","isReAppended","isPreserved","promise","_resolve","removedElement","createIdMaps","mergedConfig","mergeDefaults","morphStyle","createPantry","createActiveElementAndParents","finalConfig","pantry","activeElementAndParents","findIdElements","root","populateIdMapWithTree","persistentIds","idMap","oldIdElements","oldContent","newIdElements","createPersistentIds","duplicateIds","oldIdTagNameMap","generatedByIdiomorph","parseContent","SlicedParentNode","dummyParent","nodeList","referenceNode","contentWithSvgsRemoved","htmlElement","morphElements","DefaultIdiomorphCallbacks","shouldRefreshFrameWithMorphing","currentFrame","newFrame","areFramesCompatibleForRefreshing","closestFrameReloadableWithMorphing","#beforeNodeMorphed","beforeNodeMorphed","MorphingFrameRenderer","ProgressBar","HeadSnapshot","elementIsNoscript","elementWithoutNonce","details","outerHTML","elementType","elementIsTracked","matchedType","tracked","elementIsMetaElementWithName","elementIsScript","elementIsStylesheet","PageSnapshot","documentElement","head","headSnapshot","clonedElement","selectElements","clonedSelectElements","clonedPasswordInput","clonedNoscriptElement","ViewTransitioner","useViewTransition","#viewTransitionStarted","#lastOperation","render","defaultOptions","TimingMetric","VisitState","SystemStatusCode","Direction","Visit","restorationIdentifier","historyChanged","snapshotHTML","visitCachedSnapshot","updateHistory","shouldCacheSnapshot","acceptsStreamResponse","refresh","isSuccessful","responseHTML","scrollPosition","BrowserAdapter","visit","CacheObserver","FrameRedirector","#shouldRedirect","#findFrameElement","#shouldSubmit","History","state","restorationData","additionalData","turbo","restorationIndex","LinkPrefetchObserver","#enable","#tryToPrefetchRequest","#cancelRequestIfObsolete","#tryToUsePrefetchedRequest","#isPrefetchable","#prefetchedLink","fetchRequest","#cacheTtl","#cancelPrefetchRequest","turboFrameTarget","unfetchableLink","linkToTheSamePage","linkOptsOut","nonSafeLink","eventPrevented","turboPrefetchParent","turboMethod","isUJS","Navigator","formSubmission","visitOptions","#getActionForFormSubmission","#getDefaultAction","PageStage","PageObserver","ScrollObserver","StreamMessageRenderer","getPermanentElementMapForFragment","withAutofocusFromFragment","withPreservedFocus","permanentElementsInDocument","permanentElementInDocument","elementInStream","generatedID","elementWithAutofocus","firstAutofocusableElementInStreams","willAutofocusId","elementToAutofocus","activeElementBeforeRender","activeElementAfterRender","restoreFocusTo","elementToFocus","nodeListOfStreamElements","StreamObserver","#started","fetchResponseFromEvent","fetchResponseIsStream","ErrorRenderer","replaceableElement","PageRenderer","#setLanguage","lang","dir","mergedHeadElements","newStylesheetElements","loadingElements","newHeadElements","elementList","noscriptElement","MorphingPageRenderer","SnapshotCache","PageView","cachedSnapshot","Preloader","snapshotCache","#preloadAll","Cache","#setCacheControl","Session","adapter","isRecentRequest","requestId","isCurrentUrl","#pageRefreshDebouncePeriod","isUnsafe","isStream","frameTarget","extendURLWithDeprecatedProperties","defaultPrevented","renderMethod","submitterIsNavigatable","container","withinFrame","deprecatedLocationPropertyDescriptors","sessionNavigator","registerAdapter","connectStreamSource","disconnectStreamSource","renderStreamMessage","setProgressBarDelay","setConfirmMethod","confirmMethod","setFormMode","mode","morphBodyElements","currentBody","newBody","morphTurboFrameElements","Turbo","TurboFrameMissingError","FrameController","#connected","#loadSourceURL","#currentFetchRequest","#isIgnoringChangesTo","#hasBeenLoaded","#shouldMorphFrame","src","#visit","#loadFrameResponse","#handleUnvisitableFrameResponse","#shouldInterceptNavigation","#navigateFrame","#resolveVisitPromise","newFrameElement","rendererClass","#willHandleFrameMissingFromResponse","#handleFrameMissingFromResponse","#withCurrentNavigationElement","pageSnapshot","#visitResponse","#throwFrameMissingError","#getFrameElementById","activateElement","#formActionIsVisitable","#ignoringChangesToAttribute","sourceURL","#ignoredAttributes","currentURL","StreamActions","targetElement","scroll","StreamElement","existingChildren","newChildrenIds","actionFunction","#raise","StreamSourceElement","scriptElement","consumer","getConsumer","setConsumer","createConsumer","newConsumer","__vitePreload","subscribeTo","subscriptions","channel","mixin","walk","camel","TurboCableStreamSourceElement","snakeize","encodeMethodIntoRequestBody","isBodyInit","determineFetchMethod","formMethod","determineFormMethod","overrideMethod","response_container_quantity_controller_default","Controller","reg","CONTROLLER_FILENAME_REGEX","registerControllers","application","definitionsFromGlob","controllerModules","definitionFromEntry","controllerModule","identifier","identifierForGlobKey","controllerConstructor","logicalName","Application","__import_glob__0_0_","Sentry.replayIntegration","Sentry.init","Sentry.getClient","repl","Sentry.getReplay","setUser"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110],"sources":["../../../node_modules/@sentry/core/build/esm/instrument/handlers.js","../../../node_modules/@sentry/core/build/esm/instrument/globalError.js","../../../node_modules/@sentry/core/build/esm/instrument/globalUnhandledRejection.js","../../../node_modules/@sentry/core/build/esm/utils/parseSampleRate.js","../../../node_modules/@sentry/core/build/esm/utils/should-ignore-span.js","../../../node_modules/@sentry/core/build/esm/tracing/spans/beforeSendSpan.js","../../../node_modules/@sentry/core/build/esm/utils/envelope.js","../../../node_modules/@sentry/core/build/esm/envelope.js","../../../node_modules/@sentry/core/build/esm/tracing/spans/hasSpanStreamingEnabled.js","../../../node_modules/@sentry/core/build/esm/utils/debounce.js","../../../node_modules/@sentry/conventions/dist/attributes.mjs","../../../node_modules/@sentry/core/build/esm/tracing/spans/captureSpan.js","../../../node_modules/@sentry/core/build/esm/utils/timer.js","../../../node_modules/@sentry/core/build/esm/api.js","../../../node_modules/@sentry/core/build/esm/integration.js","../../../node_modules/@sentry/core/build/esm/utils/env.js","../../../node_modules/@sentry/core/build/esm/utils/node.js","../../../node_modules/@sentry/core/build/esm/utils/isBrowser.js","../../../node_modules/@sentry/core/build/esm/logs/envelope.js","../../../node_modules/@sentry/core/build/esm/logs/internal.js","../../../node_modules/@sentry/core/build/esm/metrics/envelope.js","../../../node_modules/@sentry/core/build/esm/metrics/internal.js","../../../node_modules/@sentry/core/build/esm/tracing/spans/spanJsonToStreamedSpan.js","../../../node_modules/@sentry/core/build/esm/tracing/spans/extractGenAiSpans.js","../../../node_modules/@sentry/core/build/esm/utils/promisebuffer.js","../../../node_modules/@sentry/core/build/esm/utils/ratelimit.js","../../../node_modules/@sentry/core/build/esm/transports/base.js","../../../node_modules/@sentry/core/build/esm/utils/clientreport.js","../../../node_modules/@sentry/core/build/esm/utils/eventUtils.js","../../../node_modules/@sentry/core/build/esm/utils/transactionEvent.js","../../../node_modules/@sentry/core/build/esm/utils/data-collection/filtering-snippets.js","../../../node_modules/@sentry/core/build/esm/utils/data-collection/defaultPiiToCollectionOptions.js","../../../node_modules/@sentry/core/build/esm/utils/data-collection/resolveDataCollectionOptions.js","../../../node_modules/@sentry/core/build/esm/client.js","../../../node_modules/@sentry/core/build/esm/sdk.js","../../../node_modules/@sentry/core/build/esm/utils/data-collection/filterKeyValueData.js","../../../node_modules/@sentry/core/build/esm/utils/data-collection/filterQueryParams.js","../../../node_modules/@sentry/core/build/esm/utils/data-collection/filterUrlQuery.js","../../../node_modules/@sentry/core/build/esm/utils/data-collection/filterCollectedUrl.js","../../../node_modules/@sentry/core/build/esm/utils/url.js","../../../node_modules/@sentry/core/build/esm/utils/isSentryRequestUrl.js","../../../node_modules/@sentry/core/build/esm/utils/ipAddress.js","../../../node_modules/@sentry/core/build/esm/utils/sdkMetadata.js","../../../node_modules/@sentry/core/build/esm/breadcrumbs.js","../../../node_modules/@sentry/core/build/esm/integrations/functiontostring.js","../../../node_modules/@sentry/core/build/esm/integrations/eventFilters.js","../../../node_modules/@sentry/core/build/esm/utils/aggregate-errors.js","../../../node_modules/@sentry/core/build/esm/utils/eventbuilder.js","../../../node_modules/@sentry/core/build/esm/instrument/console.js","../../../node_modules/@sentry/core/build/esm/utils/severity.js","../../../node_modules/@sentry/core/build/esm/integrations/dedupe.js","../../../node_modules/@sentry/core/build/esm/integrations/conversationId.js","../../../node_modules/@sentry/core/build/esm/utils/breadcrumb-log-level.js","../../../node_modules/@sentry/core/build/esm/utils/supports.js","../../../node_modules/@sentry/core/build/esm/instrument/fetch.js","../../../node_modules/@sentry/core/build/esm/utils/browser.js","../../../node_modules/@sentry/browser/build/npm/esm/prod/helpers.js","../../../node_modules/@sentry/browser/build/npm/esm/prod/eventbuilder.js","../../../node_modules/@sentry/browser/build/npm/esm/prod/client.js","../../../node_modules/@sentry/browser-utils/build/esm/debug-build.js","../../../node_modules/@sentry/browser-utils/build/esm/types.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/lib/bindReporter.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/lib/getNavigationEntry.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/lib/getActivationStart.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/lib/globalListeners.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/lib/getVisibilityWatcher.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/lib/generateUniqueID.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/lib/initMetric.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/lib/initUnique.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/lib/LayoutShiftManager.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/lib/observe.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/lib/runOnce.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/lib/whenActivated.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/onFCP.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/getCLS.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/lib/InteractionManager.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/lib/whenIdleOrHidden.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/getINP.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/lib/LCPEntryManager.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/web-vitals/getLCP.js","../../../node_modules/@sentry/browser-utils/build/esm/metrics/instrument.js","../../../node_modules/@sentry/browser-utils/build/esm/htmlTreeAsString.js","../../../node_modules/@sentry/browser-utils/build/esm/instrument/dom.js","../../../node_modules/@sentry/browser-utils/build/esm/instrument/history.js","../../../node_modules/@sentry/browser-utils/build/esm/getNativeImplementation.js","../../../node_modules/@sentry/browser-utils/build/esm/instrument/xhr.js","../../../node_modules/@sentry/browser-utils/build/esm/networkUtils.js","../../../node_modules/@sentry/browser-utils/build/esm/is.js","../../../node_modules/@sentry/browser/build/npm/esm/prod/transports/fetch.js","../../../node_modules/@sentry/browser/build/npm/esm/prod/debug-build.js","../../../node_modules/@sentry/browser/build/npm/esm/prod/stack-parsers.js","../../../node_modules/@sentry/browser/build/npm/esm/prod/integrations/breadcrumbs.js","../../../node_modules/@sentry/browser/build/npm/esm/prod/integrations/browserapierrors.js","../../../node_modules/@sentry/browser/build/npm/esm/prod/integrations/browsersession.js","../../../node_modules/@sentry/browser/build/npm/esm/prod/integrations/culturecontext.js","../../../node_modules/@sentry/browser/build/npm/esm/prod/integrations/globalhandlers.js","../../../node_modules/@sentry/browser/build/npm/esm/prod/integrations/httpcontext.js","../../../node_modules/@sentry/browser/build/npm/esm/prod/integrations/linkederrors.js","../../../node_modules/@sentry/browser/build/npm/esm/prod/normalizeStringifyValue.js","../../../node_modules/@sentry/browser/build/npm/esm/prod/utils/detectBrowserExtension.js","../../../node_modules/@sentry/browser/build/npm/esm/prod/sdk.js","../../../node_modules/@sentry/replay/build/npm/esm/index.js","../../../node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js","../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable.js","../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/snakeize.js","../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js","../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/fetch_requests.js","../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/index.js","../../../app/javascript/controllers/response_container_quantity_controller.js","../../../node_modules/stimulus-vite-helpers/dist/index.js","../../../app/javascript/controllers/index.js","../../../app/javascript/entrypoints/application.js"],"sourcesContent":["import { DEBUG_BUILD } from '../debug-build.js';\nimport { debug } from '../utils/debug-logger.js';\nimport { getFunctionName } from '../utils/stacktrace.js';\n\nconst handlers = {};\nconst instrumented = {};\nfunction addHandler(type, handler) {\n handlers[type] = handlers[type] || [];\n handlers[type].push(handler);\n return () => {\n const typeHandlers = handlers[type];\n if (typeHandlers) {\n const index = typeHandlers.indexOf(handler);\n if (index !== -1) {\n typeHandlers.splice(index, 1);\n }\n }\n };\n}\nfunction resetInstrumentationHandlers() {\n Object.keys(handlers).forEach((key) => {\n handlers[key] = void 0;\n });\n}\nfunction maybeInstrument(type, instrumentFn) {\n if (!instrumented[type]) {\n instrumented[type] = true;\n try {\n instrumentFn();\n } catch (e) {\n DEBUG_BUILD && debug.error(`Error while instrumenting ${type}`, e);\n }\n }\n}\nfunction triggerHandlers(type, data) {\n const typeHandlers = type && handlers[type];\n if (!typeHandlers) {\n return;\n }\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n DEBUG_BUILD && debug.error(\n `Error while triggering instrumentation handler.\nType: ${type}\nName: ${getFunctionName(handler)}\nError:`,\n e\n );\n }\n }\n}\n\nexport { addHandler, maybeInstrument, resetInstrumentationHandlers, triggerHandlers };\n//# sourceMappingURL=handlers.js.map\n","import { GLOBAL_OBJ } from '../utils/worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\nlet _oldOnErrorHandler = null;\nfunction addGlobalErrorInstrumentationHandler(handler) {\n const type = \"error\";\n addHandler(type, handler);\n maybeInstrument(type, instrumentError);\n}\nfunction instrumentError() {\n _oldOnErrorHandler = GLOBAL_OBJ.onerror;\n GLOBAL_OBJ.onerror = function(msg, url, line, column, error) {\n const handlerData = {\n column,\n error,\n line,\n msg,\n url\n };\n triggerHandlers(\"error\", handlerData);\n if (_oldOnErrorHandler) {\n return _oldOnErrorHandler.apply(this, arguments);\n }\n return false;\n };\n GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexport { addGlobalErrorInstrumentationHandler };\n//# sourceMappingURL=globalError.js.map\n","import { GLOBAL_OBJ } from '../utils/worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\nlet _oldOnUnhandledRejectionHandler = null;\nfunction addGlobalUnhandledRejectionInstrumentationHandler(handler) {\n const type = \"unhandledrejection\";\n addHandler(type, handler);\n maybeInstrument(type, instrumentUnhandledRejection);\n}\nfunction instrumentUnhandledRejection() {\n _oldOnUnhandledRejectionHandler = GLOBAL_OBJ.onunhandledrejection;\n GLOBAL_OBJ.onunhandledrejection = function(e) {\n const handlerData = e;\n triggerHandlers(\"unhandledrejection\", handlerData);\n if (_oldOnUnhandledRejectionHandler) {\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n return true;\n };\n GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexport { addGlobalUnhandledRejectionInstrumentationHandler };\n//# sourceMappingURL=globalUnhandledRejection.js.map\n","function parseSampleRate(sampleRate) {\n if (typeof sampleRate === \"boolean\") {\n return Number(sampleRate);\n }\n const rate = typeof sampleRate === \"string\" ? parseFloat(sampleRate) : sampleRate;\n if (typeof rate !== \"number\" || isNaN(rate) || rate < 0 || rate > 1) {\n return void 0;\n }\n return rate;\n}\n\nexport { parseSampleRate };\n//# sourceMappingURL=parseSampleRate.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { debug } from './debug-logger.js';\nimport { isMatchingPattern } from './string.js';\n\nfunction logIgnoredSpan(droppedSpan) {\n debug.log(`Ignoring span ${droppedSpan.op} - ${droppedSpan.description} because it matches \\`ignoreSpans\\`.`);\n}\nfunction shouldIgnoreSpan(span, ignoreSpans) {\n if (!ignoreSpans?.length) {\n return false;\n }\n for (const pattern of ignoreSpans) {\n if (isStringOrRegExp(pattern)) {\n if (span.description && isMatchingPattern(span.description, pattern)) {\n DEBUG_BUILD && logIgnoredSpan(span);\n return true;\n }\n continue;\n }\n const hasAttributes = !!pattern.attributes && Object.keys(pattern.attributes).length > 0;\n if (!pattern.name && !pattern.op && !hasAttributes) {\n continue;\n }\n const nameMatches = pattern.name ? span.description && isMatchingPattern(span.description, pattern.name) : true;\n const opMatches = pattern.op ? span.op && isMatchingPattern(span.op, pattern.op) : true;\n const attrsMatch = pattern.attributes ? Object.entries(pattern.attributes).every(\n ([key, valuePattern]) => _matchesAttributeValue(span.attributes?.[key], valuePattern)\n ) : true;\n if (nameMatches && opMatches && attrsMatch) {\n DEBUG_BUILD && logIgnoredSpan(span);\n return true;\n }\n }\n return false;\n}\nfunction _matchesAttributeValue(actual, pat) {\n if (typeof actual === \"string\" && (typeof pat === \"string\" || pat instanceof RegExp)) {\n return isMatchingPattern(actual, pat);\n }\n if (Array.isArray(actual) && Array.isArray(pat)) {\n return actual.length === pat.length && actual.every((v, i) => v === pat[i]);\n }\n return actual === pat;\n}\nfunction reparentChildSpans(spans, dropSpan) {\n const droppedSpanParentId = dropSpan.parent_span_id;\n const droppedSpanId = dropSpan.span_id;\n if (!droppedSpanParentId) {\n return;\n }\n for (const span of spans) {\n if (span.parent_span_id === droppedSpanId) {\n span.parent_span_id = droppedSpanParentId;\n }\n }\n}\nfunction isStringOrRegExp(value) {\n return typeof value === \"string\" || value instanceof RegExp;\n}\n\nexport { reparentChildSpans, shouldIgnoreSpan };\n//# sourceMappingURL=should-ignore-span.js.map\n","import { addNonEnumerableProperty } from '../../utils/object.js';\n\nfunction withStreamedSpan(callback) {\n addNonEnumerableProperty(callback, \"_streamed\", true);\n return callback;\n}\nfunction isStreamedBeforeSendSpanCallback(callback) {\n return !!callback && typeof callback === \"function\" && \"_streamed\" in callback && !!callback._streamed;\n}\n\nexport { isStreamedBeforeSendSpanCallback, withStreamedSpan };\n//# sourceMappingURL=beforeSendSpan.js.map\n","import { getSentryCarrier } from '../carrier.js';\nimport { dsnToString } from './dsn.js';\nimport { normalize } from './normalize.js';\nimport { safeDateNow } from './randomSafeContext.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nfunction createEnvelope(headers, items = []) {\n return [headers, items];\n}\nfunction addItemToEnvelope(envelope, newItem) {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]];\n}\nfunction forEachEnvelopeItem(envelope, callback) {\n const envelopeItems = envelope[1];\n for (const envelopeItem of envelopeItems) {\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n if (result) {\n return true;\n }\n }\n return false;\n}\nfunction envelopeContainsItemType(envelope, types) {\n return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\nfunction encodeUTF8(input) {\n const carrier = getSentryCarrier(GLOBAL_OBJ);\n return carrier.encodePolyfill ? carrier.encodePolyfill(input) : new TextEncoder().encode(input);\n}\nfunction decodeUTF8(input) {\n const carrier = getSentryCarrier(GLOBAL_OBJ);\n return carrier.decodePolyfill ? carrier.decodePolyfill(input) : new TextDecoder().decode(input);\n}\nfunction serializeEnvelope(envelope) {\n const [envHeaders, items] = envelope;\n let parts = JSON.stringify(envHeaders);\n function append(next) {\n if (typeof parts === \"string\") {\n parts = typeof next === \"string\" ? parts + next : [encodeUTF8(parts), next];\n } else {\n parts.push(typeof next === \"string\" ? encodeUTF8(next) : next);\n }\n }\n for (const item of items) {\n const [itemHeaders, payload] = item;\n append(`\n${JSON.stringify(itemHeaders)}\n`);\n if (typeof payload === \"string\" || payload instanceof Uint8Array) {\n append(payload);\n } else {\n let stringifiedPayload;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch {\n stringifiedPayload = JSON.stringify(normalize(payload));\n }\n append(stringifiedPayload);\n }\n }\n return typeof parts === \"string\" ? parts : concatBuffers(parts);\n}\nfunction concatBuffers(buffers) {\n const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers) {\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n return merged;\n}\nfunction parseEnvelope(env) {\n let buffer = typeof env === \"string\" ? encodeUTF8(env) : env;\n function readBinary(length) {\n const bin = buffer.subarray(0, length);\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n function readJson() {\n let i = buffer.indexOf(10);\n if (i < 0) {\n i = buffer.length;\n }\n return JSON.parse(decodeUTF8(readBinary(i)));\n }\n const envelopeHeader = readJson();\n const items = [];\n while (buffer.length) {\n const itemHeader = readJson();\n const binaryLength = typeof itemHeader.length === \"number\" ? itemHeader.length : void 0;\n items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n }\n return [envelopeHeader, items];\n}\nfunction createSpanEnvelopeItem(spanJson) {\n const spanHeaders = {\n type: \"span\"\n };\n return [spanHeaders, spanJson];\n}\nfunction createAttachmentEnvelopeItem(attachment) {\n const buffer = typeof attachment.data === \"string\" ? encodeUTF8(attachment.data) : attachment.data;\n return [\n {\n type: \"attachment\",\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType\n },\n buffer\n ];\n}\nconst DATA_CATEGORY_OVERRIDES = {\n sessions: \"session\",\n event: \"error\",\n client_report: \"internal\",\n user_report: \"default\",\n profile_chunk: \"profile\",\n replay_event: \"replay\",\n replay_recording: \"replay\",\n check_in: \"monitor\",\n raw_security: \"security\",\n log: \"log_item\",\n trace_metric: \"metric\"\n};\nfunction _isOverriddenType(type) {\n return type in DATA_CATEGORY_OVERRIDES;\n}\nfunction envelopeItemTypeToDataCategory(type) {\n return _isOverriddenType(type) ? DATA_CATEGORY_OVERRIDES[type] : type;\n}\nfunction getSdkMetadataForEnvelopeHeader(metadataOrEvent) {\n if (!metadataOrEvent?.sdk) {\n return;\n }\n const { name, version } = metadataOrEvent.sdk;\n return { name, version };\n}\nfunction createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn) {\n const dynamicSamplingContext = event.sdkProcessingMetadata?.dynamicSamplingContext;\n return {\n event_id: event.event_id,\n sent_at: new Date(safeDateNow()).toISOString(),\n ...sdkInfo && { sdk: sdkInfo },\n ...!!tunnel && dsn && { dsn: dsnToString(dsn) },\n ...dynamicSamplingContext && {\n trace: dynamicSamplingContext\n }\n };\n}\n\nexport { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, createSpanEnvelopeItem, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { getDynamicSamplingContextFromSpan } from './tracing/dynamicSamplingContext.js';\nimport { isStreamedBeforeSendSpanCallback } from './tracing/spans/beforeSendSpan.js';\nimport { dsnToString } from './utils/dsn.js';\nimport { getSdkMetadataForEnvelopeHeader, createEventEnvelopeHeaders, createEnvelope, createSpanEnvelopeItem } from './utils/envelope.js';\nimport { safeDateNow } from './utils/randomSafeContext.js';\nimport { shouldIgnoreSpan } from './utils/should-ignore-span.js';\nimport { spanToJSON, showSpanDropWarning } from './utils/spanUtils.js';\n\nfunction _enhanceEventWithSdkInfo(event, newSdkInfo) {\n if (!newSdkInfo) {\n return event;\n }\n const eventSdkInfo = event.sdk || {};\n event.sdk = {\n ...eventSdkInfo,\n name: eventSdkInfo.name || newSdkInfo.name,\n version: eventSdkInfo.version || newSdkInfo.version,\n integrations: [...event.sdk?.integrations || [], ...newSdkInfo.integrations || []],\n packages: [...event.sdk?.packages || [], ...newSdkInfo.packages || []],\n settings: event.sdk?.settings || newSdkInfo.settings ? {\n ...event.sdk?.settings,\n ...newSdkInfo.settings\n } : void 0\n };\n return event;\n}\nfunction createSessionEnvelope(session, dsn, metadata, tunnel) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n const envelopeHeaders = {\n sent_at: new Date(safeDateNow()).toISOString(),\n ...sdkInfo && { sdk: sdkInfo },\n ...!!tunnel && dsn && { dsn: dsnToString(dsn) }\n };\n const envelopeItem = \"aggregates\" in session ? [{ type: \"sessions\" }, session] : [{ type: \"session\" }, session.toJSON()];\n return createEnvelope(envelopeHeaders, [envelopeItem]);\n}\nfunction createEventEnvelope(event, dsn, metadata, tunnel) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n const eventType = event.type && event.type !== \"replay_event\" ? event.type : \"event\";\n _enhanceEventWithSdkInfo(event, metadata?.sdk);\n const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n delete event.sdkProcessingMetadata;\n const eventItem = [{ type: eventType }, event];\n return createEnvelope(envelopeHeaders, [eventItem]);\n}\nfunction createSpanEnvelope(spans, client) {\n function dscHasRequiredProps(dsc2) {\n return !!dsc2.trace_id && !!dsc2.public_key;\n }\n const dsc = getDynamicSamplingContextFromSpan(spans[0]);\n const dsn = client?.getDsn();\n const tunnel = client?.getOptions().tunnel;\n const headers = {\n sent_at: new Date(safeDateNow()).toISOString(),\n ...dscHasRequiredProps(dsc) && { trace: dsc },\n ...!!tunnel && dsn && { dsn: dsnToString(dsn) }\n };\n const { beforeSendSpan, ignoreSpans } = client?.getOptions() || {};\n const filteredSpans = ignoreSpans?.length ? spans.filter((span) => {\n const json = spanToJSON(span);\n return !shouldIgnoreSpan({ description: json.description, op: json.op, attributes: json.data }, ignoreSpans);\n }) : spans;\n const droppedSpans = spans.length - filteredSpans.length;\n if (droppedSpans) {\n client?.recordDroppedEvent(\"before_send\", \"span\", droppedSpans);\n }\n const convertToSpanJSON = beforeSendSpan ? (span) => {\n const spanJson = spanToJSON(span);\n const processedSpan = !isStreamedBeforeSendSpanCallback(beforeSendSpan) ? beforeSendSpan(spanJson) : spanJson;\n if (!processedSpan) {\n showSpanDropWarning();\n return spanJson;\n }\n return processedSpan;\n } : spanToJSON;\n const items = [];\n for (const span of filteredSpans) {\n const spanJson = convertToSpanJSON(span);\n if (spanJson) {\n items.push(createSpanEnvelopeItem(spanJson));\n }\n }\n return createEnvelope(headers, items);\n}\n\nexport { _enhanceEventWithSdkInfo, createEventEnvelope, createSessionEnvelope, createSpanEnvelope };\n//# sourceMappingURL=envelope.js.map\n","function hasSpanStreamingEnabled(client) {\n return client.getOptions().traceLifecycle === \"stream\";\n}\n\nexport { hasSpanStreamingEnabled };\n//# sourceMappingURL=hasSpanStreamingEnabled.js.map\n","function debounce(func, wait, options) {\n let callbackReturnValue;\n let timerId;\n let maxTimerId;\n const maxWait = options?.maxWait ? Math.max(options.maxWait, wait) : 0;\n const setTimeoutImpl = options?.setTimeoutImpl || setTimeout;\n function invokeFunc() {\n cancelTimers();\n callbackReturnValue = func();\n return callbackReturnValue;\n }\n function cancelTimers() {\n timerId !== void 0 && clearTimeout(timerId);\n maxTimerId !== void 0 && clearTimeout(maxTimerId);\n timerId = maxTimerId = void 0;\n }\n function flush() {\n if (timerId !== void 0 || maxTimerId !== void 0) {\n return invokeFunc();\n }\n return callbackReturnValue;\n }\n function debounced() {\n if (timerId) {\n clearTimeout(timerId);\n }\n timerId = setTimeoutImpl(invokeFunc, wait);\n if (maxWait && maxTimerId === void 0) {\n maxTimerId = setTimeoutImpl(invokeFunc, maxWait);\n }\n return callbackReturnValue;\n }\n debounced.cancel = cancelTimers;\n debounced.flush = flush;\n return debounced;\n}\n\nexport { debounce };\n//# sourceMappingURL=debounce.js.map\n","const e=\"ai.citations\",i=\"ai.completion_tokens.used\",t=\"ai.documents\",n=\"ai.finish_reason\",r=\"ai.frequency_penalty\",a=\"ai.function_call\",s=\"ai.generation_id\",o=\"ai.input_messages\",l=\"ai.is_search_required\",p=\"ai.metadata\",c=\"ai.model_id\",u=\"ai.model.provider\",b=\"ai.pipeline.name\",g=\"ai.preamble\",d=\"ai.presence_penalty\",m=\"ai.prompt_tokens.used\",y=\"ai.raw_prompting\",_=\"ai.responses\",h=\"ai.response_format\",v=\"ai.search_queries\",f=\"ai.search_results\",S=\"ai.seed\",E=\"ai.streaming\",T=\"ai.tags\",I=\"ai.temperature\",O=\"ai.texts\",k=\"ai.tools\",A=\"ai.tool_calls\",x=\"ai.top_k\",w=\"ai.top_p\",R=\"ai.total_cost\",N=\"ai.total_tokens.used\",C=\"ai.warnings\",P=\"angular.version\",D=\"app.app_build\",L=\"app.app_identifier\",U=\"app.app_name\",M=\"app.app_start_time\",q=\"app.app_version\",G=\"app.build\",Y=\"app.identifier\",V=\"app.in_foreground\",W=\"app.name\",F=\"app_start_cold\",B=\"app.start_time\",H=\"app_start_type\",z=\"app_start_warm\",K=\"app.version\",j=\"app.vitals.frames.delay.value\",Q=\"app.vitals.frames.frozen.count\",X=\"app.vitals.frames.slow.count\",J=\"app.vitals.frames.total.count\",Z=\"app.vitals.start.cold.value\",$=\"app.vitals.start.prewarmed\",ee=\"app.vitals.start.reason\",ie=\"app.vitals.start.screen\",te=\"app.vitals.start.type\",ne=\"app.vitals.start.warm.value\",re=\"app.vitals.ttfd.value\",ae=\"app.vitals.ttid.value\",se=\"art.gc.blocking_count\",oe=\"art.gc.blocking_time\",le=\"art.gc.pre_oome_count\",pe=\"art.gc.total_count\",ce=\"art.gc.total_time\",ue=\"art.gc.waiting_time\",be=\"art.memory.free\",ge=\"art.memory.free_until_gc\",de=\"art.memory.free_until_oome\",me=\"art.memory.max\",ye=\"art.memory.total\",_e=\"aws.cloudwatch.logs.log_group\",he=\"aws.cloudwatch.logs.log_stream\",ve=\"aws.cloudwatch.logs.url\",fe=\"aws.dynamodb.attribute_definitions\",Se=\"aws.dynamodb.consistent_read\",Ee=\"aws.dynamodb.consumed_capacity\",Te=\"aws.dynamodb.count\",Ie=\"aws.dynamodb.exclusive_start_table\",Oe=\"aws.dynamodb.global_secondary_indexes\",ke=\"aws.dynamodb.global_secondary_index_updates\",Ae=\"aws.dynamodb.index_name\",xe=\"aws.dynamodb.item_collection_metrics\",we=\"aws.dynamodb.limit\",Re=\"aws.dynamodb.local_secondary_indexes\",Ne=\"aws.dynamodb.projection\",Ce=\"aws.dynamodb.provisioned_read_capacity\",Pe=\"aws.dynamodb.provisioned_write_capacity\",De=\"aws.dynamodb.scanned_count\",Le=\"aws.dynamodb.scan_forward\",Ue=\"aws.dynamodb.segment\",Me=\"aws.dynamodb.select\",qe=\"aws.dynamodb.table_count\",Ge=\"aws.dynamodb.table_names\",Ye=\"aws.dynamodb.total_segments\",Ve=\"aws.extended_request_id\",We=\"aws.kinesis.stream_name\",Fe=\"aws.kinesis.stream.name\",Be=\"aws.lambda.aws_request_id\",He=\"aws.lambda.execution_duration_in_millis\",ze=\"aws.lambda.function_name\",Ke=\"aws.lambda.function_version\",je=\"aws.lambda.invoked_arn\",Qe=\"aws.lambda.invoked_function_arn\",Xe=\"aws.lambda.remaining_time_in_millis\",Je=\"aws.log.group.names\",Ze=\"aws.log.stream.names\",$e=\"aws.request.extended_id\",ei=\"aws.request_id\",ii=\"aws.request.id\",ti=\"aws.s3.bucket\",ni=\"aws.secretsmanager.secret.arn\",ri=\"aws.sns.topic.arn\",ai=\"aws.step_functions.activity.arn\",si=\"aws.step_functions.state_machine.arn\",oi=\"blocked_main_thread\",li=\"browser.name\",pi=\"browser.performance.navigation.activation_start\",ci=\"browser.performance.time_origin\",ui=\"browser.report.type\",bi=\"browser.script.invoker\",gi=\"browser.script.invoker_type\",di=\"browser.script.source_char_position\",mi=\"browser.version\",yi=\"browser.web_vital.cls.report_event\",_i=\"browser.web_vital.cls.source.\",hi=\"browser.web_vital.cls.source\",vi=\"browser.web_vital.cls.value\",fi=\"browser.web_vital.fcp.value\",Si=\"browser.web_vital.fp.value\",Ei=\"browser.web_vital.inp.value\",Ti=\"browser.web_vital.lcp.element\",Ii=\"browser.web_vital.lcp.id\",Oi=\"browser.web_vital.lcp.load_time\",ki=\"browser.web_vital.lcp.render_time\",Ai=\"browser.web_vital.lcp.report_event\",xi=\"browser.web_vital.lcp.size\",wi=\"browser.web_vital.lcp.url\",Ri=\"browser.web_vital.lcp.value\",Ni=\"browser.web_vital.ttfb.request_time\",Ci=\"browser.web_vital.ttfb.value\",Pi=\"cache.hit\",Di=\"cache.item_size\",Li=\"cache.key\",Ui=\"cache.operation\",Mi=\"cache.ttl\",qi=\"cache.write\",Gi=\"channel\",Yi=\"client.address\",Vi=\"client.port\",Wi=\"cloudflare.d1.duration\",Fi=\"cloudflare.d1.query_type\",Bi=\"cloudflare.d1.rows_read\",Hi=\"cloudflare.d1.rows_written\",zi=\"cloudflare.durable_object.query.bindings\",Ki=\"cloudflare.durable_object.response.rows_read\",ji=\"cloudflare.durable_object.response.rows_written\",Qi=\"cloudflare.r2.bucket\",Xi=\"cloudflare.r2.operation\",Ji=\"cloudflare.r2.request.delimiter\",Zi=\"cloudflare.r2.request.key\",$i=\"cloudflare.r2.request.part_number\",et=\"cloudflare.r2.request.prefix\",it=\"cloudflare.workflow.attempt\",tt=\"cloudflare.workflow.retries.backoff\",nt=\"cloudflare.workflow.retries.delay\",rt=\"cloudflare.workflow.retries.limit\",at=\"cloudflare.workflow.timeout\",st=\"cloud.account.id\",ot=\"cloud.availability_zone\",lt=\"cloud.platform\",pt=\"cloud.provider\",ct=\"cloud.region\",ut=\"cloud.resource_id\",bt=\"cls\",gt=\"cls.source.\",dt=\"cls.source\",mt=\"code.filepath\",yt=\"code.file.path\",_t=\"code.function\",ht=\"code.function.name\",vt=\"code.lineno\",ft=\"code.line.number\",St=\"code.namespace\",Et=\"connectionType\",Tt=\"connection.rtt\",It=\"culture.calendar\",Ot=\"culture.display_name\",kt=\"culture.is_24_hour_format\",At=\"culture.locale\",xt=\"culture.timezone\",wt=\"db.collection.name\",Rt=\"db.driver.name\",Nt=\"db.name\",Ct=\"db.namespace\",Pt=\"db.operation\",Dt=\"db.operation.batch.size\",Lt=\"db.operation.name\",Ut=\"db.query.parameter.\",Mt=\"db.query.parameter\",qt=\"db.query.summary\",Gt=\"db.query.text\",Yt=\"db.redis.connection\",Vt=\"db.redis.key\",Wt=\"db.redis.parameters\",Ft=\"db.response.status_code\",Bt=\"db.sql.bindings\",Ht=\"db.statement\",zt=\"db.stored_procedure.name\",Kt=\"db.system\",jt=\"db.system.name\",Qt=\"db.user\",Xt=\"deviceMemory\",Jt=\"device.archs\",Zt=\"device.battery_level\",$t=\"device.battery_temperature\",en=\"device.boot_time\",tn=\"device.brand\",nn=\"device.charging\",rn=\"device.chipset\",an=\"device.class\",sn=\"device.connection_type\",on=\"device.cpu_description\",ln=\"device.external_free_storage\",pn=\"device.external_storage_size\",cn=\"device.family\",un=\"device.free_memory\",bn=\"device.free_storage\",gn=\"device.id\",dn=\"device.locale\",mn=\"device.low_memory\",yn=\"device.low_power_mode\",_n=\"device.manufacturer\",hn=\"device.memory.estimated_capacity\",vn=\"device.memory_size\",fn=\"device.model\",Sn=\"device.model_id\",En=\"device.name\",Tn=\"device.online\",In=\"device.orientation\",On=\"device.processor_count\",kn=\"device.processor_frequency\",An=\"device.screen_density\",xn=\"device.screen_dpi\",wn=\"device.screen_height_pixels\",Rn=\"device.screen_width_pixels\",Nn=\"device.simulator\",Cn=\"device.storage_size\",Pn=\"device.thermal_state\",Dn=\"device.timezone\",Ln=\"device.usable_memory\",Un=\"dist\",Mn=\"effectiveConnectionType\",qn=\"environment\",Gn=\"error.type\",Yn=\"event.id\",Vn=\"event.name\",Wn=\"exception.escaped\",Fn=\"exception.message\",Bn=\"exception.stacktrace\",Hn=\"exception.type\",zn=\"faas.coldstart\",Kn=\"faas.cron\",jn=\"faas.duration_in_ms\",Qn=\"faas.entry_point\",Xn=\"faas.execution\",Jn=\"faas.id\",Zn=\"faas.identity\",$n=\"faas.invocation_id\",er=\"faas.invoked_name\",ir=\"faas.invoked_provider\",tr=\"faas.invoked_region\",nr=\"faas.name\",rr=\"faas.time\",ar=\"faas.trigger\",sr=\"faas.version\",or=\"fcp\",lr=\"flag.evaluation.\",pr=\"flag.evaluation\",cr=\"fp\",ur=\"frames.delay\",br=\"frames.frozen\",gr=\"frames_frozen_rate\",dr=\"frames.slow\",mr=\"frames_slow_rate\",yr=\"frames.total\",_r=\"fs_error\",hr=\"gcp.function.context.event_id\",vr=\"gcp.function.context.event_type\",fr=\"gcp.function.context.id\",Sr=\"gcp.function.context.resource\",Er=\"gcp.function.context.source\",Tr=\"gcp.function.context.specversion\",Ir=\"gcp.function.context.time\",Or=\"gcp.function.context.timestamp\",kr=\"gcp.function.context.type\",Ar=\"gcp.project.id\",xr=\"gen_ai.agent.name\",wr=\"gen_ai.context.utilization\",Rr=\"gen_ai.context.window_size\",Nr=\"gen_ai.conversation.id\",Cr=\"gen_ai.cost.cache_creation.input_tokens\",Pr=\"gen_ai.cost.cache_read.input_tokens\",Dr=\"gen_ai.cost.input_tokens\",Lr=\"gen_ai.cost.output_tokens\",Ur=\"gen_ai.cost.reasoning.output_tokens\",Mr=\"gen_ai.cost.total_tokens\",qr=\"gen_ai.embeddings.input\",Gr=\"gen_ai.function_id\",Yr=\"gen_ai.input.messages\",Vr=\"gen_ai.operation.name\",Wr=\"gen_ai.operation.type\",Fr=\"gen_ai.output.messages\",Br=\"gen_ai.pipeline.name\",Hr=\"gen_ai.prompt\",zr=\"gen_ai.prompt.name\",Kr=\"gen_ai.provider.name\",jr=\"gen_ai.request.available_tools\",Qr=\"gen_ai.request.frequency_penalty\",Xr=\"gen_ai.request.max_tokens\",Jr=\"gen_ai.request.messages\",Zr=\"gen_ai.request.model\",$r=\"gen_ai.request.presence_penalty\",ea=\"gen_ai.request.reasoning_effort\",ia=\"gen_ai.request.seed\",ta=\"gen_ai.request.stop_sequences\",na=\"gen_ai.request.temperature\",ra=\"gen_ai.request.top_k\",aa=\"gen_ai.request.top_p\",sa=\"gen_ai.response.finish_reasons\",oa=\"gen_ai.response.id\",la=\"gen_ai.response.model\",pa=\"gen_ai.response.streaming\",ca=\"gen_ai.response.text\",ua=\"gen_ai.response.time_to_first_chunk\",ba=\"gen_ai.response.time_to_first_token\",ga=\"gen_ai.response.tokens_per_second\",da=\"gen_ai.response.tool_calls\",ma=\"gen_ai.system\",ya=\"gen_ai.system_instructions\",_a=\"gen_ai.system.message\",ha=\"gen_ai.tool.call.arguments\",va=\"gen_ai.tool.call.result\",fa=\"gen_ai.tool.definitions\",Sa=\"gen_ai.tool.description\",Ea=\"gen_ai.tool.input\",Ta=\"gen_ai.tool.message\",Ia=\"gen_ai.tool.name\",Oa=\"gen_ai.tool.output\",ka=\"gen_ai.tool.type\",Aa=\"gen_ai.usage.cache_creation.input_tokens\",xa=\"gen_ai.usage.cache_read.input_tokens\",wa=\"gen_ai.usage.completion_tokens\",Ra=\"gen_ai.usage.input_tokens\",Na=\"gen_ai.usage.input_tokens.cached\",Ca=\"gen_ai.usage.input_tokens.cache_write\",Pa=\"gen_ai.usage.output_tokens\",Da=\"gen_ai.usage.output_tokens.reasoning\",La=\"gen_ai.usage.prompt_tokens\",Ua=\"gen_ai.usage.reasoning.output_tokens\",Ma=\"gen_ai.usage.total_tokens\",qa=\"graphql.document\",Ga=\"graphql.operation.name\",Ya=\"graphql.operation.type\",Va=\"hardwareConcurrency\",Wa=\"http.client_ip\",Fa=\"http.decoded_response_content_length\",Ba=\"http.flavor\",Ha=\"http.fragment\",za=\"http.host\",Ka=\"http.method\",ja=\"http.query\",Qa=\"http.request.body.data\",Xa=\"http.request.connection_end\",Ja=\"http.request.connect_start\",Za=\"http.request.domain_lookup_end\",$a=\"http.request.domain_lookup_start\",es=\"http.request.fetch_start\",is=\"http.request.header.\",ts=\"http.request.header\",ns=\"http.request.method\",rs=\"http.request_method\",as=\"http.request.redirect_end\",ss=\"http.request.redirect_start\",os=\"http.request.request_start\",ls=\"http.request.resend_count\",ps=\"http.request.response_end\",cs=\"http.request.response_start\",us=\"http.request.same_origin\",bs=\"http.request.secure_connection_start\",gs=\"http.request.time_to_first_byte\",ds=\"http.request.worker_start\",ms=\"http.response.body.size\",ys=\"http.response_content_length\",_s=\"http.response.header.content-length\",hs=\"http.response.header.\",vs=\"http.response.header\",fs=\"http.response.size\",Ss=\"http.response.status_code\",Es=\"http.response_transfer_size\",Ts=\"http.route\",Is=\"http.scheme\",Os=\"http.server_name\",ks=\"http.server.request.time_in_queue\",As=\"http.status_code\",xs=\"http.target\",ws=\"http.url\",Rs=\"http.user_agent\",Ns=\"id\",Cs=\"inp\",Ps=\"jsonrpc.protocol.version\",Ds=\"jsonrpc.request.id\",Ls=\"jvm.gc.action\",Us=\"jvm.gc.name\",Ms=\"jvm.memory.pool.name\",qs=\"jvm.memory.type\",Gs=\"jvm.thread.daemon\",Ys=\"jvm.thread.state\",Vs=\"koa.name\",Ws=\"koa.type\",Fs=\"lcp\",Bs=\"lcp.element\",Hs=\"lcp.id\",zs=\"lcp.loadTime\",Ks=\"lcp.renderTime\",js=\"lcp.size\",Qs=\"lcp.url\",Xs=\"logger.name\",Js=\"mcp.cancelled.reason\",Zs=\"mcp.cancelled.request_id\",$s=\"mcp.client.name\",eo=\"mcp.client.title\",io=\"mcp.client.version\",to=\"mcp.lifecycle.phase\",no=\"mcp.logging.data_type\",ro=\"mcp.logging.level\",ao=\"mcp.logging.logger\",so=\"mcp.logging.message\",oo=\"mcp.method.name\",lo=\"mcp.progress.current\",po=\"mcp.progress.message\",co=\"mcp.progress.percentage\",uo=\"mcp.progress.token\",bo=\"mcp.progress.total\",go=\"mcp.prompt.name\",mo=\"mcp.prompt.result.description\",yo=\"mcp.prompt.result.message_content\",_o=\"mcp.prompt.result.message_count\",ho=\"mcp.prompt.result.message_role\",vo=\"mcp.protocol.ready\",fo=\"mcp.protocol.version\",So=\"mcp.request.argument.\",Eo=\"mcp.request.argument\",To=\"mcp.request.argument.name\",Io=\"mcp.request.argument.uri\",Oo=\"mcp.request.id\",ko=\"mcp.resource.protocol\",Ao=\"mcp.resource.uri\",xo=\"mcp.server.name\",wo=\"mcp.server.title\",Ro=\"mcp.server.version\",No=\"mcp.session.id\",Co=\"mcp.tool.name\",Po=\"mcp.tool.result.content\",Do=\"mcp.tool.result.content_count\",Lo=\"mcp.tool.result.is_error\",Uo=\"mcp.transport\",Mo=\"mdc.\",qo=\"mdc\",Go=\"messaging.batch.message_count\",Yo=\"messaging.destination\",Vo=\"messaging.destination.connection\",Wo=\"messaging.destination.name\",Fo=\"messaging.message.body.size\",Bo=\"messaging.message.conversation_id\",Ho=\"messaging.message.envelope.size\",zo=\"messaging.message.id\",Ko=\"messaging.message.receive.latency\",jo=\"messaging.message.retry.count\",Qo=\"messaging.operation.name\",Xo=\"messaging.operation.type\",Jo=\"messaging.rabbitmq.destination.routing_key\",Zo=\"messaging.system\",$o=\"method\",el=\"middleware.name\",il=\"navigation.origin\",tl=\"navigation.route.id\",nl=\"navigation.type\",rl=\"nel.elapsed_time\",al=\"nel.phase\",sl=\"nel.referrer\",ol=\"nel.sampling_function\",ll=\"nel.type\",pl=\"network.connection.effective_type\",cl=\"network.connection.rtt\",ul=\"network.connection.type\",bl=\"network.local.address\",gl=\"network.local.port\",dl=\"network.peer.address\",ml=\"network.peer.port\",yl=\"network.protocol.name\",_l=\"network.protocol.version\",hl=\"network.transport\",vl=\"network.type\",fl=\"net.host.ip\",Sl=\"net.host.name\",El=\"net.host.port\",Tl=\"net.peer.ip\",Il=\"net.peer.name\",Ol=\"net.peer.port\",kl=\"net.protocol.name\",Al=\"net.protocol.version\",xl=\"net.sock.family\",wl=\"net.sock.host.addr\",Rl=\"net.sock.host.port\",Nl=\"net.sock.peer.addr\",Cl=\"net.sock.peer.name\",Pl=\"net.sock.peer.port\",Dl=\"net.transport\",Ll=\"os.build\",Ul=\"os.build_id\",Ml=\"os.description\",ql=\"os.kernel_version\",Gl=\"os.name\",Yl=\"os.raw_description\",Vl=\"os.rooted\",Wl=\"os.theme\",Fl=\"os.type\",Bl=\"os.version\",Hl=\"otel.kind\",zl=\"otel.scope.name\",Kl=\"otel.scope.version\",jl=\"otel.status_code\",Ql=\"otel.status_description\",Xl=\"params.\",Jl=\"params\",Zl=\"performance.activationStart\",$l=\"performance.timeOrigin\",ep=\"previous_route\",ip=\"process.command_args\",tp=\"process.executable.name\",np=\"process.pid\",rp=\"process.runtime.description\",ap=\"process.runtime.engine.name\",sp=\"process.runtime.engine.version\",op=\"process.runtime.name\",lp=\"process.runtime.version\",pp=\"query.\",cp=\"query\",up=\"react.version\",bp=\"release\",gp=\"remix.action_form_data.\",dp=\"remix.action_form_data\",mp=\"replay_id\",yp=\"resource.deployment.environment\",_p=\"resource.deployment.environment.name\",hp=\"resource.render_blocking_status\",vp=\"route\",fp=\"rpc.grpc.status_code\",Sp=\"rpc.method\",Ep=\"rpc.response.status_code\",Tp=\"rpc.service\",Ip=\"rpc.system\",Op=\"rpc.system.name\",kp=\"runtime.build\",Ap=\"runtime.name\",xp=\"runtime.raw_description\",wp=\"runtime.version\",Rp=\"score.\",Np=\"score\",Cp=\"score.ratio.\",Pp=\"score.ratio\",Dp=\"score.total\",Lp=\"score.weight.\",Up=\"score.weight\",Mp=\"sentry.action\",qp=\"sentry.browser.name\",Gp=\"sentry.browser.version\",Yp=\"sentry.cancellation_reason\",Vp=\"sentry.category\",Wp=\"sentry.client_sample_rate\",Fp=\"sentry.description\",Bp=\"sentry.dist\",Hp=\"sentry.domain\",zp=\"sentry.dsc.environment\",Kp=\"sentry.dsc.project_id\",jp=\"sentry.dsc.public_key\",Qp=\"sentry.dsc.release\",Xp=\"sentry.dsc.sampled\",Jp=\"sentry.dsc.sample_rate\",Zp=\"sentry.dsc.trace_id\",$p=\"sentry.dsc.transaction\",ec=\"sentry.environment\",ic=\"sentry.exclusive_time\",tc=\"sentry.graphql.operation\",nc=\"sentry.group\",rc=\"sentry.http.prefetch\",ac=\"sentry.idle_span_finish_reason\",sc=\"sentry.is_remote\",oc=\"sentry.kind\",lc=\"sentry.main_thread\",pc=\"sentry.message.parameter.\",cc=\"sentry.message.template\",uc=\"sentry.metric.source\",bc=\"sentry.mobile\",gc=\"sentry.module.\",dc=\"sentry.module\",mc=\"sentry.nextjs.ssr.function.route\",yc=\"sentry.nextjs.ssr.function.type\",_c=\"sentry.normalized_db_query\",hc=\"sentry.normalized_db_query.hash\",vc=\"sentry.normalized_description\",fc=\"sentry.observed_timestamp_nanos\",Sc=\"sentry.op\",Ec=\"sentry.origin\",Tc=\"sentry.platform\",Ic=\"sentry.profiler_id\",Oc=\"sentry.profile_id\",kc=\"sentry.release\",Ac=\"sentry.replay_id\",xc=\"sentry.replay_is_buffering\",wc=\"sentry.report_event\",Rc=\"sentry.sdk.integrations\",Nc=\"sentry.sdk.name\",Cc=\"sentry.sdk.version\",Pc=\"sentry.segment.id\",Dc=\"sentry.segment_id\",Lc=\"sentry.segment.name\",Uc=\"sentry.server_sample_rate\",Mc=\"sentry.source\",qc=\"sentry.span.source\",Gc=\"sentry.status\",Yc=\"sentry.status_code\",Vc=\"sentry.status.message\",Wc=\"sentry.sveltekit.navigation.from\",Fc=\"sentry.sveltekit.navigation.to\",Bc=\"sentry.sveltekit.navigation.type\",Hc=\"sentry.thread.id\",zc=\"sentry.timestamp.sequence\",Kc=\"sentry.trace_lifecycle\",jc=\"sentry.trace.parent_span_id\",Qc=\"sentry.trace.status\",Xc=\"sentry.transaction\",Jc=\"sentry.user.email\",Zc=\"sentry.user.geo.city\",$c=\"sentry.user.geo.country_code\",eu=\"sentry.user.geo.region\",iu=\"sentry.user.geo.subdivision\",tu=\"sentry.user.id\",nu=\"sentry.user.ip\",ru=\"sentry.user.username\",au=\"server.address\",su=\"server_name\",ou=\"server.port\",lu=\"service.name\",pu=\"service.version\",cu=\"session.id\",uu=\"stall_percentage\",bu=\"stall_total_time\",gu=\"state.type\",du=\"thread.id\",mu=\"thread.name\",yu=\"timber.tag\",_u=\"time_to_full_display\",hu=\"time_to_initial_display\",vu=\"transaction\",fu=\"trpc.procedure_path\",Su=\"trpc.procedure_type\",Eu=\"ttfb\",Tu=\"ttfb.requestTime\",Iu=\"type\",Ou=\"ui.component_name\",ku=\"ui.contributes_to_ttfd\",Au=\"ui.contributes_to_ttid\",xu=\"ui.element.height\",wu=\"ui.element.id\",Ru=\"ui.element.identifier\",Nu=\"ui.element.load_time\",Cu=\"ui.element.paint_type\",Pu=\"ui.element.render_time\",Du=\"ui.element.type\",Lu=\"ui.element.url\",Uu=\"ui.element.width\",Mu=\"url\",qu=\"url.domain\",Gu=\"url.fragment\",Yu=\"url.full\",Vu=\"url.path\",Wu=\"url.path.parameter.\",Fu=\"url.path.parameter\",Bu=\"url.port\",Hu=\"url.query\",zu=\"url.same_origin\",Ku=\"url.scheme\",ju=\"url.template\",Qu=\"user_agent.original\",Xu=\"user.email\",Ju=\"user.full_name\",Zu=\"user.geo.city\",$u=\"user.geo.country_code\",eb=\"user.geo.region\",ib=\"user.geo.subdivision\",tb=\"user.hash\",nb=\"user.id\",rb=\"user.ip_address\",ab=\"user.name\",sb=\"user.roles\",ob=\"vercel.branch\",lb=\"vercel.build_id\",pb=\"vercel.deployment_id\",cb=\"vercel.destination\",ub=\"vercel.edge_type\",bb=\"vercel.entrypoint\",gb=\"vercel.execution_region\",db=\"vercel.id\",mb=\"vercel.ja3_digest\",yb=\"vercel.ja4_digest\",_b=\"vercel.log_type\",hb=\"vercel.path\",vb=\"vercel.project_id\",fb=\"vercel.project_name\",Sb=\"vercel.proxy.cache_id\",Eb=\"vercel.proxy.client_ip\",Tb=\"vercel.proxy.host\",Ib=\"vercel.proxy.lambda_region\",Ob=\"vercel.proxy.method\",kb=\"vercel.proxy.path\",Ab=\"vercel.proxy.path_type\",xb=\"vercel.proxy.path_type_variant\",wb=\"vercel.proxy.referer\",Rb=\"vercel.proxy.region\",Nb=\"vercel.proxy.response_byte_size\",Cb=\"vercel.proxy.scheme\",Pb=\"vercel.proxy.status_code\",Db=\"vercel.proxy.timestamp\",Lb=\"vercel.proxy.user_agent\",Ub=\"vercel.proxy.vercel_cache\",Mb=\"vercel.proxy.vercel_id\",qb=\"vercel.proxy.waf_action\",Gb=\"vercel.proxy.waf_rule_id\",Yb=\"vercel.request_id\",Vb=\"vercel.source\",Wb=\"vercel.status_code\",Fb={\"ai.citations\":\"string[]\",\"ai.completion_tokens.used\":\"integer\",\"ai.documents\":\"string[]\",\"ai.finish_reason\":\"string\",\"ai.frequency_penalty\":\"double\",\"ai.function_call\":\"string\",\"ai.generation_id\":\"string\",\"ai.input_messages\":\"string\",\"ai.is_search_required\":\"boolean\",\"ai.metadata\":\"string\",\"ai.model_id\":\"string\",\"ai.model.provider\":\"string\",\"ai.pipeline.name\":\"string\",\"ai.preamble\":\"string\",\"ai.presence_penalty\":\"double\",\"ai.prompt_tokens.used\":\"integer\",\"ai.raw_prompting\":\"boolean\",\"ai.responses\":\"string[]\",\"ai.response_format\":\"string\",\"ai.search_queries\":\"string[]\",\"ai.search_results\":\"string[]\",\"ai.seed\":\"string\",\"ai.streaming\":\"boolean\",\"ai.tags\":\"string\",\"ai.temperature\":\"double\",\"ai.texts\":\"string[]\",\"ai.tools\":\"string[]\",\"ai.tool_calls\":\"string[]\",\"ai.top_k\":\"integer\",\"ai.top_p\":\"double\",\"ai.total_cost\":\"double\",\"ai.total_tokens.used\":\"integer\",\"ai.warnings\":\"string[]\",\"angular.version\":\"string\",\"app.app_build\":\"string\",\"app.app_identifier\":\"string\",\"app.app_name\":\"string\",\"app.app_start_time\":\"string\",\"app.app_version\":\"string\",\"app.build\":\"string\",\"app.identifier\":\"string\",\"app.in_foreground\":\"boolean\",\"app.name\":\"string\",app_start_cold:\"double\",\"app.start_time\":\"string\",app_start_type:\"string\",app_start_warm:\"double\",\"app.version\":\"string\",\"app.vitals.frames.delay.value\":\"integer\",\"app.vitals.frames.frozen.count\":\"integer\",\"app.vitals.frames.slow.count\":\"integer\",\"app.vitals.frames.total.count\":\"integer\",\"app.vitals.start.cold.value\":\"double\",\"app.vitals.start.prewarmed\":\"boolean\",\"app.vitals.start.reason\":\"string\",\"app.vitals.start.screen\":\"string\",\"app.vitals.start.type\":\"string\",\"app.vitals.start.warm.value\":\"double\",\"app.vitals.ttfd.value\":\"double\",\"app.vitals.ttid.value\":\"double\",\"art.gc.blocking_count\":\"integer\",\"art.gc.blocking_time\":\"double\",\"art.gc.pre_oome_count\":\"integer\",\"art.gc.total_count\":\"integer\",\"art.gc.total_time\":\"double\",\"art.gc.waiting_time\":\"double\",\"art.memory.free\":\"integer\",\"art.memory.free_until_gc\":\"integer\",\"art.memory.free_until_oome\":\"integer\",\"art.memory.max\":\"integer\",\"art.memory.total\":\"integer\",\"aws.cloudwatch.logs.log_group\":\"string\",\"aws.cloudwatch.logs.log_stream\":\"string\",\"aws.cloudwatch.logs.url\":\"string\",\"aws.dynamodb.attribute_definitions\":\"string[]\",\"aws.dynamodb.consistent_read\":\"boolean\",\"aws.dynamodb.consumed_capacity\":\"string[]\",\"aws.dynamodb.count\":\"integer\",\"aws.dynamodb.exclusive_start_table\":\"string\",\"aws.dynamodb.global_secondary_indexes\":\"string[]\",\"aws.dynamodb.global_secondary_index_updates\":\"string[]\",\"aws.dynamodb.index_name\":\"string\",\"aws.dynamodb.item_collection_metrics\":\"string\",\"aws.dynamodb.limit\":\"integer\",\"aws.dynamodb.local_secondary_indexes\":\"string[]\",\"aws.dynamodb.projection\":\"string\",\"aws.dynamodb.provisioned_read_capacity\":\"double\",\"aws.dynamodb.provisioned_write_capacity\":\"double\",\"aws.dynamodb.scanned_count\":\"integer\",\"aws.dynamodb.scan_forward\":\"boolean\",\"aws.dynamodb.segment\":\"integer\",\"aws.dynamodb.select\":\"string\",\"aws.dynamodb.table_count\":\"integer\",\"aws.dynamodb.table_names\":\"string[]\",\"aws.dynamodb.total_segments\":\"integer\",\"aws.extended_request_id\":\"string\",\"aws.kinesis.stream_name\":\"string\",\"aws.kinesis.stream.name\":\"string\",\"aws.lambda.aws_request_id\":\"string\",\"aws.lambda.execution_duration_in_millis\":\"double\",\"aws.lambda.function_name\":\"string\",\"aws.lambda.function_version\":\"string\",\"aws.lambda.invoked_arn\":\"string\",\"aws.lambda.invoked_function_arn\":\"string\",\"aws.lambda.remaining_time_in_millis\":\"double\",\"aws.log.group.names\":\"string[]\",\"aws.log.stream.names\":\"string[]\",\"aws.request.extended_id\":\"string\",\"aws.request_id\":\"string\",\"aws.request.id\":\"string\",\"aws.s3.bucket\":\"string\",\"aws.secretsmanager.secret.arn\":\"string\",\"aws.sns.topic.arn\":\"string\",\"aws.step_functions.activity.arn\":\"string\",\"aws.step_functions.state_machine.arn\":\"string\",blocked_main_thread:\"boolean\",\"browser.name\":\"string\",\"browser.performance.navigation.activation_start\":\"double\",\"browser.performance.time_origin\":\"double\",\"browser.report.type\":\"string\",\"browser.script.invoker\":\"string\",\"browser.script.invoker_type\":\"string\",\"browser.script.source_char_position\":\"integer\",\"browser.version\":\"string\",\"browser.web_vital.cls.report_event\":\"string\",\"browser.web_vital.cls.source.\":\"string\",\"browser.web_vital.cls.value\":\"double\",\"browser.web_vital.fcp.value\":\"double\",\"browser.web_vital.fp.value\":\"double\",\"browser.web_vital.inp.value\":\"double\",\"browser.web_vital.lcp.element\":\"string\",\"browser.web_vital.lcp.id\":\"string\",\"browser.web_vital.lcp.load_time\":\"integer\",\"browser.web_vital.lcp.render_time\":\"integer\",\"browser.web_vital.lcp.report_event\":\"string\",\"browser.web_vital.lcp.size\":\"integer\",\"browser.web_vital.lcp.url\":\"string\",\"browser.web_vital.lcp.value\":\"double\",\"browser.web_vital.ttfb.request_time\":\"double\",\"browser.web_vital.ttfb.value\":\"double\",\"cache.hit\":\"boolean\",\"cache.item_size\":\"integer\",\"cache.key\":\"string[]\",\"cache.operation\":\"string\",\"cache.ttl\":\"integer\",\"cache.write\":\"boolean\",channel:\"string\",\"client.address\":\"string\",\"client.port\":\"integer\",\"cloudflare.d1.duration\":\"integer\",\"cloudflare.d1.query_type\":\"string\",\"cloudflare.d1.rows_read\":\"integer\",\"cloudflare.d1.rows_written\":\"integer\",\"cloudflare.durable_object.query.bindings\":\"integer\",\"cloudflare.durable_object.response.rows_read\":\"integer\",\"cloudflare.durable_object.response.rows_written\":\"integer\",\"cloudflare.r2.bucket\":\"string\",\"cloudflare.r2.operation\":\"string\",\"cloudflare.r2.request.delimiter\":\"string\",\"cloudflare.r2.request.key\":\"string\",\"cloudflare.r2.request.part_number\":\"integer\",\"cloudflare.r2.request.prefix\":\"string\",\"cloudflare.workflow.attempt\":\"integer\",\"cloudflare.workflow.retries.backoff\":\"string\",\"cloudflare.workflow.retries.delay\":\"string\",\"cloudflare.workflow.retries.limit\":\"integer\",\"cloudflare.workflow.timeout\":\"string\",\"cloud.account.id\":\"string\",\"cloud.availability_zone\":\"string\",\"cloud.platform\":\"string\",\"cloud.provider\":\"string\",\"cloud.region\":\"string\",\"cloud.resource_id\":\"string\",cls:\"double\",\"cls.source.\":\"string\",\"code.filepath\":\"string\",\"code.file.path\":\"string\",\"code.function\":\"string\",\"code.function.name\":\"string\",\"code.lineno\":\"integer\",\"code.line.number\":\"integer\",\"code.namespace\":\"string\",connectionType:\"string\",\"connection.rtt\":\"integer\",\"culture.calendar\":\"string\",\"culture.display_name\":\"string\",\"culture.is_24_hour_format\":\"boolean\",\"culture.locale\":\"string\",\"culture.timezone\":\"string\",\"db.collection.name\":\"string\",\"db.driver.name\":\"string\",\"db.name\":\"string\",\"db.namespace\":\"string\",\"db.operation\":\"string\",\"db.operation.batch.size\":\"integer\",\"db.operation.name\":\"string\",\"db.query.parameter.\":\"string\",\"db.query.summary\":\"string\",\"db.query.text\":\"string\",\"db.redis.connection\":\"string\",\"db.redis.key\":\"string\",\"db.redis.parameters\":\"string[]\",\"db.response.status_code\":\"string\",\"db.sql.bindings\":\"string[]\",\"db.statement\":\"string\",\"db.stored_procedure.name\":\"string\",\"db.system\":\"string\",\"db.system.name\":\"string\",\"db.user\":\"string\",deviceMemory:\"string\",\"device.archs\":\"string[]\",\"device.battery_level\":\"double\",\"device.battery_temperature\":\"double\",\"device.boot_time\":\"string\",\"device.brand\":\"string\",\"device.charging\":\"boolean\",\"device.chipset\":\"string\",\"device.class\":\"string\",\"device.connection_type\":\"string\",\"device.cpu_description\":\"string\",\"device.external_free_storage\":\"integer\",\"device.external_storage_size\":\"integer\",\"device.family\":\"string\",\"device.free_memory\":\"integer\",\"device.free_storage\":\"integer\",\"device.id\":\"string\",\"device.locale\":\"string\",\"device.low_memory\":\"boolean\",\"device.low_power_mode\":\"boolean\",\"device.manufacturer\":\"string\",\"device.memory.estimated_capacity\":\"integer\",\"device.memory_size\":\"integer\",\"device.model\":\"string\",\"device.model_id\":\"string\",\"device.name\":\"string\",\"device.online\":\"boolean\",\"device.orientation\":\"string\",\"device.processor_count\":\"integer\",\"device.processor_frequency\":\"double\",\"device.screen_density\":\"double\",\"device.screen_dpi\":\"integer\",\"device.screen_height_pixels\":\"integer\",\"device.screen_width_pixels\":\"integer\",\"device.simulator\":\"boolean\",\"device.storage_size\":\"integer\",\"device.thermal_state\":\"string\",\"device.timezone\":\"string\",\"device.usable_memory\":\"integer\",dist:\"string\",effectiveConnectionType:\"string\",environment:\"string\",\"error.type\":\"string\",\"event.id\":\"integer\",\"event.name\":\"string\",\"exception.escaped\":\"boolean\",\"exception.message\":\"string\",\"exception.stacktrace\":\"string\",\"exception.type\":\"string\",\"faas.coldstart\":\"boolean\",\"faas.cron\":\"string\",\"faas.duration_in_ms\":\"integer\",\"faas.entry_point\":\"string\",\"faas.execution\":\"string\",\"faas.id\":\"string\",\"faas.identity\":\"string\",\"faas.invocation_id\":\"string\",\"faas.invoked_name\":\"string\",\"faas.invoked_provider\":\"string\",\"faas.invoked_region\":\"string\",\"faas.name\":\"string\",\"faas.time\":\"string\",\"faas.trigger\":\"string\",\"faas.version\":\"string\",fcp:\"double\",\"flag.evaluation.\":\"boolean\",fp:\"double\",\"frames.delay\":\"integer\",\"frames.frozen\":\"integer\",frames_frozen_rate:\"double\",\"frames.slow\":\"integer\",frames_slow_rate:\"double\",\"frames.total\":\"integer\",fs_error:\"string\",\"gcp.function.context.event_id\":\"string\",\"gcp.function.context.event_type\":\"string\",\"gcp.function.context.id\":\"string\",\"gcp.function.context.resource\":\"string\",\"gcp.function.context.source\":\"string\",\"gcp.function.context.specversion\":\"string\",\"gcp.function.context.time\":\"string\",\"gcp.function.context.timestamp\":\"string\",\"gcp.function.context.type\":\"string\",\"gcp.project.id\":\"string\",\"gen_ai.agent.name\":\"string\",\"gen_ai.context.utilization\":\"double\",\"gen_ai.context.window_size\":\"integer\",\"gen_ai.conversation.id\":\"string\",\"gen_ai.cost.cache_creation.input_tokens\":\"double\",\"gen_ai.cost.cache_read.input_tokens\":\"double\",\"gen_ai.cost.input_tokens\":\"double\",\"gen_ai.cost.output_tokens\":\"double\",\"gen_ai.cost.reasoning.output_tokens\":\"double\",\"gen_ai.cost.total_tokens\":\"double\",\"gen_ai.embeddings.input\":\"string\",\"gen_ai.function_id\":\"string\",\"gen_ai.input.messages\":\"string\",\"gen_ai.operation.name\":\"string\",\"gen_ai.operation.type\":\"string\",\"gen_ai.output.messages\":\"string\",\"gen_ai.pipeline.name\":\"string\",\"gen_ai.prompt\":\"string\",\"gen_ai.prompt.name\":\"string\",\"gen_ai.provider.name\":\"string\",\"gen_ai.request.available_tools\":\"string\",\"gen_ai.request.frequency_penalty\":\"double\",\"gen_ai.request.max_tokens\":\"integer\",\"gen_ai.request.messages\":\"string\",\"gen_ai.request.model\":\"string\",\"gen_ai.request.presence_penalty\":\"double\",\"gen_ai.request.reasoning_effort\":\"string\",\"gen_ai.request.seed\":\"string\",\"gen_ai.request.stop_sequences\":\"string[]\",\"gen_ai.request.temperature\":\"double\",\"gen_ai.request.top_k\":\"integer\",\"gen_ai.request.top_p\":\"double\",\"gen_ai.response.finish_reasons\":\"string\",\"gen_ai.response.id\":\"string\",\"gen_ai.response.model\":\"string\",\"gen_ai.response.streaming\":\"boolean\",\"gen_ai.response.text\":\"string\",\"gen_ai.response.time_to_first_chunk\":\"double\",\"gen_ai.response.time_to_first_token\":\"double\",\"gen_ai.response.tokens_per_second\":\"double\",\"gen_ai.response.tool_calls\":\"string\",\"gen_ai.system\":\"string\",\"gen_ai.system_instructions\":\"string\",\"gen_ai.system.message\":\"string\",\"gen_ai.tool.call.arguments\":\"string\",\"gen_ai.tool.call.result\":\"string\",\"gen_ai.tool.definitions\":\"string\",\"gen_ai.tool.description\":\"string\",\"gen_ai.tool.input\":\"string\",\"gen_ai.tool.message\":\"string\",\"gen_ai.tool.name\":\"string\",\"gen_ai.tool.output\":\"string\",\"gen_ai.tool.type\":\"string\",\"gen_ai.usage.cache_creation.input_tokens\":\"integer\",\"gen_ai.usage.cache_read.input_tokens\":\"integer\",\"gen_ai.usage.completion_tokens\":\"integer\",\"gen_ai.usage.input_tokens\":\"integer\",\"gen_ai.usage.input_tokens.cached\":\"integer\",\"gen_ai.usage.input_tokens.cache_write\":\"integer\",\"gen_ai.usage.output_tokens\":\"integer\",\"gen_ai.usage.output_tokens.reasoning\":\"integer\",\"gen_ai.usage.prompt_tokens\":\"integer\",\"gen_ai.usage.reasoning.output_tokens\":\"integer\",\"gen_ai.usage.total_tokens\":\"integer\",\"graphql.document\":\"string\",\"graphql.operation.name\":\"string\",\"graphql.operation.type\":\"string\",hardwareConcurrency:\"string\",\"http.client_ip\":\"string\",\"http.decoded_response_content_length\":\"integer\",\"http.flavor\":\"string\",\"http.fragment\":\"string\",\"http.host\":\"string\",\"http.method\":\"string\",\"http.query\":\"string\",\"http.request.body.data\":\"string\",\"http.request.connection_end\":\"double\",\"http.request.connect_start\":\"double\",\"http.request.domain_lookup_end\":\"double\",\"http.request.domain_lookup_start\":\"double\",\"http.request.fetch_start\":\"double\",\"http.request.header.\":\"string[]\",\"http.request.method\":\"string\",\"http.request_method\":\"string\",\"http.request.redirect_end\":\"double\",\"http.request.redirect_start\":\"double\",\"http.request.request_start\":\"double\",\"http.request.resend_count\":\"integer\",\"http.request.response_end\":\"double\",\"http.request.response_start\":\"double\",\"http.request.same_origin\":\"boolean\",\"http.request.secure_connection_start\":\"double\",\"http.request.time_to_first_byte\":\"double\",\"http.request.worker_start\":\"double\",\"http.response.body.size\":\"integer\",\"http.response_content_length\":\"integer\",\"http.response.header.content-length\":\"string\",\"http.response.header.\":\"string[]\",\"http.response.size\":\"integer\",\"http.response.status_code\":\"integer\",\"http.response_transfer_size\":\"integer\",\"http.route\":\"string\",\"http.scheme\":\"string\",\"http.server_name\":\"string\",\"http.server.request.time_in_queue\":\"double\",\"http.status_code\":\"integer\",\"http.target\":\"string\",\"http.url\":\"string\",\"http.user_agent\":\"string\",id:\"string\",inp:\"double\",\"jsonrpc.protocol.version\":\"string\",\"jsonrpc.request.id\":\"string\",\"jvm.gc.action\":\"string\",\"jvm.gc.name\":\"string\",\"jvm.memory.pool.name\":\"string\",\"jvm.memory.type\":\"string\",\"jvm.thread.daemon\":\"boolean\",\"jvm.thread.state\":\"string\",\"koa.name\":\"string\",\"koa.type\":\"string\",lcp:\"double\",\"lcp.element\":\"string\",\"lcp.id\":\"string\",\"lcp.loadTime\":\"integer\",\"lcp.renderTime\":\"integer\",\"lcp.size\":\"integer\",\"lcp.url\":\"string\",\"logger.name\":\"string\",\"mcp.cancelled.reason\":\"string\",\"mcp.cancelled.request_id\":\"string\",\"mcp.client.name\":\"string\",\"mcp.client.title\":\"string\",\"mcp.client.version\":\"string\",\"mcp.lifecycle.phase\":\"string\",\"mcp.logging.data_type\":\"string\",\"mcp.logging.level\":\"string\",\"mcp.logging.logger\":\"string\",\"mcp.logging.message\":\"string\",\"mcp.method.name\":\"string\",\"mcp.progress.current\":\"integer\",\"mcp.progress.message\":\"string\",\"mcp.progress.percentage\":\"double\",\"mcp.progress.token\":\"string\",\"mcp.progress.total\":\"integer\",\"mcp.prompt.name\":\"string\",\"mcp.prompt.result.description\":\"string\",\"mcp.prompt.result.message_content\":\"string\",\"mcp.prompt.result.message_count\":\"integer\",\"mcp.prompt.result.message_role\":\"string\",\"mcp.protocol.ready\":\"integer\",\"mcp.protocol.version\":\"string\",\"mcp.request.argument.\":\"string\",\"mcp.request.argument.name\":\"string\",\"mcp.request.argument.uri\":\"string\",\"mcp.request.id\":\"string\",\"mcp.resource.protocol\":\"string\",\"mcp.resource.uri\":\"string\",\"mcp.server.name\":\"string\",\"mcp.server.title\":\"string\",\"mcp.server.version\":\"string\",\"mcp.session.id\":\"string\",\"mcp.tool.name\":\"string\",\"mcp.tool.result.content\":\"string\",\"mcp.tool.result.content_count\":\"integer\",\"mcp.tool.result.is_error\":\"boolean\",\"mcp.transport\":\"string\",\"mdc.\":\"string\",\"messaging.batch.message_count\":\"integer\",\"messaging.destination\":\"string\",\"messaging.destination.connection\":\"string\",\"messaging.destination.name\":\"string\",\"messaging.message.body.size\":\"integer\",\"messaging.message.conversation_id\":\"string\",\"messaging.message.envelope.size\":\"integer\",\"messaging.message.id\":\"string\",\"messaging.message.receive.latency\":\"integer\",\"messaging.message.retry.count\":\"integer\",\"messaging.operation.name\":\"string\",\"messaging.operation.type\":\"string\",\"messaging.rabbitmq.destination.routing_key\":\"string\",\"messaging.system\":\"string\",method:\"string\",\"middleware.name\":\"string\",\"navigation.origin\":\"string\",\"navigation.route.id\":\"string\",\"navigation.type\":\"string\",\"nel.elapsed_time\":\"integer\",\"nel.phase\":\"string\",\"nel.referrer\":\"string\",\"nel.sampling_function\":\"double\",\"nel.type\":\"string\",\"network.connection.effective_type\":\"string\",\"network.connection.rtt\":\"integer\",\"network.connection.type\":\"string\",\"network.local.address\":\"string\",\"network.local.port\":\"integer\",\"network.peer.address\":\"string\",\"network.peer.port\":\"integer\",\"network.protocol.name\":\"string\",\"network.protocol.version\":\"string\",\"network.transport\":\"string\",\"network.type\":\"string\",\"net.host.ip\":\"string\",\"net.host.name\":\"string\",\"net.host.port\":\"integer\",\"net.peer.ip\":\"string\",\"net.peer.name\":\"string\",\"net.peer.port\":\"integer\",\"net.protocol.name\":\"string\",\"net.protocol.version\":\"string\",\"net.sock.family\":\"string\",\"net.sock.host.addr\":\"string\",\"net.sock.host.port\":\"integer\",\"net.sock.peer.addr\":\"string\",\"net.sock.peer.name\":\"string\",\"net.sock.peer.port\":\"integer\",\"net.transport\":\"string\",\"os.build\":\"string\",\"os.build_id\":\"string\",\"os.description\":\"string\",\"os.kernel_version\":\"string\",\"os.name\":\"string\",\"os.raw_description\":\"string\",\"os.rooted\":\"boolean\",\"os.theme\":\"string\",\"os.type\":\"string\",\"os.version\":\"string\",\"otel.kind\":\"string\",\"otel.scope.name\":\"string\",\"otel.scope.version\":\"string\",\"otel.status_code\":\"string\",\"otel.status_description\":\"string\",\"params.\":\"string\",\"performance.activationStart\":\"double\",\"performance.timeOrigin\":\"double\",previous_route:\"string\",\"process.command_args\":\"string[]\",\"process.executable.name\":\"string\",\"process.pid\":\"integer\",\"process.runtime.description\":\"string\",\"process.runtime.engine.name\":\"string\",\"process.runtime.engine.version\":\"string\",\"process.runtime.name\":\"string\",\"process.runtime.version\":\"string\",\"query.\":\"string\",\"react.version\":\"string\",release:\"string\",\"remix.action_form_data.\":\"string\",replay_id:\"string\",\"resource.deployment.environment\":\"string\",\"resource.deployment.environment.name\":\"string\",\"resource.render_blocking_status\":\"string\",route:\"string\",\"rpc.grpc.status_code\":\"integer\",\"rpc.method\":\"string\",\"rpc.response.status_code\":\"string\",\"rpc.service\":\"string\",\"rpc.system\":\"string\",\"rpc.system.name\":\"string\",\"runtime.build\":\"string\",\"runtime.name\":\"string\",\"runtime.raw_description\":\"string\",\"runtime.version\":\"string\",\"score.\":\"double\",\"score.ratio.\":\"double\",\"score.total\":\"double\",\"score.weight.\":\"double\",\"sentry.action\":\"string\",\"sentry.browser.name\":\"string\",\"sentry.browser.version\":\"string\",\"sentry.cancellation_reason\":\"string\",\"sentry.category\":\"string\",\"sentry.client_sample_rate\":\"double\",\"sentry.description\":\"string\",\"sentry.dist\":\"string\",\"sentry.domain\":\"string\",\"sentry.dsc.environment\":\"string\",\"sentry.dsc.project_id\":\"string\",\"sentry.dsc.public_key\":\"string\",\"sentry.dsc.release\":\"string\",\"sentry.dsc.sampled\":\"boolean\",\"sentry.dsc.sample_rate\":\"string\",\"sentry.dsc.trace_id\":\"string\",\"sentry.dsc.transaction\":\"string\",\"sentry.environment\":\"string\",\"sentry.exclusive_time\":\"double\",\"sentry.graphql.operation\":\"string\",\"sentry.group\":\"string\",\"sentry.http.prefetch\":\"boolean\",\"sentry.idle_span_finish_reason\":\"string\",\"sentry.is_remote\":\"boolean\",\"sentry.kind\":\"string\",\"sentry.main_thread\":\"boolean\",\"sentry.message.parameter.\":\"string\",\"sentry.message.template\":\"string\",\"sentry.metric.source\":\"string\",\"sentry.mobile\":\"boolean\",\"sentry.module.\":\"string\",\"sentry.nextjs.ssr.function.route\":\"string\",\"sentry.nextjs.ssr.function.type\":\"string\",\"sentry.normalized_db_query\":\"string\",\"sentry.normalized_db_query.hash\":\"string\",\"sentry.normalized_description\":\"string\",\"sentry.observed_timestamp_nanos\":\"string\",\"sentry.op\":\"string\",\"sentry.origin\":\"string\",\"sentry.platform\":\"string\",\"sentry.profiler_id\":\"string\",\"sentry.profile_id\":\"string\",\"sentry.release\":\"string\",\"sentry.replay_id\":\"string\",\"sentry.replay_is_buffering\":\"boolean\",\"sentry.report_event\":\"string\",\"sentry.sdk.integrations\":\"string[]\",\"sentry.sdk.name\":\"string\",\"sentry.sdk.version\":\"string\",\"sentry.segment.id\":\"string\",\"sentry.segment_id\":\"string\",\"sentry.segment.name\":\"string\",\"sentry.server_sample_rate\":\"double\",\"sentry.source\":\"string\",\"sentry.span.source\":\"string\",\"sentry.status\":\"string\",\"sentry.status_code\":\"integer\",\"sentry.status.message\":\"string\",\"sentry.sveltekit.navigation.from\":\"string\",\"sentry.sveltekit.navigation.to\":\"string\",\"sentry.sveltekit.navigation.type\":\"string\",\"sentry.thread.id\":\"integer\",\"sentry.timestamp.sequence\":\"integer\",\"sentry.trace_lifecycle\":\"string\",\"sentry.trace.parent_span_id\":\"string\",\"sentry.trace.status\":\"string\",\"sentry.transaction\":\"string\",\"sentry.user.email\":\"string\",\"sentry.user.geo.city\":\"string\",\"sentry.user.geo.country_code\":\"string\",\"sentry.user.geo.region\":\"string\",\"sentry.user.geo.subdivision\":\"string\",\"sentry.user.id\":\"string\",\"sentry.user.ip\":\"string\",\"sentry.user.username\":\"string\",\"server.address\":\"string\",server_name:\"string\",\"server.port\":\"integer\",\"service.name\":\"string\",\"service.version\":\"string\",\"session.id\":\"string\",stall_percentage:\"double\",stall_total_time:\"double\",\"state.type\":\"string\",\"thread.id\":\"integer\",\"thread.name\":\"string\",\"timber.tag\":\"string\",time_to_full_display:\"double\",time_to_initial_display:\"double\",transaction:\"string\",\"trpc.procedure_path\":\"string\",\"trpc.procedure_type\":\"string\",ttfb:\"double\",\"ttfb.requestTime\":\"double\",type:\"string\",\"ui.component_name\":\"string\",\"ui.contributes_to_ttfd\":\"boolean\",\"ui.contributes_to_ttid\":\"boolean\",\"ui.element.height\":\"integer\",\"ui.element.id\":\"string\",\"ui.element.identifier\":\"string\",\"ui.element.load_time\":\"double\",\"ui.element.paint_type\":\"string\",\"ui.element.render_time\":\"double\",\"ui.element.type\":\"string\",\"ui.element.url\":\"string\",\"ui.element.width\":\"integer\",url:\"string\",\"url.domain\":\"string\",\"url.fragment\":\"string\",\"url.full\":\"string\",\"url.path\":\"string\",\"url.path.parameter.\":\"string\",\"url.port\":\"integer\",\"url.query\":\"string\",\"url.same_origin\":\"boolean\",\"url.scheme\":\"string\",\"url.template\":\"string\",\"user_agent.original\":\"string\",\"user.email\":\"string\",\"user.full_name\":\"string\",\"user.geo.city\":\"string\",\"user.geo.country_code\":\"string\",\"user.geo.region\":\"string\",\"user.geo.subdivision\":\"string\",\"user.hash\":\"string\",\"user.id\":\"string\",\"user.ip_address\":\"string\",\"user.name\":\"string\",\"user.roles\":\"string[]\",\"vercel.branch\":\"string\",\"vercel.build_id\":\"string\",\"vercel.deployment_id\":\"string\",\"vercel.destination\":\"string\",\"vercel.edge_type\":\"string\",\"vercel.entrypoint\":\"string\",\"vercel.execution_region\":\"string\",\"vercel.id\":\"string\",\"vercel.ja3_digest\":\"string\",\"vercel.ja4_digest\":\"string\",\"vercel.log_type\":\"string\",\"vercel.path\":\"string\",\"vercel.project_id\":\"string\",\"vercel.project_name\":\"string\",\"vercel.proxy.cache_id\":\"string\",\"vercel.proxy.client_ip\":\"string\",\"vercel.proxy.host\":\"string\",\"vercel.proxy.lambda_region\":\"string\",\"vercel.proxy.method\":\"string\",\"vercel.proxy.path\":\"string\",\"vercel.proxy.path_type\":\"string\",\"vercel.proxy.path_type_variant\":\"string\",\"vercel.proxy.referer\":\"string\",\"vercel.proxy.region\":\"string\",\"vercel.proxy.response_byte_size\":\"integer\",\"vercel.proxy.scheme\":\"string\",\"vercel.proxy.status_code\":\"integer\",\"vercel.proxy.timestamp\":\"integer\",\"vercel.proxy.user_agent\":\"string[]\",\"vercel.proxy.vercel_cache\":\"string\",\"vercel.proxy.vercel_id\":\"string\",\"vercel.proxy.waf_action\":\"string\",\"vercel.proxy.waf_rule_id\":\"string\",\"vercel.request_id\":\"string\",\"vercel.source\":\"string\",\"vercel.status_code\":\"integer\"},Bb={\"ai.citations\":{brief:\"References or sources cited by the AI model in its response.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:[\"Citation 1\",\"Citation 2\"],deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55]}]},\"ai.completion_tokens.used\":{brief:\"The number of tokens used to respond to the message.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:10,deprecation:{replacement:\"gen_ai.usage.output_tokens\"},aliases:[\"gen_ai.usage.output_tokens\",\"gen_ai.usage.completion_tokens\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[57,61]},{version:\"0.0.0\"}]},\"ai.documents\":{brief:\"Documents or content chunks used as context for the AI model.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:[\"document1.txt\",\"document2.pdf\"],deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55]}]},\"ai.finish_reason\":{brief:\"The reason why the model stopped generating.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"COMPLETE\",deprecation:{replacement:\"gen_ai.response.finish_reasons\"},aliases:[\"gen_ai.response.finish_reasons\"],changelog:[{version:\"0.1.0\",prs:[55,57,61,108,127]}]},\"ai.frequency_penalty\":{brief:\"Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:.5,deprecation:{replacement:\"gen_ai.request.frequency_penalty\"},aliases:[\"gen_ai.request.frequency_penalty\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[55,57,61,108]}]},\"ai.function_call\":{brief:\"For an AI model call, the function that was called. This is deprecated for OpenAI, and replaced by tool_calls\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"function_name\",deprecation:{replacement:\"gen_ai.tool.name\"},aliases:[\"gen_ai.tool.name\",\"mcp.tool.name\"],changelog:[{version:\"0.1.0\",prs:[55,57,61,108]}]},\"ai.generation_id\":{brief:\"Unique identifier for the completion.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"gen_123abc\",deprecation:{replacement:\"gen_ai.response.id\"},aliases:[\"gen_ai.response.id\"],changelog:[{version:\"0.1.0\",prs:[55,57,61,108,127]}]},\"ai.input_messages\":{brief:\"The input messages sent to the model\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:'[{\"role\": \"user\", \"message\": \"hello\"}]',deprecation:{replacement:\"gen_ai.input.messages\"},aliases:[\"gen_ai.request.messages\"],changelog:[{version:\"0.1.0\",prs:[65,119]},{version:\"0.0.0\"}]},\"ai.is_search_required\":{brief:\"Boolean indicating if the model needs to perform a search.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!1,deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55]}]},\"ai.metadata\":{brief:\"Extra metadata passed to an AI pipeline step.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:'{\"user_id\": 123, \"session_id\": \"abc123\"}',deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55,127]}]},\"ai.model_id\":{brief:\"The vendor-specific ID of the model used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"gpt-4\",deprecation:{replacement:\"gen_ai.response.model\"},aliases:[\"gen_ai.response.model\"],changelog:[{version:\"0.1.0\",prs:[57,61,127]},{version:\"0.0.0\"}]},\"ai.model.provider\":{brief:\"The provider of the model.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"openai\",deprecation:{replacement:\"gen_ai.provider.name\"},aliases:[\"gen_ai.provider.name\",\"gen_ai.system\"],changelog:[{version:\"0.4.0\",prs:[253]},{version:\"0.1.0\",prs:[57,61,108,127]}]},\"ai.pipeline.name\":{brief:\"The name of the AI pipeline.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Autofix Pipeline\",deprecation:{replacement:\"gen_ai.pipeline.name\"},aliases:[\"gen_ai.pipeline.name\"],changelog:[{version:\"0.1.0\",prs:[53,76,108,127]}]},\"ai.preamble\":{brief:\"For an AI model call, the preamble parameter. Preambles are a part of the prompt used to adjust the model's overall behavior and conversation style.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"You are now a clown.\",deprecation:{replacement:\"gen_ai.system_instructions\"},aliases:[\"gen_ai.system_instructions\"],changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55]}]},\"ai.presence_penalty\":{brief:\"Used to reduce repetitiveness of generated tokens. Similar to frequency_penalty, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:.5,deprecation:{replacement:\"gen_ai.request.presence_penalty\"},aliases:[\"gen_ai.request.presence_penalty\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[55,57,61,108]}]},\"ai.prompt_tokens.used\":{brief:\"The number of tokens used to process just the prompt.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:20,deprecation:{replacement:\"gen_ai.usage.input_tokens\"},aliases:[\"gen_ai.usage.prompt_tokens\",\"gen_ai.usage.input_tokens\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[57,61]},{version:\"0.0.0\"}]},\"ai.raw_prompting\":{brief:\"When enabled, the user\\u2019s prompt will be sent to the model without any pre-processing.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55]}]},\"ai.responses\":{brief:\"The response messages sent back by the AI model.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:[\"hello\",\"world\"],deprecation:{replacement:\"gen_ai.output.messages\"},changelog:[{version:\"0.1.0\",prs:[65,127]},{version:\"0.0.0\"}]},\"ai.response_format\":{brief:\"For an AI model call, the format of the response\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"json_object\",deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55,127]}]},\"ai.search_queries\":{brief:\"Queries used to search for relevant context or documents.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:[\"climate change effects\",\"renewable energy\"],deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55]}]},\"ai.search_results\":{brief:\"Results returned from search queries for context.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:[\"search_result_1, search_result_2\"],deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55]}]},\"ai.seed\":{brief:\"The seed, ideally models given the same seed and same other parameters will produce the exact same output.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1234567890\",deprecation:{replacement:\"gen_ai.request.seed\"},aliases:[\"gen_ai.request.seed\"],changelog:[{version:\"0.1.0\",prs:[55,57,61,108,127]}]},\"ai.streaming\":{brief:\"Whether the request was streamed back.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,deprecation:{replacement:\"gen_ai.response.streaming\"},aliases:[\"gen_ai.response.streaming\"],changelog:[{version:\"0.1.0\",prs:[76,108]},{version:\"0.0.0\"}]},\"ai.tags\":{brief:\"Tags that describe an AI pipeline step.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:'{\"executed_function\": \"add_integers\"}',deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55,127]}]},\"ai.temperature\":{brief:\"For an AI model call, the temperature parameter. Temperature essentially means how random the output will be.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:.1,deprecation:{replacement:\"gen_ai.request.temperature\"},aliases:[\"gen_ai.request.temperature\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[55,57,61,108]}]},\"ai.texts\":{brief:\"Raw text inputs provided to the model.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:[\"Hello, how are you?\",\"What is the capital of France?\"],deprecation:{replacement:\"gen_ai.input.messages\"},aliases:[\"gen_ai.input.messages\"],changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55]}]},\"ai.tools\":{brief:\"For an AI model call, the functions that are available\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:[\"function_1\",\"function_2\"],deprecation:{replacement:\"gen_ai.tool.definitions\"},changelog:[{version:\"0.1.0\",prs:[55,65,127]}]},\"ai.tool_calls\":{brief:\"For an AI model call, the tool calls that were made.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:[\"tool_call_1\",\"tool_call_2\"],deprecation:{replacement:\"gen_ai.output.messages\"},changelog:[{version:\"0.1.0\",prs:[55,65]}]},\"ai.top_k\":{brief:\"Limits the model to only consider the K most likely next tokens, where K is an integer (e.g., top_k=20 means only the 20 highest probability tokens are considered).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:35,deprecation:{replacement:\"gen_ai.request.top_k\"},aliases:[\"gen_ai.request.top_k\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[55,57,61,108]}]},\"ai.top_p\":{brief:\"Limits the model to only consider tokens whose cumulative probability mass adds up to p, where p is a float between 0 and 1 (e.g., top_p=0.7 means only tokens that sum up to 70% of the probability mass are considered).\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:.7,deprecation:{replacement:\"gen_ai.request.top_p\"},aliases:[\"gen_ai.request.top_p\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[55,57,61,108]}]},\"ai.total_cost\":{brief:\"The total cost for the tokens used.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:12.34,deprecation:{replacement:\"gen_ai.cost.total_tokens\"},aliases:[\"gen_ai.cost.total_tokens\"],changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[53]}]},\"ai.total_tokens.used\":{brief:\"The total number of tokens used to process the prompt.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:30,deprecation:{replacement:\"gen_ai.usage.total_tokens\"},aliases:[\"gen_ai.usage.total_tokens\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[57,61,108]},{version:\"0.0.0\"}]},\"ai.warnings\":{brief:\"Warning messages generated during model execution.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:[\"Token limit exceeded\"],deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55]}]},\"angular.version\":{brief:\"The version of the Angular framework\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"17.1.0\",changelog:[{version:\"0.7.0\",prs:[367],description:\"Added angular.version attribute\"}]},\"app.app_build\":{brief:\"Internal build identifier, as it appears on the platform.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1\",deprecation:{replacement:\"app.build\",reason:\"Deprecated in favor of app.build\"},aliases:[\"app.build\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added and deprecated app.app_build in favor of app.build\"}]},\"app.app_identifier\":{brief:\"Version-independent application identifier, often a dotted bundle ID.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"com.example.myapp\",deprecation:{replacement:\"app.identifier\",reason:\"Deprecated in favor of app.identifier\"},aliases:[\"app.identifier\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added and deprecated app.app_identifier in favor of app.identifier\"}]},\"app.app_name\":{brief:\"Human readable application name, as it appears on the platform.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"My App\",deprecation:{replacement:\"app.name\",reason:\"Deprecated in favor of app.name\"},aliases:[\"app.name\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added and deprecated app.app_name in favor of app.name\"}]},\"app.app_start_time\":{brief:\"Formatted UTC timestamp when the user started the application.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"2025-01-01T00:00:00.000Z\",deprecation:{replacement:\"app.start_time\",reason:\"Deprecated in favor of app.start_time\"},aliases:[\"app.start_time\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added and deprecated app.app_start_time in favor of app.start_time\"}]},\"app.app_version\":{brief:\"Human readable application version, as it appears on the platform.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1.0.0\",deprecation:{replacement:\"app.version\",reason:\"Deprecated in favor of app.version\"},aliases:[\"app.version\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added and deprecated app.app_version in favor of app.version\"}]},\"app.build\":{brief:\"Internal build identifier, as it appears on the platform.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1\",aliases:[\"app.app_build\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added app.build attribute\"}]},\"app.identifier\":{brief:\"Version-independent application identifier, often a dotted bundle ID.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"com.example.myapp\",aliases:[\"app.app_identifier\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added app.identifier attribute\"}]},\"app.in_foreground\":{brief:\"Whether the application is currently in the foreground.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.5.0\",prs:[296],description:\"Added app.in_foreground attribute\"}]},\"app.name\":{brief:\"Human readable application name, as it appears on the platform.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"My App\",aliases:[\"app.app_name\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added app.name attribute\"}]},app_start_cold:{brief:\"The duration of a cold app start in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234.56,deprecation:{replacement:\"app.vitals.start.cold.value\",reason:\"Replaced by app.vitals.start.cold.value to align with the app.vitals.* namespace for mobile performance attributes\"},aliases:[\"app.vitals.start.cold.value\"],changelog:[{version:\"0.5.0\",prs:[323],description:\"Added and deprecated in favor of app.vitals.start.cold.value\"}]},\"app.start_time\":{brief:\"Formatted UTC timestamp when the user started the application.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"2025-01-01T00:00:00.000Z\",aliases:[\"app.app_start_time\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added app.start_time attribute\"}]},app_start_type:{brief:\"Mobile app start variant. Either cold or warm.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"cold\",deprecation:{replacement:\"app.vitals.start.type\",reason:\"Replaced by app.vitals.start.type to align with the app.vitals.* namespace for mobile performance attributes\"},aliases:[\"app.vitals.start.type\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Deprecated in favor of app.vitals.start.type\"},{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},app_start_warm:{brief:\"The duration of a warm app start in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234.56,deprecation:{replacement:\"app.vitals.start.warm.value\",reason:\"Replaced by app.vitals.start.warm.value to align with the app.vitals.* namespace for mobile performance attributes\"},aliases:[\"app.vitals.start.warm.value\"],changelog:[{version:\"0.5.0\",prs:[323],description:\"Added and deprecated in favor of app.vitals.start.warm.value\"}]},\"app.version\":{brief:\"Human readable application version, as it appears on the platform.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1.0.0\",aliases:[\"app.app_version\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added app.version attribute\"}]},\"app.vitals.frames.delay.value\":{brief:\"The sum of all delayed frame durations in seconds during the lifetime of the span. For more information see [frames delay](https://develop.sentry.dev/sdk/performance/frames-delay/).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:5,aliases:[\"frames.delay\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added app.vitals.frames.delay.value to replace frames.delay\"}]},\"app.vitals.frames.frozen.count\":{brief:\"The number of frozen frames rendered during the lifetime of the span.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:3,aliases:[\"frames.frozen\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added app.vitals.frames.frozen.count to replace frames.frozen\"}]},\"app.vitals.frames.slow.count\":{brief:\"The number of slow frames rendered during the lifetime of the span.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1,aliases:[\"frames.slow\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added app.vitals.frames.slow.count to replace frames.slow\"}]},\"app.vitals.frames.total.count\":{brief:\"The number of total frames rendered during the lifetime of the span.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:60,aliases:[\"frames.total\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added app.vitals.frames.total.count to replace frames.total\"}]},\"app.vitals.start.cold.value\":{brief:\"The duration of a cold app start in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234.56,aliases:[\"app_start_cold\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added app.vitals.start.cold.value attribute\"}]},\"app.vitals.start.prewarmed\":{brief:\"Whether the app start was prewarmed.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.11.0\",prs:[379],description:\"Added app.vitals.start.prewarmed attribute\"}]},\"app.vitals.start.reason\":{brief:\"The reason that triggered the app start.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"push\",changelog:[{version:\"0.7.0\",prs:[353],description:\"Added app.vitals.start.reason attribute\"}]},\"app.vitals.start.screen\":{brief:\"The screen that is rendered when the app start is complete. This is the screen the user first sees and can interact with after launch. The absence of this attribute on the app start span indicates a background app start where no UI was rendered.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"MainActivity\",changelog:[{version:\"0.7.0\",prs:[353],description:\"Added app.vitals.start.screen attribute\"}]},\"app.vitals.start.type\":{brief:\"The type of app start, for example `cold` or `warm`\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"cold\",aliases:[\"app_start_type\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added app.vitals.start.type attribute\"}]},\"app.vitals.start.warm.value\":{brief:\"The duration of a warm app start in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234.56,aliases:[\"app_start_warm\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added app.vitals.start.warm.value attribute\"}]},\"app.vitals.ttfd.value\":{brief:\"The duration of time to full display in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234.56,aliases:[\"time_to_full_display\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added app.vitals.ttfd.value attribute\"}]},\"app.vitals.ttid.value\":{brief:\"The duration of time to initial display in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234.56,aliases:[\"time_to_initial_display\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added app.vitals.ttid.value attribute\"}]},\"art.gc.blocking_count\":{brief:\"Total number of blocking (stop-the-world) garbage collections performed by the Android Runtime\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.gc.blocking_count attribute\"}]},\"art.gc.blocking_time\":{brief:\"Total time spent in blocking (stop-the-world) garbage collections by the Android Runtime, in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:11.873,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.gc.blocking_time attribute\"}]},\"art.gc.pre_oome_count\":{brief:\"Total number of garbage collections triggered as a last resort before an OutOfMemoryError by the Android Runtime\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:0,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.gc.pre_oome_count attribute\"}]},\"art.gc.total_count\":{brief:\"Total number of garbage collections performed by the Android Runtime\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.gc.total_count attribute\"}]},\"art.gc.total_time\":{brief:\"Total time spent in garbage collection by the Android Runtime, in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:11.807,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.gc.total_time attribute\"}]},\"art.gc.waiting_time\":{brief:\"Total time threads spent waiting for garbage collection to complete in the Android Runtime, in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:8.054,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.gc.waiting_time attribute\"}]},\"art.memory.free\":{brief:\"Free memory available to the process as reported by the Android Runtime, in bytes\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:3181568,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.memory.free attribute\"}]},\"art.memory.free_until_gc\":{brief:\"Free memory available before a garbage collection would be triggered by the Android Runtime, in bytes\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:3181568,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.memory.free_until_gc attribute\"}]},\"art.memory.free_until_oome\":{brief:\"Free memory available before an OutOfMemoryError would be thrown by the Android Runtime, in bytes\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:196083712,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.memory.free_until_oome attribute\"}]},\"art.memory.max\":{brief:\"Maximum memory the process is allowed to use as reported by the Android Runtime, in bytes\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:201326592,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.memory.max attribute\"}]},\"art.memory.total\":{brief:\"Total memory currently allocated to the process by the Android Runtime, in bytes\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:7774208,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.memory.total attribute\"}]},\"aws.cloudwatch.logs.log_group\":{brief:\"The name of the CloudWatch Logs log group\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"/aws/lambda/my-function\",changelog:[{version:\"0.7.0\",prs:[369],description:\"Added aws.cloudwatch.logs.log_group attribute\"}]},\"aws.cloudwatch.logs.log_stream\":{brief:\"The name of the CloudWatch Logs log stream\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"2024/01/01/[$LATEST]abcdef1234567890\",changelog:[{version:\"0.7.0\",prs:[369],description:\"Added aws.cloudwatch.logs.log_stream attribute\"}]},\"aws.cloudwatch.logs.url\":{brief:\"The URL to the CloudWatch Logs log group\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logsV2:log-groups/log-group/my-log-group\",changelog:[{version:\"0.7.0\",prs:[369],description:\"Added aws.cloudwatch.logs.url attribute\"}]},\"aws.dynamodb.attribute_definitions\":{brief:\"The JSON-serialized value of each item in the `AttributeDefinitions` request field.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:['{ \"AttributeName\": \"string\", \"AttributeType\": \"string\" }'],changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.attribute_definitions attribute\"}]},\"aws.dynamodb.consistent_read\":{brief:\"The value of the `ConsistentRead` request parameter.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:!0,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.consistent_read attribute\"}]},\"aws.dynamodb.consumed_capacity\":{brief:\"The JSON-serialized value of each item in the `ConsumedCapacity` response field.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:['{ \"CapacityUnits\": number, \"GlobalSecondaryIndexes\": { \"string\" : { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }, \"LocalSecondaryIndexes\": { \"string\" : { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }, \"ReadCapacityUnits\": number, \"Table\": { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number }, \"TableName\": \"string\", \"WriteCapacityUnits\": number }'],changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.consumed_capacity attribute\"}]},\"aws.dynamodb.count\":{brief:\"The value of the `Count` response parameter.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:10,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.count attribute\"}]},\"aws.dynamodb.exclusive_start_table\":{brief:\"The value of the `ExclusiveStartTableName` request parameter.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Users\",changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.exclusive_start_table attribute\"}]},\"aws.dynamodb.global_secondary_indexes\":{brief:\"The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:['{ \"IndexName\": \"string\", \"KeySchema\": [ { \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" }, \"ProvisionedThroughput\": { \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }'],changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.global_secondary_indexes attribute\"}]},\"aws.dynamodb.global_secondary_index_updates\":{brief:\"The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:['{ \"Create\": { \"IndexName\": \"string\", \"KeySchema\": [ { \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" }, \"ProvisionedThroughput\": { \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }'],changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.global_secondary_index_updates attribute\"}]},\"aws.dynamodb.index_name\":{brief:\"The value of the `IndexName` request parameter.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"name_to_group\",changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.index_name attribute\"}]},\"aws.dynamodb.item_collection_metrics\":{brief:\"The JSON-serialized value of the `ItemCollectionMetrics` response field.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:'{ \"string\" : [ { \"ItemCollectionKey\": { \"string\" : { \"B\": blob, \"BOOL\": boolean, \"BS\": [ blob ], \"L\": [ \"AttributeValue\" ], \"M\": { \"string\" : \"AttributeValue\" }, \"N\": \"string\", \"NS\": [ \"string\" ], \"NULL\": boolean, \"S\": \"string\", \"SS\": [ \"string\" ] } }, \"SizeEstimateRangeGB\": [ number ] } ] }',changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.item_collection_metrics attribute\"}]},\"aws.dynamodb.limit\":{brief:\"The value of the `Limit` request parameter.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:10,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.limit attribute\"}]},\"aws.dynamodb.local_secondary_indexes\":{brief:\"The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:['{ \"IndexArn\": \"string\", \"IndexName\": \"string\", \"IndexSizeBytes\": number, \"ItemCount\": number, \"KeySchema\": [ { \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" } }'],changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.local_secondary_indexes attribute\"}]},\"aws.dynamodb.projection\":{brief:\"The value of the `ProjectionExpression` request parameter.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Title, Price, Color\",changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.projection attribute\"}]},\"aws.dynamodb.provisioned_read_capacity\":{brief:\"The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:1,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.provisioned_read_capacity attribute\"}]},\"aws.dynamodb.provisioned_write_capacity\":{brief:\"The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:2,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.provisioned_write_capacity attribute\"}]},\"aws.dynamodb.scanned_count\":{brief:\"The value of the `ScannedCount` response parameter.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:50,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.scanned_count attribute\"}]},\"aws.dynamodb.scan_forward\":{brief:\"The value of the `ScanIndexForward` request parameter.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:!0,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.scan_forward attribute\"}]},\"aws.dynamodb.segment\":{brief:\"The value of the `Segment` request parameter.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:10,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.segment attribute\"}]},\"aws.dynamodb.select\":{brief:\"The value of the `Select` request parameter.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"ALL_ATTRIBUTES\",changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.select attribute\"}]},\"aws.dynamodb.table_count\":{brief:\"The number of items in the `TableNames` response parameter.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:20,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.table_count attribute\"}]},\"aws.dynamodb.table_names\":{brief:\"The keys in the `RequestItems` object field.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:[\"Users\",\"Cats\"],changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.table_names attribute\"}]},\"aws.dynamodb.total_segments\":{brief:\"The value of the `TotalSegments` request parameter.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:100,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.total_segments attribute\"}]},\"aws.extended_request_id\":{brief:\"The AWS extended request ID as returned in the response headers.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ=\",aliases:[\"aws.request.extended_id\"],changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.extended_request_id attribute\"}]},\"aws.kinesis.stream_name\":{brief:\"The name of the AWS Kinesis stream the request refers to.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"some-stream-name\",aliases:[\"aws.kinesis.stream.name\"],changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.kinesis.stream_name attribute\"}]},\"aws.kinesis.stream.name\":{brief:\"The name of the AWS Kinesis stream the request refers to.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"some-stream-name\",deprecation:{replacement:\"aws.kinesis.stream_name\",reason:\"This attribute is being deprecated in favor of aws.kinesis.stream_name, which is the OTel-aligned replacement.\"},aliases:[\"aws.kinesis.stream_name\"],changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.kinesis.stream.name attribute, deprecated in favor of aws.kinesis.stream_name\"}]},\"aws.lambda.aws_request_id\":{brief:\"The AWS request ID as received by the Lambda function runtime\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"8476a536-e9f4-11e8-9739-2dfe598c3fcd\",deprecation:{replacement:\"faas.invocation_id\",reason:\"This attribute is being deprecated in favor of faas.invocation_id\"},aliases:[\"faas.invocation_id\",\"faas.execution\"],changelog:[{version:\"0.16.0\",prs:[473],description:\"Added faas.execution as an alias\"},{version:\"0.11.1\",prs:[414,424],description:\"Deprecated aws.lambda.aws_request_id in favor of faas.invocation_id\"},{version:\"0.7.0\",prs:[369],description:\"Added aws.lambda.aws_request_id attribute\"}]},\"aws.lambda.execution_duration_in_millis\":{brief:\"The execution duration of the Lambda function invocation in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234.56,changelog:[{version:\"0.7.0\",prs:[369],description:\"Added aws.lambda.execution_duration_in_millis attribute\"}]},\"aws.lambda.function_name\":{brief:\"The name of the Lambda function\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"my-function\",deprecation:{replacement:\"faas.name\",reason:\"Use the OTel-aligned faas.name attribute instead\"},aliases:[\"faas.name\"],changelog:[{version:\"0.11.1\",prs:[414],description:\"Deprecated aws.lambda.function_name in favor of faas.name\"},{version:\"0.7.0\",prs:[369],description:\"Added aws.lambda.function_name attribute\"}]},\"aws.lambda.function_version\":{brief:\"The version of the Lambda function\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"$LATEST\",deprecation:{replacement:\"faas.version\",reason:\"Use the OTel-aligned faas.version attribute instead\"},aliases:[\"faas.version\"],changelog:[{version:\"0.11.1\",prs:[414,424],description:\"Deprecated aws.lambda.function_version in favor of faas.version\"},{version:\"0.7.0\",prs:[369],description:\"Added aws.lambda.function_version attribute\"}]},\"aws.lambda.invoked_arn\":{brief:\"The full ARN of the Lambda function that was invoked\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"arn:aws:lambda:us-east-1:123456789012:function:my-function\",aliases:[\"aws.lambda.invoked_function_arn\"],changelog:[{version:\"0.11.1\",prs:[414]}]},\"aws.lambda.invoked_function_arn\":{brief:\"The full ARN of the Lambda function that was invoked\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"arn:aws:lambda:us-east-1:123456789012:function:my-function\",deprecation:{replacement:\"aws.lambda.invoked_arn\",reason:\"This attribute is being deprecated in favor of aws.lambda.invoked_arn\"},aliases:[\"aws.lambda.invoked_arn\"],changelog:[{version:\"0.11.1\",prs:[414],description:\"Deprecated aws.lambda.invoked_function_arn in favor of aws.lambda.invoked_arn\"},{version:\"0.7.0\",prs:[369],description:\"Added aws.lambda.invoked_function_arn attribute\"}]},\"aws.lambda.remaining_time_in_millis\":{brief:\"The remaining time in milliseconds before the Lambda function times out\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:5e3,changelog:[{version:\"0.7.0\",prs:[369],description:\"Added aws.lambda.remaining_time_in_millis attribute\"}]},\"aws.log.group.names\":{brief:\"The name(s) of the AWS log group(s) an application is writing to.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:[\"/aws/lambda/my-function\",\"opentelemetry-service\"],changelog:[{version:\"0.11.1\",prs:[414]}]},\"aws.log.stream.names\":{brief:\"The name(s) of the AWS log stream(s) an application is writing to.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:[\"logs/main/10838bed-421f-43ef-870a-f43feacbbb5b\"],changelog:[{version:\"0.11.1\",prs:[414]}]},\"aws.request.extended_id\":{brief:\"The AWS extended request ID as returned in the response headers.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ=\",deprecation:{replacement:\"aws.extended_request_id\",reason:\"This attribute is being deprecated in favor of aws.extended_request_id, which is the OTel-aligned replacement.\"},aliases:[\"aws.extended_request_id\"],changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.request.extended_id attribute, deprecated in favor of aws.extended_request_id\"}]},\"aws.request_id\":{brief:\"The AWS request ID as returned in the response headers.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"79b9da39-b7ae-508a-a6bc-864b2829c622\",aliases:[\"aws.request.id\"],changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.request_id attribute\"}]},\"aws.request.id\":{brief:\"The AWS request ID as returned in the response headers.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"79b9da39-b7ae-508a-a6bc-864b2829c622\",deprecation:{replacement:\"aws.request_id\",reason:\"This attribute is being deprecated in favor of aws.request_id, which is the OTel-aligned replacement.\"},aliases:[\"aws.request_id\"],changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.request.id attribute, deprecated in favor of aws.request_id\"}]},\"aws.s3.bucket\":{brief:\"The S3 bucket name the request refers to.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"ot-demo-test\",changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.s3.bucket attribute\"}]},\"aws.secretsmanager.secret.arn\":{brief:\"The ARN of the Secret stored in Secrets Manager.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"arn:aws:secretsmanager:us-east-1:123456789012:secret:SecretName-6RandomCharacters\",changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.secretsmanager.secret.arn attribute\"}]},\"aws.sns.topic.arn\":{brief:\"The ARN of the AWS SNS Topic. An Amazon SNS topic is a logical access point that acts as a communication channel.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"arn:aws:sns:us-east-1:123456789012:mystack-mytopic-NZJ5JSMVGFIE\",changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.sns.topic.arn attribute\"}]},\"aws.step_functions.activity.arn\":{brief:\"The ARN of the AWS Step Functions Activity.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"arn:aws:states:us-east-1:123456789012:activity:get-greeting\",changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.step_functions.activity.arn attribute\"}]},\"aws.step_functions.state_machine.arn\":{brief:\"The ARN of the AWS Step Functions State Machine.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:1\",changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.step_functions.state_machine.arn attribute\"}]},blocked_main_thread:{brief:\"Whether the main thread was blocked by the span.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.0.0\"}]},\"browser.name\":{brief:\"The name of the browser.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Chrome\",aliases:[\"sentry.browser.name\"],changelog:[{version:\"0.1.0\",prs:[127,139]},{version:\"0.0.0\"}]},\"browser.performance.navigation.activation_start\":{brief:\"The time between initiating a navigation to a page and the browser activating the page\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1.983,aliases:[\"performance.activationStart\"],changelog:[{version:\"0.5.0\",prs:[321],description:\"Added browser.performance.navigation.activation_start attribute\"}]},\"browser.performance.time_origin\":{brief:\"The browser's performance.timeOrigin timestamp representing the time when the pageload was initiated\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1776185678886e-3,aliases:[\"performance.timeOrigin\"],changelog:[{version:\"0.5.0\",prs:[321],description:\"Added browser.performance.time_origin attribute attribute\"}]},\"browser.report.type\":{brief:\"A browser report sent via reporting API..\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"network-error\",changelog:[{version:\"0.1.0\",prs:[68,127]}]},\"browser.script.invoker\":{brief:\"How a script was called in the browser.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Window.requestAnimationFrame\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"browser.script.invoker_type\":{brief:\"Browser script entry point type.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"event-listener\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"browser.script.source_char_position\":{brief:\"A number representing the script character position of the script.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:678,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"browser.version\":{brief:\"The version of the browser.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"120.0.6099.130\",aliases:[\"sentry.browser.version\"],changelog:[{version:\"0.1.0\",prs:[59,127,139]}]},\"browser.web_vital.cls.report_event\":{brief:\"The event that caused the SDK to report CLS (pagehide or navigation)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"navigation\",changelog:[{version:\"0.5.0\",prs:[319],description:\"Added browser.web_vital.cls.report_event attribute\"}]},\"browser.web_vital.cls.source.\":{brief:\"The HTML elements or components responsible for the layout shift. is a numeric index from 1 to N\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"body > div#app\",aliases:[\"cls.source.\"],changelog:[{version:\"0.5.0\",prs:[234]}]},\"browser.web_vital.cls.value\":{brief:\"The value of the recorded Cumulative Layout Shift (CLS) web vital\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:.2361,aliases:[\"cls\"],changelog:[{version:\"0.5.0\",prs:[229],description:\"Added browser.web_vital.cls.value attribute\"}]},\"browser.web_vital.fcp.value\":{brief:\"The time it takes for the browser to render the first piece of meaningful content on the screen\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:547.6951,aliases:[\"fcp\"],changelog:[{version:\"0.5.0\",prs:[235]}]},\"browser.web_vital.fp.value\":{brief:\"The time in milliseconds it takes for the browser to render the first pixel on the screen\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:477.1926,aliases:[\"fp\"],changelog:[{version:\"0.5.0\",prs:[235]}]},\"browser.web_vital.inp.value\":{brief:\"The value of the recorded Interaction to Next Paint (INP) web vital\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:200,aliases:[\"inp\"],changelog:[{version:\"0.5.0\",prs:[229],description:\"Added browser.web_vital.inp.value attribute\"}]},\"browser.web_vital.lcp.element\":{brief:\"The HTML element selector or component name for which LCP was reported\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"body > div#app > div#container > div\",aliases:[\"lcp.element\"],changelog:[{version:\"0.5.0\",prs:[233]}]},\"browser.web_vital.lcp.id\":{brief:\"The id of the dom element responsible for the largest contentful paint\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"#gero\",aliases:[\"lcp.id\"],changelog:[{version:\"0.5.0\",prs:[233]}]},\"browser.web_vital.lcp.load_time\":{brief:\"The time it took for the LCP element to be loaded\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1402,aliases:[\"lcp.loadTime\"],changelog:[{version:\"0.5.0\",prs:[233]}]},\"browser.web_vital.lcp.render_time\":{brief:\"The time it took for the LCP element to be rendered\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1685,aliases:[\"lcp.renderTime\"],changelog:[{version:\"0.5.0\",prs:[233]}]},\"browser.web_vital.lcp.report_event\":{brief:\"The event that caused the SDK to report LCP (pagehide or navigation)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"pagehide\",changelog:[{version:\"0.5.0\",prs:[319],description:\"Added browser.web_vital.lcp.report_event attribute\"}]},\"browser.web_vital.lcp.size\":{brief:\"The size of the largest contentful paint element\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1024,aliases:[\"lcp.size\"],changelog:[{version:\"0.5.0\",prs:[233]}]},\"browser.web_vital.lcp.url\":{brief:\"The url of the dom element responsible for the largest contentful paint\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"https://example.com/static/img.png\",aliases:[\"lcp.url\"],changelog:[{version:\"0.5.0\",prs:[233]}]},\"browser.web_vital.lcp.value\":{brief:\"The value of the recorded Largest Contentful Paint (LCP) web vital\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2500,aliases:[\"lcp\"],changelog:[{version:\"0.5.0\",prs:[229],description:\"Added browser.web_vital.lcp.value attribute\"}]},\"browser.web_vital.ttfb.request_time\":{brief:\"The time it takes for the server to process the initial request and send the first byte of a response to the user's browser\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1554.5814,aliases:[\"ttfb.requestTime\"],changelog:[{version:\"0.5.0\",prs:[235]}]},\"browser.web_vital.ttfb.value\":{brief:\"The value of the recorded Time To First Byte (TTFB) web vital in Milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:194.3322,aliases:[\"ttfb\"],changelog:[{version:\"0.5.0\",prs:[235]}]},\"cache.hit\":{brief:\"If the cache was hit during this span.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.0.0\"}]},\"cache.item_size\":{brief:\"The size of the requested item in the cache. In bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:58,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"cache.key\":{brief:\"The key of the cache accessed.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:[\"my-cache-key\",\"my-other-cache-key\"],changelog:[{version:\"0.0.0\"}]},\"cache.operation\":{brief:\"The operation being performed on the cache.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"get\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"cache.ttl\":{brief:\"The ttl of the cache in seconds\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:120,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"cache.write\":{brief:\"If the cache operation resulted in a write to the cache.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.5.0\"}]},channel:{brief:\"The channel name that is being used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"mail\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"client.address\":{brief:\"Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"example.com\",aliases:[\"http.client_ip\"],changelog:[{version:\"0.1.0\",prs:[106,127]},{version:\"0.0.0\"}]},\"client.port\":{brief:\"Client port number.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:5432,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"cloudflare.d1.duration\":{brief:\"The duration of a Cloudflare D1 operation.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:543,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"cloudflare.d1.query_type\":{brief:\"The type of query executed in a Cloudflare D1 operation\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"run\",deprecation:{replacement:\"db.operation.name\"},aliases:[\"db.operation.name\",\"db.operation\"],changelog:[{version:\"0.11.0\",prs:[392],description:\"Added cloudflare.d1.query_type attribute\"}]},\"cloudflare.d1.rows_read\":{brief:\"The number of rows read in a Cloudflare D1 operation.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:12,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"cloudflare.d1.rows_written\":{brief:\"The number of rows written in a Cloudflare D1 operation.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:12,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"cloudflare.durable_object.query.bindings\":{brief:\"The number of bound parameters passed to the SQL exec call.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2,changelog:[{version:\"0.13.0\",prs:[435],description:\"Added cloudflare.durable_object.query.bindings attribute\"}]},\"cloudflare.durable_object.response.rows_read\":{brief:\"The number of rows read by a Cloudflare Durable Object SQL operation.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:12,changelog:[{version:\"0.13.0\",prs:[435],description:\"Added cloudflare.durable_object.response.rows_read attribute\"}]},\"cloudflare.durable_object.response.rows_written\":{brief:\"The number of rows written by a Cloudflare Durable Object SQL operation.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1,changelog:[{version:\"0.13.0\",prs:[435],description:\"Added cloudflare.durable_object.response.rows_written attribute\"}]},\"cloudflare.r2.bucket\":{brief:\"The name of the Cloudflare R2 bucket binding\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"MY_BUCKET\",changelog:[{version:\"0.11.1\",prs:[413],description:\"Added cloudflare.r2.bucket attribute\"}]},\"cloudflare.r2.operation\":{brief:\"The R2 API operation being performed\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"GetObject\",changelog:[{version:\"0.11.1\",prs:[413],description:\"Added cloudflare.r2.operation attribute\"}]},\"cloudflare.r2.request.delimiter\":{brief:\"The delimiter used to group objects in an R2 list operation\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"/\",changelog:[{version:\"0.11.1\",prs:[413],description:\"Added cloudflare.r2.request.delimiter attribute\"}]},\"cloudflare.r2.request.key\":{brief:\"The object key used in the R2 operation\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"my-file.txt\",changelog:[{version:\"0.11.1\",prs:[413],description:\"Added cloudflare.r2.request.key attribute\"}]},\"cloudflare.r2.request.part_number\":{brief:\"The part number in a multipart upload operation\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1,changelog:[{version:\"0.11.1\",prs:[413],description:\"Added cloudflare.r2.request.part_number attribute\"}]},\"cloudflare.r2.request.prefix\":{brief:\"The prefix used to filter objects in an R2 list operation\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"images/\",changelog:[{version:\"0.11.1\",prs:[413],description:\"Added cloudflare.r2.request.prefix attribute\"}]},\"cloudflare.workflow.attempt\":{brief:\"The current attempt number for a Cloudflare Workflow step\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1,changelog:[{version:\"0.11.0\",prs:[392],description:\"Added cloudflare.workflow.attempt attribute\"}]},\"cloudflare.workflow.retries.backoff\":{brief:\"The backoff strategy for Cloudflare Workflow step retries\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"exponential\",changelog:[{version:\"0.11.0\",prs:[392],description:\"Added cloudflare.workflow.retries.backoff attribute\"}]},\"cloudflare.workflow.retries.delay\":{brief:\"The delay between Cloudflare Workflow step retries\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"5 seconds\",changelog:[{version:\"0.11.0\",prs:[392],description:\"Added cloudflare.workflow.retries.delay attribute\"}]},\"cloudflare.workflow.retries.limit\":{brief:\"The maximum number of retries for a Cloudflare Workflow step\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:3,changelog:[{version:\"0.11.0\",prs:[392],description:\"Added cloudflare.workflow.retries.limit attribute\"}]},\"cloudflare.workflow.timeout\":{brief:\"The timeout duration for a Cloudflare Workflow step\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1 minute\",changelog:[{version:\"0.11.0\",prs:[392],description:\"Added cloudflare.workflow.timeout attribute\"}]},\"cloud.account.id\":{brief:\"The cloud account ID the resource is assigned to\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"123456789012\",changelog:[{version:\"0.7.0\",prs:[364],description:\"Added cloud.account.id attribute\"}]},\"cloud.availability_zone\":{brief:\"Cloud regions often have multiple, isolated locations known as zones to increase availability\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"us-east-1c\",changelog:[{version:\"0.7.0\",prs:[364],description:\"Added cloud.availability_zone attribute\"}]},\"cloud.platform\":{brief:\"The cloud platform in use\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"aws_lambda\",changelog:[{version:\"0.7.0\",prs:[364],description:\"Added cloud.platform attribute\"}]},\"cloud.provider\":{brief:\"Name of the cloud provider\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"aws\",changelog:[{version:\"0.7.0\",prs:[364],description:\"Added cloud.provider attribute\"}]},\"cloud.region\":{brief:\"The geographical region the resource is running\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"us-east-1\",changelog:[{version:\"0.7.0\",prs:[364],description:\"Added cloud.region attribute\"}]},\"cloud.resource_id\":{brief:\"Cloud provider-specific native identifier of the monitored cloud resource\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function\",aliases:[\"faas.id\"],changelog:[{version:\"0.16.0\",prs:[475],description:\"Added faas.id as an alias\"},{version:\"0.11.1\",prs:[414]}],additionalContext:[\"This can be an identifier for a resource in AWS, GCP, or Azure. There may be some overlap in values found here with other attributes. For instance, an AWS lambda ARN may be found here as well as in `aws.lambda.invoked_arn`. OTEL recommends setting them alongside each other.\"]},cls:{brief:\"The value of the recorded Cumulative Layout Shift (CLS) web vital\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:.2361,deprecation:{replacement:\"browser.web_vital.cls.value\",reason:\"The CLS web vital is now recorded as a browser.web_vital.cls.value attribute.\"},aliases:[\"browser.web_vital.cls.value\"],changelog:[{version:\"0.5.0\",prs:[229],description:\"Added and deprecated attribute to document JS SDK's current behaviour\"}]},\"cls.source.\":{brief:\"The HTML elements or components responsible for the layout shift. is a numeric index from 1 to N\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"body > div#app\",deprecation:{replacement:\"browser.web_vital.cls.source.\",reason:\"The CLS source is now recorded as a browser.web_vital.cls.source. attribute.\"},aliases:[\"browser.web_vital.cls.source.\"],changelog:[{version:\"0.5.0\",prs:[234]}]},\"code.filepath\":{brief:\"The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"/app/myapplication/http/handler/server.py\",deprecation:{replacement:\"code.file.path\"},aliases:[\"code.file.path\"],changelog:[{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"code.file.path\":{brief:\"The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"/app/myapplication/http/handler/server.py\",aliases:[\"code.filepath\"],changelog:[{version:\"0.0.0\"}]},\"code.function\":{brief:\"The method or function name, or equivalent (usually rightmost part of the code unit's name).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"server_request\",aliases:[\"code.function.name\"],changelog:[{version:\"0.1.0\",prs:[61,74]},{version:\"0.0.0\"}]},\"code.function.name\":{brief:\"The method or function fully-qualified name without arguments.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"server_request\",aliases:[\"code.function\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"code.lineno\":{brief:\"The line number in code.filepath best representing the operation. It SHOULD point within the code unit named in code.function\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:42,deprecation:{replacement:\"code.line.number\"},aliases:[\"code.line.number\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61,108]},{version:\"0.0.0\"}]},\"code.line.number\":{brief:\"The line number in code.filepath best representing the operation. It SHOULD point within the code unit named in code.function\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:42,aliases:[\"code.lineno\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"code.namespace\":{brief:\"The 'namespace' within which code.function is defined. Usually the qualified class or module name, such that code.namespace + some separator + code.function form a unique identifier for the code unit.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"http.handler\",changelog:[{version:\"0.1.0\",prs:[61,74]},{version:\"0.0.0\"}]},connectionType:{brief:\"Specifies the type of the current connection (e.g. wifi, ethernet, cellular , etc).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"wifi\",deprecation:{replacement:\"network.connection.type\",reason:\"Old namespace-less attribute, to be replaced with network.connection.type for span-first future\"},aliases:[\"network.connection.type\",\"device.connection_type\"],changelog:[{version:\"0.5.0\",prs:[279],description:\"Added and deprecated attribute to document JS SDK's current behaviour\"}]},\"connection.rtt\":{brief:\"Specifies the estimated effective round-trip time of the current connection, in milliseconds.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:100,deprecation:{replacement:\"network.connection.rtt\",reason:\"Old attribute name (no official namespace), to be replaced with network.connection.rtt for span-first future\"},aliases:[\"network.connection.rtt\"],changelog:[{version:\"0.5.0\",prs:[279],description:\"Added and deprecated attribute to document JS SDK's current behaviour\"}]},\"culture.calendar\":{brief:\"The calendar system used by the culture.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"GregorianCalendar\",changelog:[{version:\"0.4.0\",prs:[243]}]},\"culture.display_name\":{brief:\"Human readable name of the culture.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"English (United States)\",changelog:[{version:\"0.4.0\",prs:[243]}]},\"culture.is_24_hour_format\":{brief:\"Whether the culture uses 24-hour time format.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.4.0\",prs:[243]}]},\"culture.locale\":{brief:\"The locale identifier following RFC 4646.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"en-US\",changelog:[{version:\"0.4.0\",prs:[243]}]},\"culture.timezone\":{brief:\"The timezone of the culture, as a geographic timezone identifier.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Europe/Vienna\",changelog:[{version:\"0.4.0\",prs:[243]}]},\"db.collection.name\":{brief:\"The name of a collection (table, container) within the database.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"users\",changelog:[{version:\"0.1.0\",prs:[106,127]},{version:\"0.0.0\"}]},\"db.driver.name\":{brief:\"The name of the driver used for the database connection.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"psycopg2\",changelog:[{version:\"0.5.0\",prs:[297],description:\"Added db.driver.name attribute\"}]},\"db.name\":{brief:\"The name of the database being accessed.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"customers\",deprecation:{replacement:\"db.namespace\"},aliases:[\"db.namespace\"],changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"db.namespace\":{brief:\"The name of the database being accessed.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"customers\",aliases:[\"db.name\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"db.operation\":{brief:\"The name of the operation being executed.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"SELECT\",deprecation:{replacement:\"db.operation.name\"},aliases:[\"db.operation.name\",\"cloudflare.d1.query_type\"],changelog:[{version:\"0.4.0\",prs:[199]},{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"db.operation.batch.size\":{brief:\"The number of queries included in a batch operation. Operations are only considered batches when they contain two or more operations, and so db.operation.batch.size SHOULD never be 1.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:3,changelog:[{version:\"0.11.0\",prs:[407],description:\"Added db.operation.batch.size attribute\"}]},\"db.operation.name\":{brief:\"The name of the operation being executed.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"SELECT\",aliases:[\"db.operation\",\"cloudflare.d1.query_type\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"db.query.parameter.\":{brief:\"A query parameter used in db.query.text, with being the parameter name, and the attribute value being a string representation of the parameter value.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",hasDynamicSuffix:!0,example:\"db.query.parameter.foo='123'\",changelog:[{version:\"0.1.0\",prs:[103,127]}]},\"db.query.summary\":{brief:\"A shortened representation of operation(s) in the full query. This attribute must be low-cardinality and should only contain the operation table names.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"SELECT users\",changelog:[{version:\"0.4.0\",prs:[208]},{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"db.query.text\":{brief:\"The database parameterized query being executed. Any parameter values (filters, insertion values, etc) should be replaced with parameter placeholders. If applicable, use `db.query.parameter.` to add the parameter value.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"SELECT * FROM users WHERE id = $1\",aliases:[\"db.statement\"],changelog:[{version:\"0.4.0\",prs:[208]},{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"db.redis.connection\":{brief:\"The redis connection name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"my-redis-instance\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"db.redis.key\":{brief:\"The key the Redis command is operating on.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"user:2047:city\",changelog:[{version:\"0.6.0\",prs:[326],description:\"Added db.redis.key attribute\"}]},\"db.redis.parameters\":{brief:\"The array of command parameters given to a redis command.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:[\"test\",\"*\"],changelog:[{version:\"0.0.0\"}]},\"db.response.status_code\":{brief:\"Database response status code. The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"ORA-17002\",changelog:[{version:\"0.16.0\",prs:[462],description:\"Added db.response.status_code attribute\"}]},\"db.sql.bindings\":{brief:\"The array of query bindings.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:[\"1\",\"foo\"],deprecation:{replacement:\"db.query.parameter.\",reason:\"Instead of adding every binding in the db.sql.bindings attribute, add them as individual entires with db.query.parameter..\"},changelog:[{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"db.statement\":{brief:\"The database statement being executed.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"SELECT * FROM users\",deprecation:{replacement:\"db.query.text\"},aliases:[\"db.query.text\"],changelog:[{version:\"0.4.0\",prs:[199]},{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"db.stored_procedure.name\":{brief:\"The name of a stored procedure being called.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"GetUserById\",changelog:[{version:\"0.11.0\",prs:[398]}]},\"db.system\":{brief:\"An identifier for the database management system (DBMS) product being used. See [OpenTelemetry docs](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md#notes-and-well-known-identifiers-for-dbsystem) for a list of well-known identifiers.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"postgresql\",deprecation:{replacement:\"db.system.name\"},aliases:[\"db.system.name\"],changelog:[{version:\"0.4.0\",prs:[199,224]},{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"db.system.name\":{brief:\"An identifier for the database management system (DBMS) product being used. See [OpenTelemetry docs](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md#notes-and-well-known-identifiers-for-dbsystem) for a list of well-known identifiers.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"postgresql\",aliases:[\"db.system\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"db.user\":{brief:\"The database user.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"fancy_user\",changelog:[{version:\"0.0.0\"}]},deviceMemory:{brief:\"The estimated total memory capacity of the device, only a rough estimation in gigabytes.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"8 GB\",deprecation:{replacement:\"device.memory.estimated_capacity\",reason:\"Old namespace-less attribute, to be replaced with device.memory.estimated_capacity for span-first future\"},aliases:[\"device.memory.estimated_capacity\"],changelog:[{version:\"0.5.0\",prs:[281],description:\"Added and deprecated attribute to document JS SDK's current behaviour\"}]},\"device.archs\":{brief:\"The CPU architectures of the device.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:[\"arm64-v8a\",\"armeabi-v7a\",\"armeabi\"],changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.archs attribute\"}]},\"device.battery_level\":{brief:\"The battery level of the device as a percentage (0-100).\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:100,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.battery_level attribute\"}]},\"device.battery_temperature\":{brief:\"The battery temperature of the device in Celsius.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:25,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.battery_temperature attribute\"}]},\"device.boot_time\":{brief:\"A formatted UTC timestamp when the system was booted.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"2018-02-08T12:52:12Z\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.boot_time attribute\"}]},\"device.brand\":{brief:\"The brand of the device.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Apple\",changelog:[{version:\"0.1.0\",prs:[116,127]}]},\"device.charging\":{brief:\"Whether the device was charging or not.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!1,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.charging attribute\"}]},\"device.chipset\":{brief:\"The chipset of the device.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Qualcomm SM8550\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.chipset attribute\"}]},\"device.class\":{brief:\"The classification of the device. For example, `low`, `medium`, or `high`. Typically inferred by Relay - SDKs generally do not need to set this directly.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"medium\",changelog:[{version:\"0.5.0\",prs:[300],description:\"Added device.class attribute\"}]},\"device.connection_type\":{brief:\"The internet connection type currently being used by the device.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"wifi\",deprecation:{replacement:\"network.connection.type\",reason:\"This attribute is being deprecated in favor of network.connection.type\"},aliases:[\"network.connection.type\",\"connectionType\"],changelog:[{version:\"0.5.0\",prs:[303],description:\"Added and deprecated device.connection_type in favor of network.connection.type\"}]},\"device.cpu_description\":{brief:\"A description of the CPU of the device.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.cpu_description attribute\"}]},\"device.external_free_storage\":{brief:\"External storage free size in bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:67108864e3,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.external_free_storage attribute\"}]},\"device.external_storage_size\":{brief:\"External storage total size in bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:134217728e3,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.external_storage_size attribute\"}]},\"device.family\":{brief:\"The family of the device.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"iPhone\",changelog:[{version:\"0.1.0\",prs:[116,127]}]},\"device.free_memory\":{brief:\"Free system memory in bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2147483648,changelog:[{version:\"0.5.0\",prs:[300],description:\"Added device.free_memory attribute\"}]},\"device.free_storage\":{brief:\"Free device storage in bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:107374182400,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.free_storage attribute\"}]},\"device.id\":{brief:\"Unique device identifier.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.id attribute\"}]},\"device.locale\":{brief:\"The locale of the device.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"en-US\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.locale attribute\"}]},\"device.low_memory\":{brief:\"Whether the device was low on memory.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!1,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.low_memory attribute\"}]},\"device.low_power_mode\":{brief:\"Whether the device is in Low Power Mode.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.6.0\",prs:[314],description:\"Added device.low_power_mode attribute\"}]},\"device.manufacturer\":{brief:\"The manufacturer of the device.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Google\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.manufacturer attribute\"}]},\"device.memory.estimated_capacity\":{brief:\"The estimated total memory capacity of the device, only a rough estimation in gigabytes. Browsers report estimations in buckets of powers of 2, mostly capped at 8 GB\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:8,aliases:[\"deviceMemory\"],changelog:[{version:\"0.5.0\",prs:[281],description:\"Added attribute device.memory.estimated_capacity to be used instead of deviceMemory\"}]},\"device.memory_size\":{brief:\"Total system memory available in bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:17179869184,changelog:[{version:\"0.5.0\",prs:[300],description:\"Added device.memory_size attribute\"}]},\"device.model\":{brief:\"The model of the device.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"iPhone 15 Pro Max\",changelog:[{version:\"0.1.0\",prs:[116,127]}]},\"device.model_id\":{brief:\"An internal hardware revision to identify the device exactly.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"N861AP\",changelog:[{version:\"0.5.0\",prs:[300],description:\"Added device.model_id attribute\"}]},\"device.name\":{brief:\"The name of the device. On mobile, this is the user-assigned device name. On servers and desktops, this is typically the hostname.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"localhost\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.name attribute\"}]},\"device.online\":{brief:\"Whether the device was online or not.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.online attribute\"}]},\"device.orientation\":{brief:'The orientation of the device, either \"portrait\" or \"landscape\".',type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"portrait\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.orientation attribute\"}]},\"device.processor_count\":{brief:'Number of \"logical processors\".',type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:8,aliases:[\"hardwareConcurrency\"],changelog:[{version:\"0.5.0\",prs:[300],description:\"Added and deprecated attribute device.processor_count in favor of device.cpu.logical_core_count\"}]},\"device.processor_frequency\":{brief:\"Processor frequency in MHz.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2400,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.processor_frequency attribute\"}]},\"device.screen_density\":{brief:\"The screen density of the device.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2.625,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.screen_density attribute\"}]},\"device.screen_dpi\":{brief:\"The screen density in dots-per-inch (DPI) of the device.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:420,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.screen_dpi attribute\"}]},\"device.screen_height_pixels\":{brief:\"The height of the device screen in pixels.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2400,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.screen_height_pixels attribute\"}]},\"device.screen_width_pixels\":{brief:\"The width of the device screen in pixels.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1080,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.screen_width_pixels attribute\"}]},\"device.simulator\":{brief:\"Whether the device is a simulator or an actual device.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!1,changelog:[{version:\"0.5.0\",prs:[300],description:\"Added device.simulator attribute\"}]},\"device.storage_size\":{brief:\"Total device storage in bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:274877906944,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.storage_size attribute\"}]},\"device.thermal_state\":{brief:\"The thermal state of the device. Based on Apple's `ProcessInfo.ThermalState` enum: `nominal`, `fair`, `serious`, or `critical`.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"nominal\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.thermal_state attribute\"}]},\"device.timezone\":{brief:\"The timezone of the device.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Europe/Vienna\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.timezone attribute\"}]},\"device.usable_memory\":{brief:\"Memory usable for the app in bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2147483648,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.usable_memory attribute\"}]},dist:{brief:\"The sentry dist.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"1.0\",deprecation:{replacement:\"sentry.dist\",reason:\"This attribute is being deprecated in favor of sentry.dist.\"},aliases:[\"sentry.dist\"],changelog:[{version:\"0.16.0\",prs:[489],description:\"Added dist attribute\"}]},effectiveConnectionType:{brief:\"Specifies the estimated effective type of the current connection (e.g. slow-2g, 2g, 3g, 4g).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"4g\",deprecation:{replacement:\"network.connection.effective_type\",reason:\"Old namespace-less attribute, to be replaced with network.connection.effective_type for span-first future\"},aliases:[\"network.connection.effective_type\"],changelog:[{version:\"0.5.0\",prs:[279],description:\"Added and deprecated attribute to document JS SDK's current behaviour\"}]},environment:{brief:\"The sentry environment.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"production\",deprecation:{replacement:\"sentry.environment\"},aliases:[\"sentry.environment\"],changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"error.type\":{brief:\"Describes a class of error the operation ended with.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"timeout\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"event.id\":{brief:\"The unique identifier for this event (log record)\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234567890,changelog:[{version:\"0.1.0\",prs:[101]}]},\"event.name\":{brief:\"The name that uniquely identifies this event (log record)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Process Payload\",changelog:[{version:\"0.1.0\",prs:[101,127]}]},\"exception.escaped\":{brief:\"SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:!0,changelog:[{version:\"0.0.0\"}]},\"exception.message\":{brief:\"The error message.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"ENOENT: no such file or directory\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"exception.stacktrace\":{brief:\"A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:`Exception in thread \"main\" java.lang.RuntimeException: Test exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)`,changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"exception.type\":{brief:\"The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"OSError\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"faas.coldstart\":{brief:\"A boolean that is true if the serverless function is executed for the first time (aka cold-start).\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:!0,changelog:[{version:\"0.0.0\"}]},\"faas.cron\":{brief:\"A string containing the schedule period as Cron Expression.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"0/5 * * * ? *\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"faas.duration_in_ms\":{brief:\"The duration a function took to run, in milliseconds.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:120,changelog:[{version:\"0.11.0\",prs:[403]}]},\"faas.entry_point\":{brief:\"The code that's run when the cloud provider invokes your function.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"my_main_function\",changelog:[{version:\"0.11.0\",prs:[403,415]}]},\"faas.execution\":{brief:\"The execution ID of the current function execution.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"af9d5aa4-a685-4c5f-a22b-444f80b3cc28\",deprecation:{replacement:\"faas.invocation_id\",reason:\"This attribute is being deprecated in favor of faas.invocation_id, which is the OTel-aligned replacement.\"},aliases:[\"faas.invocation_id\",\"aws.lambda.aws_request_id\"],changelog:[{version:\"0.16.0\",prs:[473],description:\"Added faas.execution attribute, deprecated in favor of faas.invocation_id\"}]},\"faas.id\":{brief:\"The unique ID of the single function that this runtime instance executes.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function\",deprecation:{replacement:\"cloud.resource_id\",reason:\"This attribute is being deprecated in favor of cloud.resource_id, which is the OTel-aligned replacement (renamed in OTel semantic conventions v1.19.0).\"},aliases:[\"cloud.resource_id\"],changelog:[{version:\"0.16.0\",prs:[475],description:\"Added faas.id attribute, deprecated in favor of cloud.resource_id\"}]},\"faas.identity\":{brief:\"The Service Account (GCP), IAM Execution Role (AWS), or Managed Identity (Azure) used by the serverless function when interacting with other cloud services\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"name@project.iam.gserviceaccount.com (GCP), arn:aws:iam::123456789012:role/role-name (AWS), 00000000-0000-0000-0000-000000000000 (Azure)\",changelog:[{version:\"0.11.0\",prs:[403]}]},\"faas.invocation_id\":{brief:\"The invocation ID of the current function invocation.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"af9d5aa4-a685-4c5f-a22b-444f80b3cc28\",aliases:[\"aws.lambda.aws_request_id\",\"faas.execution\"],changelog:[{version:\"0.16.0\",prs:[473],description:\"Added faas.execution as an alias\"},{version:\"0.11.1\",prs:[414,424]}]},\"faas.invoked_name\":{brief:\"The name of the invoked function.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"my-function\",changelog:[{version:\"0.16.0\",prs:[481],description:\"Added faas.invoked_name attribute\"}]},\"faas.invoked_provider\":{brief:\"The cloud provider of the invoked function.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"aws\",changelog:[{version:\"0.16.0\",prs:[481],description:\"Added faas.invoked_provider attribute\"}]},\"faas.invoked_region\":{brief:\"The cloud region of the invoked function.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"eu-central-1\",changelog:[{version:\"0.16.0\",prs:[481],description:\"Added faas.invoked_region attribute\"}]},\"faas.name\":{brief:\"The name of the serverless function\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"my_function\",aliases:[\"aws.lambda.function_name\"],changelog:[{version:\"0.11.0\",prs:[403,415]}]},\"faas.time\":{brief:\"A string containing the function invocation time in the ISO 8601 format expressed in UTC.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"2020-01-23T13:47:06Z\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"faas.trigger\":{brief:\"Type of the trigger which caused this function invocation.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"timer\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"faas.version\":{brief:\"The version of the function that was invoked\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"$LATEST\",aliases:[\"aws.lambda.function_version\"],changelog:[{version:\"0.11.1\",prs:[414,424]}]},fcp:{brief:\"The time it takes for the browser to render the first piece of meaningful content on the screen\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:547.6951,deprecation:{replacement:\"browser.web_vital.fcp.value\",reason:\"This attribute is being deprecated in favor of browser.web_vital.fcp.value\"},aliases:[\"browser.web_vital.fcp.value\"],changelog:[{version:\"0.5.0\",prs:[235]}]},\"flag.evaluation.\":{brief:\"An instance of a feature flag evaluation. The value of this attribute is the boolean representing the evaluation result. The suffix is the name of the feature flag.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"flag.evaluation.is_new_ui=true\",changelog:[{version:\"0.1.0\",prs:[103]}]},fp:{brief:\"The time it takes for the browser to render the first pixel on the screen\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:477.1926,deprecation:{replacement:\"browser.web_vital.fp.value\",reason:\"This attribute is being deprecated in favor of browser.web_vital.fp.value\"},aliases:[\"browser.web_vital.fp.value\"],changelog:[{version:\"0.5.0\",prs:[235]}]},\"frames.delay\":{brief:\"The sum of all delayed frame durations in seconds during the lifetime of the span. For more information see [frames delay](https://develop.sentry.dev/sdk/performance/frames-delay/).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:5,deprecation:{replacement:\"app.vitals.frames.delay.value\",reason:\"Replaced by app.vitals.frames.delay.value to align with the app.vitals.* namespace for mobile performance attributes\"},aliases:[\"app.vitals.frames.delay.value\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Deprecated in favor of app.vitals.frames.delay.value\"},{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"frames.frozen\":{brief:\"The number of frozen frames rendered during the lifetime of the span.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:3,deprecation:{replacement:\"app.vitals.frames.frozen.count\",reason:\"Replaced by app.vitals.frames.frozen.count to align with the app.vitals.* namespace for mobile performance attributes\"},aliases:[\"app.vitals.frames.frozen.count\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Deprecated in favor of app.vitals.frames.frozen.count\"},{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},frames_frozen_rate:{brief:\"The rate of frozen frames, or `app_vitals.frames.frozen.count` divided by `app_vitals.frames.total.count`. This is computed by Relay.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",changelog:[{version:\"0.7.0\",prs:[362],description:\"Added frames_frozen_rate attribute\"}]},\"frames.slow\":{brief:\"The number of slow frames rendered during the lifetime of the span.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1,deprecation:{replacement:\"app.vitals.frames.slow.count\",reason:\"Replaced by app.vitals.frames.slow.count to align with the app.vitals.* namespace for mobile performance attributes\"},aliases:[\"app.vitals.frames.slow.count\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Deprecated in favor of app.vitals.frames.slow.count\"},{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},frames_slow_rate:{brief:\"The rate of slow frames, or `app_vitals.frames.slow.count` divided by `app_vitals.frames.total.count`. This is computed by Relay.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",changelog:[{version:\"0.7.0\",prs:[362],description:\"Added frames_slow_rate attribute\"}]},\"frames.total\":{brief:\"The number of total frames rendered during the lifetime of the span.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:60,deprecation:{replacement:\"app.vitals.frames.total.count\",reason:\"Replaced by app.vitals.frames.total.count to align with the app.vitals.* namespace for mobile performance attributes\"},aliases:[\"app.vitals.frames.total.count\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Deprecated in favor of app.vitals.frames.total.count\"},{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},fs_error:{brief:\"The error message of a file system error.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"ENOENT: no such file or directory\",deprecation:{replacement:\"error.type\",reason:\"This attribute is not part of the OpenTelemetry specification and error.type fits much better.\"},changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"gcp.function.context.event_id\":{brief:\"The event ID from the legacy GCP Cloud Function context (1st gen)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1234567890\",changelog:[{version:\"0.7.0\",prs:[371],description:\"Added gcp.function.context.event_id attribute\"}]},\"gcp.function.context.event_type\":{brief:\"The type of the GCP Cloud Function event\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"google.pubsub.topic.publish\",changelog:[{version:\"0.7.0\",prs:[371],description:\"Added gcp.function.context.event_type attribute\"}]},\"gcp.function.context.id\":{brief:\"The unique event ID from the GCP CloudEvents context (2nd gen Cloud Functions)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1234567890\",changelog:[{version:\"0.7.0\",prs:[371],description:\"Added gcp.function.context.id attribute\"}]},\"gcp.function.context.resource\":{brief:\"The resource that triggered the GCP Cloud Function event\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"projects/my-project/topics/my-topic\",changelog:[{version:\"0.7.0\",prs:[371],description:\"Added gcp.function.context.resource attribute\"}]},\"gcp.function.context.source\":{brief:\"The source of the GCP Cloud Function event\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"//pubsub.googleapis.com/projects/my-project/topics/my-topic\",changelog:[{version:\"0.7.0\",prs:[371],description:\"Added gcp.function.context.source attribute\"}]},\"gcp.function.context.specversion\":{brief:\"The CloudEvents specification version of the GCP Cloud Function event\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1.0\",changelog:[{version:\"0.7.0\",prs:[371],description:\"Added gcp.function.context.specversion attribute\"}]},\"gcp.function.context.time\":{brief:\"The timestamp of the GCP Cloud Function event\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"2024-01-01T00:00:00.000Z\",changelog:[{version:\"0.7.0\",prs:[371],description:\"Added gcp.function.context.time attribute\"}]},\"gcp.function.context.timestamp\":{brief:\"The legacy timestamp of the GCP Cloud Function event\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"2024-01-01T00:00:00.000Z\",changelog:[{version:\"0.7.0\",prs:[371],description:\"Added gcp.function.context.timestamp attribute\"}]},\"gcp.function.context.type\":{brief:\"The type of the GCP Cloud Function event context\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"cloud_functions.context\",changelog:[{version:\"0.7.0\",prs:[371],description:\"Added gcp.function.context.type attribute\"}]},\"gcp.project.id\":{brief:\"The ID of the project in GCP that this resource is associated with\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"my-project-123\",changelog:[{version:\"0.11.0\",prs:[403]}]},\"gen_ai.agent.name\":{brief:\"The name of the agent being used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"ResearchAssistant\",changelog:[{version:\"0.1.0\",prs:[62,127]}]},\"gen_ai.context.utilization\":{brief:\"The fraction of the model context window utilized by this generation.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:.75,changelog:[{version:\"0.5.0\",prs:[315],description:\"Added gen_ai.context.utilization attribute\"}]},\"gen_ai.context.window_size\":{brief:\"The maximum context window size supported by the model for this generation.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:128e3,changelog:[{version:\"0.5.0\",prs:[315],description:\"Added gen_ai.context.window_size attribute\"}]},\"gen_ai.conversation.id\":{brief:\"The unique identifier for a conversation (session, thread), used to store and correlate messages within this conversation.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"conv_5j66UpCpwteGg4YSxUnt7lPY\",changelog:[{version:\"0.4.0\",prs:[250]}]},\"gen_ai.cost.cache_creation.input_tokens\":{brief:\"The cost of input tokens written to cache in USD.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:12.34,changelog:[{version:\"0.16.0\",description:\"Added gen_ai.cost.cache_creation.input_tokens attribute\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to calculate total cost, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"Despite the name 'cost.cache_creation.input_tokens', this value is cost in USD, not a token count. For token counts, use gen_ai.usage.cache_creation.input_tokens.\",\"This is a subset of gen_ai.cost.input_tokens, not an independent cost. Do not sum this with gen_ai.cost.input_tokens \\u2014 it is already included.\"]},\"gen_ai.cost.cache_read.input_tokens\":{brief:\"The cost of cached input tokens in USD.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:12.34,changelog:[{version:\"0.16.0\",description:\"Added gen_ai.cost.cache_read.input_tokens attribute\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to calculate total cost, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"Despite the name 'cost.cache_read.input_tokens', this value is cost in USD, not a token count. For token counts, use gen_ai.usage.cache_read.input_tokens.\",\"This is a subset of gen_ai.cost.input_tokens, not an independent cost. Do not sum this with gen_ai.cost.input_tokens \\u2014 it is already included.\"]},\"gen_ai.cost.input_tokens\":{brief:\"The total cost of all input tokens in USD (includes cached and cache creation tokens).\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:123.45,changelog:[{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[112]}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to calculate total cost, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"Despite the name 'cost.input_tokens', this value is cost in USD, not a token count. For token counts, use gen_ai.usage.input_tokens.\",\"This is the total cost of all input tokens, including cached and cache creation tokens at their respective rates. For the cached portion, see gen_ai.cost.cache_read.input_tokens. For the cache creation portion, see gen_ai.cost.cache_creation.input_tokens.\"]},\"gen_ai.cost.output_tokens\":{brief:\"The total cost of all output tokens in USD (includes reasoning tokens).\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:123.45,changelog:[{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[112]}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to calculate total cost, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"Despite the name 'cost.output_tokens', this value is cost in USD, not a token count. For token counts, use gen_ai.usage.output_tokens.\",\"This is the total cost of all output tokens, including reasoning tokens at their respective rate. For the reasoning portion, see gen_ai.cost.reasoning.output_tokens.\"]},\"gen_ai.cost.reasoning.output_tokens\":{brief:\"The cost of reasoning output tokens in USD.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:12.34,changelog:[{version:\"0.16.0\",description:\"Added gen_ai.cost.reasoning.output_tokens attribute\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to calculate total cost, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"Despite the name 'cost.reasoning.output_tokens', this value is cost in USD, not a token count. For token counts, use gen_ai.usage.reasoning.output_tokens.\",\"This is a subset of gen_ai.cost.output_tokens, not an independent cost. Do not sum this with gen_ai.cost.output_tokens \\u2014 it is already included.\"]},\"gen_ai.cost.total_tokens\":{brief:\"The total cost for the tokens used.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:12.34,aliases:[\"ai.total_cost\"],changelog:[{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.5.0\",prs:[264]},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[126]}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to calculate total cost, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"Despite the name 'cost.total_tokens', this value is cost in USD, not a token count. For token counts, use gen_ai.usage.total_tokens.\"]},\"gen_ai.embeddings.input\":{brief:\"The input to the embeddings model.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"What's the weather in Paris?\",changelog:[{version:\"0.3.1\",prs:[195]}]},\"gen_ai.function_id\":{brief:\"Framework-specific tracing label for the execution of a function or other unit of execution in a generative AI system.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"my-awesome-function\",changelog:[{version:\"0.5.0\",prs:[308],description:\"Added gen_ai.function_id attribute\"}]},\"gen_ai.input.messages\":{brief:'The messages passed to the model. It has to be a stringified version of an array of objects. The `role` attribute of each object must be `\"user\"`, `\"assistant\"`, `\"tool\"`, or `\"system\"`. For messages of the role `\"tool\"`, the `content` can be a string or an arbitrary object with information about the tool call. For other messages the `content` can be either a string or a list of objects in the format `{type: \"text\", text:\"...\"}`.',type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:'[{\"role\": \"user\", \"parts\": [{\"type\": \"text\", \"content\": \"Weather in Paris?\"}]}, {\"role\": \"assistant\", \"parts\": [{\"type\": \"tool_call\", \"id\": \"call_VSPygqKTWdrhaFErNvMV18Yl\", \"name\": \"get_weather\", \"arguments\": {\"location\": \"Paris\"}}]}, {\"role\": \"tool\", \"parts\": [{\"type\": \"tool_call_response\", \"id\": \"call_VSPygqKTWdrhaFErNvMV18Yl\", \"result\": \"rainy, 57\\xB0F\"}]}]',aliases:[\"ai.texts\"],changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.4.0\",prs:[221]}]},\"gen_ai.operation.name\":{brief:\"The name of the operation being performed. It has the following list of well-known values: 'chat', 'create_agent', 'embeddings', 'execute_tool', 'generate_content', 'invoke_agent', 'text_completion'. If one of them applies, then that value MUST be used. Otherwise a custom value MAY be used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"chat\",changelog:[{version:\"0.4.0\",prs:[225]},{version:\"0.1.0\",prs:[62,127]}]},\"gen_ai.operation.type\":{brief:\"The type of AI operation. Must be one of 'agent' (invoke_agent and create_agent spans), 'ai_client' (any LLM call), 'tool' (execute_tool spans), 'handoff' (handoff spans), 'other' (input and output processors, skill loading, guardrails etc.) . Added during ingestion based on span.op and gen_ai.operation.type. Used to filter and aggregate data in the UI\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"tool\",changelog:[{version:\"0.4.0\",prs:[257]},{version:\"0.1.0\",prs:[113,127]}]},\"gen_ai.output.messages\":{brief:\"The model's response messages. It has to be a stringified version of an array of message objects, which can include text responses and tool calls.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:'[{\"role\": \"assistant\", \"parts\": [{\"type\": \"text\", \"content\": \"The weather in Paris is currently rainy with a temperature of 57\\xB0F.\"}], \"finish_reason\": \"stop\"}]',changelog:[{version:\"0.4.0\",prs:[221]}]},\"gen_ai.pipeline.name\":{brief:\"Name of the AI pipeline or chain being executed.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Autofix Pipeline\",aliases:[\"ai.pipeline.name\"],changelog:[{version:\"0.1.0\",prs:[76,127]}]},\"gen_ai.prompt\":{brief:\"The input messages sent to the model\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:'[{\"role\": \"user\", \"message\": \"hello\"}]',deprecation:{reason:\"Deprecated from OTEL, use gen_ai.input.messages with the new format instead.\"},changelog:[{version:\"0.1.0\",prs:[74,108,119]},{version:\"0.0.0\"}]},\"gen_ai.prompt.name\":{brief:\"The name of the prompt that uniquely identifies it.\",type:\"string\",applyScrubbing:{key:\"manual\",reason:\"Prompt names may reveal user behavior patterns or sensitive operations\"},isInOtel:!0,visibility:\"public\",example:\"summarize_text\",aliases:[\"mcp.prompt.name\"],changelog:[{version:\"0.12.0\",prs:[420],description:\"Added gen_ai.prompt.name attribute\"}]},\"gen_ai.provider.name\":{brief:\"The Generative AI provider as identified by the client or server instrumentation.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"openai\",aliases:[\"ai.model.provider\",\"gen_ai.system\"],changelog:[{version:\"0.4.0\",prs:[253]}]},\"gen_ai.request.available_tools\":{brief:\"The available tools for the model. It has to be a stringified version of an array of objects.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:'[{\"name\": \"get_weather\", \"description\": \"Get the weather for a given location\"}, {\"name\": \"get_news\", \"description\": \"Get the news for a given topic\"}]',deprecation:{replacement:\"gen_ai.tool.definitions\"},changelog:[{version:\"0.4.0\",prs:[221]},{version:\"0.1.0\",prs:[63,127]}]},\"gen_ai.request.frequency_penalty\":{brief:\"Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:.5,aliases:[\"ai.frequency_penalty\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[57]}]},\"gen_ai.request.max_tokens\":{brief:\"The maximum number of tokens to generate in the response.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:2048,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[62]}]},\"gen_ai.request.messages\":{brief:'The messages passed to the model. It has to be a stringified version of an array of objects. The `role` attribute of each object must be `\"user\"`, `\"assistant\"`, `\"tool\"`, or `\"system\"`. For messages of the role `\"tool\"`, the `content` can be a string or an arbitrary object with information about the tool call. For other messages the `content` can be either a string or a list of objects in the format `{type: \"text\", text:\"...\"}`.',type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:'[{\"role\": \"system\", \"content\": \"Generate a random number.\"}, {\"role\": \"user\", \"content\": [{\"text\": \"Generate a random number between 0 and 10.\", \"type\": \"text\"}]}, {\"role\": \"tool\", \"content\": {\"toolCallId\": \"1\", \"toolName\": \"Weather\", \"output\": \"rainy\"}}]',deprecation:{replacement:\"gen_ai.input.messages\"},aliases:[\"ai.input_messages\"],changelog:[{version:\"0.4.0\",prs:[221]},{version:\"0.1.0\",prs:[63,74,108,119,122]}]},\"gen_ai.request.model\":{brief:\"The model identifier being used for the request.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"gpt-4-turbo-preview\",changelog:[{version:\"0.1.0\",prs:[62,127]}]},\"gen_ai.request.presence_penalty\":{brief:\"Used to reduce repetitiveness of generated tokens. Similar to frequency_penalty, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:.5,aliases:[\"ai.presence_penalty\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[57]}]},\"gen_ai.request.reasoning_effort\":{brief:\"Constrains the effort on reasoning for reasoning models. Supported values vary by provider.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"high\",changelog:[{version:\"0.13.0\",prs:[334],description:\"Added gen_ai.request.reasoning_effort attribute\"}]},\"gen_ai.request.seed\":{brief:\"The seed, ideally models given the same seed and same other parameters will produce the exact same output.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"1234567890\",aliases:[\"ai.seed\"],changelog:[{version:\"0.1.0\",prs:[57,127]}]},\"gen_ai.request.stop_sequences\":{brief:\"List of sequences that the model will use to stop generating further tokens.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:[\"forest\",\"lived\"],changelog:[{version:\"0.16.0\",prs:[482],description:\"Added gen_ai.request.stop_sequences attribute\"}]},\"gen_ai.request.temperature\":{brief:\"For an AI model call, the temperature parameter. Temperature essentially means how random the output will be.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:.1,aliases:[\"ai.temperature\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[57]}]},\"gen_ai.request.top_k\":{brief:\"Limits the model to only consider the K most likely next tokens, where K is an integer (e.g., top_k=20 means only the 20 highest probability tokens are considered).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:35,aliases:[\"ai.top_k\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[57]}]},\"gen_ai.request.top_p\":{brief:\"Limits the model to only consider tokens whose cumulative probability mass adds up to p, where p is a float between 0 and 1 (e.g., top_p=0.7 means only tokens that sum up to 70% of the probability mass are considered).\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:.7,aliases:[\"ai.top_p\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[57]}]},\"gen_ai.response.finish_reasons\":{brief:\"The reason why the model stopped generating.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"COMPLETE\",aliases:[\"ai.finish_reason\"],changelog:[{version:\"0.1.0\",prs:[57,127]}]},\"gen_ai.response.id\":{brief:\"Unique identifier for the completion.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"gen_123abc\",aliases:[\"ai.generation_id\"],changelog:[{version:\"0.1.0\",prs:[57,127]}]},\"gen_ai.response.model\":{brief:\"The vendor-specific ID of the model used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"gpt-4\",aliases:[\"ai.model_id\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"gen_ai.response.streaming\":{brief:\"Whether or not the AI model call's response was streamed back asynchronously\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,aliases:[\"ai.streaming\"],changelog:[{version:\"0.1.0\",prs:[76]}]},\"gen_ai.response.text\":{brief:\"The model's response text messages. It has to be a stringified version of an array of response text messages.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:'[\"The weather in Paris is rainy and overcast, with temperatures around 57\\xB0F\", \"The weather in London is sunny and warm, with temperatures around 65\\xB0F\"]',deprecation:{replacement:\"gen_ai.output.messages\"},changelog:[{version:\"0.4.0\",prs:[221]},{version:\"0.1.0\",prs:[63,74]}]},\"gen_ai.response.time_to_first_chunk\":{brief:\"Time in seconds when the first response content chunk arrived in streaming responses.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:.6853435,aliases:[\"gen_ai.response.time_to_first_token\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Added gen_ai.response.time_to_first_chunk attribute\"}]},\"gen_ai.response.time_to_first_token\":{brief:\"Time in seconds when the first response content chunk arrived in streaming responses.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:.6853435,deprecation:{replacement:\"gen_ai.response.time_to_first_chunk\"},aliases:[\"gen_ai.response.time_to_first_chunk\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Deprecate in favor of gen_ai.response.time_to_first_chunk\"},{version:\"0.4.0\",prs:[227]}]},\"gen_ai.response.tokens_per_second\":{brief:\"The total output tokens per seconds throughput\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:12345.67,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[66]}]},\"gen_ai.response.tool_calls\":{brief:\"The tool calls in the model's response. It has to be a stringified version of an array of objects.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:'[{\"name\": \"get_weather\", \"arguments\": {\"location\": \"Paris\"}}]',deprecation:{replacement:\"gen_ai.output.messages\"},changelog:[{version:\"0.4.0\",prs:[221]},{version:\"0.1.0\",prs:[63,74]}]},\"gen_ai.system\":{brief:\"The provider of the model.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"openai\",deprecation:{replacement:\"gen_ai.provider.name\"},aliases:[\"ai.model.provider\",\"gen_ai.provider.name\"],changelog:[{version:\"0.4.0\",prs:[253]},{version:\"0.1.0\",prs:[57,127]}]},\"gen_ai.system_instructions\":{brief:\"The system instructions passed to the model.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"You are a helpful assistant\",aliases:[\"ai.preamble\"],changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.4.0\",prs:[221]}]},\"gen_ai.system.message\":{brief:\"The system instructions passed to the model.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"You are a helpful assistant\",deprecation:{replacement:\"gen_ai.system_instructions\"},changelog:[{version:\"0.4.0\",prs:[221]},{version:\"0.1.0\",prs:[62]}]},\"gen_ai.tool.call.arguments\":{brief:\"The arguments of the tool call. It has to be a stringified version of the arguments to the tool.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:'{\"location\": \"Paris\"}',aliases:[\"gen_ai.tool.input\"],changelog:[{version:\"0.5.0\",prs:[265]},{version:\"0.4.0\",prs:[221]}]},\"gen_ai.tool.call.result\":{brief:\"The result of the tool call. It has to be a stringified version of the result of the tool.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"rainy, 57\\xB0F\",aliases:[\"gen_ai.tool.output\",\"gen_ai.tool.message\",\"mcp.tool.result.content\"],changelog:[{version:\"0.5.0\",prs:[265]},{version:\"0.4.0\",prs:[221]}]},\"gen_ai.tool.definitions\":{brief:\"The list of source system tool definitions available to the GenAI agent or model.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:'[{\"type\": \"function\", \"name\": \"get_current_weather\", \"description\": \"Get the current weather in a given location\", \"parameters\": {\"type\": \"object\", \"properties\": {\"location\": {\"type\": \"string\", \"description\": \"The city and state, e.g. San Francisco, CA\"}, \"unit\": {\"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"]}}, \"required\": [\"location\", \"unit\"]}}]',changelog:[{version:\"0.4.0\",prs:[221]}]},\"gen_ai.tool.description\":{brief:\"The description of the tool being used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Searches the web for current information about a topic\",changelog:[{version:\"0.1.0\",prs:[62,127]}]},\"gen_ai.tool.input\":{brief:\"The input of the tool being used. It has to be a stringified version of the input to the tool.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:'{\"location\": \"Paris\"}',deprecation:{replacement:\"gen_ai.tool.call.arguments\"},aliases:[\"gen_ai.tool.call.arguments\"],changelog:[{version:\"0.5.0\",prs:[265]},{version:\"0.1.0\",prs:[63,74]}]},\"gen_ai.tool.message\":{brief:\"The response from a tool or function call passed to the model.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"rainy, 57\\xB0F\",deprecation:{replacement:\"gen_ai.tool.call.result\"},aliases:[\"gen_ai.tool.call.result\",\"gen_ai.tool.output\",\"mcp.tool.result.content\"],changelog:[{version:\"0.5.0\",prs:[265]},{version:\"0.1.0\",prs:[62]}]},\"gen_ai.tool.name\":{brief:\"Name of the tool utilized by the agent.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Flights\",aliases:[\"ai.function_call\",\"mcp.tool.name\"],changelog:[{version:\"0.1.0\",prs:[57,127]}]},\"gen_ai.tool.output\":{brief:\"The output of the tool being used. It has to be a stringified version of the output of the tool.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"rainy, 57\\xB0F\",deprecation:{replacement:\"gen_ai.tool.call.result\"},aliases:[\"gen_ai.tool.call.result\",\"gen_ai.tool.message\",\"mcp.tool.result.content\"],changelog:[{version:\"0.5.0\",prs:[265]},{version:\"0.1.0\",prs:[63,74]}]},\"gen_ai.tool.type\":{brief:\"The type of tool being used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"function\",deprecation:{reason:\"The gen_ai.tool.type attribute is deprecated and should no longer be set.\"},changelog:[{version:\"0.1.0\",prs:[62,127]}]},\"gen_ai.usage.cache_creation.input_tokens\":{brief:\"The number of tokens written to the cache when processing the AI input (prompt).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:100,aliases:[\"gen_ai.usage.input_tokens.cache_write\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Added gen_ai.usage.cache_creation.input_tokens attribute\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\"]},\"gen_ai.usage.cache_read.input_tokens\":{brief:\"The number of cached tokens used to process the AI input (prompt).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:50,aliases:[\"gen_ai.usage.input_tokens.cached\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Added gen_ai.usage.cache_read.input_tokens attribute\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"This is a subset of gen_ai.usage.input_tokens, not an independent count. Do not sum this with gen_ai.usage.input_tokens \\u2014 it is already included.\"]},\"gen_ai.usage.completion_tokens\":{brief:\"The number of tokens used in the GenAI response (completion).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:10,deprecation:{replacement:\"gen_ai.usage.output_tokens\"},aliases:[\"ai.completion_tokens.used\",\"gen_ai.usage.output_tokens\"],changelog:[{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\"]},\"gen_ai.usage.input_tokens\":{brief:\"The number of tokens used to process the AI input (prompt) including cached input tokens.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:10,aliases:[\"ai.prompt_tokens.used\",\"gen_ai.usage.prompt_tokens\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Update additional_context to reference gen_ai.usage.cache_read.input_tokens\"},{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.5.0\",prs:[261]},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[112]},{version:\"0.0.0\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"This count includes cached input tokens. gen_ai.usage.cache_read.input_tokens is a subset of this value, not an independent count \\u2014 do not sum them together.\"]},\"gen_ai.usage.input_tokens.cached\":{brief:\"The number of cached tokens used to process the AI input (prompt).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:50,deprecation:{replacement:\"gen_ai.usage.cache_read.input_tokens\"},aliases:[\"gen_ai.usage.cache_read.input_tokens\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Deprecate in favor of gen_ai.usage.cache_read.input_tokens\"},{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[62,112]}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"This is a subset of gen_ai.usage.input_tokens, not an independent count. Do not sum this with gen_ai.usage.input_tokens \\u2014 it is already included.\"]},\"gen_ai.usage.input_tokens.cache_write\":{brief:\"The number of tokens written to the cache when processing the AI input (prompt).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:100,deprecation:{replacement:\"gen_ai.usage.cache_creation.input_tokens\"},aliases:[\"gen_ai.usage.cache_creation.input_tokens\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Deprecate in favor of gen_ai.usage.cache_creation.input_tokens\"},{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.4.0\",prs:[217,228]}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\"]},\"gen_ai.usage.output_tokens\":{brief:\"The number of tokens used for creating the AI output (including reasoning tokens).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:10,aliases:[\"ai.completion_tokens.used\",\"gen_ai.usage.completion_tokens\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Update additional_context to reference gen_ai.usage.reasoning.output_tokens\"},{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.5.0\",prs:[261]},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[112]},{version:\"0.0.0\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"This count includes reasoning tokens. gen_ai.usage.reasoning.output_tokens is a subset of this value, not an independent count \\u2014 do not sum them together.\"]},\"gen_ai.usage.output_tokens.reasoning\":{brief:\"The number of tokens used for reasoning to create the AI output.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:75,deprecation:{replacement:\"gen_ai.usage.reasoning.output_tokens\"},aliases:[\"gen_ai.usage.reasoning.output_tokens\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Deprecate in favor of gen_ai.usage.reasoning.output_tokens\"},{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[62,112]}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"This is a subset of gen_ai.usage.output_tokens, not an independent count. Do not sum this with gen_ai.usage.output_tokens \\u2014 it is already included.\"]},\"gen_ai.usage.prompt_tokens\":{brief:\"The number of tokens used in the GenAI input (prompt).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:20,deprecation:{replacement:\"gen_ai.usage.input_tokens\"},aliases:[\"ai.prompt_tokens.used\",\"gen_ai.usage.input_tokens\"],changelog:[{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\"]},\"gen_ai.usage.reasoning.output_tokens\":{brief:\"The number of tokens used for reasoning to create the AI output.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:75,aliases:[\"gen_ai.usage.output_tokens.reasoning\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Added gen_ai.usage.reasoning.output_tokens attribute\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"This is a subset of gen_ai.usage.output_tokens, not an independent count. Do not sum this with gen_ai.usage.output_tokens \\u2014 it is already included.\"]},\"gen_ai.usage.total_tokens\":{brief:\"The total number of tokens used to process the prompt. (input tokens plus output todkens)\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:20,aliases:[\"ai.total_tokens.used\"],changelog:[{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[57]}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"This is the sum of gen_ai.usage.input_tokens and gen_ai.usage.output_tokens. Do not sum this with either of them \\u2014 they are already included.\"]},\"graphql.document\":{brief:\"The GraphQL document being executed.\",type:\"string\",applyScrubbing:{key:\"auto\",reason:\"The document may contain sensitive information in arguments or variables. Instrumentation should redact sensitive information when possible.\"},isInOtel:!0,visibility:\"public\",example:\"query findBookById { bookById(id: ?) { name } }\",changelog:[{version:\"0.7.0\",description:\"Adds the `graphql.document` attribute to track the GraphQL document being executed.\"}]},\"graphql.operation.name\":{brief:\"The name of the operation being executed.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"findBookById\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"graphql.operation.type\":{brief:\"The type of the operation being executed.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"query\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},hardwareConcurrency:{brief:\"The number of logical CPU cores available.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"14\",deprecation:{replacement:\"device.processor_count\",reason:\"Old namespace-less attribute, to be replaced with device.processor_count for span-first future\"},aliases:[\"device.processor_count\"],changelog:[{version:\"0.5.0\",prs:[281,300],description:\"Added and deprecated attribute to document JS SDK's current behaviour\"}]},\"http.client_ip\":{brief:\"Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"example.com\",deprecation:{replacement:\"client.address\"},aliases:[\"client.address\"],changelog:[{version:\"0.1.0\",prs:[61,106,127]},{version:\"0.0.0\"}]},\"http.decoded_response_content_length\":{brief:\"The decoded body size of the response (in bytes).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:456,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"http.flavor\":{brief:\"The actual version of the protocol used for network communication.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"1.1\",deprecation:{replacement:\"network.protocol.version\"},aliases:[\"network.protocol.version\",\"net.protocol.version\"],changelog:[{version:\"0.1.0\",prs:[61,108,127]},{version:\"0.0.0\"}]},\"http.fragment\":{brief:\"The fragments present in the URI. Note that this contains the leading # character, while the `url.fragment` attribute does not.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"#details\",changelog:[{version:\"0.0.0\"}]},\"http.host\":{brief:\"The domain name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"example.com\",deprecation:{replacement:\"server.address\",reason:\"Deprecated, use one of `server.address` or `client.address`, depending on the usage\"},aliases:[\"server.address\",\"client.address\",\"http.server_name\",\"net.host.name\",\"server_name\"],changelog:[{version:\"0.1.0\",prs:[61,108,127]},{version:\"0.0.0\"}]},\"http.method\":{brief:\"The HTTP method used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"GET\",deprecation:{replacement:\"http.request.method\"},aliases:[\"http.request.method\",\"http.request_method\",\"method\"],changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"http.query\":{brief:\"The query string present in the URL. Note that this contains the leading ? character, while the `url.query` attribute does not.\",type:\"string\",applyScrubbing:{key:\"auto\",reason:\"Query string values can contain sensitive information. Clients should attempt to scrub parameters that might contain sensitive information.\"},isInOtel:!1,visibility:\"public\",example:\"?foo=bar&bar=baz\",changelog:[{version:\"0.0.0\"}]},\"http.request.body.data\":{brief:\"HTTP request body data. Can be given as string or structural data of any format.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:'[{\"role\": \"user\", \"message\": \"hello\"}]',changelog:[{version:\"0.6.0\",prs:[336],description:\"Added http.request.body.data attribute\"}]},\"http.request.connection_end\":{brief:\"The UNIX timestamp representing the time immediately after the browser finishes establishing the connection to the server to retrieve the resource. The timestamp value includes the time interval to establish the transport connection, as well as other time intervals such as TLS handshake and SOCKS authentication.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:173282955515e-2,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.connect_start\":{brief:\"The UNIX timestamp representing the time immediately before the user agent starts establishing the connection to the server to retrieve the resource.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1732829555111e-3,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.domain_lookup_end\":{brief:\"The UNIX timestamp representing the time immediately after the browser finishes the domain-name lookup for the resource.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1732829555201e-3,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.domain_lookup_start\":{brief:\"The UNIX timestamp representing the time immediately before the browser starts the domain name lookup for the resource.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1732829555322e-3,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.fetch_start\":{brief:\"The UNIX timestamp representing the time immediately before the browser starts to fetch the resource.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1732829555389e-3,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.header.\":{brief:\"HTTP request headers, being the normalized HTTP Header name (lowercase), the value being the header values.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",hasDynamicSuffix:!0,example:\"http.request.header.custom-header=['foo', 'bar']\",changelog:[{version:\"0.4.0\",prs:[201,204]},{version:\"0.1.0\",prs:[103]}]},\"http.request.method\":{brief:\"The HTTP method used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"GET\",aliases:[\"method\",\"http.method\",\"http.request_method\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"http.request_method\":{brief:\"The HTTP method used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"GET\",deprecation:{replacement:\"http.request.method\"},aliases:[\"method\",\"http.method\",\"http.request.method\"],changelog:[{version:\"0.6.0\",prs:[343],description:\"Added http.request_method attribute\"}]},\"http.request.redirect_end\":{brief:\"The UNIX timestamp representing the timestamp immediately after receiving the last byte of the response of the last redirect\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1732829558502e-3,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[130,134]}]},\"http.request.redirect_start\":{brief:\"The UNIX timestamp representing the start time of the fetch which that initiates the redirect.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1732829555495e-3,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.request_start\":{brief:\"The UNIX timestamp representing the time immediately before the browser starts requesting the resource from the server, cache, or local resource. If the transport connection fails and the browser retires the request, the value returned will be the start of the retry request.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:173282955551e-2,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.resend_count\":{brief:\"The ordinal number of request resending attempt (for any reason, including redirects).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"http.request.response_end\":{brief:\"The UNIX timestamp representing the time immediately after the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:173282955589e-2,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.response_start\":{brief:\"The UNIX timestamp representing the time immediately before the browser starts requesting the resource from the server, cache, or local resource. If the transport connection fails and the browser retires the request, the value returned will be the start of the retry request.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:17328295557e-1,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.same_origin\":{brief:\"Indicates that a URL has the same origin as the current page's origin in the browser.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,aliases:[\"url.same_origin\"],changelog:[{version:\"0.16.0\",prs:[456],description:\"Added http.request.same_origin attribute\"}]},\"http.request.secure_connection_start\":{brief:\"The UNIX timestamp representing the time immediately before the browser starts the handshake process to secure the current connection. If a secure connection is not used, the property returns zero.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:173282955573e-2,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.time_to_first_byte\":{brief:\"The time in seconds from the browser's timeorigin to when the first byte of the request's response was received. See https://web.dev/articles/ttfb#measure-resource-requests\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1.032,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[131]}]},\"http.request.worker_start\":{brief:\"The UNIX timestamp representing the timestamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:173282955368e-2,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[130,134]}]},\"http.response.body.size\":{brief:\"The encoded body size of the response (in bytes).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:123,aliases:[\"http.response_content_length\",\"http.response.header.content-length\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[106]},{version:\"0.0.0\"}]},\"http.response_content_length\":{brief:\"The encoded body size of the response (in bytes).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:123,deprecation:{replacement:\"http.response.body.size\"},aliases:[\"http.response.body.size\",\"http.response.header.content-length\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61,106]},{version:\"0.0.0\"}]},\"http.response.header.content-length\":{brief:\"The size of the message body sent to the recipient (in bytes)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"http.response.header.custom-header=['foo', 'bar']\",aliases:[\"http.response_content_length\",\"http.response.body.size\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"http.response.header.\":{brief:\"HTTP response headers, being the normalized HTTP Header name (lowercase), the value being the header values.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",hasDynamicSuffix:!0,example:\"http.response.header.custom-header=['foo', 'bar']\",changelog:[{version:\"0.4.0\",prs:[201,204]},{version:\"0.1.0\",prs:[103]}]},\"http.response.size\":{brief:\"The transfer size of the response (in bytes).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:456,aliases:[\"http.response_transfer_size\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"http.response.status_code\":{brief:\"The status code of the HTTP response.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:404,aliases:[\"http.status_code\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"http.response_transfer_size\":{brief:\"The transfer size of the response (in bytes).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:456,deprecation:{replacement:\"http.response.size\"},aliases:[\"http.response.size\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"http.route\":{brief:\"The matched route, that is, the path template in the format used by the respective server framework.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"/users/:id\",aliases:[\"url.template\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"http.scheme\":{brief:\"The URI scheme component identifying the used protocol.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"https\",deprecation:{replacement:\"url.scheme\"},aliases:[\"url.scheme\"],changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"http.server_name\":{brief:\"The server domain name\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"example.com\",deprecation:{replacement:\"server.address\"},aliases:[\"server.address\",\"net.host.name\",\"http.host\",\"server_name\"],changelog:[{version:\"0.1.0\",prs:[61,108,127]},{version:\"0.0.0\"}]},\"http.server.request.time_in_queue\":{brief:\"The time in milliseconds the request spent in the server queue before processing began. Measured from the X-Request-Start header set by reverse proxies (e.g., Nginx, HAProxy, Heroku) to when the application started handling the request.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:50,changelog:[{version:\"0.5.0\",prs:[267]}]},\"http.status_code\":{brief:\"The status code of the HTTP response.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:404,deprecation:{replacement:\"http.response.status_code\"},aliases:[\"http.response.status_code\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"http.target\":{brief:\"The pathname and query string of the URL.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"/test?foo=bar#buzz\",deprecation:{replacement:\"url.path\",reason:\"This attribute is being deprecated in favor of url.path and url.query\"},changelog:[{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"http.url\":{brief:\"The URL of the resource that was fetched.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"https://example.com/test?foo=bar#buzz\",deprecation:{replacement:\"url.full\"},aliases:[\"url.full\",\"url\"],changelog:[{version:\"0.1.0\",prs:[61,108]},{version:\"0.0.0\"}]},\"http.user_agent\":{brief:\"Value of the HTTP User-Agent header sent by the client.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1\",deprecation:{replacement:\"user_agent.original\"},aliases:[\"user_agent.original\"],changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},id:{brief:\"A unique identifier for the span.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"f47ac10b58cc4372a5670e02b2c3d479\",changelog:[{version:\"0.0.0\"}]},inp:{brief:\"The value of the recorded Interaction to Next Paint (INP) web vital\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:200,deprecation:{replacement:\"browser.web_vital.inp.value\",reason:\"The INP web vital is now recorded as a browser.web_vital.inp.value attribute.\"},aliases:[\"browser.web_vital.inp.value\"],changelog:[{version:\"0.5.0\",prs:[229],description:\"Added and deprecated attribute to document JS SDK's current behaviour\"}]},\"jsonrpc.protocol.version\":{brief:\"The version of the JSON-RPC protocol used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"2.0\",changelog:[{version:\"0.12.0\",prs:[420],description:\"Added jsonrpc.protocol.version attribute\"}]},\"jsonrpc.request.id\":{brief:\"The JSON-RPC request identifier. Unique within the session.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"1\",aliases:[\"mcp.request.id\"],changelog:[{version:\"0.12.0\",prs:[420],description:\"Added jsonrpc.request.id attribute\"}]},\"jvm.gc.action\":{brief:\"Name of the garbage collector action.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"end of minor GC\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"jvm.gc.name\":{brief:\"Name of the garbage collector.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"G1 Young Generation\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"jvm.memory.pool.name\":{brief:\"Name of the memory pool.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"G1 Old Gen\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"jvm.memory.type\":{brief:\"Name of the memory pool.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"G1 Old Gen\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"jvm.thread.daemon\":{brief:\"Whether the thread is daemon or not.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:!0,changelog:[{version:\"0.0.0\"}]},\"jvm.thread.state\":{brief:\"State of the thread.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"blocked\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"koa.name\":{brief:\"The name of the Koa middleware or matched route that handled the request.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"/users/:id\",deprecation:{reason:\"No single replacement. SDKs should use http.route for router layers and code.function.name for middleware layers instead.\"},changelog:[{version:\"0.16.0\",prs:[490],description:\"Added koa.name attribute as deprecated\"}]},\"koa.type\":{brief:\"The type of the Koa layer that handled the request.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"router\",changelog:[{version:\"0.16.0\",prs:[471],description:\"Added koa.type attribute\"}]},lcp:{brief:\"The value of the recorded Largest Contentful Paint (LCP) web vital\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2500,deprecation:{replacement:\"browser.web_vital.lcp.value\",reason:\"The LCP web vital is now recorded as a browser.web_vital.lcp.value attribute.\"},aliases:[\"browser.web_vital.lcp.value\"],changelog:[{version:\"0.5.0\",prs:[229],description:\"Added and deprecated attribute to document JS SDK's current behaviour\"}]},\"lcp.element\":{brief:\"The dom element responsible for the largest contentful paint.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"img\",deprecation:{replacement:\"browser.web_vital.lcp.element\",reason:\"The LCP element is now recorded as a browser.web_vital.lcp.element attribute.\"},aliases:[\"browser.web_vital.lcp.element\"],changelog:[{version:\"0.5.0\",prs:[233]},{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"lcp.id\":{brief:\"The id of the dom element responsible for the largest contentful paint.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"#hero\",deprecation:{replacement:\"browser.web_vital.lcp.id\",reason:\"The LCP id is now recorded as a browser.web_vital.lcp.id attribute.\"},aliases:[\"browser.web_vital.lcp.id\"],changelog:[{version:\"0.5.0\",prs:[233]},{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"lcp.loadTime\":{brief:\"The time it took for the LCP element to be loaded\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1402,deprecation:{replacement:\"browser.web_vital.lcp.load_time\",reason:\"The LCP load time is now recorded as a browser.web_vital.lcp.load_time attribute.\"},aliases:[\"browser.web_vital.lcp.load_time\"],changelog:[{version:\"0.5.0\",prs:[233]}]},\"lcp.renderTime\":{brief:\"The time it took for the LCP element to be rendered\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1685,deprecation:{replacement:\"browser.web_vital.lcp.render_time\",reason:\"The LCP render time is now recorded as a browser.web_vital.lcp.render_time attribute.\"},aliases:[\"browser.web_vital.lcp.render_time\"],changelog:[{version:\"0.5.0\",prs:[233]}]},\"lcp.size\":{brief:\"The size of the largest contentful paint element.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234,deprecation:{replacement:\"browser.web_vital.lcp.size\",reason:\"The LCP size is now recorded as a browser.web_vital.lcp.size attribute.\"},aliases:[\"browser.web_vital.lcp.size\"],changelog:[{version:\"0.5.0\",prs:[233]},{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"lcp.url\":{brief:\"The url of the dom element responsible for the largest contentful paint.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"https://example.com\",deprecation:{replacement:\"browser.web_vital.lcp.url\",reason:\"The LCP url is now recorded as a browser.web_vital.lcp.url attribute.\"},aliases:[\"browser.web_vital.lcp.url\"],changelog:[{version:\"0.5.0\",prs:[233]},{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"logger.name\":{brief:\"The name of the logger that generated this event.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"myLogger\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"mcp.cancelled.reason\":{brief:\"Reason for the cancellation of an MCP operation.\",type:\"string\",applyScrubbing:{key:\"manual\",reason:\"Cancellation reasons may contain user-specific or sensitive information\"},isInOtel:!1,visibility:\"public\",example:\"User cancelled the request\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.cancelled.request_id\":{brief:\"Request ID of the cancelled MCP operation.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"123\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.client.name\":{brief:\"Name of the MCP client application.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"claude-desktop\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.client.title\":{brief:\"Display title of the MCP client application.\",type:\"string\",applyScrubbing:{key:\"manual\",reason:\"Client titles may reveal user-specific application configurations or custom setups\"},isInOtel:!1,visibility:\"public\",example:\"Claude Desktop\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.client.version\":{brief:\"Version of the MCP client application.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1.0.0\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.lifecycle.phase\":{brief:\"Lifecycle phase indicator for MCP operations.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"initialization_complete\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.logging.data_type\":{brief:\"Data type of the logged message content.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"string\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.logging.level\":{brief:\"Log level for MCP logging operations.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"info\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.logging.logger\":{brief:\"Logger name for MCP logging operations.\",type:\"string\",applyScrubbing:{key:\"manual\",reason:\"Logger names may be user-defined and could contain sensitive information\"},isInOtel:!1,visibility:\"public\",example:\"mcp_server\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.logging.message\":{brief:\"Log message content from MCP logging operations.\",type:\"string\",applyScrubbing:{key:\"auto\",reason:\"Log messages can contain user data\"},isInOtel:!1,visibility:\"public\",example:\"Tool execution completed successfully\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.method.name\":{brief:\"The name of the MCP request or notification method being called.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"tools/call\",changelog:[{version:\"0.12.0\",prs:[420],description:\"Set is_in_otel=true, attribute exists in OTel MCP registry\"},{version:\"0.3.0\",prs:[171]}]},\"mcp.progress.current\":{brief:\"Current progress value of an MCP operation.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:50,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.3.0\",prs:[171]}]},\"mcp.progress.message\":{brief:\"Progress message describing the current state of an MCP operation.\",type:\"string\",applyScrubbing:{key:\"manual\",reason:\"Progress messages may contain user-specific or sensitive information\"},isInOtel:!1,visibility:\"public\",example:\"Processing 50 of 100 items\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.progress.percentage\":{brief:\"Calculated progress percentage of an MCP operation. Computed from current/total * 100.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:50,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.3.0\",prs:[171]}]},\"mcp.progress.token\":{brief:\"Token for tracking progress of an MCP operation.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"progress-token-123\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.progress.total\":{brief:\"Total progress target value of an MCP operation.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:100,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.3.0\",prs:[171]}]},\"mcp.prompt.name\":{brief:\"Name of the MCP prompt template being used.\",type:\"string\",applyScrubbing:{key:\"manual\",reason:\"Prompt names may reveal user behavior patterns or sensitive operations\"},isInOtel:!1,visibility:\"public\",example:\"summarize\",deprecation:{replacement:\"gen_ai.prompt.name\",reason:\"OTel uses gen_ai.prompt.name for MCP prompt names\"},aliases:[\"gen_ai.prompt.name\"],changelog:[{version:\"0.12.0\",prs:[420],description:\"Deprecated in favor of gen_ai.prompt.name\"},{version:\"0.3.0\",prs:[171]}]},\"mcp.prompt.result.description\":{brief:\"Description of the prompt result.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"A summary of the requested information\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.prompt.result.message_content\":{brief:\"Content of the message in the prompt result. Used for single message results only.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"Please provide a summary of the document\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.prompt.result.message_count\":{brief:\"Number of messages in the prompt result.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:3,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.3.0\",prs:[171]}]},\"mcp.prompt.result.message_role\":{brief:\"Role of the message in the prompt result. Used for single message results only.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"user\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.protocol.ready\":{brief:\"Protocol readiness indicator for MCP session. Non-zero value indicates the protocol is ready.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.3.0\",prs:[171]}]},\"mcp.protocol.version\":{brief:\"MCP protocol version used in the session.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"2024-11-05\",changelog:[{version:\"0.12.0\",prs:[420],description:\"Set is_in_otel=true, attribute exists in OTel MCP registry\"},{version:\"0.3.0\",prs:[171]}]},\"mcp.request.argument.\":{brief:\"MCP request argument with dynamic key suffix. The is replaced with the actual argument name. The value is a JSON-stringified representation of the argument value.\",type:\"string\",applyScrubbing:{key:\"auto\",reason:\"Arguments contain user input\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"mcp.request.argument.query='weather in Paris'\",changelog:[{version:\"0.3.0\",prs:[176]}]},\"mcp.request.argument.name\":{brief:\"Name argument from prompts/get MCP request.\",type:\"string\",applyScrubbing:{key:\"auto\",reason:\"Prompt names can contain user input\"},isInOtel:!1,visibility:\"public\",example:\"summarize\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.request.argument.uri\":{brief:\"URI argument from resources/read MCP request.\",type:\"string\",applyScrubbing:{key:\"auto\",reason:\"URIs can contain user file paths\"},isInOtel:!1,visibility:\"public\",example:\"file:///path/to/resource\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.request.id\":{brief:\"JSON-RPC request identifier for the MCP request. Unique within the MCP session.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1\",deprecation:{replacement:\"jsonrpc.request.id\",reason:\"OTel models MCP as JSON-RPC, uses jsonrpc.request.id\"},aliases:[\"jsonrpc.request.id\"],changelog:[{version:\"0.12.0\",prs:[420],description:\"Deprecated in favor of jsonrpc.request.id\"},{version:\"0.3.0\",prs:[171]}]},\"mcp.resource.protocol\":{brief:\"Protocol of the resource URI being accessed, extracted from the URI.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"file\",deprecation:{replacement:\"network.protocol.name\",reason:\"OTel uses the generic network.protocol.name attribute\"},aliases:[\"network.protocol.name\",\"net.protocol.name\"],changelog:[{version:\"0.12.0\",prs:[420],description:\"Deprecated in favor of network.protocol.name\"},{version:\"0.3.0\",prs:[171]}]},\"mcp.resource.uri\":{brief:\"The resource URI being accessed in an MCP operation.\",type:\"string\",applyScrubbing:{key:\"auto\",reason:\"URIs can contain sensitive file paths\"},isInOtel:!0,visibility:\"public\",example:\"file:///path/to/file.txt\",changelog:[{version:\"0.12.0\",prs:[420],description:\"Set is_in_otel=true, attribute exists in OTel MCP registry\"},{version:\"0.3.0\",prs:[171]}]},\"mcp.server.name\":{brief:\"Name of the MCP server application.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"sentry-mcp-server\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.server.title\":{brief:\"Display title of the MCP server application.\",type:\"string\",applyScrubbing:{key:\"manual\",reason:\"Server titles may reveal user-specific application configurations or custom setups\"},isInOtel:!1,visibility:\"public\",example:\"Sentry MCP Server\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.server.version\":{brief:\"Version of the MCP server application.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"0.1.0\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.session.id\":{brief:\"Identifier for the MCP session.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"550e8400-e29b-41d4-a716-446655440000\",changelog:[{version:\"0.12.0\",prs:[420],description:\"Set is_in_otel=true, attribute exists in OTel MCP registry\"},{version:\"0.3.0\",prs:[171]}]},\"mcp.tool.name\":{brief:\"Name of the MCP tool being called.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"calculator\",deprecation:{replacement:\"gen_ai.tool.name\",reason:\"OTel uses gen_ai.tool.name for MCP tool names\"},aliases:[\"gen_ai.tool.name\",\"ai.function_call\"],changelog:[{version:\"0.12.0\",prs:[420],description:\"Deprecated in favor of gen_ai.tool.name\"},{version:\"0.3.0\",prs:[171]}]},\"mcp.tool.result.content\":{brief:\"The content of the tool result.\",type:\"string\",applyScrubbing:{key:\"auto\",reason:\"Tool results can contain user data\"},isInOtel:!1,visibility:\"public\",example:'{\"output\": \"rainy\", \"toolCallId\": \"1\"}',deprecation:{replacement:\"gen_ai.tool.call.result\",reason:\"OTel uses gen_ai.tool.call.result for MCP tool results\"},aliases:[\"gen_ai.tool.call.result\",\"gen_ai.tool.message\",\"gen_ai.tool.output\"],changelog:[{version:\"0.12.0\",prs:[420],description:\"Deprecated in favor of gen_ai.tool.call.result\"},{version:\"0.3.0\",prs:[171]},{version:\"0.2.0\",prs:[164]}]},\"mcp.tool.result.content_count\":{brief:\"Number of content items in the tool result.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.3.0\",prs:[171]}]},\"mcp.tool.result.is_error\":{brief:\"Whether a tool execution resulted in an error.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!1,deprecation:{replacement:\"error.type\",reason:\"OTel uses error.type set to 'tool_error' when isError is true. Cannot be automatically backfilled due to type mismatch (boolean vs string).\"},changelog:[{version:\"0.12.0\",prs:[420],description:\"Deprecated in favor of error.type\"},{version:\"0.3.0\",prs:[171]}]},\"mcp.transport\":{brief:\"Transport method used for MCP communication.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"stdio\",deprecation:{replacement:\"network.transport\",reason:\"OTel uses the generic network.transport attribute\"},aliases:[\"network.transport\",\"net.transport\"],changelog:[{version:\"0.12.0\",prs:[420],description:\"Deprecated in favor of network.transport\"},{version:\"0.3.0\",prs:[171]}]},\"mdc.\":{brief:\"Attributes from the Mapped Diagnostic Context (MDC) present at the moment the log record was created. The MDC is supported by all the most popular logging solutions in the Java ecosystem, and it's usually implemented as a thread-local map that stores context for e.g. a specific request.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"mdc.some_key='some_value'\",changelog:[{version:\"0.3.0\",prs:[176]}]},\"messaging.batch.message_count\":{brief:\"The number of messages sent, received, or processed in the scope of the batching operation.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:10,changelog:[{version:\"0.6.0\",prs:[341],description:\"Added messaging.batch.message_count attribute\"}]},\"messaging.destination\":{brief:\"The message destination name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"BestTopic\",deprecation:{replacement:\"messaging.destination.name\",reason:\"This attribute is being deprecated in favor of messaging.destination.name, which is the OTel-aligned replacement.\"},aliases:[\"messaging.destination.name\"],changelog:[{version:\"0.16.0\",prs:[482],description:\"Added messaging.destination attribute, deprecated in favor of messaging.destination.name\"}]},\"messaging.destination.connection\":{brief:\"The message destination connection.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"BestTopic\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"messaging.destination.name\":{brief:\"The message destination name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"BestTopic\",aliases:[\"messaging.destination\"],changelog:[{version:\"0.16.0\",prs:[482],description:\"Added messaging.destination as an alias\"},{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"messaging.message.body.size\":{brief:\"The size of the message body in bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:839,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"messaging.message.conversation_id\":{brief:'The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called \"Correlation ID\".',type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"MyConversationId\",changelog:[{version:\"0.16.0\",prs:[468],description:\"Added messaging.message.conversation_id attribute\"}]},\"messaging.message.envelope.size\":{brief:\"The size of the message body and metadata in bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:1045,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"messaging.message.id\":{brief:\"A value used by the messaging system as an identifier for the message, represented as a string.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"f47ac10b58cc4372a5670e02b2c3d479\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"messaging.message.receive.latency\":{brief:\"The latency between when the message was published and received.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1732847252,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"messaging.message.retry.count\":{brief:\"The amount of attempts to send the message.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"messaging.operation.name\":{brief:\"The name of the messaging operation being performed\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"send\",changelog:[{version:\"0.11.0\",prs:[392],description:\"Added messaging.operation.name attribute\"}]},\"messaging.operation.type\":{brief:\"A string identifying the type of the messaging operation\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"create\",changelog:[{version:\"0.1.0\",prs:[51,127]}]},\"messaging.rabbitmq.destination.routing_key\":{brief:\"RabbitMQ message routing key.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"myKey\",changelog:[{version:\"0.16.0\",prs:[468],description:\"Added messaging.rabbitmq.destination.routing_key attribute\"}]},\"messaging.system\":{brief:\"The messaging system as identified by the client instrumentation.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"activemq\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},method:{brief:\"The HTTP method used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"GET\",deprecation:{replacement:\"http.request.method\"},aliases:[\"http.request.method\",\"http.request_method\",\"http.method\"],changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"middleware.name\":{brief:\"The name of the middleware.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"AuthenticationMiddleware\",changelog:[{version:\"0.6.0\",prs:[336],description:\"Added middleware.name attribute\"}]},\"navigation.origin\":{brief:\"The origin of the navigation (usually client side router navigations). Should preferrably parameterized template (like url.template) or a URL path otherwise.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"/users/:id\",aliases:[\"sentry.sveltekit.navigation.from\"],changelog:[{version:\"0.16.0\",prs:[467],description:\"Added navigation.origin attribute\"}]},\"navigation.route.id\":{brief:\"The identifier of the matched client-side route, as assigned by the routing framework (e.g., vue-router name, react-router id).\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"AboutView\",changelog:[{version:\"0.16.0\",prs:[468],description:\"Added navigation.route.id attribute\"}]},\"navigation.type\":{brief:\"The type of navigation done by a client-side router.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"router.push\",aliases:[\"sentry.sveltekit.navigation.type\"],changelog:[{version:\"0.16.0\",prs:[467],description:\"Added new deprecated alias\"},{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"nel.elapsed_time\":{brief:\"The elapsed number of milliseconds between the start of the resource fetch and when it was completed or aborted by the user agent.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:100,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[68]}]},\"nel.phase\":{brief:'If request failed, the phase of its network error. If request succeeded, \"application\".',type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"application\",changelog:[{version:\"0.1.0\",prs:[68,127]}]},\"nel.referrer\":{brief:\"request's referrer, as determined by the referrer policy associated with its client.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"https://example.com/foo?bar=baz\",changelog:[{version:\"0.1.0\",prs:[68,127]}]},\"nel.sampling_function\":{brief:\"The sampling function used to determine if the request should be sampled.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:.5,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[68]}]},\"nel.type\":{brief:'If request failed, the type of its network error. If request succeeded, \"ok\".',type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"dns.unreachable\",changelog:[{version:\"0.1.0\",prs:[68,127]}]},\"network.connection.effective_type\":{brief:\"Specifies the effective type of the current connection (e.g. slow-2g, 2g, 3g, 4g).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"4g\",aliases:[\"effectiveConnectionType\"],changelog:[{version:\"0.5.0\",prs:[279],description:\"Added attribute network.connection.effective_type to be used instead of effectiveConnectionType\"}]},\"network.connection.rtt\":{brief:\"Specifies the estimated effective round-trip time of the current connection, in milliseconds.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:100,aliases:[\"connection.rtt\"],changelog:[{version:\"0.5.0\",prs:[279],description:\"Added attribute network.connection.rtt to be used instead of connection.rtt\"}]},\"network.connection.type\":{brief:\"Specifies the type of the current connection (e.g. wifi, ethernet, cellular , etc).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"wifi\",aliases:[\"device.connection_type\",\"connectionType\"],changelog:[{version:\"0.5.0\",prs:[279],description:\"Added attribute network.connection.type to be used instead of connectionType\"}]},\"network.local.address\":{brief:\"Local address of the network connection - IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"10.1.2.80\",aliases:[\"net.host.ip\",\"net.sock.host.addr\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"network.local.port\":{brief:\"Local port number of the network connection.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:65400,aliases:[\"net.sock.host.port\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"network.peer.address\":{brief:\"Peer address of the network connection - IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"10.1.2.80\",aliases:[\"net.peer.ip\",\"net.sock.peer.addr\"],changelog:[{version:\"0.1.0\",prs:[108,127]},{version:\"0.0.0\"}]},\"network.peer.port\":{brief:\"Peer port number of the network connection.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:65400,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"network.protocol.name\":{brief:\"OSI application layer or non-OSI equivalent.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"http\",aliases:[\"net.protocol.name\",\"mcp.resource.protocol\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"network.protocol.version\":{brief:\"The actual version of the protocol used for network communication.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"1.1\",aliases:[\"http.flavor\",\"net.protocol.version\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"network.transport\":{brief:\"OSI transport layer or inter-process communication method.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"tcp\",aliases:[\"net.transport\",\"mcp.transport\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"network.type\":{brief:\"OSI network layer or non-OSI equivalent.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"ipv4\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"net.host.ip\":{brief:\"Local address of the network connection - IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"192.168.0.1\",deprecation:{replacement:\"network.local.address\"},aliases:[\"network.local.address\",\"net.sock.host.addr\"],changelog:[{version:\"0.1.0\",prs:[61,108,127]},{version:\"0.0.0\"}]},\"net.host.name\":{brief:\"Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"example.com\",deprecation:{replacement:\"server.address\"},aliases:[\"server.address\",\"http.server_name\",\"http.host\",\"server_name\"],changelog:[{version:\"0.1.0\",prs:[61,108,127]},{version:\"0.0.0\"}]},\"net.host.port\":{brief:\"Server port number.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:1337,deprecation:{replacement:\"server.port\"},aliases:[\"server.port\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"net.peer.ip\":{brief:\"Peer address of the network connection - IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"192.168.0.1\",deprecation:{replacement:\"network.peer.address\"},aliases:[\"network.peer.address\",\"net.sock.peer.addr\"],changelog:[{version:\"0.1.0\",prs:[61,108,127]},{version:\"0.0.0\"}]},\"net.peer.name\":{brief:\"Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"example.com\",deprecation:{replacement:\"server.address\",reason:\"Deprecated, use server.address on client spans and client.address on server spans.\"},changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"net.peer.port\":{brief:\"Peer port number.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:1337,deprecation:{replacement:\"server.port\",reason:\"Deprecated, use server.port on client spans and client.port on server spans.\"},changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"net.protocol.name\":{brief:\"OSI application layer or non-OSI equivalent.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"http\",deprecation:{replacement:\"network.protocol.name\"},aliases:[\"network.protocol.name\",\"mcp.resource.protocol\"],changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"net.protocol.version\":{brief:\"The actual version of the protocol used for network communication.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"1.1\",deprecation:{replacement:\"network.protocol.version\"},aliases:[\"network.protocol.version\",\"http.flavor\"],changelog:[{version:\"0.1.0\",prs:[61,108,127]},{version:\"0.0.0\"}]},\"net.sock.family\":{brief:\"OSI transport and network layer\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"inet\",deprecation:{replacement:\"network.transport\",reason:\"Deprecated, use network.transport and network.type.\"},changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"net.sock.host.addr\":{brief:\"Local address of the network connection mapping to Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"/var/my.sock\",deprecation:{replacement:\"network.local.address\"},aliases:[\"network.local.address\",\"net.host.ip\"],changelog:[{version:\"0.1.0\",prs:[61,108,127]},{version:\"0.0.0\"}]},\"net.sock.host.port\":{brief:\"Local port number of the network connection.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:8080,deprecation:{replacement:\"network.local.port\"},aliases:[\"network.local.port\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"net.sock.peer.addr\":{brief:\"Peer address of the network connection - IP address\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"192.168.0.1\",deprecation:{replacement:\"network.peer.address\"},aliases:[\"network.peer.address\",\"net.peer.ip\"],changelog:[{version:\"0.1.0\",prs:[61,108,127]},{version:\"0.0.0\"}]},\"net.sock.peer.name\":{brief:\"Peer address of the network connection - Unix domain socket name\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"/var/my.sock\",deprecation:{reason:\"Deprecated from OTEL, no replacement at this time\"},changelog:[{version:\"0.1.0\",prs:[61,119,127]},{version:\"0.0.0\"}]},\"net.sock.peer.port\":{brief:\"Peer port number of the network connection.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:8080,deprecation:{replacement:\"network.peer.port\"},changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"net.transport\":{brief:\"OSI transport layer or inter-process communication method.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"tcp\",deprecation:{replacement:\"network.transport\"},aliases:[\"network.transport\",\"mcp.transport\"],changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"os.build\":{brief:\"The build ID of the operating system.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1234567890\",deprecation:{replacement:\"os.build_id\"},aliases:[\"os.build_id\"],changelog:[{version:\"0.5.0\",prs:[301],description:\"Added os.build attribute, deprecated in favor of os.build_id\"}]},\"os.build_id\":{brief:\"The build ID of the operating system.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"1234567890\",aliases:[\"os.build\"],changelog:[{version:\"0.5.0\",prs:[301],description:\"Added os.build as alias\"},{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"os.description\":{brief:\"Human readable (not intended to be parsed) OS version information, like e.g. reported by ver or lsb_release -a commands.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Ubuntu 18.04.1 LTS\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"os.kernel_version\":{brief:\"An independent kernel version string. Typically the entire output of the `uname` syscall.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"20.2.0\",changelog:[{version:\"0.5.0\",prs:[301],description:\"Added os.kernel_version attribute\"}]},\"os.name\":{brief:\"Human readable operating system name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Ubuntu\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"os.raw_description\":{brief:\"An unprocessed description string obtained by the operating system. For some well-known runtimes, Sentry will attempt to parse `name` and `version` from this string, if they are not explicitly given.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Ubuntu 22.04.4 LTS (Jammy Jellyfish)\",changelog:[{version:\"0.5.0\",prs:[301],description:\"Added os.raw_description attribute\"}]},\"os.rooted\":{brief:\"Whether the operating system has been jailbroken or rooted.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.5.0\",prs:[301],description:\"Added os.rooted attribute\"}]},\"os.theme\":{brief:\"Whether the OS runs in dark mode or light mode.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"dark\",changelog:[{version:\"0.5.0\",prs:[301],description:\"Added os.theme attribute\"}]},\"os.type\":{brief:\"The operating system type.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"linux\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"os.version\":{brief:\"The version of the operating system.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"18.04.2\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"otel.kind\":{brief:\"The span kind (https://opentelemetry.io/docs/concepts/signals/traces/#span-kind). Deprecated, use `sentry.kind` instead.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"SERVER\",deprecation:{replacement:\"sentry.kind\",reason:\"Deprecated in favor of sentry.kind\"},aliases:[\"sentry.kind\"],changelog:[{version:\"0.13.0\",prs:[440],description:\"Added otel.kind attribute\"}]},\"otel.scope.name\":{brief:\"The name of the instrumentation scope - (InstrumentationScope.Name in OTLP).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"io.opentelemetry.contrib.mongodb\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"otel.scope.version\":{brief:\"The version of the instrumentation scope - (InstrumentationScope.Version in OTLP).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"2.4.5\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"otel.status_code\":{brief:\"Name of the code, either \\u201COK\\u201D or \\u201CERROR\\u201D. MUST NOT be set if the status code is UNSET.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"OK\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"otel.status_description\":{brief:\"Description of the Status if it has a value, otherwise not set.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"resource not found\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"params.\":{brief:\"Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"params.id='123'\",aliases:[\"url.path.parameter.\"],changelog:[{version:\"0.1.0\",prs:[103]}]},\"performance.activationStart\":{brief:\"The time between initiating a navigation to a page and the browser activating the page\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1.983,deprecation:{replacement:\"browser.performance.navigation.activation_start\",reason:\"The activationStart is now recorded as the browser.performance.navigation.activation_start attribute.\"},aliases:[\"browser.performance.navigation.activation_start\"],changelog:[{version:\"0.5.0\",prs:[321],description:\"Added performance.activationStart attribute\"}]},\"performance.timeOrigin\":{brief:\"The browser's performance.timeOrigin timestamp representing the time when the pageload was initiated\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1776185678886e-3,deprecation:{replacement:\"browser.performance.time_origin\",reason:\"The timeOrigin is now recorded as the browser.performance.time_origin attribute.\"},aliases:[\"browser.performance.time_origin\"],changelog:[{version:\"0.5.0\",prs:[321],description:\"Added performance.timeOrigin attribute\"}]},previous_route:{brief:\"Also used by mobile SDKs to indicate the previous route in the application.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"HomeScreen\",changelog:[{version:\"0.1.0\",prs:[74]},{version:\"0.0.0\"}]},\"process.command_args\":{brief:\"All the command arguments (including the command/executable itself) as received by the process.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:[\"cmd/otecol\",\"--config=config.yaml\"],changelog:[{version:\"0.6.0\",prs:[327],description:\"Added process.command_args attribute\"}]},\"process.executable.name\":{brief:\"The name of the executable that started the process.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"getsentry\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"process.pid\":{brief:\"The process ID of the running process.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:12345,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"process.runtime.description\":{brief:\"An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. Equivalent to `raw_description` in the Sentry runtime context.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Eclipse OpenJ9 VM openj9-0.21.0\",aliases:[\"runtime.raw_description\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"process.runtime.engine.name\":{brief:\"The name of the runtime engine.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"v8\",changelog:[{version:\"0.0.0\"}]},\"process.runtime.engine.version\":{brief:\"The version of the runtime engine.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"12.9.202.13-rusty\",changelog:[{version:\"0.0.0\"}]},\"process.runtime.name\":{brief:\"The name of the runtime. Equivalent to `name` in the Sentry runtime context.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"node\",aliases:[\"runtime.name\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"process.runtime.version\":{brief:\"The version of the runtime of this process, as returned by the runtime without modification. Equivalent to `version` in the Sentry runtime context.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"18.04.2\",aliases:[\"runtime.version\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"query.\":{brief:\"An item in a query string. Usually added by client-side routing frameworks like vue-router.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"query.id='123'\",deprecation:{replacement:\"url.query\",reason:\"Instead of sending items individually in query., they should be sent all together with url.query.\"},changelog:[{version:\"0.1.0\",prs:[103]}]},\"react.version\":{brief:\"The version of the React framework\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"18.2.0\",changelog:[{version:\"0.7.0\",prs:[368],description:\"Added react.version attribute\"}]},release:{brief:\"The sentry release.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"production\",deprecation:{replacement:\"sentry.release\"},aliases:[\"sentry.release\"],changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"remix.action_form_data.\":{brief:\"Remix form data, being the form data key, the value being the form data value.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"http.response.header.text='test'\",changelog:[{version:\"0.1.0\",prs:[103]}]},replay_id:{brief:\"The id of the sentry replay.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"123e4567e89b12d3a456426614174000\",deprecation:{replacement:\"sentry.replay_id\"},aliases:[\"sentry.replay_id\"],changelog:[{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"resource.deployment.environment\":{brief:\"The software deployment environment name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"production\",deprecation:{replacement:\"sentry.environment\"},changelog:[{version:\"0.5.0\",prs:[266]}]},\"resource.deployment.environment.name\":{brief:\"The software deployment environment name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"production\",deprecation:{replacement:\"sentry.environment\"},changelog:[{version:\"0.3.1\",prs:[196]}]},\"resource.render_blocking_status\":{brief:\"The render blocking status of the resource.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"non-blocking\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},route:{brief:\"The matched route, that is, the path template in the format used by the respective server framework. Also used by mobile SDKs to indicate the current route in the application.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"App\\\\Controller::indexAction\",deprecation:{replacement:\"http.route\"},aliases:[\"http.route\"],changelog:[{version:\"0.1.0\",prs:[61,74]},{version:\"0.0.0\"}]},\"rpc.grpc.status_code\":{brief:\"The numeric status code of the gRPC request.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:2,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"rpc.method\":{brief:\"The fully-qualified logical name of the method from the RPC interface perspective.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"com.example.ExampleService/exampleMethod\",changelog:[{version:\"0.7.0\",prs:[351],description:\"Added rpc.method attribute\"}]},\"rpc.response.status_code\":{brief:\"Status code of the RPC returned by the RPC server or generated by the client.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"DEADLINE_EXCEEDED\",changelog:[{version:\"0.7.0\",prs:[352],description:\"Added rpc.response.status_code attribute\"}]},\"rpc.service\":{brief:\"The full (logical) name of the service being called, including its package name, if applicable.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"myService.BestService\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"rpc.system\":{brief:\"A string identifying the remoting system.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"aws-api\",deprecation:{replacement:\"rpc.system.name\",reason:\"This attribute is being deprecated in favor of rpc.system.name, which is the OTel-aligned replacement.\"},aliases:[\"rpc.system.name\"],changelog:[{version:\"0.16.0\",prs:[482],description:\"Added rpc.system attribute, deprecated in favor of rpc.system.name\"}]},\"rpc.system.name\":{brief:\"A string identifying the remoting system.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"aws-api\",aliases:[\"rpc.system\"],changelog:[{version:\"0.16.0\",prs:[482],description:\"Added rpc.system.name attribute\"}]},\"runtime.build\":{brief:\"The application build string, when it is separate from the version.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"stable\",deprecation:{reason:\"The runtime.* namespace is deprecated in favor of process.runtime.*. No direct OTel equivalent exists for this attribute.\"},changelog:[{version:\"0.11.0\",prs:[383],description:\"Added and deprecated runtime.build attribute\"}]},\"runtime.name\":{brief:\"The name of the runtime. For example node, CPython, or rustc.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"node\",deprecation:{replacement:\"process.runtime.name\",reason:\"Prefer OTel-aligned process.runtime.name\"},aliases:[\"process.runtime.name\"],changelog:[{version:\"0.11.0\",prs:[383],description:\"Added and deprecated runtime.name attribute in favor of process.runtime.name\"}]},\"runtime.raw_description\":{brief:\"Unprocessed description string as obtained from the runtime. Used to extract name and version for well-known runtimes.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Eclipse OpenJ9 VM openj9-0.21.0\",deprecation:{replacement:\"process.runtime.description\",reason:\"Prefer OTel-aligned process.runtime.description\"},aliases:[\"process.runtime.description\"],changelog:[{version:\"0.11.0\",prs:[383],description:\"Added and deprecated runtime.raw_description attribute in favor of process.runtime.description\"}]},\"runtime.version\":{brief:\"The version of the runtime.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"18.04.2\",deprecation:{replacement:\"process.runtime.version\",reason:\"Prefer OTel-aligned process.runtime.version\"},aliases:[\"process.runtime.version\"],changelog:[{version:\"0.11.0\",prs:[383],description:\"Added and deprecated runtime.version attribute in favor of process.runtime.version\"}]},\"score.\":{brief:\"The weighted performance score for a web vital. This is defined as `score.weight.` * `score.ratio.`.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"score.cls=0.1723\",changelog:[{version:\"0.7.0\",prs:[355],description:\"Added score. attribute\"}]},\"score.ratio.\":{brief:\"The score for a web vital, normalized to a number between 0 and 1.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"score.ratio.inp=0.7748\",changelog:[{version:\"0.7.0\",prs:[355],description:\"Added score.ratio. attribute\"}]},\"score.total\":{brief:\"The total performance score of a span. This is the sum of individual weighted web vital scores (see `score.`).\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",changelog:[{version:\"0.7.0\",prs:[355],description:\"Added score.total attribute\"}]},\"score.weight.\":{brief:\"The relative weight of a web vital in a span's performance score.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"score.weight.fcp=0.25\",changelog:[{version:\"0.7.0\",prs:[355],description:\"Added score.weight. attribute\"}]},\"sentry.action\":{brief:\"Used as a generic attribute representing the action depending on the type of span. For instance, this is the database query operation for DB spans, and the request method for HTTP spans.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"SELECT\",changelog:[{version:\"0.4.0\",prs:[212]}]},\"sentry.browser.name\":{brief:\"The name of the browser.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Chrome\",deprecation:{replacement:\"browser.name\"},aliases:[\"browser.name\"],changelog:[{version:\"0.1.0\",prs:[139]}]},\"sentry.browser.version\":{brief:\"The version of the browser.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"120.0.6099.130\",deprecation:{replacement:\"browser.version\"},aliases:[\"browser.version\"],changelog:[{version:\"0.1.0\",prs:[139]}]},\"sentry.cancellation_reason\":{brief:\"The reason why a span ended early.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"document.hidden\",changelog:[{version:\"0.0.0\"}]},\"sentry.category\":{brief:\"The high-level category of a span, derived from the span operation or span attributes. This categorizes spans by their general purpose (e.g., database, HTTP, UI). Known values include: 'ai', 'ai.pipeline', 'app', 'browser', 'cache', 'console', 'db', 'event', 'file', 'function.aws', 'function.azure', 'function.gcp', 'function.nextjs', 'function.remix', 'graphql', 'grpc', 'http', 'measure', 'middleware', 'navigation', 'pageload', 'queue', 'resource', 'rpc', 'serialize', 'subprocess', 'template', 'topic', 'ui', 'ui.angular', 'ui.ember', 'ui.react', 'ui.svelte', 'ui.vue', 'view', 'websocket'.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"db\",changelog:[{version:\"0.4.0\",prs:[218]}]},\"sentry.client_sample_rate\":{brief:\"Rate at which a span was sampled in the SDK.\",type:\"double\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:.5,changelog:[{version:\"0.1.0\",prs:[102]}]},\"sentry.description\":{brief:\"The human-readable description of a span.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"index view query\",changelog:[{version:\"0.1.0\",prs:[135]}]},\"sentry.dist\":{brief:\"The sentry dist.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"1.0\",aliases:[\"dist\"],changelog:[{version:\"0.16.0\",prs:[489],description:\"Added dist as an alias\"},{version:\"0.0.0\"}]},\"sentry.domain\":{brief:\"Used as a generic attribute representing the domain depending on the type of span. For instance, this is the collection/table name for database spans, and the server address for HTTP spans.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"example.com\",changelog:[{version:\"0.4.0\",prs:[212]}]},\"sentry.dsc.environment\":{brief:\"The environment from the dynamic sampling context.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"internal\",example:\"prod\",changelog:[{version:\"0.3.0\",prs:[185]}]},\"sentry.dsc.project_id\":{brief:\"The ID of the project where the trace originated (i.e. the project of the SDK that started the trace). Propagated through the dynamic sampling context and set by Relay during ingestion.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"internal\",example:\"12345\",changelog:[{version:\"0.7.0\",prs:[358],description:\"Add sentry.dsc.project_id as an attribute\"}]},\"sentry.dsc.public_key\":{brief:\"The public key from the dynamic sampling context.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"internal\",example:\"c51734c603c4430eb57cb0a5728a479d\",changelog:[{version:\"0.3.0\",prs:[185]}]},\"sentry.dsc.release\":{brief:\"The release identifier from the dynamic sampling context.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"internal\",example:\"frontend@e8211be71b214afab5b85de4b4c54be3714952bb\",changelog:[{version:\"0.3.0\",prs:[185]}]},\"sentry.dsc.sampled\":{brief:\"Whether the event was sampled according to the dynamic sampling context.\",type:\"boolean\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"internal\",example:!0,changelog:[{version:\"0.3.0\",prs:[185]}]},\"sentry.dsc.sample_rate\":{brief:\"The sample rate from the dynamic sampling context.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"internal\",example:\"1.0\",changelog:[{version:\"0.3.0\",prs:[185]}]},\"sentry.dsc.trace_id\":{brief:\"The trace ID from the dynamic sampling context.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"internal\",example:\"047372980460430cbc78d9779df33a46\",changelog:[{version:\"0.3.0\",prs:[185]}]},\"sentry.dsc.transaction\":{brief:\"The transaction name from the dynamic sampling context.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"internal\",example:\"/issues/errors-outages/\",changelog:[{version:\"0.3.0\",prs:[185]}]},\"sentry.environment\":{brief:\"The sentry environment.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"production\",aliases:[\"environment\"],changelog:[{version:\"0.0.0\"}]},\"sentry.exclusive_time\":{brief:\"The exclusive time duration of the span in milliseconds.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.3.0\",prs:[160]},{version:\"0.0.0\"}]},\"sentry.graphql.operation\":{brief:\"Indicates the type of graphql operation, emitted by the Javascript SDK.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"getUserById\",changelog:[{version:\"0.3.1\",prs:[190]}]},\"sentry.group\":{brief:\"Stores the hash of `sentry.normalized_description`. This is primarily used for grouping spans in the product end.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",changelog:[{version:\"0.4.0\",prs:[212]}]},\"sentry.http.prefetch\":{brief:\"If an http request was a prefetch request.\",type:\"boolean\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.0.0\"}]},\"sentry.idle_span_finish_reason\":{brief:\"The reason why an idle span ended early.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"idleTimeout\",changelog:[{version:\"0.0.0\"}]},\"sentry.is_remote\":{brief:\"Indicates whether a span's parent is remote.\",type:\"boolean\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.3.1\",prs:[190]}]},\"sentry.kind\":{brief:\"Used to clarify the relationship between parents and children, or to distinguish between spans, e.g. a `server` and `client` span with the same name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"server\",aliases:[\"otel.kind\"],changelog:[{version:\"0.3.1\",prs:[190]}]},\"sentry.main_thread\":{brief:\"Whether the span or event occurred on the main thread. Computed by Relay and should not be set by SDKs.\",type:\"boolean\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.5.0\"}]},\"sentry.message.parameter.\":{brief:\"A parameter used in the message template. can either be the number that represent the parameter's position in the template string (sentry.message.parameter.0, sentry.message.parameter.1, etc) or the parameter's name (sentry.message.parameter.item_id, sentry.message.parameter.user_id, etc)\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"sentry.message.parameter.0='123'\",changelog:[{version:\"0.1.0\",prs:[116]}]},\"sentry.message.template\":{brief:\"The parameterized template string.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Hello, {name}!\",changelog:[{version:\"0.1.0\",prs:[116]}]},\"sentry.metric.source\":{brief:\"The provenance of a metric. For example, this can be set to indicate if a metric was generated by Relay from a span.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"span\",changelog:[{version:\"0.16.0\",prs:[476],description:\"Added sentry.metric.source attribute\"}]},\"sentry.mobile\":{brief:\"Whether the application is using a mobile SDK. Computed by Relay and should not be set by SDKs.\",type:\"boolean\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.5.0\"}]},\"sentry.module.\":{brief:\"A module that was loaded in the process. The key is the name of the module.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"sentry.module.brianium/paratest='v7.7.0'\",changelog:[{version:\"0.1.0\",prs:[103]}]},\"sentry.nextjs.ssr.function.route\":{brief:\"A parameterized route for a function in Next.js that contributes to Server-Side Rendering. Should be present on spans that track such functions when the file location of the function is known.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"/posts/[id]/layout\",changelog:[{version:\"0.1.0\",prs:[54,106]}]},\"sentry.nextjs.ssr.function.type\":{brief:\"A descriptor for a for a function in Next.js that contributes to Server-Side Rendering. Should be present on spans that track such functions.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"generateMetadata\",changelog:[{version:\"0.1.0\",prs:[54,106]}]},\"sentry.normalized_db_query\":{brief:\"The normalized version of `db.query.text`.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"SELECT .. FROM sentry_project WHERE (project_id = %s)\",changelog:[{version:\"0.3.1\",prs:[194]}]},\"sentry.normalized_db_query.hash\":{brief:\"The hash of `sentry.normalized_db_query`.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",changelog:[{version:\"0.4.0\",prs:[200]}]},\"sentry.normalized_description\":{brief:\"Used as a generic attribute representing the normalized `sentry.description`. This refers to the legacy use case of `sentry.description` where it holds relevant data depending on the type of span (e.g. database query, resource url, http request description, etc).\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"SELECT .. FROM sentry_project WHERE (project_id = %s)\",changelog:[{version:\"0.4.0\",prs:[212]}]},\"sentry.observed_timestamp_nanos\":{brief:\"The timestamp at which an envelope was received by Relay, in nanoseconds.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"1544712660300000000\",changelog:[{version:\"0.3.0\",prs:[174]},{version:\"0.2.0\",prs:[137]}]},\"sentry.op\":{brief:\"The operation of a span.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"http.client\",changelog:[{version:\"0.0.0\"}]},\"sentry.origin\":{brief:\"The origin of the instrumentation (e.g. span, log, etc.)\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"auto.http.otel.fastify\",changelog:[{version:\"0.1.0\",prs:[68]},{version:\"0.0.0\"}]},\"sentry.platform\":{brief:\"The sdk platform that generated the event.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"php\",changelog:[{version:\"0.0.0\"}]},\"sentry.profiler_id\":{brief:\"The id of the currently running profiler (continuous profiling)\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"18779b64dd35d1a538e7ce2dd2d3fad3\",changelog:[{version:\"0.4.0\",prs:[242]}]},\"sentry.profile_id\":{brief:\"The ID of the Sentry profile the span is associated with. This is only meaningful for transaction-based profiling.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"123e4567e89b12d3a456426614174000\",changelog:[{version:\"0.6.0\",prs:[344],description:\"Added sentry.profile_id attribute\"}]},\"sentry.release\":{brief:\"The sentry release.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"7.0.0\",aliases:[\"service.version\",\"release\"],changelog:[{version:\"0.0.0\"}]},\"sentry.replay_id\":{brief:\"The id of the sentry replay.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"123e4567e89b12d3a456426614174000\",aliases:[\"replay_id\"],changelog:[{version:\"0.0.0\"}]},\"sentry.replay_is_buffering\":{brief:\"A sentinel attribute on log events indicating whether the current Session Replay is being buffered (onErrorSampleRate).\",type:\"boolean\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.3.0\",prs:[185]}]},\"sentry.report_event\":{brief:\"(Deprecated) The event that caused the SDK to report CLS or LCP (pagehide or navigation)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"pagehide\",deprecation:{reason:\"The report event is now recorded as a browser.web_vital.lcp.report_event or browser.web_vital.cls.report_event attribute. No backfill required.\"},changelog:[{version:\"0.5.0\",prs:[320],description:\"Added sentry.report_event attribute\"}]},\"sentry.sdk.integrations\":{brief:\"A list of names identifying enabled integrations. The list shouldhave all enabled integrations, including default integrations. Defaultintegrations are included because different SDK releases may contain differentdefault integrations.\",type:\"string[]\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:[\"InboundFilters\",\"FunctionToString\",\"BrowserApiErrors\",\"Breadcrumbs\"],changelog:[{version:\"0.0.0\",prs:[42]}]},\"sentry.sdk.name\":{brief:\"The sentry sdk name.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"@sentry/react\",changelog:[{version:\"0.0.0\"}]},\"sentry.sdk.version\":{brief:\"The sentry sdk version.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"7.0.0\",changelog:[{version:\"0.0.0\"}]},\"sentry.segment.id\":{brief:\"The segment ID of a span\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"051581bf3cb55c13\",aliases:[\"sentry.segment_id\"],changelog:[{version:\"0.1.0\",prs:[107,124]}]},\"sentry.segment_id\":{brief:\"The segment ID of a span\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"051581bf3cb55c13\",deprecation:{replacement:\"sentry.segment.id\"},aliases:[\"sentry.segment.id\"],changelog:[{version:\"0.1.0\",prs:[124]}]},\"sentry.segment.name\":{brief:\"The segment name of a span\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"GET /user\",aliases:[\"sentry.transaction\",\"transaction\"],changelog:[{version:\"0.6.0\",prs:[345],description:\"Added sentry.transaction and transaction aliases\"},{version:\"0.1.0\",prs:[104]}]},\"sentry.server_sample_rate\":{brief:\"Rate at which a span was sampled in Relay.\",type:\"double\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:.5,changelog:[{version:\"0.1.0\",prs:[102]}]},\"sentry.source\":{brief:\"The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"route\",deprecation:{replacement:\"sentry.span.source\",reason:\"This attribute is being deprecated in favor of sentry.span.source\"},changelog:[{version:\"0.5.0\"}]},\"sentry.span.source\":{brief:\"The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"route\",changelog:[{version:\"0.4.0\",prs:[214]},{version:\"0.0.0\"}]},\"sentry.status\":{brief:`The span's status (either \"ok\" or \"error\"). Older SDKs may set this to a more specific error, but this behaviour is deprecated.`,type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"ok\",changelog:[{version:\"0.14.0\",prs:[453]}]},\"sentry.status_code\":{brief:\"The HTTP status code used in Sentry Insights. Typically set by Sentry during ingestion, rather than by clients.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:200,changelog:[{version:\"0.4.0\",prs:[223,228]}]},\"sentry.status.message\":{brief:\"The from OTLP extracted status message.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"foobar\",changelog:[{version:\"0.3.1\",prs:[190]}]},\"sentry.sveltekit.navigation.from\":{brief:\"the navigation origin (sveltekit router)\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"/home\",deprecation:{replacement:\"navigation.origin\",reason:\"Use the more generic attribute instead\"},aliases:[\"navigation.origin\"],changelog:[{version:\"0.16.0\",prs:[467],description:\"Added sentry.sveltekit.navigation.from attribute\"}]},\"sentry.sveltekit.navigation.to\":{brief:\"the navigation destination\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"/users/:id\",deprecation:{reason:\"the navigation destination is already covered by url.* attributes\"},changelog:[{version:\"0.16.0\",prs:[467],description:\"Added sentry.sveltekit.navigation.to attribute\"}]},\"sentry.sveltekit.navigation.type\":{brief:\"The type of navigation event emitted from the sveltekit client router\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"link\",deprecation:{replacement:\"navigation.type\",reason:\"Use the more generic attribute instead\"},aliases:[\"navigation.type\"],changelog:[{version:\"0.16.0\",prs:[467],description:\"Added sentry.sveltekit.navigation.type attribute\"}]},\"sentry.thread.id\":{brief:\"Current \\u201Cmanaged\\u201D thread ID.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:56,deprecation:{replacement:\"thread.id\",reason:\"This attribute is being deprecated in favor of the OTel-standard thread.id\"},changelog:[{version:\"0.13.0\",prs:[451]}]},\"sentry.timestamp.sequence\":{brief:\"A sequencing counter for deterministic ordering of logs or metrics when timestamps share the same integer millisecond. Starts at 0 on SDK initialization, increments by 1 for each captured item, and resets to 0 when the integer millisecond of the current item differs from the previous one.\",type:\"integer\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:0,changelog:[{version:\"0.5.0\",prs:[262]}]},\"sentry.trace_lifecycle\":{brief:\"Indicates the chosen trace lifecycle mode of the SDK (stream or static)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"stream\",changelog:[{version:\"0.13.0\",prs:[442],description:\"Added sentry.trace_lifecycle attribute\"}]},\"sentry.trace.parent_span_id\":{brief:\"The span id of the span that was active when the log was collected. This should not be set if there was no active span.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"b0e6f15b45c36b12\",deprecation:{},changelog:[{version:\"0.5.0\",prs:[287],description:\"Deprecate `sentry.trace.parent_span_id`\"},{version:\"0.1.0\",prs:[116]}]},\"sentry.trace.status\":{brief:`The segment's status (either \"ok\" or \"error\"). Older SDKs may set this to a more specific error, but this behaviour is deprecated.`,type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"ok\",changelog:[{version:\"0.14.0\",prs:[453]}]},\"sentry.transaction\":{brief:\"The sentry transaction (segment name).\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"GET /\",deprecation:{replacement:\"sentry.segment.name\",reason:\"This attribute is being deprecated in favor of sentry.segment.name\"},aliases:[\"sentry.segment.name\",\"transaction\"],changelog:[{version:\"0.6.0\",prs:[345],description:\"Deprecated sentry.transaction in favor of sentry.segment.name\"},{version:\"0.0.0\"}]},\"sentry.user.email\":{brief:\"User email address.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",deprecation:{replacement:\"user.email\"},aliases:[\"user.email\"],changelog:[{version:\"0.10.0\",prs:[406]}]},\"sentry.user.geo.city\":{brief:\"Human readable city name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",deprecation:{replacement:\"user.geo.city\"},aliases:[\"user.geo.city\"],changelog:[{version:\"0.10.0\",prs:[406]}]},\"sentry.user.geo.country_code\":{brief:\"Two-letter country code (ISO 3166-1 alpha-2).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",deprecation:{replacement:\"user.geo.country_code\"},aliases:[\"user.geo.country_code\"],changelog:[{version:\"0.10.0\",prs:[406]}]},\"sentry.user.geo.region\":{brief:\"Human readable region name or code.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",deprecation:{replacement:\"user.geo.region\"},aliases:[\"user.geo.region\"],changelog:[{version:\"0.10.0\",prs:[406]}]},\"sentry.user.geo.subdivision\":{brief:\"Human readable subdivision name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",deprecation:{replacement:\"user.geo.subdivision\"},aliases:[\"user.geo.subdivision\"],changelog:[{version:\"0.10.0\",prs:[406]}]},\"sentry.user.id\":{brief:\"Unique identifier of the user.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",deprecation:{replacement:\"user.id\"},aliases:[\"user.id\"],changelog:[{version:\"0.10.0\",prs:[406]}]},\"sentry.user.ip\":{brief:\"The IP address of the user.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",deprecation:{replacement:\"user.ip_address\"},aliases:[\"user.ip_address\"],changelog:[{version:\"0.10.0\",prs:[406]}]},\"sentry.user.username\":{brief:\"Short name or login/username of the user.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",deprecation:{replacement:\"user.name\"},aliases:[\"user.name\"],changelog:[{version:\"0.10.0\",prs:[406]}]},\"server.address\":{brief:\"Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"example.com\",aliases:[\"http.server_name\",\"net.host.name\",\"http.host\",\"server_name\"],changelog:[{version:\"0.1.0\",prs:[108,127]},{version:\"0.0.0\"}]},server_name:{brief:\"Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"example.com\",deprecation:{replacement:\"server.address\",reason:\"This attribute is being deprecated in favor of server.address, which is the OTel-aligned replacement.\"},aliases:[\"server.address\",\"http.server_name\",\"net.host.name\",\"http.host\"],changelog:[{version:\"0.16.0\",prs:[477],description:\"Added server_name attribute, deprecated in favor of server.address\"}]},\"server.port\":{brief:\"Server port number.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:1337,aliases:[\"net.host.port\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"service.name\":{brief:\"Logical name of the service.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"omegastar\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"service.version\":{brief:\"The version string of the service API or implementation. The format is not defined by these conventions.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"5.0.0\",aliases:[\"sentry.release\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"session.id\":{brief:\"A unique id identifying the active session at the time of setting this attribute\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"00112233-4455-6677-8899-aabbccddeeff\",changelog:[{version:\"0.11.0\",prs:[412],description:\"Added session.id attribute\"}]},stall_percentage:{brief:\"The fraction of time the app was stalled. Only applies to React Native. This is computed by Relay.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",changelog:[{version:\"0.7.0\",prs:[362],description:\"Added stall_percentage attribute\"}]},stall_total_time:{brief:\"The combined duration of all stalls in milliseconds. Only applies to React Native. This is computed by Relay.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",changelog:[{version:\"0.7.0\",prs:[362],description:\"Added stall_total_time attribute\"}]},\"state.type\":{brief:\"The type of state management library\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"redux\",changelog:[{version:\"0.7.0\",prs:[365],description:\"Added state.type attribute\"}]},\"thread.id\":{brief:\"Current \\u201Cmanaged\\u201D thread ID.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:56,changelog:[{version:\"0.0.0\"}]},\"thread.name\":{brief:\"Current thread name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"main\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"timber.tag\":{brief:\"The log tag provided by the timber logging framework.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"MyTag\",changelog:[{version:\"0.3.0\",prs:[183]}]},time_to_full_display:{brief:\"The duration of time to full display in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234.56,deprecation:{replacement:\"app.vitals.ttfd.value\",reason:\"Replaced by app.vitals.ttfd.value to align with the app.vitals.* namespace for mobile performance attributes\"},aliases:[\"app.vitals.ttfd.value\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added and deprecated in favor of app.vitals.ttfd.value\"}]},time_to_initial_display:{brief:\"The duration of time to initial display in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234.56,deprecation:{replacement:\"app.vitals.ttid.value\",reason:\"Replaced by app.vitals.ttid.value to align with the app.vitals.* namespace for mobile performance attributes\"},aliases:[\"app.vitals.ttid.value\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added and deprecated in favor of app.vitals.ttid.value\"}]},transaction:{brief:\"The sentry transaction (segment name).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"GET /\",deprecation:{replacement:\"sentry.segment.name\"},aliases:[\"sentry.segment.name\",\"sentry.transaction\"],changelog:[{version:\"0.6.0\",prs:[345],description:\"Updated transaction deprecation replacement to sentry.segment.name\"},{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"trpc.procedure_path\":{brief:\"The path of the tRPC procedure being called\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"user.getById\",changelog:[{version:\"0.7.0\",prs:[370],description:\"Added trpc.procedure_path attribute\"}]},\"trpc.procedure_type\":{brief:\"The type of the tRPC procedure\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"query\",changelog:[{version:\"0.7.0\",prs:[370],description:\"Added trpc.procedure_type attribute\"}]},ttfb:{brief:\"The value of the recorded Time To First Byte (TTFB) web vital in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:194,deprecation:{replacement:\"browser.web_vital.ttfb.value\",reason:\"This attribute is being deprecated in favor of browser.web_vital.ttfb.value\"},aliases:[\"browser.web_vital.ttfb.value\"],changelog:[{version:\"0.5.0\",prs:[235]}]},\"ttfb.requestTime\":{brief:\"The time it takes for the server to process the initial request and send the first byte of a response to the user's browser\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1554.5814,deprecation:{replacement:\"browser.web_vital.ttfb.request_time\",reason:\"This attribute is being deprecated in favor of browser.web_vital.ttfb.request_time\"},aliases:[\"browser.web_vital.ttfb.request_time\"],changelog:[{version:\"0.5.0\",prs:[235]}]},type:{brief:\"More granular type of the operation happening.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"fetch\",changelog:[{version:\"0.0.0\"}]},\"ui.component_name\":{brief:\"The name of the associated component.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"HomeButton\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"ui.contributes_to_ttfd\":{brief:\"Whether the span execution contributed to the TTFD (time to fully drawn) metric.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.0.0\"}]},\"ui.contributes_to_ttid\":{brief:\"Whether the span execution contributed to the TTID (time to initial display) metric.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.0.0\"}]},\"ui.element.height\":{brief:\"The height of the UI element (for Html in pixels)\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:256,changelog:[{version:\"0.5.0\",prs:[284],description:\"Added ui.element.height attribute\"}]},\"ui.element.id\":{brief:\"The id of the UI element\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"btn-login\",changelog:[{version:\"0.5.0\",prs:[284],description:\"Added ui.element.id attribute\"}]},\"ui.element.identifier\":{brief:\"The identifier used to measure the UI element timing\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"heroImage\",changelog:[{version:\"0.5.0\",prs:[284],description:\"Added ui.element.identifier attribute\"}]},\"ui.element.load_time\":{brief:\"The loading time of a UI element (from time origin to finished loading)\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:998.2234,changelog:[{version:\"0.5.0\",prs:[284],description:\"Added ui.element.load_time attribute\"}]},\"ui.element.paint_type\":{brief:\"The type of element paint. Can either be 'image-paint' or 'text-paint'\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"image-paint\",changelog:[{version:\"0.5.0\",prs:[284],description:\"Added ui.element.paint_type attribute\"}]},\"ui.element.render_time\":{brief:\"The rendering time of the UI element (from time origin to finished rendering)\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1023.1124,changelog:[{version:\"0.5.0\",prs:[284],description:\"Added ui.element.render_time attribute\"}]},\"ui.element.type\":{brief:\"type of the UI element\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"img\",changelog:[{version:\"0.5.0\",prs:[284],description:\"Added ui.element.type attribute\"}]},\"ui.element.url\":{brief:\"The URL of the UI element (e.g. an img src)\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"https://assets.myapp.com/hero.png\",changelog:[{version:\"0.5.0\",prs:[284],description:\"Added ui.element.url attribute\"}]},\"ui.element.width\":{brief:\"The width of the UI element (for HTML in pixels)\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:512,changelog:[{version:\"0.5.0\",prs:[284],description:\"Added ui.element.width attribute\"}]},url:{brief:\"The URL of the resource that was fetched.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"https://example.com/test?foo=bar#buzz\",deprecation:{replacement:\"url.full\"},aliases:[\"url.full\",\"http.url\"],changelog:[{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"url.domain\":{brief:\"Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"example.com\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"url.fragment\":{brief:\"The fragments present in the URI. Note that this does not contain the leading # character, while the `http.fragment` attribute does.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"details\",changelog:[{version:\"0.0.0\"}]},\"url.full\":{brief:\"The URL of the resource that was fetched.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"https://example.com/test?foo=bar#buzz\",aliases:[\"http.url\",\"url\"],changelog:[{version:\"0.1.0\",prs:[108]},{version:\"0.0.0\"}]},\"url.path\":{brief:\"The URI path component.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"/foo\",changelog:[{version:\"0.0.0\"}]},\"url.path.parameter.\":{brief:\"Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"url.path.parameter.id='123'\",aliases:[\"params.\"],changelog:[{version:\"0.1.0\",prs:[103]}]},\"url.port\":{brief:\"Server port number.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:1337,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"url.query\":{brief:\"The query string present in the URL. Note that this does not contain the leading ? character, while the `http.query` attribute does.\",type:\"string\",applyScrubbing:{key:\"auto\",reason:\"Query string values can contain sensitive information. Clients should attempt to scrub parameters that might contain sensitive information.\"},isInOtel:!0,visibility:\"public\",example:\"foo=bar&bar=baz\",changelog:[{version:\"0.0.0\"}]},\"url.same_origin\":{brief:\"Indicates that a URL has the same origin as the current page's origin in the browser.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,deprecation:{replacement:\"http.request.same_origin\",reason:\"This attribute is being deprecated in favor of http.request.same_origin.\"},aliases:[\"http.request.same_origin\"],changelog:[{version:\"0.16.0\",prs:[456],description:\"Added url.same_origin attribute, deprecated in favor of http.request.same_origin\"}]},\"url.scheme\":{brief:\"The URI scheme component identifying the used protocol.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"https\",aliases:[\"http.scheme\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"url.template\":{brief:\"The low-cardinality template of an absolute path reference.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"/users/:id\",aliases:[\"http.route\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"user_agent.original\":{brief:\"Value of the HTTP User-Agent header sent by the client.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1\",aliases:[\"http.user_agent\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"user.email\":{brief:\"User email address.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"test@example.com\",aliases:[\"sentry.user.email\"],changelog:[{version:\"0.0.0\"}]},\"user.full_name\":{brief:\"User's full name.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"John Smith\",changelog:[{version:\"0.0.0\"}]},\"user.geo.city\":{brief:\"Human readable city name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Toronto\",aliases:[\"sentry.user.geo.city\"],changelog:[{version:\"0.0.0\"}]},\"user.geo.country_code\":{brief:\"Two-letter country code (ISO 3166-1 alpha-2).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"CA\",aliases:[\"sentry.user.geo.country_code\"],changelog:[{version:\"0.0.0\"}]},\"user.geo.region\":{brief:\"Human readable region name or code.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Canada\",aliases:[\"sentry.user.geo.region\"],changelog:[{version:\"0.0.0\"}]},\"user.geo.subdivision\":{brief:\"Human readable subdivision name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Ontario\",aliases:[\"sentry.user.geo.subdivision\"],changelog:[{version:\"0.0.0\"}]},\"user.hash\":{brief:\"Unique user hash to correlate information for a user in anonymized form.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"8ae4c2993e0f4f3b8b2d1b1f3b5e8f4d\",changelog:[{version:\"0.0.0\"}]},\"user.id\":{brief:\"Unique identifier of the user.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"S-1-5-21-202424912787-2692429404-2351956786-1000\",aliases:[\"sentry.user.id\"],changelog:[{version:\"0.0.0\"}]},\"user.ip_address\":{brief:\"The IP address of the user.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"192.168.1.1\",aliases:[\"sentry.user.ip\"],changelog:[{version:\"0.1.0\",prs:[75]}]},\"user.name\":{brief:\"Short name or login/username of the user.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"j.smith\",aliases:[\"sentry.user.username\"],changelog:[{version:\"0.0.0\"}]},\"user.roles\":{brief:\"Array of user roles at the time of the event.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:[\"admin\",\"editor\"],changelog:[{version:\"0.0.0\"}]},\"vercel.branch\":{brief:\"Git branch name for Vercel project\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"main\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.build_id\":{brief:\"Identifier for the Vercel build (only present on build logs)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"bld_cotnkcr76\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.deployment_id\":{brief:\"Identifier for the Vercel deployment\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"dpl_233NRGRjVZX1caZrXWtz5g1TAksD\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.destination\":{brief:\"Origin of the external content in Vercel (only on external logs)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"https://vitals.vercel-insights.com/v1\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.edge_type\":{brief:\"Type of edge runtime in Vercel\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"edge-function\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.entrypoint\":{brief:\"Entrypoint for the request in Vercel\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"api/index.js\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.execution_region\":{brief:\"Region where the request is executed\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"sfo1\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.id\":{brief:\"Unique identifier for the log entry in Vercel\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1573817187330377061717300000\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.ja3_digest\":{brief:\"JA3 fingerprint digest of Vercel request\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"769,47-53-5-10-49161-49162-49171-49172-50-56-19-4,0-10-11,23-24-25,0\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.ja4_digest\":{brief:\"JA4 fingerprint digest\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"t13d1516h2_8daaf6152771_02713d6af862\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.log_type\":{brief:\"Vercel log output type\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"stdout\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.path\":{brief:\"Function or dynamic path of the request in Vercel.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"/dynamic/[route].json\",changelog:[{version:\"0.6.0\",prs:[349],description:\"Added vercel.path attribute\"}]},\"vercel.project_id\":{brief:\"Identifier for the Vercel project\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"gdufoJxB6b9b1fEqr1jUtFkyavUU\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.project_name\":{brief:\"Name of the Vercel project\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"my-app\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.cache_id\":{brief:\"Original request ID when request is served from cache\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"pdx1::v8g4b-1744143786684-93dafbc0f70d\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.client_ip\":{brief:\"Client IP address\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"120.75.16.101\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.host\":{brief:\"Hostname of the request\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"test.vercel.app\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.lambda_region\":{brief:\"Region where lambda function executed\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"sfo1\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.method\":{brief:\"HTTP method of the request\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"GET\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.path\":{brief:\"Request path with query parameters\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"/dynamic/some-value.json?route=some-value\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.path_type\":{brief:\"How the request was served based on its path and project configuration\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"func\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.path_type_variant\":{brief:\"Variant of the path type\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"api\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.referer\":{brief:\"Referer of the request\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"*.vercel.app\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.region\":{brief:\"Region where the request is processed\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"sfo1\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.response_byte_size\":{brief:\"Size of the response in bytes\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1024,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.scheme\":{brief:\"Protocol of the request\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"https\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.status_code\":{brief:\"HTTP status code of the proxy request\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:200,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.timestamp\":{brief:\"Unix timestamp when the proxy request was made\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1573817250172,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.user_agent\":{brief:\"User agent strings of the request\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:[\"Mozilla/5.0...\"],changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.vercel_cache\":{brief:\"Cache status sent to the browser\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"REVALIDATED\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.vercel_id\":{brief:\"Vercel-specific identifier\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"sfo1::abc123\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.waf_action\":{brief:\"Action taken by firewall rules\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"deny\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.waf_rule_id\":{brief:\"ID of the firewall rule that matched\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"rule_gAHz8jtSB1Gy\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.request_id\":{brief:\"Identifier of the Vercel request\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"643af4e3-975a-4cc7-9e7a-1eda11539d90\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.source\":{brief:\"Origin of the Vercel log (build, edge, lambda, static, external, or firewall)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"build\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.status_code\":{brief:\"HTTP status code of the request (-1 means no response returned and the lambda crashed)\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:200,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.2.0\",prs:[163]}]}};export{e as AI_CITATIONS,i as AI_COMPLETION_TOKENS_USED,t as AI_DOCUMENTS,n as AI_FINISH_REASON,r as AI_FREQUENCY_PENALTY,a as AI_FUNCTION_CALL,s as AI_GENERATION_ID,o as AI_INPUT_MESSAGES,l as AI_IS_SEARCH_REQUIRED,p as AI_METADATA,c as AI_MODEL_ID,u as AI_MODEL_PROVIDER,b as AI_PIPELINE_NAME,g as AI_PREAMBLE,d as AI_PRESENCE_PENALTY,m as AI_PROMPT_TOKENS_USED,y as AI_RAW_PROMPTING,_ as AI_RESPONSES,h as AI_RESPONSE_FORMAT,v as AI_SEARCH_QUERIES,f as AI_SEARCH_RESULTS,S as AI_SEED,E as AI_STREAMING,T as AI_TAGS,I as AI_TEMPERATURE,O as AI_TEXTS,k as AI_TOOLS,A as AI_TOOL_CALLS,x as AI_TOP_K,w as AI_TOP_P,R as AI_TOTAL_COST,N as AI_TOTAL_TOKENS_USED,C as AI_WARNINGS,P as ANGULAR_VERSION,D as APP_APP_BUILD,L as APP_APP_IDENTIFIER,U as APP_APP_NAME,M as APP_APP_START_TIME,q as APP_APP_VERSION,G as APP_BUILD,Y as APP_IDENTIFIER,V as APP_IN_FOREGROUND,W as APP_NAME,F as APP_START_COLD,B as APP_START_TIME,H as APP_START_TYPE,z as APP_START_WARM,K as APP_VERSION,j as APP_VITALS_FRAMES_DELAY_VALUE,Q as APP_VITALS_FRAMES_FROZEN_COUNT,X as APP_VITALS_FRAMES_SLOW_COUNT,J as APP_VITALS_FRAMES_TOTAL_COUNT,Z as APP_VITALS_START_COLD_VALUE,$ as APP_VITALS_START_PREWARMED,ee as APP_VITALS_START_REASON,ie as APP_VITALS_START_SCREEN,te as APP_VITALS_START_TYPE,ne as APP_VITALS_START_WARM_VALUE,re as APP_VITALS_TTFD_VALUE,ae as APP_VITALS_TTID_VALUE,se as ART_GC_BLOCKING_COUNT,oe as ART_GC_BLOCKING_TIME,le as ART_GC_PRE_OOME_COUNT,pe as ART_GC_TOTAL_COUNT,ce as ART_GC_TOTAL_TIME,ue as ART_GC_WAITING_TIME,be as ART_MEMORY_FREE,ge as ART_MEMORY_FREE_UNTIL_GC,de as ART_MEMORY_FREE_UNTIL_OOME,me as ART_MEMORY_MAX,ye as ART_MEMORY_TOTAL,Bb as ATTRIBUTE_METADATA,Fb as ATTRIBUTE_TYPE,_e as AWS_CLOUDWATCH_LOGS_LOG_GROUP,he as AWS_CLOUDWATCH_LOGS_LOG_STREAM,ve as AWS_CLOUDWATCH_LOGS_URL,fe as AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS,Se as AWS_DYNAMODB_CONSISTENT_READ,Ee as AWS_DYNAMODB_CONSUMED_CAPACITY,Te as AWS_DYNAMODB_COUNT,Ie as AWS_DYNAMODB_EXCLUSIVE_START_TABLE,Oe as AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES,ke as AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES,Ae as AWS_DYNAMODB_INDEX_NAME,xe as AWS_DYNAMODB_ITEM_COLLECTION_METRICS,we as AWS_DYNAMODB_LIMIT,Re as AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES,Ne as AWS_DYNAMODB_PROJECTION,Ce as AWS_DYNAMODB_PROVISIONED_READ_CAPACITY,Pe as AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY,De as AWS_DYNAMODB_SCANNED_COUNT,Le as AWS_DYNAMODB_SCAN_FORWARD,Ue as AWS_DYNAMODB_SEGMENT,Me as AWS_DYNAMODB_SELECT,qe as AWS_DYNAMODB_TABLE_COUNT,Ge as AWS_DYNAMODB_TABLE_NAMES,Ye as AWS_DYNAMODB_TOTAL_SEGMENTS,Ve as AWS_EXTENDED_REQUEST_ID,We as AWS_KINESIS_STREAM_NAME,Be as AWS_LAMBDA_AWS_REQUEST_ID,He as AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS,ze as AWS_LAMBDA_FUNCTION_NAME,Ke as AWS_LAMBDA_FUNCTION_VERSION,je as AWS_LAMBDA_INVOKED_ARN,Qe as AWS_LAMBDA_INVOKED_FUNCTION_ARN,Xe as AWS_LAMBDA_REMAINING_TIME_IN_MILLIS,Je as AWS_LOG_GROUP_NAMES,Ze as AWS_LOG_STREAM_NAMES,$e as AWS_REQUEST_EXTENDED_ID,ei as AWS_REQUEST_ID,ti as AWS_S3_BUCKET,ni as AWS_SECRETSMANAGER_SECRET_ARN,ri as AWS_SNS_TOPIC_ARN,ai as AWS_STEP_FUNCTIONS_ACTIVITY_ARN,si as AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN,oi as BLOCKED_MAIN_THREAD,li as BROWSER_NAME,pi as BROWSER_PERFORMANCE_NAVIGATION_ACTIVATION_START,ci as BROWSER_PERFORMANCE_TIME_ORIGIN,ui as BROWSER_REPORT_TYPE,bi as BROWSER_SCRIPT_INVOKER,gi as BROWSER_SCRIPT_INVOKER_TYPE,di as BROWSER_SCRIPT_SOURCE_CHAR_POSITION,mi as BROWSER_VERSION,yi as BROWSER_WEB_VITAL_CLS_REPORT_EVENT,_i as BROWSER_WEB_VITAL_CLS_SOURCE_KEY,hi as BROWSER_WEB_VITAL_CLS_SOURCE_KEY_BASE,vi as BROWSER_WEB_VITAL_CLS_VALUE,fi as BROWSER_WEB_VITAL_FCP_VALUE,Si as BROWSER_WEB_VITAL_FP_VALUE,Ei as BROWSER_WEB_VITAL_INP_VALUE,Ti as BROWSER_WEB_VITAL_LCP_ELEMENT,Ii as BROWSER_WEB_VITAL_LCP_ID,Oi as BROWSER_WEB_VITAL_LCP_LOAD_TIME,ki as BROWSER_WEB_VITAL_LCP_RENDER_TIME,Ai as BROWSER_WEB_VITAL_LCP_REPORT_EVENT,xi as BROWSER_WEB_VITAL_LCP_SIZE,wi as BROWSER_WEB_VITAL_LCP_URL,Ri as BROWSER_WEB_VITAL_LCP_VALUE,Ni as BROWSER_WEB_VITAL_TTFB_REQUEST_TIME,Ci as BROWSER_WEB_VITAL_TTFB_VALUE,Pi as CACHE_HIT,Di as CACHE_ITEM_SIZE,Li as CACHE_KEY,Ui as CACHE_OPERATION,Mi as CACHE_TTL,qi as CACHE_WRITE,Gi as CHANNEL,Yi as CLIENT_ADDRESS,Vi as CLIENT_PORT,Wi as CLOUDFLARE_D1_DURATION,Fi as CLOUDFLARE_D1_QUERY_TYPE,Bi as CLOUDFLARE_D1_ROWS_READ,Hi as CLOUDFLARE_D1_ROWS_WRITTEN,zi as CLOUDFLARE_DURABLE_OBJECT_QUERY_BINDINGS,Ki as CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_READ,ji as CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_WRITTEN,Qi as CLOUDFLARE_R2_BUCKET,Xi as CLOUDFLARE_R2_OPERATION,Ji as CLOUDFLARE_R2_REQUEST_DELIMITER,Zi as CLOUDFLARE_R2_REQUEST_KEY,$i as CLOUDFLARE_R2_REQUEST_PART_NUMBER,et as CLOUDFLARE_R2_REQUEST_PREFIX,it as CLOUDFLARE_WORKFLOW_ATTEMPT,tt as CLOUDFLARE_WORKFLOW_RETRIES_BACKOFF,nt as CLOUDFLARE_WORKFLOW_RETRIES_DELAY,rt as CLOUDFLARE_WORKFLOW_RETRIES_LIMIT,at as CLOUDFLARE_WORKFLOW_TIMEOUT,st as CLOUD_ACCOUNT_ID,ot as CLOUD_AVAILABILITY_ZONE,lt as CLOUD_PLATFORM,pt as CLOUD_PROVIDER,ct as CLOUD_REGION,ut as CLOUD_RESOURCE_ID,bt as CLS,gt as CLS_SOURCE_KEY,dt as CLS_SOURCE_KEY_BASE,mt as CODE_FILEPATH,yt as CODE_FILE_PATH,_t as CODE_FUNCTION,ht as CODE_FUNCTION_NAME,vt as CODE_LINENO,ft as CODE_LINE_NUMBER,St as CODE_NAMESPACE,Et as CONNECTIONTYPE,Tt as CONNECTION_RTT,It as CULTURE_CALENDAR,Ot as CULTURE_DISPLAY_NAME,kt as CULTURE_IS_24_HOUR_FORMAT,At as CULTURE_LOCALE,xt as CULTURE_TIMEZONE,wt as DB_COLLECTION_NAME,Rt as DB_DRIVER_NAME,Nt as DB_NAME,Ct as DB_NAMESPACE,Pt as DB_OPERATION,Dt as DB_OPERATION_BATCH_SIZE,Lt as DB_OPERATION_NAME,Ut as DB_QUERY_PARAMETER_KEY,Mt as DB_QUERY_PARAMETER_KEY_BASE,qt as DB_QUERY_SUMMARY,Gt as DB_QUERY_TEXT,Yt as DB_REDIS_CONNECTION,Vt as DB_REDIS_KEY,Wt as DB_REDIS_PARAMETERS,Ft as DB_RESPONSE_STATUS_CODE,Bt as DB_SQL_BINDINGS,Ht as DB_STATEMENT,zt as DB_STORED_PROCEDURE_NAME,Kt as DB_SYSTEM,jt as DB_SYSTEM_NAME,Qt as DB_USER,Xt as DEVICEMEMORY,Jt as DEVICE_ARCHS,Zt as DEVICE_BATTERY_LEVEL,$t as DEVICE_BATTERY_TEMPERATURE,en as DEVICE_BOOT_TIME,tn as DEVICE_BRAND,nn as DEVICE_CHARGING,rn as DEVICE_CHIPSET,an as DEVICE_CLASS,sn as DEVICE_CONNECTION_TYPE,on as DEVICE_CPU_DESCRIPTION,ln as DEVICE_EXTERNAL_FREE_STORAGE,pn as DEVICE_EXTERNAL_STORAGE_SIZE,cn as DEVICE_FAMILY,un as DEVICE_FREE_MEMORY,bn as DEVICE_FREE_STORAGE,gn as DEVICE_ID,dn as DEVICE_LOCALE,mn as DEVICE_LOW_MEMORY,yn as DEVICE_LOW_POWER_MODE,_n as DEVICE_MANUFACTURER,hn as DEVICE_MEMORY_ESTIMATED_CAPACITY,vn as DEVICE_MEMORY_SIZE,fn as DEVICE_MODEL,Sn as DEVICE_MODEL_ID,En as DEVICE_NAME,Tn as DEVICE_ONLINE,In as DEVICE_ORIENTATION,On as DEVICE_PROCESSOR_COUNT,kn as DEVICE_PROCESSOR_FREQUENCY,An as DEVICE_SCREEN_DENSITY,xn as DEVICE_SCREEN_DPI,wn as DEVICE_SCREEN_HEIGHT_PIXELS,Rn as DEVICE_SCREEN_WIDTH_PIXELS,Nn as DEVICE_SIMULATOR,Cn as DEVICE_STORAGE_SIZE,Pn as DEVICE_THERMAL_STATE,Dn as DEVICE_TIMEZONE,Ln as DEVICE_USABLE_MEMORY,Un as DIST,Mn as EFFECTIVECONNECTIONTYPE,qn as ENVIRONMENT,Gn as ERROR_TYPE,Yn as EVENT_ID,Vn as EVENT_NAME,Wn as EXCEPTION_ESCAPED,Fn as EXCEPTION_MESSAGE,Bn as EXCEPTION_STACKTRACE,Hn as EXCEPTION_TYPE,zn as FAAS_COLDSTART,Kn as FAAS_CRON,jn as FAAS_DURATION_IN_MS,Qn as FAAS_ENTRY_POINT,Xn as FAAS_EXECUTION,Jn as FAAS_ID,Zn as FAAS_IDENTITY,$n as FAAS_INVOCATION_ID,er as FAAS_INVOKED_NAME,ir as FAAS_INVOKED_PROVIDER,tr as FAAS_INVOKED_REGION,nr as FAAS_NAME,rr as FAAS_TIME,ar as FAAS_TRIGGER,sr as FAAS_VERSION,or as FCP,lr as FLAG_EVALUATION_KEY,pr as FLAG_EVALUATION_KEY_BASE,cr as FP,ur as FRAMES_DELAY,br as FRAMES_FROZEN,gr as FRAMES_FROZEN_RATE,dr as FRAMES_SLOW,mr as FRAMES_SLOW_RATE,yr as FRAMES_TOTAL,_r as FS_ERROR,hr as GCP_FUNCTION_CONTEXT_EVENT_ID,vr as GCP_FUNCTION_CONTEXT_EVENT_TYPE,fr as GCP_FUNCTION_CONTEXT_ID,Sr as GCP_FUNCTION_CONTEXT_RESOURCE,Er as GCP_FUNCTION_CONTEXT_SOURCE,Tr as GCP_FUNCTION_CONTEXT_SPECVERSION,Ir as GCP_FUNCTION_CONTEXT_TIME,Or as GCP_FUNCTION_CONTEXT_TIMESTAMP,kr as GCP_FUNCTION_CONTEXT_TYPE,Ar as GCP_PROJECT_ID,xr as GEN_AI_AGENT_NAME,wr as GEN_AI_CONTEXT_UTILIZATION,Rr as GEN_AI_CONTEXT_WINDOW_SIZE,Nr as GEN_AI_CONVERSATION_ID,Cr as GEN_AI_COST_CACHE_CREATION_INPUT_TOKENS,Pr as GEN_AI_COST_CACHE_READ_INPUT_TOKENS,Dr as GEN_AI_COST_INPUT_TOKENS,Lr as GEN_AI_COST_OUTPUT_TOKENS,Ur as GEN_AI_COST_REASONING_OUTPUT_TOKENS,Mr as GEN_AI_COST_TOTAL_TOKENS,qr as GEN_AI_EMBEDDINGS_INPUT,Gr as GEN_AI_FUNCTION_ID,Yr as GEN_AI_INPUT_MESSAGES,Vr as GEN_AI_OPERATION_NAME,Wr as GEN_AI_OPERATION_TYPE,Fr as GEN_AI_OUTPUT_MESSAGES,Br as GEN_AI_PIPELINE_NAME,Hr as GEN_AI_PROMPT,zr as GEN_AI_PROMPT_NAME,Kr as GEN_AI_PROVIDER_NAME,jr as GEN_AI_REQUEST_AVAILABLE_TOOLS,Qr as GEN_AI_REQUEST_FREQUENCY_PENALTY,Xr as GEN_AI_REQUEST_MAX_TOKENS,Jr as GEN_AI_REQUEST_MESSAGES,Zr as GEN_AI_REQUEST_MODEL,$r as GEN_AI_REQUEST_PRESENCE_PENALTY,ea as GEN_AI_REQUEST_REASONING_EFFORT,ia as GEN_AI_REQUEST_SEED,ta as GEN_AI_REQUEST_STOP_SEQUENCES,na as GEN_AI_REQUEST_TEMPERATURE,ra as GEN_AI_REQUEST_TOP_K,aa as GEN_AI_REQUEST_TOP_P,sa as GEN_AI_RESPONSE_FINISH_REASONS,oa as GEN_AI_RESPONSE_ID,la as GEN_AI_RESPONSE_MODEL,pa as GEN_AI_RESPONSE_STREAMING,ca as GEN_AI_RESPONSE_TEXT,ua as GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK,ba as GEN_AI_RESPONSE_TIME_TO_FIRST_TOKEN,ga as GEN_AI_RESPONSE_TOKENS_PER_SECOND,da as GEN_AI_RESPONSE_TOOL_CALLS,ma as GEN_AI_SYSTEM,ya as GEN_AI_SYSTEM_INSTRUCTIONS,_a as GEN_AI_SYSTEM_MESSAGE,ha as GEN_AI_TOOL_CALL_ARGUMENTS,va as GEN_AI_TOOL_CALL_RESULT,fa as GEN_AI_TOOL_DEFINITIONS,Sa as GEN_AI_TOOL_DESCRIPTION,Ea as GEN_AI_TOOL_INPUT,Ta as GEN_AI_TOOL_MESSAGE,Ia as GEN_AI_TOOL_NAME,Oa as GEN_AI_TOOL_OUTPUT,ka as GEN_AI_TOOL_TYPE,Aa as GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS,xa as GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS,wa as GEN_AI_USAGE_COMPLETION_TOKENS,Ra as GEN_AI_USAGE_INPUT_TOKENS,Na as GEN_AI_USAGE_INPUT_TOKENS_CACHED,Ca as GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE,Pa as GEN_AI_USAGE_OUTPUT_TOKENS,Da as GEN_AI_USAGE_OUTPUT_TOKENS_REASONING,La as GEN_AI_USAGE_PROMPT_TOKENS,Ua as GEN_AI_USAGE_REASONING_OUTPUT_TOKENS,Ma as GEN_AI_USAGE_TOTAL_TOKENS,qa as GRAPHQL_DOCUMENT,Ga as GRAPHQL_OPERATION_NAME,Ya as GRAPHQL_OPERATION_TYPE,Va as HARDWARECONCURRENCY,Wa as HTTP_CLIENT_IP,Fa as HTTP_DECODED_RESPONSE_CONTENT_LENGTH,Ba as HTTP_FLAVOR,Ha as HTTP_FRAGMENT,za as HTTP_HOST,Ka as HTTP_METHOD,ja as HTTP_QUERY,Qa as HTTP_REQUEST_BODY_DATA,Xa as HTTP_REQUEST_CONNECTION_END,Ja as HTTP_REQUEST_CONNECT_START,Za as HTTP_REQUEST_DOMAIN_LOOKUP_END,$a as HTTP_REQUEST_DOMAIN_LOOKUP_START,es as HTTP_REQUEST_FETCH_START,is as HTTP_REQUEST_HEADER_KEY,ts as HTTP_REQUEST_HEADER_KEY_BASE,ns as HTTP_REQUEST_METHOD,as as HTTP_REQUEST_REDIRECT_END,ss as HTTP_REQUEST_REDIRECT_START,os as HTTP_REQUEST_REQUEST_START,ls as HTTP_REQUEST_RESEND_COUNT,ps as HTTP_REQUEST_RESPONSE_END,cs as HTTP_REQUEST_RESPONSE_START,us as HTTP_REQUEST_SAME_ORIGIN,bs as HTTP_REQUEST_SECURE_CONNECTION_START,gs as HTTP_REQUEST_TIME_TO_FIRST_BYTE,ds as HTTP_REQUEST_WORKER_START,ms as HTTP_RESPONSE_BODY_SIZE,ys as HTTP_RESPONSE_CONTENT_LENGTH,_s as HTTP_RESPONSE_HEADER_CONTENT_LENGTH,hs as HTTP_RESPONSE_HEADER_KEY,vs as HTTP_RESPONSE_HEADER_KEY_BASE,fs as HTTP_RESPONSE_SIZE,Ss as HTTP_RESPONSE_STATUS_CODE,Es as HTTP_RESPONSE_TRANSFER_SIZE,Ts as HTTP_ROUTE,Is as HTTP_SCHEME,Os as HTTP_SERVER_NAME,ks as HTTP_SERVER_REQUEST_TIME_IN_QUEUE,As as HTTP_STATUS_CODE,xs as HTTP_TARGET,ws as HTTP_URL,Rs as HTTP_USER_AGENT,Ns as ID,Cs as INP,Ps as JSONRPC_PROTOCOL_VERSION,Ds as JSONRPC_REQUEST_ID,Ls as JVM_GC_ACTION,Us as JVM_GC_NAME,Ms as JVM_MEMORY_POOL_NAME,qs as JVM_MEMORY_TYPE,Gs as JVM_THREAD_DAEMON,Ys as JVM_THREAD_STATE,Vs as KOA_NAME,Ws as KOA_TYPE,Fs as LCP,Bs as LCP_ELEMENT,Hs as LCP_ID,zs as LCP_LOADTIME,Ks as LCP_RENDERTIME,js as LCP_SIZE,Qs as LCP_URL,Xs as LOGGER_NAME,Js as MCP_CANCELLED_REASON,Zs as MCP_CANCELLED_REQUEST_ID,$s as MCP_CLIENT_NAME,eo as MCP_CLIENT_TITLE,io as MCP_CLIENT_VERSION,to as MCP_LIFECYCLE_PHASE,no as MCP_LOGGING_DATA_TYPE,ro as MCP_LOGGING_LEVEL,ao as MCP_LOGGING_LOGGER,so as MCP_LOGGING_MESSAGE,oo as MCP_METHOD_NAME,lo as MCP_PROGRESS_CURRENT,po as MCP_PROGRESS_MESSAGE,co as MCP_PROGRESS_PERCENTAGE,uo as MCP_PROGRESS_TOKEN,bo as MCP_PROGRESS_TOTAL,go as MCP_PROMPT_NAME,mo as MCP_PROMPT_RESULT_DESCRIPTION,yo as MCP_PROMPT_RESULT_MESSAGE_CONTENT,_o as MCP_PROMPT_RESULT_MESSAGE_COUNT,ho as MCP_PROMPT_RESULT_MESSAGE_ROLE,vo as MCP_PROTOCOL_READY,fo as MCP_PROTOCOL_VERSION,So as MCP_REQUEST_ARGUMENT_KEY,Eo as MCP_REQUEST_ARGUMENT_KEY_BASE,To as MCP_REQUEST_ARGUMENT_NAME,Io as MCP_REQUEST_ARGUMENT_URI,Oo as MCP_REQUEST_ID,ko as MCP_RESOURCE_PROTOCOL,Ao as MCP_RESOURCE_URI,xo as MCP_SERVER_NAME,wo as MCP_SERVER_TITLE,Ro as MCP_SERVER_VERSION,No as MCP_SESSION_ID,Co as MCP_TOOL_NAME,Po as MCP_TOOL_RESULT_CONTENT,Do as MCP_TOOL_RESULT_CONTENT_COUNT,Lo as MCP_TOOL_RESULT_IS_ERROR,Uo as MCP_TRANSPORT,Mo as MDC_KEY,qo as MDC_KEY_BASE,Go as MESSAGING_BATCH_MESSAGE_COUNT,Yo as MESSAGING_DESTINATION,Vo as MESSAGING_DESTINATION_CONNECTION,Wo as MESSAGING_DESTINATION_NAME,Fo as MESSAGING_MESSAGE_BODY_SIZE,Bo as MESSAGING_MESSAGE_CONVERSATION_ID,Ho as MESSAGING_MESSAGE_ENVELOPE_SIZE,zo as MESSAGING_MESSAGE_ID,Ko as MESSAGING_MESSAGE_RECEIVE_LATENCY,jo as MESSAGING_MESSAGE_RETRY_COUNT,Qo as MESSAGING_OPERATION_NAME,Xo as MESSAGING_OPERATION_TYPE,Jo as MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY,Zo as MESSAGING_SYSTEM,$o as METHOD,el as MIDDLEWARE_NAME,il as NAVIGATION_ORIGIN,tl as NAVIGATION_ROUTE_ID,nl as NAVIGATION_TYPE,rl as NEL_ELAPSED_TIME,al as NEL_PHASE,sl as NEL_REFERRER,ol as NEL_SAMPLING_FUNCTION,ll as NEL_TYPE,pl as NETWORK_CONNECTION_EFFECTIVE_TYPE,cl as NETWORK_CONNECTION_RTT,ul as NETWORK_CONNECTION_TYPE,bl as NETWORK_LOCAL_ADDRESS,gl as NETWORK_LOCAL_PORT,dl as NETWORK_PEER_ADDRESS,ml as NETWORK_PEER_PORT,yl as NETWORK_PROTOCOL_NAME,_l as NETWORK_PROTOCOL_VERSION,hl as NETWORK_TRANSPORT,vl as NETWORK_TYPE,fl as NET_HOST_IP,Sl as NET_HOST_NAME,El as NET_HOST_PORT,Tl as NET_PEER_IP,Il as NET_PEER_NAME,Ol as NET_PEER_PORT,kl as NET_PROTOCOL_NAME,Al as NET_PROTOCOL_VERSION,xl as NET_SOCK_FAMILY,wl as NET_SOCK_HOST_ADDR,Rl as NET_SOCK_HOST_PORT,Nl as NET_SOCK_PEER_ADDR,Cl as NET_SOCK_PEER_NAME,Pl as NET_SOCK_PEER_PORT,Dl as NET_TRANSPORT,Ll as OS_BUILD,Ul as OS_BUILD_ID,Ml as OS_DESCRIPTION,ql as OS_KERNEL_VERSION,Gl as OS_NAME,Yl as OS_RAW_DESCRIPTION,Vl as OS_ROOTED,Wl as OS_THEME,Fl as OS_TYPE,Bl as OS_VERSION,Hl as OTEL_KIND,zl as OTEL_SCOPE_NAME,Kl as OTEL_SCOPE_VERSION,jl as OTEL_STATUS_CODE,Ql as OTEL_STATUS_DESCRIPTION,Xl as PARAMS_KEY,Jl as PARAMS_KEY_BASE,Zl as PERFORMANCE_ACTIVATIONSTART,$l as PERFORMANCE_TIMEORIGIN,ep as PREVIOUS_ROUTE,ip as PROCESS_COMMAND_ARGS,tp as PROCESS_EXECUTABLE_NAME,np as PROCESS_PID,rp as PROCESS_RUNTIME_DESCRIPTION,ap as PROCESS_RUNTIME_ENGINE_NAME,sp as PROCESS_RUNTIME_ENGINE_VERSION,op as PROCESS_RUNTIME_NAME,lp as PROCESS_RUNTIME_VERSION,pp as QUERY_KEY,cp as QUERY_KEY_BASE,up as REACT_VERSION,bp as RELEASE,gp as REMIX_ACTION_FORM_DATA_KEY,dp as REMIX_ACTION_FORM_DATA_KEY_BASE,mp as REPLAY_ID,yp as RESOURCE_DEPLOYMENT_ENVIRONMENT,_p as RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME,hp as RESOURCE_RENDER_BLOCKING_STATUS,vp as ROUTE,fp as RPC_GRPC_STATUS_CODE,Sp as RPC_METHOD,Ep as RPC_RESPONSE_STATUS_CODE,Tp as RPC_SERVICE,Ip as RPC_SYSTEM,Op as RPC_SYSTEM_NAME,kp as RUNTIME_BUILD,Ap as RUNTIME_NAME,xp as RUNTIME_RAW_DESCRIPTION,wp as RUNTIME_VERSION,Rp as SCORE_KEY,Np as SCORE_KEY_BASE,Cp as SCORE_RATIO_KEY,Pp as SCORE_RATIO_KEY_BASE,Dp as SCORE_TOTAL,Lp as SCORE_WEIGHT_KEY,Up as SCORE_WEIGHT_KEY_BASE,Mp as SENTRY_ACTION,qp as SENTRY_BROWSER_NAME,Gp as SENTRY_BROWSER_VERSION,Yp as SENTRY_CANCELLATION_REASON,Vp as SENTRY_CATEGORY,Wp as SENTRY_CLIENT_SAMPLE_RATE,Fp as SENTRY_DESCRIPTION,Bp as SENTRY_DIST,Hp as SENTRY_DOMAIN,zp as SENTRY_DSC_ENVIRONMENT,Kp as SENTRY_DSC_PROJECT_ID,jp as SENTRY_DSC_PUBLIC_KEY,Qp as SENTRY_DSC_RELEASE,Xp as SENTRY_DSC_SAMPLED,Jp as SENTRY_DSC_SAMPLE_RATE,Zp as SENTRY_DSC_TRACE_ID,$p as SENTRY_DSC_TRANSACTION,ec as SENTRY_ENVIRONMENT,ic as SENTRY_EXCLUSIVE_TIME,tc as SENTRY_GRAPHQL_OPERATION,nc as SENTRY_GROUP,rc as SENTRY_HTTP_PREFETCH,ac as SENTRY_IDLE_SPAN_FINISH_REASON,sc as SENTRY_IS_REMOTE,oc as SENTRY_KIND,lc as SENTRY_MAIN_THREAD,pc as SENTRY_MESSAGE_PARAMETER_KEY,cc as SENTRY_MESSAGE_TEMPLATE,uc as SENTRY_METRIC_SOURCE,bc as SENTRY_MOBILE,gc as SENTRY_MODULE_KEY,dc as SENTRY_MODULE_KEY_BASE,mc as SENTRY_NEXTJS_SSR_FUNCTION_ROUTE,yc as SENTRY_NEXTJS_SSR_FUNCTION_TYPE,_c as SENTRY_NORMALIZED_DB_QUERY,hc as SENTRY_NORMALIZED_DB_QUERY_HASH,vc as SENTRY_NORMALIZED_DESCRIPTION,fc as SENTRY_OBSERVED_TIMESTAMP_NANOS,Sc as SENTRY_OP,Ec as SENTRY_ORIGIN,Tc as SENTRY_PLATFORM,Ic as SENTRY_PROFILER_ID,Oc as SENTRY_PROFILE_ID,kc as SENTRY_RELEASE,Ac as SENTRY_REPLAY_ID,xc as SENTRY_REPLAY_IS_BUFFERING,wc as SENTRY_REPORT_EVENT,Rc as SENTRY_SDK_INTEGRATIONS,Nc as SENTRY_SDK_NAME,Cc as SENTRY_SDK_VERSION,Pc as SENTRY_SEGMENT_ID,Lc as SENTRY_SEGMENT_NAME,Uc as SENTRY_SERVER_SAMPLE_RATE,Mc as SENTRY_SOURCE,qc as SENTRY_SPAN_SOURCE,Gc as SENTRY_STATUS,Yc as SENTRY_STATUS_CODE,Vc as SENTRY_STATUS_MESSAGE,Wc as SENTRY_SVELTEKIT_NAVIGATION_FROM,Fc as SENTRY_SVELTEKIT_NAVIGATION_TO,Bc as SENTRY_SVELTEKIT_NAVIGATION_TYPE,Hc as SENTRY_THREAD_ID,zc as SENTRY_TIMESTAMP_SEQUENCE,Kc as SENTRY_TRACE_LIFECYCLE,jc as SENTRY_TRACE_PARENT_SPAN_ID,Qc as SENTRY_TRACE_STATUS,Xc as SENTRY_TRANSACTION,Jc as SENTRY_USER_EMAIL,Zc as SENTRY_USER_GEO_CITY,$c as SENTRY_USER_GEO_COUNTRY_CODE,eu as SENTRY_USER_GEO_REGION,iu as SENTRY_USER_GEO_SUBDIVISION,tu as SENTRY_USER_ID,nu as SENTRY_USER_IP,ru as SENTRY_USER_USERNAME,au as SERVER_ADDRESS,su as SERVER_NAME,ou as SERVER_PORT,lu as SERVICE_NAME,pu as SERVICE_VERSION,cu as SESSION_ID,uu as STALL_PERCENTAGE,bu as STALL_TOTAL_TIME,gu as STATE_TYPE,du as THREAD_ID,mu as THREAD_NAME,yu as TIMBER_TAG,_u as TIME_TO_FULL_DISPLAY,hu as TIME_TO_INITIAL_DISPLAY,vu as TRANSACTION,fu as TRPC_PROCEDURE_PATH,Su as TRPC_PROCEDURE_TYPE,Eu as TTFB,Tu as TTFB_REQUESTTIME,Iu as TYPE,Ou as UI_COMPONENT_NAME,ku as UI_CONTRIBUTES_TO_TTFD,Au as UI_CONTRIBUTES_TO_TTID,xu as UI_ELEMENT_HEIGHT,wu as UI_ELEMENT_ID,Ru as UI_ELEMENT_IDENTIFIER,Nu as UI_ELEMENT_LOAD_TIME,Cu as UI_ELEMENT_PAINT_TYPE,Pu as UI_ELEMENT_RENDER_TIME,Du as UI_ELEMENT_TYPE,Lu as UI_ELEMENT_URL,Uu as UI_ELEMENT_WIDTH,Mu as URL,qu as URL_DOMAIN,Gu as URL_FRAGMENT,Yu as URL_FULL,Vu as URL_PATH,Wu as URL_PATH_PARAMETER_KEY,Fu as URL_PATH_PARAMETER_KEY_BASE,Bu as URL_PORT,Hu as URL_QUERY,zu as URL_SAME_ORIGIN,Ku as URL_SCHEME,ju as URL_TEMPLATE,Qu as USER_AGENT_ORIGINAL,Xu as USER_EMAIL,Ju as USER_FULL_NAME,Zu as USER_GEO_CITY,$u as USER_GEO_COUNTRY_CODE,eb as USER_GEO_REGION,ib as USER_GEO_SUBDIVISION,tb as USER_HASH,nb as USER_ID,rb as USER_IP_ADDRESS,ab as USER_NAME,sb as USER_ROLES,ob as VERCEL_BRANCH,lb as VERCEL_BUILD_ID,pb as VERCEL_DEPLOYMENT_ID,cb as VERCEL_DESTINATION,ub as VERCEL_EDGE_TYPE,bb as VERCEL_ENTRYPOINT,gb as VERCEL_EXECUTION_REGION,db as VERCEL_ID,mb as VERCEL_JA3_DIGEST,yb as VERCEL_JA4_DIGEST,_b as VERCEL_LOG_TYPE,hb as VERCEL_PATH,vb as VERCEL_PROJECT_ID,fb as VERCEL_PROJECT_NAME,Sb as VERCEL_PROXY_CACHE_ID,Eb as VERCEL_PROXY_CLIENT_IP,Tb as VERCEL_PROXY_HOST,Ib as VERCEL_PROXY_LAMBDA_REGION,Ob as VERCEL_PROXY_METHOD,kb as VERCEL_PROXY_PATH,Ab as VERCEL_PROXY_PATH_TYPE,xb as VERCEL_PROXY_PATH_TYPE_VARIANT,wb as VERCEL_PROXY_REFERER,Rb as VERCEL_PROXY_REGION,Nb as VERCEL_PROXY_RESPONSE_BYTE_SIZE,Cb as VERCEL_PROXY_SCHEME,Pb as VERCEL_PROXY_STATUS_CODE,Db as VERCEL_PROXY_TIMESTAMP,Lb as VERCEL_PROXY_USER_AGENT,Ub as VERCEL_PROXY_VERCEL_CACHE,Mb as VERCEL_PROXY_VERCEL_ID,qb as VERCEL_PROXY_WAF_ACTION,Gb as VERCEL_PROXY_WAF_RULE_ID,Yb as VERCEL_REQUEST_ID,Vb as VERCEL_SOURCE,Wb as VERCEL_STATUS_CODE,Fe as _AWS_KINESIS_STREAM_NAME,ii as _AWS_REQUEST_ID,rs as _HTTP_REQUEST_METHOD,Dc as _SENTRY_SEGMENT_ID};\n//# sourceMappingURL=attributes.mjs.map\n","import { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_USER_USERNAME, SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS, SEMANTIC_ATTRIBUTE_USER_EMAIL, SEMANTIC_ATTRIBUTE_USER_ID, SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT, SEMANTIC_ATTRIBUTE_SENTRY_RELEASE, SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS } from '../../semanticAttributes.js';\nimport { getCombinedScopeData } from '../../utils/scopeData.js';\nimport { spanToStreamedSpanJSON, INTERNAL_getSegmentSpan, streamedSpanJsonToSerializedSpan, showSpanDropWarning } from '../../utils/spanUtils.js';\nimport { getCapturedScopesOnSpan } from '../utils.js';\nimport { isStreamedBeforeSendSpanCallback } from './beforeSendSpan.js';\nimport { scopeContextsToSpanAttributes } from './scopeContextAttributes.js';\nimport { DEFAULT_ENVIRONMENT } from '../../constants.js';\nimport { SENTRY_SDK_VERSION, SENTRY_SDK_NAME, SENTRY_SEGMENT_ID, SENTRY_SEGMENT_NAME, SENTRY_TRACE_LIFECYCLE } from '@sentry/conventions/attributes';\n\nfunction captureSpan(span, client) {\n const spanJSON = spanToStreamedSpanJSON(span);\n const segmentSpan = INTERNAL_getSegmentSpan(span);\n const serializedSegmentSpan = spanToStreamedSpanJSON(segmentSpan);\n const { isolationScope: spanIsolationScope, scope: spanScope } = getCapturedScopesOnSpan(span);\n const finalScopeData = getCombinedScopeData(spanIsolationScope, spanScope);\n applyCommonSpanAttributes(spanJSON, serializedSegmentSpan, client, finalScopeData);\n const spanKind = span.kind;\n client.emit(\"preprocessSpan\", spanJSON, { spanKind });\n if (spanJSON.is_segment) {\n applyScopeToSegmentSpan(spanJSON, finalScopeData);\n applySdkMetadataToSegmentSpan(spanJSON, client);\n client.emit(\"processSegmentSpan\", spanJSON);\n }\n client.emit(\"processSpan\", spanJSON);\n const { beforeSendSpan } = client.getOptions();\n const processedSpan = beforeSendSpan && isStreamedBeforeSendSpanCallback(beforeSendSpan) ? applyBeforeSendSpanCallback(spanJSON, beforeSendSpan) : spanJSON;\n const spanNameSource = processedSpan.attributes?.[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n if (spanJSON.is_segment && spanNameSource) {\n safeSetSpanJSONAttributes(processedSpan, {\n [\"sentry.segment.name.source\"]: spanNameSource\n });\n }\n return {\n ...streamedSpanJsonToSerializedSpan(processedSpan),\n _segmentSpan: segmentSpan\n };\n}\nfunction applyScopeToSegmentSpan(segmentSpanJSON, scopeData) {\n const contextAttributes = scopeContextsToSpanAttributes(scopeData.contexts);\n safeSetSpanJSONAttributes(segmentSpanJSON, contextAttributes);\n}\nfunction safeSetSpanJSONAttributes(spanJSON, newAttributes) {\n const originalAttributes = spanJSON.attributes ?? (spanJSON.attributes = {});\n Object.entries(newAttributes).forEach(([key, value]) => {\n if (value != null && !(key in originalAttributes)) {\n originalAttributes[key] = value;\n }\n });\n}\nfunction applySdkMetadataToSegmentSpan(segmentSpanJSON, client) {\n const integrationNames = client.getIntegrationNames();\n if (!integrationNames.length) return;\n safeSetSpanJSONAttributes(segmentSpanJSON, {\n [SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS]: integrationNames\n });\n}\nfunction applyCommonSpanAttributes(spanJSON, serializedSegmentSpan, client, scopeData) {\n const sdk = client.getSdkMetadata();\n const { release, environment } = client.getOptions();\n safeSetSpanJSONAttributes(spanJSON, {\n [SENTRY_TRACE_LIFECYCLE]: \"stream\",\n [SENTRY_SEGMENT_NAME]: serializedSegmentSpan.name,\n [SENTRY_SEGMENT_ID]: serializedSegmentSpan.span_id,\n [SENTRY_SDK_NAME]: sdk?.sdk?.name,\n [SENTRY_SDK_VERSION]: sdk?.sdk?.version,\n [SEMANTIC_ATTRIBUTE_SENTRY_RELEASE]: release,\n [SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT]: environment || DEFAULT_ENVIRONMENT,\n [SEMANTIC_ATTRIBUTE_USER_ID]: scopeData.user?.id,\n [SEMANTIC_ATTRIBUTE_USER_EMAIL]: scopeData.user?.email,\n [SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS]: scopeData.user?.ip_address,\n [SEMANTIC_ATTRIBUTE_USER_USERNAME]: scopeData.user?.username,\n ...scopeData.attributes\n });\n}\nfunction applyBeforeSendSpanCallback(span, beforeSendSpan) {\n const modifedSpan = beforeSendSpan(span);\n if (!modifedSpan) {\n showSpanDropWarning();\n return span;\n }\n return modifedSpan;\n}\n\nexport { applyBeforeSendSpanCallback, captureSpan, safeSetSpanJSONAttributes };\n//# sourceMappingURL=captureSpan.js.map\n","function safeUnref(timer) {\n if (typeof timer === \"object\" && typeof timer.unref === \"function\") {\n timer.unref();\n }\n return timer;\n}\n\nexport { safeUnref };\n//# sourceMappingURL=timer.js.map\n","import { makeDsn, dsnToString } from './utils/dsn.js';\n\nconst SENTRY_API_VERSION = \"7\";\nfunction getBaseApiEndpoint(dsn) {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : \"\";\n const port = dsn.port ? `:${dsn.port}` : \"\";\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : \"\"}/api/`;\n}\nfunction _getIngestEndpoint(dsn) {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\nfunction _encodedAuth(dsn, sdkInfo) {\n const params = {\n sentry_version: SENTRY_API_VERSION\n };\n if (dsn.publicKey) {\n params.sentry_key = dsn.publicKey;\n }\n if (sdkInfo) {\n params.sentry_client = `${sdkInfo.name}/${sdkInfo.version}`;\n }\n return new URLSearchParams(params).toString();\n}\nfunction getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel, sdkInfo) {\n return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\nfunction getReportDialogEndpoint(dsnLike, dialogOptions) {\n const dsn = makeDsn(dsnLike);\n if (!dsn) {\n return \"\";\n }\n const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n let encodedOptions = `dsn=${dsnToString(dsn)}`;\n for (const key in dialogOptions) {\n if (key === \"dsn\") {\n continue;\n }\n if (key === \"onClose\") {\n continue;\n }\n if (key === \"user\") {\n const user = dialogOptions.user;\n if (!user) {\n continue;\n }\n if (user.name) {\n encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n }\n if (user.email) {\n encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key])}`;\n }\n }\n return `${endpoint}?${encodedOptions}`;\n}\n\nexport { SENTRY_API_VERSION, getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint };\n//# sourceMappingURL=api.js.map\n","import { getClient } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { debug } from './utils/debug-logger.js';\n\nconst installedIntegrations = [];\nfunction filterDuplicates(integrations) {\n const integrationsByName = {};\n integrations.forEach((currentInstance) => {\n const { name } = currentInstance;\n const existingInstance = integrationsByName[name];\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n integrationsByName[name] = currentInstance;\n });\n return Object.values(integrationsByName);\n}\nfunction getIntegrationsToSetup(options) {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n defaultIntegrations.forEach((integration) => {\n integration.isDefaultInstance = true;\n });\n let integrations;\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === \"function\") {\n const resolvedUserIntegrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(resolvedUserIntegrations) ? resolvedUserIntegrations : [resolvedUserIntegrations];\n } else {\n integrations = defaultIntegrations;\n }\n return filterDuplicates(integrations);\n}\nfunction setupIntegrations(client, integrations) {\n const integrationIndex = {};\n integrations.forEach((integration) => {\n if (integration?.beforeSetup) {\n integration.beforeSetup(client);\n }\n });\n integrations.forEach((integration) => {\n if (integration) {\n setupIntegration(client, integration, integrationIndex);\n }\n });\n return integrationIndex;\n}\nfunction afterSetupIntegrations(client, integrations) {\n for (const integration of integrations) {\n if (integration?.afterAllSetup) {\n integration.afterAllSetup(client);\n }\n }\n}\nfunction setupIntegration(client, integration, integrationIndex) {\n if (integrationIndex[integration.name]) {\n DEBUG_BUILD && debug.log(`Integration skipped because it was already installed: ${integration.name}`);\n return;\n }\n integrationIndex[integration.name] = integration;\n if (!installedIntegrations.includes(integration.name) && typeof integration.setupOnce === \"function\") {\n integration.setupOnce();\n installedIntegrations.push(integration.name);\n }\n if (integration.setup && typeof integration.setup === \"function\") {\n integration.setup(client);\n }\n if (typeof integration.preprocessEvent === \"function\") {\n const callback = integration.preprocessEvent.bind(integration);\n client.on(\"preprocessEvent\", (event, hint) => callback(event, hint, client));\n }\n if (typeof integration.processEvent === \"function\") {\n const callback = integration.processEvent.bind(integration);\n const processor = Object.assign((event, hint) => callback(event, hint, client), {\n id: integration.name\n });\n client.addEventProcessor(processor);\n }\n [\"processSpan\", \"processSegmentSpan\"].forEach((hook) => {\n const callback = integration[hook];\n if (typeof callback === \"function\") {\n client.on(hook, (span) => callback.call(integration, span, client));\n }\n });\n DEBUG_BUILD && debug.log(`Integration installed: ${integration.name}`);\n}\nfunction addIntegration(integration) {\n const client = getClient();\n if (!client) {\n DEBUG_BUILD && debug.warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n return;\n }\n client.addIntegration(integration);\n}\nfunction defineIntegration(fn) {\n return fn;\n}\nfunction extendIntegration(integration, extendedIntegration) {\n const wrappedIntegration = {\n ...integration,\n ...extendedIntegration\n };\n for (const key in extendedIntegration) {\n const baseValue = integration[key];\n const extendedValue = extendedIntegration[key];\n if (typeof baseValue === \"function\" && typeof extendedValue === \"function\") {\n const wrappedFunction = new Proxy(baseValue, {\n apply: (target, thisArg, args) => {\n Reflect.apply(target, thisArg, args);\n return Reflect.apply(extendedValue, thisArg, args);\n }\n });\n wrappedIntegration[key] = wrappedFunction;\n }\n }\n return wrappedIntegration;\n}\n\nexport { addIntegration, afterSetupIntegrations, defineIntegration, extendIntegration, getIntegrationsToSetup, installedIntegrations, setupIntegration, setupIntegrations };\n//# sourceMappingURL=integration.js.map\n","function isBrowserBundle() {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== \"undefined\" && !!__SENTRY_BROWSER_BUNDLE__;\n}\nfunction getSDKSource() {\n /*! __SENTRY_SDK_SOURCE__ */\n return \"npm\";\n}\n\nexport { getSDKSource, isBrowserBundle };\n//# sourceMappingURL=env.js.map\n","import { isBrowserBundle } from './env.js';\n\nfunction isNodeEnv() {\n return !isBrowserBundle() && Object.prototype.toString.call(typeof process !== \"undefined\" ? process : 0) === \"[object process]\";\n}\nfunction dynamicRequire(mod, request) {\n return mod.require(request);\n}\nfunction loadModule(moduleName, existingModule = typeof module !== \"undefined\" ? module : void 0) {\n let mod;\n try {\n mod = dynamicRequire(existingModule, moduleName);\n } catch {\n }\n if (!mod) {\n try {\n const { cwd } = dynamicRequire(existingModule, \"process\");\n mod = dynamicRequire(existingModule, `${cwd()}/node_modules/${moduleName}`);\n } catch {\n }\n }\n return mod;\n}\n\nexport { isNodeEnv, loadModule };\n//# sourceMappingURL=node.js.map\n","import { isNodeEnv } from './node.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nfunction isBrowser() {\n return typeof window !== \"undefined\" && (!isNodeEnv() || isElectronNodeRenderer());\n}\nfunction isElectronNodeRenderer() {\n const process = GLOBAL_OBJ.process;\n return process?.type === \"renderer\";\n}\n\nexport { isBrowser };\n//# sourceMappingURL=isBrowser.js.map\n","import { dsnToString } from '../utils/dsn.js';\nimport { createEnvelope } from '../utils/envelope.js';\nimport { isBrowser } from '../utils/isBrowser.js';\n\nfunction createLogContainerEnvelopeItem(items, inferUserData) {\n const inferSetting = inferUserData ? \"auto\" : \"never\";\n return [\n {\n type: \"log\",\n item_count: items.length,\n content_type: \"application/vnd.sentry.items.log+json\"\n },\n {\n version: 2,\n ...isBrowser() && {\n ingest_settings: { infer_ip: inferSetting, infer_user_agent: inferSetting }\n },\n items\n }\n ];\n}\nfunction createLogEnvelope(logs, metadata, tunnel, dsn, inferUserData) {\n const headers = {};\n if (metadata?.sdk) {\n headers.sdk = {\n name: metadata.sdk.name,\n version: metadata.sdk.version\n };\n }\n if (!!tunnel && !!dsn) {\n headers.dsn = dsnToString(dsn);\n }\n return createEnvelope(headers, [createLogContainerEnvelopeItem(logs, inferUserData)]);\n}\n\nexport { createLogContainerEnvelopeItem, createLogEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { serializeAttributes } from '../attributes.js';\nimport { getGlobalSingleton } from '../carrier.js';\nimport { getClient, getIsolationScope, getCurrentScope } from '../currentScopes.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { debug, consoleSandbox } from '../utils/debug-logger.js';\nimport { isParameterizedString } from '../utils/is.js';\nimport { getCombinedScopeData } from '../utils/scopeData.js';\nimport { _getSpanForScope } from '../utils/spanOnScope.js';\nimport { timestampInSeconds } from '../utils/time.js';\nimport { getSequenceAttribute } from '../utils/timestampSequence.js';\nimport { _getTraceInfoFromScope } from '../utils/trace-info.js';\nimport { SEVERITY_TEXT_TO_SEVERITY_NUMBER } from './constants.js';\nimport { createLogEnvelope } from './envelope.js';\n\nconst MAX_LOG_BUFFER_SIZE = 100;\nfunction setLogAttribute(logAttributes, key, value, setEvenIfPresent = true) {\n if (value && (!logAttributes[key] || setEvenIfPresent)) {\n logAttributes[key] = value;\n }\n}\nfunction _INTERNAL_captureSerializedLog(client, serializedLog) {\n const bufferMap = _getBufferMap();\n const logBuffer = _INTERNAL_getLogBuffer(client);\n if (logBuffer === void 0) {\n bufferMap.set(client, [serializedLog]);\n } else {\n if (logBuffer.length >= MAX_LOG_BUFFER_SIZE) {\n _INTERNAL_flushLogsBuffer(client, logBuffer);\n bufferMap.set(client, [serializedLog]);\n } else {\n bufferMap.set(client, [...logBuffer, serializedLog]);\n }\n }\n}\nfunction _INTERNAL_captureLog(beforeLog, currentScope = getCurrentScope(), captureSerializedLog = _INTERNAL_captureSerializedLog) {\n const client = currentScope?.getClient() ?? getClient();\n if (!client) {\n DEBUG_BUILD && debug.warn(\"No client available to capture log.\");\n return;\n }\n const { release, environment, enableLogs = true, beforeSendLog } = client.getOptions();\n if (!enableLogs) {\n DEBUG_BUILD && debug.warn(\"logging option not enabled, log will not be captured.\");\n return;\n }\n const [, traceContext] = _getTraceInfoFromScope(client, currentScope);\n const processedLogAttributes = {\n ...beforeLog.attributes\n };\n const {\n user: { id, email, username },\n attributes: scopeAttributes = {}\n } = getCombinedScopeData(getIsolationScope(), currentScope);\n setLogAttribute(processedLogAttributes, \"user.id\", id, false);\n setLogAttribute(processedLogAttributes, \"user.email\", email, false);\n setLogAttribute(processedLogAttributes, \"user.name\", username, false);\n setLogAttribute(processedLogAttributes, \"sentry.release\", release);\n setLogAttribute(processedLogAttributes, \"sentry.environment\", environment);\n const { name, version } = client.getSdkMetadata()?.sdk ?? {};\n setLogAttribute(processedLogAttributes, \"sentry.sdk.name\", name);\n setLogAttribute(processedLogAttributes, \"sentry.sdk.version\", version);\n const replay = client.getIntegrationByName(\"Replay\");\n const replayId = replay?.getReplayId(true);\n setLogAttribute(processedLogAttributes, \"sentry.replay_id\", replayId);\n if (replayId && replay?.getRecordingMode() === \"buffer\") {\n setLogAttribute(processedLogAttributes, \"sentry._internal.replay_is_buffering\", true);\n }\n const beforeLogMessage = beforeLog.message;\n if (isParameterizedString(beforeLogMessage)) {\n const { __sentry_template_string__, __sentry_template_values__ = [] } = beforeLogMessage;\n if (__sentry_template_values__?.length) {\n processedLogAttributes[\"sentry.message.template\"] = __sentry_template_string__;\n }\n __sentry_template_values__.forEach((param, index) => {\n processedLogAttributes[`sentry.message.parameter.${index}`] = param;\n });\n }\n const span = _getSpanForScope(currentScope);\n setLogAttribute(processedLogAttributes, \"sentry.trace.parent_span_id\", span?.spanContext().spanId);\n const processedLog = { ...beforeLog, attributes: processedLogAttributes };\n client.emit(\"beforeCaptureLog\", processedLog);\n const log = beforeSendLog ? consoleSandbox(() => beforeSendLog(processedLog)) : processedLog;\n if (!log) {\n client.recordDroppedEvent(\"before_send\", \"log_item\", 1);\n DEBUG_BUILD && debug.warn(\"beforeSendLog returned null, log will not be captured.\");\n return;\n }\n const { level, message, attributes: logAttributes = {}, severityNumber } = log;\n const timestamp = timestampInSeconds();\n const sequenceAttr = getSequenceAttribute(timestamp);\n const serializedLog = {\n timestamp,\n level,\n body: _removeLoneSurrogates(String(message)),\n trace_id: traceContext?.trace_id,\n severity_number: severityNumber ?? SEVERITY_TEXT_TO_SEVERITY_NUMBER[level],\n attributes: sanitizeLogAttributes({\n ...serializeAttributes(scopeAttributes),\n ...serializeAttributes(logAttributes, true),\n [sequenceAttr.key]: sequenceAttr.value\n })\n };\n captureSerializedLog(client, serializedLog);\n client.emit(\"afterCaptureLog\", log);\n}\nfunction _INTERNAL_flushLogsBuffer(client, maybeLogBuffer) {\n const logBuffer = maybeLogBuffer ?? _INTERNAL_getLogBuffer(client) ?? [];\n if (logBuffer.length === 0) {\n return;\n }\n const clientOptions = client.getOptions();\n const envelope = createLogEnvelope(\n logBuffer,\n clientOptions._metadata,\n clientOptions.tunnel,\n client.getDsn(),\n client.getDataCollectionOptions().userInfo\n );\n _getBufferMap().set(client, []);\n client.emit(\"flushLogs\");\n client.sendEnvelope(envelope);\n}\nfunction _INTERNAL_getLogBuffer(client) {\n return _getBufferMap().get(client);\n}\nfunction _getBufferMap() {\n return getGlobalSingleton(\"clientToLogBufferMap\", () => /* @__PURE__ */ new WeakMap());\n}\nfunction sanitizeLogAttributes(attributes) {\n const sanitized = {};\n for (const [key, attr] of Object.entries(attributes)) {\n const sanitizedKey = _removeLoneSurrogates(key);\n if (attr.type === \"string\") {\n sanitized[sanitizedKey] = { ...attr, value: _removeLoneSurrogates(attr.value) };\n } else {\n sanitized[sanitizedKey] = attr;\n }\n }\n return sanitized;\n}\nfunction _removeLoneSurrogates(str) {\n const strObj = Object(str);\n const isWellFormed = strObj[\"isWellFormed\"];\n const toWellFormed = strObj[\"toWellFormed\"];\n if (typeof isWellFormed === \"function\" && typeof toWellFormed === \"function\") {\n return isWellFormed.call(str) ? str : toWellFormed.call(str);\n }\n return str;\n}\n\nexport { _INTERNAL_captureLog, _INTERNAL_captureSerializedLog, _INTERNAL_flushLogsBuffer, _INTERNAL_getLogBuffer, _removeLoneSurrogates };\n//# sourceMappingURL=internal.js.map\n","import { dsnToString } from '../utils/dsn.js';\nimport { createEnvelope } from '../utils/envelope.js';\nimport { isBrowser } from '../utils/isBrowser.js';\n\nfunction createMetricContainerEnvelopeItem(items, inferUserData) {\n const inferSetting = inferUserData ? \"auto\" : \"never\";\n return [\n {\n type: \"trace_metric\",\n item_count: items.length,\n content_type: \"application/vnd.sentry.items.trace-metric+json\"\n },\n {\n version: 2,\n ...isBrowser() && {\n ingest_settings: { infer_ip: inferSetting, infer_user_agent: inferSetting }\n },\n items\n }\n ];\n}\nfunction createMetricEnvelope(metrics, metadata, tunnel, dsn, inferUserData) {\n const headers = {};\n if (metadata?.sdk) {\n headers.sdk = {\n name: metadata.sdk.name,\n version: metadata.sdk.version\n };\n }\n if (!!tunnel && !!dsn) {\n headers.dsn = dsnToString(dsn);\n }\n return createEnvelope(headers, [createMetricContainerEnvelopeItem(metrics, inferUserData)]);\n}\n\nexport { createMetricContainerEnvelopeItem, createMetricEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { serializeAttributes } from '../attributes.js';\nimport { getGlobalSingleton } from '../carrier.js';\nimport { getCurrentScope, getClient, getIsolationScope } from '../currentScopes.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { debug } from '../utils/debug-logger.js';\nimport { getCombinedScopeData } from '../utils/scopeData.js';\nimport { _getSpanForScope } from '../utils/spanOnScope.js';\nimport { timestampInSeconds } from '../utils/time.js';\nimport { getSequenceAttribute } from '../utils/timestampSequence.js';\nimport { _getTraceInfoFromScope } from '../utils/trace-info.js';\nimport { createMetricEnvelope } from './envelope.js';\n\nconst MAX_METRIC_BUFFER_SIZE = 1e3;\nfunction setMetricAttribute(metricAttributes, key, value, setEvenIfPresent = true) {\n if (value && (setEvenIfPresent || !(key in metricAttributes))) {\n metricAttributes[key] = value;\n }\n}\nfunction _INTERNAL_captureSerializedMetric(client, serializedMetric) {\n const bufferMap = _getBufferMap();\n const metricBuffer = _INTERNAL_getMetricBuffer(client);\n if (metricBuffer === void 0) {\n bufferMap.set(client, [serializedMetric]);\n } else {\n if (metricBuffer.length >= MAX_METRIC_BUFFER_SIZE) {\n _INTERNAL_flushMetricsBuffer(client, metricBuffer);\n bufferMap.set(client, [serializedMetric]);\n } else {\n bufferMap.set(client, [...metricBuffer, serializedMetric]);\n }\n }\n}\nfunction _enrichMetricAttributes(beforeMetric, client, user) {\n const { release, environment } = client.getOptions();\n const processedMetricAttributes = {\n ...beforeMetric.attributes\n };\n setMetricAttribute(processedMetricAttributes, \"user.id\", user.id, false);\n setMetricAttribute(processedMetricAttributes, \"user.email\", user.email, false);\n setMetricAttribute(processedMetricAttributes, \"user.name\", user.username, false);\n setMetricAttribute(processedMetricAttributes, \"sentry.release\", release);\n setMetricAttribute(processedMetricAttributes, \"sentry.environment\", environment);\n const { name, version } = client.getSdkMetadata()?.sdk ?? {};\n setMetricAttribute(processedMetricAttributes, \"sentry.sdk.name\", name);\n setMetricAttribute(processedMetricAttributes, \"sentry.sdk.version\", version);\n const replay = client.getIntegrationByName(\"Replay\");\n const replayId = replay?.getReplayId(true);\n setMetricAttribute(processedMetricAttributes, \"sentry.replay_id\", replayId);\n if (replayId && replay?.getRecordingMode() === \"buffer\") {\n setMetricAttribute(processedMetricAttributes, \"sentry._internal.replay_is_buffering\", true);\n }\n return {\n ...beforeMetric,\n attributes: processedMetricAttributes\n };\n}\nfunction _buildSerializedMetric(metric, client, currentScope, scopeAttributes) {\n const [, traceContext] = _getTraceInfoFromScope(client, currentScope);\n const span = _getSpanForScope(currentScope);\n const traceId = span ? span.spanContext().traceId : traceContext?.trace_id;\n const spanId = span ? span.spanContext().spanId : void 0;\n const timestamp = timestampInSeconds();\n const sequenceAttr = getSequenceAttribute(timestamp);\n return {\n timestamp,\n trace_id: traceId ?? \"\",\n span_id: spanId,\n name: metric.name,\n type: metric.type,\n unit: metric.unit,\n value: metric.value,\n attributes: {\n ...serializeAttributes(scopeAttributes),\n ...serializeAttributes(metric.attributes, \"skip-undefined\"),\n [sequenceAttr.key]: sequenceAttr.value\n }\n };\n}\nfunction _INTERNAL_captureMetric(beforeMetric, options) {\n const currentScope = options?.scope ?? getCurrentScope();\n const captureSerializedMetric = options?.captureSerializedMetric ?? _INTERNAL_captureSerializedMetric;\n const client = currentScope?.getClient() ?? getClient();\n if (!client) {\n DEBUG_BUILD && debug.warn(\"No client available to capture metric.\");\n return;\n }\n const { _experiments, enableMetrics, beforeSendMetric } = client.getOptions();\n const metricsEnabled = enableMetrics ?? _experiments?.enableMetrics ?? true;\n if (!metricsEnabled) {\n DEBUG_BUILD && debug.warn(\"metrics option not enabled, metric will not be captured.\");\n return;\n }\n const { user, attributes: scopeAttributes } = getCombinedScopeData(getIsolationScope(), currentScope);\n const enrichedMetric = _enrichMetricAttributes(beforeMetric, client, user);\n client.emit(\"processMetric\", enrichedMetric);\n const beforeSendCallback = beforeSendMetric || _experiments?.beforeSendMetric;\n const processedMetric = beforeSendCallback ? beforeSendCallback(enrichedMetric) : enrichedMetric;\n if (!processedMetric) {\n DEBUG_BUILD && debug.log(\"`beforeSendMetric` returned `null`, will not send metric.\");\n return;\n }\n const serializedMetric = _buildSerializedMetric(processedMetric, client, currentScope, scopeAttributes);\n DEBUG_BUILD && debug.log(\"[Metric]\", serializedMetric);\n captureSerializedMetric(client, serializedMetric);\n client.emit(\"afterCaptureMetric\", processedMetric);\n}\nfunction _INTERNAL_flushMetricsBuffer(client, maybeMetricBuffer) {\n const metricBuffer = maybeMetricBuffer ?? _INTERNAL_getMetricBuffer(client) ?? [];\n if (metricBuffer.length === 0) {\n return;\n }\n const clientOptions = client.getOptions();\n const envelope = createMetricEnvelope(\n metricBuffer,\n clientOptions._metadata,\n clientOptions.tunnel,\n client.getDsn(),\n client.getDataCollectionOptions().userInfo\n );\n _getBufferMap().set(client, []);\n client.emit(\"flushMetrics\");\n client.sendEnvelope(envelope);\n}\nfunction _INTERNAL_getMetricBuffer(client) {\n return _getBufferMap().get(client);\n}\nfunction _getBufferMap() {\n return getGlobalSingleton(\"clientToMetricBufferMap\", () => /* @__PURE__ */ new WeakMap());\n}\n\nexport { _INTERNAL_captureMetric, _INTERNAL_captureSerializedMetric, _INTERNAL_flushMetricsBuffer, _INTERNAL_getMetricBuffer };\n//# sourceMappingURL=internal.js.map\n","import { streamedSpanJsonToSerializedSpan } from '../../utils/spanUtils.js';\n\nfunction spanJsonToSerializedStreamedSpan(span) {\n const streamedSpan = {\n trace_id: span.trace_id,\n span_id: span.span_id,\n parent_span_id: span.parent_span_id,\n name: span.description || \"\",\n start_timestamp: span.start_timestamp,\n end_timestamp: span.timestamp || span.start_timestamp,\n status: !span.status || span.status === \"ok\" || span.status === \"cancelled\" ? \"ok\" : \"error\",\n is_segment: false,\n attributes: { ...span.data },\n links: span.links\n };\n return streamedSpanJsonToSerializedSpan(streamedSpan);\n}\n\nexport { spanJsonToSerializedStreamedSpan };\n//# sourceMappingURL=spanJsonToStreamedSpan.js.map\n","import { isBrowser } from '../../utils/isBrowser.js';\nimport { hasSpanStreamingEnabled } from './hasSpanStreamingEnabled.js';\nimport { spanJsonToSerializedStreamedSpan } from './spanJsonToStreamedSpan.js';\n\nfunction extractGenAiSpansFromEvent(event, client) {\n if (event.type !== \"transaction\" || !event.spans?.length || !event.sdkProcessingMetadata?.hasGenAiSpans || client.getOptions().streamGenAiSpans === false || hasSpanStreamingEnabled(client)) {\n return void 0;\n }\n const genAiSpans = [];\n const remainingSpans = [];\n for (const span of event.spans) {\n if (span.op?.startsWith(\"gen_ai.\")) {\n genAiSpans.push(spanJsonToSerializedStreamedSpan(span));\n } else {\n remainingSpans.push(span);\n }\n }\n if (genAiSpans.length === 0) {\n return void 0;\n }\n event.spans = remainingSpans;\n const inferSetting = client.getDataCollectionOptions().userInfo ? \"auto\" : \"never\";\n return [\n { type: \"span\", item_count: genAiSpans.length, content_type: \"application/vnd.sentry.items.span.v2+json\" },\n {\n version: 2,\n ...isBrowser() && {\n ingest_settings: { infer_ip: inferSetting, infer_user_agent: inferSetting }\n },\n items: genAiSpans\n }\n ];\n}\n\nexport { extractGenAiSpansFromEvent };\n//# sourceMappingURL=extractGenAiSpans.js.map\n","import { resolvedSyncPromise, rejectedSyncPromise } from './syncpromise.js';\nimport { safeUnref } from './timer.js';\n\nconst SENTRY_BUFFER_FULL_ERROR = /* @__PURE__ */ Symbol.for(\"SentryBufferFullError\");\nfunction makePromiseBuffer(limit = 100) {\n const buffer = /* @__PURE__ */ new Set();\n function isReady() {\n return buffer.size < limit;\n }\n function remove(task) {\n buffer.delete(task);\n }\n function add(taskProducer) {\n if (!isReady()) {\n return rejectedSyncPromise(SENTRY_BUFFER_FULL_ERROR);\n }\n const task = taskProducer();\n buffer.add(task);\n void task.then(\n () => remove(task),\n () => remove(task)\n );\n return task;\n }\n function drain(timeout) {\n if (!buffer.size) {\n return resolvedSyncPromise(true);\n }\n const drainPromise = Promise.allSettled(Array.from(buffer)).then(() => true);\n if (!timeout) {\n return drainPromise;\n }\n const promises = [\n drainPromise,\n new Promise((resolve) => safeUnref(setTimeout(() => resolve(false), timeout)))\n ];\n return Promise.race(promises);\n }\n return {\n get $() {\n return Array.from(buffer);\n },\n add,\n drain\n };\n}\n\nexport { SENTRY_BUFFER_FULL_ERROR, makePromiseBuffer };\n//# sourceMappingURL=promisebuffer.js.map\n","import { safeDateNow } from './randomSafeContext.js';\n\nconst DEFAULT_RETRY_AFTER = 60 * 1e3;\nfunction parseRetryAfterHeader(header, now = safeDateNow()) {\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1e3;\n }\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n return DEFAULT_RETRY_AFTER;\n}\nfunction disabledUntil(limits, dataCategory) {\n return limits[dataCategory] || limits.all || 0;\n}\nfunction isRateLimited(limits, dataCategory, now = safeDateNow()) {\n return disabledUntil(limits, dataCategory) > now;\n}\nfunction updateRateLimits(limits, { statusCode, headers }, now = safeDateNow()) {\n const updatedRateLimits = {\n ...limits\n };\n const rateLimitHeader = headers?.[\"x-sentry-rate-limits\"];\n const retryAfterHeader = headers?.[\"retry-after\"];\n if (rateLimitHeader) {\n for (const limit of rateLimitHeader.trim().split(\",\")) {\n const [retryAfter, categories, , , namespaces] = limit.split(\":\", 5);\n const headerDelay = parseInt(retryAfter, 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1e3;\n if (!categories) {\n updatedRateLimits.all = now + delay;\n } else {\n for (const category of categories.split(\";\")) {\n if (category === \"metric_bucket\") {\n if (!namespaces || namespaces.split(\";\").includes(\"custom\")) {\n updatedRateLimits[category] = now + delay;\n }\n } else {\n updatedRateLimits[category] = now + delay;\n }\n }\n }\n }\n } else if (retryAfterHeader) {\n updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n } else if (statusCode === 429) {\n updatedRateLimits.all = now + 60 * 1e3;\n }\n return updatedRateLimits;\n}\n\nexport { DEFAULT_RETRY_AFTER, disabledUntil, isRateLimited, parseRetryAfterHeader, updateRateLimits };\n//# sourceMappingURL=ratelimit.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { debug } from '../utils/debug-logger.js';\nimport { forEachEnvelopeItem, envelopeItemTypeToDataCategory, createEnvelope, serializeEnvelope, envelopeContainsItemType } from '../utils/envelope.js';\nimport { makePromiseBuffer, SENTRY_BUFFER_FULL_ERROR } from '../utils/promisebuffer.js';\nimport { isRateLimited, updateRateLimits } from '../utils/ratelimit.js';\n\nconst DEFAULT_TRANSPORT_BUFFER_SIZE = 64;\nfunction createTransport(options, makeRequest, buffer = makePromiseBuffer(\n options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE\n)) {\n let rateLimits = {};\n const flush = (timeout) => buffer.drain(timeout);\n function send(envelope) {\n const filteredEnvelopeItems = [];\n forEachEnvelopeItem(envelope, (item, type) => {\n const dataCategory = envelopeItemTypeToDataCategory(type);\n if (isRateLimited(rateLimits, dataCategory)) {\n options.recordDroppedEvent(\"ratelimit_backoff\", dataCategory);\n } else {\n filteredEnvelopeItems.push(item);\n }\n });\n if (filteredEnvelopeItems.length === 0) {\n return Promise.resolve({});\n }\n const filteredEnvelope = createEnvelope(envelope[0], filteredEnvelopeItems);\n const recordEnvelopeLoss = (reason) => {\n if (envelopeContainsItemType(filteredEnvelope, [\"client_report\"])) {\n DEBUG_BUILD && debug.warn(`Dropping client report. Will not send outcomes (reason: ${reason}).`);\n return;\n }\n forEachEnvelopeItem(filteredEnvelope, (item, type) => {\n options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type));\n });\n };\n const requestTask = () => makeRequest({ body: serializeEnvelope(filteredEnvelope) }).then(\n (response) => {\n if (response.statusCode === 413) {\n DEBUG_BUILD && debug.error(\n \"Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.\"\n );\n recordEnvelopeLoss(\"send_error\");\n return response;\n }\n if (DEBUG_BUILD && response.statusCode !== void 0 && (response.statusCode < 200 || response.statusCode >= 300)) {\n debug.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n }\n rateLimits = updateRateLimits(rateLimits, response);\n return response;\n },\n (error) => {\n recordEnvelopeLoss(\"network_error\");\n DEBUG_BUILD && debug.error(\"Encountered error running transport request:\", error);\n throw error;\n }\n );\n return buffer.add(requestTask).then(\n (result) => result,\n (error) => {\n if (error === SENTRY_BUFFER_FULL_ERROR) {\n DEBUG_BUILD && debug.error(\"Skipped sending event because buffer is full.\");\n recordEnvelopeLoss(\"queue_overflow\");\n return Promise.resolve({});\n } else {\n throw error;\n }\n }\n );\n }\n return {\n send,\n flush\n };\n}\n\nexport { DEFAULT_TRANSPORT_BUFFER_SIZE, createTransport };\n//# sourceMappingURL=base.js.map\n","import { createEnvelope } from './envelope.js';\nimport { dateTimestampInSeconds } from './time.js';\n\nfunction createClientReportEnvelope(discarded_events, dsn, timestamp) {\n const clientReportItem = [\n { type: \"client_report\" },\n {\n timestamp: timestamp || dateTimestampInSeconds(),\n discarded_events\n }\n ];\n return createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);\n}\n\nexport { createClientReportEnvelope };\n//# sourceMappingURL=clientreport.js.map\n","function getPossibleEventMessages(event) {\n const possibleMessages = [];\n if (event.message) {\n possibleMessages.push(event.message);\n }\n try {\n const lastException = event.exception.values[event.exception.values.length - 1];\n if (lastException?.value) {\n possibleMessages.push(lastException.value);\n if (lastException.type) {\n possibleMessages.push(`${lastException.type}: ${lastException.value}`);\n }\n }\n } catch {\n }\n return possibleMessages;\n}\n\nexport { getPossibleEventMessages };\n//# sourceMappingURL=eventUtils.js.map\n","import { SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_PROFILE_ID } from '../semanticAttributes.js';\n\nfunction convertTransactionEventToSpanJson(event) {\n const { trace_id, parent_span_id, span_id, status, origin, data, op } = event.contexts?.trace ?? {};\n return {\n data: data ?? {},\n description: event.transaction,\n op,\n parent_span_id,\n span_id: span_id ?? \"\",\n start_timestamp: event.start_timestamp ?? 0,\n status,\n timestamp: event.timestamp,\n trace_id: trace_id ?? \"\",\n origin,\n profile_id: data?.[SEMANTIC_ATTRIBUTE_PROFILE_ID],\n exclusive_time: data?.[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME],\n measurements: event.measurements,\n is_segment: true\n };\n}\nfunction convertSpanJsonToTransactionEvent(span) {\n return {\n type: \"transaction\",\n timestamp: span.timestamp,\n start_timestamp: span.start_timestamp,\n transaction: span.description,\n contexts: {\n trace: {\n trace_id: span.trace_id,\n span_id: span.span_id,\n parent_span_id: span.parent_span_id,\n op: span.op,\n status: span.status,\n origin: span.origin,\n data: {\n ...span.data,\n ...span.profile_id && { [SEMANTIC_ATTRIBUTE_PROFILE_ID]: span.profile_id },\n ...span.exclusive_time && { [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: span.exclusive_time }\n }\n }\n },\n measurements: span.measurements\n };\n}\n\nexport { convertSpanJsonToTransactionEvent, convertTransactionEventToSpanJson };\n//# sourceMappingURL=transactionEvent.js.map\n","const FILTERED_VALUE = \"[Filtered]\";\nconst PII_HEADER_SNIPPETS = [\"forwarded\", \"-ip\", \"remote-\", \"via\", \"-user\"];\nconst SENSITIVE_KEY_SNIPPETS = [\n \"auth\",\n \"token\",\n \"secret\",\n \"session\",\n // for the user_session cookie\n \"password\",\n \"passwd\",\n \"pwd\",\n \"key\",\n \"jwt\",\n \"bearer\",\n \"sso\",\n \"saml\",\n \"csrf\",\n \"xsrf\",\n \"credentials\",\n \"sid\",\n \"identity\",\n // Always treat cookie headers as sensitive in case individual key-value cookie pairs cannot properly be extracted\n \"set-cookie\",\n \"cookie\"\n];\nconst SENSITIVE_COOKIE_NAME_SNIPPETS = [\n // Express / Connect default session cookie\n \".sid\",\n // Opaque session ids (PHPSESSID, ASPSESSIONID*, BIGipServer*, *sessid*, …)\n \"sessid\",\n // Laravel etc. \"remember me\" tokens\n \"remember\",\n // OIDC / OAuth auxiliary (`oauth*` covered by header snippet `auth`)\n \"oidc\",\n \"pkce\",\n \"nonce\",\n // RFC 6265bis high-security cookie name prefixes\n \"__secure-\",\n \"__host-\",\n // Load balancer / CDN sticky-session cookies (opaque routing tokens)\n \"awsalb\",\n \"awselb\",\n \"akamai\",\n // BaaS / IdP session cookies (names often omit \"session\")\n \"__stripe\",\n \"cognito\",\n \"firebase\",\n \"supabase\",\n \"sb-\",\n // Step-up / MFA cookies\n \"mfa\",\n \"2fa\"\n];\n\nexport { FILTERED_VALUE, PII_HEADER_SNIPPETS, SENSITIVE_COOKIE_NAME_SNIPPETS, SENSITIVE_KEY_SNIPPETS };\n//# sourceMappingURL=filtering-snippets.js.map\n","import { PII_HEADER_SNIPPETS } from './filtering-snippets.js';\n\nfunction defaultPiiToCollectionOptions(sendDefaultPii) {\n return sendDefaultPii === true ? {\n userInfo: true,\n cookies: true,\n httpHeaders: { request: true, response: true },\n httpBodies: [\"incomingRequest\", \"outgoingRequest\", \"incomingResponse\", \"outgoingResponse\"],\n urlQueryParams: true,\n graphQL: { document: true, variables: true },\n genAI: { inputs: true, outputs: true },\n databaseQueryData: true,\n stackFrameVariables: true,\n frameContextLines: 7\n // default should be 5, but ContextLines integration uses 7\n } : {\n userInfo: false,\n cookies: { deny: PII_HEADER_SNIPPETS },\n httpHeaders: { request: { deny: PII_HEADER_SNIPPETS }, response: { deny: PII_HEADER_SNIPPETS } },\n httpBodies: [],\n urlQueryParams: { deny: PII_HEADER_SNIPPETS },\n // The GraphQL document has literal values redacted at collection time, so it was historically\n // always attached regardless of `sendDefaultPii`; keep it on to preserve that behavior.\n graphQL: { document: true, variables: true },\n genAI: { inputs: false, outputs: false },\n // Database query values were only sent with `sendDefaultPii: true` (e.g. Supabase gated on it),\n // so map the legacy \"off\" state to `false`.\n databaseQueryData: false,\n stackFrameVariables: true,\n frameContextLines: 7\n // default should be 5, but ContextLines integration uses 7\n };\n}\n\nexport { defaultPiiToCollectionOptions };\n//# sourceMappingURL=defaultPiiToCollectionOptions.js.map\n","import { defaultPiiToCollectionOptions } from './defaultPiiToCollectionOptions.js';\n\nconst DEFAULTS = {\n userInfo: true,\n cookies: true,\n httpHeaders: { request: true, response: true },\n httpBodies: [\"incomingRequest\", \"outgoingRequest\", \"incomingResponse\", \"outgoingResponse\"],\n urlQueryParams: true,\n graphQL: { document: true, variables: true },\n genAI: { inputs: true, outputs: true },\n databaseQueryData: true,\n stackFrameVariables: true,\n frameContextLines: 5\n};\nfunction isCollectBehavior(value) {\n return typeof value === \"boolean\" || \"allow\" in value || \"deny\" in value;\n}\nfunction resolveHttpHeaders(httpHeaders, base) {\n if (httpHeaders === void 0) {\n return { ...base.httpHeaders };\n }\n if (isCollectBehavior(httpHeaders)) {\n return { request: httpHeaders, response: httpHeaders };\n }\n return {\n request: httpHeaders.request ?? base.httpHeaders.request,\n response: httpHeaders.response ?? base.httpHeaders.response\n };\n}\nfunction resolveDataCollectionOptions(options) {\n const base = options.dataCollection != null ? DEFAULTS : defaultPiiToCollectionOptions(options.sendDefaultPii);\n const dc = options.dataCollection ?? {};\n return {\n userInfo: dc.userInfo ?? base.userInfo,\n cookies: dc.cookies ?? base.cookies,\n httpHeaders: resolveHttpHeaders(dc.httpHeaders, base),\n httpBodies: dc.httpBodies ?? base.httpBodies,\n // oxlint-disable-next-line typescript/no-deprecated\n urlQueryParams: dc.urlQueryParams ?? dc.queryParams ?? base.urlQueryParams,\n graphQL: {\n document: dc.graphQL?.document ?? base.graphQL.document,\n variables: dc.graphQL?.variables ?? base.graphQL.variables\n },\n genAI: {\n inputs: dc.genAI?.inputs ?? base.genAI.inputs,\n outputs: dc.genAI?.outputs ?? base.genAI.outputs\n },\n databaseQueryData: dc.databaseQueryData ?? base.databaseQueryData,\n stackFrameVariables: dc.stackFrameVariables ?? base.stackFrameVariables,\n frameContextLines: dc.frameContextLines ?? base.frameContextLines\n };\n}\n\nexport { resolveDataCollectionOptions };\n//# sourceMappingURL=resolveDataCollectionOptions.js.map\n","import { getEnvelopeEndpointWithUrlEncodedAuth } from './api.js';\nimport { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { getTraceContextFromScope, getCurrentScope, getIsolationScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope.js';\nimport { setupIntegration, afterSetupIntegrations, setupIntegrations } from './integration.js';\nimport { _INTERNAL_flushLogsBuffer } from './logs/internal.js';\nimport { _INTERNAL_flushMetricsBuffer } from './metrics/internal.js';\nimport { updateSession } from './session.js';\nimport { getDynamicSamplingContextFromScope } from './tracing/dynamicSamplingContext.js';\nimport { isStreamedBeforeSendSpanCallback } from './tracing/spans/beforeSendSpan.js';\nimport { extractGenAiSpansFromEvent } from './tracing/spans/extractGenAiSpans.js';\nimport { DEFAULT_TRANSPORT_BUFFER_SIZE } from './transports/base.js';\nimport { createClientReportEnvelope } from './utils/clientreport.js';\nimport { debug } from './utils/debug-logger.js';\nimport { makeDsn, dsnToString } from './utils/dsn.js';\nimport { addItemToEnvelope, createAttachmentEnvelopeItem } from './utils/envelope.js';\nimport { getPossibleEventMessages } from './utils/eventUtils.js';\nimport { isParameterizedString, isPrimitive, isObjectLike, isThenable, isPlainObject } from './utils/is.js';\nimport { merge } from './utils/merge.js';\nimport { uuid4, checkOrSetAlreadyCaught } from './utils/misc.js';\nimport { parseSampleRate } from './utils/parseSampleRate.js';\nimport { prepareEvent } from './utils/prepareEvent.js';\nimport { makePromiseBuffer, SENTRY_BUFFER_FULL_ERROR } from './utils/promisebuffer.js';\nimport { safeMathRandom } from './utils/randomSafeContext.js';\nimport { shouldIgnoreSpan, reparentChildSpans } from './utils/should-ignore-span.js';\nimport { showSpanDropWarning } from './utils/spanUtils.js';\nimport { safeUnref } from './utils/timer.js';\nimport { convertTransactionEventToSpanJson, convertSpanJsonToTransactionEvent } from './utils/transactionEvent.js';\nimport { resolveDataCollectionOptions } from './utils/data-collection/resolveDataCollectionOptions.js';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\nconst MISSING_RELEASE_FOR_SESSION_ERROR = \"Discarded session because of missing or non-string release\";\nconst INTERNAL_ERROR_SYMBOL = /* @__PURE__ */ Symbol.for(\"SentryInternalError\");\nconst DO_NOT_SEND_EVENT_SYMBOL = /* @__PURE__ */ Symbol.for(\"SentryDoNotSendEventError\");\nconst DEFAULT_FLUSH_INTERVAL = 5e3;\nfunction _makeInternalError(message) {\n return {\n message,\n [INTERNAL_ERROR_SYMBOL]: true\n };\n}\nfunction _makeDoNotSendEventError(message) {\n return {\n message,\n [DO_NOT_SEND_EVENT_SYMBOL]: true\n };\n}\nfunction _isInternalError(error) {\n return isObjectLike(error) && INTERNAL_ERROR_SYMBOL in error;\n}\nfunction _isDoNotSendEventError(error) {\n return isObjectLike(error) && DO_NOT_SEND_EVENT_SYMBOL in error;\n}\nfunction setupWeightBasedFlushing(client, afterCaptureHook, flushHook, estimateSizeFn, flushFn) {\n let weight = 0;\n let flushTimeout;\n let isTimerActive = false;\n client.on(flushHook, () => {\n weight = 0;\n clearTimeout(flushTimeout);\n isTimerActive = false;\n });\n client.on(afterCaptureHook, (item) => {\n weight += estimateSizeFn(item);\n if (weight >= 8e5) {\n flushFn(client);\n } else if (!isTimerActive) {\n const flushInterval = client.getOptions()._flushInterval ?? DEFAULT_FLUSH_INTERVAL;\n if (flushInterval > 0) {\n isTimerActive = true;\n flushTimeout = safeUnref(\n setTimeout(() => {\n flushFn(client);\n }, flushInterval)\n );\n }\n }\n });\n client.on(\"flush\", () => {\n flushFn(client);\n });\n}\nclass Client {\n /**\n * Initializes this client instance.\n *\n * @param options Options for the client.\n */\n constructor(options) {\n this._options = options;\n this._integrations = {};\n this._numProcessing = 0;\n this._outcomes = {};\n this._hooks = {};\n this._eventProcessors = [];\n this._promiseBuffer = makePromiseBuffer(options.transportOptions?.bufferSize ?? DEFAULT_TRANSPORT_BUFFER_SIZE);\n this._dataCollection = resolveDataCollectionOptions(options);\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n } else {\n DEBUG_BUILD && debug.warn(\"No DSN provided, client will not send events.\");\n }\n if (this._dsn) {\n const url = getEnvelopeEndpointWithUrlEncodedAuth(\n this._dsn,\n options.tunnel,\n options._metadata ? options._metadata.sdk : void 0\n );\n this._transport = options.transport({\n tunnel: this._options.tunnel,\n recordDroppedEvent: this.recordDroppedEvent.bind(this),\n ...options.transportOptions,\n url\n });\n }\n this._options.enableLogs = this._options.enableLogs ?? this._options._experiments?.enableLogs ?? true;\n if (this._options.enableLogs) {\n setupWeightBasedFlushing(this, \"afterCaptureLog\", \"flushLogs\", estimateLogSizeInBytes, _INTERNAL_flushLogsBuffer);\n }\n const enableMetrics = this._options.enableMetrics ?? this._options._experiments?.enableMetrics ?? true;\n if (enableMetrics) {\n setupWeightBasedFlushing(\n this,\n \"afterCaptureMetric\",\n \"flushMetrics\",\n estimateMetricSizeInBytes,\n _INTERNAL_flushMetricsBuffer\n );\n }\n }\n /**\n * Captures an exception event and sends it to Sentry.\n *\n * Unlike `captureException` exported from every SDK, this method requires that you pass it the current scope.\n */\n captureException(exception, hint, scope) {\n const eventId = uuid4();\n if (checkOrSetAlreadyCaught(exception)) {\n DEBUG_BUILD && debug.log(ALREADY_SEEN_ERROR);\n return eventId;\n }\n const hintWithEventId = {\n event_id: eventId,\n ...hint\n };\n this._process(\n () => this.eventFromException(exception, hintWithEventId).then((event) => this._captureEvent(event, hintWithEventId, scope)).then((res) => res),\n \"error\"\n );\n return hintWithEventId.event_id;\n }\n /**\n * Captures a message event and sends it to Sentry.\n *\n * Unlike `captureMessage` exported from every SDK, this method requires that you pass it the current scope.\n */\n captureMessage(message, level, hint, currentScope) {\n const hintWithEventId = {\n event_id: uuid4(),\n ...hint\n };\n const eventMessage = isParameterizedString(message) ? message : String(message);\n const isMessage = isPrimitive(message);\n const promisedEvent = isMessage ? this.eventFromMessage(eventMessage, level, hintWithEventId) : this.eventFromException(message, hintWithEventId);\n this._process(\n () => promisedEvent.then((event) => this._captureEvent(event, hintWithEventId, currentScope)),\n isMessage ? \"unknown\" : \"error\"\n );\n return hintWithEventId.event_id;\n }\n /**\n * Captures a manually created event and sends it to Sentry.\n *\n * Unlike `captureEvent` exported from every SDK, this method requires that you pass it the current scope.\n */\n captureEvent(event, hint, currentScope) {\n const eventId = uuid4();\n if (hint?.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n DEBUG_BUILD && debug.log(ALREADY_SEEN_ERROR);\n return eventId;\n }\n const hintWithEventId = {\n event_id: eventId,\n ...hint\n };\n const sdkProcessingMetadata = event.sdkProcessingMetadata || {};\n const capturedSpanScope = sdkProcessingMetadata.capturedSpanScope;\n const capturedSpanIsolationScope = sdkProcessingMetadata.capturedSpanIsolationScope;\n const dataCategory = getDataCategoryByType(event.type);\n this._process(\n () => this._captureEvent(event, hintWithEventId, capturedSpanScope || currentScope, capturedSpanIsolationScope),\n dataCategory\n );\n return hintWithEventId.event_id;\n }\n /**\n * Captures a session.\n */\n captureSession(session) {\n this.sendSession(session);\n updateSession(session, { init: false });\n }\n /**\n * Get the current Dsn.\n */\n getDsn() {\n return this._dsn;\n }\n /**\n * Get the current options.\n */\n getOptions() {\n return this._options;\n }\n /**\n * Get the resolved data collection configuration.\n */\n getDataCollectionOptions() {\n return this._dataCollection;\n }\n /**\n * Get the SDK metadata.\n * @see SdkMetadata\n */\n getSdkMetadata() {\n return this._options._metadata;\n }\n /**\n * Returns the transport that is used by the client.\n * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.\n */\n getTransport() {\n return this._transport;\n }\n /**\n * Wait for all events to be sent or the timeout to expire, whichever comes first.\n *\n * @param timeout Maximum time in ms the client should wait for events to be flushed. Omitting this parameter will\n * cause the client to wait until all events are sent before resolving the promise.\n * @returns A promise that will resolve with `true` if all events are sent before the timeout, or `false` if there are\n * still events in the queue when the timeout is reached.\n */\n // @ts-expect-error - PromiseLike is a subset of Promise\n async flush(timeout) {\n const transport = this._transport;\n this.emit(\"flush\");\n if (!transport) {\n return true;\n }\n const clientFinished = await this._isClientDoneProcessing(timeout);\n const transportFlushed = await transport.flush(timeout);\n return clientFinished && transportFlushed;\n }\n /**\n * Flush the event queue and set the client to `enabled = false`. See {@link Client.flush}.\n *\n * @param {number} timeout Maximum time in ms the client should wait before shutting down. Omitting this parameter will cause\n * the client to wait until all events are sent before disabling itself.\n * @returns {Promise} A promise which resolves to `true` if the flush completes successfully before the timeout, or `false` if\n * it doesn't.\n */\n // @ts-expect-error - PromiseLike is a subset of Promise\n async close(timeout) {\n const result = await this.flush(timeout);\n this.getOptions().enabled = false;\n this.emit(\"close\");\n return result;\n }\n /**\n * Get all installed event processors.\n */\n getEventProcessors() {\n return this._eventProcessors;\n }\n /**\n * Adds an event processor that applies to any event processed by this client.\n */\n addEventProcessor(eventProcessor) {\n this._eventProcessors.push(eventProcessor);\n }\n /**\n * Initialize this client.\n * Call this after the client was set on a scope.\n */\n init() {\n if (this._isEnabled() || // Force integrations to be setup even if no DSN was set when we have\n // Spotlight enabled. This is particularly important for browser as we\n // don't support the `spotlight` option there and rely on the users\n // adding the `spotlightBrowserIntegration()` to their integrations which\n // wouldn't get initialized with the check below when there's no DSN set.\n this._options.integrations.some(({ name }) => name.startsWith(\"Spotlight\"))) {\n this._setupIntegrations();\n }\n }\n /**\n * Gets an installed integration by its name.\n *\n * @returns {Integration|undefined} The installed integration or `undefined` if no integration with that `name` was installed.\n */\n getIntegrationByName(integrationName) {\n return this._integrations[integrationName];\n }\n /**\n * Returns the names of all installed integrations.\n */\n getIntegrationNames() {\n return Object.keys(this._integrations);\n }\n /**\n * Add an integration to the client.\n * This can be used to e.g. lazy load integrations.\n * In most cases, this should not be necessary,\n * and you're better off just passing the integrations via `integrations: []` at initialization time.\n * However, if you find the need to conditionally load & add an integration, you can use `addIntegration` to do so.\n */\n addIntegration(integration) {\n const isAlreadyInstalled = this._integrations[integration.name];\n if (!isAlreadyInstalled && integration.beforeSetup) {\n integration.beforeSetup(this);\n }\n setupIntegration(this, integration, this._integrations);\n if (!isAlreadyInstalled) {\n afterSetupIntegrations(this, [integration]);\n }\n }\n /**\n * Send a fully prepared event to Sentry.\n */\n sendEvent(event, hint = {}) {\n this.emit(\"beforeSendEvent\", event, hint);\n const genAiSpanItem = extractGenAiSpansFromEvent(event, this);\n let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n for (const attachment of hint.attachments || []) {\n env = addItemToEnvelope(env, createAttachmentEnvelopeItem(attachment));\n }\n if (genAiSpanItem) {\n env = addItemToEnvelope(env, genAiSpanItem);\n }\n this.sendEnvelope(env).then((sendResponse) => this.emit(\"afterSendEvent\", event, sendResponse));\n }\n /**\n * Send a session or session aggregrates to Sentry.\n */\n sendSession(session) {\n const { release: clientReleaseOption, environment: clientEnvironmentOption = DEFAULT_ENVIRONMENT } = this._options;\n if (\"aggregates\" in session) {\n const sessionAttrs = session.attrs || {};\n if (!sessionAttrs.release && !clientReleaseOption) {\n DEBUG_BUILD && debug.warn(MISSING_RELEASE_FOR_SESSION_ERROR);\n return;\n }\n sessionAttrs.release = sessionAttrs.release || clientReleaseOption;\n sessionAttrs.environment = sessionAttrs.environment || clientEnvironmentOption;\n session.attrs = sessionAttrs;\n } else {\n if (!session.release && !clientReleaseOption) {\n DEBUG_BUILD && debug.warn(MISSING_RELEASE_FOR_SESSION_ERROR);\n return;\n }\n session.release = session.release || clientReleaseOption;\n session.environment = session.environment || clientEnvironmentOption;\n }\n this.emit(\"beforeSendSession\", session);\n const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);\n this.sendEnvelope(env);\n }\n /**\n * Record on the client that an event got dropped (ie, an event that will not be sent to Sentry).\n */\n recordDroppedEvent(reason, category, count = 1) {\n if (this._options.sendClientReports) {\n const key = `${reason}:${category}`;\n DEBUG_BUILD && debug.log(`Recording outcome: \"${key}\"${count > 1 ? ` (${count} times)` : \"\"}`);\n this._outcomes[key] = (this._outcomes[key] || 0) + count;\n }\n }\n /**\n * Register a hook on this client.\n */\n on(hook, callback) {\n const hookCallbacks = this._hooks[hook] = this._hooks[hook] || /* @__PURE__ */ new Set();\n const uniqueCallback = (...args) => callback(...args);\n hookCallbacks.add(uniqueCallback);\n return () => {\n hookCallbacks.delete(uniqueCallback);\n };\n }\n /**\n * Emit a hook that was previously registered via `on()`.\n */\n emit(hook, ...rest) {\n const callbacks = this._hooks[hook];\n if (callbacks) {\n callbacks.forEach((callback) => callback(...rest));\n }\n }\n /**\n * Send an envelope to Sentry.\n */\n // @ts-expect-error - PromiseLike is a subset of Promise\n async sendEnvelope(envelope) {\n this.emit(\"beforeEnvelope\", envelope);\n if (this._isEnabled() && this._transport) {\n try {\n return await this._transport.send(envelope);\n } catch (reason) {\n DEBUG_BUILD && debug.error(\"Error while sending envelope:\", reason);\n return {};\n }\n }\n DEBUG_BUILD && debug.error(\"Transport disabled\");\n return {};\n }\n /**\n * Register a cleanup function to be called when the client is disposed.\n * This is useful for integrations that need to clean up global state.\n *\n * NOTE: This is a no-op in the base `Client` class. Subclasses like `ServerRuntimeClient`\n * override this method to actually register and execute cleanup callbacks.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n registerCleanup(callback) {\n }\n /**\n * Disposes of the client and releases all resources.\n *\n * Subclasses should override this method to clean up their own resources, including invoking\n * any callbacks registered via {@link Client.registerCleanup}. The base implementation is a\n * no-op and does NOT execute registered cleanup callbacks.\n *\n * After calling dispose(), the client should not be used anymore.\n */\n dispose() {\n }\n /* eslint-enable @typescript-eslint/unified-signatures */\n /** Setup integrations for this client. */\n _setupIntegrations() {\n const { integrations } = this._options;\n this._integrations = setupIntegrations(this, integrations);\n afterSetupIntegrations(this, integrations);\n }\n /** Updates existing session based on the provided event */\n _updateSessionFromEvent(session, event) {\n let crashed = event.level === \"fatal\";\n let errored = false;\n const exceptions = event.exception?.values;\n if (exceptions) {\n errored = true;\n crashed = false;\n for (const ex of exceptions) {\n if (ex.mechanism?.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n const sessionNonTerminal = session.status === \"ok\";\n const shouldUpdateAndSend = sessionNonTerminal && session.errors === 0 || sessionNonTerminal && crashed;\n if (shouldUpdateAndSend) {\n updateSession(session, {\n ...crashed && { status: \"crashed\" },\n errors: session.errors || Number(errored || crashed)\n });\n this.captureSession(session);\n }\n }\n /**\n * 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 async _isClientDoneProcessing(timeout) {\n let ticked = 0;\n while (!timeout || ticked < timeout) {\n await new Promise((resolve) => setTimeout(resolve, 1));\n if (!this._numProcessing) {\n return true;\n }\n ticked++;\n }\n return false;\n }\n /** Determines whether this SDK is enabled and a transport is present. */\n _isEnabled() {\n return this.getOptions().enabled !== false && this._transport !== void 0;\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 currentScope A scope containing event metadata.\n * @returns A new event with more information.\n */\n _prepareEvent(event, hint, currentScope, isolationScope) {\n const options = this.getOptions();\n const integrations = this.getIntegrationNames();\n if (!hint.integrations && integrations.length) {\n hint.integrations = integrations;\n }\n this.emit(\"preprocessEvent\", event, hint);\n if (!event.type) {\n isolationScope.setLastEventId(event.event_id || hint.event_id);\n }\n return prepareEvent(options, event, hint, currentScope, this, isolationScope).then((evt) => {\n if (evt === null) {\n return evt;\n }\n this.emit(\"postprocessEvent\", evt, hint);\n evt.contexts = {\n trace: { ...evt.contexts?.trace, ...getTraceContextFromScope(currentScope) },\n ...evt.contexts\n };\n const dynamicSamplingContext = getDynamicSamplingContextFromScope(this, currentScope);\n evt.sdkProcessingMetadata = {\n dynamicSamplingContext,\n ...evt.sdkProcessingMetadata\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 _captureEvent(event, hint = {}, currentScope = getCurrentScope(), isolationScope = getIsolationScope()) {\n if (DEBUG_BUILD && isErrorEvent(event)) {\n debug.log(`Captured error event \\`${getPossibleEventMessages(event)[0] || \"\"}\\``);\n }\n return this._processEvent(event, hint, currentScope, isolationScope).then(\n (finalEvent) => {\n return finalEvent.event_id;\n },\n (reason) => {\n if (DEBUG_BUILD) {\n if (_isDoNotSendEventError(reason)) {\n debug.log(reason.message);\n } else if (_isInternalError(reason)) {\n debug.warn(reason.message);\n } else {\n debug.warn(reason);\n }\n }\n return void 0;\n }\n );\n }\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param currentScope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n _processEvent(event, hint, currentScope, isolationScope) {\n const options = this.getOptions();\n const { sampleRate } = options;\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || \"error\";\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n const parsedSampleRate = typeof sampleRate === \"undefined\" ? void 0 : parseSampleRate(sampleRate);\n const dataCategory = getDataCategoryByType(event.type);\n return this._prepareEvent(event, hint, currentScope, isolationScope).then((prepared) => {\n if (prepared === null) {\n this.recordDroppedEvent(\"event_processor\", dataCategory);\n throw _makeDoNotSendEventError(\"An event processor returned `null`, will not send event.\");\n }\n const isInternalException = hint.data?.__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n const result = processBeforeSend(this, options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n }).then((processedEvent) => {\n if (processedEvent === null) {\n this.recordDroppedEvent(\"before_send\", dataCategory);\n if (isTransaction) {\n const spans = event.spans || [];\n const spanCount = 1 + spans.length;\n this.recordDroppedEvent(\"before_send\", \"span\", spanCount);\n }\n throw _makeDoNotSendEventError(`${beforeSendLabel} returned \\`null\\`, will not send event.`);\n }\n const session = currentScope.getSession() || isolationScope.getSession();\n if (isError && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n if (isError && typeof parsedSampleRate === \"number\" && safeMathRandom() > parsedSampleRate) {\n this.recordDroppedEvent(\"sample_rate\", \"error\");\n throw _makeDoNotSendEventError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`\n );\n }\n if (isTransaction) {\n const spanCountBefore = processedEvent.sdkProcessingMetadata?.spanCountBeforeProcessing || 0;\n const spanCountAfter = processedEvent.spans ? processedEvent.spans.length : 0;\n const droppedSpanCount = spanCountBefore - spanCountAfter;\n if (droppedSpanCount > 0) {\n this.recordDroppedEvent(\"before_send\", \"span\", droppedSpanCount);\n }\n }\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = \"custom\";\n processedEvent.transaction_info = {\n ...transactionInfo,\n source\n };\n }\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n }).then(null, (reason) => {\n if (_isDoNotSendEventError(reason) || _isInternalError(reason)) {\n throw reason;\n }\n this.captureException(reason, {\n mechanism: {\n handled: false,\n type: \"internal\"\n },\n data: {\n __sentry__: true\n },\n originalException: reason\n });\n throw _makeInternalError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${reason}`\n );\n });\n }\n /**\n * Occupies the client with processing and event\n */\n _process(taskProducer, dataCategory) {\n this._numProcessing++;\n void this._promiseBuffer.add(taskProducer).then(\n (value) => {\n this._numProcessing--;\n return value;\n },\n (reason) => {\n this._numProcessing--;\n if (reason === SENTRY_BUFFER_FULL_ERROR) {\n this.recordDroppedEvent(\"queue_overflow\", dataCategory);\n }\n return reason;\n }\n );\n }\n /**\n * Clears outcomes on this client and returns them.\n */\n _clearOutcomes() {\n const outcomes = this._outcomes;\n this._outcomes = {};\n return Object.entries(outcomes).map(([key, quantity]) => {\n const [reason, category] = key.split(\":\");\n return {\n reason,\n category,\n quantity\n };\n });\n }\n /**\n * Sends client reports as an envelope.\n */\n _flushOutcomes() {\n DEBUG_BUILD && debug.log(\"Flushing outcomes...\");\n const outcomes = this._clearOutcomes();\n if (outcomes.length === 0) {\n DEBUG_BUILD && debug.log(\"No outcomes to send\");\n return;\n }\n if (!this._dsn) {\n DEBUG_BUILD && debug.log(\"No dsn provided, will not send outcomes\");\n return;\n }\n DEBUG_BUILD && debug.log(\"Sending outcomes:\", outcomes);\n const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));\n this.sendEnvelope(envelope);\n }\n}\nfunction getDataCategoryByType(type) {\n return type === \"replay_event\" ? \"replay\" : type || \"error\";\n}\nfunction _validateBeforeSendResult(beforeSendResult, beforeSendLabel) {\n const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n if (isThenable(beforeSendResult)) {\n return beforeSendResult.then(\n (event) => {\n if (!isPlainObject(event) && event !== null) {\n throw _makeInternalError(invalidValueError);\n }\n return event;\n },\n (e) => {\n throw _makeInternalError(`${beforeSendLabel} rejected with ${e}`);\n }\n );\n } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n throw _makeInternalError(invalidValueError);\n }\n return beforeSendResult;\n}\nfunction processBeforeSend(client, options, event, hint) {\n const { beforeSend, beforeSendTransaction, ignoreSpans } = options;\n const beforeSendSpan = !isStreamedBeforeSendSpanCallback(options.beforeSendSpan) && options.beforeSendSpan;\n let processedEvent = event;\n if (isErrorEvent(processedEvent) && beforeSend) {\n return beforeSend(processedEvent, hint);\n }\n if (isTransactionEvent(processedEvent)) {\n if (beforeSendSpan || ignoreSpans) {\n const rootSpanJson = convertTransactionEventToSpanJson(processedEvent);\n if (ignoreSpans?.length && shouldIgnoreSpan(\n { description: rootSpanJson.description, op: rootSpanJson.op, attributes: rootSpanJson.data },\n ignoreSpans\n )) {\n return null;\n }\n if (beforeSendSpan) {\n const processedRootSpanJson = beforeSendSpan(rootSpanJson);\n if (!processedRootSpanJson) {\n showSpanDropWarning();\n } else {\n processedEvent = merge(event, convertSpanJsonToTransactionEvent(processedRootSpanJson));\n }\n }\n if (processedEvent.spans) {\n const processedSpans = [];\n const initialSpans = processedEvent.spans;\n for (const span of initialSpans) {\n if (ignoreSpans?.length && shouldIgnoreSpan({ description: span.description, op: span.op, attributes: span.data }, ignoreSpans)) {\n reparentChildSpans(initialSpans, span);\n continue;\n }\n if (beforeSendSpan) {\n const processedSpan = beforeSendSpan(span);\n if (!processedSpan) {\n showSpanDropWarning();\n processedSpans.push(span);\n } else {\n processedSpans.push(processedSpan);\n }\n } else {\n processedSpans.push(span);\n }\n }\n const droppedSpans = processedEvent.spans.length - processedSpans.length;\n if (droppedSpans) {\n client.recordDroppedEvent(\"before_send\", \"span\", droppedSpans);\n }\n processedEvent.spans = processedSpans;\n }\n }\n if (beforeSendTransaction) {\n if (processedEvent.spans) {\n const spanCountBefore = processedEvent.spans.length;\n processedEvent.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n spanCountBeforeProcessing: spanCountBefore\n };\n }\n return beforeSendTransaction(processedEvent, hint);\n }\n }\n return processedEvent;\n}\nfunction isErrorEvent(event) {\n return event.type === void 0;\n}\nfunction isTransactionEvent(event) {\n return event.type === \"transaction\";\n}\nfunction estimateMetricSizeInBytes(metric) {\n let weight = 0;\n if (metric.name) {\n weight += metric.name.length * 2;\n }\n weight += 8;\n return weight + estimateAttributesSizeInBytes(metric.attributes);\n}\nfunction estimateLogSizeInBytes(log) {\n let weight = 0;\n if (log.message) {\n weight += log.message.length * 2;\n }\n return weight + estimateAttributesSizeInBytes(log.attributes);\n}\nfunction estimateAttributesSizeInBytes(attributes) {\n if (!attributes) {\n return 0;\n }\n let weight = 0;\n Object.values(attributes).forEach((value) => {\n if (Array.isArray(value)) {\n weight += value.length * estimatePrimitiveSizeInBytes(value[0]);\n } else if (isPrimitive(value)) {\n weight += estimatePrimitiveSizeInBytes(value);\n } else {\n weight += 100;\n }\n });\n return weight;\n}\nfunction estimatePrimitiveSizeInBytes(value) {\n if (typeof value === \"string\") {\n return value.length * 2;\n } else if (typeof value === \"number\") {\n return 8;\n } else if (typeof value === \"boolean\") {\n return 4;\n }\n return 0;\n}\n\nexport { Client };\n//# sourceMappingURL=client.js.map\n","import { getCurrentScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { debug, consoleSandbox } from './utils/debug-logger.js';\n\nfunction initAndBind(clientClass, options) {\n if (options.debug === true) {\n if (DEBUG_BUILD) {\n debug.enable();\n } else {\n consoleSandbox(() => {\n console.warn(\"[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.\");\n });\n }\n }\n const scope = getCurrentScope();\n scope.update(options.initialScope);\n const client = new clientClass(options);\n setCurrentClient(client);\n client.init();\n return client;\n}\nfunction setCurrentClient(client) {\n getCurrentScope().setClient(client);\n}\n\nexport { initAndBind, setCurrentClient };\n//# sourceMappingURL=sdk.js.map\n","import { FILTERED_VALUE, SENSITIVE_KEY_SNIPPETS } from './filtering-snippets.js';\n\nfunction isSensitiveKey(lower, denySnippets) {\n return denySnippets.some((snippet) => lower.includes(snippet));\n}\nfunction shouldFilterDataKey(key, behavior, additionalDenyTerms) {\n if (behavior === false) {\n return true;\n }\n const lowerKey = key.toLowerCase();\n const denySnippets = additionalDenyTerms != null ? [...SENSITIVE_KEY_SNIPPETS, ...additionalDenyTerms] : SENSITIVE_KEY_SNIPPETS;\n if (isSensitiveKey(lowerKey, denySnippets)) {\n return true;\n }\n if (behavior === true) {\n return false;\n }\n const terms = \"deny\" in behavior ? behavior.deny : behavior.allow;\n const matchesConfiguredTerm = terms.some((term) => lowerKey.includes(term.toLowerCase()));\n return \"deny\" in behavior ? matchesConfiguredTerm : !matchesConfiguredTerm;\n}\nfunction filterKeyValueData(data, behavior, additionalDenyTerms) {\n if (behavior === false) {\n return {};\n }\n const result = {};\n for (const key of Object.keys(data)) {\n result[key] = shouldFilterDataKey(key, behavior, additionalDenyTerms) ? FILTERED_VALUE : data[key];\n }\n return result;\n}\n\nexport { filterKeyValueData, shouldFilterDataKey };\n//# sourceMappingURL=filterKeyValueData.js.map\n","import { FILTERED_VALUE } from './filtering-snippets.js';\nimport { shouldFilterDataKey } from './filterKeyValueData.js';\n\nfunction filterQueryParams(queryString, behavior) {\n if (!queryString || behavior === false) {\n return void 0;\n }\n return queryString.split(\"&\").map((pair) => {\n const separatorIndex = pair.indexOf(\"=\");\n const encodedKey = separatorIndex === -1 ? pair : pair.slice(0, separatorIndex);\n const key = new URLSearchParams(`${encodedKey}=`).keys().next().value;\n return key !== void 0 && shouldFilterDataKey(key, behavior) ? `${encodedKey}=${FILTERED_VALUE}` : pair;\n }).join(\"&\");\n}\n\nexport { filterQueryParams };\n//# sourceMappingURL=filterQueryParams.js.map\n","import { filterQueryParams } from './filterQueryParams.js';\n\nfunction filterUrlQuery(url, behavior) {\n const fragmentStart = url.indexOf(\"#\");\n const queryEnd = fragmentStart === -1 ? url.length : fragmentStart;\n const queryStart = url.indexOf(\"?\");\n if (queryStart === -1 || queryStart > queryEnd) {\n return url;\n }\n const prefix = url.slice(0, queryStart);\n const query = url.slice(queryStart + 1, queryEnd);\n const suffix = url.slice(queryEnd);\n const filtered = filterQueryParams(query, behavior);\n return filtered ? `${prefix}?${filtered}${suffix}` : `${prefix}${suffix}`;\n}\n\nexport { filterUrlQuery };\n//# sourceMappingURL=filterUrlQuery.js.map\n","import { getClient } from '../../currentScopes.js';\nimport { filterQueryParams } from './filterQueryParams.js';\nimport { filterUrlQuery } from './filterUrlQuery.js';\n\nfunction urlQueryParamsBehavior(client) {\n return (client ?? getClient())?.getDataCollectionOptions().urlQueryParams ?? true;\n}\nfunction filterCollectedUrl(url, client) {\n return url === void 0 ? void 0 : filterUrlQuery(url, urlQueryParamsBehavior(client));\n}\nfunction filterCollectedUrlQuery(query, client) {\n if (!query) {\n return query;\n }\n const hasPrefix = query.startsWith(\"?\");\n const filtered = filterQueryParams(hasPrefix ? query.slice(1) : query, urlQueryParamsBehavior(client));\n return filtered && hasPrefix ? `?${filtered}` : filtered;\n}\n\nexport { filterCollectedUrl, filterCollectedUrlQuery };\n//# sourceMappingURL=filterCollectedUrl.js.map\n","import { URL_FULL } from '@sentry/conventions/attributes';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../semanticAttributes.js';\nimport { filterCollectedUrlQuery, filterCollectedUrl } from './data-collection/filterCollectedUrl.js';\n\nconst DEFAULT_BASE_URL = \"thismessage:/\";\nfunction isURLObjectRelative(url) {\n return \"isRelative\" in url;\n}\nfunction parseStringToURLObject(url, urlBase) {\n const isRelative = url.indexOf(\"://\") <= 0 && url.indexOf(\"//\") !== 0;\n const base = urlBase ?? (isRelative ? DEFAULT_BASE_URL : void 0);\n try {\n if (\"canParse\" in URL && !URL.canParse(url, base)) {\n return void 0;\n }\n const fullUrlObject = new URL(url, base);\n if (isRelative) {\n return {\n isRelative,\n pathname: fullUrlObject.pathname,\n search: fullUrlObject.search,\n hash: fullUrlObject.hash\n };\n }\n return fullUrlObject;\n } catch {\n }\n return void 0;\n}\nfunction getSanitizedUrlStringFromUrlObject(url) {\n if (isURLObjectRelative(url)) {\n return url.pathname;\n }\n const newUrl = new URL(url);\n newUrl.search = \"\";\n newUrl.hash = \"\";\n if ([\"80\", \"443\"].includes(newUrl.port)) {\n newUrl.port = \"\";\n }\n if (newUrl.password) {\n newUrl.password = \"%filtered%\";\n }\n if (newUrl.username) {\n newUrl.username = \"%filtered%\";\n }\n return newUrl.toString();\n}\nfunction getHttpSpanNameFromUrlObject(urlObject, kind, request, routeName) {\n const method = request?.method?.toUpperCase() ?? \"GET\";\n const route = routeName ? routeName : urlObject ? kind === \"client\" ? getSanitizedUrlStringFromUrlObject(urlObject) : urlObject.pathname : \"/\";\n return `${method} ${route}`;\n}\nfunction getHttpSpanDetailsFromUrlObject(urlObject, kind, spanOrigin, request, routeName, client) {\n const attributes = {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin,\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: \"url\"\n };\n if (routeName) {\n attributes[kind === \"server\" ? \"http.route\" : \"url.template\"] = routeName;\n attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = \"route\";\n }\n if (request?.method) {\n attributes[SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD] = request.method.toUpperCase();\n }\n if (urlObject) {\n if (urlObject.search) {\n attributes[\"url.query\"] = filterCollectedUrlQuery(urlObject.search, client);\n }\n if (urlObject.hash) {\n attributes[\"url.fragment\"] = urlObject.hash;\n }\n if (urlObject.pathname) {\n attributes[\"url.path\"] = urlObject.pathname;\n if (urlObject.pathname === \"/\") {\n attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = \"route\";\n }\n }\n if (!isURLObjectRelative(urlObject)) {\n attributes[URL_FULL] = filterCollectedUrl(urlObject.href, client);\n if (urlObject.port) {\n attributes[\"url.port\"] = urlObject.port;\n }\n if (urlObject.protocol) {\n attributes[\"url.scheme\"] = urlObject.protocol;\n }\n if (urlObject.hostname) {\n attributes[kind === \"server\" ? \"server.address\" : \"url.domain\"] = urlObject.hostname;\n }\n }\n }\n return [getHttpSpanNameFromUrlObject(urlObject, kind, request, routeName), attributes];\n}\nfunction parseUrl(url) {\n if (!url) {\n return {};\n }\n const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n if (!match) {\n return {};\n }\n const query = match[6] || \"\";\n const fragment = match[8] || \"\";\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n search: query,\n hash: fragment,\n relative: match[5] + query + fragment\n // everything minus origin\n };\n}\nfunction stripUrlQueryAndFragment(urlPath) {\n return urlPath.split(/[?#]/, 1)[0];\n}\nfunction getSanitizedUrlString(url) {\n const { protocol, host, path } = url;\n const filteredHost = host?.replace(/^.*@/, \"[filtered]:[filtered]@\").replace(/(:80)$/, \"\").replace(/(:443)$/, \"\") || \"\";\n return `${protocol ? `${protocol}://` : \"\"}${filteredHost}${path}`;\n}\nfunction stripDataUrlContent(url, includeDataPrefix = true) {\n if (url.startsWith(\"data:\")) {\n const match = url.match(/^data:([^;,]+)/);\n const mimeType = match ? match[1] : \"text/plain\";\n const isBase64 = url.includes(\";base64,\");\n const dataStart = url.indexOf(\",\");\n let dataPrefix = \"\";\n if (includeDataPrefix && dataStart !== -1) {\n const data = url.slice(dataStart + 1);\n dataPrefix = data.length > 10 ? `${data.slice(0, 10)}... [truncated]` : data;\n }\n return `data:${mimeType}${isBase64 ? \",base64\" : \"\"}${dataPrefix ? `,${dataPrefix}` : \"\"}`;\n }\n return url;\n}\n\nexport { getHttpSpanDetailsFromUrlObject, getSanitizedUrlString, getSanitizedUrlStringFromUrlObject, isURLObjectRelative, parseStringToURLObject, parseUrl, stripDataUrlContent, stripUrlQueryAndFragment };\n//# sourceMappingURL=url.js.map\n","import { parseStringToURLObject, isURLObjectRelative } from './url.js';\n\nfunction isSentryRequestUrl(url, client) {\n const dsn = client?.getDsn();\n const tunnel = client?.getOptions().tunnel;\n return checkDsn(url, dsn) || checkTunnel(url, tunnel);\n}\nfunction checkTunnel(url, tunnel) {\n if (!tunnel) {\n return false;\n }\n return removeTrailingSlash(url) === removeTrailingSlash(tunnel);\n}\nfunction checkDsn(url, dsn) {\n const urlParts = parseStringToURLObject(url);\n if (!urlParts || isURLObjectRelative(urlParts)) {\n return false;\n }\n if (!dsn) {\n return false;\n }\n return hostnameMatchesDsnHost(urlParts.hostname, dsn.host) && /(^|&|\\?)sentry_key=/.test(urlParts.search);\n}\nfunction hostnameMatchesDsnHost(hostname, dsnHost) {\n return hostname === dsnHost || dsnHost.length > 0 && hostname.endsWith(`.${dsnHost}`);\n}\nfunction removeTrailingSlash(str) {\n return str[str.length - 1] === \"/\" ? str.slice(0, -1) : str;\n}\n\nexport { isSentryRequestUrl };\n//# sourceMappingURL=isSentryRequestUrl.js.map\n","function addAutoIpAddressToUser(objWithMaybeUser) {\n if (objWithMaybeUser.user?.ip_address === void 0) {\n objWithMaybeUser.user = {\n ...objWithMaybeUser.user,\n ip_address: \"{{auto}}\"\n };\n }\n}\nfunction addAutoIpAddressToSession(session) {\n if (\"aggregates\" in session) {\n if (session.attrs?.[\"ip_address\"] === void 0) {\n session.attrs = {\n ...session.attrs,\n ip_address: \"{{auto}}\"\n };\n }\n } else {\n if (session.ipAddress === void 0) {\n session.ipAddress = \"{{auto}}\";\n }\n }\n}\n\nexport { addAutoIpAddressToSession, addAutoIpAddressToUser };\n//# sourceMappingURL=ipAddress.js.map\n","import { SDK_VERSION } from './version.js';\n\nfunction applySdkMetadata(options, name, names = [name], source = \"npm\") {\n const sdk = (options._metadata = options._metadata || {}).sdk = options._metadata.sdk || {};\n if (!sdk.name) {\n sdk.name = `sentry.javascript.${name}`;\n sdk.packages = names.map((name2) => ({\n name: `${source}:@sentry/${name2}`,\n version: SDK_VERSION\n }));\n sdk.version = SDK_VERSION;\n }\n}\n\nexport { applySdkMetadata };\n//# sourceMappingURL=sdkMetadata.js.map\n","import { getClient, getIsolationScope } from './currentScopes.js';\nimport { consoleSandbox } from './utils/debug-logger.js';\nimport { dateTimestampInSeconds } from './utils/time.js';\n\nconst DEFAULT_BREADCRUMBS = 100;\nfunction addBreadcrumb(breadcrumb, hint) {\n const client = getClient();\n const isolationScope = getIsolationScope();\n if (!client) return;\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = client.getOptions();\n if (maxBreadcrumbs <= 0) return;\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb ? consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) : mergedBreadcrumb;\n if (finalBreadcrumb === null) return;\n if (client.emit) {\n client.emit(\"beforeAddBreadcrumb\", finalBreadcrumb, hint);\n }\n isolationScope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n}\n\nexport { addBreadcrumb };\n//# sourceMappingURL=breadcrumbs.js.map\n","import { getClient } from '../currentScopes.js';\nimport { defineIntegration } from '../integration.js';\nimport { getOriginalFunction } from '../utils/object.js';\n\nconst INTEGRATION_NAME = \"FunctionToString\";\nconst SETUP_CLIENTS = /* @__PURE__ */ new WeakMap();\nconst _functionToStringIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n const originalFunctionToString = Function.prototype.toString;\n try {\n Function.prototype.toString = function(...args) {\n const originalFunction = getOriginalFunction(this);\n let unwrappedFunction;\n try {\n if (SETUP_CLIENTS.has(getClient()) && originalFunction !== void 0) {\n unwrappedFunction = originalFunction;\n }\n } catch {\n }\n return originalFunctionToString.apply(unwrappedFunction ?? this, args);\n };\n } catch {\n }\n },\n setup(client) {\n SETUP_CLIENTS.set(client, true);\n }\n };\n});\nconst functionToStringIntegration = defineIntegration(_functionToStringIntegration);\n\nexport { functionToStringIntegration };\n//# sourceMappingURL=functiontostring.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { defineIntegration } from '../integration.js';\nimport { debug } from '../utils/debug-logger.js';\nimport { getPossibleEventMessages } from '../utils/eventUtils.js';\nimport { getEventDescription } from '../utils/misc.js';\nimport { stringMatchesSomePattern } from '../utils/string.js';\n\nconst DEFAULT_IGNORE_ERRORS = [\n /^Script error\\.?$/,\n /^Javascript error: Script error\\.? on line 0$/,\n /^ResizeObserver loop completed with undelivered notifications.$/,\n // The browser logs this when a ResizeObserver handler takes a bit longer. Usually this is not an actual issue though. It indicates slowness.\n /^Cannot redefine property: googletag$/,\n // This is thrown when google tag manager is used in combination with an ad blocker\n /^Can't find variable: gmo$/,\n // Error from Google Search App https://issuetracker.google.com/issues/396043331\n /^undefined is not an object \\(evaluating 'a\\.[A-Z]'\\)$/,\n // Random error that happens but not actionable or noticeable to end-users.\n /can't redefine non-configurable property \"solana\"/,\n // Probably a browser extension or custom browser (Brave) throwing this error\n /vv\\(\\)\\.getRestrictions is not a function/,\n // Error thrown by GTM, seemingly not affecting end-users\n /Can't find variable: _AutofillCallbackHandler/,\n // Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/\n /Object Not Found Matching Id:\\d+, MethodName:simulateEvent/,\n // unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps\n /Java exception was raised during method invocation$/,\n // error from Facebook Mobile browser (https://github.com/getsentry/sentry-javascript/issues/15065, https://github.com/getsentry/sentry-javascript/issues/23733)\n /Java object is gone$/\n // error from Facebook Mobile browser (https://github.com/getsentry/sentry-javascript/issues/15065, https://github.com/getsentry/sentry-javascript/issues/23733)\n];\nconst INTEGRATION_NAME = \"EventFilters\";\nconst eventFiltersIntegration = defineIntegration((options = {}) => {\n let mergedOptions;\n return {\n name: INTEGRATION_NAME,\n setup(client) {\n const clientOptions = client.getOptions();\n mergedOptions = _mergeOptions(options, clientOptions);\n },\n processEvent(event, _hint, client) {\n if (!mergedOptions) {\n const clientOptions = client.getOptions();\n mergedOptions = _mergeOptions(options, clientOptions);\n }\n return _shouldDropEvent(event, mergedOptions) ? null : event;\n }\n };\n});\nconst inboundFiltersIntegration = defineIntegration(((options = {}) => {\n return {\n ...eventFiltersIntegration(options),\n name: \"InboundFilters\"\n };\n}));\nfunction _mergeOptions(internalOptions = {}, clientOptions = {}) {\n return {\n allowUrls: [...internalOptions.allowUrls || [], ...clientOptions.allowUrls || []],\n denyUrls: [...internalOptions.denyUrls || [], ...clientOptions.denyUrls || []],\n ignoreErrors: [\n ...internalOptions.ignoreErrors || [],\n ...clientOptions.ignoreErrors || [],\n ...internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS\n ],\n ignoreTransactions: [...internalOptions.ignoreTransactions || [], ...clientOptions.ignoreTransactions || []]\n };\n}\nfunction _shouldDropEvent(event, options) {\n if (!event.type) {\n if (_isIgnoredError(event, options.ignoreErrors)) {\n DEBUG_BUILD && debug.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\nEvent: ${getEventDescription(event)}`\n );\n return true;\n }\n if (_isUselessError(event)) {\n DEBUG_BUILD && debug.warn(\n `Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${getEventDescription(\n event\n )}`\n );\n return true;\n }\n if (_isDeniedUrl(event, options.denyUrls)) {\n DEBUG_BUILD && debug.warn(\n `Event dropped due to being matched by \\`denyUrls\\` option.\nEvent: ${getEventDescription(\n event\n )}.\nUrl: ${_getEventFilterUrl(event)}`\n );\n return true;\n }\n if (!_isAllowedUrl(event, options.allowUrls)) {\n DEBUG_BUILD && debug.warn(\n `Event dropped due to not being matched by \\`allowUrls\\` option.\nEvent: ${getEventDescription(\n event\n )}.\nUrl: ${_getEventFilterUrl(event)}`\n );\n return true;\n }\n } else if (event.type === \"transaction\") {\n if (_isIgnoredTransaction(event, options.ignoreTransactions)) {\n DEBUG_BUILD && debug.warn(\n `Event dropped due to being matched by \\`ignoreTransactions\\` option.\nEvent: ${getEventDescription(event)}`\n );\n return true;\n }\n }\n return false;\n}\nfunction _isIgnoredError(event, ignoreErrors) {\n if (!ignoreErrors?.length) {\n return false;\n }\n return getPossibleEventMessages(event).some((message) => stringMatchesSomePattern(message, ignoreErrors));\n}\nfunction _isIgnoredTransaction(event, ignoreTransactions) {\n if (!ignoreTransactions?.length) {\n return false;\n }\n const name = event.transaction;\n return name ? stringMatchesSomePattern(name, ignoreTransactions) : false;\n}\nfunction _isDeniedUrl(event, denyUrls) {\n if (!denyUrls?.length) {\n return false;\n }\n const url = _getEventFilterUrl(event);\n return !url ? false : stringMatchesSomePattern(url, denyUrls);\n}\nfunction _isAllowedUrl(event, allowUrls) {\n if (!allowUrls?.length) {\n return true;\n }\n const url = _getEventFilterUrl(event);\n return !url ? true : stringMatchesSomePattern(url, allowUrls);\n}\nfunction _getLastValidUrl(frames = []) {\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n if (frame && frame.filename !== \"\" && frame.filename !== \"[native code]\") {\n return frame.filename || null;\n }\n }\n return null;\n}\nfunction _getEventFilterUrl(event) {\n try {\n const rootException = [...event.exception?.values ?? []].reverse().find((value) => value.mechanism?.parent_id === void 0 && value.stacktrace?.frames?.length);\n const frames = rootException?.stacktrace?.frames;\n return frames ? _getLastValidUrl(frames) : null;\n } catch {\n DEBUG_BUILD && debug.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n}\nfunction _isUselessError(event) {\n if (!event.exception?.values?.length) {\n return false;\n }\n return (\n // No top-level message\n !event.message && // There are no exception values that have a stacktrace, a non-generic-Error type or value\n !event.exception.values.some((value) => value.stacktrace || value.type && value.type !== \"Error\" || value.value)\n );\n}\n\nexport { eventFiltersIntegration, inboundFiltersIntegration };\n//# sourceMappingURL=eventFilters.js.map\n","import { isError } from './is.js';\n\nfunction applyAggregateErrorsToEvent(exceptionFromErrorImplementation, parser, key, limit, event, hint) {\n if (!event.exception?.values || !hint || !isError(hint.originalException)) {\n return;\n }\n const originalException = event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : void 0;\n if (originalException) {\n event.exception.values = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException,\n key,\n event.exception.values,\n originalException,\n 0\n );\n }\n}\nfunction aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, error, key, prevExceptions, exception, exceptionId) {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n let newExceptions = [...prevExceptions];\n if (isError(error[key])) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId, error);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId\n );\n }\n if (isExceptionGroup(error)) {\n error.errors.forEach((childError, i) => {\n if (isError(childError)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId, error);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId\n );\n }\n });\n }\n return newExceptions;\n}\nfunction isExceptionGroup(error) {\n return Array.isArray(error.errors);\n}\nfunction applyExceptionGroupFieldsForParentException(exception, exceptionId, error) {\n exception.mechanism = {\n handled: true,\n type: \"auto.core.linked_errors\",\n ...isExceptionGroup(error) && { is_exception_group: true },\n ...exception.mechanism,\n exception_id: exceptionId\n };\n}\nfunction applyExceptionGroupFieldsForChildException(exception, source, exceptionId, parentId) {\n exception.mechanism = {\n handled: true,\n ...exception.mechanism,\n type: \"chained\",\n source,\n exception_id: exceptionId,\n parent_id: parentId\n };\n}\n\nexport { applyAggregateErrorsToEvent };\n//# sourceMappingURL=aggregate-errors.js.map\n","import { isParameterizedString, isError, isPlainObject, isErrorEvent } from './is.js';\nimport { addExceptionMechanism, addExceptionTypeValue } from './misc.js';\nimport { normalizeToSize } from './normalize.js';\nimport { extractExceptionKeysForMessage } from './object.js';\n\nfunction parseStackFrames(stackParser, error) {\n return stackParser(error.stack || \"\", 1);\n}\nfunction hasSentryFetchUrlHost(error) {\n return isError(error) && \"__sentry_fetch_url_host__\" in error && typeof error.__sentry_fetch_url_host__ === \"string\";\n}\nfunction _enhanceErrorWithSentryInfo(error) {\n if (hasSentryFetchUrlHost(error)) {\n return `${error.message} (${error.__sentry_fetch_url_host__})`;\n }\n return error.message;\n}\nfunction exceptionFromError(stackParser, error) {\n const exception = {\n type: error.name || error.constructor.name,\n value: _enhanceErrorWithSentryInfo(error)\n };\n const frames = parseStackFrames(stackParser, error);\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n return exception;\n}\nfunction getErrorPropertyFromObject(obj) {\n for (const prop in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n const value = obj[prop];\n if (isError(value)) {\n return value;\n }\n }\n }\n return void 0;\n}\nfunction getMessageForObject(exception) {\n if (\"name\" in exception && typeof exception.name === \"string\") {\n let message = `'${exception.name}' captured as exception`;\n if (\"message\" in exception && typeof exception.message === \"string\") {\n message += ` with message '${exception.message}'`;\n }\n return message;\n } else if (\"message\" in exception && typeof exception.message === \"string\") {\n return exception.message;\n }\n const keys = extractExceptionKeysForMessage(exception);\n if (isErrorEvent(exception)) {\n return `Event \\`ErrorEvent\\` captured as exception with message \\`${exception.message}\\``;\n }\n const className = getObjectClassName(exception);\n return `${className && className !== \"Object\" ? `'${className}'` : \"Object\"} captured as exception with keys: ${keys}`;\n}\nfunction getObjectClassName(obj) {\n try {\n const prototype = Object.getPrototypeOf(obj);\n return prototype ? prototype.constructor.name : void 0;\n } catch {\n }\n}\nfunction getException(client, mechanism, exception, hint) {\n if (isError(exception)) {\n return [exception, void 0];\n }\n mechanism.synthetic = true;\n if (isPlainObject(exception)) {\n const normalizeDepth = client?.getOptions().normalizeDepth;\n const extras = { [\"__serialized__\"]: normalizeToSize(exception, normalizeDepth) };\n const errorFromProp = getErrorPropertyFromObject(exception);\n if (errorFromProp) {\n return [errorFromProp, extras];\n }\n const message = getMessageForObject(exception);\n const ex2 = hint?.syntheticException || new Error(message);\n ex2.message = message;\n return [ex2, extras];\n }\n const ex = hint?.syntheticException || new Error(exception);\n ex.message = `${exception}`;\n return [ex, void 0];\n}\nfunction eventFromUnknownInput(client, stackParser, exception, hint) {\n const providedMechanism = hint?.data && hint.data.mechanism;\n const mechanism = providedMechanism || {\n handled: true,\n type: \"generic\"\n };\n const [ex, extras] = getException(client, mechanism, exception, hint);\n const event = {\n exception: {\n values: [exceptionFromError(stackParser, ex)]\n }\n };\n if (extras) {\n event.extra = extras;\n }\n addExceptionTypeValue(event, void 0, void 0);\n addExceptionMechanism(event, mechanism);\n return {\n ...event,\n event_id: hint?.event_id\n };\n}\nfunction eventFromMessage(stackParser, message, level = \"info\", hint, attachStacktrace) {\n const event = {\n event_id: hint?.event_id,\n level\n };\n if (attachStacktrace && hint?.syntheticException) {\n const frames = parseStackFrames(stackParser, hint.syntheticException);\n if (frames.length) {\n event.exception = {\n values: [\n {\n value: message,\n stacktrace: { frames }\n }\n ]\n };\n addExceptionMechanism(event, { synthetic: true });\n }\n }\n if (isParameterizedString(message)) {\n const { __sentry_template_string__, __sentry_template_values__ } = message;\n event.logentry = {\n message: __sentry_template_string__,\n params: __sentry_template_values__\n };\n return event;\n }\n event.message = message;\n return event;\n}\n\nexport { _enhanceErrorWithSentryInfo, eventFromMessage, eventFromUnknownInput, exceptionFromError, parseStackFrames };\n//# sourceMappingURL=eventbuilder.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { CONSOLE_LEVELS, originalConsoleMethods, debug } from '../utils/debug-logger.js';\nimport { fill } from '../utils/object.js';\nimport { stringMatchesSomePattern } from '../utils/string.js';\nimport { GLOBAL_OBJ } from '../utils/worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\nconst _filter = /* @__PURE__ */ new Set([]);\nfunction addConsoleInstrumentationHandler(handler) {\n const type = \"console\";\n const removeHandler = addHandler(type, handler);\n maybeInstrument(type, instrumentConsole);\n return removeHandler;\n}\nfunction addConsoleInstrumentationFilter(filter) {\n for (const f of filter) {\n _filter.add(f);\n }\n return () => {\n for (const f of filter) {\n _filter.delete(f);\n }\n };\n}\nconst instrumentedLevels = /* @__PURE__ */ new Set();\nfunction instrumentConsole() {\n if (!(\"console\" in GLOBAL_OBJ)) {\n return;\n }\n CONSOLE_LEVELS.forEach(function(level) {\n if (instrumentedLevels.has(level) || !(level in GLOBAL_OBJ.console)) {\n return;\n }\n instrumentedLevels.add(level);\n fill(GLOBAL_OBJ.console, level, function(originalConsoleMethod) {\n originalConsoleMethods[level] = originalConsoleMethod;\n return function(...args) {\n const firstArg = args[0];\n const log = originalConsoleMethods[level];\n const isFiltered = _filter.size && typeof firstArg === \"string\" && stringMatchesSomePattern(firstArg, _filter);\n if (!isFiltered) {\n triggerHandlers(\"console\", { args, level });\n }\n if (!isFiltered || DEBUG_BUILD && debug.isEnabled()) {\n log?.apply(GLOBAL_OBJ.console, args);\n }\n };\n });\n });\n}\n\nexport { addConsoleInstrumentationFilter, addConsoleInstrumentationHandler, instrumentConsole };\n//# sourceMappingURL=console.js.map\n","function severityLevelFromString(level) {\n return level === \"warn\" ? \"warning\" : [\"fatal\", \"error\", \"warning\", \"log\", \"info\", \"debug\"].includes(level) ? level : \"log\";\n}\n\nexport { severityLevelFromString };\n//# sourceMappingURL=severity.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { defineIntegration } from '../integration.js';\nimport { debug } from '../utils/debug-logger.js';\nimport { getFramesFromEvent } from '../utils/stacktrace.js';\n\nconst INTEGRATION_NAME = \"Dedupe\";\nconst _dedupeIntegration = (() => {\n let previousEvent;\n return {\n name: INTEGRATION_NAME,\n processEvent(currentEvent) {\n if (currentEvent.type) {\n return currentEvent;\n }\n try {\n if (_shouldDropEvent(currentEvent, previousEvent)) {\n DEBUG_BUILD && debug.warn(\"Event dropped due to being a duplicate of previously captured event.\");\n return null;\n }\n } catch {\n }\n return previousEvent = currentEvent;\n }\n };\n});\nconst dedupeIntegration = defineIntegration(_dedupeIntegration);\nfunction _shouldDropEvent(currentEvent, previousEvent) {\n if (!previousEvent) {\n return false;\n }\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n return false;\n}\nfunction _isSameMessageEvent(currentEvent, previousEvent) {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n if (!currentMessage && !previousMessage) {\n return false;\n }\n if (currentMessage && !previousMessage || !currentMessage && previousMessage) {\n return false;\n }\n if (currentMessage !== previousMessage) {\n return false;\n }\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n return true;\n}\nfunction _isSameExceptionEvent(currentEvent, previousEvent) {\n const previousException = _getExceptionFromEvent(previousEvent);\n const currentException = _getExceptionFromEvent(currentEvent);\n if (!previousException || !currentException) {\n return false;\n }\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n return true;\n}\nfunction _isSameStacktrace(currentEvent, previousEvent) {\n let currentFrames = getFramesFromEvent(currentEvent);\n let previousFrames = getFramesFromEvent(previousEvent);\n if (!currentFrames && !previousFrames) {\n return true;\n }\n if (currentFrames && !previousFrames || !currentFrames && previousFrames) {\n return false;\n }\n currentFrames = currentFrames;\n previousFrames = previousFrames;\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n for (let i = 0; i < previousFrames.length; i++) {\n const frameA = previousFrames[i];\n const frameB = currentFrames[i];\n if (frameA.filename !== frameB.filename || frameA.lineno !== frameB.lineno || frameA.colno !== frameB.colno || frameA.function !== frameB.function) {\n return false;\n }\n }\n return true;\n}\nfunction _isSameFingerprint(currentEvent, previousEvent) {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n if (currentFingerprint && !previousFingerprint || !currentFingerprint && previousFingerprint) {\n return false;\n }\n currentFingerprint = currentFingerprint;\n previousFingerprint = previousFingerprint;\n try {\n return !!(currentFingerprint.join(\"\") === previousFingerprint.join(\"\"));\n } catch {\n return false;\n }\n}\nfunction _getExceptionFromEvent(event) {\n return event.exception?.values?.[0];\n}\n\nexport { _shouldDropEvent, dedupeIntegration };\n//# sourceMappingURL=dedupe.js.map\n","import { getCurrentScope, getIsolationScope } from '../currentScopes.js';\nimport { defineIntegration } from '../integration.js';\nimport { GEN_AI_CONVERSATION_ID_ATTRIBUTE } from '../semanticAttributes.js';\nimport { spanToJSON } from '../utils/spanUtils.js';\n\nconst INTEGRATION_NAME = \"ConversationId\";\nconst _conversationIdIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setup(client) {\n client.on(\"spanStart\", (span) => {\n const scopeData = getCurrentScope().getScopeData();\n const isolationScopeData = getIsolationScope().getScopeData();\n const conversationId = scopeData.conversationId || isolationScopeData.conversationId;\n if (conversationId) {\n const { op, data: attributes, description: name } = spanToJSON(span);\n if (!op?.startsWith(\"gen_ai.\") && !attributes[\"ai.operationId\"] && !name?.startsWith(\"ai.\")) {\n return;\n }\n span.setAttribute(GEN_AI_CONVERSATION_ID_ATTRIBUTE, conversationId);\n }\n });\n }\n };\n});\nconst conversationIdIntegration = defineIntegration(_conversationIdIntegration);\n\nexport { conversationIdIntegration };\n//# sourceMappingURL=conversationId.js.map\n","function getBreadcrumbLogLevelFromHttpStatusCode(statusCode) {\n if (statusCode === void 0) {\n return void 0;\n } else if (statusCode >= 400 && statusCode < 500) {\n return \"warning\";\n } else if (statusCode >= 500) {\n return \"error\";\n } else {\n return void 0;\n }\n}\n\nexport { getBreadcrumbLogLevelFromHttpStatusCode };\n//# sourceMappingURL=breadcrumb-log-level.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { debug } from './debug-logger.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nconst WINDOW = GLOBAL_OBJ;\nfunction supportsErrorEvent() {\n try {\n new ErrorEvent(\"\");\n return true;\n } catch {\n return false;\n }\n}\nfunction supportsDOMError() {\n try {\n new DOMError(\"\");\n return true;\n } catch {\n return false;\n }\n}\nfunction supportsDOMException() {\n try {\n new DOMException(\"\");\n return true;\n } catch {\n return false;\n }\n}\nfunction supportsHistory() {\n return \"history\" in WINDOW && !!WINDOW.history;\n}\nconst supportsFetch = _isFetchSupported;\nfunction _isFetchSupported() {\n if (!(\"fetch\" in WINDOW)) {\n return false;\n }\n try {\n new Headers();\n new Request(\"data:,\");\n new Response();\n return true;\n } catch {\n return false;\n }\n}\nfunction isNativeFunction(func) {\n return func && /^function\\s+\\w+\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\nfunction supportsNativeFetch() {\n if (typeof EdgeRuntime === \"string\") {\n return true;\n }\n if (!_isFetchSupported()) {\n return false;\n }\n if (isNativeFunction(WINDOW.fetch)) {\n return true;\n }\n let result = false;\n const doc = WINDOW.document;\n if (doc && typeof doc.createElement === \"function\") {\n try {\n const sandbox = doc.createElement(\"iframe\");\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow?.fetch) {\n result = isNativeFunction(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n DEBUG_BUILD && debug.warn(\"Could not create sandbox iframe for pure fetch check, bailing to window.fetch: \", err);\n }\n }\n return result;\n}\nfunction supportsReportingObserver() {\n return \"ReportingObserver\" in WINDOW;\n}\nfunction supportsReferrerPolicy() {\n if (!_isFetchSupported()) {\n return false;\n }\n try {\n new Request(\"_\", {\n referrerPolicy: \"origin\"\n });\n return true;\n } catch {\n return false;\n }\n}\n\nexport { isNativeFunction, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsHistory, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver };\n//# sourceMappingURL=supports.js.map\n","import { getClient } from '../currentScopes.js';\nimport { isError, isRequest, isObjectLike } from '../utils/is.js';\nimport { fill, addNonEnumerableProperty } from '../utils/object.js';\nimport { supportsNativeFetch } from '../utils/supports.js';\nimport { timestampInSeconds } from '../utils/time.js';\nimport { GLOBAL_OBJ } from '../utils/worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\nfunction addFetchInstrumentationHandler(handler, skipNativeFetchCheck) {\n const type = \"fetch\";\n const removeHandler = addHandler(type, handler);\n maybeInstrument(type, () => instrumentFetch(void 0, skipNativeFetchCheck));\n return removeHandler;\n}\nfunction addFetchEndInstrumentationHandler(handler) {\n const type = \"fetch-body-resolved\";\n const removeHandler = addHandler(type, handler);\n maybeInstrument(type, () => instrumentFetch(streamHandler));\n return removeHandler;\n}\nfunction instrumentFetch(onFetchResolved, skipNativeFetchCheck = false) {\n if (skipNativeFetchCheck && !supportsNativeFetch()) {\n return;\n }\n fill(GLOBAL_OBJ, \"fetch\", function(originalFetch) {\n return function(...args) {\n const virtualError = new Error();\n const { method, url } = parseFetchArgs(args);\n const handlerData = {\n args,\n fetchData: {\n method,\n url\n },\n startTimestamp: timestampInSeconds() * 1e3,\n // // Adding the error to be able to fingerprint the failed fetch event in HttpClient instrumentation\n virtualError,\n headers: getHeadersFromFetchArgs(args)\n };\n if (!onFetchResolved) {\n triggerHandlers(\"fetch\", {\n ...handlerData\n });\n }\n return originalFetch.apply(GLOBAL_OBJ, args).then(\n async (response) => {\n if (onFetchResolved) {\n onFetchResolved(response);\n } else {\n triggerHandlers(\"fetch\", {\n ...handlerData,\n endTimestamp: timestampInSeconds() * 1e3,\n response\n });\n }\n return response;\n },\n (error) => {\n triggerHandlers(\"fetch\", {\n ...handlerData,\n endTimestamp: timestampInSeconds() * 1e3,\n error\n });\n if (isError(error) && error.stack === void 0) {\n error.stack = virtualError.stack;\n addNonEnumerableProperty(error, \"framesToPop\", 1);\n }\n const client = getClient();\n const enhanceOption = client?.getOptions().enhanceFetchErrorMessages ?? \"always\";\n const shouldEnhance = enhanceOption !== false;\n if (shouldEnhance && isError(error) && error.name === \"TypeError\" && (error.message === \"Failed to fetch\" || error.message === \"Load failed\" || error.message === \"NetworkError when attempting to fetch resource.\")) {\n try {\n const url2 = new URL(handlerData.fetchData.url);\n const hostname = url2.host;\n if (enhanceOption === \"always\") {\n error.message = `${error.message} (${hostname})`;\n } else {\n addNonEnumerableProperty(error, \"__sentry_fetch_url_host__\", hostname);\n }\n } catch {\n }\n }\n throw error;\n }\n );\n };\n });\n}\nasync function resolveResponse(res, onFinishedResolving) {\n if (res?.body) {\n const body = res.body;\n const responseReader = body.getReader();\n const maxFetchDurationTimeout = setTimeout(\n () => {\n body.cancel().then(null, () => {\n });\n },\n 90 * 1e3\n // 90s\n );\n let readingActive = true;\n while (readingActive) {\n let chunkTimeout;\n try {\n chunkTimeout = setTimeout(() => {\n body.cancel().then(null, () => {\n });\n }, 5e3);\n const { done } = await responseReader.read();\n clearTimeout(chunkTimeout);\n if (done) {\n onFinishedResolving();\n readingActive = false;\n }\n } catch {\n readingActive = false;\n } finally {\n clearTimeout(chunkTimeout);\n }\n }\n clearTimeout(maxFetchDurationTimeout);\n responseReader.releaseLock();\n body.cancel().then(null, () => {\n });\n }\n}\nfunction streamHandler(response) {\n let clonedResponseForResolving;\n try {\n clonedResponseForResolving = response.clone();\n } catch {\n return;\n }\n resolveResponse(clonedResponseForResolving, () => {\n triggerHandlers(\"fetch-body-resolved\", {\n endTimestamp: timestampInSeconds() * 1e3,\n response\n });\n });\n}\nfunction hasProp(obj, prop) {\n return isObjectLike(obj) && !!obj[prop];\n}\nfunction getUrlFromResource(resource) {\n if (typeof resource === \"string\") {\n return resource;\n }\n if (!resource) {\n return \"\";\n }\n if (hasProp(resource, \"url\")) {\n return resource.url;\n }\n if (resource.toString) {\n return resource.toString();\n }\n return \"\";\n}\nfunction parseFetchArgs(fetchArgs) {\n if (fetchArgs.length === 0) {\n return { method: \"GET\", url: \"\" };\n }\n if (fetchArgs.length === 2) {\n const [resource, options] = fetchArgs;\n return {\n url: getUrlFromResource(resource),\n method: hasProp(options, \"method\") ? String(options.method).toUpperCase() : (\n // Request object as first argument\n isRequest(resource) && hasProp(resource, \"method\") ? String(resource.method).toUpperCase() : \"GET\"\n )\n };\n }\n const arg = fetchArgs[0];\n return {\n url: getUrlFromResource(arg),\n method: hasProp(arg, \"method\") ? String(arg.method).toUpperCase() : \"GET\"\n };\n}\nfunction getHeadersFromFetchArgs(fetchArgs) {\n const [requestArgument, optionsArgument] = fetchArgs;\n try {\n if (typeof optionsArgument === \"object\" && optionsArgument !== null && \"headers\" in optionsArgument && optionsArgument.headers) {\n return new Headers(optionsArgument.headers);\n }\n if (isRequest(requestArgument)) {\n return new Headers(requestArgument.headers);\n }\n } catch {\n }\n return;\n}\n\nexport { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler, parseFetchArgs };\n//# sourceMappingURL=fetch.js.map\n","import { isString } from './is.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nconst WINDOW = GLOBAL_OBJ;\nconst DEFAULT_MAX_STRING_LENGTH = 80;\nfunction htmlTreeAsString(elem, options = {}) {\n if (!elem) {\n return \"\";\n }\n try {\n let currentElem = elem;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = \" > \";\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = !Array.isArray(options) && options.maxStringLength || DEFAULT_MAX_STRING_LENGTH;\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n if (nextStr === \"html\" || height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength) {\n break;\n }\n out.push(nextStr);\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n return out.reverse().join(separator);\n } catch {\n return \"\";\n }\n}\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el;\n const out = [];\n if (!elem?.tagName) {\n return \"\";\n }\n if (WINDOW.HTMLElement) {\n if (elem instanceof HTMLElement && elem.dataset) {\n if (elem.dataset[\"sentryComponent\"]) {\n return elem.dataset[\"sentryComponent\"];\n }\n if (elem.dataset[\"sentryElement\"]) {\n return elem.dataset[\"sentryElement\"];\n }\n }\n }\n out.push(elem.tagName.toLowerCase());\n const keyAttrPairs = keyAttrs?.length ? keyAttrs.filter((keyAttr) => elem.getAttribute(keyAttr)).map((keyAttr) => [keyAttr, elem.getAttribute(keyAttr)]) : null;\n if (keyAttrPairs?.length) {\n keyAttrPairs.forEach((keyAttrPair) => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n const className = elem.className;\n if (className && isString(className)) {\n const classes = className.split(/\\s+/);\n for (const c of classes) {\n out.push(`.${c}`);\n }\n }\n }\n for (const k of [\"aria-label\", \"type\", \"name\", \"title\", \"alt\"]) {\n const attr = elem.getAttribute(k);\n if (attr) {\n out.push(`[${k}=\"${attr}\"]`);\n }\n }\n return out.join(\"\");\n}\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch {\n return \"\";\n }\n}\nfunction getComponentName(elem, maxTraverseHeight = 5) {\n if (!WINDOW.HTMLElement) {\n return null;\n }\n let currentElem = elem;\n for (let i = 0; i < maxTraverseHeight; i++) {\n if (!currentElem) {\n return null;\n }\n if (currentElem instanceof HTMLElement) {\n if (currentElem.dataset[\"sentryComponent\"]) {\n return currentElem.dataset[\"sentryComponent\"];\n }\n if (currentElem.dataset[\"sentryElement\"]) {\n return currentElem.dataset[\"sentryElement\"];\n }\n }\n currentElem = currentElem.parentNode;\n }\n return null;\n}\n\nexport { getComponentName, getLocationHref, htmlTreeAsString };\n//# sourceMappingURL=browser.js.map\n","import { GLOBAL_OBJ, getOriginalFunction, markFunctionWrapped, addNonEnumerableProperty, withScope, addExceptionTypeValue, addExceptionMechanism, captureException, getLocationHref } from '@sentry/core/browser';\n\nconst WINDOW = GLOBAL_OBJ;\nlet ignoreOnError = 0;\nfunction shouldIgnoreOnError() {\n return ignoreOnError > 0;\n}\nfunction ignoreNextOnError() {\n ignoreOnError++;\n setTimeout(() => {\n ignoreOnError--;\n });\n}\nfunction wrap(fn, options = {}) {\n function isFunction(fn2) {\n return typeof fn2 === \"function\";\n }\n if (!isFunction(fn)) {\n return fn;\n }\n try {\n const hasOwnWrapper = Object.prototype.hasOwnProperty.call(fn, \"__sentry_wrapped__\");\n if (hasOwnWrapper) {\n const wrapper = fn.__sentry_wrapped__;\n if (typeof wrapper === \"function\") {\n return wrapper;\n } else {\n return fn;\n }\n }\n if (getOriginalFunction(fn)) {\n return fn;\n }\n } catch {\n return fn;\n }\n const sentryWrapped = function(...args) {\n GLOBAL_OBJ._sentryWrappedDepth = (GLOBAL_OBJ._sentryWrappedDepth || 0) + 1;\n try {\n const wrappedArguments = args.map((arg) => wrap(arg, options));\n return fn.apply(this, wrappedArguments);\n } catch (ex) {\n ignoreNextOnError();\n withScope((scope) => {\n scope.addEventProcessor((event) => {\n if (options.mechanism) {\n addExceptionTypeValue(event, void 0, void 0);\n addExceptionMechanism(event, options.mechanism);\n }\n event.extra = {\n ...event.extra,\n arguments: args\n };\n return event;\n });\n captureException(ex);\n });\n throw ex;\n } finally {\n GLOBAL_OBJ._sentryWrappedDepth = (GLOBAL_OBJ._sentryWrappedDepth || 0) - 1;\n }\n };\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch {\n }\n markFunctionWrapped(sentryWrapped, fn);\n addNonEnumerableProperty(fn, \"__sentry_wrapped__\", sentryWrapped);\n try {\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, \"name\");\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, \"name\", {\n get() {\n return fn.name;\n }\n });\n }\n } catch {\n }\n return sentryWrapped;\n}\nfunction getHttpRequestData() {\n const url = getLocationHref();\n const { referrer } = WINDOW.document || {};\n const { userAgent } = WINDOW.navigator || {};\n const headers = {\n ...referrer && { Referer: referrer },\n ...userAgent && { \"User-Agent\": userAgent }\n };\n const request = {\n url,\n headers\n };\n return request;\n}\n\nexport { WINDOW, getHttpRequestData, ignoreNextOnError, shouldIgnoreOnError, wrap };\n//# sourceMappingURL=helpers.js.map\n","import { isErrorEvent, isDOMError, isDOMException, addExceptionTypeValue, isError, isPlainObject, isEvent, addExceptionMechanism, isParameterizedString, getClient, normalizeToSize, extractExceptionKeysForMessage, _INTERNAL_enhanceErrorWithSentryInfo, resolvedSyncPromise } from '@sentry/core/browser';\n\nfunction exceptionFromError(stackParser, ex) {\n const frames = parseStackFrames(stackParser, ex);\n const exception = {\n type: extractType(ex),\n value: extractMessage(ex)\n };\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n if (exception.type === void 0 && exception.value === \"\") {\n exception.value = \"Unrecoverable error caught\";\n }\n return exception;\n}\nfunction eventFromPlainObject(stackParser, exception, syntheticException, isUnhandledRejection) {\n const client = getClient();\n const normalizeDepth = client?.getOptions().normalizeDepth;\n const errorFromProp = getErrorPropertyFromObject(exception);\n const extra = {\n __serialized__: normalizeToSize(exception, normalizeDepth)\n };\n if (errorFromProp) {\n return {\n exception: {\n values: [exceptionFromError(stackParser, errorFromProp)]\n },\n extra\n };\n }\n const event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? \"UnhandledRejection\" : \"Error\",\n value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection })\n }\n ]\n },\n extra\n };\n if (syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n event.exception.values[0].stacktrace = { frames };\n }\n }\n return event;\n}\nfunction eventFromError(stackParser, ex) {\n return {\n exception: {\n values: [exceptionFromError(stackParser, ex)]\n }\n };\n}\nfunction parseStackFrames(stackParser, ex) {\n const stacktrace = ex.stacktrace || ex.stack || \"\";\n const skipLines = getSkipFirstStackStringLines(ex);\n const framesToPop = getPopFirstTopFrames(ex);\n try {\n return stackParser(stacktrace, skipLines, framesToPop);\n } catch {\n }\n return [];\n}\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\nfunction getSkipFirstStackStringLines(ex) {\n if (ex && reactMinifiedRegexp.test(ex.message)) {\n return 1;\n }\n return 0;\n}\nfunction getPopFirstTopFrames(ex) {\n if (typeof ex.framesToPop === \"number\") {\n return ex.framesToPop;\n }\n return 0;\n}\nfunction isWebAssemblyException(exception) {\n if (typeof WebAssembly !== \"undefined\" && typeof WebAssembly.Exception !== \"undefined\") {\n return exception instanceof WebAssembly.Exception;\n } else {\n return false;\n }\n}\nfunction extractType(ex) {\n const name = ex?.name;\n if (!name && isWebAssemblyException(ex)) {\n const hasTypeInMessage = ex.message && Array.isArray(ex.message) && ex.message.length == 2;\n return hasTypeInMessage ? ex.message[0] : \"WebAssembly.Exception\";\n }\n return name;\n}\nfunction extractMessage(ex) {\n const message = ex?.message;\n if (isWebAssemblyException(ex)) {\n if (Array.isArray(ex.message) && ex.message.length == 2) {\n return ex.message[1];\n }\n return \"wasm exception\";\n }\n if (!message) {\n return \"No error message\";\n }\n if (message.error && typeof message.error.message === \"string\") {\n return _INTERNAL_enhanceErrorWithSentryInfo(message.error);\n }\n return _INTERNAL_enhanceErrorWithSentryInfo(ex);\n}\nfunction eventFromException(stackParser, exception, hint, attachStacktrace) {\n const syntheticException = hint?.syntheticException || void 0;\n const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);\n addExceptionMechanism(event);\n event.level = \"error\";\n if (hint?.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\nfunction eventFromMessage(stackParser, message, level = \"info\", hint, attachStacktrace) {\n const syntheticException = hint?.syntheticException || void 0;\n const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint?.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\nfunction eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace, isUnhandledRejection) {\n let event;\n if (isErrorEvent(exception) && exception.error) {\n const errorEvent = exception;\n return eventFromError(stackParser, errorEvent.error);\n }\n if (isDOMError(exception) || isDOMException(exception)) {\n const domException = exception;\n if (\"stack\" in exception) {\n event = eventFromError(stackParser, exception);\n const firstException = event.exception?.values?.[0];\n if (attachStacktrace && syntheticException && firstException && !firstException.stacktrace) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n firstException.stacktrace = { frames };\n addExceptionMechanism(event, { synthetic: true });\n }\n }\n } else {\n const name = domException.name || (isDOMError(domException) ? \"DOMError\" : \"DOMException\");\n const message = domException.message ? `${name}: ${domException.message}` : name;\n event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, message);\n }\n if (\"code\" in domException) {\n event.tags = { ...event.tags, \"DOMException.code\": `${domException.code}` };\n }\n return event;\n }\n if (isError(exception)) {\n return eventFromError(stackParser, exception);\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n const objectException = exception;\n event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);\n addExceptionMechanism(event, {\n synthetic: true\n });\n return event;\n }\n event = eventFromString(stackParser, exception, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, `${exception}`, void 0);\n addExceptionMechanism(event, {\n synthetic: true\n });\n return event;\n}\nfunction eventFromString(stackParser, message, syntheticException, attachStacktrace) {\n const event = {};\n if (attachStacktrace && syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n event.exception = {\n values: [{ value: message, stacktrace: { frames } }]\n };\n }\n addExceptionMechanism(event, { synthetic: true });\n }\n if (isParameterizedString(message)) {\n const { __sentry_template_string__, __sentry_template_values__ } = message;\n event.logentry = {\n message: __sentry_template_string__,\n params: __sentry_template_values__\n };\n return event;\n }\n event.message = message;\n return event;\n}\nfunction getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }) {\n const keys = extractExceptionKeysForMessage(exception);\n const captureType = isUnhandledRejection ? \"promise rejection\" : \"exception\";\n if (isErrorEvent(exception)) {\n return `Event \\`ErrorEvent\\` captured as ${captureType} with message \\`${exception.message}\\``;\n }\n if (isEvent(exception)) {\n const className = getObjectClassName(exception);\n return `Event \\`${className}\\` (type=${exception.type}) captured as ${captureType}`;\n }\n return `Object captured as ${captureType} with keys: ${keys}`;\n}\nfunction getObjectClassName(obj) {\n try {\n const prototype = Object.getPrototypeOf(obj);\n return prototype ? prototype.constructor.name : void 0;\n } catch {\n }\n}\nfunction getErrorPropertyFromObject(obj) {\n return Object.values(obj).find(isError);\n}\n\nexport { eventFromException, eventFromMessage, eventFromUnknownInput, exceptionFromError, extractMessage, extractType };\n//# sourceMappingURL=eventbuilder.js.map\n","import { Client, getSDKSource, applySdkMetadata, addAutoIpAddressToSession } from '@sentry/core/browser';\nimport { eventFromException, eventFromMessage } from './eventbuilder.js';\nimport { WINDOW } from './helpers.js';\n\nclass BrowserClient extends Client {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n constructor(options) {\n const opts = applyDefaultOptions(options);\n const sdkSource = WINDOW.SENTRY_SDK_SOURCE || getSDKSource();\n applySdkMetadata(opts, \"browser\", [\"browser\"], sdkSource);\n super(opts);\n const { userInfo } = this.getDataCollectionOptions();\n if (opts._metadata?.sdk) {\n opts._metadata.sdk.settings = {\n // Only allow IP inferral by Relay if the user opted in via dataCollection\n infer_ip: userInfo ? \"auto\" : \"never\",\n // purposefully allowing already passed settings to override the default\n ...opts._metadata.sdk.settings\n };\n }\n const { sendClientReports } = this._options;\n if (WINDOW.document) {\n WINDOW.document.addEventListener(\"visibilitychange\", () => {\n if (WINDOW.document.visibilityState === \"hidden\") {\n if (sendClientReports) {\n this._flushOutcomes();\n }\n queueMicrotask(() => {\n void this.flush();\n });\n }\n });\n }\n if (userInfo) {\n this.on(\"beforeSendSession\", addAutoIpAddressToSession);\n }\n }\n /**\n * @inheritDoc\n */\n eventFromException(exception, hint) {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n /**\n * @inheritDoc\n */\n eventFromMessage(message, level = \"info\", hint) {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n /**\n * @inheritDoc\n */\n _prepareEvent(event, hint, currentScope, isolationScope) {\n event.platform = event.platform || \"javascript\";\n return super._prepareEvent(event, hint, currentScope, isolationScope);\n }\n}\nfunction applyDefaultOptions(optionsArg) {\n return {\n release: typeof __SENTRY_RELEASE__ === \"string\" ? __SENTRY_RELEASE__ : WINDOW.SENTRY_RELEASE?.id,\n // This supports the variable that sentry-webpack-plugin injects\n sendClientReports: true,\n // We default this to true, as it is the safer scenario\n parentSpanIsAlwaysRootSpan: true,\n ...optionsArg\n };\n}\n\nexport { BrowserClient, applyDefaultOptions };\n//# sourceMappingURL=client.js.map\n","const DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","import { GLOBAL_OBJ } from '@sentry/core';\n\nconst WINDOW = GLOBAL_OBJ;\n\nexport { WINDOW };\n//# sourceMappingURL=types.js.map\n","const getRating = (value, thresholds) => {\n if (value > thresholds[1]) {\n return \"poor\";\n }\n if (value > thresholds[0]) {\n return \"needs-improvement\";\n }\n return \"good\";\n};\nconst bindReporter = (callback, metric, thresholds, reportAllChanges) => {\n let prevValue;\n let delta;\n return (forceReport) => {\n if (metric.value >= 0) {\n if (forceReport || reportAllChanges) {\n delta = metric.value - (prevValue ?? 0);\n if (delta || prevValue === void 0) {\n prevValue = metric.value;\n metric.delta = delta;\n metric.rating = getRating(metric.value, thresholds);\n callback(metric);\n }\n }\n }\n };\n};\n\nexport { bindReporter };\n//# sourceMappingURL=bindReporter.js.map\n","import { WINDOW } from '../../../types.js';\n\nconst getNavigationEntry = (checkResponseStart = true) => {\n const navigationEntry = WINDOW.performance?.getEntriesByType?.(\"navigation\")[0];\n if (\n // sentry-specific change:\n // We don't want to check for responseStart for our own use of `getNavigationEntry`\n !checkResponseStart || navigationEntry && navigationEntry.responseStart > 0 && navigationEntry.responseStart < performance.now()\n ) {\n return navigationEntry;\n }\n};\n\nexport { getNavigationEntry };\n//# sourceMappingURL=getNavigationEntry.js.map\n","import { getNavigationEntry } from './getNavigationEntry.js';\n\nconst getActivationStart = () => {\n const navEntry = getNavigationEntry();\n return navEntry?.activationStart ?? 0;\n};\n\nexport { getActivationStart };\n//# sourceMappingURL=getActivationStart.js.map\n","import { WINDOW } from '../../../types.js';\n\nfunction addPageListener(type, listener, options) {\n if (WINDOW.document) {\n WINDOW.addEventListener(type, listener, options);\n }\n}\nfunction removePageListener(type, listener, options) {\n if (WINDOW.document) {\n WINDOW.removeEventListener(type, listener, options);\n }\n}\n\nexport { addPageListener, removePageListener };\n//# sourceMappingURL=globalListeners.js.map\n","import { WINDOW } from '../../../types.js';\nimport { getActivationStart } from './getActivationStart.js';\nimport { addPageListener, removePageListener } from './globalListeners.js';\n\nlet firstHiddenTime = -1;\nconst onHiddenFunctions = /* @__PURE__ */ new Set();\nconst initHiddenTime = () => {\n return WINDOW.document?.visibilityState === \"hidden\" && !WINDOW.document?.prerendering ? 0 : Infinity;\n};\nconst onVisibilityUpdate = (event) => {\n if (isPageHidden(event) && firstHiddenTime > -1) {\n if (event.type === \"visibilitychange\" || event.type === \"pagehide\") {\n for (const onHiddenFunction of onHiddenFunctions) {\n onHiddenFunction();\n }\n }\n if (!isFinite(firstHiddenTime)) {\n firstHiddenTime = event.type === \"visibilitychange\" ? event.timeStamp : 0;\n removePageListener(\"prerenderingchange\", onVisibilityUpdate, true);\n }\n }\n};\nconst getVisibilityWatcher = () => {\n if (WINDOW.document && firstHiddenTime < 0) {\n const activationStart = getActivationStart();\n const firstVisibilityStateHiddenTime = !WINDOW.document.prerendering ? globalThis.performance.getEntriesByType(\"visibility-state\").filter((e) => e.name === \"hidden\" && e.startTime > activationStart)[0]?.startTime : void 0;\n firstHiddenTime = firstVisibilityStateHiddenTime ?? initHiddenTime();\n addPageListener(\"visibilitychange\", onVisibilityUpdate, true);\n addPageListener(\"pagehide\", onVisibilityUpdate, true);\n addPageListener(\"prerenderingchange\", onVisibilityUpdate, true);\n }\n return {\n get firstHiddenTime() {\n return firstHiddenTime;\n },\n onHidden(cb) {\n onHiddenFunctions.add(cb);\n }\n };\n};\nfunction isPageHidden(event) {\n return event.type === \"pagehide\" || WINDOW.document?.visibilityState === \"hidden\";\n}\n\nexport { getVisibilityWatcher };\n//# sourceMappingURL=getVisibilityWatcher.js.map\n","const generateUniqueID = () => {\n return `v5-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;\n};\n\nexport { generateUniqueID };\n//# sourceMappingURL=generateUniqueID.js.map\n","import { WINDOW } from '../../../types.js';\nimport { generateUniqueID } from './generateUniqueID.js';\nimport { getActivationStart } from './getActivationStart.js';\nimport { getNavigationEntry } from './getNavigationEntry.js';\n\nconst initMetric = (name, value = -1) => {\n const navEntry = getNavigationEntry();\n let navigationType = \"navigate\";\n if (navEntry) {\n if (WINDOW.document?.prerendering || getActivationStart() > 0) {\n navigationType = \"prerender\";\n } else if (WINDOW.document?.wasDiscarded) {\n navigationType = \"restore\";\n } else if (navEntry.type) {\n navigationType = navEntry.type.replace(/_/g, \"-\");\n }\n }\n const entries = [];\n return {\n name,\n value,\n rating: \"good\",\n // If needed, will be updated when reported. `const` to keep the type from widening to `string`.\n delta: 0,\n entries,\n id: generateUniqueID(),\n navigationType\n };\n};\n\nexport { initMetric };\n//# sourceMappingURL=initMetric.js.map\n","const instanceMap = /* @__PURE__ */ new WeakMap();\nfunction initUnique(identityObj, ClassObj) {\n try {\n if (!instanceMap.get(identityObj)) {\n instanceMap.set(identityObj, new ClassObj());\n }\n return instanceMap.get(identityObj);\n } catch (_e) {\n return new ClassObj();\n }\n}\n\nexport { initUnique };\n//# sourceMappingURL=initUnique.js.map\n","class LayoutShiftManager {\n constructor() {\n // oxlint-disable-next-line sdk/no-class-field-initializers\n this._sessionValue = 0;\n // oxlint-disable-next-line sdk/no-class-field-initializers\n this._sessionEntries = [];\n }\n // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n _processEntry(entry) {\n if (entry.hadRecentInput) return;\n const firstSessionEntry = this._sessionEntries[0];\n const lastSessionEntry = this._sessionEntries[this._sessionEntries.length - 1];\n if (this._sessionValue && firstSessionEntry && lastSessionEntry && entry.startTime - lastSessionEntry.startTime < 1e3 && entry.startTime - firstSessionEntry.startTime < 5e3) {\n this._sessionValue += entry.value;\n this._sessionEntries.push(entry);\n } else {\n this._sessionValue = entry.value;\n this._sessionEntries = [entry];\n }\n this._onAfterProcessingUnexpectedShift?.(entry);\n }\n}\n\nexport { LayoutShiftManager };\n//# sourceMappingURL=LayoutShiftManager.js.map\n","const observe = (type, callback, opts = {}) => {\n try {\n if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n const po = new PerformanceObserver((list) => {\n Promise.resolve().then(() => {\n callback(list.getEntries());\n });\n });\n po.observe({ type, buffered: true, ...opts });\n return po;\n }\n } catch {\n }\n return;\n};\n\nexport { observe };\n//# sourceMappingURL=observe.js.map\n","const runOnce = (cb) => {\n let called = false;\n return () => {\n if (!called) {\n cb();\n called = true;\n }\n };\n};\n\nexport { runOnce };\n//# sourceMappingURL=runOnce.js.map\n","import { WINDOW } from '../../../types.js';\n\nconst whenActivated = (callback) => {\n if (WINDOW.document?.prerendering) {\n addEventListener(\"prerenderingchange\", () => callback(), true);\n } else {\n callback();\n }\n};\n\nexport { whenActivated };\n//# sourceMappingURL=whenActivated.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { whenActivated } from './lib/whenActivated.js';\n\nconst FCPThresholds = [1800, 3e3];\nconst onFCP = (onReport, opts = {}) => {\n whenActivated(() => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric(\"FCP\");\n let report;\n const handleEntries = (entries) => {\n for (const entry of entries) {\n if (entry.name === \"first-contentful-paint\") {\n po.disconnect();\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n metric.value = Math.max(entry.startTime - getActivationStart(), 0);\n metric.entries.push(entry);\n report(true);\n }\n }\n }\n };\n const po = observe(\"paint\", handleEntries);\n if (po) {\n report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges);\n }\n });\n};\n\nexport { FCPThresholds, onFCP };\n//# sourceMappingURL=onFCP.js.map\n","import { WINDOW } from '../../types.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { initUnique } from './lib/initUnique.js';\nimport { LayoutShiftManager } from './lib/LayoutShiftManager.js';\nimport { observe } from './lib/observe.js';\nimport { runOnce } from './lib/runOnce.js';\nimport { onFCP } from './onFCP.js';\n\nconst CLSThresholds = [0.1, 0.25];\nconst onCLS = (onReport, opts = {}) => {\n onFCP(\n runOnce(() => {\n const metric = initMetric(\"CLS\", 0);\n let report;\n const visibilityWatcher = getVisibilityWatcher();\n const layoutShiftManager = initUnique(opts, LayoutShiftManager);\n const handleEntries = (entries) => {\n for (const entry of entries) {\n layoutShiftManager._processEntry(entry);\n }\n if (layoutShiftManager._sessionValue > metric.value) {\n metric.value = layoutShiftManager._sessionValue;\n metric.entries = layoutShiftManager._sessionEntries;\n report();\n }\n };\n const po = observe(\"layout-shift\", handleEntries);\n if (po) {\n report = bindReporter(onReport, metric, CLSThresholds, opts.reportAllChanges);\n visibilityWatcher.onHidden(() => {\n handleEntries(po.takeRecords());\n report(true);\n });\n WINDOW?.setTimeout?.(report);\n }\n })\n );\n};\n\nexport { CLSThresholds, onCLS };\n//# sourceMappingURL=getCLS.js.map\n","import { observe } from '../observe.js';\n\nlet interactionCountEstimate = 0;\nlet minKnownInteractionId = Infinity;\nlet maxKnownInteractionId = 0;\nconst updateEstimate = (entries) => {\n entries.forEach((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};\nlet po;\nconst getInteractionCount = () => {\n return po ? interactionCountEstimate : performance.interactionCount || 0;\n};\nconst 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//# sourceMappingURL=interactionCountPolyfill.js.map\n","import { getInteractionCount } from './polyfills/interactionCountPolyfill.js';\n\nconst MAX_INTERACTIONS_TO_CONSIDER = 10;\nlet prevInteractionCount = 0;\nconst getInteractionCountForNavigation = () => {\n return getInteractionCount() - prevInteractionCount;\n};\nclass InteractionManager {\n constructor() {\n /**\n * A list of longest interactions on the page (by latency) sorted so the\n * longest one is first. The list is at most MAX_INTERACTIONS_TO_CONSIDER\n * long.\n */\n // oxlint-disable-next-line sdk/no-class-field-initializers\n this._longestInteractionList = [];\n /**\n * A mapping of longest interactions by their interaction ID.\n * This is used for faster lookup.\n */\n // oxlint-disable-next-line sdk/no-class-field-initializers\n this._longestInteractionMap = /* @__PURE__ */ new Map();\n }\n // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility, jsdoc/require-jsdoc\n _resetInteractions() {\n prevInteractionCount = getInteractionCount();\n this._longestInteractionList.length = 0;\n this._longestInteractionMap.clear();\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 // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n _estimateP98LongestInteraction() {\n const candidateInteractionIndex = Math.min(\n this._longestInteractionList.length - 1,\n Math.floor(getInteractionCountForNavigation() / 50)\n );\n return this._longestInteractionList[candidateInteractionIndex];\n }\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 // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n _processEntry(entry) {\n this._onBeforeProcessingEntry?.(entry);\n if (!(entry.interactionId || entry.entryType === \"first-input\")) return;\n const minLongestInteraction = this._longestInteractionList.at(-1);\n let interaction = this._longestInteractionMap.get(entry.interactionId);\n if (interaction || this._longestInteractionList.length < MAX_INTERACTIONS_TO_CONSIDER || // If the above conditions are false, `minLongestInteraction` will be set.\n entry.duration > minLongestInteraction._latency) {\n if (interaction) {\n if (entry.duration > interaction._latency) {\n interaction.entries = [entry];\n interaction._latency = entry.duration;\n } else if (entry.duration === interaction._latency && entry.startTime === interaction.entries[0].startTime) {\n interaction.entries.push(entry);\n }\n } else {\n interaction = {\n id: entry.interactionId,\n entries: [entry],\n _latency: entry.duration\n };\n this._longestInteractionMap.set(interaction.id, interaction);\n this._longestInteractionList.push(interaction);\n }\n this._longestInteractionList.sort((a, b) => b._latency - a._latency);\n if (this._longestInteractionList.length > MAX_INTERACTIONS_TO_CONSIDER) {\n const removedInteractions = this._longestInteractionList.splice(MAX_INTERACTIONS_TO_CONSIDER);\n for (const interaction2 of removedInteractions) {\n this._longestInteractionMap.delete(interaction2.id);\n }\n }\n this._onAfterProcessingINPCandidate?.(interaction);\n }\n }\n}\n\nexport { InteractionManager };\n//# sourceMappingURL=InteractionManager.js.map\n","import { WINDOW } from '../../../types.js';\nimport { addPageListener, removePageListener } from './globalListeners.js';\nimport { runOnce } from './runOnce.js';\n\nconst whenIdleOrHidden = (cb) => {\n const rIC = WINDOW.requestIdleCallback || WINDOW.setTimeout;\n if (WINDOW.document?.visibilityState === \"hidden\") {\n cb();\n } else {\n cb = runOnce(cb);\n addPageListener(\"visibilitychange\", cb, { once: true, capture: true });\n addPageListener(\"pagehide\", cb, { once: true, capture: true });\n rIC(() => {\n cb();\n removePageListener(\"visibilitychange\", cb, { capture: true });\n removePageListener(\"pagehide\", cb, { capture: true });\n });\n }\n};\n\nexport { whenIdleOrHidden };\n//# sourceMappingURL=whenIdleOrHidden.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { initUnique } from './lib/initUnique.js';\nimport { InteractionManager } from './lib/InteractionManager.js';\nimport { observe } from './lib/observe.js';\nimport { initInteractionCountPolyfill } from './lib/polyfills/interactionCountPolyfill.js';\nimport { whenActivated } from './lib/whenActivated.js';\nimport { whenIdleOrHidden } from './lib/whenIdleOrHidden.js';\n\nconst INPThresholds = [200, 500];\nconst DEFAULT_DURATION_THRESHOLD = 40;\nconst onINP = (onReport, opts = {}) => {\n if (!(globalThis.PerformanceEventTiming && \"interactionId\" in PerformanceEventTiming.prototype)) {\n return;\n }\n const visibilityWatcher = getVisibilityWatcher();\n whenActivated(() => {\n initInteractionCountPolyfill();\n const metric = initMetric(\"INP\");\n let report;\n const interactionManager = initUnique(opts, InteractionManager);\n const handleEntries = (entries) => {\n whenIdleOrHidden(() => {\n for (const entry of entries) {\n interactionManager._processEntry(entry);\n }\n const inp = interactionManager._estimateP98LongestInteraction();\n if (inp && inp._latency !== metric.value) {\n metric.value = inp._latency;\n metric.entries = inp.entries;\n report();\n }\n });\n };\n const 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 ?? DEFAULT_DURATION_THRESHOLD\n });\n report = bindReporter(onReport, metric, INPThresholds, opts.reportAllChanges);\n if (po) {\n po.observe({ type: \"first-input\", buffered: true });\n visibilityWatcher.onHidden(() => {\n handleEntries(po.takeRecords());\n report(true);\n });\n }\n });\n};\n\nexport { INPThresholds, onINP };\n//# sourceMappingURL=getINP.js.map\n","class LCPEntryManager {\n // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility, jsdoc/require-jsdoc\n _processEntry(entry) {\n this._onBeforeProcessingEntry?.(entry);\n }\n}\n\nexport { LCPEntryManager };\n//# sourceMappingURL=LCPEntryManager.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { addPageListener, removePageListener } from './lib/globalListeners.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { initUnique } from './lib/initUnique.js';\nimport { LCPEntryManager } from './lib/LCPEntryManager.js';\nimport { observe } from './lib/observe.js';\nimport { runOnce } from './lib/runOnce.js';\nimport { whenActivated } from './lib/whenActivated.js';\nimport { whenIdleOrHidden } from './lib/whenIdleOrHidden.js';\n\nconst LCPThresholds = [2500, 4e3];\nconst onLCP = (onReport, opts = {}) => {\n whenActivated(() => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric(\"LCP\");\n let report;\n const lcpEntryManager = initUnique(opts, LCPEntryManager);\n const handleEntries = (entries) => {\n if (!opts.reportAllChanges) {\n entries = entries.slice(-1);\n }\n for (const entry of entries) {\n if (!entry) continue;\n lcpEntryManager._processEntry(entry);\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n metric.value = Math.max(entry.startTime - getActivationStart(), 0);\n metric.entries = [entry];\n report();\n }\n }\n };\n const po = observe(\"largest-contentful-paint\", handleEntries);\n if (po) {\n report = bindReporter(onReport, metric, LCPThresholds, opts.reportAllChanges);\n const stopListening = runOnce(() => {\n handleEntries(po.takeRecords());\n po.disconnect();\n report(true);\n });\n const stopListeningWrapper = (event) => {\n if (event.isTrusted) {\n whenIdleOrHidden(stopListening);\n removePageListener(event.type, stopListeningWrapper, {\n capture: true\n });\n }\n };\n for (const type of [\"keydown\", \"click\", \"visibilitychange\"]) {\n addPageListener(type, stopListeningWrapper, {\n capture: true\n });\n }\n }\n });\n};\n\nexport { LCPThresholds, onLCP };\n//# sourceMappingURL=getLCP.js.map\n","import { debug, getFunctionName } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { onCLS } from './web-vitals/getCLS.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';\n\nconst handlers = {};\nconst instrumented = {};\nlet _previousCls;\nlet _previousLcp;\nlet _previousTtfb;\nlet _previousInp;\nfunction addClsInstrumentationHandler(callback, stopOnCallback = false) {\n return addMetricObserver(\"cls\", callback, instrumentCls, _previousCls, stopOnCallback);\n}\nfunction addLcpInstrumentationHandler(callback, stopOnCallback = false) {\n return addMetricObserver(\"lcp\", callback, instrumentLcp, _previousLcp, stopOnCallback);\n}\nfunction addTtfbInstrumentationHandler(callback) {\n return addMetricObserver(\"ttfb\", callback, instrumentTtfb, _previousTtfb);\n}\nfunction addInpInstrumentationHandler(callback) {\n return addMetricObserver(\"inp\", callback, instrumentInp, _previousInp);\n}\nfunction addPerformanceInstrumentationHandler(type, callback) {\n addHandler(type, callback);\n if (!instrumented[type]) {\n instrumentPerformanceObserver(type);\n instrumented[type] = true;\n }\n return getCleanupCallback(type, callback);\n}\nfunction triggerHandlers(type, data) {\n const typeHandlers = handlers[type];\n if (!typeHandlers?.length) {\n return;\n }\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n DEBUG_BUILD && debug.error(\n `Error while triggering instrumentation handler.\nType: ${type}\nName: ${getFunctionName(handler)}\nError:`,\n e\n );\n }\n }\n}\nfunction instrumentCls() {\n return onCLS(\n (metric) => {\n triggerHandlers(\"cls\", {\n metric\n });\n _previousCls = metric;\n },\n // We want the callback to be called whenever the CLS value updates.\n // By default, the callback is only called when the tab goes to the background.\n { reportAllChanges: true }\n );\n}\nfunction instrumentLcp() {\n return onLCP(\n (metric) => {\n triggerHandlers(\"lcp\", {\n metric\n });\n _previousLcp = metric;\n },\n // We want the callback to be called whenever the LCP value updates.\n // By default, the callback is only called when the tab goes to the background.\n { reportAllChanges: true }\n );\n}\nfunction instrumentTtfb() {\n return onTTFB((metric) => {\n triggerHandlers(\"ttfb\", {\n metric\n });\n _previousTtfb = metric;\n });\n}\nfunction instrumentInp() {\n return onINP((metric) => {\n triggerHandlers(\"inp\", {\n metric\n });\n _previousInp = metric;\n });\n}\nfunction addMetricObserver(type, callback, instrumentFn, previousValue, stopOnCallback = false) {\n addHandler(type, callback);\n let stopListening;\n if (!instrumented[type]) {\n stopListening = instrumentFn();\n instrumented[type] = true;\n }\n if (previousValue) {\n callback({ metric: previousValue });\n }\n return getCleanupCallback(type, callback, stopOnCallback ? stopListening : void 0);\n}\nfunction instrumentPerformanceObserver(type) {\n const options = {};\n if (type === \"event\") {\n options.durationThreshold = 0;\n }\n observe(\n type,\n (entries) => {\n triggerHandlers(type, { entries });\n },\n options\n );\n}\nfunction addHandler(type, handler) {\n handlers[type] = handlers[type] || [];\n handlers[type].push(handler);\n}\nfunction getCleanupCallback(type, callback, stopListening) {\n return () => {\n if (stopListening) {\n stopListening();\n }\n const typeHandlers = handlers[type];\n if (!typeHandlers) {\n return;\n }\n const index = typeHandlers.indexOf(callback);\n if (index !== -1) {\n typeHandlers.splice(index, 1);\n }\n };\n}\nfunction isPerformanceEventTiming(entry) {\n return \"duration\" in entry;\n}\n\nexport { addClsInstrumentationHandler, addInpInstrumentationHandler, addLcpInstrumentationHandler, addPerformanceInstrumentationHandler, addTtfbInstrumentationHandler, isPerformanceEventTiming };\n//# sourceMappingURL=instrument.js.map\n","import { isString } from '@sentry/core';\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\nconst accessors = {};\ntry {\n if (typeof Node !== \"undefined\") {\n accessors.parentNode = Object.getOwnPropertyDescriptor(Node.prototype, \"parentNode\").get;\n }\n if (typeof Element !== \"undefined\") {\n accessors.tagName = Object.getOwnPropertyDescriptor(Element.prototype, \"tagName\").get;\n accessors.id = Object.getOwnPropertyDescriptor(Element.prototype, \"id\").get;\n accessors.className = Object.getOwnPropertyDescriptor(Element.prototype, \"className\").get;\n accessors.getAttribute = Element.prototype.getAttribute;\n }\n if (typeof HTMLElement !== \"undefined\") {\n accessors.dataset = Object.getOwnPropertyDescriptor(HTMLElement.prototype, \"dataset\").get;\n }\n} catch {\n}\nfunction _safeRead(el, prop, arg) {\n const fn = accessors[prop];\n if (fn) {\n try {\n return fn.call(el, arg);\n } catch {\n }\n }\n const val = el[prop];\n return typeof val === \"function\" ? val.call(el, arg) : val;\n}\nfunction htmlTreeAsString(elem, options = {}) {\n if (!elem) {\n return \"\";\n }\n try {\n let currentElem = elem;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = \" > \";\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = !Array.isArray(options) && options.maxStringLength || DEFAULT_MAX_STRING_LENGTH;\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n if (nextStr === \"html\" || height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength) {\n break;\n }\n out.push(nextStr);\n len += nextStr.length;\n currentElem = _safeRead(currentElem, \"parentNode\");\n }\n return out.reverse().join(separator);\n } catch {\n return \"\";\n }\n}\nfunction _htmlElementAsString(el, keyAttrs) {\n const out = [];\n const tagName = _safeRead(el, \"tagName\");\n if (!tagName) {\n return \"\";\n }\n if (typeof HTMLElement !== \"undefined\") {\n if (el instanceof HTMLElement) {\n const dataset = _safeRead(el, \"dataset\");\n if (dataset) {\n if (dataset[\"sentryComponent\"]) {\n return dataset[\"sentryComponent\"];\n }\n if (dataset[\"sentryElement\"]) {\n return dataset[\"sentryElement\"];\n }\n }\n }\n }\n out.push(tagName.toLowerCase());\n const keyAttrPairs = keyAttrs?.length ? keyAttrs.filter((keyAttr) => _safeRead(el, \"getAttribute\", keyAttr)).map((keyAttr) => [keyAttr, _safeRead(el, \"getAttribute\", keyAttr)]) : null;\n if (keyAttrPairs?.length) {\n keyAttrPairs.forEach((keyAttrPair) => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n const id = _safeRead(el, \"id\");\n if (id) {\n out.push(`#${id}`);\n }\n const className = _safeRead(el, \"className\");\n if (className && isString(className)) {\n const classes = className.split(/\\s+/);\n for (const c of classes) {\n out.push(`.${c}`);\n }\n }\n }\n for (const k of [\"aria-label\", \"type\", \"name\", \"title\", \"alt\"]) {\n const attr = _safeRead(el, \"getAttribute\", k);\n if (attr) {\n out.push(`[${k}=\"${attr}\"]`);\n }\n }\n return out.join(\"\");\n}\n\nexport { htmlTreeAsString };\n//# sourceMappingURL=htmlTreeAsString.js.map\n","import { addHandler, maybeInstrument, triggerHandlers, fill, addNonEnumerableProperty, uuid4 } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\nconst DEBOUNCE_DURATION = 1e3;\nlet debounceTimerID;\nlet lastCapturedEventType;\nlet lastCapturedEventTargetId;\nfunction addClickKeypressInstrumentationHandler(handler) {\n const type = \"dom\";\n addHandler(type, handler);\n maybeInstrument(type, instrumentDOM);\n}\nfunction instrumentDOM() {\n if (!WINDOW.document) {\n return;\n }\n const triggerDOMHandler = triggerHandlers.bind(null, \"dom\");\n const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n WINDOW.document.addEventListener(\"click\", globalDOMEventHandler, false);\n WINDOW.document.addEventListener(\"keypress\", globalDOMEventHandler, false);\n [\"EventTarget\", \"Node\"].forEach((target) => {\n const globalObject = WINDOW;\n const proto = globalObject[target]?.prototype;\n if (!proto?.hasOwnProperty?.(\"addEventListener\")) {\n return;\n }\n fill(proto, \"addEventListener\", function(originalAddEventListener) {\n return function(type, listener, options) {\n if (type === \"click\" || type == \"keypress\") {\n try {\n const handlers = this.__sentry_instrumentation_handlers__ = this.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type] = handlers[type] || { refCount: 0 };\n if (!handlerForType.handler) {\n const handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n handlerForType.refCount++;\n } catch {\n }\n }\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n fill(\n proto,\n \"removeEventListener\",\n function(originalRemoveEventListener) {\n return function(type, listener, options) {\n if (type === \"click\" || type == \"keypress\") {\n try {\n const handlers = this.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n if (handlerForType) {\n handlerForType.refCount--;\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = void 0;\n delete handlers[type];\n }\n if (Object.keys(handlers).length === 0) {\n delete this.__sentry_instrumentation_handlers__;\n }\n }\n } catch {\n }\n }\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n }\n );\n });\n}\nfunction isSimilarToLastCapturedEvent(event) {\n if (event.type !== lastCapturedEventType) {\n return false;\n }\n try {\n if (!event.target || event.target._sentryId !== lastCapturedEventTargetId) {\n return false;\n }\n } catch {\n }\n return true;\n}\nfunction shouldSkipDOMEvent(eventType, target) {\n if (eventType !== \"keypress\") {\n return false;\n }\n if (!target?.tagName) {\n return true;\n }\n if (target.tagName === \"INPUT\" || target.tagName === \"TEXTAREA\" || target.isContentEditable) {\n return false;\n }\n return true;\n}\nfunction makeDOMEventHandler(handler, globalListener = false) {\n return (event) => {\n if (!event || event[\"_sentryCaptured\"]) {\n return;\n }\n const target = getEventTarget(event);\n if (shouldSkipDOMEvent(event.type, target)) {\n return;\n }\n addNonEnumerableProperty(event, \"_sentryCaptured\", true);\n if (target && !target._sentryId) {\n addNonEnumerableProperty(target, \"_sentryId\", uuid4());\n }\n const name = event.type === \"keypress\" ? \"input\" : event.type;\n if (!isSimilarToLastCapturedEvent(event)) {\n const handlerData = { event, name, global: globalListener };\n handler(handlerData);\n lastCapturedEventType = event.type;\n lastCapturedEventTargetId = target ? target._sentryId : void 0;\n }\n clearTimeout(debounceTimerID);\n debounceTimerID = WINDOW.setTimeout(() => {\n lastCapturedEventTargetId = void 0;\n lastCapturedEventType = void 0;\n }, DEBOUNCE_DURATION);\n };\n}\nfunction getEventTarget(event) {\n try {\n return event.target;\n } catch {\n return null;\n }\n}\n\nexport { addClickKeypressInstrumentationHandler, instrumentDOM };\n//# sourceMappingURL=dom.js.map\n","import { addHandler, maybeInstrument, triggerHandlers, supportsHistory, fill } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\nlet lastHref;\nfunction addHistoryInstrumentationHandler(handler) {\n const type = \"history\";\n addHandler(type, handler);\n maybeInstrument(type, instrumentHistory);\n}\nfunction instrumentHistory() {\n WINDOW.addEventListener(\"popstate\", () => {\n const to = WINDOW.location.href;\n const from = lastHref;\n lastHref = to;\n if (from === to) {\n return;\n }\n const handlerData = { from, to };\n triggerHandlers(\"history\", handlerData);\n });\n if (!supportsHistory()) {\n return;\n }\n function historyReplacementFunction(originalHistoryFunction) {\n return function(...args) {\n const url = args.length > 2 ? args[2] : void 0;\n if (url) {\n const from = lastHref;\n const to = getAbsoluteUrl(String(url));\n lastHref = to;\n if (from === to) {\n return originalHistoryFunction.apply(this, args);\n }\n const handlerData = { from, to };\n triggerHandlers(\"history\", handlerData);\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n fill(WINDOW.history, \"pushState\", historyReplacementFunction);\n fill(WINDOW.history, \"replaceState\", historyReplacementFunction);\n}\nfunction getAbsoluteUrl(urlOrPath) {\n try {\n const url = new URL(urlOrPath, WINDOW.location.origin);\n return url.toString();\n } catch {\n return urlOrPath;\n }\n}\n\nexport { addHistoryInstrumentationHandler, instrumentHistory };\n//# sourceMappingURL=history.js.map\n","import { isNativeFunction, debug } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { WINDOW } from './types.js';\n\nconst cachedImplementations = {};\nfunction getNativeImplementation(name) {\n const cached = cachedImplementations[name];\n if (cached) {\n return cached;\n }\n let impl = WINDOW[name];\n if (isNativeFunction(impl)) {\n return cachedImplementations[name] = impl.bind(WINDOW);\n }\n const document = WINDOW.document;\n if (document && typeof document.createElement === \"function\") {\n try {\n const sandbox = document.createElement(\"iframe\");\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow?.[name]) {\n impl = contentWindow[name];\n }\n document.head.removeChild(sandbox);\n } catch (e) {\n DEBUG_BUILD && debug.warn(`Could not create sandbox iframe for ${name} check, bailing to window.${name}: `, e);\n }\n }\n if (!impl) {\n return impl;\n }\n return cachedImplementations[name] = impl.bind(WINDOW);\n}\nfunction clearCachedImplementation(name) {\n cachedImplementations[name] = void 0;\n}\nfunction fetch(...rest) {\n return getNativeImplementation(\"fetch\")(...rest);\n}\nfunction setTimeout(...rest) {\n try {\n return getNativeImplementation(\"setTimeout\")(...rest);\n } catch (e) {\n DEBUG_BUILD && debug.warn(\"Could not use native setTimeout implementation, falling back to window.setTimeout: \", e);\n const fallback = WINDOW.setTimeout.bind(WINDOW);\n cachedImplementations.setTimeout = fallback;\n return fallback(...rest);\n }\n}\n\nexport { clearCachedImplementation, fetch, getNativeImplementation, setTimeout };\n//# sourceMappingURL=getNativeImplementation.js.map\n","import { addHandler, maybeInstrument, timestampInSeconds, isString, triggerHandlers } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\nconst SENTRY_XHR_DATA_KEY = \"__sentry_xhr_v3__\";\nfunction addXhrInstrumentationHandler(handler) {\n const type = \"xhr\";\n addHandler(type, handler);\n maybeInstrument(type, instrumentXHR);\n}\nfunction instrumentXHR() {\n if (!WINDOW.XMLHttpRequest) {\n return;\n }\n const xhrproto = XMLHttpRequest.prototype;\n xhrproto.open = new Proxy(xhrproto.open, {\n apply(originalOpen, xhrOpenThisArg, xhrOpenArgArray) {\n let virtualError = new Error();\n const startTimestamp = timestampInSeconds() * 1e3;\n const method = isString(xhrOpenArgArray[0]) ? xhrOpenArgArray[0].toUpperCase() : void 0;\n const url = parseXhrUrlArg(xhrOpenArgArray[1]);\n if (!method || !url) {\n return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n }\n xhrOpenThisArg[SENTRY_XHR_DATA_KEY] = {\n method,\n url,\n request_headers: {}\n };\n if (method === \"POST\" && url.match(/sentry_key/)) {\n xhrOpenThisArg.__sentry_own_request__ = true;\n }\n const onreadystatechangeHandler = () => {\n const xhrInfo = xhrOpenThisArg[SENTRY_XHR_DATA_KEY];\n if (!xhrInfo) {\n return;\n }\n if (xhrOpenThisArg.readyState === 4) {\n try {\n xhrInfo.status_code = xhrOpenThisArg.status;\n } catch {\n }\n const handlerData = {\n endTimestamp: timestampInSeconds() * 1e3,\n startTimestamp,\n xhr: xhrOpenThisArg,\n virtualError\n };\n triggerHandlers(\"xhr\", handlerData);\n virtualError = void 0;\n xhrOpenThisArg.removeEventListener(\"readystatechange\", onreadystatechangeHandler);\n }\n };\n if (\"onreadystatechange\" in xhrOpenThisArg && typeof xhrOpenThisArg.onreadystatechange === \"function\") {\n xhrOpenThisArg.onreadystatechange = new Proxy(xhrOpenThisArg.onreadystatechange, {\n apply(originalOnreadystatechange, onreadystatechangeThisArg, onreadystatechangeArgArray) {\n onreadystatechangeHandler();\n return originalOnreadystatechange.apply(onreadystatechangeThisArg, onreadystatechangeArgArray);\n }\n });\n } else {\n xhrOpenThisArg.addEventListener(\"readystatechange\", onreadystatechangeHandler);\n }\n xhrOpenThisArg.setRequestHeader = new Proxy(xhrOpenThisArg.setRequestHeader, {\n apply(originalSetRequestHeader, setRequestHeaderThisArg, setRequestHeaderArgArray) {\n const [header, value] = setRequestHeaderArgArray;\n const xhrInfo = setRequestHeaderThisArg[SENTRY_XHR_DATA_KEY];\n if (xhrInfo && isString(header) && isString(value)) {\n xhrInfo.request_headers[header.toLowerCase()] = value;\n }\n return originalSetRequestHeader.apply(setRequestHeaderThisArg, setRequestHeaderArgArray);\n }\n });\n return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n }\n });\n xhrproto.send = new Proxy(xhrproto.send, {\n apply(originalSend, sendThisArg, sendArgArray) {\n const sentryXhrData = sendThisArg[SENTRY_XHR_DATA_KEY];\n if (!sentryXhrData) {\n return originalSend.apply(sendThisArg, sendArgArray);\n }\n if (sendArgArray[0] !== void 0) {\n sentryXhrData.body = sendArgArray[0];\n }\n const handlerData = {\n startTimestamp: timestampInSeconds() * 1e3,\n xhr: sendThisArg\n };\n triggerHandlers(\"xhr\", handlerData);\n return originalSend.apply(sendThisArg, sendArgArray);\n }\n });\n}\nfunction parseXhrUrlArg(url) {\n if (isString(url)) {\n return url;\n }\n try {\n return url.toString();\n } catch {\n }\n return void 0;\n}\n\nexport { SENTRY_XHR_DATA_KEY, addXhrInstrumentationHandler, instrumentXHR };\n//# sourceMappingURL=xhr.js.map\n","import { debug } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build.js';\n\nconst ORIGINAL_REQ_BODY = /* @__PURE__ */ Symbol.for(\"sentry__originalRequestBody\");\nfunction serializeFormData(formData) {\n return new URLSearchParams(formData).toString();\n}\nfunction getBodyString(body, _debug = debug) {\n try {\n if (typeof body === \"string\") {\n return [body];\n }\n if (body instanceof URLSearchParams) {\n return [body.toString()];\n }\n if (body instanceof FormData) {\n return [serializeFormData(body)];\n }\n if (!body) {\n return [void 0];\n }\n } catch (error) {\n DEBUG_BUILD && _debug.error(error, \"Failed to serialize body\", body);\n return [void 0, \"BODY_PARSE_ERROR\"];\n }\n DEBUG_BUILD && _debug.log(\"Skipping network body because of body type\", body);\n return [void 0, \"UNPARSEABLE_BODY_TYPE\"];\n}\nfunction getFetchRequestArgBody(fetchArgs = []) {\n if (fetchArgs.length >= 2 && fetchArgs[1] && typeof fetchArgs[1] === \"object\" && \"body\" in fetchArgs[1]) {\n return fetchArgs[1].body;\n }\n if (fetchArgs.length >= 1 && fetchArgs[0] instanceof Request) {\n const request = fetchArgs[0];\n const originalBody = request[ORIGINAL_REQ_BODY];\n if (originalBody !== void 0) {\n return originalBody;\n }\n return void 0;\n }\n return void 0;\n}\nfunction parseXhrResponseHeaders(xhr) {\n let headers;\n try {\n headers = xhr.getAllResponseHeaders();\n } catch (error) {\n DEBUG_BUILD && debug.error(error, \"Failed to get xhr response headers\", xhr);\n return {};\n }\n if (!headers) {\n return {};\n }\n return headers.split(\"\\r\\n\").reduce((acc, line) => {\n const [key, value] = line.split(\": \");\n if (value) {\n acc[key.toLowerCase()] = value;\n }\n return acc;\n }, {});\n}\n\nexport { ORIGINAL_REQ_BODY, getBodyString, getFetchRequestArgBody, parseXhrResponseHeaders, serializeFormData };\n//# sourceMappingURL=networkUtils.js.map\n","function isElement(wat) {\n if (typeof Element === \"undefined\") {\n return false;\n }\n try {\n return wat instanceof Element;\n } catch {\n return false;\n }\n}\n\nexport { isElement };\n//# sourceMappingURL=is.js.map\n","import { createTransport, makePromiseBuffer } from '@sentry/core/browser';\nimport { getNativeImplementation, clearCachedImplementation } from '@sentry/browser-utils';\n\nconst DEFAULT_BROWSER_TRANSPORT_BUFFER_SIZE = 40;\nfunction makeFetchTransport(options, nativeFetch = getNativeImplementation(\"fetch\")) {\n let pendingBodySize = 0;\n let pendingCount = 0;\n async function makeRequest(request) {\n const requestSize = request.body.length;\n pendingBodySize += requestSize;\n pendingCount++;\n const requestOptions = {\n body: request.body,\n method: \"POST\",\n referrerPolicy: \"strict-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. when finishing 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 <= 6e4 && pendingCount < 15,\n ...options.fetchOptions\n };\n try {\n const response = await nativeFetch(options.url, requestOptions);\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 } catch (e) {\n clearCachedImplementation(\"fetch\");\n throw e;\n } finally {\n pendingBodySize -= requestSize;\n pendingCount--;\n }\n }\n return createTransport(\n options,\n makeRequest,\n makePromiseBuffer(options.bufferSize || DEFAULT_BROWSER_TRANSPORT_BUFFER_SIZE)\n );\n}\n\nexport { makeFetchTransport };\n//# sourceMappingURL=fetch.js.map\n","const DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","import { createStackParser, UNKNOWN_FUNCTION } from '@sentry/core/browser';\n\nconst OPERA10_PRIORITY = 10;\nconst OPERA11_PRIORITY = 20;\nconst CHROME_PRIORITY = 30;\nconst WINJS_PRIORITY = 40;\nconst GECKO_PRIORITY = 50;\nfunction createFrame(filename, func, lineno, colno) {\n const frame = {\n filename,\n function: func === \"\" ? UNKNOWN_FUNCTION : func,\n in_app: true\n // All browser frames are considered in_app\n };\n if (lineno !== void 0) {\n frame.lineno = lineno;\n }\n if (colno !== void 0) {\n frame.colno = colno;\n }\n return frame;\n}\nconst chromeRegexNoFnName = /^\\s*at (\\S+?)(?::(\\d+))(?::(\\d+))\\s*$/i;\nconst chromeRegex = /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nconst chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\nconst chromeDataUriRegex = /at (.+?) ?\\(data:(.+?),/;\nconst chromeStackParserFn = (line) => {\n const dataUriMatch = line.match(chromeDataUriRegex);\n if (dataUriMatch) {\n return {\n filename: ``,\n function: dataUriMatch[1]\n };\n }\n const noFnParts = chromeRegexNoFnName.exec(line);\n if (noFnParts) {\n const [, filename, line2, col] = noFnParts;\n return createFrame(filename, UNKNOWN_FUNCTION, +line2, +col);\n }\n const parts = chromeRegex.exec(line);\n if (parts) {\n const isEval = parts[2]?.indexOf(\"eval\") === 0;\n if (isEval) {\n const subMatch = chromeEvalRegex.exec(parts[2]);\n if (subMatch) {\n parts[2] = subMatch[1];\n parts[3] = subMatch[2];\n parts[4] = subMatch[3];\n }\n }\n const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n return createFrame(filename, func, parts[3] ? +parts[3] : void 0, parts[4] ? +parts[4] : void 0);\n }\n return;\n};\nconst chromeStackLineParser = [CHROME_PRIORITY, chromeStackParserFn];\nconst geckoREgex = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nconst gecko = (line) => {\n const parts = geckoREgex.exec(line);\n if (parts) {\n const isEval = parts[3] && parts[3].indexOf(\" > eval\") > -1;\n if (isEval) {\n const subMatch = geckoEvalRegex.exec(parts[3]);\n if (subMatch) {\n parts[1] = parts[1] || \"eval\";\n parts[3] = subMatch[1];\n parts[4] = subMatch[2];\n parts[5] = \"\";\n }\n }\n let filename = parts[3];\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, filename] = extractSafariExtensionDetails(func, filename);\n return createFrame(filename, func, parts[4] ? +parts[4] : void 0, parts[5] ? +parts[5] : void 0);\n }\n return;\n};\nconst geckoStackLineParser = [GECKO_PRIORITY, gecko];\nconst winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nconst winjs = (line) => {\n const parts = winjsRegex.exec(line);\n return parts ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : void 0) : void 0;\n};\nconst winjsStackLineParser = [WINJS_PRIORITY, winjs];\nconst opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\nconst opera10 = (line) => {\n const parts = opera10Regex.exec(line);\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : void 0;\n};\nconst opera10StackLineParser = [OPERA10_PRIORITY, opera10];\nconst opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\nconst opera11 = (line) => {\n const parts = opera11Regex.exec(line);\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : void 0;\n};\nconst opera11StackLineParser = [OPERA11_PRIORITY, opera11];\nconst defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser];\nconst defaultStackParser = createStackParser(...defaultStackLineParsers);\nconst extractSafariExtensionDetails = (func, filename) => {\n const isSafariExtension = func.indexOf(\"safari-extension\") !== -1;\n const isSafariWebExtension = func.indexOf(\"safari-web-extension\") !== -1;\n return isSafariExtension || isSafariWebExtension ? [\n func.indexOf(\"@\") !== -1 ? func.split(\"@\")[0] : UNKNOWN_FUNCTION,\n isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`\n ] : [func, filename];\n};\n\nexport { chromeStackLineParser, defaultStackLineParsers, defaultStackParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser };\n//# sourceMappingURL=stack-parsers.js.map\n","import { defineIntegration, addConsoleInstrumentationHandler, addFetchInstrumentationHandler, getClient, safeJoin, severityLevelFromString, addBreadcrumb, debug, getComponentName, getBreadcrumbLogLevelFromHttpStatusCode, parseUrl, getEventDescription } from '@sentry/core/browser';\nimport { addClickKeypressInstrumentationHandler, addXhrInstrumentationHandler, addHistoryInstrumentationHandler, htmlTreeAsString, SENTRY_XHR_DATA_KEY } from '@sentry/browser-utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n\nconst MAX_ALLOWED_STRING_LENGTH = 1024;\nconst INTEGRATION_NAME = \"Breadcrumbs\";\nconst _breadcrumbsIntegration = ((options = {}) => {\n const _options = {\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 setup(client) {\n if (_options.console) {\n addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(client));\n }\n if (_options.dom) {\n addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(client, _options.dom));\n }\n if (_options.xhr) {\n addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(client));\n }\n if (_options.fetch) {\n addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(client));\n }\n if (_options.history) {\n addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(client));\n }\n if (_options.sentry) {\n client.on(\"beforeSendEvent\", _getSentryBreadcrumbHandler(client));\n }\n }\n };\n});\nconst breadcrumbsIntegration = defineIntegration(_breadcrumbsIntegration);\nfunction _getSentryBreadcrumbHandler(client) {\n return function addSentryBreadcrumb(event) {\n if (getClient() !== client) {\n return;\n }\n addBreadcrumb(\n {\n category: `sentry.${event.type === \"transaction\" ? \"transaction\" : \"event\"}`,\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event)\n },\n {\n event\n }\n );\n };\n}\nfunction _getDomBreadcrumbHandler(client, dom) {\n return function _innerDomBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n let target;\n let componentName;\n let keyAttrs = typeof dom === \"object\" ? dom.serializeAttribute : void 0;\n let maxStringLength = typeof dom === \"object\" && typeof dom.maxStringLength === \"number\" ? dom.maxStringLength : void 0;\n if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {\n DEBUG_BUILD && debug.warn(\n `\\`dom.maxStringLength\\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`\n );\n maxStringLength = MAX_ALLOWED_STRING_LENGTH;\n }\n if (typeof keyAttrs === \"string\") {\n keyAttrs = [keyAttrs];\n }\n try {\n const event = handlerData.event;\n const element = _isEvent(event) ? event.target : event;\n target = htmlTreeAsString(element, { keyAttrs, maxStringLength });\n componentName = getComponentName(element);\n } catch {\n target = \"\";\n }\n if (target.length === 0) {\n return;\n }\n const breadcrumb = {\n category: `ui.${handlerData.name}`,\n message: target\n };\n if (componentName) {\n breadcrumb.data = { \"ui.component_name\": componentName };\n }\n addBreadcrumb(breadcrumb, {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global\n });\n };\n}\nfunction _getConsoleBreadcrumbHandler(client) {\n return function _consoleBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n const breadcrumb = {\n category: \"console\",\n data: {\n arguments: handlerData.args,\n logger: \"console\"\n },\n level: severityLevelFromString(handlerData.level),\n message: safeJoin(handlerData.args, \" \")\n };\n if (handlerData.level === \"assert\") {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), \" \") || \"console.assert\"}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n return;\n }\n }\n addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level\n });\n };\n}\nfunction _getXhrBreadcrumbHandler(client) {\n return function _xhrBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n const { startTimestamp, endTimestamp } = handlerData;\n const sentryXhrData = handlerData.xhr[SENTRY_XHR_DATA_KEY];\n if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n return;\n }\n const { method, url, status_code, body } = sentryXhrData;\n const data = {\n method,\n url,\n status_code\n };\n const hint = {\n xhr: handlerData.xhr,\n input: body,\n startTimestamp,\n endTimestamp\n };\n const breadcrumb = {\n category: \"xhr\",\n data,\n type: \"http\",\n level: getBreadcrumbLogLevelFromHttpStatusCode(status_code)\n };\n client.emit(\"beforeOutgoingRequestBreadcrumb\", breadcrumb, hint);\n addBreadcrumb(breadcrumb, hint);\n };\n}\nfunction _getFetchBreadcrumbHandler(client) {\n return function _fetchBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n const { startTimestamp, endTimestamp } = handlerData;\n if (!endTimestamp) {\n return;\n }\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === \"POST\") {\n return;\n }\n if (handlerData.error) {\n const hint = {\n data: handlerData.error,\n input: handlerData.args,\n startTimestamp,\n endTimestamp\n };\n const breadcrumb = {\n category: \"fetch\",\n data: handlerData.fetchData,\n level: \"error\",\n type: \"http\"\n };\n client.emit(\"beforeOutgoingRequestBreadcrumb\", breadcrumb, hint);\n addBreadcrumb(breadcrumb, hint);\n } else {\n const response = handlerData.response;\n const data = {\n ...handlerData.fetchData,\n status_code: response?.status\n };\n const hint = {\n input: handlerData.args,\n response,\n startTimestamp,\n endTimestamp\n };\n const breadcrumb = {\n category: \"fetch\",\n data,\n type: \"http\",\n level: getBreadcrumbLogLevelFromHttpStatusCode(data.status_code)\n };\n client.emit(\"beforeOutgoingRequestBreadcrumb\", breadcrumb, hint);\n addBreadcrumb(breadcrumb, hint);\n }\n };\n}\nfunction _getHistoryBreadcrumbHandler(client) {\n return function _historyBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(WINDOW.location.href);\n let parsedFrom = from ? parseUrl(from) : void 0;\n const parsedTo = parseUrl(to);\n if (!parsedFrom?.path) {\n parsedFrom = parsedLoc;\n }\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n addBreadcrumb({\n category: \"navigation\",\n data: {\n from,\n to\n }\n });\n };\n}\nfunction _isEvent(event) {\n return !!event && !!event.target;\n}\n\nexport { breadcrumbsIntegration };\n//# sourceMappingURL=breadcrumbs.js.map\n","import { defineIntegration, fill, getFunctionName, getOriginalFunction } from '@sentry/core/browser';\nimport { WINDOW, wrap } from '../helpers.js';\n\nconst 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\".split(\n \",\"\n);\nconst INTEGRATION_NAME = \"BrowserApiErrors\";\nconst _browserApiErrorsIntegration = ((options = {}) => {\n const _options = {\n XMLHttpRequest: true,\n eventTarget: true,\n requestAnimationFrame: true,\n setInterval: true,\n setTimeout: true,\n unregisterOriginalCallbacks: false,\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() {\n if (_options.setTimeout) {\n fill(WINDOW, \"setTimeout\", _wrapTimeFunction);\n }\n if (_options.setInterval) {\n fill(WINDOW, \"setInterval\", _wrapTimeFunction);\n }\n if (_options.requestAnimationFrame) {\n fill(WINDOW, \"requestAnimationFrame\", _wrapRAF);\n }\n if (_options.XMLHttpRequest && \"XMLHttpRequest\" in WINDOW) {\n fill(XMLHttpRequest.prototype, \"send\", _wrapXHR);\n }\n const eventTargetOption = _options.eventTarget;\n if (eventTargetOption) {\n const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n eventTarget.forEach((target) => _wrapEventTarget(target, _options));\n }\n }\n };\n});\nconst browserApiErrorsIntegration = defineIntegration(_browserApiErrorsIntegration);\nfunction _wrapTimeFunction(original) {\n return function(...args) {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n handled: false,\n type: `auto.browser.browserapierrors.${getFunctionName(original)}`\n }\n });\n return original.apply(this, args);\n };\n}\nfunction _wrapRAF(original) {\n return function(callback) {\n return original.apply(this, [\n wrap(callback, {\n mechanism: {\n data: {\n handler: getFunctionName(original)\n },\n handled: false,\n type: \"auto.browser.browserapierrors.requestAnimationFrame\"\n }\n })\n ]);\n };\n}\nfunction _wrapXHR(originalSend) {\n return function(...args) {\n const xhr = this;\n const xmlHttpRequestProps = [\"onload\", \"onerror\", \"onprogress\", \"onreadystatechange\"];\n xmlHttpRequestProps.forEach((prop) => {\n if (prop in xhr && typeof xhr[prop] === \"function\") {\n fill(xhr, prop, function(original) {\n const wrapOptions = {\n mechanism: {\n data: {\n handler: getFunctionName(original)\n },\n handled: false,\n type: `auto.browser.browserapierrors.xhr.${prop}`\n }\n };\n const originalFunction = getOriginalFunction(original);\n if (originalFunction) {\n wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n }\n return wrap(original, wrapOptions);\n });\n }\n });\n return originalSend.apply(this, args);\n };\n}\nfunction _wrapEventTarget(target, integrationOptions) {\n const globalObject = WINDOW;\n const proto = globalObject[target]?.prototype;\n if (!proto?.hasOwnProperty?.(\"addEventListener\")) {\n return;\n }\n fill(proto, \"addEventListener\", function(original) {\n return function(eventName, fn, options) {\n try {\n if (isEventListenerObject(fn)) {\n fn.handleEvent = wrap(fn.handleEvent, {\n mechanism: {\n data: {\n handler: getFunctionName(fn),\n target\n },\n handled: false,\n type: \"auto.browser.browserapierrors.handleEvent\"\n }\n });\n }\n } catch {\n }\n if (integrationOptions.unregisterOriginalCallbacks) {\n unregisterOriginalCallback(this, eventName, fn);\n }\n return original.apply(this, [\n eventName,\n wrap(fn, {\n mechanism: {\n data: {\n handler: getFunctionName(fn),\n target\n },\n handled: false,\n type: \"auto.browser.browserapierrors.addEventListener\"\n }\n }),\n options\n ]);\n };\n });\n fill(proto, \"removeEventListener\", function(originalRemoveEventListener) {\n return function(eventName, fn, options) {\n try {\n if (Object.prototype.hasOwnProperty.call(fn, \"__sentry_wrapped__\")) {\n const originalEventHandler = fn.__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n }\n } catch {\n }\n return originalRemoveEventListener.call(this, eventName, fn, options);\n };\n });\n}\nfunction isEventListenerObject(obj) {\n return typeof obj.handleEvent === \"function\";\n}\nfunction unregisterOriginalCallback(target, eventName, fn) {\n if (target && typeof target === \"object\" && \"removeEventListener\" in target && typeof target.removeEventListener === \"function\") {\n target.removeEventListener(eventName, fn);\n }\n}\n\nexport { browserApiErrorsIntegration };\n//# sourceMappingURL=browserapierrors.js.map\n","import { defineIntegration, debug, startSession, captureSession, getIsolationScope } from '@sentry/core/browser';\nimport { whenIdleOrHidden, addHistoryInstrumentationHandler } from '@sentry/browser-utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n\nconst browserSessionIntegration = defineIntegration((options = {}) => {\n const lifecycle = options.lifecycle ?? \"route\";\n return {\n name: \"BrowserSession\",\n setupOnce() {\n if (typeof WINDOW.document === \"undefined\") {\n DEBUG_BUILD && debug.warn(\"Using the `browserSessionIntegration` in non-browser environments is not supported.\");\n return;\n }\n startSession({ ignoreDuration: true });\n let initialSessionSent = false;\n whenIdleOrHidden(() => {\n if (!initialSessionSent) {\n captureSession();\n initialSessionSent = true;\n }\n });\n const isolationScope = getIsolationScope();\n let previousUser = isolationScope.getUser();\n isolationScope.addScopeListener((scope) => {\n const maybeNewUser = scope.getUser();\n if (previousUser?.id !== maybeNewUser?.id || previousUser?.ip_address !== maybeNewUser?.ip_address) {\n previousUser = maybeNewUser;\n if (initialSessionSent) {\n captureSession();\n }\n }\n });\n if (lifecycle === \"route\") {\n addHistoryInstrumentationHandler(({ from, to }) => {\n if (from !== to) {\n startSession({ ignoreDuration: true });\n captureSession();\n initialSessionSent = true;\n }\n });\n }\n }\n };\n});\n\nexport { browserSessionIntegration };\n//# sourceMappingURL=browsersession.js.map\n","import { defineIntegration, safeSetSpanJSONAttributes } from '@sentry/core/browser';\nimport { WINDOW } from '../helpers.js';\n\nconst INTEGRATION_NAME = \"CultureContext\";\nconst _cultureContextIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n preprocessEvent(event) {\n const culture = getCultureContext();\n if (culture) {\n event.contexts = {\n ...event.contexts,\n culture: { ...culture, ...event.contexts?.culture }\n };\n }\n },\n processSegmentSpan(span) {\n const culture = getCultureContext();\n if (culture) {\n safeSetSpanJSONAttributes(span, {\n \"culture.locale\": culture.locale,\n \"culture.timezone\": culture.timezone,\n \"culture.calendar\": culture.calendar\n });\n }\n }\n };\n});\nconst cultureContextIntegration = defineIntegration(_cultureContextIntegration);\nfunction getCultureContext() {\n try {\n const intl = WINDOW.Intl;\n if (!intl) {\n return void 0;\n }\n const options = intl.DateTimeFormat().resolvedOptions();\n return {\n locale: options.locale,\n timezone: options.timeZone,\n calendar: options.calendar\n };\n } catch {\n return void 0;\n }\n}\n\nexport { cultureContextIntegration };\n//# sourceMappingURL=culturecontext.js.map\n","import { defineIntegration, addGlobalErrorInstrumentationHandler, getClient, captureEvent, debug, addGlobalUnhandledRejectionInstrumentationHandler, isPrimitive, UNKNOWN_FUNCTION, getLocationHref, isString, stripDataUrlContent } from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { eventFromUnknownInput } from '../eventbuilder.js';\nimport { shouldIgnoreOnError } from '../helpers.js';\n\nconst INTEGRATION_NAME = \"GlobalHandlers\";\nconst _globalHandlersIntegration = ((options = {}) => {\n const _options = {\n onerror: true,\n onunhandledrejection: true,\n ...options\n };\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n Error.stackTraceLimit = 50;\n },\n setup(client) {\n if (_options.onerror) {\n _installGlobalOnErrorHandler(client);\n globalHandlerLog(\"onerror\");\n }\n if (_options.onunhandledrejection) {\n _installGlobalOnUnhandledRejectionHandler(client);\n globalHandlerLog(\"onunhandledrejection\");\n }\n }\n };\n});\nconst globalHandlersIntegration = defineIntegration(_globalHandlersIntegration);\nfunction _installGlobalOnErrorHandler(client) {\n addGlobalErrorInstrumentationHandler((data) => {\n const { stackParser, attachStacktrace } = getOptions();\n if (getClient() !== client || shouldIgnoreOnError()) {\n return;\n }\n const { msg, url, line, column, error } = data;\n const event = _enhanceEventWithInitialFrame(\n eventFromUnknownInput(stackParser, error || msg, void 0, attachStacktrace, false),\n url,\n line,\n column\n );\n event.level = \"error\";\n captureEvent(event, {\n originalException: error,\n mechanism: {\n handled: false,\n type: \"auto.browser.global_handlers.onerror\"\n }\n });\n });\n}\nfunction _installGlobalOnUnhandledRejectionHandler(client) {\n addGlobalUnhandledRejectionInstrumentationHandler((e) => {\n const { stackParser, attachStacktrace } = getOptions();\n if (getClient() !== client || shouldIgnoreOnError()) {\n return;\n }\n const error = _getUnhandledRejectionError(e);\n const event = isPrimitive(error) ? _eventFromRejectionWithPrimitive(error) : eventFromUnknownInput(stackParser, error, void 0, attachStacktrace, true);\n event.level = \"error\";\n captureEvent(event, {\n originalException: error,\n mechanism: {\n handled: false,\n type: \"auto.browser.global_handlers.onunhandledrejection\"\n }\n });\n });\n}\nfunction _getUnhandledRejectionError(error) {\n if (isPrimitive(error)) {\n return error;\n }\n try {\n if (\"reason\" in error) {\n return error.reason;\n }\n if (\"detail\" in error && \"reason\" in error.detail) {\n return error.detail.reason;\n }\n } catch {\n }\n return error;\n}\nfunction _eventFromRejectionWithPrimitive(reason) {\n return {\n exception: {\n values: [\n {\n type: \"UnhandledRejection\",\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: `Non-Error promise rejection captured with value: ${String(reason)}`\n }\n ]\n }\n };\n}\nfunction _enhanceEventWithInitialFrame(event, url, lineno, colno) {\n const e = event.exception = event.exception || {};\n const ev = e.values = e.values || [];\n const ev0 = ev[0] = ev[0] || {};\n const ev0s = ev0.stacktrace = ev0.stacktrace || {};\n const ev0sf = ev0s.frames = ev0s.frames || [];\n if (ev0sf.length === 0) {\n ev0sf.push({\n colno,\n lineno,\n filename: getFilenameFromUrl(url) ?? getLocationHref(),\n function: UNKNOWN_FUNCTION,\n in_app: true\n });\n }\n return event;\n}\nfunction globalHandlerLog(type) {\n DEBUG_BUILD && debug.log(`Global Handler attached: ${type}`);\n}\nfunction getOptions() {\n const client = getClient();\n const options = client?.getOptions() || {\n stackParser: () => [],\n attachStacktrace: false\n };\n return options;\n}\nfunction getFilenameFromUrl(url) {\n if (!isString(url) || url.length === 0) {\n return void 0;\n }\n if (url.startsWith(\"data:\")) {\n return `<${stripDataUrlContent(url, false)}>`;\n }\n return url;\n}\n\nexport { _eventFromRejectionWithPrimitive, _getUnhandledRejectionError, globalHandlersIntegration };\n//# sourceMappingURL=globalhandlers.js.map\n","import { defineIntegration, safeSetSpanJSONAttributes, filterCollectedUrl } from '@sentry/core/browser';\nimport { WINDOW, getHttpRequestData } from '../helpers.js';\nimport { HTTP_REQUEST_HEADER_KEY_BASE, URL_FULL, SENTRY_OP, USER_AGENT_ORIGINAL } from '@sentry/conventions/attributes';\n\nconst httpContextIntegration = defineIntegration(() => {\n return {\n name: \"HttpContext\",\n preprocessEvent(event) {\n if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {\n return;\n }\n const reqData = getHttpRequestData();\n const headers = {\n ...reqData.headers,\n ...event.request?.headers\n };\n event.request = {\n ...reqData,\n ...event.request,\n headers\n };\n },\n processSpan(span) {\n if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {\n return;\n }\n const reqData = getHttpRequestData();\n safeSetSpanJSONAttributes(span, {\n // This attribute is used by the \"Filter out events from legacy browsers and crawlers\" features on the Sentry backend.\n // Therefore, it's set on every span.\n [USER_AGENT_ORIGINAL]: reqData.headers[\"User-Agent\"],\n // These attributes, we only need on the segment span (analogous to the `request` context for events)\n ...span.is_segment && {\n // Coerce empty string to undefined so the helper's nullish check drops it,\n // rather than writing an empty `url.full` attribute onto the span.\n [URL_FULL]: span.attributes?.[SENTRY_OP] !== \"http.client\" ? filterCollectedUrl(reqData.url) : void 0,\n [`${HTTP_REQUEST_HEADER_KEY_BASE}.referer`]: reqData.headers[\"Referer\"]\n }\n });\n }\n };\n});\n\nexport { httpContextIntegration };\n//# sourceMappingURL=httpcontext.js.map\n","import { defineIntegration, applyAggregateErrorsToEvent } from '@sentry/core/browser';\nimport { exceptionFromError } from '../eventbuilder.js';\n\nconst DEFAULT_KEY = \"cause\";\nconst DEFAULT_LIMIT = 5;\nconst INTEGRATION_NAME = \"LinkedErrors\";\nconst _linkedErrorsIntegration = ((options = {}) => {\n const limit = options.limit || DEFAULT_LIMIT;\n const key = options.key || DEFAULT_KEY;\n return {\n name: INTEGRATION_NAME,\n preprocessEvent(event, hint, client) {\n const options2 = client.getOptions();\n applyAggregateErrorsToEvent(\n // This differs from the LinkedErrors integration in core by using a different exceptionFromError function\n exceptionFromError,\n options2.stackParser,\n key,\n limit,\n event,\n hint\n );\n }\n };\n});\nconst linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration);\n\nexport { linkedErrorsIntegration };\n//# sourceMappingURL=linkederrors.js.map\n","import { isElement, htmlTreeAsString } from '@sentry/browser-utils';\n\nconst HTML_ELEMENT_CONSTRUCTOR_NAME_REGEX = /^HTML(\\w*)Element$/;\nfunction normalizeStringifyValue(value) {\n if (typeof window !== \"undefined\" && value === window) {\n return \"[Window]\";\n }\n if (typeof document !== \"undefined\" && value === document) {\n return \"[Document]\";\n }\n if (isElement(value)) {\n const objName = getConstructorName(value);\n if (HTML_ELEMENT_CONSTRUCTOR_NAME_REGEX.test(objName)) {\n return `[HTMLElement: ${htmlTreeAsString(value)}]`;\n }\n }\n return void 0;\n}\nfunction getConstructorName(value) {\n const prototype = Object.getPrototypeOf(value);\n return prototype?.constructor ? prototype.constructor.name : \"null prototype\";\n}\n\nexport { normalizeStringifyValue };\n//# sourceMappingURL=normalizeStringifyValue.js.map\n","import { consoleSandbox, getLocationHref } from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n\nfunction checkAndWarnIfIsEmbeddedBrowserExtension() {\n if (_isEmbeddedBrowserExtension()) {\n if (DEBUG_BUILD) {\n consoleSandbox(() => {\n console.error(\n \"[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/\"\n );\n });\n }\n return true;\n }\n return false;\n}\nfunction _isEmbeddedBrowserExtension() {\n if (typeof WINDOW.window === \"undefined\") {\n return false;\n }\n const _window = WINDOW;\n if (_window.nw) {\n return false;\n }\n const extensionObject = _window[\"chrome\"] || _window[\"browser\"];\n if (!extensionObject?.runtime?.id) {\n return false;\n }\n const href = getLocationHref();\n const isDedicatedExtensionPage = WINDOW === WINDOW.top && /^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\\/\\//.test(href);\n return !isDedicatedExtensionPage;\n}\n\nexport { checkAndWarnIfIsEmbeddedBrowserExtension };\n//# sourceMappingURL=detectBrowserExtension.js.map\n","import { inboundFiltersIntegration, functionToStringIntegration, conversationIdIntegration, dedupeIntegration, getIntegrationsToSetup, stackParserFromStackParserOptions, setNormalizeStringifier, initAndBind } from '@sentry/core/browser';\nimport { BrowserClient } from './client.js';\nimport { breadcrumbsIntegration } from './integrations/breadcrumbs.js';\nimport { browserApiErrorsIntegration } from './integrations/browserapierrors.js';\nimport { browserSessionIntegration } from './integrations/browsersession.js';\nimport { cultureContextIntegration } from './integrations/culturecontext.js';\nimport { globalHandlersIntegration } from './integrations/globalhandlers.js';\nimport { httpContextIntegration } from './integrations/httpcontext.js';\nimport { linkedErrorsIntegration } from './integrations/linkederrors.js';\nimport { defaultStackParser } from './stack-parsers.js';\nimport { makeFetchTransport } from './transports/fetch.js';\nimport { normalizeStringifyValue } from './normalizeStringifyValue.js';\nimport { checkAndWarnIfIsEmbeddedBrowserExtension } from './utils/detectBrowserExtension.js';\n\nfunction getDefaultIntegrations(_options) {\n return [\n // TODO(v11): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`\n // eslint-disable-next-line typescript/no-deprecated\n inboundFiltersIntegration(),\n functionToStringIntegration(),\n conversationIdIntegration(),\n browserApiErrorsIntegration(),\n breadcrumbsIntegration(),\n globalHandlersIntegration(),\n linkedErrorsIntegration(),\n dedupeIntegration(),\n httpContextIntegration(),\n cultureContextIntegration(),\n browserSessionIntegration()\n ];\n}\nfunction init(options = {}) {\n const shouldDisableBecauseIsBrowserExtenstion = !options.skipBrowserExtensionCheck && checkAndWarnIfIsEmbeddedBrowserExtension();\n let defaultIntegrations = options.defaultIntegrations == null ? getDefaultIntegrations() : options.defaultIntegrations;\n const clientOptions = {\n ...options,\n enabled: shouldDisableBecauseIsBrowserExtenstion ? false : options.enabled,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup({\n integrations: options.integrations,\n defaultIntegrations\n }),\n transport: options.transport || makeFetchTransport\n };\n setNormalizeStringifier(normalizeStringifyValue);\n return initAndBind(BrowserClient, clientOptions);\n}\nfunction forceLoad() {\n}\nfunction onLoad(callback) {\n callback();\n}\n\nexport { forceLoad, getDefaultIntegrations, init, onLoad };\n//# sourceMappingURL=sdk.js.map\n","import { GLOBAL_OBJ, normalize, isObjectLike, fill, browserPerformanceTimeOrigin, debug as debug$1, severityLevelFromString, captureException, addBreadcrumb, uuid4, getClient, getLocationHref, getCurrentScope, getActiveSpan, getDynamicSamplingContextFromSpan, isSentryRequestUrl, stringMatchesSomePattern, addEventProcessor, debounce as debounce$1, createEnvelope, createEventEnvelopeHeaders, getSdkMetadataForEnvelopeHeader, prepareEvent, getIsolationScope, updateRateLimits, isRateLimited, setContext, getRootSpan, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, isBrowser, safeSetSpanJSONAttributes, parseSampleRate, consoleSandbox } from '@sentry/core';\nimport { setTimeout as setTimeout$3, htmlTreeAsString, addPerformanceInstrumentationHandler, addLcpInstrumentationHandler, addClsInstrumentationHandler, addInpInstrumentationHandler, serializeFormData, getFetchRequestArgBody, getBodyString, SENTRY_XHR_DATA_KEY, parseXhrResponseHeaders, addClickKeypressInstrumentationHandler, addHistoryInstrumentationHandler } from '@sentry/browser-utils';\n\nconst WINDOW = GLOBAL_OBJ;\nconst REPLAY_SESSION_KEY = \"sentryReplaySession\";\nconst REPLAY_EVENT_NAME = \"replay_event\";\nconst UNABLE_TO_SEND_REPLAY = \"Unable to send Replay\";\nconst SESSION_IDLE_PAUSE_DURATION = 3e5;\nconst SESSION_IDLE_EXPIRE_DURATION = 9e5;\nconst DEFAULT_FLUSH_MIN_DELAY = 5e3;\nconst DEFAULT_FLUSH_MAX_DELAY = 5500;\nconst BUFFER_CHECKOUT_TIME = 6e4;\nconst RETRY_BASE_INTERVAL = 5e3;\nconst RETRY_MAX_COUNT = 3;\nconst NETWORK_BODY_MAX_SIZE = 15e4;\nconst CONSOLE_ARG_MAX_SIZE = 5e3;\nconst SLOW_CLICK_THRESHOLD = 3e3;\nconst SLOW_CLICK_SCROLL_TIMEOUT = 300;\nconst REPLAY_MAX_EVENT_BUFFER_SIZE = 2e7;\nconst MIN_REPLAY_DURATION = 4999;\nconst MIN_REPLAY_DURATION_LIMIT = 5e4;\nconst MAX_REPLAY_DURATION = 36e5;\n\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar NodeType$1 = /* @__PURE__ */ ((NodeType2) => {\n NodeType2[NodeType2[\"Document\"] = 0] = \"Document\";\n NodeType2[NodeType2[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType2[NodeType2[\"Element\"] = 2] = \"Element\";\n NodeType2[NodeType2[\"Text\"] = 3] = \"Text\";\n NodeType2[NodeType2[\"CDATA\"] = 4] = \"CDATA\";\n NodeType2[NodeType2[\"Comment\"] = 5] = \"Comment\";\n return NodeType2;\n})(NodeType$1 || {});\nfunction isElement$1(n) {\n return n.nodeType === n.ELEMENT_NODE;\n}\nfunction isShadowRoot(n) {\n const host = n?.host;\n return Boolean(host?.shadowRoot === n);\n}\nfunction isNativeShadowDom(shadowRoot) {\n return Object.prototype.toString.call(shadowRoot) === \"[object ShadowRoot]\";\n}\nfunction fixBrowserCompatibilityIssuesInCSS(cssText) {\n if (cssText.includes(\" background-clip: text;\") && !cssText.includes(\" -webkit-background-clip: text;\")) {\n cssText = cssText.replace(\n /\\sbackground-clip:\\s*text;/g,\n \" -webkit-background-clip: text; background-clip: text;\"\n );\n }\n return cssText;\n}\nfunction escapeImportStatement(rule) {\n const { cssText } = rule;\n if (cssText.split('\"').length < 3) return cssText;\n const statement = [\"@import\", `url(${JSON.stringify(rule.href)})`];\n if (rule.layerName === \"\") {\n statement.push(`layer`);\n } else if (rule.layerName) {\n statement.push(`layer(${rule.layerName})`);\n }\n if (rule.supportsText) {\n statement.push(`supports(${rule.supportsText})`);\n }\n if (rule.media.length) {\n statement.push(rule.media.mediaText);\n }\n return statement.join(\" \") + \";\";\n}\nfunction stringifyStylesheet(s) {\n try {\n const rules = s.rules || s.cssRules;\n return rules ? fixBrowserCompatibilityIssuesInCSS(\n Array.from(rules, stringifyRule).join(\"\")\n ) : null;\n } catch (error) {\n return null;\n }\n}\nfunction fixAllCssProperty(rule) {\n let styles = \"\";\n for (let i2 = 0; i2 < rule.style.length; i2++) {\n const styleDeclaration = rule.style;\n const attribute = styleDeclaration[i2];\n const isImportant = styleDeclaration.getPropertyPriority(attribute);\n styles += `${attribute}:${styleDeclaration.getPropertyValue(attribute)}${isImportant ? ` !important` : \"\"};`;\n }\n return `${rule.selectorText} { ${styles} }`;\n}\nfunction stringifyRule(rule) {\n let importStringified;\n if (isCSSImportRule(rule)) {\n try {\n importStringified = // for same-origin stylesheets,\n // we can access the imported stylesheet rules directly\n stringifyStylesheet(rule.styleSheet) || // work around browser issues with the raw string `@import url(...)` statement\n escapeImportStatement(rule);\n } catch (error) {\n }\n } else if (isCSSStyleRule(rule)) {\n let cssText = rule.cssText;\n const needsSafariColonFix = rule.selectorText.includes(\":\");\n const needsAllFix = typeof rule.style[\"all\"] === \"string\" && rule.style[\"all\"];\n if (needsAllFix) {\n cssText = fixAllCssProperty(rule);\n }\n if (needsSafariColonFix) {\n cssText = fixSafariColons(cssText);\n }\n if (needsSafariColonFix || needsAllFix) {\n return cssText;\n }\n }\n return importStringified || rule.cssText;\n}\nfunction fixSafariColons(cssStringified) {\n const regex = /(\\[(?:[\\w-]+)[^\\\\])(:(?:[\\w-]+)\\])/gm;\n return cssStringified.replace(regex, \"$1\\\\$2\");\n}\nfunction isCSSImportRule(rule) {\n return \"styleSheet\" in rule;\n}\nfunction isCSSStyleRule(rule) {\n return \"selectorText\" in rule;\n}\nclass Mirror {\n constructor() {\n __publicField(this, \"idNodeMap\", /* @__PURE__ */ new Map());\n __publicField(this, \"nodeMetaMap\", /* @__PURE__ */ new WeakMap());\n }\n getId(n) {\n if (!n) return -1;\n const id = this.getMeta(n)?.id;\n return id ?? -1;\n }\n getNode(id) {\n return this.idNodeMap.get(id) || null;\n }\n getIds() {\n return Array.from(this.idNodeMap.keys());\n }\n getMeta(n) {\n return this.nodeMetaMap.get(n) || null;\n }\n // removes the node from idNodeMap\n // doesn't remove the node from nodeMetaMap\n removeNodeFromMap(n) {\n const id = this.getId(n);\n this.idNodeMap.delete(id);\n if (n.childNodes) {\n n.childNodes.forEach(\n (childNode) => this.removeNodeFromMap(childNode)\n );\n }\n if (isElement$1(n) && n.shadowRoot) {\n this.removeNodeFromMap(n.shadowRoot);\n }\n }\n has(id) {\n return this.idNodeMap.has(id);\n }\n hasNode(node) {\n return this.nodeMetaMap.has(node);\n }\n add(n, meta) {\n const id = meta.id;\n this.idNodeMap.set(id, n);\n this.nodeMetaMap.set(n, meta);\n }\n replace(id, n) {\n const oldNode = this.getNode(id);\n if (oldNode) {\n const meta = this.nodeMetaMap.get(oldNode);\n if (meta) this.nodeMetaMap.set(n, meta);\n }\n this.idNodeMap.set(id, n);\n }\n reset() {\n this.idNodeMap = /* @__PURE__ */ new Map();\n this.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n }\n}\nfunction createMirror() {\n return new Mirror();\n}\nfunction shouldMaskInput({\n maskInputOptions,\n tagName,\n type\n}) {\n if (tagName === \"OPTION\") {\n tagName = \"SELECT\";\n }\n return Boolean(\n maskInputOptions[tagName.toLowerCase()] || type && maskInputOptions[type] || type === \"password\" || // Default to \"text\" option for inputs without a \"type\" attribute defined\n tagName === \"INPUT\" && !type && maskInputOptions[\"text\"]\n );\n}\nfunction maskInputValue({\n isMasked,\n element,\n value,\n maskInputFn\n}) {\n let text = value || \"\";\n if (!isMasked) {\n return text;\n }\n if (maskInputFn) {\n text = maskInputFn(text, element);\n }\n return \"*\".repeat(text.length);\n}\nfunction toLowerCase(str) {\n return str.toLowerCase();\n}\nfunction toUpperCase(str) {\n return str.toUpperCase();\n}\nconst ORIGINAL_ATTRIBUTE_NAME = \"__rrweb_original__\";\nfunction is2DCanvasBlank(canvas) {\n const ctx = canvas.getContext(\"2d\");\n if (!ctx) return true;\n const chunkSize = 50;\n for (let x = 0; x < canvas.width; x += chunkSize) {\n for (let y = 0; y < canvas.height; y += chunkSize) {\n const getImageData = ctx.getImageData;\n const originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData ? getImageData[ORIGINAL_ATTRIBUTE_NAME] : getImageData;\n const pixelBuffer = new Uint32Array(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access\n originalGetImageData.call(\n ctx,\n x,\n y,\n Math.min(chunkSize, canvas.width - x),\n Math.min(chunkSize, canvas.height - y)\n ).data.buffer\n );\n if (pixelBuffer.some((pixel) => pixel !== 0)) return false;\n }\n }\n return true;\n}\nfunction getInputType(element) {\n const type = element.type;\n return element.hasAttribute(\"data-rr-is-password\") ? \"password\" : type ? (\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n toLowerCase(type)\n ) : null;\n}\nfunction getInputValue(el, tagName, type) {\n if (tagName === \"INPUT\" && (type === \"radio\" || type === \"checkbox\")) {\n return el.getAttribute(\"value\") || \"\";\n }\n return el.value;\n}\nfunction extractFileExtension(path, baseURL) {\n let url;\n try {\n url = new URL(path, baseURL ?? window.location.href);\n } catch (err) {\n return null;\n }\n const regex = /\\.([0-9a-z]+)(?:$)/i;\n const match = url.pathname.match(regex);\n return match?.[1] ?? null;\n}\nconst cachedImplementations$1 = {};\nfunction getImplementation$1(name) {\n const cached = cachedImplementations$1[name];\n if (cached) {\n return cached;\n }\n const windowImpl = window[name].bind(window);\n let impl = windowImpl;\n const document2 = window.document;\n if (document2 && typeof document2.createElement === \"function\") {\n try {\n const sandbox = document2.createElement(\"iframe\");\n sandbox.hidden = true;\n document2.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow[name]) {\n const sandboxImpl = contentWindow[name].bind(window);\n impl = (...args) => {\n try {\n return sandboxImpl(...args);\n } catch {\n cachedImplementations$1[name] = windowImpl;\n return windowImpl(...args);\n }\n };\n }\n document2.head.removeChild(sandbox);\n } catch (e) {\n }\n }\n return cachedImplementations$1[name] = impl;\n}\nfunction setTimeout$1(...rest) {\n return getImplementation$1(\"setTimeout\")(...rest);\n}\nfunction clearTimeout$1(...rest) {\n return getImplementation$1(\"clearTimeout\")(...rest);\n}\nfunction getIFrameContentDocument$1(iframe) {\n try {\n return iframe.contentDocument;\n } catch {\n }\n}\nfunction getIFrameContentWindow$1(iframe) {\n try {\n return iframe.contentWindow;\n } catch {\n }\n}\nlet _id = 1;\nconst tagNameRegex = new RegExp(\"[^a-z0-9-_:]\");\nconst IGNORED_NODE = -2;\nfunction genId() {\n return _id++;\n}\nfunction getValidTagName(element) {\n if (element instanceof HTMLFormElement) {\n return \"form\";\n }\n const processedTagName = toLowerCase(element.tagName);\n if (tagNameRegex.test(processedTagName)) {\n return \"div\";\n }\n return processedTagName;\n}\nfunction extractOrigin(url) {\n let origin = \"\";\n if (url.indexOf(\"//\") > -1) {\n origin = url.split(\"/\").slice(0, 3).join(\"/\");\n } else {\n origin = url.split(\"/\")[0];\n }\n origin = origin.split(\"?\")[0];\n return origin;\n}\nlet canvasService;\nlet canvasCtx;\nconst URL_IN_CSS_REF = /url\\((?:(')([^']*)'|(\")(.*?)\"|([^)]*))\\)/gm;\nconst URL_PROTOCOL_MATCH = /^(?:[a-z+]+:)?\\/\\//i;\nconst URL_WWW_MATCH = /^www\\..*/i;\nconst DATA_URI = /^(data:)([^,]*),(.*)/i;\nfunction filterCSSPropertiesFromInlineStyle(cssText, ignoredProperties) {\n if (!cssText || ignoredProperties.size === 0) {\n return cssText;\n }\n try {\n const properties = cssText.split(\";\");\n const filteredProperties = [];\n for (let property of properties) {\n property = property.trim();\n if (!property) continue;\n const colonIndex = property.indexOf(\":\");\n if (colonIndex === -1) {\n filteredProperties.push(property);\n continue;\n }\n const propertyName = property.slice(0, colonIndex).trim();\n if (!ignoredProperties.has(propertyName)) {\n filteredProperties.push(property);\n }\n }\n return filteredProperties.join(\"; \") + (filteredProperties.length > 0 && cssText.endsWith(\";\") ? \";\" : \"\");\n } catch (error) {\n console.warn(\"Error filtering CSS properties:\", error);\n return cssText;\n }\n}\nfunction absoluteToStylesheet(cssText, href) {\n return (cssText || \"\").replace(\n URL_IN_CSS_REF,\n (origin, quote1, path1, quote2, path2, path3) => {\n const filePath = path1 || path2 || path3;\n const maybeQuote = quote1 || quote2 || \"\";\n if (!filePath) {\n return origin;\n }\n if (URL_PROTOCOL_MATCH.test(filePath) || URL_WWW_MATCH.test(filePath)) {\n return `url(${maybeQuote}${filePath}${maybeQuote})`;\n }\n if (DATA_URI.test(filePath)) {\n return `url(${maybeQuote}${filePath}${maybeQuote})`;\n }\n if (filePath[0] === \"/\") {\n return `url(${maybeQuote}${extractOrigin(href) + filePath}${maybeQuote})`;\n }\n const stack = href.split(\"/\");\n const parts = filePath.split(\"/\");\n stack.pop();\n for (const part of parts) {\n if (part === \".\") {\n continue;\n } else if (part === \"..\") {\n stack.pop();\n } else {\n stack.push(part);\n }\n }\n return `url(${maybeQuote}${stack.join(\"/\")}${maybeQuote})`;\n }\n );\n}\nconst SRCSET_NOT_SPACES = /^[^ \\t\\n\\r\\u000c]+/;\nconst SRCSET_COMMAS_OR_SPACES = /^[, \\t\\n\\r\\u000c]+/;\nfunction getAbsoluteSrcsetString(doc, attributeValue) {\n if (attributeValue.trim() === \"\") {\n return attributeValue;\n }\n let pos = 0;\n function collectCharacters(regEx) {\n let chars2;\n const match = regEx.exec(attributeValue.substring(pos));\n if (match) {\n chars2 = match[0];\n pos += chars2.length;\n return chars2;\n }\n return \"\";\n }\n const output = [];\n while (true) {\n collectCharacters(SRCSET_COMMAS_OR_SPACES);\n if (pos >= attributeValue.length) {\n break;\n }\n let url = collectCharacters(SRCSET_NOT_SPACES);\n if (url.slice(-1) === \",\") {\n url = absoluteToDoc(doc, url.substring(0, url.length - 1));\n output.push(url);\n } else {\n let descriptorsStr = \"\";\n url = absoluteToDoc(doc, url);\n let inParens = false;\n while (true) {\n const c = attributeValue.charAt(pos);\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 descriptorsStr += c;\n pos += 1;\n }\n }\n }\n return output.join(\", \");\n}\nconst cachedDocument = /* @__PURE__ */ new WeakMap();\nfunction absoluteToDoc(doc, attributeValue) {\n if (!attributeValue || attributeValue.trim() === \"\") {\n return attributeValue;\n }\n return getHref(doc, attributeValue);\n}\nfunction isSVGElement(el) {\n return Boolean(el.tagName === \"svg\" || el.ownerSVGElement);\n}\nfunction getHref(doc, customHref) {\n let a = cachedDocument.get(doc);\n if (!a) {\n a = doc.createElement(\"a\");\n cachedDocument.set(doc, a);\n }\n if (!customHref) {\n customHref = \"\";\n } else if (customHref.startsWith(\"blob:\") || customHref.startsWith(\"data:\")) {\n return customHref;\n }\n a.setAttribute(\"href\", customHref);\n return a.href;\n}\nfunction transformAttribute(doc, tagName, name, value, element, maskAttributeFn, ignoreCSSAttributes) {\n if (!value) {\n return value;\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 let processedStyle = absoluteToStylesheet(value, getHref(doc));\n if (ignoreCSSAttributes && ignoreCSSAttributes.size > 0) {\n processedStyle = filterCSSPropertiesFromInlineStyle(\n processedStyle,\n ignoreCSSAttributes\n );\n }\n return processedStyle;\n } else if (tagName === \"object\" && name === \"data\") {\n return absoluteToDoc(doc, value);\n }\n if (typeof maskAttributeFn === \"function\") {\n return maskAttributeFn(name, value, element);\n }\n return value;\n}\nfunction ignoreAttribute(tagName, name, _value) {\n return (tagName === \"video\" || tagName === \"audio\") && name === \"autoplay\";\n}\nfunction _isBlockedElement(element, blockClass, blockSelector, unblockSelector) {\n try {\n if (unblockSelector && element.matches(unblockSelector)) {\n return false;\n }\n if (typeof blockClass === \"string\") {\n if (element.classList.contains(blockClass)) {\n return true;\n }\n } else {\n for (let eIndex = element.classList.length; eIndex--; ) {\n const className = element.classList[eIndex];\n if (blockClass.test(className)) {\n return true;\n }\n }\n }\n if (blockSelector) {\n return element.matches(blockSelector);\n }\n } catch (e) {\n }\n return false;\n}\nfunction elementClassMatchesRegex(el, regex) {\n for (let eIndex = el.classList.length; eIndex--; ) {\n const className = el.classList[eIndex];\n if (regex.test(className)) {\n return true;\n }\n }\n return false;\n}\nfunction distanceToMatch(node, matchPredicate, limit = Infinity, distance = 0) {\n if (!node) return -1;\n if (isShadowRoot(node)) {\n return distanceToMatch(node.host, matchPredicate, limit, distance + 1);\n }\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}\nfunction createMatchPredicate(className, selector) {\n return (node) => {\n const el = node;\n if (el === null) return false;\n try {\n if (className) {\n if (typeof className === \"string\") {\n if (el.matches(`.${className}`)) return true;\n } else if (elementClassMatchesRegex(el, className)) {\n return true;\n }\n }\n if (selector && el.matches(selector)) return true;\n return false;\n } catch {\n return false;\n }\n };\n}\nfunction needMaskingText(node, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, maskAllText) {\n try {\n const el = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;\n if (el === null) return false;\n if (el.tagName === \"INPUT\") {\n const autocomplete = el.getAttribute(\"autocomplete\");\n const disallowedAutocompleteValues = [\n \"current-password\",\n \"new-password\",\n \"cc-number\",\n \"cc-exp\",\n \"cc-exp-month\",\n \"cc-exp-year\",\n \"cc-csc\"\n ];\n if (disallowedAutocompleteValues.includes(autocomplete)) {\n return true;\n }\n }\n let maskDistance = -1;\n let unmaskDistance = -1;\n if (maskAllText) {\n unmaskDistance = distanceToMatch(\n el,\n createMatchPredicate(unmaskTextClass, unmaskTextSelector)\n );\n if (unmaskDistance < 0) {\n return true;\n }\n maskDistance = distanceToMatch(\n el,\n createMatchPredicate(maskTextClass, maskTextSelector),\n unmaskDistance >= 0 ? unmaskDistance : Infinity\n );\n } else {\n maskDistance = distanceToMatch(\n el,\n createMatchPredicate(maskTextClass, maskTextSelector)\n );\n if (maskDistance < 0) {\n return false;\n }\n unmaskDistance = distanceToMatch(\n el,\n createMatchPredicate(unmaskTextClass, unmaskTextSelector),\n 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}\nfunction onceIframeLoaded(iframeEl, listener, iframeLoadTimeout) {\n const win = getIFrameContentWindow$1(iframeEl);\n if (!win) {\n return;\n }\n let fired = false;\n let readyState;\n try {\n readyState = win.document.readyState;\n } catch (error) {\n return;\n }\n if (readyState !== \"complete\") {\n const timer = setTimeout$1(() => {\n if (!fired) {\n listener();\n fired = true;\n }\n }, iframeLoadTimeout);\n iframeEl.addEventListener(\"load\", () => {\n clearTimeout$1(timer);\n fired = true;\n listener();\n });\n return;\n }\n const blankUrl = \"about:blank\";\n if (win.location.href !== blankUrl || iframeEl.src === blankUrl || iframeEl.src === \"\") {\n setTimeout$1(listener, 0);\n return iframeEl.addEventListener(\"load\", listener);\n }\n iframeEl.addEventListener(\"load\", listener);\n}\nfunction onceStylesheetLoaded(link, listener, styleSheetLoadTimeout) {\n let fired = false;\n let styleSheetLoaded;\n try {\n styleSheetLoaded = link.sheet;\n } catch (error) {\n styleSheetLoaded = null;\n }\n if (styleSheetLoaded) return;\n const timer = setTimeout$1(() => {\n if (!fired) {\n listener();\n fired = true;\n }\n }, styleSheetLoadTimeout);\n link.addEventListener(\"load\", () => {\n clearTimeout$1(timer);\n fired = true;\n listener();\n });\n}\nfunction serializeNode(n, options) {\n const {\n doc,\n mirror,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskAttributeFn,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n inlineStylesheet,\n maskInputOptions = {},\n maskTextFn,\n maskInputFn,\n dataURLOptions = {},\n inlineImages,\n recordCanvas,\n keepIframeSrcFn,\n newlyAddedElement = false,\n ignoreCSSAttributes\n } = options;\n const rootId = getRootId(doc, mirror);\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 // probably \"BackCompat\"\n };\n } else {\n return {\n type: NodeType$1.Document,\n childNodes: []\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\n };\n case n.ELEMENT_NODE:\n return serializeElementNode(n, {\n doc,\n blockClass,\n blockSelector,\n unblockSelector,\n inlineStylesheet,\n maskAttributeFn,\n maskInputOptions,\n maskInputFn,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n keepIframeSrcFn,\n newlyAddedElement,\n rootId,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n ignoreCSSAttributes\n });\n case n.TEXT_NODE:\n return serializeTextNode(n, {\n doc,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n maskTextFn,\n maskInputOptions,\n maskInputFn,\n rootId\n });\n case n.CDATA_SECTION_NODE:\n return {\n type: NodeType$1.CDATA,\n textContent: \"\",\n rootId\n };\n case n.COMMENT_NODE:\n return {\n type: NodeType$1.Comment,\n textContent: n.textContent || \"\",\n rootId\n };\n default:\n return false;\n }\n}\nfunction getRootId(doc, mirror) {\n if (!mirror.hasNode(doc)) return void 0;\n const docId = mirror.getId(doc);\n return docId === 1 ? void 0 : docId;\n}\nfunction serializeTextNode(n, options) {\n const {\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n maskTextFn,\n maskInputOptions,\n maskInputFn,\n rootId\n } = options;\n const parentTagName = n.parentNode && n.parentNode.tagName;\n let textContent = n.textContent;\n const isStyle = parentTagName === \"STYLE\" ? true : void 0;\n const isScript = parentTagName === \"SCRIPT\" ? true : void 0;\n const isTextarea = parentTagName === \"TEXTAREA\" ? true : void 0;\n if (isStyle && textContent) {\n try {\n if (n.nextSibling || n.previousSibling) {\n } else if (n.parentNode.sheet?.cssRules) {\n textContent = stringifyStylesheet(\n n.parentNode.sheet\n );\n }\n } catch (err) {\n console.warn(\n `Cannot get CSS styles from text's parentNode. Error: ${err}`,\n n\n );\n }\n textContent = absoluteToStylesheet(textContent, getHref(options.doc));\n }\n if (isScript) {\n textContent = \"SCRIPT_PLACEHOLDER\";\n }\n const forceMask = needMaskingText(\n n,\n maskTextClass,\n maskTextSelector,\n unmaskTextClass,\n unmaskTextSelector,\n maskAllText\n );\n if (!isStyle && !isScript && !isTextarea && textContent && forceMask) {\n textContent = maskTextFn ? maskTextFn(textContent, n.parentElement) : textContent.replace(/[\\S]/g, \"*\");\n }\n if (isTextarea && textContent && (maskInputOptions.textarea || forceMask)) {\n textContent = maskInputFn ? maskInputFn(textContent, n.parentNode) : textContent.replace(/[\\S]/g, \"*\");\n }\n if (parentTagName === \"OPTION\" && textContent) {\n const isInputMasked = shouldMaskInput({\n type: null,\n tagName: parentTagName,\n maskInputOptions\n });\n textContent = maskInputValue({\n isMasked: needMaskingText(\n n,\n maskTextClass,\n maskTextSelector,\n unmaskTextClass,\n unmaskTextSelector,\n isInputMasked\n ),\n element: n,\n value: textContent,\n maskInputFn\n });\n }\n return {\n type: NodeType$1.Text,\n textContent: textContent || \"\",\n isStyle,\n rootId\n };\n}\nfunction serializeElementNode(n, options) {\n const {\n doc,\n blockClass,\n blockSelector,\n unblockSelector,\n inlineStylesheet,\n maskInputOptions = {},\n maskAttributeFn,\n maskInputFn,\n dataURLOptions = {},\n inlineImages,\n recordCanvas,\n keepIframeSrcFn,\n newlyAddedElement = false,\n rootId,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n ignoreCSSAttributes\n } = options;\n const needBlock = _isBlockedElement(\n n,\n blockClass,\n blockSelector,\n unblockSelector\n );\n const tagName = getValidTagName(n);\n let attributes2 = {};\n const len = n.attributes.length;\n for (let i2 = 0; i2 < len; i2++) {\n const attr = n.attributes[i2];\n if (attr.name && !ignoreAttribute(tagName, attr.name, attr.value)) {\n attributes2[attr.name] = transformAttribute(\n doc,\n tagName,\n toLowerCase(attr.name),\n attr.value,\n n,\n maskAttributeFn,\n ignoreCSSAttributes\n );\n }\n }\n if (tagName === \"link\" && inlineStylesheet) {\n const stylesheet = Array.from(doc.styleSheets).find((s) => {\n return s.href === n.href;\n });\n let cssText = null;\n if (stylesheet) {\n cssText = stringifyStylesheet(stylesheet);\n }\n if (cssText) {\n attributes2.rel = null;\n attributes2.href = null;\n attributes2.crossorigin = null;\n attributes2._cssText = absoluteToStylesheet(cssText, stylesheet.href);\n }\n }\n if (tagName === \"style\" && n.sheet && // TODO: Currently we only try to get dynamic stylesheet when it is an empty style element\n !(n.innerText || n.textContent || \"\").trim().length) {\n const cssText = stringifyStylesheet(\n n.sheet\n );\n if (cssText) {\n attributes2._cssText = absoluteToStylesheet(cssText, getHref(doc));\n }\n }\n if (tagName === \"input\" || tagName === \"textarea\" || tagName === \"select\" || tagName === \"option\") {\n const el = n;\n const type = getInputType(el);\n const value = getInputValue(el, toUpperCase(tagName), type);\n const checked = el.checked;\n if (type !== \"submit\" && type !== \"button\" && value) {\n const forceMask = needMaskingText(\n el,\n maskTextClass,\n maskTextSelector,\n unmaskTextClass,\n unmaskTextSelector,\n shouldMaskInput({\n type,\n tagName: toUpperCase(tagName),\n maskInputOptions\n })\n );\n attributes2.value = maskInputValue({\n isMasked: forceMask,\n element: el,\n value,\n maskInputFn\n });\n }\n if (checked) {\n attributes2.checked = checked;\n }\n }\n if (tagName === \"option\") {\n if (n.selected && !maskInputOptions[\"select\"]) {\n attributes2.selected = true;\n } else {\n delete attributes2.selected;\n }\n }\n if (tagName === \"canvas\" && recordCanvas) {\n if (n.__context === \"2d\") {\n if (!is2DCanvasBlank(n)) {\n attributes2.rr_dataURL = n.toDataURL(\n dataURLOptions.type,\n dataURLOptions.quality\n );\n }\n } else if (!(\"__context\" in n)) {\n const canvasDataURL = n.toDataURL(\n dataURLOptions.type,\n dataURLOptions.quality\n );\n const blankCanvas = doc.createElement(\"canvas\");\n blankCanvas.width = n.width;\n blankCanvas.height = n.height;\n const blankCanvasDataURL = blankCanvas.toDataURL(\n dataURLOptions.type,\n dataURLOptions.quality\n );\n if (canvasDataURL !== blankCanvasDataURL) {\n attributes2.rr_dataURL = canvasDataURL;\n }\n }\n }\n if (tagName === \"img\" && inlineImages) {\n if (!canvasService) {\n canvasService = doc.createElement(\"canvas\");\n canvasCtx = canvasService.getContext(\"2d\");\n }\n const image = n;\n const imageSrc = image.currentSrc || image.getAttribute(\"src\") || \"\";\n const priorCrossOrigin = image.crossOrigin;\n const recordInlineImage = () => {\n image.removeEventListener(\"load\", recordInlineImage);\n try {\n canvasService.width = image.naturalWidth;\n canvasService.height = image.naturalHeight;\n canvasCtx.drawImage(image, 0, 0);\n attributes2.rr_dataURL = canvasService.toDataURL(\n dataURLOptions.type,\n dataURLOptions.quality\n );\n } catch (err) {\n if (image.crossOrigin !== \"anonymous\") {\n image.crossOrigin = \"anonymous\";\n if (image.complete && image.naturalWidth !== 0)\n recordInlineImage();\n else image.addEventListener(\"load\", recordInlineImage);\n return;\n } else {\n console.warn(\n `Cannot inline img src=${imageSrc}! Error: ${err}`\n );\n }\n }\n if (image.crossOrigin === \"anonymous\") {\n priorCrossOrigin ? attributes2.crossOrigin = priorCrossOrigin : image.removeAttribute(\"crossorigin\");\n }\n };\n if (image.complete && image.naturalWidth !== 0) recordInlineImage();\n else image.addEventListener(\"load\", recordInlineImage);\n }\n if (tagName === \"audio\" || tagName === \"video\") {\n attributes2.rr_mediaState = n.paused ? \"paused\" : \"played\";\n attributes2.rr_mediaCurrentTime = n.currentTime;\n }\n if (!newlyAddedElement) {\n if (n.scrollLeft) {\n attributes2.rr_scrollLeft = n.scrollLeft;\n }\n if (n.scrollTop) {\n attributes2.rr_scrollTop = n.scrollTop;\n }\n }\n if (needBlock) {\n const { width, height } = n.getBoundingClientRect();\n attributes2 = {\n class: attributes2.class,\n rr_width: `${width}px`,\n rr_height: `${height}px`\n };\n }\n if (tagName === \"iframe\" && !keepIframeSrcFn(attributes2.src)) {\n if (!needBlock && !getIFrameContentDocument$1(n)) {\n attributes2.rr_src = attributes2.src;\n }\n delete attributes2.src;\n }\n let isCustomElement;\n try {\n if (customElements.get(tagName)) isCustomElement = true;\n } catch (e) {\n }\n return {\n type: NodeType$1.Element,\n tagName,\n attributes: attributes2,\n childNodes: [],\n isSVG: isSVGElement(n) || void 0,\n needBlock,\n rootId,\n isCustom: isCustomElement\n };\n}\nfunction lowerIfExists(maybeAttr) {\n if (maybeAttr === void 0 || maybeAttr === null) {\n return \"\";\n } else {\n return maybeAttr.toLowerCase();\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 && // script tag\n (sn.tagName === \"script\" || // (module)preload link\n sn.tagName === \"link\" && (sn.attributes.rel === \"preload\" || sn.attributes.rel === \"modulepreload\") || // prefetch link\n sn.tagName === \"link\" && sn.attributes.rel === \"prefetch\" && typeof sn.attributes.href === \"string\" && extractFileExtension(sn.attributes.href) === \"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(\n /^msapplication-tile(image|color)$/\n ) || 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):/) || // og = opengraph (facebook)\n 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\"] !== void 0) {\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 return false;\n}\nfunction serializeNodeWithId(n, options) {\n const {\n doc,\n mirror,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n skipChild = false,\n inlineStylesheet = true,\n maskInputOptions = {},\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions = {},\n inlineImages = false,\n recordCanvas = false,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout = 5e3,\n onBlockedImageLoad,\n onStylesheetLoad,\n stylesheetLoadTimeout = 5e3,\n keepIframeSrcFn = () => false,\n newlyAddedElement = false,\n ignoreCSSAttributes\n } = options;\n let { preserveWhiteSpace = true } = options;\n const _serializedNode = serializeNode(n, {\n doc,\n mirror,\n blockClass,\n blockSelector,\n maskAllText,\n unblockSelector,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n keepIframeSrcFn,\n newlyAddedElement,\n ignoreCSSAttributes\n });\n if (!_serializedNode) {\n console.warn(n, \"not serialized\");\n return null;\n }\n let id;\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.trim().length) {\n id = IGNORED_NODE;\n } else {\n id = genId();\n }\n const serializedNode2 = Object.assign(_serializedNode, { id });\n mirror.add(n, serializedNode2);\n if (id === IGNORED_NODE) {\n return null;\n }\n if (onSerialize) {\n onSerialize(n);\n }\n let recordChild = !skipChild;\n if (serializedNode2.type === NodeType$1.Element) {\n recordChild = recordChild && !serializedNode2.needBlock;\n const shadowRoot = n.shadowRoot;\n if (shadowRoot && isNativeShadowDom(shadowRoot))\n serializedNode2.isShadowHost = true;\n }\n if ((serializedNode2.type === NodeType$1.Document || serializedNode2.type === NodeType$1.Element) && recordChild) {\n if (slimDOMOptions.headWhitespace && serializedNode2.type === NodeType$1.Element && serializedNode2.tagName === \"head\") {\n preserveWhiteSpace = false;\n }\n const bypassOptions = {\n doc,\n mirror,\n blockClass,\n blockSelector,\n maskAllText,\n unblockSelector,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n skipChild,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onBlockedImageLoad,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn,\n ignoreCSSAttributes\n };\n const childNodes = n.childNodes ? Array.from(n.childNodes) : [];\n for (const childN of childNodes) {\n const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n if (serializedChildNode) {\n serializedNode2.childNodes.push(serializedChildNode);\n }\n }\n if (isElement$1(n) && n.shadowRoot) {\n for (const childN of Array.from(n.shadowRoot.childNodes)) {\n const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n if (serializedChildNode) {\n isNativeShadowDom(n.shadowRoot) && (serializedChildNode.isShadow = true);\n serializedNode2.childNodes.push(serializedChildNode);\n }\n }\n }\n }\n if (n.parentNode && isShadowRoot(n.parentNode) && isNativeShadowDom(n.parentNode)) {\n serializedNode2.isShadow = true;\n }\n if (serializedNode2.type === NodeType$1.Element && serializedNode2.tagName === \"iframe\" && !serializedNode2.needBlock) {\n onceIframeLoaded(\n n,\n () => {\n const iframeDoc = getIFrameContentDocument$1(n);\n if (iframeDoc && onIframeLoad) {\n const serializedIframeNode = serializeNodeWithId(iframeDoc, {\n doc: iframeDoc,\n mirror,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n skipChild: false,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn,\n ignoreCSSAttributes\n });\n if (serializedIframeNode) {\n onIframeLoad(\n n,\n serializedIframeNode\n );\n }\n }\n },\n iframeLoadTimeout\n );\n }\n if (serializedNode2.type === NodeType$1.Element && serializedNode2.tagName === \"img\" && !n.complete && serializedNode2.needBlock) {\n const image = n;\n const updateImageDimensions = () => {\n if (image.isConnected && !image.complete && onBlockedImageLoad) {\n try {\n const rect = image.getBoundingClientRect();\n if (rect.width > 0 && rect.height > 0) {\n onBlockedImageLoad(image, serializedNode2, rect);\n }\n } catch (error) {\n }\n }\n image.removeEventListener(\"load\", updateImageDimensions);\n };\n if (image.isConnected) {\n image.addEventListener(\"load\", updateImageDimensions);\n }\n }\n if (serializedNode2.type === NodeType$1.Element && serializedNode2.tagName === \"link\" && typeof serializedNode2.attributes.rel === \"string\" && (serializedNode2.attributes.rel === \"stylesheet\" || serializedNode2.attributes.rel === \"preload\" && typeof serializedNode2.attributes.href === \"string\" && extractFileExtension(serializedNode2.attributes.href) === \"css\")) {\n onceStylesheetLoaded(\n n,\n () => {\n if (onStylesheetLoad) {\n const serializedLinkNode = serializeNodeWithId(n, {\n doc,\n mirror,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n skipChild: false,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn,\n ignoreCSSAttributes\n });\n if (serializedLinkNode) {\n onStylesheetLoad(\n n,\n serializedLinkNode\n );\n }\n }\n },\n stylesheetLoadTimeout\n );\n }\n if (serializedNode2.type === NodeType$1.Element) {\n delete serializedNode2.needBlock;\n }\n return serializedNode2;\n}\nfunction snapshot(n, options) {\n const {\n mirror = new Mirror(),\n blockClass = \"rr-block\",\n blockSelector = null,\n unblockSelector = null,\n maskAllText = false,\n maskTextClass = \"rr-mask\",\n unmaskTextClass = null,\n maskTextSelector = null,\n unmaskTextSelector = null,\n inlineStylesheet = true,\n inlineImages = false,\n recordCanvas = false,\n maskAllInputs = false,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOM = false,\n dataURLOptions,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onBlockedImageLoad,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn = () => false,\n ignoreCSSAttributes = /* @__PURE__ */ new Set([])\n } = options || {};\n const 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 const slimDOMOptions = slimDOM === true || slimDOM === \"all\" ? (\n // if true: set of sensible options that should not throw away any information\n {\n script: true,\n comment: true,\n headFavicon: true,\n headWhitespace: true,\n headMetaDescKeywords: slimDOM === \"all\",\n // destructive\n headMetaSocial: true,\n headMetaRobots: true,\n headMetaHttpEquiv: true,\n headMetaAuthorship: true,\n headMetaVerification: true\n }\n ) : slimDOM === false ? {} : slimDOM;\n return serializeNodeWithId(n, {\n doc: n,\n mirror,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n skipChild: false,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onBlockedImageLoad,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn,\n newlyAddedElement: false,\n ignoreCSSAttributes\n });\n}\nfunction on(type, fn, target = document) {\n const options = { capture: true, passive: true };\n target.addEventListener(type, fn, options);\n return () => target.removeEventListener(type, fn, options);\n}\nconst DEPARTED_MIRROR_ACCESS_WARNING = \"Please stop import mirror directly. Instead of that,\\r\\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\\r\\nor you can use record.mirror to access the mirror instance during recording.\";\nlet _mirror = {\n map: {},\n getId() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return -1;\n },\n getNode() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return null;\n },\n removeNodeFromMap() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n },\n has() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return false;\n },\n reset() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n }\n};\nif (typeof window !== \"undefined\" && window.Proxy && window.Reflect) {\n _mirror = new Proxy(_mirror, {\n get(target, prop, receiver) {\n if (prop === \"map\") {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n }\n return Reflect.get(target, prop, receiver);\n }\n });\n}\nfunction throttle$1(func, wait, options = {}) {\n let timeout = null;\n let previous = 0;\n return function(...args) {\n const now = Date.now();\n if (!previous && options.leading === false) {\n previous = now;\n }\n const remaining = wait - (now - previous);\n const context = this;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout$2(timeout);\n timeout = null;\n }\n previous = now;\n func.apply(context, args);\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout$2(() => {\n previous = options.leading === false ? 0 : Date.now();\n timeout = null;\n func.apply(context, args);\n }, remaining);\n }\n };\n}\nfunction hookSetter(target, key, d, isRevoked, win = window) {\n const original = win.Object.getOwnPropertyDescriptor(target, key);\n win.Object.defineProperty(\n target,\n key,\n isRevoked ? d : {\n set(value) {\n setTimeout$2(() => {\n d.set.call(this, value);\n }, 0);\n if (original && original.set) {\n original.set.call(this, value);\n }\n }\n }\n );\n return () => hookSetter(target, key, original || {}, true);\n}\nfunction patch(source, name, replacement) {\n try {\n if (!(name in source)) {\n return () => {\n };\n }\n const original = source[name];\n const wrapped = replacement(original);\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 source[name] = wrapped;\n return () => {\n source[name] = original;\n };\n } catch {\n return () => {\n };\n }\n}\nlet nowTimestamp = Date.now;\nif (!/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString())) {\n nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime();\n}\nfunction getWindowScroll(win) {\n const doc = win.document;\n return {\n left: doc.scrollingElement ? doc.scrollingElement.scrollLeft : win.pageXOffset !== void 0 ? win.pageXOffset : doc?.documentElement.scrollLeft || doc?.body?.parentElement?.scrollLeft || doc?.body?.scrollLeft || 0,\n top: doc.scrollingElement ? doc.scrollingElement.scrollTop : win.pageYOffset !== void 0 ? win.pageYOffset : doc?.documentElement.scrollTop || doc?.body?.parentElement?.scrollTop || doc?.body?.scrollTop || 0\n };\n}\nfunction getWindowHeight() {\n return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight;\n}\nfunction getWindowWidth() {\n return window.innerWidth || document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth;\n}\nfunction closestElementOfNode$1(node) {\n if (!node) {\n return null;\n }\n try {\n const el = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;\n return el;\n } catch (error) {\n return null;\n }\n}\nfunction isBlocked(node, blockClass, blockSelector, unblockSelector, checkAncestors) {\n if (!node) {\n return false;\n }\n const el = closestElementOfNode$1(node);\n if (!el) {\n return false;\n }\n const blockedPredicate = createMatchPredicate(blockClass, blockSelector);\n if (!checkAncestors) {\n const isUnblocked = unblockSelector && el.matches(unblockSelector);\n return blockedPredicate(el) && !isUnblocked;\n }\n const blockDistance = distanceToMatch(el, blockedPredicate);\n let unblockDistance = -1;\n if (blockDistance < 0) {\n return false;\n }\n if (unblockSelector) {\n unblockDistance = distanceToMatch(\n el,\n createMatchPredicate(null, unblockSelector)\n );\n }\n if (blockDistance > -1 && unblockDistance < 0) {\n return true;\n }\n return blockDistance < unblockDistance;\n}\nfunction isSerialized(n, mirror) {\n return mirror.getId(n) !== -1;\n}\nfunction isIgnored(n, mirror) {\n return mirror.getId(n) === IGNORED_NODE;\n}\nfunction isAncestorRemoved(target, mirror) {\n if (isShadowRoot(target)) {\n return false;\n }\n const id = mirror.getId(target);\n if (!mirror.has(id)) {\n return true;\n }\n if (target.parentNode && target.parentNode.nodeType === target.DOCUMENT_NODE) {\n return false;\n }\n if (!target.parentNode) {\n return true;\n }\n return isAncestorRemoved(target.parentNode, mirror);\n}\nfunction legacy_isTouchEvent(event) {\n return Boolean(event.changedTouches);\n}\nfunction polyfill(win = window) {\n if (\"NodeList\" in win && !win.NodeList.prototype.forEach) {\n win.NodeList.prototype.forEach = Array.prototype.forEach;\n }\n if (\"DOMTokenList\" in win && !win.DOMTokenList.prototype.forEach) {\n win.DOMTokenList.prototype.forEach = Array.prototype.forEach;\n }\n if (!Node.prototype.contains) {\n Node.prototype.contains = (...args) => {\n let node = args[0];\n if (!(0 in args)) {\n throw new TypeError(\"1 argument is required\");\n }\n do {\n if (this === node) {\n return true;\n }\n } while (node = node && node.parentNode);\n return false;\n };\n }\n}\nfunction isSerializedIframe(n, mirror) {\n return Boolean(n.nodeName === \"IFRAME\" && mirror.getMeta(n));\n}\nfunction isSerializedStylesheet(n, mirror) {\n return Boolean(\n 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(n?.shadowRoot);\n}\nclass StyleSheetMirror {\n constructor() {\n this.id = 1;\n this.styleIDMap = /* @__PURE__ */ new WeakMap();\n this.idStyleMap = /* @__PURE__ */ new Map();\n }\n getId(stylesheet) {\n return this.styleIDMap.get(stylesheet) ?? -1;\n }\n has(stylesheet) {\n return this.styleIDMap.has(stylesheet);\n }\n /**\n * @returns If the stylesheet is in the mirror, returns the id of the stylesheet. If not, return the new assigned id.\n */\n add(stylesheet, id) {\n if (this.has(stylesheet)) return this.getId(stylesheet);\n let newId;\n if (id === void 0) {\n newId = this.id++;\n } else newId = id;\n this.styleIDMap.set(stylesheet, newId);\n this.idStyleMap.set(newId, stylesheet);\n return newId;\n }\n getStyle(id) {\n return this.idStyleMap.get(id) || null;\n }\n reset() {\n this.styleIDMap = /* @__PURE__ */ new WeakMap();\n this.idStyleMap = /* @__PURE__ */ new Map();\n this.id = 1;\n }\n generateId() {\n return this.id++;\n }\n}\nfunction getShadowHost(n) {\n let shadowHost = null;\n if (n.getRootNode?.()?.nodeType === Node.DOCUMENT_FRAGMENT_NODE && n.getRootNode().host)\n shadowHost = n.getRootNode().host;\n return shadowHost;\n}\nfunction getRootShadowHost(n) {\n let rootShadowHost = n;\n let shadowHost;\n while (shadowHost = getShadowHost(rootShadowHost))\n rootShadowHost = shadowHost;\n return rootShadowHost;\n}\nfunction shadowHostInDom(n) {\n const doc = n.ownerDocument;\n if (!doc) return false;\n const shadowHost = getRootShadowHost(n);\n return doc.contains(shadowHost);\n}\nfunction inDom(n) {\n const doc = n.ownerDocument;\n if (!doc) return false;\n return doc.contains(n) || shadowHostInDom(n);\n}\nconst cachedImplementations = {};\nfunction getImplementation(name) {\n const cached = cachedImplementations[name];\n if (cached) {\n return cached;\n }\n const windowImpl = window[name].bind(window);\n let impl = windowImpl;\n const document2 = window.document;\n if (document2 && typeof document2.createElement === \"function\") {\n try {\n const sandbox = document2.createElement(\"iframe\");\n sandbox.hidden = true;\n document2.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow[name]) {\n const sandboxImpl = contentWindow[name].bind(window);\n impl = (...args) => {\n try {\n return sandboxImpl(...args);\n } catch {\n cachedImplementations[name] = windowImpl;\n return windowImpl(...args);\n }\n };\n }\n document2.head.removeChild(sandbox);\n } catch (e) {\n }\n }\n return cachedImplementations[name] = impl;\n}\nfunction onRequestAnimationFrame(...rest) {\n return getImplementation(\"requestAnimationFrame\")(...rest);\n}\nfunction setTimeout$2(...rest) {\n return getImplementation(\"setTimeout\")(...rest);\n}\nfunction clearTimeout$2(...rest) {\n return getImplementation(\"clearTimeout\")(...rest);\n}\nvar EventType = /* @__PURE__ */ ((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 || {});\nvar IncrementalSource = /* @__PURE__ */ ((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 || {});\nvar MouseInteractions = /* @__PURE__ */ ((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 || {});\nvar PointerTypes = /* @__PURE__ */ ((PointerTypes2) => {\n PointerTypes2[PointerTypes2[\"Mouse\"] = 0] = \"Mouse\";\n PointerTypes2[PointerTypes2[\"Pen\"] = 1] = \"Pen\";\n PointerTypes2[PointerTypes2[\"Touch\"] = 2] = \"Touch\";\n return PointerTypes2;\n})(PointerTypes || {});\nvar MediaInteractions = /* @__PURE__ */ ((MediaInteractions2) => {\n MediaInteractions2[MediaInteractions2[\"Play\"] = 0] = \"Play\";\n MediaInteractions2[MediaInteractions2[\"Pause\"] = 1] = \"Pause\";\n MediaInteractions2[MediaInteractions2[\"Seeked\"] = 2] = \"Seeked\";\n MediaInteractions2[MediaInteractions2[\"VolumeChange\"] = 3] = \"VolumeChange\";\n MediaInteractions2[MediaInteractions2[\"RateChange\"] = 4] = \"RateChange\";\n return MediaInteractions2;\n})(MediaInteractions || {});\nlet errorHandler;\nfunction registerErrorHandler(handler) {\n errorHandler = handler;\n}\nfunction unregisterErrorHandler() {\n errorHandler = void 0;\n}\nconst callbackWrapper = (cb) => {\n if (!errorHandler) {\n return cb;\n }\n const rrwebWrapped = ((...rest) => {\n try {\n return cb(...rest);\n } catch (error) {\n if (errorHandler && errorHandler(error) === true) {\n return () => {\n };\n }\n throw error;\n }\n });\n return rrwebWrapped;\n};\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar lookup = typeof Uint8Array === \"undefined\" ? [] : new Uint8Array(256);\nfor (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\nclass CanvasManagerNoop {\n reset() {\n }\n freeze() {\n }\n unfreeze() {\n }\n lock() {\n }\n unlock() {\n }\n snapshot() {\n }\n addWindow() {\n }\n addShadowRoot() {\n }\n resetShadowRoots() {\n }\n}\n\nfunction getIFrameContentDocument(iframe) {\n try {\n return iframe.contentDocument;\n } catch (e2) {\n }\n}\nfunction getIFrameContentWindow(iframe) {\n try {\n return iframe.contentWindow;\n } catch (e2) {\n }\n}\nclass StyleDeclarationParser {\n constructor(doc) {\n this.doc = doc;\n this.unattachedDoc = null;\n }\n parse(styleText) {\n return this.parseWithConstructableStylesheet(styleText) || this.parseWithDetachedElement(styleText);\n }\n parseWithConstructableStylesheet(styleText) {\n if (typeof CSSStyleSheet === \"undefined\" || typeof CSSStyleSheet.prototype.replaceSync !== \"function\") {\n return null;\n }\n try {\n const sheet = new CSSStyleSheet();\n sheet.replaceSync(`x { ${styleText} }`);\n const rule = sheet.cssRules[0];\n if (!rule || rule.type !== CSSRule.STYLE_RULE) {\n return null;\n }\n return rule.style;\n } catch {\n return null;\n }\n }\n parseWithDetachedElement(styleText) {\n const old = this.getUnattachedDoc().createElement(\"span\");\n old.setAttribute(\"style\", styleText);\n return old.style;\n }\n getUnattachedDoc() {\n if (!this.unattachedDoc) {\n try {\n this.unattachedDoc = document.implementation.createHTMLDocument();\n } catch {\n this.unattachedDoc = this.doc;\n }\n }\n return this.unattachedDoc;\n }\n}\nfunction isNodeInLinkedList(n2) {\n return \"__ln\" in n2;\n}\nclass DoubleLinkedList {\n constructor() {\n this.length = 0;\n this.head = null;\n this.tail = null;\n }\n get(position) {\n if (position >= this.length) {\n throw new Error(\"Position outside of list range\");\n }\n let current = this.head;\n for (let index = 0; index < position; index++) {\n current = current?.next || null;\n }\n return current;\n }\n addNode(n2) {\n const node = {\n value: n2,\n previous: null,\n next: null\n };\n n2.__ln = node;\n if (n2.previousSibling && isNodeInLinkedList(n2.previousSibling)) {\n const current = n2.previousSibling.__ln.next;\n node.next = current;\n node.previous = n2.previousSibling.__ln;\n n2.previousSibling.__ln.next = node;\n if (current) {\n current.previous = node;\n }\n } else if (n2.nextSibling && isNodeInLinkedList(n2.nextSibling) && n2.nextSibling.__ln.previous) {\n const current = n2.nextSibling.__ln.previous;\n node.previous = current;\n node.next = n2.nextSibling.__ln;\n n2.nextSibling.__ln.previous = node;\n if (current) {\n current.next = node;\n }\n } else {\n if (this.head) {\n this.head.previous = node;\n }\n node.next = this.head;\n this.head = node;\n }\n if (node.next === null) {\n this.tail = node;\n }\n this.length++;\n }\n removeNode(n2) {\n const current = n2.__ln;\n if (!this.head) {\n return;\n }\n if (!current.previous) {\n this.head = current.next;\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 if (current.next) {\n current.next.previous = current.previous;\n } else {\n this.tail = current.previous;\n }\n }\n if (n2.__ln) {\n delete n2.__ln;\n }\n this.length--;\n }\n}\nconst moveKey = (id, parentId) => `${id}@${parentId}`;\nclass MutationBuffer {\n constructor() {\n this.frozen = false;\n this.locked = false;\n this.texts = [];\n this.attributes = [];\n this.attributeMap = /* @__PURE__ */ new WeakMap();\n this.removes = [];\n this.mapRemoves = [];\n this.movedMap = {};\n this.addedSet = /* @__PURE__ */ new Set();\n this.movedSet = /* @__PURE__ */ new Set();\n this.droppedSet = /* @__PURE__ */ new Set();\n this.processMutations = (mutations) => {\n mutations.forEach(this.processMutation);\n this.emit();\n };\n this.emit = () => {\n if (this.frozen || this.locked) {\n return;\n }\n const adds = [];\n const addedIds = /* @__PURE__ */ new Set();\n const addList = new DoubleLinkedList();\n const getNextId = (n2) => {\n let ns = n2;\n let nextId = IGNORED_NODE;\n while (nextId === IGNORED_NODE) {\n ns = ns && ns.nextSibling;\n nextId = ns && this.mirror.getId(ns);\n }\n return nextId;\n };\n const pushAdd = (n2) => {\n if (!n2.parentNode || !inDom(n2)) {\n return;\n }\n const parentId = isShadowRoot(n2.parentNode) ? this.mirror.getId(getShadowHost(n2)) : this.mirror.getId(n2.parentNode);\n const nextId = getNextId(n2);\n if (parentId === -1 || nextId === -1) {\n return addList.addNode(n2);\n }\n const sn = serializeNodeWithId(n2, {\n doc: this.doc,\n mirror: this.mirror,\n blockClass: this.blockClass,\n blockSelector: this.blockSelector,\n maskAllText: this.maskAllText,\n unblockSelector: this.unblockSelector,\n maskTextClass: this.maskTextClass,\n unmaskTextClass: this.unmaskTextClass,\n maskTextSelector: this.maskTextSelector,\n unmaskTextSelector: this.unmaskTextSelector,\n skipChild: true,\n newlyAddedElement: true,\n inlineStylesheet: this.inlineStylesheet,\n maskInputOptions: this.maskInputOptions,\n maskAttributeFn: this.maskAttributeFn,\n maskTextFn: this.maskTextFn,\n maskInputFn: this.maskInputFn,\n slimDOMOptions: this.slimDOMOptions,\n dataURLOptions: this.dataURLOptions,\n recordCanvas: this.recordCanvas,\n inlineImages: this.inlineImages,\n onSerialize: (currentN) => {\n if (isSerializedIframe(currentN, this.mirror) && !isBlocked(\n currentN,\n this.blockClass,\n this.blockSelector,\n this.unblockSelector,\n false\n )) {\n this.iframeManager.addIframe(currentN);\n }\n if (isSerializedStylesheet(currentN, this.mirror)) {\n this.stylesheetManager.trackLinkElement(\n currentN\n );\n }\n if (hasShadowRoot(n2)) {\n this.shadowDomManager.addShadowRoot(n2.shadowRoot, this.doc);\n }\n },\n onIframeLoad: (iframe, childSn) => {\n if (isBlocked(\n iframe,\n this.blockClass,\n this.blockSelector,\n this.unblockSelector,\n false\n )) {\n return;\n }\n this.iframeManager.attachIframe(iframe, childSn);\n const contentWindow = getIFrameContentWindow(iframe);\n if (contentWindow) {\n this.canvasManager.addWindow(contentWindow);\n }\n this.shadowDomManager.observeAttachShadow(iframe);\n },\n onStylesheetLoad: (link, childSn) => {\n this.stylesheetManager.attachLinkElement(link, childSn);\n },\n onBlockedImageLoad: (_imageEl, serializedNode, { width, height }) => {\n this.mutationCb({\n adds: [],\n removes: [],\n texts: [],\n attributes: [\n {\n id: serializedNode.id,\n attributes: {\n style: {\n width: `${width}px`,\n height: `${height}px`\n }\n }\n }\n ]\n });\n },\n ignoreCSSAttributes: this.ignoreCSSAttributes\n });\n if (sn) {\n adds.push({\n parentId,\n nextId,\n node: sn\n });\n addedIds.add(sn.id);\n }\n };\n while (this.mapRemoves.length) {\n this.mirror.removeNodeFromMap(this.mapRemoves.shift());\n }\n for (const n2 of this.movedSet) {\n if (isParentRemoved(this.removes, n2, this.mirror) && !this.movedSet.has(n2.parentNode)) {\n continue;\n }\n pushAdd(n2);\n }\n for (const n2 of this.addedSet) {\n if (!isAncestorInSet(this.droppedSet, n2) && !isParentRemoved(this.removes, n2, this.mirror)) {\n pushAdd(n2);\n } else if (isAncestorInSet(this.movedSet, n2)) {\n pushAdd(n2);\n } else {\n this.droppedSet.add(n2);\n }\n }\n let candidate = null;\n while (addList.length) {\n let node = null;\n if (candidate) {\n const parentId = this.mirror.getId(candidate.value.parentNode);\n const nextId = getNextId(candidate.value);\n if (parentId !== -1 && nextId !== -1) {\n node = candidate;\n }\n }\n if (!node) {\n let tailNode = addList.tail;\n while (tailNode) {\n const _node = tailNode;\n tailNode = tailNode.previous;\n if (_node) {\n const parentId = this.mirror.getId(_node.value.parentNode);\n const nextId = getNextId(_node.value);\n if (nextId === -1) continue;\n else if (parentId !== -1) {\n node = _node;\n break;\n } else {\n const unhandledNode = _node.value;\n if (unhandledNode.parentNode && unhandledNode.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n const shadowHost = unhandledNode.parentNode.host;\n const parentId2 = this.mirror.getId(shadowHost);\n if (parentId2 !== -1) {\n node = _node;\n break;\n }\n }\n }\n }\n }\n }\n if (!node) {\n while (addList.head) {\n addList.removeNode(addList.head.value);\n }\n break;\n }\n candidate = node.previous;\n addList.removeNode(node.value);\n pushAdd(node.value);\n }\n const payload = {\n texts: this.texts.map((text) => ({\n id: this.mirror.getId(text.node),\n value: text.value\n })).filter((text) => !addedIds.has(text.id)).filter((text) => this.mirror.has(text.id)),\n attributes: this.attributes.map((attribute) => {\n const { attributes } = attribute;\n if (typeof attributes.style === \"string\") {\n const diffAsStr = JSON.stringify(attribute.styleDiff);\n const unchangedAsStr = JSON.stringify(attribute._unchangedStyles);\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 return {\n id: this.mirror.getId(attribute.node),\n attributes\n };\n }).filter((attribute) => !addedIds.has(attribute.id)).filter((attribute) => this.mirror.has(attribute.id)),\n removes: this.removes,\n adds\n };\n if (!payload.texts.length && !payload.attributes.length && !payload.removes.length && !payload.adds.length) {\n return;\n }\n this.texts = [];\n this.attributes = [];\n this.attributeMap = /* @__PURE__ */ new WeakMap();\n this.removes = [];\n this.addedSet = /* @__PURE__ */ new Set();\n this.movedSet = /* @__PURE__ */ new Set();\n this.droppedSet = /* @__PURE__ */ new Set();\n this.movedMap = {};\n this.mutationCb(payload);\n };\n this.processMutation = (m) => {\n if (isIgnored(m.target, this.mirror)) {\n return;\n }\n switch (m.type) {\n case \"characterData\": {\n const value = m.target.textContent;\n if (!isBlocked(\n m.target,\n this.blockClass,\n this.blockSelector,\n this.unblockSelector,\n false\n ) && value !== m.oldValue) {\n this.texts.push({\n value: needMaskingText(\n m.target,\n this.maskTextClass,\n this.maskTextSelector,\n this.unmaskTextClass,\n this.unmaskTextSelector,\n this.maskAllText\n ) && value ? this.maskTextFn ? this.maskTextFn(value, closestElementOfNode$1(m.target)) : value.replace(/[\\S]/g, \"*\") : value,\n node: m.target\n });\n }\n break;\n }\n case \"attributes\": {\n const target = m.target;\n let attributeName = m.attributeName;\n let value = m.target.getAttribute(attributeName);\n if (attributeName === \"value\") {\n const type = getInputType(target);\n const tagName = target.tagName;\n value = getInputValue(target, tagName, type);\n const isInputMasked = shouldMaskInput({\n maskInputOptions: this.maskInputOptions,\n tagName,\n type\n });\n const forceMask = needMaskingText(\n m.target,\n this.maskTextClass,\n this.maskTextSelector,\n this.unmaskTextClass,\n this.unmaskTextSelector,\n isInputMasked\n );\n value = maskInputValue({\n isMasked: forceMask,\n element: target,\n value,\n maskInputFn: this.maskInputFn\n });\n }\n if (isBlocked(\n m.target,\n this.blockClass,\n this.blockSelector,\n this.unblockSelector,\n false\n ) || value === m.oldValue) {\n return;\n }\n let item = this.attributeMap.get(m.target);\n if (target.tagName === \"IFRAME\" && attributeName === \"src\" && !this.keepIframeSrcFn(value)) {\n const iframeDoc = getIFrameContentDocument(\n target\n );\n if (!iframeDoc) {\n attributeName = \"rr_src\";\n } else {\n return;\n }\n }\n if (!item) {\n item = {\n node: m.target,\n attributes: {},\n styleDiff: {},\n _unchangedStyles: {}\n };\n this.attributes.push(item);\n this.attributeMap.set(m.target, item);\n }\n if (attributeName === \"type\" && target.tagName === \"INPUT\" && (m.oldValue || \"\").toLowerCase() === \"password\") {\n target.setAttribute(\"data-rr-is-password\", \"true\");\n }\n if (!ignoreAttribute(target.tagName, attributeName)) {\n item.attributes[attributeName] = transformAttribute(\n this.doc,\n toLowerCase(target.tagName),\n toLowerCase(attributeName),\n value,\n target,\n this.maskAttributeFn\n );\n if (attributeName === \"style\") {\n const oldStyle = m.oldValue ? this.styleDeclarationParser.parse(m.oldValue) : null;\n for (const pname of Array.from(target.style)) {\n const newValue = target.style.getPropertyValue(pname);\n const newPriority = target.style.getPropertyPriority(pname);\n if (newValue !== (oldStyle?.getPropertyValue(pname) || \"\") || newPriority !== (oldStyle?.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 if (oldStyle) {\n for (const pname of Array.from(oldStyle)) {\n if (target.style.getPropertyValue(pname) === \"\") {\n item.styleDiff[pname] = false;\n }\n }\n }\n }\n }\n break;\n }\n case \"childList\": {\n if (isBlocked(\n m.target,\n this.blockClass,\n this.blockSelector,\n this.unblockSelector,\n true\n )) {\n return;\n }\n m.addedNodes.forEach((n2) => this.genAdds(n2, m.target));\n m.removedNodes.forEach((n2) => {\n const nodeId = this.mirror.getId(n2);\n const parentId = isShadowRoot(m.target) ? this.mirror.getId(m.target.host) : this.mirror.getId(m.target);\n if (isBlocked(\n m.target,\n this.blockClass,\n this.blockSelector,\n this.unblockSelector,\n false\n ) || isIgnored(n2, this.mirror) || !isSerialized(n2, this.mirror)) {\n return;\n }\n if (this.addedSet.has(n2)) {\n deepDelete(this.addedSet, n2);\n this.droppedSet.add(n2);\n } else if (this.addedSet.has(m.target) && nodeId === -1) ;\n else if (isAncestorRemoved(m.target, this.mirror)) ;\n else if (this.movedSet.has(n2) && this.movedMap[moveKey(nodeId, parentId)]) {\n deepDelete(this.movedSet, n2);\n } else {\n this.removes.push({\n parentId,\n id: nodeId,\n isShadow: isShadowRoot(m.target) && isNativeShadowDom(m.target) ? true : void 0\n });\n }\n this.mapRemoves.push(n2);\n });\n break;\n }\n }\n };\n this.genAdds = (n2, target) => {\n if (this.processedNodeManager.inOtherBuffer(n2, this)) return;\n if (this.addedSet.has(n2) || this.movedSet.has(n2)) return;\n if (this.mirror.hasNode(n2)) {\n if (isIgnored(n2, this.mirror)) {\n return;\n }\n this.movedSet.add(n2);\n let targetId = null;\n if (target && this.mirror.hasNode(target)) {\n targetId = this.mirror.getId(target);\n }\n if (targetId && targetId !== -1) {\n this.movedMap[moveKey(this.mirror.getId(n2), targetId)] = true;\n }\n } else {\n this.addedSet.add(n2);\n this.droppedSet.delete(n2);\n }\n if (!isBlocked(\n n2,\n this.blockClass,\n this.blockSelector,\n this.unblockSelector,\n false\n )) {\n if (n2.childNodes) {\n n2.childNodes.forEach((childN) => this.genAdds(childN));\n }\n if (hasShadowRoot(n2)) {\n n2.shadowRoot.childNodes.forEach((childN) => {\n this.processedNodeManager.add(childN, this);\n this.genAdds(childN, n2);\n });\n }\n }\n };\n }\n init(options) {\n [\n \"mutationCb\",\n \"blockClass\",\n \"blockSelector\",\n \"unblockSelector\",\n \"maskAllText\",\n \"maskTextClass\",\n \"unmaskTextClass\",\n \"maskTextSelector\",\n \"unmaskTextSelector\",\n \"inlineStylesheet\",\n \"maskInputOptions\",\n \"maskAttributeFn\",\n \"maskTextFn\",\n \"maskInputFn\",\n \"keepIframeSrcFn\",\n \"recordCanvas\",\n \"inlineImages\",\n \"slimDOMOptions\",\n \"dataURLOptions\",\n \"doc\",\n \"mirror\",\n \"iframeManager\",\n \"stylesheetManager\",\n \"shadowDomManager\",\n \"canvasManager\",\n \"processedNodeManager\",\n \"ignoreCSSAttributes\"\n ].forEach((key) => {\n this[key] = options[key];\n });\n this.styleDeclarationParser = new StyleDeclarationParser(this.doc);\n }\n freeze() {\n this.frozen = true;\n this.canvasManager.freeze();\n }\n unfreeze() {\n this.frozen = false;\n this.canvasManager.unfreeze();\n this.emit();\n }\n isFrozen() {\n return this.frozen;\n }\n lock() {\n this.locked = true;\n this.canvasManager.lock();\n }\n unlock() {\n this.locked = false;\n this.canvasManager.unlock();\n this.emit();\n }\n reset() {\n this.shadowDomManager.reset();\n this.canvasManager.reset();\n }\n}\nfunction deepDelete(addsSet, n2) {\n addsSet.delete(n2);\n n2.childNodes?.forEach((childN) => deepDelete(addsSet, childN));\n}\nfunction isParentRemoved(removes, n2, mirror2) {\n if (removes.length === 0) return false;\n return _isParentRemoved(removes, n2, mirror2);\n}\nfunction _isParentRemoved(removes, n2, mirror2) {\n let node = n2.parentNode;\n while (node) {\n const parentId = mirror2.getId(node);\n if (removes.some((r2) => r2.id === parentId)) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\nfunction isAncestorInSet(set, n2) {\n if (set.size === 0) return false;\n return _isAncestorInSet(set, n2);\n}\nfunction _isAncestorInSet(set, n2) {\n const { parentNode } = n2;\n if (!parentNode) {\n return false;\n }\n if (set.has(parentNode)) {\n return true;\n }\n return _isAncestorInSet(set, parentNode);\n}\nconst mutationBuffers = [];\nfunction getEventTarget(event) {\n try {\n if (\"composedPath\" in event) {\n const path = event.composedPath();\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 {\n }\n return event && event.target;\n}\nfunction initMutationObserver(options, rootEl) {\n const mutationBuffer = new MutationBuffer();\n mutationBuffers.push(mutationBuffer);\n mutationBuffer.init(options);\n let mutationObserverCtor = window.MutationObserver || /**\n * Some websites may disable MutationObserver by removing it from the window object.\n * If someone is using rrweb to build a browser extention or things like it, they\n * could not change the website's code but can have an opportunity to inject some\n * code before the website executing its JS logic.\n * Then they can do this to store the native MutationObserver:\n * window.__rrMutationObserver = MutationObserver\n */\n window.__rrMutationObserver;\n const angularZoneSymbol = window?.Zone?.__symbol__?.(\"MutationObserver\");\n if (angularZoneSymbol && window[angularZoneSymbol]) {\n mutationObserverCtor = window[angularZoneSymbol];\n }\n const observer = new mutationObserverCtor(\n callbackWrapper((mutations) => {\n if (options.onMutation && options.onMutation(mutations) === false) {\n return;\n }\n mutationBuffer.processMutations.bind(mutationBuffer)(mutations);\n })\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}\nfunction initMoveObserver({\n mousemoveCb,\n sampling,\n doc,\n mirror: mirror2\n}) {\n if (sampling.mousemove === false) {\n return () => {\n };\n }\n const threshold = typeof sampling.mousemove === \"number\" ? sampling.mousemove : 50;\n const callbackThreshold = typeof sampling.mousemoveCallback === \"number\" ? sampling.mousemoveCallback : 500;\n let positions = [];\n let timeBaseline;\n const wrappedCb = throttle$1(\n callbackWrapper(\n (source) => {\n const totalOffset = Date.now() - timeBaseline;\n mousemoveCb(\n positions.map((p) => {\n p.timeOffset -= totalOffset;\n return p;\n }),\n source\n );\n positions = [];\n timeBaseline = null;\n }\n ),\n callbackThreshold\n );\n const updatePosition = callbackWrapper(\n throttle$1(\n callbackWrapper((evt) => {\n const target = getEventTarget(evt);\n const { clientX, clientY } = legacy_isTouchEvent(evt) ? evt.changedTouches[0] : evt;\n if (!timeBaseline) {\n timeBaseline = nowTimestamp();\n }\n positions.push({\n x: clientX,\n y: clientY,\n id: mirror2.getId(target),\n timeOffset: nowTimestamp() - timeBaseline\n });\n wrappedCb(\n typeof DragEvent !== \"undefined\" && evt instanceof DragEvent ? IncrementalSource.Drag : evt instanceof MouseEvent ? IncrementalSource.MouseMove : IncrementalSource.TouchMove\n );\n }),\n threshold,\n {\n trailing: false\n }\n )\n );\n const handlers = [\n on(\"mousemove\", updatePosition, doc),\n on(\"touchmove\", updatePosition, doc),\n on(\"drag\", updatePosition, doc)\n ];\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction initMouseInteractionObserver({\n mouseInteractionCb,\n doc,\n mirror: mirror2,\n blockClass,\n blockSelector,\n unblockSelector,\n sampling\n}) {\n if (sampling.mouseInteraction === false) {\n return () => {\n };\n }\n const disableMap = sampling.mouseInteraction === true || sampling.mouseInteraction === void 0 ? {} : sampling.mouseInteraction;\n const handlers = [];\n let currentPointerType = null;\n const getHandler = (eventKey) => {\n return (event) => {\n const target = getEventTarget(event);\n if (isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n return;\n }\n let pointerType = null;\n let thisEventKey = eventKey;\n if (\"pointerType\" in event) {\n switch (event.pointerType) {\n case \"mouse\":\n pointerType = PointerTypes.Mouse;\n break;\n case \"touch\":\n pointerType = PointerTypes.Touch;\n break;\n case \"pen\":\n pointerType = PointerTypes.Pen;\n break;\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 if (pointerType !== null) {\n currentPointerType = pointerType;\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 const e2 = legacy_isTouchEvent(event) ? event.changedTouches[0] : event;\n if (!e2) {\n return;\n }\n const id = mirror2.getId(target);\n const { clientX, clientY } = e2;\n callbackWrapper(mouseInteractionCb)({\n type: MouseInteractions[thisEventKey],\n id,\n x: clientX,\n y: clientY,\n ...pointerType !== null && { pointerType }\n });\n };\n };\n Object.keys(MouseInteractions).filter(\n (key) => Number.isNaN(Number(key)) && !key.endsWith(\"_Departed\") && disableMap[key] !== false\n ).forEach((eventKey) => {\n let eventName = toLowerCase(eventKey);\n const handler = getHandler(eventKey);\n if (window.PointerEvent) {\n switch (MouseInteractions[eventKey]) {\n case MouseInteractions.MouseDown:\n case MouseInteractions.MouseUp:\n eventName = eventName.replace(\n \"mouse\",\n \"pointer\"\n );\n break;\n case MouseInteractions.TouchStart:\n case MouseInteractions.TouchEnd:\n return;\n }\n }\n handlers.push(on(eventName, handler, doc));\n });\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction initScrollObserver({\n scrollCb,\n doc,\n mirror: mirror2,\n blockClass,\n blockSelector,\n unblockSelector,\n sampling\n}) {\n const updatePosition = callbackWrapper(\n throttle$1(\n callbackWrapper((evt) => {\n const target = getEventTarget(evt);\n if (!target || isBlocked(\n target,\n blockClass,\n blockSelector,\n unblockSelector,\n true\n )) {\n return;\n }\n const id = mirror2.getId(target);\n if (target === doc && doc.defaultView) {\n const scrollLeftTop = getWindowScroll(doc.defaultView);\n scrollCb({\n id,\n x: scrollLeftTop.left,\n y: scrollLeftTop.top\n });\n } else {\n scrollCb({\n id,\n x: target.scrollLeft,\n y: target.scrollTop\n });\n }\n }),\n sampling.scroll || 100\n )\n );\n return on(\"scroll\", updatePosition, doc);\n}\nfunction initViewportResizeObserver({ viewportResizeCb }, { win }) {\n let lastH = -1;\n let lastW = -1;\n const updateDimension = callbackWrapper(\n throttle$1(\n callbackWrapper(() => {\n const height = getWindowHeight();\n const width = getWindowWidth();\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 }),\n 200\n )\n );\n return on(\"resize\", updateDimension, win);\n}\nconst INPUT_TAGS = [\"INPUT\", \"TEXTAREA\", \"SELECT\"];\nconst lastInputValueMap = /* @__PURE__ */ new WeakMap();\nfunction initInputObserver({\n inputCb,\n doc,\n mirror: mirror2,\n blockClass,\n blockSelector,\n unblockSelector,\n ignoreClass,\n ignoreSelector,\n maskInputOptions,\n maskInputFn,\n sampling,\n userTriggeredOnInput,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector\n}) {\n function eventHandler(event) {\n let target = getEventTarget(event);\n const userTriggered = event.isTrusted;\n const tagName = target && toUpperCase(target.tagName);\n if (tagName === \"OPTION\") target = target.parentElement;\n if (!target || !tagName || INPUT_TAGS.indexOf(tagName) < 0 || isBlocked(\n target,\n blockClass,\n blockSelector,\n unblockSelector,\n true\n )) {\n return;\n }\n const el = target;\n if (el.classList.contains(ignoreClass) || ignoreSelector && el.matches(ignoreSelector)) {\n return;\n }\n const type = getInputType(target);\n let text = getInputValue(el, tagName, type);\n let isChecked = false;\n const isInputMasked = shouldMaskInput({\n maskInputOptions,\n tagName,\n type\n });\n const forceMask = needMaskingText(\n target,\n maskTextClass,\n maskTextSelector,\n unmaskTextClass,\n unmaskTextSelector,\n isInputMasked\n );\n if (type === \"radio\" || type === \"checkbox\") {\n isChecked = target.checked;\n }\n text = maskInputValue({\n isMasked: forceMask,\n element: target,\n value: text,\n maskInputFn\n });\n cbWithDedup(\n target,\n userTriggeredOnInput ? { text, isChecked, userTriggered } : { text, isChecked }\n );\n const name = target.name;\n if (type === \"radio\" && name && isChecked) {\n doc.querySelectorAll(`input[type=\"radio\"][name=\"${name}\"]`).forEach((el2) => {\n if (el2 !== target) {\n const text2 = maskInputValue({\n // share mask behavior of `target`\n isMasked: forceMask,\n element: el2,\n value: getInputValue(el2, tagName, type),\n maskInputFn\n });\n cbWithDedup(\n el2,\n userTriggeredOnInput ? { text: text2, isChecked: !isChecked, userTriggered: false } : { text: text2, isChecked: !isChecked }\n );\n }\n });\n }\n }\n function cbWithDedup(target, v2) {\n const lastInputValue = lastInputValueMap.get(target);\n if (!lastInputValue || lastInputValue.text !== v2.text || lastInputValue.isChecked !== v2.isChecked) {\n lastInputValueMap.set(target, v2);\n const id = mirror2.getId(target);\n callbackWrapper(inputCb)({\n ...v2,\n id\n });\n }\n }\n const events = sampling.input === \"last\" ? [\"change\"] : [\"input\", \"change\"];\n const handlers = events.map(\n (eventName) => on(eventName, callbackWrapper(eventHandler), doc)\n );\n const currentWindow = doc.defaultView;\n if (!currentWindow) {\n return () => {\n handlers.forEach((h) => h());\n };\n }\n const propertyDescriptor = currentWindow.Object.getOwnPropertyDescriptor(\n currentWindow.HTMLInputElement.prototype,\n \"value\"\n );\n const hookProperties = [\n [currentWindow.HTMLInputElement.prototype, \"value\"],\n [currentWindow.HTMLInputElement.prototype, \"checked\"],\n [currentWindow.HTMLSelectElement.prototype, \"value\"],\n [currentWindow.HTMLTextAreaElement.prototype, \"value\"],\n // Some UI library use selectedIndex to set select value\n [currentWindow.HTMLSelectElement.prototype, \"selectedIndex\"],\n [currentWindow.HTMLOptionElement.prototype, \"selected\"]\n ];\n if (propertyDescriptor && propertyDescriptor.set) {\n handlers.push(\n ...hookProperties.map(\n (p) => hookSetter(\n p[0],\n p[1],\n {\n set() {\n callbackWrapper(eventHandler)({\n target: this,\n isTrusted: false\n // userTriggered to false as this could well be programmatic\n });\n }\n },\n false,\n currentWindow\n )\n )\n );\n }\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction getNestedCSSRulePositions(rule) {\n const positions = [];\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 const rules2 = Array.from(\n childRule.parentRule.cssRules\n );\n const index = rules2.indexOf(childRule);\n pos.unshift(index);\n } else if (childRule.parentStyleSheet) {\n const rules2 = Array.from(childRule.parentStyleSheet.cssRules);\n const index = rules2.indexOf(childRule);\n pos.unshift(index);\n }\n return pos;\n }\n return recurse(rule, positions);\n}\nfunction getIdAndStyleId(sheet, mirror2, styleMirror) {\n let id, styleId;\n if (!sheet) return {};\n if (sheet.ownerNode) id = mirror2.getId(sheet.ownerNode);\n else styleId = styleMirror.getId(sheet);\n return {\n styleId,\n id\n };\n}\nfunction initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetManager }, { win }) {\n if (!win.CSSStyleSheet || !win.CSSStyleSheet.prototype) {\n return () => {\n };\n }\n const insertRule = win.CSSStyleSheet.prototype.insertRule;\n win.CSSStyleSheet.prototype.insertRule = new Proxy(insertRule, {\n apply: callbackWrapper(\n (target, thisArg, argumentsList) => {\n const [rule, index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(\n thisArg,\n mirror2,\n stylesheetManager.styleMirror\n );\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleSheetRuleCb({\n id,\n styleId,\n adds: [{ rule, index }]\n });\n }\n return target.apply(thisArg, argumentsList);\n }\n )\n });\n const deleteRule = win.CSSStyleSheet.prototype.deleteRule;\n win.CSSStyleSheet.prototype.deleteRule = new Proxy(deleteRule, {\n apply: callbackWrapper(\n (target, thisArg, argumentsList) => {\n const [index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(\n thisArg,\n mirror2,\n stylesheetManager.styleMirror\n );\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleSheetRuleCb({\n id,\n styleId,\n removes: [{ index }]\n });\n }\n return target.apply(thisArg, argumentsList);\n }\n )\n });\n let replace;\n if (win.CSSStyleSheet.prototype.replace) {\n replace = win.CSSStyleSheet.prototype.replace;\n win.CSSStyleSheet.prototype.replace = new Proxy(replace, {\n apply: callbackWrapper(\n (target, thisArg, argumentsList) => {\n const [text] = argumentsList;\n const { id, styleId } = getIdAndStyleId(\n thisArg,\n mirror2,\n stylesheetManager.styleMirror\n );\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleSheetRuleCb({\n id,\n styleId,\n replace: text\n });\n }\n return target.apply(thisArg, argumentsList);\n }\n )\n });\n }\n let replaceSync;\n if (win.CSSStyleSheet.prototype.replaceSync) {\n replaceSync = win.CSSStyleSheet.prototype.replaceSync;\n win.CSSStyleSheet.prototype.replaceSync = new Proxy(replaceSync, {\n apply: callbackWrapper(\n (target, thisArg, argumentsList) => {\n const [text] = argumentsList;\n const { id, styleId } = getIdAndStyleId(\n thisArg,\n mirror2,\n stylesheetManager.styleMirror\n );\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleSheetRuleCb({\n id,\n styleId,\n replaceSync: text\n });\n }\n return target.apply(thisArg, argumentsList);\n }\n )\n });\n }\n const supportedNestedCSSRuleTypes = {};\n if (canMonkeyPatchNestedCSSRule(\"CSSGroupingRule\")) {\n supportedNestedCSSRuleTypes.CSSGroupingRule = win.CSSGroupingRule;\n } else {\n if (canMonkeyPatchNestedCSSRule(\"CSSMediaRule\")) {\n supportedNestedCSSRuleTypes.CSSMediaRule = win.CSSMediaRule;\n }\n if (canMonkeyPatchNestedCSSRule(\"CSSConditionRule\")) {\n supportedNestedCSSRuleTypes.CSSConditionRule = win.CSSConditionRule;\n }\n if (canMonkeyPatchNestedCSSRule(\"CSSSupportsRule\")) {\n supportedNestedCSSRuleTypes.CSSSupportsRule = win.CSSSupportsRule;\n }\n }\n const unmodifiedFunctions = {};\n Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => {\n unmodifiedFunctions[typeKey] = {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n insertRule: type.prototype.insertRule,\n // eslint-disable-next-line @typescript-eslint/unbound-method\n deleteRule: type.prototype.deleteRule\n };\n type.prototype.insertRule = new Proxy(\n unmodifiedFunctions[typeKey].insertRule,\n {\n apply: callbackWrapper(\n (target, thisArg, argumentsList) => {\n const [rule, index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(\n thisArg.parentStyleSheet,\n mirror2,\n stylesheetManager.styleMirror\n );\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleSheetRuleCb({\n id,\n styleId,\n adds: [\n {\n rule,\n index: [\n ...getNestedCSSRulePositions(thisArg),\n index || 0\n // defaults to 0\n ]\n }\n ]\n });\n }\n return target.apply(thisArg, argumentsList);\n }\n )\n }\n );\n type.prototype.deleteRule = new Proxy(\n unmodifiedFunctions[typeKey].deleteRule,\n {\n apply: callbackWrapper(\n (target, thisArg, argumentsList) => {\n const [index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(\n thisArg.parentStyleSheet,\n mirror2,\n stylesheetManager.styleMirror\n );\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleSheetRuleCb({\n id,\n styleId,\n removes: [\n { index: [...getNestedCSSRulePositions(thisArg), index] }\n ]\n });\n }\n return target.apply(thisArg, argumentsList);\n }\n )\n }\n );\n });\n return callbackWrapper(() => {\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(([typeKey, type]) => {\n type.prototype.insertRule = unmodifiedFunctions[typeKey].insertRule;\n type.prototype.deleteRule = unmodifiedFunctions[typeKey].deleteRule;\n });\n });\n}\nfunction initAdoptedStyleSheetObserver({\n mirror: mirror2,\n stylesheetManager\n}, host) {\n let hostId = null;\n if (host.nodeName === \"#document\") hostId = mirror2.getId(host);\n else hostId = mirror2.getId(host.host);\n const patchTarget = host.nodeName === \"#document\" ? host.defaultView?.Document : host.ownerDocument?.defaultView?.ShadowRoot;\n const originalPropertyDescriptor = patchTarget?.prototype ? Object.getOwnPropertyDescriptor(\n patchTarget?.prototype,\n \"adoptedStyleSheets\"\n ) : void 0;\n if (hostId === null || hostId === -1 || !patchTarget || !originalPropertyDescriptor)\n return () => {\n };\n Object.defineProperty(host, \"adoptedStyleSheets\", {\n configurable: originalPropertyDescriptor.configurable,\n enumerable: originalPropertyDescriptor.enumerable,\n get() {\n return originalPropertyDescriptor.get?.call(this);\n },\n set(sheets) {\n const result = originalPropertyDescriptor.set?.call(this, sheets);\n if (hostId !== null && hostId !== -1) {\n try {\n stylesheetManager.adoptStyleSheets(sheets, hostId);\n } catch (e2) {\n }\n }\n return result;\n }\n });\n return callbackWrapper(() => {\n Object.defineProperty(host, \"adoptedStyleSheets\", {\n configurable: originalPropertyDescriptor.configurable,\n enumerable: originalPropertyDescriptor.enumerable,\n // eslint-disable-next-line @typescript-eslint/unbound-method\n get: originalPropertyDescriptor.get,\n // eslint-disable-next-line @typescript-eslint/unbound-method\n set: originalPropertyDescriptor.set\n });\n });\n}\nfunction initStyleDeclarationObserver({\n styleDeclarationCb,\n mirror: mirror2,\n ignoreCSSAttributes,\n stylesheetManager\n}, { win }) {\n const setProperty = win.CSSStyleDeclaration.prototype.setProperty;\n win.CSSStyleDeclaration.prototype.setProperty = new Proxy(setProperty, {\n apply: callbackWrapper(\n (target, thisArg, argumentsList) => {\n const [property, value, priority] = argumentsList;\n if (ignoreCSSAttributes.has(property)) {\n return setProperty.apply(thisArg, [property, value, priority]);\n }\n const { id, styleId } = getIdAndStyleId(\n thisArg.parentRule?.parentStyleSheet,\n mirror2,\n stylesheetManager.styleMirror\n );\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleDeclarationCb({\n id,\n styleId,\n set: {\n property,\n value,\n priority\n },\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n index: getNestedCSSRulePositions(thisArg.parentRule)\n });\n }\n return target.apply(thisArg, argumentsList);\n }\n )\n });\n const removeProperty = win.CSSStyleDeclaration.prototype.removeProperty;\n win.CSSStyleDeclaration.prototype.removeProperty = new Proxy(removeProperty, {\n apply: callbackWrapper(\n (target, thisArg, argumentsList) => {\n const [property] = argumentsList;\n if (ignoreCSSAttributes.has(property)) {\n return removeProperty.apply(thisArg, [property]);\n }\n const { id, styleId } = getIdAndStyleId(\n thisArg.parentRule?.parentStyleSheet,\n mirror2,\n stylesheetManager.styleMirror\n );\n if (id && id !== -1 || styleId && styleId !== -1) {\n styleDeclarationCb({\n id,\n styleId,\n remove: {\n property\n },\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n index: getNestedCSSRulePositions(thisArg.parentRule)\n });\n }\n return target.apply(thisArg, argumentsList);\n }\n )\n });\n return callbackWrapper(() => {\n win.CSSStyleDeclaration.prototype.setProperty = setProperty;\n win.CSSStyleDeclaration.prototype.removeProperty = removeProperty;\n });\n}\nfunction initMediaInteractionObserver({\n mediaInteractionCb,\n blockClass,\n blockSelector,\n unblockSelector,\n mirror: mirror2,\n sampling,\n doc\n}) {\n const handler = callbackWrapper(\n (type) => throttle$1(\n callbackWrapper((event) => {\n const target = getEventTarget(event);\n if (!target || isBlocked(\n target,\n blockClass,\n blockSelector,\n unblockSelector,\n true\n )) {\n return;\n }\n const { currentTime, volume, muted, playbackRate } = target;\n mediaInteractionCb({\n type,\n id: mirror2.getId(target),\n currentTime,\n volume,\n muted,\n playbackRate\n });\n }),\n sampling.media || 500\n )\n );\n const handlers = [\n on(\"play\", handler(MediaInteractions.Play), doc),\n on(\"pause\", handler(MediaInteractions.Pause), doc),\n on(\"seeked\", handler(MediaInteractions.Seeked), doc),\n on(\"volumechange\", handler(MediaInteractions.VolumeChange), doc),\n on(\"ratechange\", handler(MediaInteractions.RateChange), doc)\n ];\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction initFontObserver({ fontCb, doc }) {\n const win = doc.defaultView;\n if (!win) {\n return () => {\n };\n }\n const handlers = [];\n const fontMap = /* @__PURE__ */ new WeakMap();\n const originalFontFace = win.FontFace;\n win.FontFace = function FontFace2(family, source, descriptors) {\n const fontFace = new originalFontFace(family, source, descriptors);\n fontMap.set(fontFace, {\n family,\n buffer: typeof source !== \"string\",\n descriptors,\n fontSource: typeof source === \"string\" ? source : JSON.stringify(Array.from(new Uint8Array(source)))\n });\n return fontFace;\n };\n const restoreHandler = patch(\n doc.fonts,\n \"add\",\n function(original) {\n return function(fontFace) {\n setTimeout$2(\n callbackWrapper(() => {\n const p = fontMap.get(fontFace);\n if (p) {\n fontCb(p);\n fontMap.delete(fontFace);\n }\n }),\n 0\n );\n return original.apply(this, [fontFace]);\n };\n }\n );\n handlers.push(() => {\n win.FontFace = originalFontFace;\n });\n handlers.push(restoreHandler);\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction initSelectionObserver(param) {\n const {\n doc,\n mirror: mirror2,\n blockClass,\n blockSelector,\n unblockSelector,\n selectionCb\n } = param;\n let collapsed = true;\n const updateSelection = callbackWrapper(() => {\n const selection = doc.getSelection();\n if (!selection || collapsed && selection?.isCollapsed) return;\n collapsed = selection.isCollapsed || false;\n const ranges = [];\n const count = selection.rangeCount || 0;\n for (let i2 = 0; i2 < count; i2++) {\n const range = selection.getRangeAt(i2);\n const { startContainer, startOffset, endContainer, endOffset } = range;\n const blocked = isBlocked(\n startContainer,\n blockClass,\n blockSelector,\n unblockSelector,\n true\n ) || isBlocked(\n endContainer,\n blockClass,\n blockSelector,\n unblockSelector,\n true\n );\n if (blocked) continue;\n ranges.push({\n start: mirror2.getId(startContainer),\n startOffset,\n end: mirror2.getId(endContainer),\n endOffset\n });\n }\n selectionCb({ ranges });\n });\n updateSelection();\n return on(\"selectionchange\", updateSelection);\n}\nfunction initCustomElementObserver({\n doc,\n customElementCb\n}) {\n const win = doc.defaultView;\n if (!win || !win.customElements) return () => {\n };\n const restoreHandler = patch(\n win.customElements,\n \"define\",\n function(original) {\n return function(name, constructor, options) {\n try {\n customElementCb({\n define: {\n name\n }\n });\n } catch (e2) {\n }\n return original.apply(this, [name, constructor, options]);\n };\n }\n );\n return restoreHandler;\n}\nfunction initObservers(o2, _hooks = {}) {\n const currentWindow = o2.doc.defaultView;\n if (!currentWindow) {\n return () => {\n };\n }\n let mutationObserver;\n if (o2.recordDOM) {\n mutationObserver = initMutationObserver(o2, o2.doc);\n }\n const mousemoveHandler = initMoveObserver(o2);\n const mouseInteractionHandler = initMouseInteractionObserver(o2);\n const scrollHandler = initScrollObserver(o2);\n const viewportResizeHandler = initViewportResizeObserver(o2, {\n win: currentWindow\n });\n const inputHandler = initInputObserver(o2);\n const mediaInteractionHandler = initMediaInteractionObserver(o2);\n let styleSheetObserver = () => {\n };\n let adoptedStyleSheetObserver = () => {\n };\n let styleDeclarationObserver = () => {\n };\n let fontObserver = () => {\n };\n if (o2.recordDOM) {\n styleSheetObserver = initStyleSheetObserver(o2, { win: currentWindow });\n adoptedStyleSheetObserver = initAdoptedStyleSheetObserver(o2, o2.doc);\n styleDeclarationObserver = initStyleDeclarationObserver(o2, {\n win: currentWindow\n });\n if (o2.collectFonts) {\n fontObserver = initFontObserver(o2);\n }\n }\n const selectionObserver = initSelectionObserver(o2);\n const customElementObserver = initCustomElementObserver(o2);\n const pluginHandlers = [];\n for (const plugin of o2.plugins) {\n pluginHandlers.push(\n plugin.observer(plugin.callback, currentWindow, plugin.options)\n );\n }\n return callbackWrapper(() => {\n mutationBuffers.forEach((b) => b.reset());\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((h) => h());\n });\n}\nfunction hasNestedCSSRule(prop) {\n return typeof window[prop] !== \"undefined\";\n}\nfunction canMonkeyPatchNestedCSSRule(prop) {\n return Boolean(\n typeof window[prop] !== \"undefined\" && // Note: Generally, this check _shouldn't_ be necessary\n // However, in some scenarios (e.g. jsdom) this can sometimes fail, so we check for it here\n window[prop].prototype && \"insertRule\" in window[prop].prototype && \"deleteRule\" in window[prop].prototype\n );\n}\nclass CrossOriginIframeMirror {\n constructor(generateIdFn) {\n this.generateIdFn = generateIdFn;\n this.iframeIdToRemoteIdMap = /* @__PURE__ */ new WeakMap();\n this.iframeRemoteIdToIdMap = /* @__PURE__ */ new WeakMap();\n }\n getId(iframe, remoteId, idToRemoteMap, remoteToIdMap) {\n const idToRemoteIdMap = idToRemoteMap || this.getIdToRemoteIdMap(iframe);\n const remoteIdToIdMap = remoteToIdMap || this.getRemoteIdToIdMap(iframe);\n let id = idToRemoteIdMap.get(remoteId);\n if (!id) {\n id = this.generateIdFn();\n idToRemoteIdMap.set(remoteId, id);\n remoteIdToIdMap.set(id, remoteId);\n }\n return id;\n }\n getIds(iframe, remoteId) {\n const idToRemoteIdMap = this.getIdToRemoteIdMap(iframe);\n const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\n return remoteId.map(\n (id) => this.getId(iframe, id, idToRemoteIdMap, remoteIdToIdMap)\n );\n }\n getRemoteId(iframe, id, map) {\n const remoteIdToIdMap = map || this.getRemoteIdToIdMap(iframe);\n if (typeof id !== \"number\") return id;\n const remoteId = remoteIdToIdMap.get(id);\n if (!remoteId) return -1;\n return remoteId;\n }\n getRemoteIds(iframe, ids) {\n const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\n return ids.map((id) => this.getRemoteId(iframe, id, remoteIdToIdMap));\n }\n reset(iframe) {\n if (!iframe) {\n this.iframeIdToRemoteIdMap = /* @__PURE__ */ new WeakMap();\n this.iframeRemoteIdToIdMap = /* @__PURE__ */ new WeakMap();\n return;\n }\n this.iframeIdToRemoteIdMap.delete(iframe);\n this.iframeRemoteIdToIdMap.delete(iframe);\n }\n getIdToRemoteIdMap(iframe) {\n let idToRemoteIdMap = this.iframeIdToRemoteIdMap.get(iframe);\n if (!idToRemoteIdMap) {\n idToRemoteIdMap = /* @__PURE__ */ new Map();\n this.iframeIdToRemoteIdMap.set(iframe, idToRemoteIdMap);\n }\n return idToRemoteIdMap;\n }\n getRemoteIdToIdMap(iframe) {\n let remoteIdToIdMap = this.iframeRemoteIdToIdMap.get(iframe);\n if (!remoteIdToIdMap) {\n remoteIdToIdMap = /* @__PURE__ */ new Map();\n this.iframeRemoteIdToIdMap.set(iframe, remoteIdToIdMap);\n }\n return remoteIdToIdMap;\n }\n}\nclass IframeManagerNoop {\n constructor() {\n this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n this.crossOriginIframeRootIdMap = /* @__PURE__ */ new WeakMap();\n }\n addIframe() {\n }\n addLoadListener() {\n }\n attachIframe() {\n }\n}\nclass IframeManager {\n constructor(options) {\n this.iframes = /* @__PURE__ */ new WeakMap();\n this.crossOriginIframeMap = /* @__PURE__ */ new WeakMap();\n this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n this.crossOriginIframeRootIdMap = /* @__PURE__ */ 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(\n this.stylesheetManager.styleMirror.generateId.bind(\n this.stylesheetManager.styleMirror\n )\n );\n this.mirror = options.mirror;\n if (this.recordCrossOriginIframes) {\n window.addEventListener(\"message\", this.handleMessage.bind(this));\n }\n }\n addIframe(iframeEl) {\n this.iframes.set(iframeEl, true);\n const contentWindow = getIFrameContentWindow(iframeEl);\n if (contentWindow) this.crossOriginIframeMap.set(contentWindow, iframeEl);\n }\n addLoadListener(cb) {\n this.loadListener = cb;\n }\n attachIframe(iframeEl, childSn) {\n this.mutationCb({\n adds: [\n {\n parentId: this.mirror.getId(iframeEl),\n nextId: null,\n node: childSn\n }\n ],\n removes: [],\n texts: [],\n attributes: [],\n isAttachIframe: true\n });\n if (this.recordCrossOriginIframes) {\n getIFrameContentWindow(iframeEl)?.addEventListener(\n \"message\",\n this.handleMessage.bind(this)\n );\n }\n this.loadListener?.(iframeEl);\n const iframeDoc = getIFrameContentDocument(iframeEl);\n if (iframeDoc && iframeDoc.adoptedStyleSheets && iframeDoc.adoptedStyleSheets.length > 0)\n this.stylesheetManager.adoptStyleSheets(\n iframeDoc.adoptedStyleSheets,\n this.mirror.getId(iframeDoc)\n );\n }\n handleMessage(message) {\n const crossOriginMessageEvent = message;\n if (crossOriginMessageEvent.data.type !== \"rrweb\" || // To filter out the rrweb messages which are forwarded by some sites.\n crossOriginMessageEvent.origin !== crossOriginMessageEvent.data.origin)\n return;\n const iframeSourceWindow = message.source;\n if (!iframeSourceWindow) return;\n const iframeEl = this.crossOriginIframeMap.get(message.source);\n if (!iframeEl) return;\n const transformedEvent = this.transformCrossOriginEvent(\n iframeEl,\n crossOriginMessageEvent.data.event\n );\n if (transformedEvent)\n this.wrappedEmit(\n transformedEvent,\n crossOriginMessageEvent.data.isCheckout\n );\n }\n transformCrossOriginEvent(iframeEl, e2) {\n switch (e2.type) {\n case EventType.FullSnapshot: {\n this.crossOriginIframeMirror.reset(iframeEl);\n this.crossOriginIframeStyleMirror.reset(iframeEl);\n this.replaceIdOnNode(e2.data.node, iframeEl);\n const rootId = e2.data.node.id;\n this.crossOriginIframeRootIdMap.set(iframeEl, rootId);\n this.patchRootIdOnNode(e2.data.node, rootId);\n return {\n timestamp: e2.timestamp,\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Mutation,\n adds: [\n {\n parentId: this.mirror.getId(iframeEl),\n nextId: null,\n node: e2.data.node\n }\n ],\n removes: [],\n texts: [],\n attributes: [],\n isAttachIframe: true\n }\n };\n }\n case EventType.Meta:\n case EventType.Load:\n case EventType.DomContentLoaded: {\n return false;\n }\n case EventType.Plugin: {\n return e2;\n }\n case EventType.Custom: {\n this.replaceIds(\n e2.data.payload,\n iframeEl,\n [\"id\", \"parentId\", \"previousId\", \"nextId\"]\n );\n return e2;\n }\n case EventType.IncrementalSnapshot: {\n switch (e2.data.source) {\n case IncrementalSource.Mutation: {\n e2.data.adds.forEach((n2) => {\n this.replaceIds(n2, iframeEl, [\n \"parentId\",\n \"nextId\",\n \"previousId\"\n ]);\n this.replaceIdOnNode(n2.node, iframeEl);\n const rootId = this.crossOriginIframeRootIdMap.get(iframeEl);\n rootId && this.patchRootIdOnNode(n2.node, rootId);\n });\n e2.data.removes.forEach((n2) => {\n this.replaceIds(n2, iframeEl, [\"parentId\", \"id\"]);\n });\n e2.data.attributes.forEach((n2) => {\n this.replaceIds(n2, iframeEl, [\"id\"]);\n });\n e2.data.texts.forEach((n2) => {\n this.replaceIds(n2, iframeEl, [\"id\"]);\n });\n return e2;\n }\n case IncrementalSource.Drag:\n case IncrementalSource.TouchMove:\n case IncrementalSource.MouseMove: {\n e2.data.positions.forEach((p) => {\n this.replaceIds(p, iframeEl, [\"id\"]);\n });\n return e2;\n }\n case IncrementalSource.ViewportResize: {\n return false;\n }\n case IncrementalSource.MediaInteraction:\n case IncrementalSource.MouseInteraction:\n case IncrementalSource.Scroll:\n case IncrementalSource.CanvasMutation:\n case IncrementalSource.Input: {\n this.replaceIds(e2.data, iframeEl, [\"id\"]);\n return e2;\n }\n case IncrementalSource.StyleSheetRule:\n case IncrementalSource.StyleDeclaration: {\n this.replaceIds(e2.data, iframeEl, [\"id\"]);\n this.replaceStyleIds(e2.data, iframeEl, [\"styleId\"]);\n return e2;\n }\n case IncrementalSource.Font: {\n return e2;\n }\n case IncrementalSource.Selection: {\n e2.data.ranges.forEach((range) => {\n this.replaceIds(range, iframeEl, [\"start\", \"end\"]);\n });\n return e2;\n }\n case IncrementalSource.AdoptedStyleSheet: {\n this.replaceIds(e2.data, iframeEl, [\"id\"]);\n this.replaceStyleIds(e2.data, iframeEl, [\"styleIds\"]);\n e2.data.styles?.forEach((style) => {\n this.replaceStyleIds(style, iframeEl, [\"styleId\"]);\n });\n return e2;\n }\n }\n }\n }\n return false;\n }\n replace(iframeMirror, obj, iframeEl, keys) {\n for (const key of keys) {\n if (!Array.isArray(obj[key]) && typeof obj[key] !== \"number\") continue;\n if (Array.isArray(obj[key])) {\n obj[key] = iframeMirror.getIds(\n iframeEl,\n obj[key]\n );\n } else {\n obj[key] = iframeMirror.getId(iframeEl, obj[key]);\n }\n }\n return obj;\n }\n replaceIds(obj, iframeEl, keys) {\n return this.replace(this.crossOriginIframeMirror, obj, iframeEl, keys);\n }\n replaceStyleIds(obj, iframeEl, keys) {\n return this.replace(this.crossOriginIframeStyleMirror, obj, iframeEl, keys);\n }\n replaceIdOnNode(node, iframeEl) {\n this.replaceIds(node, iframeEl, [\"id\", \"rootId\"]);\n if (\"childNodes\" in node) {\n node.childNodes.forEach((child) => {\n this.replaceIdOnNode(child, iframeEl);\n });\n }\n }\n patchRootIdOnNode(node, rootId) {\n if (node.type !== NodeType$1.Document && !node.rootId) node.rootId = rootId;\n if (\"childNodes\" in node) {\n node.childNodes.forEach((child) => {\n this.patchRootIdOnNode(child, rootId);\n });\n }\n }\n}\nclass ShadowDomManagerNoop {\n init() {\n }\n addShadowRoot() {\n }\n observeAttachShadow() {\n }\n reset() {\n }\n}\nclass ShadowDomManager {\n constructor(options) {\n this.shadowDoms = /* @__PURE__ */ 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 init() {\n this.reset();\n this.patchAttachShadow(Element, document);\n }\n addShadowRoot(shadowRoot, doc) {\n if (!isNativeShadowDom(shadowRoot)) return;\n if (this.shadowDoms.has(shadowRoot)) return;\n this.shadowDoms.add(shadowRoot);\n this.bypassOptions.canvasManager.addShadowRoot(shadowRoot);\n const observer = initMutationObserver(\n {\n ...this.bypassOptions,\n doc,\n mutationCb: this.mutationCb,\n mirror: this.mirror,\n shadowDomManager: this\n },\n shadowRoot\n );\n this.restoreHandlers.push(() => observer.disconnect());\n this.restoreHandlers.push(\n initScrollObserver({\n ...this.bypassOptions,\n scrollCb: this.scrollCb,\n // https://gist.github.com/praveenpuglia/0832da687ed5a5d7a0907046c9ef1813\n // scroll is not allowed to pass the boundary, so we need to listen the shadow document\n doc: shadowRoot,\n mirror: this.mirror\n })\n );\n setTimeout$2(() => {\n if (shadowRoot.adoptedStyleSheets && shadowRoot.adoptedStyleSheets.length > 0)\n this.bypassOptions.stylesheetManager.adoptStyleSheets(\n shadowRoot.adoptedStyleSheets,\n this.mirror.getId(shadowRoot.host)\n );\n this.restoreHandlers.push(\n initAdoptedStyleSheetObserver(\n {\n mirror: this.mirror,\n stylesheetManager: this.bypassOptions.stylesheetManager\n },\n shadowRoot\n )\n );\n }, 0);\n }\n /**\n * Monkey patch 'attachShadow' of an IFrameElement to observe newly added shadow doms.\n */\n observeAttachShadow(iframeElement) {\n const iframeDoc = getIFrameContentDocument(iframeElement);\n const iframeWindow = getIFrameContentWindow(iframeElement);\n if (!iframeDoc || !iframeWindow) return;\n let iframeElementConstructor;\n try {\n iframeElementConstructor = iframeWindow.Element;\n } catch (e2) {\n return;\n }\n if (!iframeElementConstructor) return;\n this.patchAttachShadow(iframeElementConstructor, iframeDoc);\n }\n /**\n * Patch 'attachShadow' to observe newly added shadow doms.\n */\n patchAttachShadow(element, doc) {\n const manager = this;\n this.restoreHandlers.push(\n patch(\n element.prototype,\n \"attachShadow\",\n function(original) {\n return function(option) {\n const shadowRoot = original.call(this, option);\n if (this.shadowRoot && inDom(this))\n manager.addShadowRoot(this.shadowRoot, doc);\n return shadowRoot;\n };\n }\n )\n );\n }\n reset() {\n this.restoreHandlers.forEach((handler) => {\n try {\n handler();\n } catch (e2) {\n }\n });\n this.restoreHandlers = [];\n this.shadowDoms = /* @__PURE__ */ new WeakSet();\n this.bypassOptions.canvasManager.resetShadowRoots();\n }\n}\nclass StylesheetManager {\n constructor(options) {\n this.trackedLinkElements = /* @__PURE__ */ new WeakSet();\n this.styleMirror = new StyleSheetMirror();\n this.mutationCb = options.mutationCb;\n this.adoptedStyleSheetCb = options.adoptedStyleSheetCb;\n }\n attachLinkElement(linkEl, childSn) {\n if (\"_cssText\" in childSn.attributes)\n this.mutationCb({\n adds: [],\n removes: [],\n texts: [],\n attributes: [\n {\n id: childSn.id,\n attributes: childSn.attributes\n }\n ]\n });\n this.trackLinkElement(linkEl);\n }\n trackLinkElement(linkEl) {\n if (this.trackedLinkElements.has(linkEl)) return;\n this.trackedLinkElements.add(linkEl);\n this.trackStylesheetInLinkElement(linkEl);\n }\n adoptStyleSheets(sheets, hostId) {\n if (sheets.length === 0) return;\n const adoptedStyleSheetData = {\n id: hostId,\n styleIds: []\n };\n const styles = [];\n for (const sheet of sheets) {\n let styleId;\n if (!this.styleMirror.has(sheet)) {\n styleId = this.styleMirror.add(sheet);\n styles.push({\n styleId,\n rules: Array.from(sheet.rules || CSSRule, (r2, index) => ({\n rule: stringifyRule(r2),\n index\n }))\n });\n } else styleId = this.styleMirror.getId(sheet);\n adoptedStyleSheetData.styleIds.push(styleId);\n }\n if (styles.length > 0) adoptedStyleSheetData.styles = styles;\n this.adoptedStyleSheetCb(adoptedStyleSheetData);\n }\n reset() {\n this.styleMirror.reset();\n this.trackedLinkElements = /* @__PURE__ */ new WeakSet();\n }\n // TODO: take snapshot on stylesheet reload by applying event listener\n trackStylesheetInLinkElement(_linkEl) {\n }\n}\nclass ProcessedNodeManager {\n constructor() {\n this.nodeMap = /* @__PURE__ */ new WeakMap();\n this.active = false;\n }\n inOtherBuffer(node, thisBuffer) {\n const buffers = this.nodeMap.get(node);\n return buffers && Array.from(buffers).some((buffer) => buffer !== thisBuffer);\n }\n add(node, buffer) {\n if (!this.active) {\n this.active = true;\n onRequestAnimationFrame(() => {\n this.nodeMap = /* @__PURE__ */ new WeakMap();\n this.active = false;\n });\n }\n this.nodeMap.set(node, (this.nodeMap.get(node) || /* @__PURE__ */ new Set()).add(buffer));\n }\n destroy() {\n }\n}\nlet wrappedEmit;\nlet _takeFullSnapshot;\ntry {\n if (Array.from([1], (x) => x * 2)[0] !== 2) {\n const cleanFrame = document.createElement(\"iframe\");\n document.body.appendChild(cleanFrame);\n Array.from = cleanFrame.contentWindow?.Array.from || Array.from;\n document.body.removeChild(cleanFrame);\n }\n} catch (err) {\n console.debug(\"Unable to override Array.from\", err);\n}\nconst mirror = createMirror();\nfunction record(options = {}) {\n const {\n emit,\n checkoutEveryNms,\n checkoutEveryNth,\n blockClass = \"rr-block\",\n blockSelector = null,\n unblockSelector = null,\n ignoreClass = \"rr-ignore\",\n ignoreSelector = null,\n maskAllText = false,\n maskTextClass = \"rr-mask\",\n unmaskTextClass = null,\n maskTextSelector = null,\n unmaskTextSelector = null,\n inlineStylesheet = true,\n maskAllInputs,\n maskInputOptions: _maskInputOptions,\n slimDOMOptions: _slimDOMOptions,\n maskAttributeFn,\n maskInputFn,\n maskTextFn,\n maxCanvasSize = null,\n packFn,\n sampling = {},\n dataURLOptions = {},\n mousemoveWait,\n recordDOM = true,\n recordCanvas = false,\n recordCrossOriginIframes = false,\n recordAfter = options.recordAfter === \"DOMContentLoaded\" ? options.recordAfter : \"load\",\n userTriggeredOnInput = false,\n collectFonts = false,\n inlineImages = false,\n plugins,\n keepIframeSrcFn = () => false,\n ignoreCSSAttributes = /* @__PURE__ */ new Set([]),\n errorHandler,\n onMutation,\n getCanvasManager\n } = options;\n registerErrorHandler(errorHandler);\n const inEmittingFrame = recordCrossOriginIframes ? window.parent === window : true;\n let passEmitsToParent = false;\n if (!inEmittingFrame) {\n try {\n if (window.parent.document) {\n passEmitsToParent = false;\n }\n } catch (e2) {\n passEmitsToParent = true;\n }\n }\n if (inEmittingFrame && !emit) {\n throw new Error(\"emit function is required\");\n }\n if (!inEmittingFrame && !passEmitsToParent) {\n return () => {\n };\n }\n if (mousemoveWait !== void 0 && sampling.mousemove === void 0) {\n sampling.mousemove = mousemoveWait;\n }\n mirror.reset();\n const 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 !== void 0 ? _maskInputOptions : {};\n const 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 // the following are off for slimDOMOptions === true,\n // as they destroy some (hidden) info:\n headMetaAuthorship: _slimDOMOptions === \"all\",\n headMetaDescKeywords: _slimDOMOptions === \"all\"\n } : _slimDOMOptions ? _slimDOMOptions : {};\n polyfill();\n let lastFullSnapshotEvent;\n let incrementalSnapshotCount = 0;\n const eventProcessor = (e2) => {\n for (const plugin of plugins || []) {\n if (plugin.eventProcessor) {\n e2 = plugin.eventProcessor(e2);\n }\n }\n if (packFn && // Disable packing events which will be emitted to parent frames.\n !passEmitsToParent) {\n e2 = packFn(e2);\n }\n return e2;\n };\n wrappedEmit = (r2, isCheckout) => {\n const e2 = r2;\n e2.timestamp = nowTimestamp();\n if (mutationBuffers[0]?.isFrozen() && e2.type !== EventType.FullSnapshot && !(e2.type === EventType.IncrementalSnapshot && e2.data.source === IncrementalSource.Mutation)) {\n mutationBuffers.forEach((buf) => buf.unfreeze());\n }\n if (inEmittingFrame) {\n emit?.(eventProcessor(e2), isCheckout);\n } else if (passEmitsToParent) {\n const message = {\n type: \"rrweb\",\n event: eventProcessor(e2),\n origin: window.location.origin,\n isCheckout\n };\n window.parent.postMessage(message, \"*\");\n }\n if (e2.type === EventType.FullSnapshot) {\n lastFullSnapshotEvent = e2;\n incrementalSnapshotCount = 0;\n } else if (e2.type === EventType.IncrementalSnapshot) {\n if (e2.data.source === IncrementalSource.Mutation && e2.data.isAttachIframe) {\n return;\n }\n incrementalSnapshotCount++;\n const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;\n const exceedTime = checkoutEveryNms && lastFullSnapshotEvent && e2.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;\n if (exceedCount || exceedTime) {\n takeFullSnapshot2(true);\n }\n }\n };\n const wrappedMutationEmit = (m) => {\n wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Mutation,\n ...m\n }\n });\n };\n const wrappedScrollEmit = (p) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Scroll,\n ...p\n }\n });\n const wrappedCanvasMutationEmit = (p) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.CanvasMutation,\n ...p\n }\n });\n const wrappedAdoptedStyleSheetEmit = (a2) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.AdoptedStyleSheet,\n ...a2\n }\n });\n const stylesheetManager = new StylesheetManager({\n mutationCb: wrappedMutationEmit,\n adoptedStyleSheetCb: wrappedAdoptedStyleSheetEmit\n });\n const iframeManager = typeof __RRWEB_EXCLUDE_IFRAME__ === \"boolean\" && __RRWEB_EXCLUDE_IFRAME__ ? new IframeManagerNoop() : new IframeManager({\n mirror,\n mutationCb: wrappedMutationEmit,\n stylesheetManager,\n recordCrossOriginIframes,\n wrappedEmit\n });\n for (const plugin of plugins || []) {\n if (plugin.getMirror)\n plugin.getMirror({\n nodeMirror: mirror,\n crossOriginIframeMirror: iframeManager.crossOriginIframeMirror,\n crossOriginIframeStyleMirror: iframeManager.crossOriginIframeStyleMirror\n });\n }\n const processedNodeManager = new ProcessedNodeManager();\n const canvasManager = _getCanvasManager(\n getCanvasManager,\n {\n mirror,\n win: window,\n mutationCb: (p) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.CanvasMutation,\n ...p\n }\n }),\n recordCanvas,\n blockClass,\n blockSelector,\n unblockSelector,\n maxCanvasSize,\n sampling: sampling[\"canvas\"],\n dataURLOptions,\n errorHandler\n }\n );\n const 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,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n inlineStylesheet,\n maskInputOptions,\n dataURLOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n recordCanvas,\n inlineImages,\n sampling,\n slimDOMOptions,\n iframeManager,\n stylesheetManager,\n canvasManager,\n keepIframeSrcFn,\n processedNodeManager,\n ignoreCSSAttributes\n },\n mirror\n });\n const takeFullSnapshot2 = (isCheckout = false) => {\n if (!recordDOM) {\n return;\n }\n wrappedEmit(\n {\n type: EventType.Meta,\n data: {\n href: window.location.href,\n width: getWindowWidth(),\n height: getWindowHeight()\n }\n },\n isCheckout\n );\n stylesheetManager.reset();\n shadowDomManager.init();\n mutationBuffers.forEach((buf) => buf.lock());\n const node = snapshot(document, {\n mirror,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n inlineStylesheet,\n maskAllInputs: maskInputOptions,\n maskAttributeFn,\n maskInputFn,\n maskTextFn,\n slimDOM: slimDOMOptions,\n dataURLOptions,\n recordCanvas,\n inlineImages,\n onSerialize: (n2) => {\n if (isSerializedIframe(n2, mirror)) {\n iframeManager.addIframe(n2);\n }\n if (isSerializedStylesheet(n2, mirror)) {\n stylesheetManager.trackLinkElement(n2);\n }\n if (hasShadowRoot(n2)) {\n shadowDomManager.addShadowRoot(n2.shadowRoot, document);\n }\n },\n onIframeLoad: (iframe, childSn) => {\n iframeManager.attachIframe(iframe, childSn);\n const contentWindow = getIFrameContentWindow(iframe);\n if (contentWindow) {\n canvasManager.addWindow(contentWindow);\n }\n shadowDomManager.observeAttachShadow(iframe);\n },\n onStylesheetLoad: (linkEl, childSn) => {\n stylesheetManager.attachLinkElement(linkEl, childSn);\n },\n onBlockedImageLoad: (_imageEl, serializedNode, { width, height }) => {\n wrappedMutationEmit({\n adds: [],\n removes: [],\n texts: [],\n attributes: [\n {\n id: serializedNode.id,\n attributes: {\n style: {\n width: `${width}px`,\n height: `${height}px`\n }\n }\n }\n ]\n });\n },\n keepIframeSrcFn,\n ignoreCSSAttributes\n });\n if (!node) {\n return console.warn(\"Failed to snapshot the document\");\n }\n wrappedEmit({\n type: EventType.FullSnapshot,\n data: {\n node,\n initialOffset: getWindowScroll(window)\n }\n });\n mutationBuffers.forEach((buf) => buf.unlock());\n if (document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0)\n stylesheetManager.adoptStyleSheets(\n document.adoptedStyleSheets,\n mirror.getId(document)\n );\n };\n _takeFullSnapshot = takeFullSnapshot2;\n try {\n const handlers = [];\n const observe = (doc) => {\n return callbackWrapper(initObservers)(\n {\n onMutation,\n mutationCb: wrappedMutationEmit,\n mousemoveCb: (positions, source) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source,\n positions\n }\n }),\n mouseInteractionCb: (d) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.MouseInteraction,\n ...d\n }\n }),\n scrollCb: wrappedScrollEmit,\n viewportResizeCb: (d) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.ViewportResize,\n ...d\n }\n }),\n inputCb: (v2) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Input,\n ...v2\n }\n }),\n mediaInteractionCb: (p) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.MediaInteraction,\n ...p\n }\n }),\n styleSheetRuleCb: (r2) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.StyleSheetRule,\n ...r2\n }\n }),\n styleDeclarationCb: (r2) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.StyleDeclaration,\n ...r2\n }\n }),\n canvasMutationCb: wrappedCanvasMutationEmit,\n fontCb: (p) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Font,\n ...p\n }\n }),\n selectionCb: (p) => {\n wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Selection,\n ...p\n }\n });\n },\n customElementCb: (c2) => {\n wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.CustomElement,\n ...c2\n }\n });\n },\n blockClass,\n ignoreClass,\n ignoreSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n maskInputOptions,\n inlineStylesheet,\n sampling,\n recordDOM,\n recordCanvas,\n inlineImages,\n userTriggeredOnInput,\n collectFonts,\n doc,\n maskAttributeFn,\n maskInputFn,\n maskTextFn,\n keepIframeSrcFn,\n blockSelector,\n unblockSelector,\n slimDOMOptions,\n dataURLOptions,\n mirror,\n iframeManager,\n stylesheetManager,\n shadowDomManager,\n processedNodeManager,\n canvasManager,\n ignoreCSSAttributes,\n plugins: plugins?.filter((p) => p.observer)?.map((p) => ({\n observer: p.observer,\n options: p.options,\n callback: (payload) => wrappedEmit({\n type: EventType.Plugin,\n data: {\n plugin: p.name,\n payload\n }\n })\n })) || []\n },\n {}\n );\n };\n iframeManager.addLoadListener((iframeEl) => {\n try {\n handlers.push(observe(iframeEl.contentDocument));\n } catch (error) {\n console.warn(error);\n }\n });\n const init = () => {\n takeFullSnapshot2();\n handlers.push(observe(document));\n };\n if (document.readyState === \"interactive\" || document.readyState === \"complete\") {\n init();\n } else {\n handlers.push(\n on(\"DOMContentLoaded\", () => {\n wrappedEmit({\n type: EventType.DomContentLoaded,\n data: {}\n });\n if (recordAfter === \"DOMContentLoaded\") init();\n })\n );\n handlers.push(\n on(\n \"load\",\n () => {\n wrappedEmit({\n type: EventType.Load,\n data: {}\n });\n if (recordAfter === \"load\") init();\n },\n window\n )\n );\n }\n return () => {\n handlers.forEach((h) => h());\n processedNodeManager.destroy();\n _takeFullSnapshot = void 0;\n unregisterErrorHandler();\n };\n } catch (error) {\n console.warn(error);\n }\n}\nfunction takeFullSnapshot(isCheckout) {\n if (!_takeFullSnapshot) {\n throw new Error(\"please take full snapshot after start recording\");\n }\n _takeFullSnapshot(isCheckout);\n}\nrecord.mirror = mirror;\nrecord.takeFullSnapshot = takeFullSnapshot;\nfunction _getCanvasManager(getCanvasManagerFn, options) {\n try {\n return getCanvasManagerFn ? getCanvasManagerFn(options) : new CanvasManagerNoop();\n } catch {\n console.warn(\"Unable to initialize CanvasManager\");\n return new CanvasManagerNoop();\n }\n}\nvar n;\n!(function(t2) {\n t2[t2.NotStarted = 0] = \"NotStarted\", t2[t2.Running = 1] = \"Running\", t2[t2.Stopped = 2] = \"Stopped\";\n})(n || (n = {}));\n\nconst ReplayEventTypeIncrementalSnapshot = 3;\nconst ReplayEventTypeCustom = 5;\n\nfunction timestampToMs(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp : timestamp * 1e3;\n}\nfunction timestampToS(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1e3 : timestamp;\n}\n\nfunction addBreadcrumbEvent(replay, breadcrumb) {\n if (breadcrumb.category === \"sentry.transaction\") {\n return;\n }\n if ([\"ui.click\", \"ui.input\"].includes(breadcrumb.category)) {\n replay.triggerUserActivity();\n } else {\n replay.checkAndHandleExpiredSession();\n }\n replay.addUpdate(() => {\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) * 1e3,\n data: {\n tag: \"breadcrumb\",\n // normalize to max. 10 depth and 1_000 properties per object\n payload: normalize(breadcrumb, 10, 1e3)\n }\n });\n return breadcrumb.category === \"console\";\n });\n}\n\nconst INTERACTIVE_SELECTOR = \"button,a\";\nfunction getClosestInteractive(element) {\n const closestInteractive = element.closest(INTERACTIVE_SELECTOR);\n return closestInteractive || element;\n}\nfunction getClickTargetNode(event) {\n const target = getTargetNode(event);\n if (!target || !(target instanceof Element)) {\n return target;\n }\n return getClosestInteractive(target);\n}\nfunction getTargetNode(event) {\n if (isEventWithTarget(event)) {\n return event.target;\n }\n return event;\n}\nfunction isEventWithTarget(event) {\n return isObjectLike(event) && \"target\" in event;\n}\n\nlet handlers;\nfunction onWindowOpen(cb) {\n if (!handlers) {\n handlers = [];\n monkeyPatchWindowOpen();\n }\n handlers.push(cb);\n return () => {\n const pos = handlers ? handlers.indexOf(cb) : -1;\n if (pos > -1) {\n handlers.splice(pos, 1);\n }\n };\n}\nfunction monkeyPatchWindowOpen() {\n fill(WINDOW, \"open\", function(originalWindowOpen) {\n return function(...args) {\n if (handlers) {\n try {\n handlers.forEach((handler) => handler());\n } catch {\n }\n }\n return originalWindowOpen.apply(WINDOW, args);\n };\n });\n}\n\nconst IncrementalMutationSources = /* @__PURE__ */ new Set([\n IncrementalSource.Mutation,\n IncrementalSource.StyleSheetRule,\n IncrementalSource.StyleDeclaration,\n IncrementalSource.AdoptedStyleSheet,\n IncrementalSource.CanvasMutation,\n IncrementalSource.Selection,\n IncrementalSource.MediaInteraction\n]);\nfunction handleClick(clickDetector, clickBreadcrumb, node) {\n clickDetector.handleClick(clickBreadcrumb, node);\n}\nclass ClickDetector {\n constructor(replay, slowClickConfig, _addBreadcrumbEvent = addBreadcrumbEvent) {\n this._lastMutation = 0;\n this._lastScroll = 0;\n this._clicks = [];\n this._timeout = slowClickConfig.timeout / 1e3;\n this._threshold = slowClickConfig.threshold / 1e3;\n this._scrollTimeout = slowClickConfig.scrollTimeout / 1e3;\n this._replay = replay;\n this._ignoreSelector = slowClickConfig.ignoreSelector;\n this._addBreadcrumbEvent = _addBreadcrumbEvent;\n }\n /** Register click detection handlers on mutation or scroll. */\n addListeners() {\n const cleanupWindowOpen = onWindowOpen(() => {\n this._lastMutation = nowInSeconds();\n });\n this._teardown = () => {\n cleanupWindowOpen();\n this._clicks = [];\n this._lastMutation = 0;\n this._lastScroll = 0;\n };\n }\n /** Clean up listeners. */\n removeListeners() {\n if (this._teardown) {\n this._teardown();\n }\n if (this._checkClickTimeout) {\n clearTimeout(this._checkClickTimeout);\n }\n }\n /** @inheritDoc */\n handleClick(breadcrumb, node) {\n if (ignoreElement(node, this._ignoreSelector) || !isClickBreadcrumb(breadcrumb)) {\n return;\n }\n const 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\n };\n if (this._clicks.some((click) => click.node === newClick.node && Math.abs(click.timestamp - newClick.timestamp) < 1)) {\n return;\n }\n this._clicks.push(newClick);\n if (this._clicks.length === 1) {\n this._scheduleCheckClicks();\n }\n }\n /** @inheritDoc */\n registerMutation(timestamp = Date.now()) {\n this._lastMutation = timestampToS(timestamp);\n }\n /** @inheritDoc */\n registerScroll(timestamp = Date.now()) {\n this._lastScroll = timestampToS(timestamp);\n }\n /** @inheritDoc */\n registerClick(element) {\n const node = getClosestInteractive(element);\n this._handleMultiClick(node);\n }\n /** Count multiple clicks on elements. */\n _handleMultiClick(node) {\n this._getClicks(node).forEach((click) => {\n click.clickCount++;\n });\n }\n /** Get all pending clicks for a given node. */\n _getClicks(node) {\n return this._clicks.filter((click) => click.node === node);\n }\n /** Check the clicks that happened. */\n _checkClicks() {\n const timedOutClicks = [];\n const now = nowInSeconds();\n this._clicks.forEach((click) => {\n if (!click.mutationAfter && this._lastMutation) {\n click.mutationAfter = click.timestamp <= this._lastMutation ? this._lastMutation - click.timestamp : void 0;\n }\n if (!click.scrollAfter && this._lastScroll) {\n click.scrollAfter = click.timestamp <= this._lastScroll ? this._lastScroll - click.timestamp : void 0;\n }\n if (click.timestamp + this._timeout <= now) {\n timedOutClicks.push(click);\n }\n });\n for (const click of timedOutClicks) {\n const pos = this._clicks.indexOf(click);\n if (pos > -1) {\n this._generateBreadcrumbs(click);\n this._clicks.splice(pos, 1);\n }\n }\n if (this._clicks.length) {\n this._scheduleCheckClicks();\n }\n }\n /** Generate matching breadcrumb(s) for the click. */\n _generateBreadcrumbs(click) {\n const replay = this._replay;\n const hadScroll = click.scrollAfter && click.scrollAfter <= this._scrollTimeout;\n const hadMutation = click.mutationAfter && click.mutationAfter <= this._threshold;\n const isSlowClick = !hadScroll && !hadMutation;\n const { clickCount, clickBreadcrumb } = click;\n if (isSlowClick) {\n const timeAfterClickMs = Math.min(click.mutationAfter || this._timeout, this._timeout) * 1e3;\n const endReason = timeAfterClickMs < this._timeout * 1e3 ? \"mutation\" : \"timeout\";\n const breadcrumb = {\n type: \"default\",\n message: clickBreadcrumb.message,\n timestamp: clickBreadcrumb.timestamp,\n category: \"ui.slowClickDetected\",\n data: {\n ...clickBreadcrumb.data,\n url: WINDOW.location.href,\n route: replay.getCurrentRoute(),\n timeAfterClickMs,\n 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 this._addBreadcrumbEvent(replay, breadcrumb);\n return;\n }\n if (clickCount > 1) {\n const breadcrumb = {\n type: \"default\",\n message: clickBreadcrumb.message,\n timestamp: clickBreadcrumb.timestamp,\n category: \"ui.multiClick\",\n data: {\n ...clickBreadcrumb.data,\n url: WINDOW.location.href,\n route: replay.getCurrentRoute(),\n clickCount,\n metric: true\n }\n };\n this._addBreadcrumbEvent(replay, breadcrumb);\n }\n }\n /** Schedule to check current clicks. */\n _scheduleCheckClicks() {\n if (this._checkClickTimeout) {\n clearTimeout(this._checkClickTimeout);\n }\n this._checkClickTimeout = setTimeout$3(() => this._checkClicks(), 1e3);\n }\n}\nconst SLOW_CLICK_TAGS = [\"A\", \"BUTTON\", \"INPUT\"];\nfunction ignoreElement(node, ignoreSelector) {\n if (!SLOW_CLICK_TAGS.includes(node.tagName)) {\n return true;\n }\n if (node.tagName === \"INPUT\" && ![\"submit\", \"button\"].includes(node.getAttribute(\"type\") || \"\")) {\n return true;\n }\n if (node.tagName === \"A\" && (node.hasAttribute(\"download\") || node.hasAttribute(\"target\") && node.getAttribute(\"target\") !== \"_self\")) {\n return true;\n }\n if (ignoreSelector && node.matches(ignoreSelector)) {\n return true;\n }\n return false;\n}\nfunction isClickBreadcrumb(breadcrumb) {\n return !!(breadcrumb.data && typeof breadcrumb.data.nodeId === \"number\" && breadcrumb.timestamp);\n}\nfunction nowInSeconds() {\n return Date.now() / 1e3;\n}\nfunction updateClickDetectorForRecordingEvent(clickDetector, event) {\n try {\n if (!isIncrementalEvent(event)) {\n return;\n }\n const { source } = event.data;\n if (IncrementalMutationSources.has(source)) {\n clickDetector.registerMutation(event.timestamp);\n }\n if (source === IncrementalSource.Scroll) {\n clickDetector.registerScroll(event.timestamp);\n }\n if (isIncrementalMouseInteraction(event)) {\n const { type, id } = event.data;\n const node = record.mirror.getNode(id);\n if (node instanceof HTMLElement && type === MouseInteractions.Click) {\n clickDetector.registerClick(node);\n }\n }\n } catch {\n }\n}\nfunction isIncrementalEvent(event) {\n return event.type === ReplayEventTypeIncrementalSnapshot;\n}\nfunction isIncrementalMouseInteraction(event) {\n return event.data.source === IncrementalSource.MouseInteraction;\n}\n\nfunction createBreadcrumb(breadcrumb) {\n return {\n timestamp: Date.now() / 1e3,\n type: \"default\",\n ...breadcrumb\n };\n}\n\nvar NodeType = /* @__PURE__ */ ((NodeType2) => {\n NodeType2[NodeType2[\"Document\"] = 0] = \"Document\";\n NodeType2[NodeType2[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType2[NodeType2[\"Element\"] = 2] = \"Element\";\n NodeType2[NodeType2[\"Text\"] = 3] = \"Text\";\n NodeType2[NodeType2[\"CDATA\"] = 4] = \"CDATA\";\n NodeType2[NodeType2[\"Comment\"] = 5] = \"Comment\";\n return NodeType2;\n})(NodeType || {});\n\nconst ATTRIBUTES_TO_RECORD = /* @__PURE__ */ new Set([\n \"id\",\n \"class\",\n \"aria-label\",\n \"role\",\n \"name\",\n \"alt\",\n \"title\",\n \"data-test-id\",\n \"data-testid\",\n \"disabled\",\n \"aria-disabled\",\n \"data-sentry-component\"\n]);\nconst BREADCRUMB_RELEVANT_ATTRIBUTES = /* @__PURE__ */ new Set([...ATTRIBUTES_TO_RECORD, \"data-sentry-element\"]);\nfunction getAttributesToRecord(attributes) {\n const obj = {};\n for (const key in attributes) {\n if (ATTRIBUTES_TO_RECORD.has(key)) {\n let normalizedKey = key;\n if (key === \"data-testid\" || key === \"data-test-id\") {\n normalizedKey = \"testId\";\n }\n obj[normalizedKey] = attributes[key];\n }\n }\n if (!obj[\"data-sentry-component\"] && attributes[\"data-sentry-element\"]) {\n obj[\"data-sentry-component\"] = attributes[\"data-sentry-element\"];\n }\n return obj;\n}\n\nconst handleDomListener = (replay) => {\n return (handlerData) => {\n if (!replay.isEnabled()) {\n return;\n }\n const result = handleDom(handlerData);\n if (!result) {\n return;\n }\n const isClick = handlerData.name === \"click\";\n const event = isClick ? handlerData.event : void 0;\n if (isClick && replay.clickDetector && event?.target && !event.altKey && !event.metaKey && !event.ctrlKey && !event.shiftKey) {\n handleClick(\n replay.clickDetector,\n result,\n getClickTargetNode(handlerData.event)\n );\n }\n addBreadcrumbEvent(replay, result);\n };\n};\nfunction getBaseDomBreadcrumb(target, message) {\n const nodeId = record.mirror.getId(target);\n const node = nodeId && record.mirror.getNode(nodeId);\n const meta = node && record.mirror.getMeta(node);\n const element = meta && isElement(meta) ? meta : null;\n return {\n message,\n data: element ? {\n nodeId,\n node: {\n id: nodeId,\n tagName: element.tagName,\n textContent: Array.from(element.childNodes).map((node2) => node2.type === NodeType.Text && node2.textContent).filter(Boolean).map((text) => text.trim()).join(\"\"),\n attributes: getAttributesToRecord(element.attributes)\n }\n } : {}\n };\n}\nfunction handleDom(handlerData) {\n const { target, message } = getDomTarget(handlerData);\n return createBreadcrumb({\n category: `ui.${handlerData.name}`,\n ...getBaseDomBreadcrumb(target, message)\n });\n}\nfunction getDomTarget(handlerData) {\n const isClick = handlerData.name === \"click\";\n let message;\n let target = null;\n try {\n target = isClick ? getClickTargetNode(handlerData.event) : getTargetNode(handlerData.event);\n message = htmlTreeAsString(target, { maxStringLength: 200 }) || \"\";\n } catch {\n message = \"\";\n }\n return { target, message };\n}\nfunction isElement(node) {\n return node.type === NodeType.Element;\n}\n\nfunction handleKeyboardEvent(replay, event) {\n if (!replay.isEnabled()) {\n return;\n }\n replay.updateUserActivity();\n const breadcrumb = getKeyboardBreadcrumb(event);\n if (!breadcrumb) {\n return;\n }\n addBreadcrumbEvent(replay, breadcrumb);\n}\nfunction getKeyboardBreadcrumb(event) {\n const { metaKey, shiftKey, ctrlKey, altKey, key, target } = event;\n if (!target || isInputElement(target) || !key) {\n return null;\n }\n const hasModifierKey = metaKey || ctrlKey || altKey;\n const isCharacterKey = key.length === 1;\n if (!hasModifierKey && isCharacterKey) {\n return null;\n }\n const message = htmlTreeAsString(target, { maxStringLength: 200 }) || \"\";\n const baseBreadcrumb = getBaseDomBreadcrumb(target, message);\n return createBreadcrumb({\n category: \"ui.keyDown\",\n message,\n data: {\n ...baseBreadcrumb.data,\n metaKey,\n shiftKey,\n ctrlKey,\n altKey,\n key\n }\n });\n}\nfunction isInputElement(target) {\n return target.tagName === \"INPUT\" || target.tagName === \"TEXTAREA\" || target.isContentEditable;\n}\n\nconst 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};\nfunction webVitalHandler(getter, replay) {\n return ({ metric }) => void replay.replayPerformanceEntries.push(getter(metric));\n}\nfunction createPerformanceEntries(entries) {\n return entries.map(createPerformanceEntry).filter(Boolean);\n}\nfunction createPerformanceEntry(entry) {\n const entryType = ENTRY_TYPES[entry.entryType];\n if (!entryType) {\n return null;\n }\n return entryType(entry);\n}\nfunction getAbsoluteTime(time) {\n return ((browserPerformanceTimeOrigin() || WINDOW.performance.timeOrigin) + time) / 1e3;\n}\nfunction createPaintEntry(entry) {\n const { duration, entryType, name, startTime } = entry;\n const start = getAbsoluteTime(startTime);\n return {\n type: entryType,\n name,\n start,\n end: start + duration,\n data: void 0\n };\n}\nfunction createNavigationEntry(entry) {\n const {\n entryType,\n name,\n decodedBodySize,\n duration,\n domComplete,\n encodedBodySize,\n domContentLoadedEventStart,\n domContentLoadedEventEnd,\n domInteractive,\n loadEventStart,\n loadEventEnd,\n redirectCount,\n startTime,\n transferSize,\n type\n } = entry;\n if (duration === 0) {\n return null;\n }\n return {\n type: `${entryType}.${type}`,\n start: getAbsoluteTime(startTime),\n end: getAbsoluteTime(domComplete),\n name,\n data: {\n size: transferSize,\n decodedBodySize,\n encodedBodySize,\n duration,\n domInteractive,\n domContentLoadedEventStart,\n domContentLoadedEventEnd,\n loadEventStart,\n loadEventEnd,\n domComplete,\n redirectCount\n }\n };\n}\nfunction createResourceEntry(entry) {\n const {\n entryType,\n initiatorType,\n name,\n responseEnd,\n startTime,\n decodedBodySize,\n encodedBodySize,\n responseStatus,\n transferSize\n } = entry;\n if ([\"fetch\", \"xmlhttprequest\"].includes(initiatorType)) {\n return null;\n }\n return {\n type: `${entryType}.${initiatorType}`,\n start: getAbsoluteTime(startTime),\n end: getAbsoluteTime(responseEnd),\n name,\n data: {\n size: transferSize,\n statusCode: responseStatus,\n decodedBodySize,\n encodedBodySize\n }\n };\n}\nfunction getLargestContentfulPaint(metric) {\n const lastEntry = metric.entries[metric.entries.length - 1];\n const node = lastEntry?.element ? [lastEntry.element] : void 0;\n return getWebVital(metric, \"largest-contentful-paint\", node);\n}\nfunction isLayoutShift(entry) {\n return entry.sources !== void 0;\n}\nfunction getCumulativeLayoutShift(metric) {\n const layoutShifts = [];\n const nodes = [];\n for (const entry of metric.entries) {\n if (isLayoutShift(entry)) {\n const nodeIds = [];\n for (const source of entry.sources) {\n if (source.node) {\n nodes.push(source.node);\n const nodeId = record.mirror.getId(source.node);\n if (nodeId) {\n nodeIds.push(nodeId);\n }\n }\n }\n layoutShifts.push({ value: entry.value, nodeIds: nodeIds.length ? nodeIds : void 0 });\n }\n }\n return getWebVital(metric, \"cumulative-layout-shift\", nodes, layoutShifts);\n}\nfunction getInteractionToNextPaint(metric) {\n const lastEntry = metric.entries[metric.entries.length - 1];\n const node = lastEntry?.target ? [lastEntry.target] : void 0;\n return getWebVital(metric, \"interaction-to-next-paint\", node);\n}\nfunction getWebVital(metric, name, nodes, attributions) {\n const value = metric.value;\n const rating = metric.rating;\n const end = getAbsoluteTime(value);\n return {\n type: \"web-vital\",\n name,\n start: end,\n end,\n data: {\n value,\n size: value,\n rating,\n nodeIds: nodes ? nodes.map((node) => record.mirror.getId(node)) : void 0,\n attributions\n }\n };\n}\n\nfunction setupPerformanceObserver(replay) {\n function addPerformanceEntry(entry) {\n if (!replay.performanceEntries.includes(entry)) {\n replay.performanceEntries.push(entry);\n }\n }\n function onEntries({ entries }) {\n entries.forEach(addPerformanceEntry);\n }\n const clearCallbacks = [];\n [\"navigation\", \"paint\", \"resource\"].forEach((type) => {\n clearCallbacks.push(addPerformanceInstrumentationHandler(type, onEntries));\n });\n clearCallbacks.push(\n addLcpInstrumentationHandler(webVitalHandler(getLargestContentfulPaint, replay)),\n addClsInstrumentationHandler(webVitalHandler(getCumulativeLayoutShift, replay)),\n addInpInstrumentationHandler(webVitalHandler(getInteractionToNextPaint, replay))\n );\n return () => {\n clearCallbacks.forEach((clearCallback) => clearCallback());\n };\n}\n\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nconst t = `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]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=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,s=0,a=new n(r);s>f]=l}else for(o=new n(i),s=0;s>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(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},_=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},x=function(r,e){for(var i=[],s=0;sd&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<e))break;w+=m-(1<>=y;w>0;){var M=o[s].s;p[M]=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(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,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}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 s=0;s4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+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=w,P=p,Q=y,R=g;for(B=0;B255){_(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;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=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,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a>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(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),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(s[j+Q]==s[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=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,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 s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),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(s),32768),this.s.z=n.length-s+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.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!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,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.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)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}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.prototype.flush=function(){j.prototype.flush.call(this)},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(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;oi.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}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(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n{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 const e2 = new Blob([t], { type: \"text/javascript\" });\n return URL.createObjectURL(e2);\n}\n\nconst CONSOLE_LEVELS = [\"log\", \"warn\", \"error\"];\nconst PREFIX = \"[Replay] \";\nfunction _addBreadcrumb(message, level = \"info\") {\n addBreadcrumb(\n {\n category: \"console\",\n data: {\n logger: \"replay\"\n },\n level,\n message: `${PREFIX}${message}`\n },\n { level }\n );\n}\nfunction makeReplayDebugLogger() {\n let _capture = false;\n let _trace = false;\n const _debug = {\n exception: () => void 0,\n infoTick: () => void 0,\n setConfig: (opts) => {\n _capture = !!opts.captureExceptions;\n _trace = !!opts.traceInternals;\n }\n };\n if (DEBUG_BUILD) {\n CONSOLE_LEVELS.forEach((name) => {\n _debug[name] = (...args) => {\n debug$1[name](PREFIX, ...args);\n if (_trace) {\n _addBreadcrumb(args.join(\"\"), severityLevelFromString(name));\n }\n };\n });\n _debug.exception = (error, ...message) => {\n if (message.length && _debug.error) {\n _debug.error(...message);\n }\n debug$1.error(PREFIX, error);\n if (_capture) {\n captureException(error, {\n mechanism: {\n handled: true,\n type: \"auto.function.replay.debug\"\n }\n });\n } else if (_trace) {\n _addBreadcrumb(error, \"error\");\n }\n };\n _debug.infoTick = (...args) => {\n debug$1.log(PREFIX, ...args);\n if (_trace) {\n setTimeout(() => _addBreadcrumb(args[0]), 0);\n }\n };\n } else {\n CONSOLE_LEVELS.forEach((name) => {\n _debug[name] = () => void 0;\n });\n }\n return _debug;\n}\nconst debug = makeReplayDebugLogger();\n\nclass EventBufferSizeExceededError extends Error {\n constructor() {\n super(`Event buffer exceeded maximum size of ${REPLAY_MAX_EVENT_BUFFER_SIZE}.`);\n }\n}\nclass WorkerDestroyedError extends Error {\n constructor() {\n super(\"Worker destroyed\");\n }\n}\n\nclass EventBufferArray {\n constructor() {\n this.events = [];\n this._totalSize = 0;\n this.hasCheckout = false;\n this.waitForCheckout = false;\n }\n /** @inheritdoc */\n get hasEvents() {\n return this.events.length > 0;\n }\n /** @inheritdoc */\n get type() {\n return \"sync\";\n }\n /** @inheritdoc */\n destroy() {\n this.events = [];\n }\n /** @inheritdoc */\n async addEvent(event) {\n const eventSize = JSON.stringify(event).length;\n this._totalSize += eventSize;\n if (this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE) {\n throw new EventBufferSizeExceededError();\n }\n this.events.push(event);\n }\n /** @inheritdoc */\n finish() {\n return new Promise((resolve) => {\n const eventsRet = this.events;\n this.clear();\n resolve(JSON.stringify(eventsRet));\n });\n }\n /** @inheritdoc */\n clear() {\n this.events = [];\n this._totalSize = 0;\n this.hasCheckout = false;\n }\n /** @inheritdoc */\n getEarliestTimestamp() {\n let ts = null;\n for (const { timestamp } of this.events) {\n if (ts === null || timestamp < ts) ts = timestamp;\n }\n return ts === null ? ts : timestampToMs(ts);\n }\n}\n\nclass WorkerHandler {\n constructor(worker) {\n this._onMessage = ({ data }) => {\n const response = data;\n if (typeof response.id !== \"number\") {\n return;\n }\n const pending = this._pending.get(response.id);\n if (!pending || pending.method !== response.method) {\n return;\n }\n this._pending.delete(response.id);\n if (!response.success) {\n DEBUG_BUILD && debug.error(\"Error in compression worker: \", response.response);\n pending.reject(new Error(\"Error in compression worker\"));\n return;\n }\n pending.resolve(response.response);\n };\n this._worker = worker;\n this._id = 0;\n this._pending = /* @__PURE__ */ new Map();\n this._worker.addEventListener(\"message\", this._onMessage);\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 occurred.\n */\n ensureReady() {\n if (this._ensureReadyPromise) {\n return this._ensureReadyPromise;\n }\n this._ensureReadyPromise = new Promise((resolve, reject) => {\n this._worker.addEventListener(\n \"message\",\n ({ data }) => {\n if (data.success) {\n resolve();\n } else {\n DEBUG_BUILD && debug.warn(\"Received worker message with unsuccessful status\", data);\n reject(new Error(\"Received worker message with unsuccessful status\"));\n }\n },\n { once: true }\n );\n this._worker.addEventListener(\n \"error\",\n (error) => {\n DEBUG_BUILD && debug.warn(\"Failed to load Replay compression worker\", error);\n reject(\n new Error(\n `Failed to load Replay compression worker: ${error instanceof ErrorEvent && error.message ? error.message : \"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load.\"}`\n )\n );\n },\n { once: true }\n );\n });\n return this._ensureReadyPromise;\n }\n /**\n * Destroy the worker.\n */\n destroy() {\n DEBUG_BUILD && debug.log(\"Destroying compression worker\");\n this._worker.removeEventListener(\"message\", this._onMessage);\n this._pending.forEach((pending) => pending.reject(new WorkerDestroyedError()));\n this._pending.clear();\n this._worker.terminate();\n }\n /**\n * Post message to worker and wait for response before resolving promise.\n */\n postMessage(method, arg) {\n const id = this._getAndIncrementId();\n return new Promise((resolve, reject) => {\n this._pending.set(id, {\n method,\n resolve,\n reject\n });\n try {\n this._worker.postMessage({ id, method, arg });\n } catch (error) {\n this._pending.delete(id);\n reject(error);\n }\n });\n }\n /** Get the current ID and increment it for the next call. */\n _getAndIncrementId() {\n return this._id++;\n }\n}\n\nclass EventBufferCompressionWorker {\n constructor(worker) {\n this._worker = new WorkerHandler(worker);\n this._earliestTimestamp = null;\n this._totalSize = 0;\n this.hasCheckout = false;\n this.waitForCheckout = false;\n }\n /** @inheritdoc */\n get hasEvents() {\n return !!this._earliestTimestamp;\n }\n /** @inheritdoc */\n get type() {\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 occurred.\n */\n ensureReady() {\n return this._worker.ensureReady();\n }\n /**\n * Destroy the event buffer.\n */\n destroy() {\n this._worker.destroy();\n }\n /**\n * Add an event to the event buffer.\n *\n * Returns true if event was successfully received and processed by worker.\n */\n addEvent(event) {\n const timestamp = timestampToMs(event.timestamp);\n if (!this._earliestTimestamp || timestamp < this._earliestTimestamp) {\n this._earliestTimestamp = timestamp;\n }\n const data = JSON.stringify(event);\n this._totalSize += data.length;\n if (this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE) {\n return Promise.reject(new EventBufferSizeExceededError());\n }\n return this._sendEventToWorker(data);\n }\n /**\n * Finish the event buffer and return the compressed data.\n */\n finish() {\n return this._finishRequest();\n }\n /** @inheritdoc */\n clear() {\n this._earliestTimestamp = null;\n this._totalSize = 0;\n this.hasCheckout = false;\n this._worker.postMessage(\"clear\").then(null, (e) => {\n DEBUG_BUILD && debug.exception(e, 'Sending \"clear\" message to worker failed', e);\n });\n }\n /** @inheritdoc */\n getEarliestTimestamp() {\n return this._earliestTimestamp;\n }\n /**\n * Send the event to the worker.\n */\n _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 async _finishRequest() {\n const response = await this._worker.postMessage(\"finish\");\n this._earliestTimestamp = null;\n this._totalSize = 0;\n return response;\n }\n}\n\nclass EventBufferProxy {\n constructor(worker) {\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 get waitForCheckout() {\n return this._used.waitForCheckout;\n }\n /** @inheritdoc */\n get type() {\n return this._used.type;\n }\n /** @inheritDoc */\n get hasEvents() {\n return this._used.hasEvents;\n }\n /** @inheritdoc */\n get hasCheckout() {\n return this._used.hasCheckout;\n }\n /** @inheritdoc */\n set hasCheckout(value) {\n this._used.hasCheckout = value;\n }\n /** @inheritdoc */\n // eslint-disable-next-line @typescript-eslint/adjacent-overload-signatures\n set waitForCheckout(value) {\n this._used.waitForCheckout = value;\n }\n /** @inheritDoc */\n destroy() {\n this._fallback.destroy();\n this._compression.destroy();\n }\n /** @inheritdoc */\n clear() {\n return this._used.clear();\n }\n /** @inheritdoc */\n 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 addEvent(event) {\n return this._used.addEvent(event);\n }\n /** @inheritDoc */\n async finish() {\n await this.ensureWorkerIsLoaded();\n return this._used.finish();\n }\n /** Ensure the worker has loaded. */\n ensureWorkerIsLoaded() {\n return this._ensureWorkerIsLoadedPromise;\n }\n /** Actually check if the worker has been loaded. */\n async _ensureWorkerIsLoaded() {\n try {\n await this._compression.ensureReady();\n } catch (error) {\n DEBUG_BUILD && debug.exception(error, \"Failed to load the compression worker, falling back to simple buffer\");\n return;\n }\n await this._switchToCompressionWorker();\n }\n /** Switch the used buffer to the compression worker. */\n async _switchToCompressionWorker() {\n const { events, hasCheckout, waitForCheckout } = this._fallback;\n const addEventPromises = [];\n for (const event of events) {\n addEventPromises.push(this._compression.addEvent(event));\n }\n this._compression.hasCheckout = hasCheckout;\n this._compression.waitForCheckout = waitForCheckout;\n this._used = this._compression;\n try {\n await Promise.all(addEventPromises);\n this._fallback.clear();\n } catch (error) {\n if (error instanceof WorkerDestroyedError) {\n return;\n }\n DEBUG_BUILD && debug.exception(error, \"Failed to add events when switching buffers.\");\n }\n }\n}\n\nfunction createEventBuffer({\n useCompression,\n workerUrl: customWorkerUrl\n}) {\n if (useCompression && // eslint-disable-next-line no-restricted-globals\n window.Worker) {\n const worker = _loadWorker(customWorkerUrl);\n if (worker) {\n return worker;\n }\n }\n DEBUG_BUILD && debug.log(\"Using simple buffer\");\n return new EventBufferArray();\n}\nfunction _loadWorker(customWorkerUrl) {\n try {\n const workerUrl = customWorkerUrl || _getWorkerUrl();\n if (!workerUrl) {\n return;\n }\n DEBUG_BUILD && debug.log(`Using compression worker${customWorkerUrl ? ` from ${customWorkerUrl}` : \"\"}`);\n const worker = new Worker(workerUrl);\n return new EventBufferProxy(worker);\n } catch (error) {\n DEBUG_BUILD && debug.exception(error, \"Failed to create compression worker\");\n }\n}\nfunction _getWorkerUrl() {\n if (typeof __SENTRY_EXCLUDE_REPLAY_WORKER__ === \"undefined\" || !__SENTRY_EXCLUDE_REPLAY_WORKER__) {\n return e();\n }\n return \"\";\n}\n\nfunction hasSessionStorage() {\n try {\n return \"sessionStorage\" in WINDOW && !!WINDOW.sessionStorage;\n } catch {\n return false;\n }\n}\n\nfunction clearSession(replay) {\n deleteSession();\n replay.session = void 0;\n}\nfunction deleteSession() {\n if (!hasSessionStorage()) {\n return;\n }\n try {\n WINDOW.sessionStorage.removeItem(REPLAY_SESSION_KEY);\n } catch {\n }\n}\n\nfunction isSampled(sampleRate) {\n if (sampleRate === void 0) {\n return false;\n }\n return Math.random() < sampleRate;\n}\n\nfunction saveSession(session) {\n if (!hasSessionStorage()) {\n return;\n }\n try {\n WINDOW.sessionStorage.setItem(REPLAY_SESSION_KEY, JSON.stringify(session));\n } catch {\n }\n}\n\nfunction makeSession(session) {\n const now = Date.now();\n const id = session.id || uuid4();\n const started = session.started || now;\n const lastActivity = session.lastActivity || now;\n const segmentId = session.segmentId || 0;\n const sampled = session.sampled;\n const previousSessionId = session.previousSessionId;\n const dirty = session.dirty || false;\n return {\n id,\n started,\n lastActivity,\n segmentId,\n sampled,\n previousSessionId,\n dirty\n };\n}\n\nfunction getSessionSampleType(sessionSampleRate, allowBuffering) {\n return isSampled(sessionSampleRate) ? \"session\" : allowBuffering ? \"buffer\" : false;\n}\nfunction createSession({ sessionSampleRate, allowBuffering, stickySession = false }, { previousSessionId } = {}) {\n const sampled = getSessionSampleType(sessionSampleRate, allowBuffering);\n const session = makeSession({\n sampled,\n previousSessionId\n });\n if (stickySession) {\n saveSession(session);\n }\n return session;\n}\n\nfunction fetchSession() {\n if (!hasSessionStorage()) {\n return null;\n }\n try {\n const sessionStringFromStorage = WINDOW.sessionStorage.getItem(REPLAY_SESSION_KEY);\n if (!sessionStringFromStorage) {\n return null;\n }\n const sessionObj = JSON.parse(sessionStringFromStorage);\n DEBUG_BUILD && debug.infoTick(\"Loading existing session\");\n return makeSession(sessionObj);\n } catch {\n return null;\n }\n}\n\nfunction isExpired(initialTime, expiry, targetTime = +/* @__PURE__ */ new Date()) {\n if (initialTime === null || expiry === void 0 || expiry < 0) {\n return true;\n }\n if (expiry === 0) {\n return false;\n }\n return initialTime + expiry <= targetTime;\n}\n\nfunction isSessionExpired(session, {\n maxReplayDuration,\n sessionIdleExpire,\n targetTime = Date.now()\n}) {\n return (\n // 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\nfunction shouldRefreshSession(session, { sessionIdleExpire, maxReplayDuration }) {\n if (!isSessionExpired(session, { sessionIdleExpire, maxReplayDuration })) {\n return false;\n }\n if (session.sampled === \"buffer\" && session.segmentId === 0) {\n return false;\n }\n return true;\n}\n\nfunction loadOrCreateSession({\n sessionIdleExpire,\n maxReplayDuration,\n previousSessionId\n}, sessionOptions) {\n const existingSession = sessionOptions.stickySession && fetchSession();\n if (!existingSession) {\n DEBUG_BUILD && debug.infoTick(\"Creating new session\");\n return createSession(sessionOptions, { previousSessionId });\n }\n if (!shouldRefreshSession(existingSession, { sessionIdleExpire, maxReplayDuration })) {\n return existingSession;\n }\n DEBUG_BUILD && debug.infoTick(\"Session in sessionStorage is expired, creating new one...\");\n return createSession(sessionOptions, { previousSessionId: existingSession.id });\n}\n\nfunction isCustomEvent(event) {\n return event.type === EventType.Custom;\n}\nfunction addEventSync(replay, event, isCheckout) {\n if (!shouldAddEvent(replay, event)) {\n return false;\n }\n _addEvent(replay, event, isCheckout);\n return true;\n}\nfunction addEvent(replay, event, isCheckout) {\n if (!shouldAddEvent(replay, event)) {\n return Promise.resolve(null);\n }\n return _addEvent(replay, event, isCheckout);\n}\nasync function _addEvent(replay, event, isCheckout) {\n const { eventBuffer } = replay;\n if (!eventBuffer || eventBuffer.waitForCheckout && !isCheckout) {\n return null;\n }\n const isBufferMode = replay.recordingMode === \"buffer\";\n try {\n if (isCheckout && isBufferMode) {\n eventBuffer.clear();\n }\n if (isCheckout) {\n eventBuffer.hasCheckout = true;\n eventBuffer.waitForCheckout = false;\n }\n const replayOptions = replay.getOptions();\n const eventAfterPossibleCallback = maybeApplyCallback(event, replayOptions.beforeAddRecordingEvent);\n if (!eventAfterPossibleCallback) {\n return;\n }\n return await eventBuffer.addEvent(eventAfterPossibleCallback);\n } catch (error) {\n if (!replay.isEnabled()) {\n replay.handleException(error);\n return null;\n }\n const isExceeded = error && error instanceof EventBufferSizeExceededError;\n const reason = isExceeded ? \"eventBufferOverflow\" : \"eventBufferError\";\n const client = getClient();\n if (client) {\n const dropReason = isExceeded ? \"buffer_overflow\" : \"internal_sdk_error\";\n client.recordDroppedEvent(dropReason, \"replay\");\n }\n if (isExceeded && isBufferMode) {\n eventBuffer.clear();\n eventBuffer.waitForCheckout = true;\n return null;\n }\n replay.handleException(error);\n await replay.stop({ reason });\n }\n}\nfunction shouldAddEvent(replay, event) {\n if (!replay.eventBuffer || replay.isPaused() || !replay.isEnabled()) {\n return false;\n }\n const timestampInMs = timestampToMs(event.timestamp);\n if (timestampInMs + replay.timeouts.sessionIdlePause < Date.now()) {\n return false;\n }\n if (timestampInMs > replay.getContext().initialTimestamp + replay.getOptions().maxReplayDuration) {\n DEBUG_BUILD && debug.infoTick(`Skipping event with timestamp ${timestampInMs} because it is after maxReplayDuration`);\n return false;\n }\n return true;\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 && debug.exception(error, \"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event...\");\n return null;\n }\n return event;\n}\n\nconst MAX_CONTEXT_VALUES = 100;\nfunction addSegmentDetailsToContext(replay, traceId, segmentName) {\n const replayContext = replay.getContext();\n if (traceId && replayContext.traceIds.size < MAX_CONTEXT_VALUES) {\n replayContext.traceIds.add(traceId);\n }\n if (segmentName && replayContext.segmentNames.size < MAX_CONTEXT_VALUES) {\n replayContext.segmentNames.add(segmentName);\n }\n}\n\nfunction handleProcessSegmentSpan(replay) {\n return (spanJSON) => {\n if (!replay.isEnabled()) {\n return;\n }\n addSegmentDetailsToContext(replay, spanJSON.trace_id, spanJSON.name || void 0);\n };\n}\n\nfunction isErrorEvent(event) {\n return !event.type;\n}\nfunction isTransactionEvent(event) {\n return event.type === \"transaction\";\n}\nfunction isReplayEvent(event) {\n return event.type === \"replay_event\";\n}\nfunction isFeedbackEvent(event) {\n return event.type === \"feedback\";\n}\n\nfunction handleAfterSendEvent(replay) {\n return (event, sendResponse) => {\n if (!replay.isEnabled() || !isErrorEvent(event) && !isTransactionEvent(event)) {\n return;\n }\n const statusCode = sendResponse.statusCode;\n if (!statusCode || statusCode < 200 || statusCode >= 300) {\n return;\n }\n if (isTransactionEvent(event)) {\n handleTransactionEvent(replay, event);\n return;\n }\n handleErrorEvent(replay, event);\n };\n}\nfunction handleTransactionEvent(replay, event) {\n addSegmentDetailsToContext(replay, event.contexts?.trace?.trace_id, event.transaction);\n}\nfunction handleErrorEvent(replay, event) {\n const replayContext = replay.getContext();\n if (event.event_id && replayContext.errorIds.size < 100) {\n replayContext.errorIds.add(event.event_id);\n }\n if (replay.recordingMode !== \"buffer\" || !event.tags?.replayId) {\n return;\n }\n const { beforeErrorSampling } = replay.getOptions();\n if (typeof beforeErrorSampling === \"function\" && !beforeErrorSampling(event)) {\n return;\n }\n setTimeout$3(async () => {\n try {\n await replay.sendBufferedReplayOrFlush();\n } catch (err) {\n replay.handleException(err);\n }\n });\n}\n\nfunction handleBeforeSendEvent(replay) {\n return (event) => {\n if (!replay.isEnabled() || !isErrorEvent(event)) {\n return;\n }\n handleHydrationError(replay, event);\n };\n}\nfunction handleHydrationError(replay, event) {\n const exceptionValue = event.exception?.values?.[0]?.value;\n if (typeof exceptionValue !== \"string\") {\n return;\n }\n if (\n // Only matches errors in production builds of react-dom\n // Example https://reactjs.org/docs/error-decoder.html?invariant=423\n // With newer React versions, the messages changed to a different website https://react.dev/errors/418\n exceptionValue.match(\n /(reactjs\\.org\\/docs\\/error-decoder\\.html\\?invariant=|react\\.dev\\/errors\\/)(418|419|422|423|425)/\n ) || // 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 ) {\n const breadcrumb = createBreadcrumb({\n category: \"replay.hydrate-error\",\n data: {\n url: getLocationHref()\n }\n });\n addBreadcrumbEvent(replay, breadcrumb);\n }\n}\n\nfunction handleBreadcrumbs(replay) {\n const client = getClient();\n if (!client) {\n return;\n }\n client.on(\"beforeAddBreadcrumb\", (breadcrumb) => beforeAddBreadcrumb(replay, breadcrumb));\n}\nfunction beforeAddBreadcrumb(replay, breadcrumb) {\n if (!replay.isEnabled() || !isBreadcrumbWithCategory(breadcrumb)) {\n return;\n }\n const result = normalizeBreadcrumb(breadcrumb);\n if (result) {\n addBreadcrumbEvent(replay, result);\n }\n}\nfunction normalizeBreadcrumb(breadcrumb) {\n if (!isBreadcrumbWithCategory(breadcrumb) || [\n // fetch & xhr are handled separately,in handleNetworkBreadcrumbs\n \"fetch\",\n \"xhr\",\n // These two are breadcrumbs for emitted sentry events, we don't care about them\n \"sentry.event\",\n \"sentry.transaction\"\n ].includes(breadcrumb.category) || // We capture UI breadcrumbs separately\n breadcrumb.category.startsWith(\"ui.\")) {\n return null;\n }\n if (breadcrumb.category === \"console\") {\n return normalizeConsoleBreadcrumb(breadcrumb);\n }\n return createBreadcrumb(breadcrumb);\n}\nfunction normalizeConsoleBreadcrumb(breadcrumb) {\n const args = breadcrumb.data?.arguments;\n if (!Array.isArray(args) || args.length === 0) {\n return createBreadcrumb(breadcrumb);\n }\n let isTruncated = false;\n const normalizedArgs = args.map((arg) => {\n if (!arg) {\n return arg;\n }\n if (typeof arg === \"string\") {\n if (arg.length > CONSOLE_ARG_MAX_SIZE) {\n isTruncated = true;\n return `${arg.slice(0, CONSOLE_ARG_MAX_SIZE)}\\u2026`;\n }\n return arg;\n }\n if (typeof arg === \"object\") {\n try {\n const normalizedArg = normalize(arg, 7);\n const stringified = JSON.stringify(normalizedArg);\n if (stringified.length > CONSOLE_ARG_MAX_SIZE) {\n isTruncated = true;\n return `${JSON.stringify(normalizedArg, null, 2).slice(0, CONSOLE_ARG_MAX_SIZE)}\\u2026`;\n }\n return normalizedArg;\n } catch {\n }\n }\n return arg;\n });\n return createBreadcrumb({\n ...breadcrumb,\n data: {\n ...breadcrumb.data,\n arguments: normalizedArgs,\n ...isTruncated ? { _meta: { warnings: [\"CONSOLE_ARG_TRUNCATED\"] } } : {}\n }\n });\n}\nfunction isBreadcrumbWithCategory(breadcrumb) {\n return !!breadcrumb.category;\n}\n\nfunction isRrwebError(event, hint) {\n if (event.type || !event.exception?.values?.length) {\n return false;\n }\n if (hint.originalException?.__rrweb__) {\n return true;\n }\n return false;\n}\n\nfunction resetReplayIdOnDynamicSamplingContext() {\n const dsc = getCurrentScope().getPropagationContext().dsc;\n if (dsc) {\n delete dsc.replay_id;\n }\n const activeSpan = getActiveSpan();\n if (activeSpan) {\n const dsc2 = getDynamicSamplingContextFromSpan(activeSpan);\n delete dsc2.replay_id;\n }\n}\nfunction setReplayIdOnDynamicSamplingContext(replayId) {\n const dsc = getCurrentScope().getPropagationContext().dsc;\n if (dsc) {\n dsc.replay_id = replayId;\n }\n const activeSpan = getActiveSpan();\n if (activeSpan) {\n const dsc2 = getDynamicSamplingContextFromSpan(activeSpan);\n dsc2.replay_id = replayId;\n }\n}\n\nfunction addFeedbackBreadcrumb(replay, event) {\n replay.triggerUserActivity();\n replay.addUpdate(() => {\n if (!event.timestamp) {\n return true;\n }\n replay.throttledAddEvent({\n type: EventType.Custom,\n timestamp: event.timestamp * 1e3,\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\nfunction shouldSampleForBufferEvent(replay, event) {\n if (replay.recordingMode !== \"buffer\") {\n return false;\n }\n if (event.message === UNABLE_TO_SEND_REPLAY) {\n return false;\n }\n if (!event.exception || event.type) {\n return false;\n }\n return isSampled(replay.getOptions().errorSampleRate);\n}\n\nfunction handleGlobalEventListener(replay) {\n return Object.assign(\n (event, hint) => {\n if (replay.session && shouldRefreshSession(replay.session, {\n maxReplayDuration: replay.getOptions().maxReplayDuration,\n sessionIdleExpire: replay.timeouts.sessionIdleExpire\n })) {\n resetReplayIdOnDynamicSamplingContext();\n }\n if (!replay.isEnabled() || replay.isPaused()) {\n return event;\n }\n if (isReplayEvent(event)) {\n delete event.breadcrumbs;\n return event;\n }\n if (!isErrorEvent(event) && !isTransactionEvent(event) && !isFeedbackEvent(event)) {\n return event;\n }\n const isSessionActive = replay.checkAndHandleExpiredSession();\n if (!isSessionActive) {\n resetReplayIdOnDynamicSamplingContext();\n return event;\n }\n if (isFeedbackEvent(event)) {\n replay.flush();\n event.contexts.feedback.replay_id = replay.getSessionId();\n addFeedbackBreadcrumb(replay, event);\n return event;\n }\n if (isRrwebError(event, hint) && !replay.getOptions()._experiments.captureExceptions) {\n DEBUG_BUILD && debug.log(\"Ignoring error from rrweb internals\", event);\n return null;\n }\n const isErrorEventSampled = shouldSampleForBufferEvent(replay, event);\n const shouldTagReplayId = isErrorEventSampled || replay.recordingMode === \"session\";\n if (shouldTagReplayId) {\n event.tags = { ...event.tags, replayId: replay.getSessionId() };\n }\n if (isErrorEventSampled && replay.recordingMode === \"buffer\" && replay.session?.sampled === \"buffer\") {\n const session = replay.session;\n session.dirty = true;\n if (replay.getOptions().stickySession) {\n saveSession(session);\n }\n }\n return event;\n },\n { id: \"Replay\" }\n );\n}\n\nfunction createPerformanceSpans(replay, entries) {\n return entries.map(({ type, start, end, name, data }) => {\n const 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\n }\n }\n });\n return typeof response === \"string\" ? Promise.resolve(null) : response;\n });\n}\n\nfunction handleHistory(handlerData) {\n const { from, to } = handlerData;\n const now = Date.now() / 1e3;\n return {\n type: \"navigation.push\",\n start: now,\n end: now,\n name: to,\n data: {\n previous: from\n }\n };\n}\nfunction handleHistorySpanListener(replay) {\n return (handlerData) => {\n if (!replay.isEnabled()) {\n return;\n }\n const result = handleHistory(handlerData);\n if (result === null) {\n return;\n }\n replay.getContext().urls.push(result.name);\n replay.triggerUserActivity();\n replay.addUpdate(() => {\n createPerformanceSpans(replay, [result]);\n return false;\n });\n };\n}\n\nfunction shouldFilterRequest(replay, url) {\n if (DEBUG_BUILD && replay.getOptions()._experiments.traceInternals) {\n return false;\n }\n return isSentryRequestUrl(url, getClient());\n}\n\nfunction addNetworkBreadcrumb(replay, result) {\n if (!replay.isEnabled()) {\n return;\n }\n if (result === null) {\n return;\n }\n if (shouldFilterRequest(replay, result.name)) {\n return;\n }\n replay.addUpdate(() => {\n createPerformanceSpans(replay, [result]);\n return true;\n });\n}\n\nfunction getBodySize(body) {\n if (!body) {\n return void 0;\n }\n const textEncoder = new TextEncoder();\n try {\n if (typeof body === \"string\") {\n return textEncoder.encode(body).length;\n }\n if (body instanceof URLSearchParams) {\n return textEncoder.encode(body.toString()).length;\n }\n if (body instanceof FormData) {\n const formDataStr = serializeFormData(body);\n return textEncoder.encode(formDataStr).length;\n }\n if (body instanceof Blob) {\n return body.size;\n }\n if (body instanceof ArrayBuffer) {\n return body.byteLength;\n }\n } catch {\n }\n return void 0;\n}\nfunction parseContentLengthHeader(header) {\n if (!header) {\n return void 0;\n }\n const size = parseInt(header, 10);\n return isNaN(size) ? void 0 : size;\n}\nfunction mergeWarning(info, warning) {\n if (!info) {\n return {\n headers: {},\n size: void 0,\n _meta: {\n warnings: [warning]\n }\n };\n }\n const newMeta = { ...info._meta };\n const existingWarnings = newMeta.warnings || [];\n newMeta.warnings = [...existingWarnings, warning];\n info._meta = newMeta;\n return info;\n}\nfunction makeNetworkReplayBreadcrumb(type, data) {\n if (!data) {\n return null;\n }\n const { startTimestamp, endTimestamp, url, method, statusCode, request, response } = data;\n const result = {\n type,\n start: startTimestamp / 1e3,\n end: endTimestamp / 1e3,\n name: url,\n data: {\n method,\n statusCode,\n request,\n response\n }\n };\n return result;\n}\nfunction buildSkippedNetworkRequestOrResponse(bodySize) {\n return {\n headers: {},\n size: bodySize,\n _meta: {\n warnings: [\"URL_SKIPPED\"]\n }\n };\n}\nfunction buildNetworkRequestOrResponse(headers, bodySize, body) {\n if (!bodySize && Object.keys(headers).length === 0) {\n return void 0;\n }\n if (!bodySize) {\n return {\n headers\n };\n }\n if (!body) {\n return {\n headers,\n size: bodySize\n };\n }\n const info = {\n headers,\n size: bodySize\n };\n const { body: normalizedBody, warnings } = normalizeNetworkBody(body);\n info.body = normalizedBody;\n if (warnings?.length) {\n info._meta = {\n warnings\n };\n }\n return info;\n}\nfunction getAllowedHeaders(headers, allowedHeaders) {\n return Object.entries(headers).reduce((filteredHeaders, [key, value]) => {\n const normalizedKey = key.toLowerCase();\n if (allowedHeaders.includes(normalizedKey) && headers[key]) {\n filteredHeaders[normalizedKey] = value;\n }\n return filteredHeaders;\n }, {});\n}\nfunction normalizeNetworkBody(body) {\n if (!body || typeof body !== \"string\") {\n return {\n body\n };\n }\n const exceedsSizeLimit = body.length > NETWORK_BODY_MAX_SIZE;\n const isProbablyJson = _strIsProbablyJson(body);\n if (exceedsSizeLimit) {\n const truncatedBody = body.slice(0, NETWORK_BODY_MAX_SIZE);\n if (isProbablyJson) {\n return {\n body: truncatedBody,\n warnings: [\"MAYBE_JSON_TRUNCATED\"]\n };\n }\n return {\n body: `${truncatedBody}\\u2026`,\n warnings: [\"TEXT_TRUNCATED\"]\n };\n }\n if (isProbablyJson) {\n try {\n const jsonBody = JSON.parse(body);\n return {\n body: jsonBody\n };\n } catch {\n }\n }\n return {\n body\n };\n}\nfunction _strIsProbablyJson(str) {\n const first = str[0];\n const last = str[str.length - 1];\n return first === \"[\" && last === \"]\" || first === \"{\" && last === \"}\";\n}\nfunction urlMatches(url, urls) {\n const fullUrl = getFullUrl(url);\n return stringMatchesSomePattern(fullUrl, urls);\n}\nfunction getFullUrl(url, baseURI = WINDOW.document.baseURI) {\n if (url.startsWith(\"http://\") || url.startsWith(\"https://\") || url.startsWith(WINDOW.location.origin)) {\n return url;\n }\n const fixedUrl = new URL(url, baseURI);\n if (fixedUrl.origin !== new URL(baseURI).origin) {\n return url;\n }\n const fullUrl = fixedUrl.href;\n if (!url.endsWith(\"/\") && fullUrl.endsWith(\"/\")) {\n return fullUrl.slice(0, -1);\n }\n return fullUrl;\n}\n\nasync function captureFetchBreadcrumbToReplay(breadcrumb, hint, options) {\n try {\n const data = await _prepareFetchData(breadcrumb, hint, options);\n const result = makeNetworkReplayBreadcrumb(\"resource.fetch\", data);\n addNetworkBreadcrumb(options.replay, result);\n } catch (error) {\n DEBUG_BUILD && debug.exception(error, \"Failed to capture fetch breadcrumb\");\n }\n}\nfunction enrichFetchBreadcrumb(breadcrumb, hint) {\n const { input, response } = hint;\n const body = input ? getFetchRequestArgBody(input) : void 0;\n const reqSize = getBodySize(body);\n const resSize = response ? parseContentLengthHeader(response.headers.get(\"content-length\")) : void 0;\n if (reqSize !== void 0) {\n breadcrumb.data.request_body_size = reqSize;\n }\n if (resSize !== void 0) {\n breadcrumb.data.response_body_size = resSize;\n }\n}\nasync function _prepareFetchData(breadcrumb, hint, options) {\n const now = Date.now();\n const { startTimestamp = now, endTimestamp = now } = hint;\n const {\n url,\n method,\n status_code: statusCode = 0,\n request_body_size: requestBodySize,\n response_body_size: responseBodySize\n } = breadcrumb.data;\n const captureDetails = urlMatches(url, options.networkDetailAllowUrls) && !urlMatches(url, options.networkDetailDenyUrls);\n const request = captureDetails ? _getRequestInfo(options, hint.input, requestBodySize) : buildSkippedNetworkRequestOrResponse(requestBodySize);\n const response = await _getResponseInfo(captureDetails, options, hint.response, responseBodySize);\n return {\n startTimestamp,\n endTimestamp,\n url,\n method,\n statusCode,\n request,\n response\n };\n}\nfunction _getRequestInfo({ networkCaptureBodies, networkRequestHeaders }, input, requestBodySize) {\n const headers = input ? getRequestHeaders(input, networkRequestHeaders) : {};\n if (!networkCaptureBodies) {\n return buildNetworkRequestOrResponse(headers, requestBodySize, void 0);\n }\n const requestBody = getFetchRequestArgBody(input);\n const [bodyStr, warning] = getBodyString(requestBody, debug);\n const data = buildNetworkRequestOrResponse(headers, requestBodySize, bodyStr);\n if (warning) {\n return mergeWarning(data, warning);\n }\n return data;\n}\nasync function _getResponseInfo(captureDetails, {\n networkCaptureBodies,\n networkResponseHeaders\n}, response, responseBodySize) {\n if (!captureDetails && responseBodySize !== void 0) {\n return buildSkippedNetworkRequestOrResponse(responseBodySize);\n }\n const headers = response ? getAllHeaders(response.headers, networkResponseHeaders) : {};\n if (!response || !networkCaptureBodies && responseBodySize !== void 0) {\n return buildNetworkRequestOrResponse(headers, responseBodySize, void 0);\n }\n const [bodyText, warning] = await _parseFetchResponseBody(response);\n const result = getResponseData(bodyText, {\n networkCaptureBodies,\n responseBodySize,\n captureDetails,\n headers\n });\n if (warning) {\n return mergeWarning(result, warning);\n }\n return result;\n}\nfunction getResponseData(bodyText, {\n networkCaptureBodies,\n responseBodySize,\n captureDetails,\n headers\n}) {\n try {\n const size = bodyText?.length && responseBodySize === void 0 ? getBodySize(bodyText) : responseBodySize;\n if (!captureDetails) {\n return buildSkippedNetworkRequestOrResponse(size);\n }\n if (networkCaptureBodies) {\n return buildNetworkRequestOrResponse(headers, size, bodyText);\n }\n return buildNetworkRequestOrResponse(headers, size, void 0);\n } catch (error) {\n DEBUG_BUILD && debug.exception(error, \"Failed to serialize response body\");\n return buildNetworkRequestOrResponse(headers, responseBodySize, void 0);\n }\n}\nasync function _parseFetchResponseBody(response) {\n const res = _tryCloneResponse(response);\n if (!res) {\n return [void 0, \"BODY_PARSE_ERROR\"];\n }\n try {\n const text = await _tryGetResponseText(res);\n return [text];\n } catch (error) {\n if (error instanceof Error && error.message.indexOf(\"Timeout\") > -1) {\n DEBUG_BUILD && debug.warn(\"Parsing text body from response timed out\");\n return [void 0, \"BODY_PARSE_TIMEOUT\"];\n }\n DEBUG_BUILD && debug.exception(error, \"Failed to get text body from response\");\n return [void 0, \"BODY_PARSE_ERROR\"];\n }\n}\nfunction getAllHeaders(headers, allowedHeaders) {\n const allHeaders = {};\n allowedHeaders.forEach((header) => {\n if (headers.get(header)) {\n allHeaders[header] = headers.get(header);\n }\n });\n return allHeaders;\n}\nfunction getRequestHeaders(fetchArgs, allowedHeaders) {\n if (fetchArgs.length === 1 && typeof fetchArgs[0] !== \"string\") {\n return getHeadersFromOptions(fetchArgs[0], allowedHeaders);\n }\n if (fetchArgs.length === 2) {\n return getHeadersFromOptions(fetchArgs[1], allowedHeaders);\n }\n return {};\n}\nfunction getHeadersFromOptions(input, allowedHeaders) {\n if (!input) {\n return {};\n }\n const headers = input.headers;\n if (!headers) {\n return {};\n }\n if (headers instanceof Headers) {\n return getAllHeaders(headers, allowedHeaders);\n }\n if (Array.isArray(headers)) {\n return {};\n }\n return getAllowedHeaders(headers, allowedHeaders);\n}\nfunction _tryCloneResponse(response) {\n try {\n return response.clone();\n } catch (error) {\n DEBUG_BUILD && debug.exception(error, \"Failed to clone response body\");\n }\n}\nfunction _tryGetResponseText(response) {\n return new Promise((resolve, reject) => {\n const timeout = setTimeout$3(() => reject(new Error(\"Timeout while trying to read response body\")), 500);\n _getResponseText(response).then(\n (txt) => resolve(txt),\n (reason) => reject(reason)\n ).finally(() => clearTimeout(timeout));\n });\n}\nasync function _getResponseText(response) {\n return await response.text();\n}\n\nasync function captureXhrBreadcrumbToReplay(breadcrumb, hint, options) {\n try {\n const data = _prepareXhrData(breadcrumb, hint, options);\n const result = makeNetworkReplayBreadcrumb(\"resource.xhr\", data);\n addNetworkBreadcrumb(options.replay, result);\n } catch (error) {\n DEBUG_BUILD && debug.exception(error, \"Failed to capture xhr breadcrumb\");\n }\n}\nfunction enrichXhrBreadcrumb(breadcrumb, hint) {\n const { xhr, input } = hint;\n if (!xhr) {\n return;\n }\n const reqSize = getBodySize(input);\n const resSize = xhr.getResponseHeader(\"content-length\") ? parseContentLengthHeader(xhr.getResponseHeader(\"content-length\")) : _getBodySize(xhr.response, xhr.responseType);\n if (reqSize !== void 0) {\n breadcrumb.data.request_body_size = reqSize;\n }\n if (resSize !== void 0) {\n breadcrumb.data.response_body_size = resSize;\n }\n}\nfunction _prepareXhrData(breadcrumb, hint, options) {\n const now = Date.now();\n const { startTimestamp = now, endTimestamp = now, input, xhr } = hint;\n const {\n url,\n method,\n status_code: statusCode = 0,\n request_body_size: requestBodySize,\n response_body_size: responseBodySize\n } = breadcrumb.data;\n if (!url) {\n return null;\n }\n if (!xhr || !urlMatches(url, options.networkDetailAllowUrls) || urlMatches(url, options.networkDetailDenyUrls)) {\n const request2 = buildSkippedNetworkRequestOrResponse(requestBodySize);\n const response2 = buildSkippedNetworkRequestOrResponse(responseBodySize);\n return {\n startTimestamp,\n endTimestamp,\n url,\n method,\n statusCode,\n request: request2,\n response: response2\n };\n }\n const xhrInfo = xhr[SENTRY_XHR_DATA_KEY];\n const networkRequestHeaders = xhrInfo ? getAllowedHeaders(xhrInfo.request_headers, options.networkRequestHeaders) : {};\n const networkResponseHeaders = getAllowedHeaders(parseXhrResponseHeaders(xhr), options.networkResponseHeaders);\n const [requestBody, requestWarning] = options.networkCaptureBodies ? getBodyString(input, debug) : [void 0];\n const [responseBody, responseWarning] = options.networkCaptureBodies ? _getXhrResponseBody(xhr) : [void 0];\n const request = buildNetworkRequestOrResponse(networkRequestHeaders, requestBodySize, requestBody);\n const response = buildNetworkRequestOrResponse(networkResponseHeaders, responseBodySize, responseBody);\n return {\n startTimestamp,\n endTimestamp,\n url,\n method,\n statusCode,\n request: requestWarning ? mergeWarning(request, requestWarning) : request,\n response: responseWarning ? mergeWarning(response, responseWarning) : response\n };\n}\nfunction _getXhrResponseBody(xhr) {\n const errors = [];\n try {\n return [xhr.responseText];\n } catch (e) {\n errors.push(e);\n }\n try {\n return _parseXhrResponse(xhr.response, xhr.responseType);\n } catch (e) {\n errors.push(e);\n }\n DEBUG_BUILD && debug.warn(\"Failed to get xhr response body\", ...errors);\n return [void 0];\n}\nfunction _parseXhrResponse(body, responseType) {\n try {\n if (typeof body === \"string\") {\n return [body];\n }\n if (body instanceof Document) {\n return [body.body.outerHTML];\n }\n if (responseType === \"json\" && isObjectLike(body)) {\n return [JSON.stringify(body)];\n }\n if (!body) {\n return [void 0];\n }\n } catch (error) {\n DEBUG_BUILD && debug.exception(error, \"Failed to serialize body\", body);\n return [void 0, \"BODY_PARSE_ERROR\"];\n }\n DEBUG_BUILD && debug.log(\"Skipping network body because of body type\", body);\n return [void 0, \"UNPARSEABLE_BODY_TYPE\"];\n}\nfunction _getBodySize(body, responseType) {\n try {\n const bodyStr = responseType === \"json\" && isObjectLike(body) ? JSON.stringify(body) : body;\n return getBodySize(bodyStr);\n } catch {\n return void 0;\n }\n}\n\nfunction handleNetworkBreadcrumbs(replay) {\n const client = getClient();\n try {\n const {\n networkDetailAllowUrls,\n networkDetailDenyUrls,\n networkCaptureBodies,\n networkRequestHeaders,\n networkResponseHeaders\n } = replay.getOptions();\n const options = {\n replay,\n networkDetailAllowUrls,\n networkDetailDenyUrls,\n networkCaptureBodies,\n networkRequestHeaders,\n networkResponseHeaders\n };\n if (client) {\n client.on(\"beforeAddBreadcrumb\", (breadcrumb, hint) => beforeAddNetworkBreadcrumb(options, breadcrumb, hint));\n }\n } catch {\n }\n}\nfunction beforeAddNetworkBreadcrumb(options, breadcrumb, hint) {\n if (!breadcrumb.data) {\n return;\n }\n try {\n if (_isXhrBreadcrumb(breadcrumb) && _isXhrHint(hint)) {\n enrichXhrBreadcrumb(breadcrumb, hint);\n captureXhrBreadcrumbToReplay(breadcrumb, hint, options);\n }\n if (_isFetchBreadcrumb(breadcrumb) && _isFetchHint(hint)) {\n enrichFetchBreadcrumb(breadcrumb, hint);\n captureFetchBreadcrumbToReplay(breadcrumb, hint, options);\n }\n } catch (e) {\n DEBUG_BUILD && debug.exception(e, \"Error when enriching network breadcrumb\");\n }\n}\nfunction _isXhrBreadcrumb(breadcrumb) {\n return breadcrumb.category === \"xhr\";\n}\nfunction _isFetchBreadcrumb(breadcrumb) {\n return breadcrumb.category === \"fetch\";\n}\nfunction _isXhrHint(hint) {\n return hint?.xhr;\n}\nfunction _isFetchHint(hint) {\n return hint?.input !== void 0;\n}\n\nfunction addGlobalListeners(replay) {\n const client = getClient();\n addClickKeypressInstrumentationHandler(handleDomListener(replay));\n addHistoryInstrumentationHandler(handleHistorySpanListener(replay));\n handleBreadcrumbs(replay);\n handleNetworkBreadcrumbs(replay);\n const eventProcessor = handleGlobalEventListener(replay);\n addEventProcessor(eventProcessor);\n if (client) {\n client.on(\"beforeSendEvent\", handleBeforeSendEvent(replay));\n client.on(\"afterSendEvent\", handleAfterSendEvent(replay));\n client.on(\"createDsc\", (dsc) => {\n const replayId = replay.getSessionId();\n if (replayId && replay.isEnabled() && replay.recordingMode === \"session\") {\n const isSessionActive = replay.checkAndHandleExpiredSession();\n if (isSessionActive) {\n dsc.replay_id = replayId;\n }\n }\n });\n client.on(\"processSegmentSpan\", handleProcessSegmentSpan(replay));\n client.on(\"spanStart\", (span) => {\n replay.lastActiveSpan = span;\n });\n client.on(\"spanEnd\", (span) => {\n replay.lastActiveSpan = span;\n });\n client.on(\"beforeSendFeedback\", async (feedbackEvent, options) => {\n const replayId = replay.getSessionId();\n if (options?.includeReplay && replay.isEnabled() && replayId && feedbackEvent.contexts?.feedback) {\n if (feedbackEvent.contexts.feedback.source === \"api\") {\n await replay.sendBufferedReplayOrFlush();\n }\n feedbackEvent.contexts.feedback.replay_id = replayId;\n }\n });\n client.on(\"openFeedbackWidget\", async () => {\n await replay.sendBufferedReplayOrFlush();\n });\n }\n}\n\nasync function addMemoryEntry(replay) {\n try {\n return Promise.all(\n createPerformanceSpans(replay, [\n // @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 );\n } catch {\n return [];\n }\n}\nfunction createMemoryEntry(memoryEntry) {\n const { jsHeapSizeLimit, totalJSHeapSize, usedJSHeapSize } = memoryEntry;\n const time = Date.now() / 1e3;\n return {\n type: \"memory\",\n name: \"memory\",\n start: time,\n end: time,\n data: {\n memory: {\n jsHeapSizeLimit,\n totalJSHeapSize,\n usedJSHeapSize\n }\n }\n };\n}\n\nfunction debounce(func, wait, options) {\n return debounce$1(func, wait, {\n ...options,\n // @ts-expect-error - Not quite sure why these types do not match, but this is fine\n setTimeoutImpl: setTimeout$3\n });\n}\n\nconst NAVIGATOR = GLOBAL_OBJ.navigator;\nfunction getRecordingSamplingOptions() {\n if (/iPhone|iPad|iPod/i.test(NAVIGATOR?.userAgent ?? \"\") || /Macintosh/i.test(NAVIGATOR?.userAgent ?? \"\") && NAVIGATOR?.maxTouchPoints && NAVIGATOR?.maxTouchPoints > 1) {\n return {\n sampling: {\n mousemove: false\n }\n };\n }\n return {};\n}\n\nfunction getHandleRecordingEmit(replay) {\n let hadFirstEvent = false;\n return (event, _isCheckout) => {\n try {\n if (!replay.checkAndHandleExpiredSession()) {\n DEBUG_BUILD && debug.warn(\"Received replay event after session expired.\");\n return;\n }\n const isCheckout = _isCheckout || !hadFirstEvent;\n hadFirstEvent = true;\n syncMirrorAttributesFromMutationEvent(event);\n if (replay.clickDetector) {\n updateClickDetectorForRecordingEvent(replay.clickDetector, event);\n }\n replay.addUpdate(() => {\n if (replay.recordingMode === \"buffer\" && isCheckout) {\n replay.setInitialState();\n }\n if (!addEventSync(replay, event, isCheckout)) {\n return true;\n }\n if (!isCheckout) {\n return false;\n }\n const session = replay.session;\n addSettingsEvent(replay, isCheckout);\n if (replay.recordingMode === \"buffer\" && session && replay.eventBuffer && !session.dirty) {\n const earliestEvent = replay.eventBuffer.getEarliestTimestamp();\n if (earliestEvent) {\n DEBUG_BUILD && debug.log(`Updating session start time to earliest event in buffer to ${new Date(earliestEvent)}`);\n session.started = earliestEvent;\n if (replay.getOptions().stickySession) {\n saveSession(session);\n }\n }\n }\n if (session?.previousSessionId) {\n return true;\n }\n if (replay.recordingMode === \"session\") {\n void replay.flush();\n }\n return true;\n });\n } catch (error) {\n replay.handleException(error);\n }\n };\n}\nfunction syncMirrorAttributesFromMutationEvent(event) {\n const data = event.data;\n if (event.type !== EventType.IncrementalSnapshot || !data || typeof data !== \"object\" || !(\"source\" in data) || data.source !== IncrementalSource.Mutation || !(\"attributes\" in data) || !Array.isArray(data.attributes)) {\n return;\n }\n for (const mutation of data.attributes) {\n const node = record.mirror.getNode(mutation.id);\n const meta = node && record.mirror.getMeta(node);\n if (!node || meta?.type !== NodeType.Element) {\n continue;\n }\n const attributes = { ...meta.attributes };\n let changed = false;\n for (const [attributeName, value] of Object.entries(mutation.attributes)) {\n if (!BREADCRUMB_RELEVANT_ATTRIBUTES.has(attributeName)) {\n continue;\n }\n if (value === null) {\n delete attributes[attributeName];\n } else {\n attributes[attributeName] = value;\n }\n changed = true;\n }\n if (changed) {\n record.mirror.add(node, { ...meta, attributes });\n }\n }\n}\nfunction createOptionsEvent(replay) {\n const 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}\nfunction addSettingsEvent(replay, isCheckout) {\n if (!isCheckout || replay.session?.segmentId !== 0) {\n return;\n }\n addEventSync(replay, createOptionsEvent(replay), false);\n}\n\nfunction closestElementOfNode(node) {\n if (!node) {\n return null;\n }\n try {\n const el = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;\n return el;\n } catch {\n return null;\n }\n}\n\nfunction createReplayEnvelope(replayEvent, recordingData, dsn, tunnel) {\n return createEnvelope(\n createEventEnvelopeHeaders(replayEvent, getSdkMetadataForEnvelopeHeader(replayEvent), tunnel, dsn),\n [\n [{ type: \"replay_event\" }, replayEvent],\n [\n {\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 },\n recordingData\n ]\n ]\n );\n}\n\nfunction prepareRecordingData({\n recordingData,\n headers\n}) {\n let payloadWithSequence;\n const replayHeaders = `${JSON.stringify(headers)}\n`;\n if (typeof recordingData === \"string\") {\n payloadWithSequence = `${replayHeaders}${recordingData}`;\n } else {\n const enc = new TextEncoder();\n const sequence = enc.encode(replayHeaders);\n payloadWithSequence = new Uint8Array(sequence.length + recordingData.length);\n payloadWithSequence.set(sequence);\n payloadWithSequence.set(recordingData, sequence.length);\n }\n return payloadWithSequence;\n}\n\nasync function prepareReplayEvent({\n client,\n scope,\n replayId: event_id,\n event\n}) {\n const integrations = typeof client[\"_integrations\"] === \"object\" && client[\"_integrations\"] !== null && !Array.isArray(client[\"_integrations\"]) ? Object.keys(client[\"_integrations\"]) : void 0;\n const eventHint = { event_id, integrations };\n client.emit(\"preprocessEvent\", event, eventHint);\n const preparedEvent = await prepareEvent(\n client.getOptions(),\n event,\n eventHint,\n scope,\n client,\n getIsolationScope()\n );\n if (!preparedEvent) {\n return null;\n }\n client.emit(\"postprocessEvent\", preparedEvent, eventHint);\n preparedEvent.platform = preparedEvent.platform || \"javascript\";\n const metadata = client.getSdkMetadata();\n const { name, version, settings } = metadata?.sdk || {};\n preparedEvent.sdk = {\n ...preparedEvent.sdk,\n name: name || \"sentry.javascript.unknown\",\n version: version || \"0.0.0\",\n settings\n };\n return preparedEvent;\n}\n\nasync function sendReplayRequest({\n recordingData,\n replayId,\n segmentId: segment_id,\n eventContext,\n timestamp,\n session\n}) {\n const preparedRecordingData = prepareRecordingData({\n recordingData,\n headers: {\n segment_id\n }\n });\n const { urls, errorIds, traceIds, segmentNames, initialTimestamp } = eventContext;\n const client = getClient();\n const scope = getCurrentScope();\n const transport = client?.getTransport();\n const dsn = client?.getDsn();\n if (!client || !transport || !dsn || !session.sampled) {\n return Promise.resolve({});\n }\n const baseEvent = {\n type: REPLAY_EVENT_NAME,\n replay_start_timestamp: initialTimestamp / 1e3,\n timestamp: timestamp / 1e3,\n error_ids: errorIds,\n trace_ids: traceIds,\n segment_names: segmentNames,\n urls,\n replay_id: replayId,\n segment_id,\n replay_type: session.sampled\n };\n const replayEvent = await prepareReplayEvent({ scope, client, replayId, event: baseEvent });\n if (!replayEvent) {\n client.recordDroppedEvent(\"event_processor\", \"replay\");\n DEBUG_BUILD && debug.log(\"An event processor returned `null`, will not send event.\");\n return Promise.resolve({});\n }\n delete replayEvent.sdkProcessingMetadata;\n const envelope = createReplayEnvelope(replayEvent, preparedRecordingData, dsn, client.getOptions().tunnel);\n let response;\n try {\n response = await transport.send(envelope);\n } catch (err) {\n const error = new Error(UNABLE_TO_SEND_REPLAY);\n try {\n error.cause = err;\n } catch {\n }\n throw error;\n }\n const rateLimits = updateRateLimits({}, response);\n if (isRateLimited(rateLimits, \"replay\")) {\n throw new RateLimitError(rateLimits);\n }\n if (typeof response.statusCode === \"number\" && (response.statusCode < 200 || response.statusCode >= 300)) {\n throw new TransportStatusCodeError(response.statusCode);\n }\n return response;\n}\nclass TransportStatusCodeError extends Error {\n constructor(statusCode) {\n super(`Transport returned status code ${statusCode}`);\n }\n}\nclass RateLimitError extends Error {\n constructor(rateLimits) {\n super(\"Rate limit hit\");\n this.rateLimits = rateLimits;\n }\n}\nclass ReplayDurationLimitError extends Error {\n constructor() {\n super(\"Session is too long, not sending replay\");\n }\n}\n\nasync function sendReplay(replayData, retryConfig = {\n count: 0,\n interval: RETRY_BASE_INTERVAL\n}) {\n const { recordingData, onError } = replayData;\n if (!recordingData.length) {\n return;\n }\n try {\n await sendReplayRequest(replayData);\n return true;\n } catch (err) {\n if (err instanceof TransportStatusCodeError || err instanceof RateLimitError) {\n throw err;\n }\n setContext(\"Replays\", {\n _retryCount: retryConfig.count\n });\n if (onError) {\n onError(err);\n }\n if (retryConfig.count >= RETRY_MAX_COUNT) {\n const error = new Error(`${UNABLE_TO_SEND_REPLAY} - max retries exceeded`);\n try {\n error.cause = err;\n } catch {\n }\n throw error;\n }\n retryConfig.interval *= ++retryConfig.count;\n return new Promise((resolve, reject) => {\n setTimeout$3(async () => {\n try {\n await sendReplay(replayData, retryConfig);\n resolve(true);\n } catch (err2) {\n reject(err2);\n }\n }, retryConfig.interval);\n });\n }\n}\n\nconst THROTTLED = \"__THROTTLED\";\nconst SKIPPED = \"__SKIPPED\";\nfunction throttle(fn, maxCount, durationSeconds) {\n const counter = /* @__PURE__ */ new Map();\n const _cleanup = (now) => {\n const threshold = now - durationSeconds;\n counter.forEach((_value, key) => {\n if (key < threshold) {\n counter.delete(key);\n }\n });\n };\n const _getTotalCount = () => {\n return [...counter.values()].reduce((a, b) => a + b, 0);\n };\n let isThrottled = false;\n return (...rest) => {\n const now = Math.floor(Date.now() / 1e3);\n _cleanup(now);\n if (_getTotalCount() >= maxCount) {\n const wasThrottled = isThrottled;\n isThrottled = true;\n return wasThrottled ? SKIPPED : THROTTLED;\n }\n isThrottled = false;\n const count = counter.get(now) || 0;\n counter.set(now, count + 1);\n return fn(...rest);\n };\n}\n\nclass ReplayContainer {\n constructor({\n options,\n recordingOptions\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._requiresManualStart = false;\n this._hasInitializedCoreListeners = false;\n this._context = {\n errorIds: /* @__PURE__ */ new Set(),\n traceIds: /* @__PURE__ */ new Set(),\n segmentNames: /* @__PURE__ */ new Set(),\n urls: [],\n initialTimestamp: Date.now(),\n initialUrl: \"\"\n };\n this._recordingOptions = recordingOptions;\n this._options = options;\n this._debouncedFlush = debounce(() => this._flush(), this._options.flushMinDelay, {\n maxWait: this._options.flushMaxDelay\n });\n this._throttledAddEvent = throttle(\n (event, isCheckout) => addEvent(this, event, isCheckout),\n // Max 300 events...\n 300,\n // ... per 5s\n 5\n );\n const { slowClickTimeout, slowClickIgnoreSelectors } = this.getOptions();\n const 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 } : void 0;\n if (slowClickConfig) {\n this.clickDetector = new ClickDetector(this, slowClickConfig);\n }\n if (DEBUG_BUILD) {\n const experiments = options._experiments;\n debug.setConfig({\n captureExceptions: !!experiments.captureExceptions,\n traceInternals: !!experiments.traceInternals\n });\n }\n this._handleVisibilityChange = () => {\n if (WINDOW.document.visibilityState === \"visible\") {\n this._doChangeToForegroundTasks();\n } else {\n this._doChangeToBackgroundTasks();\n }\n };\n this._handleWindowBlur = () => {\n const breadcrumb = createBreadcrumb({\n category: \"ui.blur\"\n });\n this._doChangeToBackgroundTasks(breadcrumb);\n };\n this._handleWindowFocus = () => {\n const breadcrumb = createBreadcrumb({\n category: \"ui.focus\"\n });\n this._doChangeToForegroundTasks(breadcrumb);\n };\n this._handleKeyboardEvent = (event) => {\n handleKeyboardEvent(this, event);\n };\n }\n /** Get the event context. */\n getContext() {\n return this._context;\n }\n /** If recording is currently enabled. */\n isEnabled() {\n return this._isEnabled;\n }\n /** If recording is currently paused. */\n isPaused() {\n return this._isPaused;\n }\n /**\n * Determine if canvas recording is enabled\n */\n isRecordingCanvas() {\n return Boolean(this._canvas);\n }\n /** Get the replay integration options. */\n getOptions() {\n return this._options;\n }\n /** A wrapper to conditionally capture exceptions. */\n handleException(error) {\n DEBUG_BUILD && debug.exception(error);\n if (this._options.onError) {\n this._options.onError(error);\n }\n }\n /**\n * Initializes the plugin based on sampling configuration. Should not be\n * called outside of constructor.\n */\n initializeSampling(previousSessionId) {\n const { errorSampleRate, sessionSampleRate } = this._options;\n const requiresManualStart = errorSampleRate <= 0 && sessionSampleRate <= 0;\n this._requiresManualStart = requiresManualStart;\n if (requiresManualStart) {\n return;\n }\n this._initializeSessionForSampling(previousSessionId);\n if (!this.session) {\n DEBUG_BUILD && debug.exception(new Error(\"Unable to initialize and create session\"));\n return;\n }\n if (this.session.sampled === false) {\n return;\n }\n this.recordingMode = this.session.sampled === \"buffer\" && this.session.segmentId === 0 ? \"buffer\" : \"session\";\n DEBUG_BUILD && debug.infoTick(`Starting replay in ${this.recordingMode} mode`);\n this._initializeRecording();\n }\n /**\n * Start a replay regardless of sampling rate. Calling this will always\n * create a new session. Will log a message 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 start() {\n if (this._isEnabled && this.recordingMode === \"session\") {\n DEBUG_BUILD && debug.log(\"Recording is already in progress\");\n return;\n }\n if (this._isEnabled && this.recordingMode === \"buffer\") {\n DEBUG_BUILD && debug.log(\"Buffering is in progress, call `flush()` to save the replay\");\n return;\n }\n DEBUG_BUILD && debug.infoTick(\"Starting replay in session mode\");\n this._updateUserActivity();\n const session = loadOrCreateSession(\n {\n maxReplayDuration: this._options.maxReplayDuration,\n sessionIdleExpire: this.timeouts.sessionIdleExpire\n },\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 );\n this.session = session;\n this.recordingMode = \"session\";\n this._initializeRecording();\n }\n /**\n * Start replay buffering. Buffers until `flush()` is called or, if\n * `replaysOnErrorSampleRate` > 0, an error occurs.\n */\n startBuffering() {\n if (this._isEnabled) {\n DEBUG_BUILD && debug.log(\"Buffering is in progress, call `flush()` to save the replay\");\n return;\n }\n DEBUG_BUILD && debug.infoTick(\"Starting replay in buffer mode\");\n const session = loadOrCreateSession(\n {\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n maxReplayDuration: this._options.maxReplayDuration\n },\n {\n stickySession: this._options.stickySession,\n sessionSampleRate: 0,\n allowBuffering: true\n }\n );\n this.session = session;\n this.recordingMode = \"buffer\";\n this._initializeRecording();\n }\n /**\n * Start recording.\n *\n * Note that this will cause a new DOM checkout\n */\n startRecording() {\n try {\n const canvasOptions = this._canvas;\n this._stopRecording = record({\n ...this._recordingOptions,\n // When running in error sampling mode, we need to overwrite `checkoutEveryNms`\n // Without this, it would record forever, until an error happens, which we don't want\n // instead, we'll always keep the last 60 seconds of replay before an error happened\n ...this.recordingMode === \"buffer\" ? { checkoutEveryNms: BUFFER_CHECKOUT_TIME } : (\n // Otherwise, use experimental option w/ min checkout time of 6 minutes\n // This is to improve playback seeking as there could potentially be\n // less mutations to process in the worse cases.\n //\n // checkout by \"N\" events is probably ideal, but means we have less\n // control about the number of checkouts we make (which generally\n // increases replay size)\n this._options._experiments.continuousCheckout && {\n // Minimum checkout time is 6 minutes\n checkoutEveryNms: Math.max(36e4, this._options._experiments.continuousCheckout)\n }\n ),\n emit: getHandleRecordingEmit(this),\n ...getRecordingSamplingOptions(),\n onMutation: this._onMutationHandler.bind(this),\n ...canvasOptions ? {\n recordCanvas: canvasOptions.recordCanvas,\n getCanvasManager: canvasOptions.getCanvasManager,\n sampling: canvasOptions.sampling,\n dataURLOptions: canvasOptions.dataURLOptions\n } : {}\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 stopRecording() {\n try {\n if (this._stopRecording) {\n this._stopRecording();\n this._stopRecording = void 0;\n }\n return true;\n } catch (err) {\n this.handleException(err);\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 async stop({\n forceFlush = false,\n reason\n } = {}) {\n if (!this._isEnabled) {\n return;\n }\n this._isEnabled = false;\n this.recordingMode = \"buffer\";\n const stopReason = reason ?? \"manual\";\n getClient()?.emit(\"replayEnd\", { sessionId: this.session?.id, reason: stopReason });\n try {\n DEBUG_BUILD && debug.log(`Stopping Replay triggered by ${stopReason}`);\n resetReplayIdOnDynamicSamplingContext();\n this._removeListeners();\n this.stopRecording();\n this._debouncedFlush.cancel();\n if (forceFlush) {\n await this._flush({ force: true });\n }\n this.eventBuffer?.destroy();\n this.eventBuffer = null;\n clearSession(this);\n } catch (err) {\n this.handleException(err);\n }\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 pause() {\n if (this._isPaused) {\n return;\n }\n this._isPaused = true;\n this.stopRecording();\n DEBUG_BUILD && debug.log(\"Pausing replay\");\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 resume() {\n if (!this._isPaused || !this._checkSession()) {\n return;\n }\n this._isPaused = false;\n this.startRecording();\n DEBUG_BUILD && debug.log(\"Resuming replay\");\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 async sendBufferedReplayOrFlush({ continueRecording = true } = {}) {\n if (this.recordingMode === \"session\") {\n return this.flushImmediate();\n }\n const activityTime = Date.now();\n DEBUG_BUILD && debug.log(\"Converting buffer to session\");\n await this.flushImmediate();\n const hasStoppedRecording = this.stopRecording();\n if (!continueRecording || !hasStoppedRecording) {\n return;\n }\n if (this.recordingMode === \"session\") {\n return;\n }\n this.recordingMode = \"session\";\n if (this.session) {\n this.session.dirty = false;\n this._updateUserActivity(activityTime);\n this._updateSessionActivity(activityTime);\n this._maybeSaveSession();\n setReplayIdOnDynamicSamplingContext(this.session.id);\n }\n this.startRecording();\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 addUpdate(cb) {\n const cbResult = cb();\n if (this.recordingMode === \"buffer\" || !this._isEnabled) {\n return;\n }\n if (cbResult === true) {\n return;\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 triggerUserActivity() {\n this._updateUserActivity();\n if (!this._stopRecording) {\n if (!this._checkSession()) {\n return;\n }\n this.resume();\n return;\n }\n this.checkAndHandleExpiredSession();\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 updateUserActivity() {\n this._updateUserActivity();\n this._updateSessionActivity();\n }\n /**\n * Only flush if `this.recordingMode === 'session'`\n */\n conditionalFlush() {\n if (this.recordingMode === \"buffer\") {\n return Promise.resolve();\n }\n return this.flushImmediate();\n }\n /**\n * Flush using debounce flush\n */\n 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 multiple flushes happening closely together.\n */\n flushImmediate() {\n this._debouncedFlush();\n return this._debouncedFlush.flush();\n }\n /**\n * Cancels queued up flushes.\n */\n cancelFlush() {\n this._debouncedFlush.cancel();\n }\n /** Get the current session (=replay) ID\n *\n * @param onlyIfSampled - If true, will only return the session ID if the session is sampled.\n */\n getSessionId(onlyIfSampled) {\n if (onlyIfSampled && this.session?.sampled === false) {\n return void 0;\n }\n return 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 checkAndHandleExpiredSession() {\n if (this._lastActivity && isExpired(this._lastActivity, this.timeouts.sessionIdlePause) && this.session?.sampled === \"session\") {\n this.pause();\n return;\n }\n if (!this._checkSession()) {\n return false;\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 setInitialState() {\n const urlPath = `${WINDOW.location.pathname}${WINDOW.location.hash}${WINDOW.location.search}`;\n const url = `${WINDOW.location.origin}${urlPath}`;\n this.performanceEntries = [];\n this.replayPerformanceEntries = [];\n this._clearContext();\n this._context.initialUrl = url;\n this._context.initialTimestamp = Date.now();\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 throttledAddEvent(event, isCheckout) {\n const res = this._throttledAddEvent(event, isCheckout);\n if (res === THROTTLED) {\n const breadcrumb = createBreadcrumb({\n category: \"replay.throttled\"\n });\n this.addUpdate(() => {\n return !addEventSync(this, {\n type: ReplayEventTypeCustom,\n timestamp: breadcrumb.timestamp || 0,\n data: {\n tag: \"breadcrumb\",\n payload: breadcrumb,\n metric: true\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 getCurrentRoute() {\n const lastActiveSpan = this.lastActiveSpan || getActiveSpan();\n const lastRootSpan = lastActiveSpan && getRootSpan(lastActiveSpan);\n const attributes = lastRootSpan && spanToJSON(lastRootSpan).data || {};\n const source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n if (!lastRootSpan || !source || ![\"route\", \"custom\"].includes(source)) {\n return void 0;\n }\n return spanToJSON(lastRootSpan).description;\n }\n /**\n * Initialize and start all listeners to varying events (DOM,\n * Performance Observer, Recording, Sentry SDK, etc)\n */\n _initializeRecording() {\n this.setInitialState();\n this._updateSessionActivity();\n this.eventBuffer = createEventBuffer({\n useCompression: this._options.useCompression,\n workerUrl: this._options.workerUrl\n });\n this._removeListeners();\n this._addListeners();\n this._isEnabled = true;\n this._isPaused = false;\n if (this.session) {\n getClient()?.emit(\"replayStart\", {\n sessionId: this.session.id,\n recordingMode: this.recordingMode\n });\n }\n this.startRecording();\n if (this.recordingMode === \"session\" && this.session) {\n setReplayIdOnDynamicSamplingContext(this.session.id);\n }\n }\n /**\n * Loads (or refreshes) the current session.\n */\n _initializeSessionForSampling(previousSessionId) {\n const allowBuffering = this._options.errorSampleRate > 0;\n const session = loadOrCreateSession(\n {\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n maxReplayDuration: this._options.maxReplayDuration,\n previousSessionId\n },\n {\n stickySession: this._options.stickySession,\n sessionSampleRate: this._options.sessionSampleRate,\n allowBuffering\n }\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 _checkSession() {\n if (!this.session) {\n return false;\n }\n const currentSession = this.session;\n if (shouldRefreshSession(currentSession, {\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n maxReplayDuration: this._options.maxReplayDuration\n })) {\n this._refreshSession(currentSession);\n return false;\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 async _refreshSession(session) {\n if (!this._isEnabled) {\n return;\n }\n await this.stop({ reason: \"sessionExpired\" });\n this.initializeSampling(session.id);\n }\n /**\n * Adds listeners to record events for the replay\n */\n _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 if (this.clickDetector) {\n this.clickDetector.addListeners();\n }\n if (!this._hasInitializedCoreListeners) {\n addGlobalListeners(this);\n this._hasInitializedCoreListeners = true;\n }\n } catch (err) {\n this.handleException(err);\n }\n this._performanceCleanupCallback = setupPerformanceObserver(this);\n }\n /**\n * Cleans up listeners that were created in `_addListeners`\n */\n _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 if (this.clickDetector) {\n this.clickDetector.removeListeners();\n }\n if (this._performanceCleanupCallback) {\n this._performanceCleanupCallback();\n }\n } catch (err) {\n this.handleException(err);\n }\n }\n /**\n * Tasks to run when we consider a page to be hidden (via blurring and/or visibility)\n */\n _doChangeToBackgroundTasks(breadcrumb) {\n if (!this.session) {\n return;\n }\n const expired = shouldRefreshSession(this.session, {\n maxReplayDuration: this._options.maxReplayDuration,\n sessionIdleExpire: this.timeouts.sessionIdleExpire\n });\n if (expired) {\n resetReplayIdOnDynamicSamplingContext();\n return;\n }\n if (breadcrumb) {\n this._createCustomBreadcrumb(breadcrumb);\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 _doChangeToForegroundTasks(breadcrumb) {\n if (!this.session) {\n return;\n }\n const isSessionActive = this.checkAndHandleExpiredSession();\n if (!isSessionActive) {\n DEBUG_BUILD && debug.log(\"Document has become active, but session has expired\");\n return;\n }\n if (breadcrumb) {\n this._createCustomBreadcrumb(breadcrumb);\n }\n }\n /**\n * Update user activity (across session lifespans)\n */\n _updateUserActivity(_lastActivity = Date.now()) {\n this._lastActivity = _lastActivity;\n }\n /**\n * Updates the session's last activity timestamp\n */\n _updateSessionActivity(_lastActivity = Date.now()) {\n if (this.session) {\n this.session.lastActivity = _lastActivity;\n this._maybeSaveSession();\n }\n }\n /**\n * Helper to create (and buffer) a replay breadcrumb from a core SDK breadcrumb\n */\n _createCustomBreadcrumb(breadcrumb) {\n this.addUpdate(() => {\n this.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 _addPerformanceEntries() {\n let performanceEntries = createPerformanceEntries(this.performanceEntries).concat(this.replayPerformanceEntries);\n this.performanceEntries = [];\n this.replayPerformanceEntries = [];\n if (this._requiresManualStart) {\n const initialTimestampInSeconds = this._context.initialTimestamp / 1e3;\n performanceEntries = performanceEntries.filter((entry) => entry.start >= initialTimestampInSeconds);\n }\n return Promise.all(createPerformanceSpans(this, performanceEntries));\n }\n /**\n * Clear _context\n */\n _clearContext() {\n this._context.errorIds.clear();\n this._context.traceIds.clear();\n this._context.segmentNames.clear();\n this._context.urls = [];\n }\n /** Update the initial timestamp based on the buffer content. */\n _updateInitialTimestampFromEventBuffer() {\n const { session, eventBuffer } = this;\n if (!session || !eventBuffer || this._requiresManualStart) {\n return;\n }\n if (session.segmentId) {\n return;\n }\n const earliestEvent = eventBuffer.getEarliestTimestamp();\n if (earliestEvent && earliestEvent < this._context.initialTimestamp) {\n this._context.initialTimestamp = earliestEvent;\n }\n }\n /**\n * Return and clear _context\n */\n _popEventContext() {\n const _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 segmentNames: Array.from(this._context.segmentNames),\n urls: this._context.urls\n };\n this._clearContext();\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 async _runFlush() {\n const replayId = this.getSessionId();\n if (!this.session || !this.eventBuffer || !replayId) {\n DEBUG_BUILD && debug.error(\"No session or eventBuffer found to flush.\");\n return;\n }\n await this._addPerformanceEntries();\n if (!this.eventBuffer?.hasEvents) {\n return;\n }\n await addMemoryEntry(this);\n if (!this.eventBuffer) {\n return;\n }\n if (replayId !== this.getSessionId()) {\n return;\n }\n try {\n this._updateInitialTimestampFromEventBuffer();\n const timestamp = Date.now();\n if (timestamp - this._context.initialTimestamp > this._options.maxReplayDuration + 3e4) {\n throw new ReplayDurationLimitError();\n }\n const eventContext = this._popEventContext();\n const segmentId = this.session.segmentId++;\n this._maybeSaveSession();\n const recordingData = await this.eventBuffer.finish();\n await sendReplay({\n replayId,\n recordingData,\n segmentId,\n eventContext,\n session: this.session,\n timestamp,\n onError: (err) => this.handleException(err)\n });\n } catch (err) {\n this.handleException(err);\n this.stop({ reason: \"sendError\" });\n const client = getClient();\n if (client) {\n let dropReason;\n if (err instanceof RateLimitError) {\n dropReason = \"ratelimit_backoff\";\n } else if (err instanceof ReplayDurationLimitError) {\n dropReason = \"invalid\";\n } else {\n dropReason = \"send_error\";\n }\n client.recordDroppedEvent(dropReason, \"replay\");\n }\n }\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 async _flush({\n force = false\n } = {}) {\n if (!this._isEnabled && !force) {\n return;\n }\n if (!this.checkAndHandleExpiredSession()) {\n DEBUG_BUILD && debug.error(\"Attempting to finish replay event after session expired.\");\n return;\n }\n if (!this.session) {\n return;\n }\n const start = this.session.started;\n const now = Date.now();\n const duration = now - start;\n this._debouncedFlush.cancel();\n const tooShort = duration < this._options.minReplayDuration;\n const tooLong = duration > this._options.maxReplayDuration + 5e3;\n if (tooShort || tooLong) {\n DEBUG_BUILD && debug.log(\n `Session duration (${Math.floor(duration / 1e3)}s) is too ${tooShort ? \"short\" : \"long\"}, not sending replay.`\n );\n if (tooShort) {\n this._debouncedFlush();\n }\n return;\n }\n const eventBuffer = this.eventBuffer;\n if (eventBuffer && this.session.segmentId === 0 && !eventBuffer.hasCheckout) {\n DEBUG_BUILD && debug.log(\"Flushing initial segment without checkout.\");\n }\n const _flushInProgress = !!this._flushLock;\n if (!this._flushLock) {\n this._flushLock = this._runFlush();\n }\n try {\n await this._flushLock;\n } catch (err) {\n this.handleException(err);\n } finally {\n this._flushLock = void 0;\n if (_flushInProgress) {\n this._debouncedFlush();\n }\n }\n }\n /** Save the session, if it is sticky */\n _maybeSaveSession() {\n if (this.session && this._options.stickySession) {\n saveSession(this.session);\n }\n }\n /** Handler for rrweb.record.onMutation */\n _onMutationHandler(mutations) {\n const { ignoreMutations } = this._options._experiments;\n if (ignoreMutations?.length) {\n if (mutations.some((mutation) => {\n const el = closestElementOfNode(mutation.target);\n const selector = ignoreMutations.join(\",\");\n return el?.matches(selector);\n })) {\n return false;\n }\n }\n const count = mutations.length;\n const mutationLimit = this._options.mutationLimit;\n const mutationBreadcrumbLimit = this._options.mutationBreadcrumbLimit;\n const overMutationLimit = mutationLimit && count > mutationLimit;\n if (count > mutationBreadcrumbLimit || overMutationLimit) {\n const breadcrumb = createBreadcrumb({\n category: \"replay.mutations\",\n data: {\n count,\n limit: overMutationLimit\n }\n });\n this._createCustomBreadcrumb(breadcrumb);\n }\n if (overMutationLimit) {\n this.stop({ reason: \"mutationLimit\", forceFlush: this.recordingMode === \"session\" });\n return false;\n }\n return true;\n }\n}\n\nfunction getOption(selectors, defaultSelectors) {\n return [\n ...selectors,\n // sentry defaults\n ...defaultSelectors\n ].join(\",\");\n}\nfunction getPrivacyOptions({ mask, unmask, block, unblock, ignore }) {\n const defaultBlockedElements = [\"base\", \"iframe[srcdoc]:not([src])\"];\n const maskSelector = getOption(mask, [\".sentry-mask\", \"[data-sentry-mask]\"]);\n const unmaskSelector = getOption(unmask, []);\n const 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]\", ...defaultBlockedElements]),\n unblockSelector: getOption(unblock, []),\n ignoreSelector: getOption(ignore, [\".sentry-ignore\", \"[data-sentry-ignore]\", 'input[type=\"file\"]'])\n };\n return options;\n}\n\nfunction maskAttribute({\n el,\n key,\n maskAttributes,\n maskAllText,\n privacyOptions,\n value\n}) {\n if (privacyOptions.unmaskTextSelector && el.matches(privacyOptions.unmaskTextSelector)) {\n return value;\n }\n const masksNamedAttribute = maskAttributes.includes(key);\n const masksSubmitButtonValue = maskAllText && key === \"value\" && el.tagName === \"INPUT\" && [\"submit\", \"button\"].includes(el.getAttribute(\"type\") || \"\");\n if (masksNamedAttribute || masksSubmitButtonValue) {\n return value.replace(/[\\S]/g, \"*\");\n }\n return value;\n}\n\nconst MEDIA_SELECTORS = 'img,image,svg,video,object,picture,embed,map,audio,link[rel=\"icon\"],link[rel=\"apple-touch-icon\"]';\nconst DEFAULT_NETWORK_HEADERS = [\"content-length\", \"content-type\", \"accept\"];\nconst ORIGINAL_BODY = /* @__PURE__ */ Symbol.for(\"sentry__originalRequestBody\");\nlet _initialized = false;\nlet _isRequestInstrumented = false;\nfunction _INTERNAL_instrumentRequestInterface() {\n if (typeof Request === \"undefined\" || _isRequestInstrumented) {\n return;\n }\n const OriginalRequest = Request;\n try {\n const SentryRequest = function(input, init) {\n const request = new OriginalRequest(input, init);\n if (init?.body != null) {\n request[ORIGINAL_BODY] = init.body;\n }\n return request;\n };\n SentryRequest.prototype = OriginalRequest.prototype;\n GLOBAL_OBJ.Request = SentryRequest;\n _isRequestInstrumented = true;\n } catch {\n }\n}\nconst replayIntegration = ((options) => {\n return new Replay(options);\n});\nclass Replay {\n constructor({\n flushMinDelay = DEFAULT_FLUSH_MIN_DELAY,\n flushMaxDelay = DEFAULT_FLUSH_MAX_DELAY,\n minReplayDuration = MIN_REPLAY_DURATION,\n maxReplayDuration = MAX_REPLAY_DURATION,\n stickySession = true,\n useCompression = true,\n workerUrl,\n _experiments = {},\n maskAllText = true,\n maskAllInputs = true,\n blockAllMedia = true,\n mutationBreadcrumbLimit = 750,\n mutationLimit = 1e4,\n slowClickTimeout = 7e3,\n slowClickIgnoreSelectors = [],\n networkDetailAllowUrls = [],\n networkDetailDenyUrls = [],\n networkCaptureBodies = true,\n networkRequestHeaders = [],\n networkResponseHeaders = [],\n mask = [],\n maskAttributes = [\"title\", \"placeholder\", \"aria-label\"],\n unmask = [],\n block = [],\n unblock = [],\n ignore = [],\n maskFn,\n beforeAddRecordingEvent,\n beforeErrorSampling,\n onError,\n attachRawBodyFromRequest = false\n } = {}) {\n this.name = \"Replay\";\n const privacyOptions = getPrivacyOptions({\n mask,\n unmask,\n block,\n unblock,\n ignore\n });\n this._recordingOptions = {\n maskAllInputs,\n maskAllText,\n maskInputOptions: { password: true },\n maskTextFn: maskFn,\n maskInputFn: maskFn,\n maskAttributeFn: (key, value, el) => maskAttribute({\n maskAttributes,\n maskAllText,\n privacyOptions,\n key,\n value,\n el\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: (err) => {\n try {\n err.__rrweb__ = true;\n } catch {\n }\n },\n // experimental support for recording iframes from different origins\n recordCrossOriginIframes: Boolean(_experiments.recordCrossOriginIframes)\n };\n this._initialOptions = {\n flushMinDelay,\n flushMaxDelay,\n minReplayDuration: Math.min(minReplayDuration, MIN_REPLAY_DURATION_LIMIT),\n maxReplayDuration: Math.min(maxReplayDuration, MAX_REPLAY_DURATION),\n stickySession,\n useCompression,\n workerUrl,\n blockAllMedia,\n maskAllInputs,\n maskAllText,\n mutationBreadcrumbLimit,\n mutationLimit,\n slowClickTimeout,\n slowClickIgnoreSelectors,\n networkDetailAllowUrls,\n networkDetailDenyUrls,\n networkCaptureBodies,\n networkRequestHeaders: _getMergedNetworkHeaders(networkRequestHeaders),\n networkResponseHeaders: _getMergedNetworkHeaders(networkResponseHeaders),\n beforeAddRecordingEvent,\n beforeErrorSampling,\n onError,\n attachRawBodyFromRequest,\n _experiments\n };\n if (this._initialOptions.blockAllMedia) {\n this._recordingOptions.blockSelector = !this._recordingOptions.blockSelector ? MEDIA_SELECTORS : `${this._recordingOptions.blockSelector},${MEDIA_SELECTORS}`;\n this._recordingOptions.ignoreCSSAttributes = /* @__PURE__ */ new Set([\"background-image\"]);\n }\n if (this._isInitialized && isBrowser()) {\n throw new Error(\"Multiple Sentry Session Replay instances are not supported\");\n }\n this._isInitialized = true;\n }\n /** If replay has already been initialized */\n get _isInitialized() {\n return _initialized;\n }\n /** Update _isInitialized */\n set _isInitialized(value) {\n _initialized = value;\n }\n /**\n * Setup and initialize replay container\n */\n afterAllSetup(client) {\n if (!isBrowser() || this._replay) {\n return;\n }\n if (this._initialOptions.attachRawBodyFromRequest) {\n _INTERNAL_instrumentRequestInterface();\n }\n this._setup(client);\n this._initialize(client);\n }\n /**\n * Start a replay regardless of sampling rate. Calling this will always\n * create a new session. Will log a message 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 start() {\n if (!this._replay) {\n return;\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 startBuffering() {\n if (!this._replay) {\n return;\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 * @param options.flush - Whether to flush the pending replay segment when stopping.\n * When recording in `session` mode, `stop()` flushes the buffered-but-unsent segment by\n * default (`flush: true`), matching the previous behavior. Pass `flush: false` to stop\n * recording without sending that pending segment — useful when a user withdraws consent\n * and no further data should leave the browser.\n *\n * Note: `flush: false` only prevents the *pending* (final) segment from being sent. It does\n * **not** retract segments that were already sent earlier during `session` recording.\n */\n stop(options) {\n if (!this._replay) {\n return Promise.resolve();\n }\n return this._replay.stop({\n forceFlush: options?.flush ?? this._replay.recordingMode === \"session\",\n reason: \"manual\"\n });\n }\n /**\n * If not in \"session\" recording mode, flush event buffer which will create a new replay.\n * If replay is not enabled, a new session replay is started.\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 flush(options) {\n if (!this._replay) {\n return Promise.resolve();\n }\n if (!this._replay.isEnabled()) {\n this._replay.start();\n return Promise.resolve();\n }\n return this._replay.sendBufferedReplayOrFlush(options);\n }\n /**\n * Get the current session ID.\n *\n * @param onlyIfSampled - If true, will only return the session ID if the session is sampled.\n *\n */\n getReplayId(onlyIfSampled) {\n if (!this._replay?.isEnabled()) {\n return;\n }\n return this._replay.getSessionId(onlyIfSampled);\n }\n /**\n * Get the current recording mode. This can be either `session` or `buffer`.\n *\n * `session`: Recording the whole session, sending it continuously\n * `buffer`: Always keeping 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 getRecordingMode() {\n if (!this._replay?.isEnabled()) {\n return;\n }\n return this._replay.recordingMode;\n }\n processSpan(span) {\n const replayId = this.getReplayId(true);\n if (replayId) {\n safeSetSpanJSONAttributes(span, { \"sentry.replay_id\": replayId });\n if (this.getRecordingMode() === \"buffer\") {\n safeSetSpanJSONAttributes(span, { \"sentry._internal.replay_is_buffering\": true });\n }\n }\n }\n /**\n * Initializes replay.\n */\n _initialize(client) {\n if (!this._replay) {\n return;\n }\n this._maybeLoadFromReplayCanvasIntegration(client);\n this._replay.initializeSampling();\n }\n /** Setup the integration. */\n _setup(client) {\n const finalOptions = loadReplayOptionsFromClient(this._initialOptions, client);\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 _maybeLoadFromReplayCanvasIntegration(client) {\n try {\n const canvasIntegration = client.getIntegrationByName(\"ReplayCanvas\");\n if (!canvasIntegration) {\n return;\n }\n this._replay[\"_canvas\"] = canvasIntegration.getOptions();\n } catch {\n }\n }\n}\nfunction loadReplayOptionsFromClient(initialOptions, client) {\n const opt = client.getOptions();\n const finalOptions = {\n sessionSampleRate: 0,\n errorSampleRate: 0,\n ...initialOptions\n };\n const replaysSessionSampleRate = parseSampleRate(opt.replaysSessionSampleRate);\n const replaysOnErrorSampleRate = parseSampleRate(opt.replaysOnErrorSampleRate);\n if (replaysSessionSampleRate == null && replaysOnErrorSampleRate == null) {\n consoleSandbox(() => {\n console.warn(\n \"Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.\"\n );\n });\n }\n if (replaysSessionSampleRate != null) {\n finalOptions.sessionSampleRate = replaysSessionSampleRate;\n }\n if (replaysOnErrorSampleRate != null) {\n finalOptions.errorSampleRate = replaysOnErrorSampleRate;\n }\n return finalOptions;\n}\nfunction _getMergedNetworkHeaders(headers) {\n return [...DEFAULT_NETWORK_HEADERS, ...headers.map((header) => header.toLowerCase())];\n}\n\nfunction getReplay() {\n const client = getClient();\n return client?.getIntegrationByName(\"Replay\");\n}\n\nexport { getReplay, replayIntegration };\n//# sourceMappingURL=index.js.map\n","/*!\nTurbo 8.0.23\nCopyright © 2026 37signals LLC\n */\nconst FrameLoadingStyle = {\n eager: \"eager\",\n lazy: \"lazy\"\n};\n\n/**\n * Contains a fragment of HTML which is updated based on navigation within\n * it (e.g. via links or form submissions).\n *\n * @customElement turbo-frame\n * @example\n * \n * \n * Show all expanded messages in this frame.\n * \n *\n *
\n * Show response from this form within this frame.\n *
\n *
\n */\nclass FrameElement extends HTMLElement {\n static delegateConstructor = undefined\n\n loaded = Promise.resolve()\n\n static get observedAttributes() {\n return [\"disabled\", \"loading\", \"src\"]\n }\n\n constructor() {\n super();\n this.delegate = new FrameElement.delegateConstructor(this);\n }\n\n connectedCallback() {\n this.delegate.connect();\n }\n\n disconnectedCallback() {\n this.delegate.disconnect();\n }\n\n reload() {\n return this.delegate.sourceURLReloaded()\n }\n\n attributeChangedCallback(name) {\n if (name == \"loading\") {\n this.delegate.loadingStyleChanged();\n } else if (name == \"src\") {\n this.delegate.sourceURLChanged();\n } else if (name == \"disabled\") {\n this.delegate.disabledChanged();\n }\n }\n\n /**\n * Gets the URL to lazily load source HTML from\n */\n get src() {\n return this.getAttribute(\"src\")\n }\n\n /**\n * Sets the URL to lazily load source HTML from\n */\n set src(value) {\n if (value) {\n this.setAttribute(\"src\", value);\n } else {\n this.removeAttribute(\"src\");\n }\n }\n\n /**\n * Gets the refresh mode for the frame.\n */\n get refresh() {\n return this.getAttribute(\"refresh\")\n }\n\n /**\n * Sets the refresh mode for the frame.\n */\n set refresh(value) {\n if (value) {\n this.setAttribute(\"refresh\", value);\n } else {\n this.removeAttribute(\"refresh\");\n }\n }\n\n get shouldReloadWithMorph() {\n return this.src && this.refresh === \"morph\"\n }\n\n /**\n * Determines if the element is loading\n */\n get loading() {\n return frameLoadingStyleFromString(this.getAttribute(\"loading\") || \"\")\n }\n\n /**\n * Sets the value of if the element is loading\n */\n set loading(value) {\n if (value) {\n this.setAttribute(\"loading\", value);\n } else {\n this.removeAttribute(\"loading\");\n }\n }\n\n /**\n * Gets the disabled state of the frame.\n *\n * If disabled, no requests will be intercepted by the frame.\n */\n get disabled() {\n return this.hasAttribute(\"disabled\")\n }\n\n /**\n * Sets the disabled state of the frame.\n *\n * If disabled, no requests will be intercepted by the frame.\n */\n set disabled(value) {\n if (value) {\n this.setAttribute(\"disabled\", \"\");\n } else {\n this.removeAttribute(\"disabled\");\n }\n }\n\n /**\n * Gets the autoscroll state of the frame.\n *\n * If true, the frame will be scrolled into view automatically on update.\n */\n get autoscroll() {\n return this.hasAttribute(\"autoscroll\")\n }\n\n /**\n * Sets the autoscroll state of the frame.\n *\n * If true, the frame will be scrolled into view automatically on update.\n */\n set autoscroll(value) {\n if (value) {\n this.setAttribute(\"autoscroll\", \"\");\n } else {\n this.removeAttribute(\"autoscroll\");\n }\n }\n\n /**\n * Determines if the element has finished loading\n */\n get complete() {\n return !this.delegate.isLoading\n }\n\n /**\n * Gets the active state of the frame.\n *\n * If inactive, source changes will not be observed.\n */\n get isActive() {\n return this.ownerDocument === document && !this.isPreview\n }\n\n /**\n * Sets the active state of the frame.\n *\n * If inactive, source changes will not be observed.\n */\n get isPreview() {\n return this.ownerDocument?.documentElement?.hasAttribute(\"data-turbo-preview\")\n }\n}\n\nfunction frameLoadingStyleFromString(style) {\n switch (style.toLowerCase()) {\n case \"lazy\":\n return FrameLoadingStyle.lazy\n default:\n return FrameLoadingStyle.eager\n }\n}\n\nconst drive = {\n enabled: true,\n progressBarDelay: 500,\n unvisitableExtensions: new Set(\n [\n \".7z\", \".aac\", \".apk\", \".avi\", \".bmp\", \".bz2\", \".css\", \".csv\", \".deb\", \".dmg\", \".doc\",\n \".docx\", \".exe\", \".gif\", \".gz\", \".heic\", \".heif\", \".ico\", \".iso\", \".jpeg\", \".jpg\",\n \".js\", \".json\", \".m4a\", \".mkv\", \".mov\", \".mp3\", \".mp4\", \".mpeg\", \".mpg\", \".msi\",\n \".ogg\", \".ogv\", \".pdf\", \".pkg\", \".png\", \".ppt\", \".pptx\", \".rar\", \".rtf\",\n \".svg\", \".tar\", \".tif\", \".tiff\", \".txt\", \".wav\", \".webm\", \".webp\", \".wma\", \".wmv\",\n \".xls\", \".xlsx\", \".xml\", \".zip\"\n ]\n )\n};\n\nfunction activateScriptElement(element) {\n if (element.getAttribute(\"data-turbo-eval\") == \"false\") {\n return element\n } else {\n const createdScriptElement = document.createElement(\"script\");\n const cspNonce = getCspNonce();\n if (cspNonce) {\n createdScriptElement.nonce = cspNonce;\n }\n createdScriptElement.textContent = element.textContent;\n createdScriptElement.async = false;\n copyElementAttributes(createdScriptElement, element);\n return createdScriptElement\n }\n}\n\nfunction copyElementAttributes(destinationElement, sourceElement) {\n for (const { name, value } of sourceElement.attributes) {\n destinationElement.setAttribute(name, value);\n }\n}\n\nfunction createDocumentFragment(html) {\n const template = document.createElement(\"template\");\n template.innerHTML = html;\n return template.content\n}\n\nfunction dispatch(eventName, { target, cancelable, detail } = {}) {\n const event = new CustomEvent(eventName, {\n cancelable,\n bubbles: true,\n composed: true,\n detail\n });\n\n if (target && target.isConnected) {\n target.dispatchEvent(event);\n } else {\n document.documentElement.dispatchEvent(event);\n }\n\n return event\n}\n\nfunction cancelEvent(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n\nfunction nextRepaint() {\n if (document.visibilityState === \"hidden\") {\n return nextEventLoopTick()\n } else {\n return nextAnimationFrame()\n }\n}\n\nfunction nextAnimationFrame() {\n return new Promise((resolve) => requestAnimationFrame(() => resolve()))\n}\n\nfunction nextEventLoopTick() {\n return new Promise((resolve) => setTimeout(() => resolve(), 0))\n}\n\nfunction parseHTMLDocument(html = \"\") {\n return new DOMParser().parseFromString(html, \"text/html\")\n}\n\nfunction unindent(strings, ...values) {\n const lines = interpolate(strings, values).replace(/^\\n/, \"\").split(\"\\n\");\n const match = lines[0].match(/^\\s+/);\n const indent = match ? match[0].length : 0;\n return lines.map((line) => line.slice(indent)).join(\"\\n\")\n}\n\nfunction interpolate(strings, values) {\n return strings.reduce((result, string, i) => {\n const value = values[i] == undefined ? \"\" : values[i];\n return result + string + value\n }, \"\")\n}\n\nfunction uuid() {\n return Array.from({ length: 36 })\n .map((_, i) => {\n if (i == 8 || i == 13 || i == 18 || i == 23) {\n return \"-\"\n } else if (i == 14) {\n return \"4\"\n } else if (i == 19) {\n return (Math.floor(Math.random() * 4) + 8).toString(16)\n } else {\n return Math.floor(Math.random() * 16).toString(16)\n }\n })\n .join(\"\")\n}\n\nfunction getAttribute(attributeName, ...elements) {\n for (const value of elements.map((element) => element?.getAttribute(attributeName))) {\n if (typeof value == \"string\") return value\n }\n\n return null\n}\n\nfunction hasAttribute(attributeName, ...elements) {\n return elements.some((element) => element && element.hasAttribute(attributeName))\n}\n\nfunction markAsBusy(...elements) {\n for (const element of elements) {\n if (element.localName == \"turbo-frame\") {\n element.setAttribute(\"busy\", \"\");\n }\n element.setAttribute(\"aria-busy\", \"true\");\n }\n}\n\nfunction clearBusyState(...elements) {\n for (const element of elements) {\n if (element.localName == \"turbo-frame\") {\n element.removeAttribute(\"busy\");\n }\n\n element.removeAttribute(\"aria-busy\");\n }\n}\n\nfunction waitForLoad(element, timeoutInMilliseconds = 2000) {\n return new Promise((resolve) => {\n const onComplete = () => {\n element.removeEventListener(\"error\", onComplete);\n element.removeEventListener(\"load\", onComplete);\n resolve();\n };\n\n element.addEventListener(\"load\", onComplete, { once: true });\n element.addEventListener(\"error\", onComplete, { once: true });\n setTimeout(resolve, timeoutInMilliseconds);\n })\n}\n\nfunction getHistoryMethodForAction(action) {\n switch (action) {\n case \"replace\":\n return history.replaceState\n case \"advance\":\n case \"restore\":\n return history.pushState\n }\n}\n\nfunction isAction(action) {\n return action == \"advance\" || action == \"replace\" || action == \"restore\"\n}\n\nfunction getVisitAction(...elements) {\n const action = getAttribute(\"data-turbo-action\", ...elements);\n\n return isAction(action) ? action : null\n}\n\nfunction getMetaElement(name) {\n return document.querySelector(`meta[name=\"${name}\"]`)\n}\n\nfunction getMetaContent(name) {\n const element = getMetaElement(name);\n return element && element.content\n}\n\nfunction getCspNonce() {\n const element = getMetaElement(\"csp-nonce\");\n\n if (element) {\n const { nonce, content } = element;\n return nonce == \"\" ? content : nonce\n }\n}\n\nfunction setMetaContent(name, content) {\n let element = getMetaElement(name);\n\n if (!element) {\n element = document.createElement(\"meta\");\n element.setAttribute(\"name\", name);\n\n document.head.appendChild(element);\n }\n\n element.setAttribute(\"content\", content);\n\n return element\n}\n\nfunction findClosestRecursively(element, selector) {\n if (element instanceof Element) {\n return (\n element.closest(selector) || findClosestRecursively(element.assignedSlot || element.getRootNode()?.host, selector)\n )\n }\n}\n\nfunction elementIsFocusable(element) {\n const inertDisabledOrHidden = \"[inert], :disabled, [hidden], details:not([open]), dialog:not([open])\";\n\n return !!element && element.closest(inertDisabledOrHidden) == null && typeof element.focus == \"function\"\n}\n\nfunction queryAutofocusableElement(elementOrDocumentFragment) {\n return Array.from(elementOrDocumentFragment.querySelectorAll(\"[autofocus]\")).find(elementIsFocusable)\n}\n\nasync function around(callback, reader) {\n const before = reader();\n\n callback();\n\n await nextAnimationFrame();\n\n const after = reader();\n\n return [before, after]\n}\n\nfunction doesNotTargetIFrame(name) {\n if (name === \"_blank\") {\n return false\n } else if (name) {\n for (const element of document.getElementsByName(name)) {\n if (element instanceof HTMLIFrameElement) return false\n }\n\n return true\n } else {\n return true\n }\n}\n\nfunction findLinkFromClickTarget(target) {\n const link = findClosestRecursively(target, \"a[href], a[xlink\\\\:href]\");\n\n if (!link) return null\n if (link.href.startsWith(\"#\")) return null\n if (link.hasAttribute(\"download\")) return null\n\n const linkTarget = link.getAttribute(\"target\");\n if (linkTarget && linkTarget !== \"_self\") return null\n\n return link\n}\n\nfunction debounce(fn, delay) {\n let timeoutId = null;\n\n return (...args) => {\n const callback = () => fn.apply(this, args);\n clearTimeout(timeoutId);\n timeoutId = setTimeout(callback, delay);\n }\n}\n\nconst submitter = {\n \"aria-disabled\": {\n beforeSubmit: submitter => {\n submitter.setAttribute(\"aria-disabled\", \"true\");\n submitter.addEventListener(\"click\", cancelEvent);\n },\n\n afterSubmit: submitter => {\n submitter.removeAttribute(\"aria-disabled\");\n submitter.removeEventListener(\"click\", cancelEvent);\n }\n },\n\n \"disabled\": {\n beforeSubmit: submitter => submitter.disabled = true,\n afterSubmit: submitter => submitter.disabled = false\n }\n};\n\nclass Config {\n #submitter = null\n\n constructor(config) {\n Object.assign(this, config);\n }\n\n get submitter() {\n return this.#submitter\n }\n\n set submitter(value) {\n this.#submitter = submitter[value] || value;\n }\n}\n\nconst forms = new Config({\n mode: \"on\",\n submitter: \"disabled\"\n});\n\nconst config = {\n drive,\n forms\n};\n\nfunction expandURL(locatable) {\n return new URL(locatable.toString(), document.baseURI)\n}\n\nfunction getAnchor(url) {\n let anchorMatch;\n if (url.hash) {\n return url.hash.slice(1)\n // eslint-disable-next-line no-cond-assign\n } else if ((anchorMatch = url.href.match(/#(.*)$/))) {\n return anchorMatch[1]\n }\n}\n\nfunction getAction$1(form, submitter) {\n const action = submitter?.getAttribute(\"formaction\") || form.getAttribute(\"action\") || form.action;\n\n return expandURL(action)\n}\n\nfunction getExtension(url) {\n return (getLastPathComponent(url).match(/\\.[^.]*$/) || [])[0] || \"\"\n}\n\nfunction isPrefixedBy(baseURL, url) {\n const prefix = addTrailingSlash(url.origin + url.pathname);\n return addTrailingSlash(baseURL.href) === prefix || baseURL.href.startsWith(prefix)\n}\n\nfunction locationIsVisitable(location, rootLocation) {\n return isPrefixedBy(location, rootLocation) && !config.drive.unvisitableExtensions.has(getExtension(location))\n}\n\nfunction getLocationForLink(link) {\n return expandURL(link.getAttribute(\"href\") || \"\")\n}\n\nfunction getRequestURL(url) {\n const anchor = getAnchor(url);\n return anchor != null ? url.href.slice(0, -(anchor.length + 1)) : url.href\n}\n\nfunction toCacheKey(url) {\n return getRequestURL(url)\n}\n\nfunction urlsAreEqual(left, right) {\n return expandURL(left).href == expandURL(right).href\n}\n\nfunction getPathComponents(url) {\n return url.pathname.split(\"/\").slice(1)\n}\n\nfunction getLastPathComponent(url) {\n return getPathComponents(url).slice(-1)[0]\n}\n\nfunction addTrailingSlash(value) {\n return value.endsWith(\"/\") ? value : value + \"/\"\n}\n\nclass FetchResponse {\n constructor(response) {\n this.response = response;\n }\n\n get succeeded() {\n return this.response.ok\n }\n\n get failed() {\n return !this.succeeded\n }\n\n get clientError() {\n return this.statusCode >= 400 && this.statusCode <= 499\n }\n\n get serverError() {\n return this.statusCode >= 500 && this.statusCode <= 599\n }\n\n get redirected() {\n return this.response.redirected\n }\n\n get location() {\n return expandURL(this.response.url)\n }\n\n get isHTML() {\n return this.contentType && this.contentType.match(/^(?:text\\/([^\\s;,]+\\b)?html|application\\/xhtml\\+xml)\\b/)\n }\n\n get statusCode() {\n return this.response.status\n }\n\n get contentType() {\n return this.header(\"Content-Type\")\n }\n\n get responseText() {\n return this.response.clone().text()\n }\n\n get responseHTML() {\n if (this.isHTML) {\n return this.response.clone().text()\n } else {\n return Promise.resolve(undefined)\n }\n }\n\n header(name) {\n return this.response.headers.get(name)\n }\n}\n\nclass LimitedSet extends Set {\n constructor(maxSize) {\n super();\n this.maxSize = maxSize;\n }\n\n add(value) {\n if (this.size >= this.maxSize) {\n const iterator = this.values();\n const oldestValue = iterator.next().value;\n this.delete(oldestValue);\n }\n super.add(value);\n }\n}\n\nconst recentRequests = new LimitedSet(20);\n\nfunction fetchWithTurboHeaders(url, options = {}) {\n const modifiedHeaders = new Headers(options.headers || {});\n const requestUID = uuid();\n recentRequests.add(requestUID);\n modifiedHeaders.append(\"X-Turbo-Request-Id\", requestUID);\n\n return window.fetch(url, {\n ...options,\n headers: modifiedHeaders\n })\n}\n\nfunction fetchMethodFromString(method) {\n switch (method.toLowerCase()) {\n case \"get\":\n return FetchMethod.get\n case \"post\":\n return FetchMethod.post\n case \"put\":\n return FetchMethod.put\n case \"patch\":\n return FetchMethod.patch\n case \"delete\":\n return FetchMethod.delete\n }\n}\n\nconst FetchMethod = {\n get: \"get\",\n post: \"post\",\n put: \"put\",\n patch: \"patch\",\n delete: \"delete\"\n};\n\nfunction fetchEnctypeFromString(encoding) {\n switch (encoding.toLowerCase()) {\n case FetchEnctype.multipart:\n return FetchEnctype.multipart\n case FetchEnctype.plain:\n return FetchEnctype.plain\n default:\n return FetchEnctype.urlEncoded\n }\n}\n\nconst FetchEnctype = {\n urlEncoded: \"application/x-www-form-urlencoded\",\n multipart: \"multipart/form-data\",\n plain: \"text/plain\"\n};\n\nclass FetchRequest {\n abortController = new AbortController()\n #resolveRequestPromise = (_value) => {}\n\n constructor(delegate, method, location, requestBody = new URLSearchParams(), target = null, enctype = FetchEnctype.urlEncoded) {\n const [url, body] = buildResourceAndBody(expandURL(location), method, requestBody, enctype);\n\n this.delegate = delegate;\n this.url = url;\n this.target = target;\n this.fetchOptions = {\n credentials: \"same-origin\",\n redirect: \"follow\",\n method: method.toUpperCase(),\n headers: { ...this.defaultHeaders },\n body: body,\n signal: this.abortSignal,\n referrer: this.delegate.referrer?.href\n };\n this.enctype = enctype;\n }\n\n get method() {\n return this.fetchOptions.method\n }\n\n set method(value) {\n const fetchBody = this.isSafe ? this.url.searchParams : this.fetchOptions.body || new FormData();\n const fetchMethod = fetchMethodFromString(value) || FetchMethod.get;\n\n this.url.search = \"\";\n\n const [url, body] = buildResourceAndBody(this.url, fetchMethod, fetchBody, this.enctype);\n\n this.url = url;\n this.fetchOptions.body = body;\n this.fetchOptions.method = fetchMethod.toUpperCase();\n }\n\n get headers() {\n return this.fetchOptions.headers\n }\n\n set headers(value) {\n this.fetchOptions.headers = value;\n }\n\n get body() {\n if (this.isSafe) {\n return this.url.searchParams\n } else {\n return this.fetchOptions.body\n }\n }\n\n set body(value) {\n this.fetchOptions.body = value;\n }\n\n get location() {\n return this.url\n }\n\n get params() {\n return this.url.searchParams\n }\n\n get entries() {\n return this.body ? Array.from(this.body.entries()) : []\n }\n\n cancel() {\n this.abortController.abort();\n }\n\n async perform() {\n const { fetchOptions } = this;\n this.delegate.prepareRequest(this);\n const event = await this.#allowRequestToBeIntercepted(fetchOptions);\n try {\n this.delegate.requestStarted(this);\n\n if (event.detail.fetchRequest) {\n this.response = event.detail.fetchRequest.response;\n } else {\n this.response = fetchWithTurboHeaders(this.url.href, fetchOptions);\n }\n\n const response = await this.response;\n return await this.receive(response)\n } catch (error) {\n if (error.name !== \"AbortError\") {\n if (this.#willDelegateErrorHandling(error)) {\n this.delegate.requestErrored(this, error);\n }\n throw error\n }\n } finally {\n this.delegate.requestFinished(this);\n }\n }\n\n async receive(response) {\n const fetchResponse = new FetchResponse(response);\n const event = dispatch(\"turbo:before-fetch-response\", {\n cancelable: true,\n detail: { fetchResponse },\n target: this.target\n });\n if (event.defaultPrevented) {\n this.delegate.requestPreventedHandlingResponse(this, fetchResponse);\n } else if (fetchResponse.succeeded) {\n this.delegate.requestSucceededWithResponse(this, fetchResponse);\n } else {\n this.delegate.requestFailedWithResponse(this, fetchResponse);\n }\n return fetchResponse\n }\n\n get defaultHeaders() {\n return {\n Accept: \"text/html, application/xhtml+xml\"\n }\n }\n\n get isSafe() {\n return isSafe(this.method)\n }\n\n get abortSignal() {\n return this.abortController.signal\n }\n\n acceptResponseType(mimeType) {\n this.headers[\"Accept\"] = [mimeType, this.headers[\"Accept\"]].join(\", \");\n }\n\n async #allowRequestToBeIntercepted(fetchOptions) {\n const requestInterception = new Promise((resolve) => (this.#resolveRequestPromise = resolve));\n const event = dispatch(\"turbo:before-fetch-request\", {\n cancelable: true,\n detail: {\n fetchOptions,\n url: this.url,\n resume: this.#resolveRequestPromise\n },\n target: this.target\n });\n this.url = event.detail.url;\n if (event.defaultPrevented) await requestInterception;\n\n return event\n }\n\n #willDelegateErrorHandling(error) {\n const event = dispatch(\"turbo:fetch-request-error\", {\n target: this.target,\n cancelable: true,\n detail: { request: this, error: error }\n });\n\n return !event.defaultPrevented\n }\n}\n\nfunction isSafe(fetchMethod) {\n return fetchMethodFromString(fetchMethod) == FetchMethod.get\n}\n\nfunction buildResourceAndBody(resource, method, requestBody, enctype) {\n const searchParams =\n Array.from(requestBody).length > 0 ? new URLSearchParams(entriesExcludingFiles(requestBody)) : resource.searchParams;\n\n if (isSafe(method)) {\n return [mergeIntoURLSearchParams(resource, searchParams), null]\n } else if (enctype == FetchEnctype.urlEncoded) {\n return [resource, searchParams]\n } else {\n return [resource, requestBody]\n }\n}\n\nfunction entriesExcludingFiles(requestBody) {\n const entries = [];\n\n for (const [name, value] of requestBody) {\n if (value instanceof File) continue\n else entries.push([name, value]);\n }\n\n return entries\n}\n\nfunction mergeIntoURLSearchParams(url, requestBody) {\n const searchParams = new URLSearchParams(entriesExcludingFiles(requestBody));\n\n url.search = searchParams.toString();\n\n return url\n}\n\nclass AppearanceObserver {\n started = false\n\n constructor(delegate, element) {\n this.delegate = delegate;\n this.element = element;\n this.intersectionObserver = new IntersectionObserver(this.intersect);\n }\n\n start() {\n if (!this.started) {\n this.started = true;\n this.intersectionObserver.observe(this.element);\n }\n }\n\n stop() {\n if (this.started) {\n this.started = false;\n this.intersectionObserver.unobserve(this.element);\n }\n }\n\n intersect = (entries) => {\n const lastEntry = entries.slice(-1)[0];\n if (lastEntry?.isIntersecting) {\n this.delegate.elementAppearedInViewport(this.element);\n }\n }\n}\n\nclass StreamMessage {\n static contentType = \"text/vnd.turbo-stream.html\"\n\n static wrap(message) {\n if (typeof message == \"string\") {\n return new this(createDocumentFragment(message))\n } else {\n return message\n }\n }\n\n constructor(fragment) {\n this.fragment = importStreamElements(fragment);\n }\n}\n\nfunction importStreamElements(fragment) {\n for (const element of fragment.querySelectorAll(\"turbo-stream\")) {\n const streamElement = document.importNode(element, true);\n\n for (const inertScriptElement of streamElement.templateElement.content.querySelectorAll(\"script\")) {\n inertScriptElement.replaceWith(activateScriptElement(inertScriptElement));\n }\n\n element.replaceWith(streamElement);\n }\n\n return fragment\n}\n\nconst identity = key => key;\n\nclass LRUCache {\n keys = []\n entries = {}\n #toCacheKey\n\n constructor(size, toCacheKey = identity) {\n this.size = size;\n this.#toCacheKey = toCacheKey;\n }\n\n has(key) {\n return this.#toCacheKey(key) in this.entries\n }\n\n get(key) {\n if (this.has(key)) {\n const entry = this.read(key);\n this.touch(key);\n return entry\n }\n }\n\n put(key, entry) {\n this.write(key, entry);\n this.touch(key);\n return entry\n }\n\n clear() {\n for (const key of Object.keys(this.entries)) {\n this.evict(key);\n }\n }\n\n // Private\n\n read(key) {\n return this.entries[this.#toCacheKey(key)]\n }\n\n write(key, entry) {\n this.entries[this.#toCacheKey(key)] = entry;\n }\n\n touch(key) {\n key = this.#toCacheKey(key);\n const index = this.keys.indexOf(key);\n if (index > -1) this.keys.splice(index, 1);\n this.keys.unshift(key);\n this.trim();\n }\n\n trim() {\n for (const key of this.keys.splice(this.size)) {\n this.evict(key);\n }\n }\n\n evict(key) {\n delete this.entries[key];\n }\n}\n\nconst PREFETCH_DELAY = 100;\n\nclass PrefetchCache extends LRUCache {\n #prefetchTimeout = null\n #maxAges = {}\n\n constructor(size = 1, prefetchDelay = PREFETCH_DELAY) {\n super(size, toCacheKey);\n this.prefetchDelay = prefetchDelay;\n }\n\n putLater(url, request, ttl) {\n this.#prefetchTimeout = setTimeout(() => {\n request.perform();\n this.put(url, request, ttl);\n this.#prefetchTimeout = null;\n }, this.prefetchDelay);\n }\n\n put(url, request, ttl = cacheTtl) {\n super.put(url, request);\n this.#maxAges[toCacheKey(url)] = new Date(new Date().getTime() + ttl);\n }\n\n clear() {\n super.clear();\n if (this.#prefetchTimeout) clearTimeout(this.#prefetchTimeout);\n }\n\n evict(key) {\n super.evict(key);\n delete this.#maxAges[key];\n }\n\n has(key) {\n if (super.has(key)) {\n const maxAge = this.#maxAges[toCacheKey(key)];\n\n return maxAge && maxAge > Date.now()\n } else {\n return false\n }\n }\n}\n\nconst cacheTtl = 10 * 1000;\nconst prefetchCache = new PrefetchCache();\n\nconst FormSubmissionState = {\n initialized: \"initialized\",\n requesting: \"requesting\",\n waiting: \"waiting\",\n receiving: \"receiving\",\n stopping: \"stopping\",\n stopped: \"stopped\"\n};\n\nclass FormSubmission {\n state = FormSubmissionState.initialized\n\n static confirmMethod(message) {\n return Promise.resolve(confirm(message))\n }\n\n constructor(delegate, formElement, submitter, mustRedirect = false) {\n const method = getMethod(formElement, submitter);\n const action = getAction(getFormAction(formElement, submitter), method);\n const body = buildFormData(formElement, submitter);\n const enctype = getEnctype(formElement, submitter);\n\n this.delegate = delegate;\n this.formElement = formElement;\n this.submitter = submitter;\n this.fetchRequest = new FetchRequest(this, method, action, body, formElement, enctype);\n this.mustRedirect = mustRedirect;\n }\n\n get method() {\n return this.fetchRequest.method\n }\n\n set method(value) {\n this.fetchRequest.method = value;\n }\n\n get action() {\n return this.fetchRequest.url.toString()\n }\n\n set action(value) {\n this.fetchRequest.url = expandURL(value);\n }\n\n get body() {\n return this.fetchRequest.body\n }\n\n get enctype() {\n return this.fetchRequest.enctype\n }\n\n get isSafe() {\n return this.fetchRequest.isSafe\n }\n\n get location() {\n return this.fetchRequest.url\n }\n\n // The submission process\n\n async start() {\n const { initialized, requesting } = FormSubmissionState;\n const confirmationMessage = getAttribute(\"data-turbo-confirm\", this.submitter, this.formElement);\n\n if (typeof confirmationMessage === \"string\") {\n const confirmMethod = typeof config.forms.confirm === \"function\" ?\n config.forms.confirm :\n FormSubmission.confirmMethod;\n\n const answer = await confirmMethod(confirmationMessage, this.formElement, this.submitter);\n if (!answer) {\n return\n }\n }\n\n if (this.state == initialized) {\n this.state = requesting;\n return this.fetchRequest.perform()\n }\n }\n\n stop() {\n const { stopping, stopped } = FormSubmissionState;\n if (this.state != stopping && this.state != stopped) {\n this.state = stopping;\n this.fetchRequest.cancel();\n return true\n }\n }\n\n // Fetch request delegate\n\n prepareRequest(request) {\n if (!request.isSafe) {\n const token = getCookieValue(getMetaContent(\"csrf-param\")) || getMetaContent(\"csrf-token\");\n if (token) {\n request.headers[\"X-CSRF-Token\"] = token;\n }\n }\n\n if (this.requestAcceptsTurboStreamResponse(request)) {\n request.acceptResponseType(StreamMessage.contentType);\n }\n }\n\n requestStarted(_request) {\n this.state = FormSubmissionState.waiting;\n if (this.submitter) config.forms.submitter.beforeSubmit(this.submitter);\n this.setSubmitsWith();\n markAsBusy(this.formElement);\n dispatch(\"turbo:submit-start\", {\n target: this.formElement,\n detail: { formSubmission: this }\n });\n this.delegate.formSubmissionStarted(this);\n }\n\n requestPreventedHandlingResponse(request, response) {\n prefetchCache.clear();\n\n this.result = { success: response.succeeded, fetchResponse: response };\n }\n\n requestSucceededWithResponse(request, response) {\n if (response.clientError || response.serverError) {\n this.delegate.formSubmissionFailedWithResponse(this, response);\n return\n }\n\n prefetchCache.clear();\n\n if (this.requestMustRedirect(request) && responseSucceededWithoutRedirect(response)) {\n const error = new Error(\"Form responses must redirect to another location\");\n this.delegate.formSubmissionErrored(this, error);\n } else {\n this.state = FormSubmissionState.receiving;\n this.result = { success: true, fetchResponse: response };\n this.delegate.formSubmissionSucceededWithResponse(this, response);\n }\n }\n\n requestFailedWithResponse(request, response) {\n this.result = { success: false, fetchResponse: response };\n this.delegate.formSubmissionFailedWithResponse(this, response);\n }\n\n requestErrored(request, error) {\n this.result = { success: false, error };\n this.delegate.formSubmissionErrored(this, error);\n }\n\n requestFinished(_request) {\n this.state = FormSubmissionState.stopped;\n if (this.submitter) config.forms.submitter.afterSubmit(this.submitter);\n this.resetSubmitterText();\n clearBusyState(this.formElement);\n dispatch(\"turbo:submit-end\", {\n target: this.formElement,\n detail: { formSubmission: this, ...this.result }\n });\n this.delegate.formSubmissionFinished(this);\n }\n\n // Private\n\n setSubmitsWith() {\n if (!this.submitter || !this.submitsWith) return\n\n if (this.submitter.matches(\"button\")) {\n this.originalSubmitText = this.submitter.innerHTML;\n this.submitter.innerHTML = this.submitsWith;\n } else if (this.submitter.matches(\"input\")) {\n const input = this.submitter;\n this.originalSubmitText = input.value;\n input.value = this.submitsWith;\n }\n }\n\n resetSubmitterText() {\n if (!this.submitter || !this.originalSubmitText) return\n\n if (this.submitter.matches(\"button\")) {\n this.submitter.innerHTML = this.originalSubmitText;\n } else if (this.submitter.matches(\"input\")) {\n const input = this.submitter;\n input.value = this.originalSubmitText;\n }\n }\n\n requestMustRedirect(request) {\n return !request.isSafe && this.mustRedirect\n }\n\n requestAcceptsTurboStreamResponse(request) {\n return !request.isSafe || hasAttribute(\"data-turbo-stream\", this.submitter, this.formElement)\n }\n\n get submitsWith() {\n return this.submitter?.getAttribute(\"data-turbo-submits-with\")\n }\n}\n\nfunction buildFormData(formElement, submitter) {\n const formData = new FormData(formElement);\n const name = submitter?.getAttribute(\"name\");\n const value = submitter?.getAttribute(\"value\");\n\n if (name) {\n formData.append(name, value || \"\");\n }\n\n return formData\n}\n\nfunction getCookieValue(cookieName) {\n if (cookieName != null) {\n const cookies = document.cookie ? document.cookie.split(\"; \") : [];\n const cookie = cookies.find((cookie) => cookie.startsWith(cookieName));\n if (cookie) {\n const value = cookie.split(\"=\").slice(1).join(\"=\");\n return value ? decodeURIComponent(value) : undefined\n }\n }\n}\n\nfunction responseSucceededWithoutRedirect(response) {\n return response.statusCode == 200 && !response.redirected\n}\n\nfunction getFormAction(formElement, submitter) {\n const formElementAction = typeof formElement.action === \"string\" ? formElement.action : null;\n\n if (submitter?.hasAttribute(\"formaction\")) {\n return submitter.getAttribute(\"formaction\") || \"\"\n } else {\n return formElement.getAttribute(\"action\") || formElementAction || \"\"\n }\n}\n\nfunction getAction(formAction, fetchMethod) {\n const action = expandURL(formAction);\n\n if (isSafe(fetchMethod)) {\n action.search = \"\";\n }\n\n return action\n}\n\nfunction getMethod(formElement, submitter) {\n const method = submitter?.getAttribute(\"formmethod\") || formElement.getAttribute(\"method\") || \"\";\n return fetchMethodFromString(method.toLowerCase()) || FetchMethod.get\n}\n\nfunction getEnctype(formElement, submitter) {\n return fetchEnctypeFromString(submitter?.getAttribute(\"formenctype\") || formElement.enctype)\n}\n\nclass Snapshot {\n constructor(element) {\n this.element = element;\n }\n\n get activeElement() {\n return this.element.ownerDocument.activeElement\n }\n\n get children() {\n return [...this.element.children]\n }\n\n hasAnchor(anchor) {\n return this.getElementForAnchor(anchor) != null\n }\n\n getElementForAnchor(anchor) {\n return anchor ? this.element.querySelector(`[id='${anchor}'], a[name='${anchor}']`) : null\n }\n\n get isConnected() {\n return this.element.isConnected\n }\n\n get firstAutofocusableElement() {\n return queryAutofocusableElement(this.element)\n }\n\n get permanentElements() {\n return queryPermanentElementsAll(this.element)\n }\n\n getPermanentElementById(id) {\n return getPermanentElementById(this.element, id)\n }\n\n getPermanentElementMapForSnapshot(snapshot) {\n const permanentElementMap = {};\n\n for (const currentPermanentElement of this.permanentElements) {\n const { id } = currentPermanentElement;\n const newPermanentElement = snapshot.getPermanentElementById(id);\n if (newPermanentElement) {\n permanentElementMap[id] = [currentPermanentElement, newPermanentElement];\n }\n }\n\n return permanentElementMap\n }\n}\n\nfunction getPermanentElementById(node, id) {\n return node.querySelector(`#${id}[data-turbo-permanent]`)\n}\n\nfunction queryPermanentElementsAll(node) {\n return node.querySelectorAll(\"[id][data-turbo-permanent]\")\n}\n\nclass FormSubmitObserver {\n started = false\n\n constructor(delegate, eventTarget) {\n this.delegate = delegate;\n this.eventTarget = eventTarget;\n }\n\n start() {\n if (!this.started) {\n this.eventTarget.addEventListener(\"submit\", this.submitCaptured, true);\n this.started = true;\n }\n }\n\n stop() {\n if (this.started) {\n this.eventTarget.removeEventListener(\"submit\", this.submitCaptured, true);\n this.started = false;\n }\n }\n\n submitCaptured = () => {\n this.eventTarget.removeEventListener(\"submit\", this.submitBubbled, false);\n this.eventTarget.addEventListener(\"submit\", this.submitBubbled, false);\n }\n\n submitBubbled = (event) => {\n if (!event.defaultPrevented) {\n const form = event.target instanceof HTMLFormElement ? event.target : undefined;\n const submitter = event.submitter || undefined;\n\n if (\n form &&\n submissionDoesNotDismissDialog(form, submitter) &&\n submissionDoesNotTargetIFrame(form, submitter) &&\n this.delegate.willSubmitForm(form, submitter)\n ) {\n event.preventDefault();\n event.stopImmediatePropagation();\n this.delegate.formSubmitted(form, submitter);\n }\n }\n }\n}\n\nfunction submissionDoesNotDismissDialog(form, submitter) {\n const method = submitter?.getAttribute(\"formmethod\") || form.getAttribute(\"method\");\n\n return method != \"dialog\"\n}\n\nfunction submissionDoesNotTargetIFrame(form, submitter) {\n const target = submitter?.getAttribute(\"formtarget\") || form.getAttribute(\"target\");\n\n return doesNotTargetIFrame(target)\n}\n\nclass View {\n #resolveRenderPromise = (_value) => {}\n #resolveInterceptionPromise = (_value) => {}\n\n constructor(delegate, element) {\n this.delegate = delegate;\n this.element = element;\n }\n\n // Scrolling\n\n scrollToAnchor(anchor) {\n const element = this.snapshot.getElementForAnchor(anchor);\n if (element) {\n this.focusElement(element);\n this.scrollToElement(element);\n } else {\n this.scrollToPosition({ x: 0, y: 0 });\n }\n }\n\n scrollToAnchorFromLocation(location) {\n this.scrollToAnchor(getAnchor(location));\n }\n\n scrollToElement(element) {\n element.scrollIntoView();\n }\n\n focusElement(element) {\n if (element instanceof HTMLElement) {\n if (element.hasAttribute(\"tabindex\")) {\n element.focus();\n } else {\n element.setAttribute(\"tabindex\", \"-1\");\n element.focus();\n element.removeAttribute(\"tabindex\");\n }\n }\n }\n\n scrollToPosition({ x, y }) {\n this.scrollRoot.scrollTo(x, y);\n }\n\n scrollToTop() {\n this.scrollToPosition({ x: 0, y: 0 });\n }\n\n get scrollRoot() {\n return window\n }\n\n // Rendering\n\n async render(renderer) {\n const { isPreview, shouldRender, willRender, newSnapshot: snapshot } = renderer;\n\n // A workaround to ignore tracked element mismatch reloads when performing\n // a promoted Visit from a frame navigation\n const shouldInvalidate = willRender;\n\n if (shouldRender) {\n try {\n this.renderPromise = new Promise((resolve) => (this.#resolveRenderPromise = resolve));\n this.renderer = renderer;\n await this.prepareToRenderSnapshot(renderer);\n\n const renderInterception = new Promise((resolve) => (this.#resolveInterceptionPromise = resolve));\n const options = { resume: this.#resolveInterceptionPromise, render: this.renderer.renderElement, renderMethod: this.renderer.renderMethod };\n const immediateRender = this.delegate.allowsImmediateRender(snapshot, options);\n if (!immediateRender) await renderInterception;\n\n await this.renderSnapshot(renderer);\n this.delegate.viewRenderedSnapshot(snapshot, isPreview, this.renderer.renderMethod);\n this.delegate.preloadOnLoadLinksForView(this.element);\n this.finishRenderingSnapshot(renderer);\n } finally {\n delete this.renderer;\n this.#resolveRenderPromise(undefined);\n delete this.renderPromise;\n }\n } else if (shouldInvalidate) {\n this.invalidate(renderer.reloadReason);\n }\n }\n\n invalidate(reason) {\n this.delegate.viewInvalidated(reason);\n }\n\n async prepareToRenderSnapshot(renderer) {\n this.markAsPreview(renderer.isPreview);\n await renderer.prepareToRender();\n }\n\n markAsPreview(isPreview) {\n if (isPreview) {\n this.element.setAttribute(\"data-turbo-preview\", \"\");\n } else {\n this.element.removeAttribute(\"data-turbo-preview\");\n }\n }\n\n markVisitDirection(direction) {\n this.element.setAttribute(\"data-turbo-visit-direction\", direction);\n }\n\n unmarkVisitDirection() {\n this.element.removeAttribute(\"data-turbo-visit-direction\");\n }\n\n async renderSnapshot(renderer) {\n await renderer.render();\n }\n\n finishRenderingSnapshot(renderer) {\n renderer.finishRendering();\n }\n}\n\nclass FrameView extends View {\n missing() {\n this.element.innerHTML = `Content missing`;\n }\n\n get snapshot() {\n return new Snapshot(this.element)\n }\n}\n\nclass LinkInterceptor {\n constructor(delegate, element) {\n this.delegate = delegate;\n this.element = element;\n }\n\n start() {\n this.element.addEventListener(\"click\", this.clickBubbled);\n document.addEventListener(\"turbo:click\", this.linkClicked);\n document.addEventListener(\"turbo:before-visit\", this.willVisit);\n }\n\n stop() {\n this.element.removeEventListener(\"click\", this.clickBubbled);\n document.removeEventListener(\"turbo:click\", this.linkClicked);\n document.removeEventListener(\"turbo:before-visit\", this.willVisit);\n }\n\n clickBubbled = (event) => {\n if (this.clickEventIsSignificant(event)) {\n this.clickEvent = event;\n } else {\n delete this.clickEvent;\n }\n }\n\n linkClicked = (event) => {\n if (this.clickEvent && this.clickEventIsSignificant(event)) {\n if (this.delegate.shouldInterceptLinkClick(event.target, event.detail.url, event.detail.originalEvent)) {\n this.clickEvent.preventDefault();\n event.preventDefault();\n this.delegate.linkClickIntercepted(event.target, event.detail.url, event.detail.originalEvent);\n }\n }\n delete this.clickEvent;\n }\n\n willVisit = (_event) => {\n delete this.clickEvent;\n }\n\n clickEventIsSignificant(event) {\n const target = event.composed ? event.target?.parentElement : event.target;\n const element = findLinkFromClickTarget(target) || target;\n\n return element instanceof Element && element.closest(\"turbo-frame, html\") == this.element\n }\n}\n\nclass LinkClickObserver {\n started = false\n\n constructor(delegate, eventTarget) {\n this.delegate = delegate;\n this.eventTarget = eventTarget;\n }\n\n start() {\n if (!this.started) {\n this.eventTarget.addEventListener(\"click\", this.clickCaptured, true);\n this.started = true;\n }\n }\n\n stop() {\n if (this.started) {\n this.eventTarget.removeEventListener(\"click\", this.clickCaptured, true);\n this.started = false;\n }\n }\n\n clickCaptured = () => {\n this.eventTarget.removeEventListener(\"click\", this.clickBubbled, false);\n this.eventTarget.addEventListener(\"click\", this.clickBubbled, false);\n }\n\n clickBubbled = (event) => {\n if (event instanceof MouseEvent && this.clickEventIsSignificant(event)) {\n const target = (event.composedPath && event.composedPath()[0]) || event.target;\n const link = findLinkFromClickTarget(target);\n if (link && doesNotTargetIFrame(link.target)) {\n const location = getLocationForLink(link);\n if (this.delegate.willFollowLinkToLocation(link, location, event)) {\n event.preventDefault();\n this.delegate.followedLinkToLocation(link, location);\n }\n }\n }\n }\n\n clickEventIsSignificant(event) {\n return !(\n (event.target && event.target.isContentEditable) ||\n event.defaultPrevented ||\n event.which > 1 ||\n event.altKey ||\n event.ctrlKey ||\n event.metaKey ||\n event.shiftKey\n )\n }\n}\n\nclass FormLinkClickObserver {\n constructor(delegate, element) {\n this.delegate = delegate;\n this.linkInterceptor = new LinkClickObserver(this, element);\n }\n\n start() {\n this.linkInterceptor.start();\n }\n\n stop() {\n this.linkInterceptor.stop();\n }\n\n // Link hover observer delegate\n\n canPrefetchRequestToLocation(link, location) {\n return false\n }\n\n prefetchAndCacheRequestToLocation(link, location) {\n return\n }\n\n // Link click observer delegate\n\n willFollowLinkToLocation(link, location, originalEvent) {\n return (\n this.delegate.willSubmitFormLinkToLocation(link, location, originalEvent) &&\n (link.hasAttribute(\"data-turbo-method\") || link.hasAttribute(\"data-turbo-stream\"))\n )\n }\n\n followedLinkToLocation(link, location) {\n const form = document.createElement(\"form\");\n\n const type = \"hidden\";\n for (const [name, value] of location.searchParams) {\n form.append(Object.assign(document.createElement(\"input\"), { type, name, value }));\n }\n\n const action = Object.assign(location, { search: \"\" });\n form.setAttribute(\"data-turbo\", \"true\");\n form.setAttribute(\"action\", action.href);\n form.setAttribute(\"hidden\", \"\");\n\n const method = link.getAttribute(\"data-turbo-method\");\n if (method) form.setAttribute(\"method\", method);\n\n const turboFrame = link.getAttribute(\"data-turbo-frame\");\n if (turboFrame) form.setAttribute(\"data-turbo-frame\", turboFrame);\n\n const turboAction = getVisitAction(link);\n if (turboAction) form.setAttribute(\"data-turbo-action\", turboAction);\n\n const turboConfirm = link.getAttribute(\"data-turbo-confirm\");\n if (turboConfirm) form.setAttribute(\"data-turbo-confirm\", turboConfirm);\n\n const turboStream = link.hasAttribute(\"data-turbo-stream\");\n if (turboStream) form.setAttribute(\"data-turbo-stream\", \"\");\n\n this.delegate.submittedFormLinkToLocation(link, location, form);\n\n document.body.appendChild(form);\n form.addEventListener(\"turbo:submit-end\", () => form.remove(), { once: true });\n requestAnimationFrame(() => form.requestSubmit());\n }\n}\n\nclass Bardo {\n static async preservingPermanentElements(delegate, permanentElementMap, callback) {\n const bardo = new this(delegate, permanentElementMap);\n bardo.enter();\n await callback();\n bardo.leave();\n }\n\n constructor(delegate, permanentElementMap) {\n this.delegate = delegate;\n this.permanentElementMap = permanentElementMap;\n }\n\n enter() {\n for (const id in this.permanentElementMap) {\n const [currentPermanentElement, newPermanentElement] = this.permanentElementMap[id];\n this.delegate.enteringBardo(currentPermanentElement, newPermanentElement);\n this.replaceNewPermanentElementWithPlaceholder(newPermanentElement);\n }\n }\n\n leave() {\n for (const id in this.permanentElementMap) {\n const [currentPermanentElement] = this.permanentElementMap[id];\n this.replaceCurrentPermanentElementWithClone(currentPermanentElement);\n this.replacePlaceholderWithPermanentElement(currentPermanentElement);\n this.delegate.leavingBardo(currentPermanentElement);\n }\n }\n\n replaceNewPermanentElementWithPlaceholder(permanentElement) {\n const placeholder = createPlaceholderForPermanentElement(permanentElement);\n permanentElement.replaceWith(placeholder);\n }\n\n replaceCurrentPermanentElementWithClone(permanentElement) {\n const clone = permanentElement.cloneNode(true);\n permanentElement.replaceWith(clone);\n }\n\n replacePlaceholderWithPermanentElement(permanentElement) {\n const placeholder = this.getPlaceholderById(permanentElement.id);\n placeholder?.replaceWith(permanentElement);\n }\n\n getPlaceholderById(id) {\n return this.placeholders.find((element) => element.content == id)\n }\n\n get placeholders() {\n return [...document.querySelectorAll(\"meta[name=turbo-permanent-placeholder][content]\")]\n }\n}\n\nfunction createPlaceholderForPermanentElement(permanentElement) {\n const element = document.createElement(\"meta\");\n element.setAttribute(\"name\", \"turbo-permanent-placeholder\");\n element.setAttribute(\"content\", permanentElement.id);\n return element\n}\n\nclass Renderer {\n #activeElement = null\n\n static renderElement(currentElement, newElement) {\n // Abstract method\n }\n\n constructor(currentSnapshot, newSnapshot, isPreview, willRender = true) {\n this.currentSnapshot = currentSnapshot;\n this.newSnapshot = newSnapshot;\n this.isPreview = isPreview;\n this.willRender = willRender;\n this.renderElement = this.constructor.renderElement;\n this.promise = new Promise((resolve, reject) => (this.resolvingFunctions = { resolve, reject }));\n }\n\n get shouldRender() {\n return true\n }\n\n get shouldAutofocus() {\n return true\n }\n\n get reloadReason() {\n return\n }\n\n prepareToRender() {\n return\n }\n\n render() {\n // Abstract method\n }\n\n finishRendering() {\n if (this.resolvingFunctions) {\n this.resolvingFunctions.resolve();\n delete this.resolvingFunctions;\n }\n }\n\n async preservingPermanentElements(callback) {\n await Bardo.preservingPermanentElements(this, this.permanentElementMap, callback);\n }\n\n focusFirstAutofocusableElement() {\n if (this.shouldAutofocus) {\n const element = this.connectedSnapshot.firstAutofocusableElement;\n if (element) {\n element.focus();\n }\n }\n }\n\n // Bardo delegate\n\n enteringBardo(currentPermanentElement) {\n if (this.#activeElement) return\n\n if (currentPermanentElement.contains(this.currentSnapshot.activeElement)) {\n this.#activeElement = this.currentSnapshot.activeElement;\n }\n }\n\n leavingBardo(currentPermanentElement) {\n if (currentPermanentElement.contains(this.#activeElement) && this.#activeElement instanceof HTMLElement) {\n this.#activeElement.focus();\n\n this.#activeElement = null;\n }\n }\n\n get connectedSnapshot() {\n return this.newSnapshot.isConnected ? this.newSnapshot : this.currentSnapshot\n }\n\n get currentElement() {\n return this.currentSnapshot.element\n }\n\n get newElement() {\n return this.newSnapshot.element\n }\n\n get permanentElementMap() {\n return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot)\n }\n\n get renderMethod() {\n return \"replace\"\n }\n}\n\nclass FrameRenderer extends Renderer {\n static renderElement(currentElement, newElement) {\n const destinationRange = document.createRange();\n destinationRange.selectNodeContents(currentElement);\n destinationRange.deleteContents();\n\n const frameElement = newElement;\n const sourceRange = frameElement.ownerDocument?.createRange();\n if (sourceRange) {\n sourceRange.selectNodeContents(frameElement);\n currentElement.appendChild(sourceRange.extractContents());\n }\n }\n\n constructor(delegate, currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) {\n super(currentSnapshot, newSnapshot, renderElement, isPreview, willRender);\n this.delegate = delegate;\n }\n\n get shouldRender() {\n return true\n }\n\n async render() {\n await nextRepaint();\n this.preservingPermanentElements(() => {\n this.loadFrameElement();\n });\n this.scrollFrameIntoView();\n await nextRepaint();\n this.focusFirstAutofocusableElement();\n await nextRepaint();\n this.activateScriptElements();\n }\n\n loadFrameElement() {\n this.delegate.willRenderFrame(this.currentElement, this.newElement);\n this.renderElement(this.currentElement, this.newElement);\n }\n\n scrollFrameIntoView() {\n if (this.currentElement.autoscroll || this.newElement.autoscroll) {\n const element = this.currentElement.firstElementChild;\n const block = readScrollLogicalPosition(this.currentElement.getAttribute(\"data-autoscroll-block\"), \"end\");\n const behavior = readScrollBehavior(this.currentElement.getAttribute(\"data-autoscroll-behavior\"), \"auto\");\n\n if (element) {\n element.scrollIntoView({ block, behavior });\n return true\n }\n }\n return false\n }\n\n activateScriptElements() {\n for (const inertScriptElement of this.newScriptElements) {\n const activatedScriptElement = activateScriptElement(inertScriptElement);\n inertScriptElement.replaceWith(activatedScriptElement);\n }\n }\n\n get newScriptElements() {\n return this.currentElement.querySelectorAll(\"script\")\n }\n}\n\nfunction readScrollLogicalPosition(value, defaultValue) {\n if (value == \"end\" || value == \"start\" || value == \"center\" || value == \"nearest\") {\n return value\n } else {\n return defaultValue\n }\n}\n\nfunction readScrollBehavior(value, defaultValue) {\n if (value == \"auto\" || value == \"smooth\") {\n return value\n } else {\n return defaultValue\n }\n}\n\n/**\n * @typedef {object} ConfigHead\n *\n * @property {'merge' | 'append' | 'morph' | 'none'} [style]\n * @property {boolean} [block]\n * @property {boolean} [ignore]\n * @property {function(Element): boolean} [shouldPreserve]\n * @property {function(Element): boolean} [shouldReAppend]\n * @property {function(Element): boolean} [shouldRemove]\n * @property {function(Element, {added: Node[], kept: Element[], removed: Element[]}): void} [afterHeadMorphed]\n */\n\n/**\n * @typedef {object} ConfigCallbacks\n *\n * @property {function(Node): boolean} [beforeNodeAdded]\n * @property {function(Node): void} [afterNodeAdded]\n * @property {function(Element, Node): boolean} [beforeNodeMorphed]\n * @property {function(Element, Node): void} [afterNodeMorphed]\n * @property {function(Element): boolean} [beforeNodeRemoved]\n * @property {function(Element): void} [afterNodeRemoved]\n * @property {function(string, Element, \"update\" | \"remove\"): boolean} [beforeAttributeUpdated]\n */\n\n/**\n * @typedef {object} Config\n *\n * @property {'outerHTML' | 'innerHTML'} [morphStyle]\n * @property {boolean} [ignoreActive]\n * @property {boolean} [ignoreActiveValue]\n * @property {boolean} [restoreFocus]\n * @property {ConfigCallbacks} [callbacks]\n * @property {ConfigHead} [head]\n */\n\n/**\n * @typedef {function} NoOp\n *\n * @returns {void}\n */\n\n/**\n * @typedef {object} ConfigHeadInternal\n *\n * @property {'merge' | 'append' | 'morph' | 'none'} style\n * @property {boolean} [block]\n * @property {boolean} [ignore]\n * @property {(function(Element): boolean) | NoOp} shouldPreserve\n * @property {(function(Element): boolean) | NoOp} shouldReAppend\n * @property {(function(Element): boolean) | NoOp} shouldRemove\n * @property {(function(Element, {added: Node[], kept: Element[], removed: Element[]}): void) | NoOp} afterHeadMorphed\n */\n\n/**\n * @typedef {object} ConfigCallbacksInternal\n *\n * @property {(function(Node): boolean) | NoOp} beforeNodeAdded\n * @property {(function(Node): void) | NoOp} afterNodeAdded\n * @property {(function(Node, Node): boolean) | NoOp} beforeNodeMorphed\n * @property {(function(Node, Node): void) | NoOp} afterNodeMorphed\n * @property {(function(Node): boolean) | NoOp} beforeNodeRemoved\n * @property {(function(Node): void) | NoOp} afterNodeRemoved\n * @property {(function(string, Element, \"update\" | \"remove\"): boolean) | NoOp} beforeAttributeUpdated\n */\n\n/**\n * @typedef {object} ConfigInternal\n *\n * @property {'outerHTML' | 'innerHTML'} morphStyle\n * @property {boolean} [ignoreActive]\n * @property {boolean} [ignoreActiveValue]\n * @property {boolean} [restoreFocus]\n * @property {ConfigCallbacksInternal} callbacks\n * @property {ConfigHeadInternal} head\n */\n\n/**\n * @typedef {Object} IdSets\n * @property {Set} persistentIds\n * @property {Map>} idMap\n */\n\n/**\n * @typedef {Function} Morph\n *\n * @param {Element | Document} oldNode\n * @param {Element | Node | HTMLCollection | Node[] | string | null} newContent\n * @param {Config} [config]\n * @returns {undefined | Node[]}\n */\n\n// base IIFE to define idiomorph\n/**\n *\n * @type {{defaults: ConfigInternal, morph: Morph}}\n */\nvar Idiomorph = (function () {\n\n /**\n * @typedef {object} MorphContext\n *\n * @property {Element} target\n * @property {Element} newContent\n * @property {ConfigInternal} config\n * @property {ConfigInternal['morphStyle']} morphStyle\n * @property {ConfigInternal['ignoreActive']} ignoreActive\n * @property {ConfigInternal['ignoreActiveValue']} ignoreActiveValue\n * @property {ConfigInternal['restoreFocus']} restoreFocus\n * @property {Map>} idMap\n * @property {Set} persistentIds\n * @property {ConfigInternal['callbacks']} callbacks\n * @property {ConfigInternal['head']} head\n * @property {HTMLDivElement} pantry\n * @property {Element[]} activeElementAndParents\n */\n\n //=============================================================================\n // AND NOW IT BEGINS...\n //=============================================================================\n\n const noOp = () => {};\n /**\n * Default configuration values, updatable by users now\n * @type {ConfigInternal}\n */\n const defaults = {\n morphStyle: \"outerHTML\",\n callbacks: {\n beforeNodeAdded: noOp,\n afterNodeAdded: noOp,\n beforeNodeMorphed: noOp,\n afterNodeMorphed: noOp,\n beforeNodeRemoved: noOp,\n afterNodeRemoved: noOp,\n beforeAttributeUpdated: noOp,\n },\n head: {\n style: \"merge\",\n shouldPreserve: (elt) => elt.getAttribute(\"im-preserve\") === \"true\",\n shouldReAppend: (elt) => elt.getAttribute(\"im-re-append\") === \"true\",\n shouldRemove: noOp,\n afterHeadMorphed: noOp,\n },\n restoreFocus: true,\n };\n\n /**\n * Core idiomorph function for morphing one DOM tree to another\n *\n * @param {Element | Document} oldNode\n * @param {Element | Node | HTMLCollection | Node[] | string | null} newContent\n * @param {Config} [config]\n * @returns {Promise | Node[]}\n */\n function morph(oldNode, newContent, config = {}) {\n oldNode = normalizeElement(oldNode);\n const newNode = normalizeParent(newContent);\n const ctx = createMorphContext(oldNode, newNode, config);\n\n const morphedNodes = saveAndRestoreFocus(ctx, () => {\n return withHeadBlocking(\n ctx,\n oldNode,\n newNode,\n /** @param {MorphContext} ctx */ (ctx) => {\n if (ctx.morphStyle === \"innerHTML\") {\n morphChildren(ctx, oldNode, newNode);\n return Array.from(oldNode.childNodes);\n } else {\n return morphOuterHTML(ctx, oldNode, newNode);\n }\n },\n );\n });\n\n ctx.pantry.remove();\n return morphedNodes;\n }\n\n /**\n * Morph just the outerHTML of the oldNode to the newContent\n * We have to be careful because the oldNode could have siblings which need to be untouched\n * @param {MorphContext} ctx\n * @param {Element} oldNode\n * @param {Element} newNode\n * @returns {Node[]}\n */\n function morphOuterHTML(ctx, oldNode, newNode) {\n const oldParent = normalizeParent(oldNode);\n morphChildren(\n ctx,\n oldParent,\n newNode,\n // these two optional params are the secret sauce\n oldNode, // start point for iteration\n oldNode.nextSibling, // end point for iteration\n );\n // this is safe even with siblings, because normalizeParent returns a SlicedParentNode if needed.\n return Array.from(oldParent.childNodes);\n }\n\n /**\n * @param {MorphContext} ctx\n * @param {Function} fn\n * @returns {Promise | Node[]}\n */\n function saveAndRestoreFocus(ctx, fn) {\n if (!ctx.config.restoreFocus) return fn();\n let activeElement =\n /** @type {HTMLInputElement|HTMLTextAreaElement|null} */ (\n document.activeElement\n );\n\n // don't bother if the active element is not an input or textarea\n if (\n !(\n activeElement instanceof HTMLInputElement ||\n activeElement instanceof HTMLTextAreaElement\n )\n ) {\n return fn();\n }\n\n const { id: activeElementId, selectionStart, selectionEnd } = activeElement;\n\n const results = fn();\n\n if (\n activeElementId &&\n activeElementId !== document.activeElement?.getAttribute(\"id\")\n ) {\n activeElement = ctx.target.querySelector(`[id=\"${activeElementId}\"]`);\n activeElement?.focus();\n }\n if (activeElement && !activeElement.selectionEnd && selectionEnd) {\n activeElement.setSelectionRange(selectionStart, selectionEnd);\n }\n\n return results;\n }\n\n const morphChildren = (function () {\n /**\n * This is the core algorithm for matching up children. The idea is to use id sets to try to match up\n * nodes as faithfully as possible. We greedily match, which allows us to keep the algorithm fast, but\n * by using id sets, we are able to better match up with content deeper in the DOM.\n *\n * Basic algorithm:\n * - for each node in the new content:\n * - search self and siblings for an id set match, falling back to a soft match\n * - if match found\n * - remove any nodes up to the match:\n * - pantry persistent nodes\n * - delete the rest\n * - morph the match\n * - elsif no match found, and node is persistent\n * - find its match by querying the old root (future) and pantry (past)\n * - move it and its children here\n * - morph it\n * - else\n * - create a new node from scratch as a last result\n *\n * @param {MorphContext} ctx the merge context\n * @param {Element} oldParent the old content that we are merging the new content into\n * @param {Element} newParent the parent element of the new content\n * @param {Node|null} [insertionPoint] the point in the DOM we start morphing at (defaults to first child)\n * @param {Node|null} [endPoint] the point in the DOM we stop morphing at (defaults to after last child)\n */\n function morphChildren(\n ctx,\n oldParent,\n newParent,\n insertionPoint = null,\n endPoint = null,\n ) {\n // normalize\n if (\n oldParent instanceof HTMLTemplateElement &&\n newParent instanceof HTMLTemplateElement\n ) {\n // @ts-ignore we can pretend the DocumentFragment is an Element\n oldParent = oldParent.content;\n // @ts-ignore ditto\n newParent = newParent.content;\n }\n insertionPoint ||= oldParent.firstChild;\n\n // run through all the new content\n for (const newChild of newParent.childNodes) {\n // once we reach the end of the old parent content skip to the end and insert the rest\n if (insertionPoint && insertionPoint != endPoint) {\n const bestMatch = findBestMatch(\n ctx,\n newChild,\n insertionPoint,\n endPoint,\n );\n if (bestMatch) {\n // if the node to morph is not at the insertion point then remove/move up to it\n if (bestMatch !== insertionPoint) {\n removeNodesBetween(ctx, insertionPoint, bestMatch);\n }\n morphNode(bestMatch, newChild, ctx);\n insertionPoint = bestMatch.nextSibling;\n continue;\n }\n }\n\n // if the matching node is elsewhere in the original content\n if (newChild instanceof Element) {\n // we can pretend the id is non-null because the next `.has` line will reject it if not\n const newChildId = /** @type {String} */ (\n newChild.getAttribute(\"id\")\n );\n if (ctx.persistentIds.has(newChildId)) {\n // move it and all its children here and morph\n const movedChild = moveBeforeById(\n oldParent,\n newChildId,\n insertionPoint,\n ctx,\n );\n morphNode(movedChild, newChild, ctx);\n insertionPoint = movedChild.nextSibling;\n continue;\n }\n }\n\n // last resort: insert the new node from scratch\n const insertedNode = createNode(\n oldParent,\n newChild,\n insertionPoint,\n ctx,\n );\n // could be null if beforeNodeAdded prevented insertion\n if (insertedNode) {\n insertionPoint = insertedNode.nextSibling;\n }\n }\n\n // remove any remaining old nodes that didn't match up with new content\n while (insertionPoint && insertionPoint != endPoint) {\n const tempNode = insertionPoint;\n insertionPoint = insertionPoint.nextSibling;\n removeNode(ctx, tempNode);\n }\n }\n\n /**\n * This performs the action of inserting a new node while handling situations where the node contains\n * elements with persistent ids and possible state info we can still preserve by moving in and then morphing\n *\n * @param {Element} oldParent\n * @param {Node} newChild\n * @param {Node|null} insertionPoint\n * @param {MorphContext} ctx\n * @returns {Node|null}\n */\n function createNode(oldParent, newChild, insertionPoint, ctx) {\n if (ctx.callbacks.beforeNodeAdded(newChild) === false) return null;\n if (ctx.idMap.has(newChild)) {\n // node has children with ids with possible state so create a dummy elt of same type and apply full morph algorithm\n const newEmptyChild = document.createElement(\n /** @type {Element} */ (newChild).tagName,\n );\n oldParent.insertBefore(newEmptyChild, insertionPoint);\n morphNode(newEmptyChild, newChild, ctx);\n ctx.callbacks.afterNodeAdded(newEmptyChild);\n return newEmptyChild;\n } else {\n // optimisation: no id state to preserve so we can just insert a clone of the newChild and its descendants\n const newClonedChild = document.importNode(newChild, true); // importNode to not mutate newParent\n oldParent.insertBefore(newClonedChild, insertionPoint);\n ctx.callbacks.afterNodeAdded(newClonedChild);\n return newClonedChild;\n }\n }\n\n //=============================================================================\n // Matching Functions\n //=============================================================================\n const findBestMatch = (function () {\n /**\n * Scans forward from the startPoint to the endPoint looking for a match\n * for the node. It looks for an id set match first, then a soft match.\n * We abort softmatching if we find two future soft matches, to reduce churn.\n * @param {Node} node\n * @param {MorphContext} ctx\n * @param {Node | null} startPoint\n * @param {Node | null} endPoint\n * @returns {Node | null}\n */\n function findBestMatch(ctx, node, startPoint, endPoint) {\n let softMatch = null;\n let nextSibling = node.nextSibling;\n let siblingSoftMatchCount = 0;\n\n let cursor = startPoint;\n while (cursor && cursor != endPoint) {\n // soft matching is a prerequisite for id set matching\n if (isSoftMatch(cursor, node)) {\n if (isIdSetMatch(ctx, cursor, node)) {\n return cursor; // found an id set match, we're done!\n }\n\n // we haven't yet saved a soft match fallback\n if (softMatch === null) {\n // the current soft match will hard match something else in the future, leave it\n if (!ctx.idMap.has(cursor)) {\n // save this as the fallback if we get through the loop without finding a hard match\n softMatch = cursor;\n }\n }\n }\n if (\n softMatch === null &&\n nextSibling &&\n isSoftMatch(cursor, nextSibling)\n ) {\n // The next new node has a soft match with this node, so\n // increment the count of future soft matches\n siblingSoftMatchCount++;\n nextSibling = nextSibling.nextSibling;\n\n // If there are two future soft matches, block soft matching for this node to allow\n // future siblings to soft match. This is to reduce churn in the DOM when an element\n // is prepended.\n if (siblingSoftMatchCount >= 2) {\n softMatch = undefined;\n }\n }\n\n // if the current node contains active element, stop looking for better future matches,\n // because if one is found, this node will be moved to the pantry, reparenting it and thus losing focus\n // @ts-ignore pretend cursor is Element rather than Node, we're just testing for array inclusion\n if (ctx.activeElementAndParents.includes(cursor)) break;\n\n cursor = cursor.nextSibling;\n }\n\n return softMatch || null;\n }\n\n /**\n *\n * @param {MorphContext} ctx\n * @param {Node} oldNode\n * @param {Node} newNode\n * @returns {boolean}\n */\n function isIdSetMatch(ctx, oldNode, newNode) {\n let oldSet = ctx.idMap.get(oldNode);\n let newSet = ctx.idMap.get(newNode);\n\n if (!newSet || !oldSet) return false;\n\n for (const id of oldSet) {\n // a potential match is an id in the new and old nodes that\n // has not already been merged into the DOM\n // But the newNode content we call this on has not been\n // merged yet and we don't allow duplicate IDs so it is simple\n if (newSet.has(id)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n *\n * @param {Node} oldNode\n * @param {Node} newNode\n * @returns {boolean}\n */\n function isSoftMatch(oldNode, newNode) {\n // ok to cast: if one is not element, `id` and `tagName` will be undefined and we'll just compare that.\n const oldElt = /** @type {Element} */ (oldNode);\n const newElt = /** @type {Element} */ (newNode);\n\n return (\n oldElt.nodeType === newElt.nodeType &&\n oldElt.tagName === newElt.tagName &&\n // If oldElt has an `id` with possible state and it doesn't match newElt.id then avoid morphing.\n // We'll still match an anonymous node with an IDed newElt, though, because if it got this far,\n // its not persistent, and new nodes can't have any hidden state.\n // We can't use .id because of form input shadowing, and we can't count on .getAttribute's presence because it could be a document-fragment\n (!oldElt.getAttribute?.(\"id\") ||\n oldElt.getAttribute?.(\"id\") === newElt.getAttribute?.(\"id\"))\n );\n }\n\n return findBestMatch;\n })();\n\n //=============================================================================\n // DOM Manipulation Functions\n //=============================================================================\n\n /**\n * Gets rid of an unwanted DOM node; strategy depends on nature of its reuse:\n * - Persistent nodes will be moved to the pantry for later reuse\n * - Other nodes will have their hooks called, and then are removed\n * @param {MorphContext} ctx\n * @param {Node} node\n */\n function removeNode(ctx, node) {\n // are we going to id set match this later?\n if (ctx.idMap.has(node)) {\n // skip callbacks and move to pantry\n moveBefore(ctx.pantry, node, null);\n } else {\n // remove for realsies\n if (ctx.callbacks.beforeNodeRemoved(node) === false) return;\n node.parentNode?.removeChild(node);\n ctx.callbacks.afterNodeRemoved(node);\n }\n }\n\n /**\n * Remove nodes between the start and end nodes\n * @param {MorphContext} ctx\n * @param {Node} startInclusive\n * @param {Node} endExclusive\n * @returns {Node|null}\n */\n function removeNodesBetween(ctx, startInclusive, endExclusive) {\n /** @type {Node | null} */\n let cursor = startInclusive;\n // remove nodes until the endExclusive node\n while (cursor && cursor !== endExclusive) {\n let tempNode = /** @type {Node} */ (cursor);\n cursor = cursor.nextSibling;\n removeNode(ctx, tempNode);\n }\n return cursor;\n }\n\n /**\n * Search for an element by id within the document and pantry, and move it using moveBefore.\n *\n * @param {Element} parentNode - The parent node to which the element will be moved.\n * @param {string} id - The ID of the element to be moved.\n * @param {Node | null} after - The reference node to insert the element before.\n * If `null`, the element is appended as the last child.\n * @param {MorphContext} ctx\n * @returns {Element} The found element\n */\n function moveBeforeById(parentNode, id, after, ctx) {\n const target =\n /** @type {Element} - will always be found */\n (\n // ctx.target.id unsafe because of form input shadowing\n // ctx.target could be a document fragment which doesn't have `getAttribute`\n (ctx.target.getAttribute?.(\"id\") === id && ctx.target) ||\n ctx.target.querySelector(`[id=\"${id}\"]`) ||\n ctx.pantry.querySelector(`[id=\"${id}\"]`)\n );\n removeElementFromAncestorsIdMaps(target, ctx);\n moveBefore(parentNode, target, after);\n return target;\n }\n\n /**\n * Removes an element from its ancestors' id maps. This is needed when an element is moved from the\n * \"future\" via `moveBeforeId`. Otherwise, its erstwhile ancestors could be mistakenly moved to the\n * pantry rather than being deleted, preventing their removal hooks from being called.\n *\n * @param {Element} element - element to remove from its ancestors' id maps\n * @param {MorphContext} ctx\n */\n function removeElementFromAncestorsIdMaps(element, ctx) {\n // we know id is non-null String, because this function is only called on elements with ids\n const id = /** @type {String} */ (element.getAttribute(\"id\"));\n /** @ts-ignore - safe to loop in this way **/\n while ((element = element.parentNode)) {\n let idSet = ctx.idMap.get(element);\n if (idSet) {\n idSet.delete(id);\n if (!idSet.size) {\n ctx.idMap.delete(element);\n }\n }\n }\n }\n\n /**\n * Moves an element before another element within the same parent.\n * Uses the proposed `moveBefore` API if available (and working), otherwise falls back to `insertBefore`.\n * This is essentialy a forward-compat wrapper.\n *\n * @param {Element} parentNode - The parent node containing the after element.\n * @param {Node} element - The element to be moved.\n * @param {Node | null} after - The reference node to insert `element` before.\n * If `null`, `element` is appended as the last child.\n */\n function moveBefore(parentNode, element, after) {\n // @ts-ignore - use proposed moveBefore feature\n if (parentNode.moveBefore) {\n try {\n // @ts-ignore - use proposed moveBefore feature\n parentNode.moveBefore(element, after);\n } catch (e) {\n // fall back to insertBefore as some browsers may fail on moveBefore when trying to move Dom disconnected nodes to pantry\n parentNode.insertBefore(element, after);\n }\n } else {\n parentNode.insertBefore(element, after);\n }\n }\n\n return morphChildren;\n })();\n\n //=============================================================================\n // Single Node Morphing Code\n //=============================================================================\n const morphNode = (function () {\n /**\n * @param {Node} oldNode root node to merge content into\n * @param {Node} newContent new content to merge\n * @param {MorphContext} ctx the merge context\n * @returns {Node | null} the element that ended up in the DOM\n */\n function morphNode(oldNode, newContent, ctx) {\n if (ctx.ignoreActive && oldNode === document.activeElement) {\n // don't morph focused element\n return null;\n }\n\n if (ctx.callbacks.beforeNodeMorphed(oldNode, newContent) === false) {\n return oldNode;\n }\n\n if (oldNode instanceof HTMLHeadElement && ctx.head.ignore) ; else if (\n oldNode instanceof HTMLHeadElement &&\n ctx.head.style !== \"morph\"\n ) {\n // ok to cast: if newContent wasn't also a , it would've got caught in the `!isSoftMatch` branch above\n handleHeadElement(\n oldNode,\n /** @type {HTMLHeadElement} */ (newContent),\n ctx,\n );\n } else {\n morphAttributes(oldNode, newContent, ctx);\n if (!ignoreValueOfActiveElement(oldNode, ctx)) {\n // @ts-ignore newContent can be a node here because .firstChild will be null\n morphChildren(ctx, oldNode, newContent);\n }\n }\n ctx.callbacks.afterNodeMorphed(oldNode, newContent);\n return oldNode;\n }\n\n /**\n * syncs the oldNode to the newNode, copying over all attributes and\n * inner element state from the newNode to the oldNode\n *\n * @param {Node} oldNode the node to copy attributes & state to\n * @param {Node} newNode the node to copy attributes & state from\n * @param {MorphContext} ctx the merge context\n */\n function morphAttributes(oldNode, newNode, ctx) {\n let type = newNode.nodeType;\n\n // if is an element type, sync the attributes from the\n // new node into the new node\n if (type === 1 /* element type */) {\n const oldElt = /** @type {Element} */ (oldNode);\n const newElt = /** @type {Element} */ (newNode);\n\n const oldAttributes = oldElt.attributes;\n const newAttributes = newElt.attributes;\n for (const newAttribute of newAttributes) {\n if (ignoreAttribute(newAttribute.name, oldElt, \"update\", ctx)) {\n continue;\n }\n if (oldElt.getAttribute(newAttribute.name) !== newAttribute.value) {\n oldElt.setAttribute(newAttribute.name, newAttribute.value);\n }\n }\n // iterate backwards to avoid skipping over items when a delete occurs\n for (let i = oldAttributes.length - 1; 0 <= i; i--) {\n const oldAttribute = oldAttributes[i];\n\n // toAttributes is a live NamedNodeMap, so iteration+mutation is unsafe\n // e.g. custom element attribute callbacks can remove other attributes\n if (!oldAttribute) continue;\n\n if (!newElt.hasAttribute(oldAttribute.name)) {\n if (ignoreAttribute(oldAttribute.name, oldElt, \"remove\", ctx)) {\n continue;\n }\n oldElt.removeAttribute(oldAttribute.name);\n }\n }\n\n if (!ignoreValueOfActiveElement(oldElt, ctx)) {\n syncInputValue(oldElt, newElt, ctx);\n }\n }\n\n // sync text nodes\n if (type === 8 /* comment */ || type === 3 /* text */) {\n if (oldNode.nodeValue !== newNode.nodeValue) {\n oldNode.nodeValue = newNode.nodeValue;\n }\n }\n }\n\n /**\n * NB: many bothans died to bring us information:\n *\n * https://github.com/patrick-steele-idem/morphdom/blob/master/src/specialElHandlers.js\n * https://github.com/choojs/nanomorph/blob/master/lib/morph.jsL113\n *\n * @param {Element} oldElement the element to sync the input value to\n * @param {Element} newElement the element to sync the input value from\n * @param {MorphContext} ctx the merge context\n */\n function syncInputValue(oldElement, newElement, ctx) {\n if (\n oldElement instanceof HTMLInputElement &&\n newElement instanceof HTMLInputElement &&\n newElement.type !== \"file\"\n ) {\n let newValue = newElement.value;\n let oldValue = oldElement.value;\n\n // sync boolean attributes\n syncBooleanAttribute(oldElement, newElement, \"checked\", ctx);\n syncBooleanAttribute(oldElement, newElement, \"disabled\", ctx);\n\n if (!newElement.hasAttribute(\"value\")) {\n if (!ignoreAttribute(\"value\", oldElement, \"remove\", ctx)) {\n oldElement.value = \"\";\n oldElement.removeAttribute(\"value\");\n }\n } else if (oldValue !== newValue) {\n if (!ignoreAttribute(\"value\", oldElement, \"update\", ctx)) {\n oldElement.setAttribute(\"value\", newValue);\n oldElement.value = newValue;\n }\n }\n // TODO: QUESTION(1cg): this used to only check `newElement` unlike the other branches -- why?\n // did I break something?\n } else if (\n oldElement instanceof HTMLOptionElement &&\n newElement instanceof HTMLOptionElement\n ) {\n syncBooleanAttribute(oldElement, newElement, \"selected\", ctx);\n } else if (\n oldElement instanceof HTMLTextAreaElement &&\n newElement instanceof HTMLTextAreaElement\n ) {\n let newValue = newElement.value;\n let oldValue = oldElement.value;\n if (ignoreAttribute(\"value\", oldElement, \"update\", ctx)) {\n return;\n }\n if (newValue !== oldValue) {\n oldElement.value = newValue;\n }\n if (\n oldElement.firstChild &&\n oldElement.firstChild.nodeValue !== newValue\n ) {\n oldElement.firstChild.nodeValue = newValue;\n }\n }\n }\n\n /**\n * @param {Element} oldElement element to write the value to\n * @param {Element} newElement element to read the value from\n * @param {string} attributeName the attribute name\n * @param {MorphContext} ctx the merge context\n */\n function syncBooleanAttribute(oldElement, newElement, attributeName, ctx) {\n // @ts-ignore this function is only used on boolean attrs that are reflected as dom properties\n const newLiveValue = newElement[attributeName],\n // @ts-ignore ditto\n oldLiveValue = oldElement[attributeName];\n if (newLiveValue !== oldLiveValue) {\n const ignoreUpdate = ignoreAttribute(\n attributeName,\n oldElement,\n \"update\",\n ctx,\n );\n if (!ignoreUpdate) {\n // update attribute's associated DOM property\n // @ts-ignore this function is only used on boolean attrs that are reflected as dom properties\n oldElement[attributeName] = newElement[attributeName];\n }\n if (newLiveValue) {\n if (!ignoreUpdate) {\n // https://developer.mozilla.org/en-US/docs/Glossary/Boolean/HTML\n // this is the correct way to set a boolean attribute to \"true\"\n oldElement.setAttribute(attributeName, \"\");\n }\n } else {\n if (!ignoreAttribute(attributeName, oldElement, \"remove\", ctx)) {\n oldElement.removeAttribute(attributeName);\n }\n }\n }\n }\n\n /**\n * @param {string} attr the attribute to be mutated\n * @param {Element} element the element that is going to be updated\n * @param {\"update\" | \"remove\"} updateType\n * @param {MorphContext} ctx the merge context\n * @returns {boolean} true if the attribute should be ignored, false otherwise\n */\n function ignoreAttribute(attr, element, updateType, ctx) {\n if (\n attr === \"value\" &&\n ctx.ignoreActiveValue &&\n element === document.activeElement\n ) {\n return true;\n }\n return (\n ctx.callbacks.beforeAttributeUpdated(attr, element, updateType) ===\n false\n );\n }\n\n /**\n * @param {Node} possibleActiveElement\n * @param {MorphContext} ctx\n * @returns {boolean}\n */\n function ignoreValueOfActiveElement(possibleActiveElement, ctx) {\n return (\n !!ctx.ignoreActiveValue &&\n possibleActiveElement === document.activeElement &&\n possibleActiveElement !== document.body\n );\n }\n\n return morphNode;\n })();\n\n //=============================================================================\n // Head Management Functions\n //=============================================================================\n /**\n * @param {MorphContext} ctx\n * @param {Element} oldNode\n * @param {Element} newNode\n * @param {function} callback\n * @returns {Node[] | Promise}\n */\n function withHeadBlocking(ctx, oldNode, newNode, callback) {\n if (ctx.head.block) {\n const oldHead = oldNode.querySelector(\"head\");\n const newHead = newNode.querySelector(\"head\");\n if (oldHead && newHead) {\n const promises = handleHeadElement(oldHead, newHead, ctx);\n // when head promises resolve, proceed ignoring the head tag\n return Promise.all(promises).then(() => {\n const newCtx = Object.assign(ctx, {\n head: {\n block: false,\n ignore: true,\n },\n });\n return callback(newCtx);\n });\n }\n }\n // just proceed if we not head blocking\n return callback(ctx);\n }\n\n /**\n * The HEAD tag can be handled specially, either w/ a 'merge' or 'append' style\n *\n * @param {Element} oldHead\n * @param {Element} newHead\n * @param {MorphContext} ctx\n * @returns {Promise[]}\n */\n function handleHeadElement(oldHead, newHead, ctx) {\n let added = [];\n let removed = [];\n let preserved = [];\n let nodesToAppend = [];\n\n // put all new head elements into a Map, by their outerHTML\n let srcToNewHeadNodes = new Map();\n for (const newHeadChild of newHead.children) {\n srcToNewHeadNodes.set(newHeadChild.outerHTML, newHeadChild);\n }\n\n // for each elt in the current head\n for (const currentHeadElt of oldHead.children) {\n // If the current head element is in the map\n let inNewContent = srcToNewHeadNodes.has(currentHeadElt.outerHTML);\n let isReAppended = ctx.head.shouldReAppend(currentHeadElt);\n let isPreserved = ctx.head.shouldPreserve(currentHeadElt);\n if (inNewContent || isPreserved) {\n if (isReAppended) {\n // remove the current version and let the new version replace it and re-execute\n removed.push(currentHeadElt);\n } else {\n // this element already exists and should not be re-appended, so remove it from\n // the new content map, preserving it in the DOM\n srcToNewHeadNodes.delete(currentHeadElt.outerHTML);\n preserved.push(currentHeadElt);\n }\n } else {\n if (ctx.head.style === \"append\") {\n // we are appending and this existing element is not new content\n // so if and only if it is marked for re-append do we do anything\n if (isReAppended) {\n removed.push(currentHeadElt);\n nodesToAppend.push(currentHeadElt);\n }\n } else {\n // if this is a merge, we remove this content since it is not in the new head\n if (ctx.head.shouldRemove(currentHeadElt) !== false) {\n removed.push(currentHeadElt);\n }\n }\n }\n }\n\n // Push the remaining new head elements in the Map into the\n // nodes to append to the head tag\n nodesToAppend.push(...srcToNewHeadNodes.values());\n\n let promises = [];\n for (const newNode of nodesToAppend) {\n // TODO: This could theoretically be null, based on type\n let newElt = /** @type {ChildNode} */ (\n document.createRange().createContextualFragment(newNode.outerHTML)\n .firstChild\n );\n if (ctx.callbacks.beforeNodeAdded(newElt) !== false) {\n if (\n (\"href\" in newElt && newElt.href) ||\n (\"src\" in newElt && newElt.src)\n ) {\n /** @type {(result?: any) => void} */ let resolve;\n let promise = new Promise(function (_resolve) {\n resolve = _resolve;\n });\n newElt.addEventListener(\"load\", function () {\n resolve();\n });\n promises.push(promise);\n }\n oldHead.appendChild(newElt);\n ctx.callbacks.afterNodeAdded(newElt);\n added.push(newElt);\n }\n }\n\n // remove all removed elements, after we have appended the new elements to avoid\n // additional network requests for things like style sheets\n for (const removedElement of removed) {\n if (ctx.callbacks.beforeNodeRemoved(removedElement) !== false) {\n oldHead.removeChild(removedElement);\n ctx.callbacks.afterNodeRemoved(removedElement);\n }\n }\n\n ctx.head.afterHeadMorphed(oldHead, {\n added: added,\n kept: preserved,\n removed: removed,\n });\n return promises;\n }\n\n //=============================================================================\n // Create Morph Context Functions\n //=============================================================================\n const createMorphContext = (function () {\n /**\n *\n * @param {Element} oldNode\n * @param {Element} newContent\n * @param {Config} config\n * @returns {MorphContext}\n */\n function createMorphContext(oldNode, newContent, config) {\n const { persistentIds, idMap } = createIdMaps(oldNode, newContent);\n\n const mergedConfig = mergeDefaults(config);\n const morphStyle = mergedConfig.morphStyle || \"outerHTML\";\n if (![\"innerHTML\", \"outerHTML\"].includes(morphStyle)) {\n throw `Do not understand how to morph style ${morphStyle}`;\n }\n\n return {\n target: oldNode,\n newContent: newContent,\n config: mergedConfig,\n morphStyle: morphStyle,\n ignoreActive: mergedConfig.ignoreActive,\n ignoreActiveValue: mergedConfig.ignoreActiveValue,\n restoreFocus: mergedConfig.restoreFocus,\n idMap: idMap,\n persistentIds: persistentIds,\n pantry: createPantry(),\n activeElementAndParents: createActiveElementAndParents(oldNode),\n callbacks: mergedConfig.callbacks,\n head: mergedConfig.head,\n };\n }\n\n /**\n * Deep merges the config object and the Idiomorph.defaults object to\n * produce a final configuration object\n * @param {Config} config\n * @returns {ConfigInternal}\n */\n function mergeDefaults(config) {\n let finalConfig = Object.assign({}, defaults);\n\n // copy top level stuff into final config\n Object.assign(finalConfig, config);\n\n // copy callbacks into final config (do this to deep merge the callbacks)\n finalConfig.callbacks = Object.assign(\n {},\n defaults.callbacks,\n config.callbacks,\n );\n\n // copy head config into final config (do this to deep merge the head)\n finalConfig.head = Object.assign({}, defaults.head, config.head);\n\n return finalConfig;\n }\n\n /**\n * @returns {HTMLDivElement}\n */\n function createPantry() {\n const pantry = document.createElement(\"div\");\n pantry.hidden = true;\n document.body.insertAdjacentElement(\"afterend\", pantry);\n return pantry;\n }\n\n /**\n * @param {Element} oldNode\n * @returns {Element[]}\n */\n function createActiveElementAndParents(oldNode) {\n /** @type {Element[]} */\n let activeElementAndParents = [];\n let elt = document.activeElement;\n if (elt?.tagName !== \"BODY\" && oldNode.contains(elt)) {\n while (elt) {\n activeElementAndParents.push(elt);\n if (elt === oldNode) break;\n elt = elt.parentElement;\n }\n }\n return activeElementAndParents;\n }\n\n /**\n * Returns all elements with an ID contained within the root element and its descendants\n *\n * @param {Element} root\n * @returns {Element[]}\n */\n function findIdElements(root) {\n let elements = Array.from(root.querySelectorAll(\"[id]\"));\n // root could be a document fragment which doesn't have `getAttribute`\n if (root.getAttribute?.(\"id\")) {\n elements.push(root);\n }\n return elements;\n }\n\n /**\n * A bottom-up algorithm that populates a map of Element -> IdSet.\n * The idSet for a given element is the set of all IDs contained within its subtree.\n * As an optimzation, we filter these IDs through the given list of persistent IDs,\n * because we don't need to bother considering IDed elements that won't be in the new content.\n *\n * @param {Map>} idMap\n * @param {Set} persistentIds\n * @param {Element} root\n * @param {Element[]} elements\n */\n function populateIdMapWithTree(idMap, persistentIds, root, elements) {\n for (const elt of elements) {\n // we can pretend id is non-null String, because the .has line will reject it immediately if not\n const id = /** @type {String} */ (elt.getAttribute(\"id\"));\n if (persistentIds.has(id)) {\n /** @type {Element|null} */\n let current = elt;\n // walk up the parent hierarchy of that element, adding the id\n // of element to the parent's id set\n while (current) {\n let idSet = idMap.get(current);\n // if the id set doesn't exist, create it and insert it in the map\n if (idSet == null) {\n idSet = new Set();\n idMap.set(current, idSet);\n }\n idSet.add(id);\n\n if (current === root) break;\n current = current.parentElement;\n }\n }\n }\n }\n\n /**\n * This function computes a map of nodes to all ids contained within that node (inclusive of the\n * node). This map can be used to ask if two nodes have intersecting sets of ids, which allows\n * for a looser definition of \"matching\" than tradition id matching, and allows child nodes\n * to contribute to a parent nodes matching.\n *\n * @param {Element} oldContent the old content that will be morphed\n * @param {Element} newContent the new content to morph to\n * @returns {IdSets}\n */\n function createIdMaps(oldContent, newContent) {\n const oldIdElements = findIdElements(oldContent);\n const newIdElements = findIdElements(newContent);\n\n const persistentIds = createPersistentIds(oldIdElements, newIdElements);\n\n /** @type {Map>} */\n let idMap = new Map();\n populateIdMapWithTree(idMap, persistentIds, oldContent, oldIdElements);\n\n /** @ts-ignore - if newContent is a duck-typed parent, pass its single child node as the root to halt upwards iteration */\n const newRoot = newContent.__idiomorphRoot || newContent;\n populateIdMapWithTree(idMap, persistentIds, newRoot, newIdElements);\n\n return { persistentIds, idMap };\n }\n\n /**\n * This function computes the set of ids that persist between the two contents excluding duplicates\n *\n * @param {Element[]} oldIdElements\n * @param {Element[]} newIdElements\n * @returns {Set}\n */\n function createPersistentIds(oldIdElements, newIdElements) {\n let duplicateIds = new Set();\n\n /** @type {Map} */\n let oldIdTagNameMap = new Map();\n for (const { id, tagName } of oldIdElements) {\n if (oldIdTagNameMap.has(id)) {\n duplicateIds.add(id);\n } else {\n oldIdTagNameMap.set(id, tagName);\n }\n }\n\n let persistentIds = new Set();\n for (const { id, tagName } of newIdElements) {\n if (persistentIds.has(id)) {\n duplicateIds.add(id);\n } else if (oldIdTagNameMap.get(id) === tagName) {\n persistentIds.add(id);\n }\n // skip if tag types mismatch because its not possible to morph one tag into another\n }\n\n for (const id of duplicateIds) {\n persistentIds.delete(id);\n }\n return persistentIds;\n }\n\n return createMorphContext;\n })();\n\n //=============================================================================\n // HTML Normalization Functions\n //=============================================================================\n const { normalizeElement, normalizeParent } = (function () {\n /** @type {WeakSet} */\n const generatedByIdiomorph = new WeakSet();\n\n /**\n *\n * @param {Element | Document} content\n * @returns {Element}\n */\n function normalizeElement(content) {\n if (content instanceof Document) {\n return content.documentElement;\n } else {\n return content;\n }\n }\n\n /**\n *\n * @param {null | string | Node | HTMLCollection | Node[] | Document & {generatedByIdiomorph:boolean}} newContent\n * @returns {Element}\n */\n function normalizeParent(newContent) {\n if (newContent == null) {\n return document.createElement(\"div\"); // dummy parent element\n } else if (typeof newContent === \"string\") {\n return normalizeParent(parseContent(newContent));\n } else if (\n generatedByIdiomorph.has(/** @type {Element} */ (newContent))\n ) {\n // the template tag created by idiomorph parsing can serve as a dummy parent\n return /** @type {Element} */ (newContent);\n } else if (newContent instanceof Node) {\n if (newContent.parentNode) {\n // we can't use the parent directly because newContent may have siblings\n // that we don't want in the morph, and reparenting might be expensive (TODO is it?),\n // so instead we create a fake parent node that only sees a slice of its children.\n /** @type {Element} */\n return /** @type {any} */ (new SlicedParentNode(newContent));\n } else {\n // a single node is added as a child to a dummy parent\n const dummyParent = document.createElement(\"div\");\n dummyParent.append(newContent);\n return dummyParent;\n }\n } else {\n // all nodes in the array or HTMLElement collection are consolidated under\n // a single dummy parent element\n const dummyParent = document.createElement(\"div\");\n for (const elt of [...newContent]) {\n dummyParent.append(elt);\n }\n return dummyParent;\n }\n }\n\n /**\n * A fake duck-typed parent element to wrap a single node, without actually reparenting it.\n * This is useful because the node may have siblings that we don't want in the morph, and it may also be moved\n * or replaced with one or more elements during the morph. This class effectively allows us a window into\n * a slice of a node's children.\n * \"If it walks like a duck, and quacks like a duck, then it must be a duck!\" -- James Whitcomb Riley (1849–1916)\n */\n class SlicedParentNode {\n /** @param {Node} node */\n constructor(node) {\n this.originalNode = node;\n this.realParentNode = /** @type {Element} */ (node.parentNode);\n this.previousSibling = node.previousSibling;\n this.nextSibling = node.nextSibling;\n }\n\n /** @returns {Node[]} */\n get childNodes() {\n // return slice of realParent's current childNodes, based on previousSibling and nextSibling\n const nodes = [];\n let cursor = this.previousSibling\n ? this.previousSibling.nextSibling\n : this.realParentNode.firstChild;\n while (cursor && cursor != this.nextSibling) {\n nodes.push(cursor);\n cursor = cursor.nextSibling;\n }\n return nodes;\n }\n\n /**\n * @param {string} selector\n * @returns {Element[]}\n */\n querySelectorAll(selector) {\n return this.childNodes.reduce((results, node) => {\n if (node instanceof Element) {\n if (node.matches(selector)) results.push(node);\n const nodeList = node.querySelectorAll(selector);\n for (let i = 0; i < nodeList.length; i++) {\n results.push(nodeList[i]);\n }\n }\n return results;\n }, /** @type {Element[]} */ ([]));\n }\n\n /**\n * @param {Node} node\n * @param {Node} referenceNode\n * @returns {Node}\n */\n insertBefore(node, referenceNode) {\n return this.realParentNode.insertBefore(node, referenceNode);\n }\n\n /**\n * @param {Node} node\n * @param {Node} referenceNode\n * @returns {Node}\n */\n moveBefore(node, referenceNode) {\n // @ts-ignore - use new moveBefore feature\n return this.realParentNode.moveBefore(node, referenceNode);\n }\n\n /**\n * for later use with populateIdMapWithTree to halt upwards iteration\n * @returns {Node}\n */\n get __idiomorphRoot() {\n return this.originalNode;\n }\n }\n\n /**\n *\n * @param {string} newContent\n * @returns {Node | null | DocumentFragment}\n */\n function parseContent(newContent) {\n let parser = new DOMParser();\n\n // remove svgs to avoid false-positive matches on head, etc.\n let contentWithSvgsRemoved = newContent.replace(\n /]*>|>)([\\s\\S]*?)<\\/svg>/gim,\n \"\",\n );\n\n // if the newContent contains a html, head or body tag, we can simply parse it w/o wrapping\n if (\n contentWithSvgsRemoved.match(/<\\/html>/) ||\n contentWithSvgsRemoved.match(/<\\/head>/) ||\n contentWithSvgsRemoved.match(/<\\/body>/)\n ) {\n let content = parser.parseFromString(newContent, \"text/html\");\n // if it is a full HTML document, return the document itself as the parent container\n if (contentWithSvgsRemoved.match(/<\\/html>/)) {\n generatedByIdiomorph.add(content);\n return content;\n } else {\n // otherwise return the html element as the parent container\n let htmlElement = content.firstChild;\n if (htmlElement) {\n generatedByIdiomorph.add(htmlElement);\n }\n return htmlElement;\n }\n } else {\n // if it is partial HTML, wrap it in a template tag to provide a parent element and also to help\n // deal with touchy tags like tr, tbody, etc.\n let responseDoc = parser.parseFromString(\n \"\",\n \"text/html\",\n );\n let content = /** @type {HTMLTemplateElement} */ (\n responseDoc.body.querySelector(\"template\")\n ).content;\n generatedByIdiomorph.add(content);\n return content;\n }\n }\n\n return { normalizeElement, normalizeParent };\n })();\n\n //=============================================================================\n // This is what ends up becoming the Idiomorph global object\n //=============================================================================\n return {\n morph,\n defaults,\n };\n})();\n\n/**\n * Morph the state of the currentElement based on the attributes and contents of\n * the newElement. Morphing may dispatch turbo:before-morph-element,\n * turbo:before-morph-attribute, and turbo:morph-element events.\n *\n * @param currentElement Element destination of morphing changes\n * @param newElement Element source of morphing changes\n */\nfunction morphElements(currentElement, newElement, { callbacks, ...options } = {}) {\n Idiomorph.morph(currentElement, newElement, {\n ...options,\n callbacks: new DefaultIdiomorphCallbacks(callbacks)\n });\n}\n\n/**\n * Morph the child elements of the currentElement based on the child elements of\n * the newElement. Morphing children may dispatch turbo:before-morph-element,\n * turbo:before-morph-attribute, and turbo:morph-element events.\n *\n * @param currentElement Element destination of morphing children changes\n * @param newElement Element source of morphing children changes\n */\nfunction morphChildren(currentElement, newElement, options = {}) {\n morphElements(currentElement, newElement.childNodes, {\n ...options,\n morphStyle: \"innerHTML\"\n });\n}\n\nfunction shouldRefreshFrameWithMorphing(currentFrame, newFrame) {\n return currentFrame instanceof FrameElement &&\n currentFrame.shouldReloadWithMorph && (!newFrame || areFramesCompatibleForRefreshing(currentFrame, newFrame)) &&\n !currentFrame.closest(\"[data-turbo-permanent]\")\n}\n\nfunction areFramesCompatibleForRefreshing(currentFrame, newFrame) {\n // newFrame cannot yet be an instance of FrameElement because custom\n // elements don't get initialized until they're attached to the DOM, so\n // test its Element#nodeName instead\n return newFrame instanceof Element && newFrame.nodeName === \"TURBO-FRAME\" && currentFrame.id === newFrame.id &&\n (!newFrame.getAttribute(\"src\") || urlsAreEqual(currentFrame.src, newFrame.getAttribute(\"src\")))\n}\n\nfunction closestFrameReloadableWithMorphing(node) {\n return node.parentElement.closest(\"turbo-frame[src][refresh=morph]\")\n}\n\nclass DefaultIdiomorphCallbacks {\n #beforeNodeMorphed\n\n constructor({ beforeNodeMorphed } = {}) {\n this.#beforeNodeMorphed = beforeNodeMorphed || (() => true);\n }\n\n beforeNodeAdded = (node) => {\n return !(node.id && node.hasAttribute(\"data-turbo-permanent\") && document.getElementById(node.id))\n }\n\n beforeNodeMorphed = (currentElement, newElement) => {\n if (currentElement instanceof Element) {\n if (!currentElement.hasAttribute(\"data-turbo-permanent\") && this.#beforeNodeMorphed(currentElement, newElement)) {\n const event = dispatch(\"turbo:before-morph-element\", {\n cancelable: true,\n target: currentElement,\n detail: { currentElement, newElement }\n });\n\n return !event.defaultPrevented\n } else {\n return false\n }\n }\n }\n\n beforeAttributeUpdated = (attributeName, target, mutationType) => {\n const event = dispatch(\"turbo:before-morph-attribute\", {\n cancelable: true,\n target,\n detail: { attributeName, mutationType }\n });\n\n return !event.defaultPrevented\n }\n\n beforeNodeRemoved = (node) => {\n return this.beforeNodeMorphed(node)\n }\n\n afterNodeMorphed = (currentElement, newElement) => {\n if (currentElement instanceof Element) {\n dispatch(\"turbo:morph-element\", {\n target: currentElement,\n detail: { currentElement, newElement }\n });\n }\n }\n}\n\nclass MorphingFrameRenderer extends FrameRenderer {\n static renderElement(currentElement, newElement) {\n dispatch(\"turbo:before-frame-morph\", {\n target: currentElement,\n detail: { currentElement, newElement }\n });\n\n morphChildren(currentElement, newElement, {\n callbacks: {\n beforeNodeMorphed: (node, newNode) => {\n if (\n shouldRefreshFrameWithMorphing(node, newNode) &&\n closestFrameReloadableWithMorphing(node) === currentElement\n ) {\n node.reload();\n return false\n }\n return true\n }\n }\n });\n }\n\n async preservingPermanentElements(callback) {\n return await callback()\n }\n}\n\nclass ProgressBar {\n static animationDuration = 300 /*ms*/\n\n static get defaultCSS() {\n return unindent`\n .turbo-progress-bar {\n position: fixed;\n display: block;\n top: 0;\n left: 0;\n height: 3px;\n background: #0076ff;\n z-index: 2147483647;\n transition:\n width ${ProgressBar.animationDuration}ms ease-out,\n opacity ${ProgressBar.animationDuration / 2}ms ${ProgressBar.animationDuration / 2}ms ease-in;\n transform: translate3d(0, 0, 0);\n }\n `\n }\n\n hiding = false\n value = 0\n visible = false\n\n constructor() {\n this.stylesheetElement = this.createStylesheetElement();\n this.progressElement = this.createProgressElement();\n this.installStylesheetElement();\n this.setValue(0);\n }\n\n show() {\n if (!this.visible) {\n this.visible = true;\n this.installProgressElement();\n this.startTrickling();\n }\n }\n\n hide() {\n if (this.visible && !this.hiding) {\n this.hiding = true;\n this.fadeProgressElement(() => {\n this.uninstallProgressElement();\n this.stopTrickling();\n this.visible = false;\n this.hiding = false;\n });\n }\n }\n\n setValue(value) {\n this.value = value;\n this.refresh();\n }\n\n // Private\n\n installStylesheetElement() {\n document.head.insertBefore(this.stylesheetElement, document.head.firstChild);\n }\n\n installProgressElement() {\n this.progressElement.style.width = \"0\";\n this.progressElement.style.opacity = \"1\";\n document.documentElement.insertBefore(this.progressElement, document.body);\n this.refresh();\n }\n\n fadeProgressElement(callback) {\n this.progressElement.style.opacity = \"0\";\n setTimeout(callback, ProgressBar.animationDuration * 1.5);\n }\n\n uninstallProgressElement() {\n if (this.progressElement.parentNode) {\n document.documentElement.removeChild(this.progressElement);\n }\n }\n\n startTrickling() {\n if (!this.trickleInterval) {\n this.trickleInterval = window.setInterval(this.trickle, ProgressBar.animationDuration);\n }\n }\n\n stopTrickling() {\n window.clearInterval(this.trickleInterval);\n delete this.trickleInterval;\n }\n\n trickle = () => {\n this.setValue(this.value + Math.random() / 100);\n }\n\n refresh() {\n requestAnimationFrame(() => {\n this.progressElement.style.width = `${10 + this.value * 90}%`;\n });\n }\n\n createStylesheetElement() {\n const element = document.createElement(\"style\");\n element.type = \"text/css\";\n element.textContent = ProgressBar.defaultCSS;\n const cspNonce = getCspNonce();\n if (cspNonce) {\n element.nonce = cspNonce;\n }\n return element\n }\n\n createProgressElement() {\n const element = document.createElement(\"div\");\n element.className = \"turbo-progress-bar\";\n return element\n }\n}\n\nclass HeadSnapshot extends Snapshot {\n detailsByOuterHTML = this.children\n .filter((element) => !elementIsNoscript(element))\n .map((element) => elementWithoutNonce(element))\n .reduce((result, element) => {\n const { outerHTML } = element;\n const details =\n outerHTML in result\n ? result[outerHTML]\n : {\n type: elementType(element),\n tracked: elementIsTracked(element),\n elements: []\n };\n return {\n ...result,\n [outerHTML]: {\n ...details,\n elements: [...details.elements, element]\n }\n }\n }, {})\n\n get trackedElementSignature() {\n return Object.keys(this.detailsByOuterHTML)\n .filter((outerHTML) => this.detailsByOuterHTML[outerHTML].tracked)\n .join(\"\")\n }\n\n getScriptElementsNotInSnapshot(snapshot) {\n return this.getElementsMatchingTypeNotInSnapshot(\"script\", snapshot)\n }\n\n getStylesheetElementsNotInSnapshot(snapshot) {\n return this.getElementsMatchingTypeNotInSnapshot(\"stylesheet\", snapshot)\n }\n\n getElementsMatchingTypeNotInSnapshot(matchedType, snapshot) {\n return Object.keys(this.detailsByOuterHTML)\n .filter((outerHTML) => !(outerHTML in snapshot.detailsByOuterHTML))\n .map((outerHTML) => this.detailsByOuterHTML[outerHTML])\n .filter(({ type }) => type == matchedType)\n .map(({ elements: [element] }) => element)\n }\n\n get provisionalElements() {\n return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n const { type, tracked, elements } = this.detailsByOuterHTML[outerHTML];\n if (type == null && !tracked) {\n return [...result, ...elements]\n } else if (elements.length > 1) {\n return [...result, ...elements.slice(1)]\n } else {\n return result\n }\n }, [])\n }\n\n getMetaValue(name) {\n const element = this.findMetaElementByName(name);\n return element ? element.getAttribute(\"content\") : null\n }\n\n findMetaElementByName(name) {\n return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n const {\n elements: [element]\n } = this.detailsByOuterHTML[outerHTML];\n return elementIsMetaElementWithName(element, name) ? element : result\n }, undefined | undefined)\n }\n}\n\nfunction elementType(element) {\n if (elementIsScript(element)) {\n return \"script\"\n } else if (elementIsStylesheet(element)) {\n return \"stylesheet\"\n }\n}\n\nfunction elementIsTracked(element) {\n return element.getAttribute(\"data-turbo-track\") == \"reload\"\n}\n\nfunction elementIsScript(element) {\n const tagName = element.localName;\n return tagName == \"script\"\n}\n\nfunction elementIsNoscript(element) {\n const tagName = element.localName;\n return tagName == \"noscript\"\n}\n\nfunction elementIsStylesheet(element) {\n const tagName = element.localName;\n return tagName == \"style\" || (tagName == \"link\" && element.getAttribute(\"rel\") == \"stylesheet\")\n}\n\nfunction elementIsMetaElementWithName(element, name) {\n const tagName = element.localName;\n return tagName == \"meta\" && element.getAttribute(\"name\") == name\n}\n\nfunction elementWithoutNonce(element) {\n if (element.hasAttribute(\"nonce\")) {\n element.setAttribute(\"nonce\", \"\");\n }\n\n return element\n}\n\nclass PageSnapshot extends Snapshot {\n static fromHTMLString(html = \"\") {\n return this.fromDocument(parseHTMLDocument(html))\n }\n\n static fromElement(element) {\n return this.fromDocument(element.ownerDocument)\n }\n\n static fromDocument({ documentElement, body, head }) {\n return new this(documentElement, body, new HeadSnapshot(head))\n }\n\n constructor(documentElement, body, headSnapshot) {\n super(body);\n this.documentElement = documentElement;\n this.headSnapshot = headSnapshot;\n }\n\n clone() {\n const clonedElement = this.element.cloneNode(true);\n\n const selectElements = this.element.querySelectorAll(\"select\");\n const clonedSelectElements = clonedElement.querySelectorAll(\"select\");\n\n for (const [index, source] of selectElements.entries()) {\n const clone = clonedSelectElements[index];\n for (const option of clone.selectedOptions) option.selected = false;\n for (const option of source.selectedOptions) clone.options[option.index].selected = true;\n }\n\n for (const clonedPasswordInput of clonedElement.querySelectorAll('input[type=\"password\"]')) {\n clonedPasswordInput.value = \"\";\n }\n\n for (const clonedNoscriptElement of clonedElement.querySelectorAll(\"noscript\")) {\n clonedNoscriptElement.remove();\n }\n\n return new PageSnapshot(this.documentElement, clonedElement, this.headSnapshot)\n }\n\n get lang() {\n return this.documentElement.getAttribute(\"lang\")\n }\n\n get dir() {\n return this.documentElement.getAttribute(\"dir\")\n }\n\n get headElement() {\n return this.headSnapshot.element\n }\n\n get rootLocation() {\n const root = this.getSetting(\"root\") ?? \"/\";\n return expandURL(root)\n }\n\n get cacheControlValue() {\n return this.getSetting(\"cache-control\")\n }\n\n get isPreviewable() {\n return this.cacheControlValue != \"no-preview\"\n }\n\n get isCacheable() {\n return this.cacheControlValue != \"no-cache\"\n }\n\n get isVisitable() {\n return this.getSetting(\"visit-control\") != \"reload\"\n }\n\n get prefersViewTransitions() {\n const viewTransitionEnabled = this.getSetting(\"view-transition\") === \"true\" || this.headSnapshot.getMetaValue(\"view-transition\") === \"same-origin\";\n return viewTransitionEnabled && !window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches\n }\n\n get refreshMethod() {\n return this.getSetting(\"refresh-method\")\n }\n\n get refreshScroll() {\n return this.getSetting(\"refresh-scroll\")\n }\n\n // Private\n\n getSetting(name) {\n return this.headSnapshot.getMetaValue(`turbo-${name}`)\n }\n}\n\nclass ViewTransitioner {\n #viewTransitionStarted = false\n #lastOperation = Promise.resolve()\n\n renderChange(useViewTransition, render) {\n if (useViewTransition && this.viewTransitionsAvailable && !this.#viewTransitionStarted) {\n this.#viewTransitionStarted = true;\n this.#lastOperation = this.#lastOperation.then(async () => {\n await document.startViewTransition(render).finished;\n });\n } else {\n this.#lastOperation = this.#lastOperation.then(render);\n }\n\n return this.#lastOperation\n }\n\n get viewTransitionsAvailable() {\n return document.startViewTransition\n }\n}\n\nconst defaultOptions = {\n action: \"advance\",\n historyChanged: false,\n visitCachedSnapshot: () => {},\n willRender: true,\n updateHistory: true,\n shouldCacheSnapshot: true,\n acceptsStreamResponse: false,\n refresh: {}\n};\n\nconst TimingMetric = {\n visitStart: \"visitStart\",\n requestStart: \"requestStart\",\n requestEnd: \"requestEnd\",\n visitEnd: \"visitEnd\"\n};\n\nconst VisitState = {\n initialized: \"initialized\",\n started: \"started\",\n canceled: \"canceled\",\n failed: \"failed\",\n completed: \"completed\"\n};\n\nconst SystemStatusCode = {\n networkFailure: 0,\n timeoutFailure: -1,\n contentTypeMismatch: -2\n};\n\nconst Direction = {\n advance: \"forward\",\n restore: \"back\",\n replace: \"none\"\n};\n\nclass Visit {\n identifier = uuid() // Required by turbo-ios\n timingMetrics = {}\n\n followedRedirect = false\n historyChanged = false\n scrolled = false\n shouldCacheSnapshot = true\n acceptsStreamResponse = false\n snapshotCached = false\n state = VisitState.initialized\n viewTransitioner = new ViewTransitioner()\n\n constructor(delegate, location, restorationIdentifier, options = {}) {\n this.delegate = delegate;\n this.location = location;\n this.restorationIdentifier = restorationIdentifier || uuid();\n\n const {\n action,\n historyChanged,\n referrer,\n snapshot,\n snapshotHTML,\n response,\n visitCachedSnapshot,\n willRender,\n updateHistory,\n shouldCacheSnapshot,\n acceptsStreamResponse,\n direction,\n refresh\n } = {\n ...defaultOptions,\n ...options\n };\n this.action = action;\n this.historyChanged = historyChanged;\n this.referrer = referrer;\n this.snapshot = snapshot;\n this.snapshotHTML = snapshotHTML;\n this.response = response;\n this.isPageRefresh = this.view.isPageRefresh(this);\n this.visitCachedSnapshot = visitCachedSnapshot;\n this.willRender = willRender;\n this.updateHistory = updateHistory;\n this.scrolled = !willRender;\n this.shouldCacheSnapshot = shouldCacheSnapshot;\n this.acceptsStreamResponse = acceptsStreamResponse;\n this.direction = direction || Direction[action];\n this.refresh = refresh;\n }\n\n get adapter() {\n return this.delegate.adapter\n }\n\n get view() {\n return this.delegate.view\n }\n\n get history() {\n return this.delegate.history\n }\n\n get restorationData() {\n return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)\n }\n\n start() {\n if (this.state == VisitState.initialized) {\n this.recordTimingMetric(TimingMetric.visitStart);\n this.state = VisitState.started;\n this.adapter.visitStarted(this);\n this.delegate.visitStarted(this);\n }\n }\n\n cancel() {\n if (this.state == VisitState.started) {\n if (this.request) {\n this.request.cancel();\n }\n this.cancelRender();\n this.state = VisitState.canceled;\n }\n }\n\n complete() {\n if (this.state == VisitState.started) {\n this.recordTimingMetric(TimingMetric.visitEnd);\n this.adapter.visitCompleted(this);\n this.state = VisitState.completed;\n this.followRedirect();\n\n if (!this.followedRedirect) {\n this.delegate.visitCompleted(this);\n }\n }\n }\n\n fail() {\n if (this.state == VisitState.started) {\n this.state = VisitState.failed;\n this.adapter.visitFailed(this);\n this.delegate.visitCompleted(this);\n }\n }\n\n changeHistory() {\n if (!this.historyChanged && this.updateHistory) {\n const actionForHistory = this.location.href === this.referrer?.href ? \"replace\" : this.action;\n const method = getHistoryMethodForAction(actionForHistory);\n this.history.update(method, this.location, this.restorationIdentifier);\n this.historyChanged = true;\n }\n }\n\n issueRequest() {\n if (this.hasPreloadedResponse()) {\n this.simulateRequest();\n } else if (this.shouldIssueRequest() && !this.request) {\n this.request = new FetchRequest(this, FetchMethod.get, this.location);\n this.request.perform();\n }\n }\n\n simulateRequest() {\n if (this.response) {\n this.startRequest();\n this.recordResponse();\n this.finishRequest();\n }\n }\n\n startRequest() {\n this.recordTimingMetric(TimingMetric.requestStart);\n this.adapter.visitRequestStarted(this);\n }\n\n recordResponse(response = this.response) {\n this.response = response;\n if (response) {\n const { statusCode } = response;\n if (isSuccessful(statusCode)) {\n this.adapter.visitRequestCompleted(this);\n } else {\n this.adapter.visitRequestFailedWithStatusCode(this, statusCode);\n }\n }\n }\n\n finishRequest() {\n this.recordTimingMetric(TimingMetric.requestEnd);\n this.adapter.visitRequestFinished(this);\n }\n\n loadResponse() {\n if (this.response) {\n const { statusCode, responseHTML } = this.response;\n this.render(async () => {\n if (this.shouldCacheSnapshot) this.cacheSnapshot();\n if (this.view.renderPromise) await this.view.renderPromise;\n\n if (isSuccessful(statusCode) && responseHTML != null) {\n const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n await this.renderPageSnapshot(snapshot, false);\n\n this.adapter.visitRendered(this);\n this.complete();\n } else {\n await this.view.renderError(PageSnapshot.fromHTMLString(responseHTML), this);\n this.adapter.visitRendered(this);\n this.fail();\n }\n });\n }\n }\n\n getCachedSnapshot() {\n const snapshot = this.view.getCachedSnapshotForLocation(this.location) || this.getPreloadedSnapshot();\n\n if (snapshot && (!getAnchor(this.location) || snapshot.hasAnchor(getAnchor(this.location)))) {\n if (this.action == \"restore\" || snapshot.isPreviewable) {\n return snapshot\n }\n }\n }\n\n getPreloadedSnapshot() {\n if (this.snapshotHTML) {\n return PageSnapshot.fromHTMLString(this.snapshotHTML)\n }\n }\n\n hasCachedSnapshot() {\n return this.getCachedSnapshot() != null\n }\n\n loadCachedSnapshot() {\n const snapshot = this.getCachedSnapshot();\n if (snapshot) {\n const isPreview = this.shouldIssueRequest();\n this.render(async () => {\n this.cacheSnapshot();\n if (this.isPageRefresh) {\n this.adapter.visitRendered(this);\n } else {\n if (this.view.renderPromise) await this.view.renderPromise;\n\n await this.renderPageSnapshot(snapshot, isPreview);\n\n this.adapter.visitRendered(this);\n if (!isPreview) {\n this.complete();\n }\n }\n });\n }\n }\n\n followRedirect() {\n if (this.redirectedToLocation && !this.followedRedirect && this.response?.redirected) {\n this.adapter.visitProposedToLocation(this.redirectedToLocation, {\n action: \"replace\",\n response: this.response,\n shouldCacheSnapshot: false,\n willRender: false\n });\n this.followedRedirect = true;\n }\n }\n\n // Fetch request delegate\n\n prepareRequest(request) {\n if (this.acceptsStreamResponse) {\n request.acceptResponseType(StreamMessage.contentType);\n }\n }\n\n requestStarted() {\n this.startRequest();\n }\n\n requestPreventedHandlingResponse(_request, _response) {}\n\n async requestSucceededWithResponse(request, response) {\n const responseHTML = await response.responseHTML;\n const { redirected, statusCode } = response;\n if (responseHTML == undefined) {\n this.recordResponse({\n statusCode: SystemStatusCode.contentTypeMismatch,\n redirected\n });\n } else {\n this.redirectedToLocation = response.redirected ? response.location : undefined;\n this.recordResponse({ statusCode: statusCode, responseHTML, redirected });\n }\n }\n\n async requestFailedWithResponse(request, response) {\n const responseHTML = await response.responseHTML;\n const { redirected, statusCode } = response;\n if (responseHTML == undefined) {\n this.recordResponse({\n statusCode: SystemStatusCode.contentTypeMismatch,\n redirected\n });\n } else {\n this.recordResponse({ statusCode: statusCode, responseHTML, redirected });\n }\n }\n\n requestErrored(_request, _error) {\n this.recordResponse({\n statusCode: SystemStatusCode.networkFailure,\n redirected: false\n });\n }\n\n requestFinished() {\n this.finishRequest();\n }\n\n // Scrolling\n\n performScroll() {\n if (!this.scrolled && !this.view.forceReloaded && !this.view.shouldPreserveScrollPosition(this)) {\n if (this.action == \"restore\") {\n this.scrollToRestoredPosition() || this.scrollToAnchor() || this.view.scrollToTop();\n } else {\n this.scrollToAnchor() || this.view.scrollToTop();\n }\n\n this.scrolled = true;\n }\n }\n\n scrollToRestoredPosition() {\n const { scrollPosition } = this.restorationData;\n if (scrollPosition) {\n this.view.scrollToPosition(scrollPosition);\n return true\n }\n }\n\n scrollToAnchor() {\n const anchor = getAnchor(this.location);\n if (anchor != null) {\n this.view.scrollToAnchor(anchor);\n return true\n }\n }\n\n // Instrumentation\n\n recordTimingMetric(metric) {\n this.timingMetrics[metric] = new Date().getTime();\n }\n\n getTimingMetrics() {\n return { ...this.timingMetrics }\n }\n\n // Private\n\n hasPreloadedResponse() {\n return typeof this.response == \"object\"\n }\n\n shouldIssueRequest() {\n if (this.action == \"restore\") {\n return !this.hasCachedSnapshot()\n } else {\n return this.willRender\n }\n }\n\n cacheSnapshot() {\n if (!this.snapshotCached) {\n this.view.cacheSnapshot(this.snapshot).then((snapshot) => snapshot && this.visitCachedSnapshot(snapshot));\n this.snapshotCached = true;\n }\n }\n\n async render(callback) {\n this.cancelRender();\n await new Promise((resolve) => {\n this.frame =\n document.visibilityState === \"hidden\" ? setTimeout(() => resolve(), 0) : requestAnimationFrame(() => resolve());\n });\n await callback();\n delete this.frame;\n }\n\n async renderPageSnapshot(snapshot, isPreview) {\n await this.viewTransitioner.renderChange(this.view.shouldTransitionTo(snapshot), async () => {\n await this.view.renderPage(snapshot, isPreview, this.willRender, this);\n this.performScroll();\n });\n }\n\n cancelRender() {\n if (this.frame) {\n cancelAnimationFrame(this.frame);\n delete this.frame;\n }\n }\n}\n\nfunction isSuccessful(statusCode) {\n return statusCode >= 200 && statusCode < 300\n}\n\nclass BrowserAdapter {\n progressBar = new ProgressBar()\n\n constructor(session) {\n this.session = session;\n }\n\n visitProposedToLocation(location, options) {\n if (locationIsVisitable(location, this.navigator.rootLocation)) {\n this.navigator.startVisit(location, options?.restorationIdentifier || uuid(), options);\n } else {\n window.location.href = location.toString();\n }\n }\n\n visitStarted(visit) {\n this.location = visit.location;\n this.redirectedToLocation = null;\n\n visit.loadCachedSnapshot();\n visit.issueRequest();\n }\n\n visitRequestStarted(visit) {\n this.progressBar.setValue(0);\n if (visit.hasCachedSnapshot() || visit.action != \"restore\") {\n this.showVisitProgressBarAfterDelay();\n } else {\n this.showProgressBar();\n }\n }\n\n visitRequestCompleted(visit) {\n visit.loadResponse();\n\n if (visit.response.redirected) {\n this.redirectedToLocation = visit.redirectedToLocation;\n }\n }\n\n visitRequestFailedWithStatusCode(visit, statusCode) {\n switch (statusCode) {\n case SystemStatusCode.networkFailure:\n case SystemStatusCode.timeoutFailure:\n case SystemStatusCode.contentTypeMismatch:\n return this.reload({\n reason: \"request_failed\",\n context: {\n statusCode\n }\n })\n default:\n return visit.loadResponse()\n }\n }\n\n visitRequestFinished(_visit) {}\n\n visitCompleted(_visit) {\n this.progressBar.setValue(1);\n this.hideVisitProgressBar();\n }\n\n pageInvalidated(reason) {\n this.reload(reason);\n }\n\n visitFailed(_visit) {\n this.progressBar.setValue(1);\n this.hideVisitProgressBar();\n }\n\n visitRendered(_visit) {}\n\n // Link prefetching\n\n linkPrefetchingIsEnabledForLocation(location) {\n return true\n }\n\n // Form Submission Delegate\n\n formSubmissionStarted(_formSubmission) {\n this.progressBar.setValue(0);\n this.showFormProgressBarAfterDelay();\n }\n\n formSubmissionFinished(_formSubmission) {\n this.progressBar.setValue(1);\n this.hideFormProgressBar();\n }\n\n // Private\n\n showVisitProgressBarAfterDelay() {\n this.visitProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n }\n\n hideVisitProgressBar() {\n this.progressBar.hide();\n if (this.visitProgressBarTimeout != null) {\n window.clearTimeout(this.visitProgressBarTimeout);\n delete this.visitProgressBarTimeout;\n }\n }\n\n showFormProgressBarAfterDelay() {\n if (this.formProgressBarTimeout == null) {\n this.formProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n }\n }\n\n hideFormProgressBar() {\n this.progressBar.hide();\n if (this.formProgressBarTimeout != null) {\n window.clearTimeout(this.formProgressBarTimeout);\n delete this.formProgressBarTimeout;\n }\n }\n\n showProgressBar = () => {\n this.progressBar.show();\n }\n\n reload(reason) {\n dispatch(\"turbo:reload\", { detail: reason });\n\n window.location.href = (this.redirectedToLocation || this.location)?.toString() || window.location.href;\n }\n\n get navigator() {\n return this.session.navigator\n }\n}\n\nclass CacheObserver {\n selector = \"[data-turbo-temporary]\"\n\n started = false\n\n start() {\n if (!this.started) {\n this.started = true;\n addEventListener(\"turbo:before-cache\", this.removeTemporaryElements, false);\n }\n }\n\n stop() {\n if (this.started) {\n this.started = false;\n removeEventListener(\"turbo:before-cache\", this.removeTemporaryElements, false);\n }\n }\n\n removeTemporaryElements = (_event) => {\n for (const element of this.temporaryElements) {\n element.remove();\n }\n }\n\n get temporaryElements() {\n return [...document.querySelectorAll(this.selector)]\n }\n}\n\nclass FrameRedirector {\n constructor(session, element) {\n this.session = session;\n this.element = element;\n this.linkInterceptor = new LinkInterceptor(this, element);\n this.formSubmitObserver = new FormSubmitObserver(this, element);\n }\n\n start() {\n this.linkInterceptor.start();\n this.formSubmitObserver.start();\n }\n\n stop() {\n this.linkInterceptor.stop();\n this.formSubmitObserver.stop();\n }\n\n // Link interceptor delegate\n\n shouldInterceptLinkClick(element, _location, _event) {\n return this.#shouldRedirect(element)\n }\n\n linkClickIntercepted(element, url, event) {\n const frame = this.#findFrameElement(element);\n if (frame) {\n frame.delegate.linkClickIntercepted(element, url, event);\n }\n }\n\n // Form submit observer delegate\n\n willSubmitForm(element, submitter) {\n return (\n element.closest(\"turbo-frame\") == null &&\n this.#shouldSubmit(element, submitter) &&\n this.#shouldRedirect(element, submitter)\n )\n }\n\n formSubmitted(element, submitter) {\n const frame = this.#findFrameElement(element, submitter);\n if (frame) {\n frame.delegate.formSubmitted(element, submitter);\n }\n }\n\n #shouldSubmit(form, submitter) {\n const action = getAction$1(form, submitter);\n const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n const rootLocation = expandURL(meta?.content ?? \"/\");\n\n return this.#shouldRedirect(form, submitter) && locationIsVisitable(action, rootLocation)\n }\n\n #shouldRedirect(element, submitter) {\n const isNavigatable =\n element instanceof HTMLFormElement\n ? this.session.submissionIsNavigatable(element, submitter)\n : this.session.elementIsNavigatable(element);\n\n if (isNavigatable) {\n const frame = this.#findFrameElement(element, submitter);\n return frame ? frame != element.closest(\"turbo-frame\") : false\n } else {\n return false\n }\n }\n\n #findFrameElement(element, submitter) {\n const id = submitter?.getAttribute(\"data-turbo-frame\") || element.getAttribute(\"data-turbo-frame\");\n if (id && id != \"_top\") {\n const frame = this.element.querySelector(`#${id}:not([disabled])`);\n if (frame instanceof FrameElement) {\n return frame\n }\n }\n }\n}\n\nclass History {\n location\n restorationIdentifier = uuid()\n restorationData = {}\n started = false\n currentIndex = 0\n\n constructor(delegate) {\n this.delegate = delegate;\n }\n\n start() {\n if (!this.started) {\n addEventListener(\"popstate\", this.onPopState, false);\n this.currentIndex = history.state?.turbo?.restorationIndex || 0;\n this.started = true;\n this.replace(new URL(window.location.href));\n }\n }\n\n stop() {\n if (this.started) {\n removeEventListener(\"popstate\", this.onPopState, false);\n this.started = false;\n }\n }\n\n push(location, restorationIdentifier) {\n this.update(history.pushState, location, restorationIdentifier);\n }\n\n replace(location, restorationIdentifier) {\n this.update(history.replaceState, location, restorationIdentifier);\n }\n\n update(method, location, restorationIdentifier = uuid()) {\n if (method === history.pushState) ++this.currentIndex;\n\n const state = { turbo: { restorationIdentifier, restorationIndex: this.currentIndex } };\n method.call(history, state, \"\", location.href);\n this.location = location;\n this.restorationIdentifier = restorationIdentifier;\n }\n\n // Restoration data\n\n getRestorationDataForIdentifier(restorationIdentifier) {\n return this.restorationData[restorationIdentifier] || {}\n }\n\n updateRestorationData(additionalData) {\n const { restorationIdentifier } = this;\n const restorationData = this.restorationData[restorationIdentifier];\n this.restorationData[restorationIdentifier] = {\n ...restorationData,\n ...additionalData\n };\n }\n\n // Scroll restoration\n\n assumeControlOfScrollRestoration() {\n if (!this.previousScrollRestoration) {\n this.previousScrollRestoration = history.scrollRestoration ?? \"auto\";\n history.scrollRestoration = \"manual\";\n }\n }\n\n relinquishControlOfScrollRestoration() {\n if (this.previousScrollRestoration) {\n history.scrollRestoration = this.previousScrollRestoration;\n delete this.previousScrollRestoration;\n }\n }\n\n // Event handlers\n\n onPopState = (event) => {\n const { turbo } = event.state || {};\n this.location = new URL(window.location.href);\n\n if (turbo) {\n const { restorationIdentifier, restorationIndex } = turbo;\n this.restorationIdentifier = restorationIdentifier;\n const direction = restorationIndex > this.currentIndex ? \"forward\" : \"back\";\n this.delegate.historyPoppedToLocationWithRestorationIdentifierAndDirection(this.location, restorationIdentifier, direction);\n this.currentIndex = restorationIndex;\n } else {\n this.currentIndex++;\n this.delegate.historyPoppedWithEmptyState(this.location);\n }\n }\n}\n\nclass LinkPrefetchObserver {\n started = false\n #prefetchedLink = null\n\n constructor(delegate, eventTarget) {\n this.delegate = delegate;\n this.eventTarget = eventTarget;\n }\n\n start() {\n if (this.started) return\n\n if (this.eventTarget.readyState === \"loading\") {\n this.eventTarget.addEventListener(\"DOMContentLoaded\", this.#enable, { once: true });\n } else {\n this.#enable();\n }\n }\n\n stop() {\n if (!this.started) return\n\n this.eventTarget.removeEventListener(\"mouseenter\", this.#tryToPrefetchRequest, {\n capture: true,\n passive: true\n });\n this.eventTarget.removeEventListener(\"mouseleave\", this.#cancelRequestIfObsolete, {\n capture: true,\n passive: true\n });\n\n this.eventTarget.removeEventListener(\"turbo:before-fetch-request\", this.#tryToUsePrefetchedRequest, true);\n this.started = false;\n }\n\n #enable = () => {\n this.eventTarget.addEventListener(\"mouseenter\", this.#tryToPrefetchRequest, {\n capture: true,\n passive: true\n });\n this.eventTarget.addEventListener(\"mouseleave\", this.#cancelRequestIfObsolete, {\n capture: true,\n passive: true\n });\n\n this.eventTarget.addEventListener(\"turbo:before-fetch-request\", this.#tryToUsePrefetchedRequest, true);\n this.started = true;\n }\n\n #tryToPrefetchRequest = (event) => {\n if (getMetaContent(\"turbo-prefetch\") === \"false\") return\n\n const target = event.target;\n const isLink = target.matches && target.matches(\"a[href]:not([target^=_]):not([download])\");\n\n if (isLink && this.#isPrefetchable(target)) {\n const link = target;\n const location = getLocationForLink(link);\n\n if (this.delegate.canPrefetchRequestToLocation(link, location)) {\n this.#prefetchedLink = link;\n\n const fetchRequest = new FetchRequest(\n this,\n FetchMethod.get,\n location,\n new URLSearchParams(),\n target\n );\n\n fetchRequest.fetchOptions.priority = \"low\";\n\n prefetchCache.putLater(location, fetchRequest, this.#cacheTtl);\n }\n }\n }\n\n #cancelRequestIfObsolete = (event) => {\n if (event.target === this.#prefetchedLink) this.#cancelPrefetchRequest();\n }\n\n #cancelPrefetchRequest = () => {\n prefetchCache.clear();\n this.#prefetchedLink = null;\n }\n\n #tryToUsePrefetchedRequest = (event) => {\n if (event.target.tagName !== \"FORM\" && event.detail.fetchOptions.method === \"GET\") {\n const cached = prefetchCache.get(event.detail.url);\n\n if (cached) {\n // User clicked link, use cache response\n event.detail.fetchRequest = cached;\n }\n\n prefetchCache.clear();\n }\n }\n\n prepareRequest(request) {\n const link = request.target;\n\n request.headers[\"X-Sec-Purpose\"] = \"prefetch\";\n\n const turboFrame = link.closest(\"turbo-frame\");\n const turboFrameTarget = link.getAttribute(\"data-turbo-frame\") || turboFrame?.getAttribute(\"target\") || turboFrame?.id;\n\n if (turboFrameTarget && turboFrameTarget !== \"_top\") {\n request.headers[\"Turbo-Frame\"] = turboFrameTarget;\n }\n }\n\n // Fetch request interface\n\n requestSucceededWithResponse() {}\n\n requestStarted(fetchRequest) {}\n\n requestErrored(fetchRequest) {}\n\n requestFinished(fetchRequest) {}\n\n requestPreventedHandlingResponse(fetchRequest, fetchResponse) {}\n\n requestFailedWithResponse(fetchRequest, fetchResponse) {}\n\n get #cacheTtl() {\n return Number(getMetaContent(\"turbo-prefetch-cache-time\")) || cacheTtl\n }\n\n #isPrefetchable(link) {\n const href = link.getAttribute(\"href\");\n\n if (!href) return false\n\n if (unfetchableLink(link)) return false\n if (linkToTheSamePage(link)) return false\n if (linkOptsOut(link)) return false\n if (nonSafeLink(link)) return false\n if (eventPrevented(link)) return false\n\n return true\n }\n}\n\nconst unfetchableLink = (link) => {\n return link.origin !== document.location.origin || ![\"http:\", \"https:\"].includes(link.protocol) || link.hasAttribute(\"target\")\n};\n\nconst linkToTheSamePage = (link) => {\n return (link.pathname + link.search === document.location.pathname + document.location.search) || link.href.startsWith(\"#\")\n};\n\nconst linkOptsOut = (link) => {\n if (link.getAttribute(\"data-turbo-prefetch\") === \"false\") return true\n if (link.getAttribute(\"data-turbo\") === \"false\") return true\n\n const turboPrefetchParent = findClosestRecursively(link, \"[data-turbo-prefetch]\");\n if (turboPrefetchParent && turboPrefetchParent.getAttribute(\"data-turbo-prefetch\") === \"false\") return true\n\n return false\n};\n\nconst nonSafeLink = (link) => {\n const turboMethod = link.getAttribute(\"data-turbo-method\");\n if (turboMethod && turboMethod.toLowerCase() !== \"get\") return true\n\n if (isUJS(link)) return true\n if (link.hasAttribute(\"data-turbo-confirm\")) return true\n if (link.hasAttribute(\"data-turbo-stream\")) return true\n\n return false\n};\n\nconst isUJS = (link) => {\n return link.hasAttribute(\"data-remote\") || link.hasAttribute(\"data-behavior\") || link.hasAttribute(\"data-confirm\") || link.hasAttribute(\"data-method\")\n};\n\nconst eventPrevented = (link) => {\n const event = dispatch(\"turbo:before-prefetch\", { target: link, cancelable: true });\n return event.defaultPrevented\n};\n\nclass Navigator {\n constructor(delegate) {\n this.delegate = delegate;\n }\n\n proposeVisit(location, options = {}) {\n if (this.delegate.allowsVisitingLocationWithAction(location, options.action)) {\n this.delegate.visitProposedToLocation(location, options);\n }\n }\n\n startVisit(locatable, restorationIdentifier, options = {}) {\n this.stop();\n this.currentVisit = new Visit(this, expandURL(locatable), restorationIdentifier, {\n referrer: this.location,\n ...options\n });\n this.currentVisit.start();\n }\n\n submitForm(form, submitter) {\n this.stop();\n this.formSubmission = new FormSubmission(this, form, submitter, true);\n\n this.formSubmission.start();\n }\n\n stop() {\n if (this.formSubmission) {\n this.formSubmission.stop();\n delete this.formSubmission;\n }\n\n if (this.currentVisit) {\n this.currentVisit.cancel();\n delete this.currentVisit;\n }\n }\n\n get adapter() {\n return this.delegate.adapter\n }\n\n get view() {\n return this.delegate.view\n }\n\n get rootLocation() {\n return this.view.snapshot.rootLocation\n }\n\n get history() {\n return this.delegate.history\n }\n\n // Form submission delegate\n\n formSubmissionStarted(formSubmission) {\n // Not all adapters implement formSubmissionStarted\n if (typeof this.adapter.formSubmissionStarted === \"function\") {\n this.adapter.formSubmissionStarted(formSubmission);\n }\n }\n\n async formSubmissionSucceededWithResponse(formSubmission, fetchResponse) {\n if (formSubmission == this.formSubmission) {\n const responseHTML = await fetchResponse.responseHTML;\n if (responseHTML) {\n const shouldCacheSnapshot = formSubmission.isSafe;\n if (!shouldCacheSnapshot) {\n this.view.clearSnapshotCache();\n }\n\n const { statusCode, redirected } = fetchResponse;\n const action = this.#getActionForFormSubmission(formSubmission, fetchResponse);\n const visitOptions = {\n action,\n shouldCacheSnapshot,\n response: { statusCode, responseHTML, redirected }\n };\n this.proposeVisit(fetchResponse.location, visitOptions);\n }\n }\n }\n\n async formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n const responseHTML = await fetchResponse.responseHTML;\n\n if (responseHTML) {\n const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n if (fetchResponse.serverError) {\n await this.view.renderError(snapshot, this.currentVisit);\n } else {\n await this.view.renderPage(snapshot, false, true, this.currentVisit);\n }\n if (snapshot.refreshScroll !== \"preserve\") {\n this.view.scrollToTop();\n }\n this.view.clearSnapshotCache();\n }\n }\n\n formSubmissionErrored(formSubmission, error) {\n console.error(error);\n }\n\n formSubmissionFinished(formSubmission) {\n // Not all adapters implement formSubmissionFinished\n if (typeof this.adapter.formSubmissionFinished === \"function\") {\n this.adapter.formSubmissionFinished(formSubmission);\n }\n }\n\n // Link prefetching\n\n linkPrefetchingIsEnabledForLocation(location) {\n // Not all adapters implement linkPrefetchingIsEnabledForLocation\n if (typeof this.adapter.linkPrefetchingIsEnabledForLocation === \"function\") {\n return this.adapter.linkPrefetchingIsEnabledForLocation(location)\n }\n\n return true\n }\n\n // Visit delegate\n\n visitStarted(visit) {\n this.delegate.visitStarted(visit);\n }\n\n visitCompleted(visit) {\n this.delegate.visitCompleted(visit);\n delete this.currentVisit;\n }\n\n // Same-page links are no longer handled with a Visit.\n // This method is still needed for Turbo Native adapters.\n locationWithActionIsSamePage(location, action) {\n return false\n }\n\n // Visits\n\n get location() {\n return this.history.location\n }\n\n get restorationIdentifier() {\n return this.history.restorationIdentifier\n }\n\n #getActionForFormSubmission(formSubmission, fetchResponse) {\n const { submitter, formElement } = formSubmission;\n return getVisitAction(submitter, formElement) || this.#getDefaultAction(fetchResponse)\n }\n\n #getDefaultAction(fetchResponse) {\n const sameLocationRedirect = fetchResponse.redirected && fetchResponse.location.href === this.location?.href;\n return sameLocationRedirect ? \"replace\" : \"advance\"\n }\n}\n\nconst PageStage = {\n initial: 0,\n loading: 1,\n interactive: 2,\n complete: 3\n};\n\nclass PageObserver {\n stage = PageStage.initial\n started = false\n\n constructor(delegate) {\n this.delegate = delegate;\n }\n\n start() {\n if (!this.started) {\n if (this.stage == PageStage.initial) {\n this.stage = PageStage.loading;\n }\n document.addEventListener(\"readystatechange\", this.interpretReadyState, false);\n addEventListener(\"pagehide\", this.pageWillUnload, false);\n this.started = true;\n }\n }\n\n stop() {\n if (this.started) {\n document.removeEventListener(\"readystatechange\", this.interpretReadyState, false);\n removeEventListener(\"pagehide\", this.pageWillUnload, false);\n this.started = false;\n }\n }\n\n interpretReadyState = () => {\n const { readyState } = this;\n if (readyState == \"interactive\") {\n this.pageIsInteractive();\n } else if (readyState == \"complete\") {\n this.pageIsComplete();\n }\n }\n\n pageIsInteractive() {\n if (this.stage == PageStage.loading) {\n this.stage = PageStage.interactive;\n this.delegate.pageBecameInteractive();\n }\n }\n\n pageIsComplete() {\n this.pageIsInteractive();\n if (this.stage == PageStage.interactive) {\n this.stage = PageStage.complete;\n this.delegate.pageLoaded();\n }\n }\n\n pageWillUnload = () => {\n this.delegate.pageWillUnload();\n }\n\n get readyState() {\n return document.readyState\n }\n}\n\nclass ScrollObserver {\n started = false\n\n constructor(delegate) {\n this.delegate = delegate;\n }\n\n start() {\n if (!this.started) {\n addEventListener(\"scroll\", this.onScroll, false);\n this.onScroll();\n this.started = true;\n }\n }\n\n stop() {\n if (this.started) {\n removeEventListener(\"scroll\", this.onScroll, false);\n this.started = false;\n }\n }\n\n onScroll = () => {\n this.updatePosition({ x: window.pageXOffset, y: window.pageYOffset });\n }\n\n // Private\n\n updatePosition(position) {\n this.delegate.scrollPositionChanged(position);\n }\n}\n\nclass StreamMessageRenderer {\n render({ fragment }) {\n Bardo.preservingPermanentElements(this, getPermanentElementMapForFragment(fragment), () => {\n withAutofocusFromFragment(fragment, () => {\n withPreservedFocus(() => {\n document.documentElement.appendChild(fragment);\n });\n });\n });\n }\n\n // Bardo delegate\n\n enteringBardo(currentPermanentElement, newPermanentElement) {\n newPermanentElement.replaceWith(currentPermanentElement.cloneNode(true));\n }\n\n leavingBardo() {}\n}\n\nfunction getPermanentElementMapForFragment(fragment) {\n const permanentElementsInDocument = queryPermanentElementsAll(document.documentElement);\n const permanentElementMap = {};\n for (const permanentElementInDocument of permanentElementsInDocument) {\n const { id } = permanentElementInDocument;\n\n for (const streamElement of fragment.querySelectorAll(\"turbo-stream\")) {\n const elementInStream = getPermanentElementById(streamElement.templateElement.content, id);\n\n if (elementInStream) {\n permanentElementMap[id] = [permanentElementInDocument, elementInStream];\n }\n }\n }\n\n return permanentElementMap\n}\n\nasync function withAutofocusFromFragment(fragment, callback) {\n const generatedID = `turbo-stream-autofocus-${uuid()}`;\n const turboStreams = fragment.querySelectorAll(\"turbo-stream\");\n const elementWithAutofocus = firstAutofocusableElementInStreams(turboStreams);\n let willAutofocusId = null;\n\n if (elementWithAutofocus) {\n if (elementWithAutofocus.id) {\n willAutofocusId = elementWithAutofocus.id;\n } else {\n willAutofocusId = generatedID;\n }\n\n elementWithAutofocus.id = willAutofocusId;\n }\n\n callback();\n await nextRepaint();\n\n const hasNoActiveElement = document.activeElement == null || document.activeElement == document.body;\n\n if (hasNoActiveElement && willAutofocusId) {\n const elementToAutofocus = document.getElementById(willAutofocusId);\n\n if (elementIsFocusable(elementToAutofocus)) {\n elementToAutofocus.focus();\n }\n if (elementToAutofocus && elementToAutofocus.id == generatedID) {\n elementToAutofocus.removeAttribute(\"id\");\n }\n }\n}\n\nasync function withPreservedFocus(callback) {\n const [activeElementBeforeRender, activeElementAfterRender] = await around(callback, () => document.activeElement);\n\n const restoreFocusTo = activeElementBeforeRender && activeElementBeforeRender.id;\n\n if (restoreFocusTo) {\n const elementToFocus = document.getElementById(restoreFocusTo);\n\n if (elementIsFocusable(elementToFocus) && elementToFocus != activeElementAfterRender) {\n elementToFocus.focus();\n }\n }\n}\n\nfunction firstAutofocusableElementInStreams(nodeListOfStreamElements) {\n for (const streamElement of nodeListOfStreamElements) {\n const elementWithAutofocus = queryAutofocusableElement(streamElement.templateElement.content);\n\n if (elementWithAutofocus) return elementWithAutofocus\n }\n\n return null\n}\n\nclass StreamObserver {\n sources = new Set()\n #started = false\n\n constructor(delegate) {\n this.delegate = delegate;\n }\n\n start() {\n if (!this.#started) {\n this.#started = true;\n addEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n }\n }\n\n stop() {\n if (this.#started) {\n this.#started = false;\n removeEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n }\n }\n\n connectStreamSource(source) {\n if (!this.streamSourceIsConnected(source)) {\n this.sources.add(source);\n source.addEventListener(\"message\", this.receiveMessageEvent, false);\n }\n }\n\n disconnectStreamSource(source) {\n if (this.streamSourceIsConnected(source)) {\n this.sources.delete(source);\n source.removeEventListener(\"message\", this.receiveMessageEvent, false);\n }\n }\n\n streamSourceIsConnected(source) {\n return this.sources.has(source)\n }\n\n inspectFetchResponse = (event) => {\n const response = fetchResponseFromEvent(event);\n if (response && fetchResponseIsStream(response)) {\n event.preventDefault();\n this.receiveMessageResponse(response);\n }\n }\n\n receiveMessageEvent = (event) => {\n if (this.#started && typeof event.data == \"string\") {\n this.receiveMessageHTML(event.data);\n }\n }\n\n async receiveMessageResponse(response) {\n const html = await response.responseHTML;\n if (html) {\n this.receiveMessageHTML(html);\n }\n }\n\n receiveMessageHTML(html) {\n this.delegate.receivedMessageFromStream(StreamMessage.wrap(html));\n }\n}\n\nfunction fetchResponseFromEvent(event) {\n const fetchResponse = event.detail?.fetchResponse;\n if (fetchResponse instanceof FetchResponse) {\n return fetchResponse\n }\n}\n\nfunction fetchResponseIsStream(response) {\n const contentType = response.contentType ?? \"\";\n return contentType.startsWith(StreamMessage.contentType)\n}\n\nclass ErrorRenderer extends Renderer {\n static renderElement(currentElement, newElement) {\n const { documentElement, body } = document;\n\n documentElement.replaceChild(newElement, body);\n }\n\n async render() {\n this.replaceHeadAndBody();\n this.activateScriptElements();\n }\n\n replaceHeadAndBody() {\n const { documentElement, head } = document;\n documentElement.replaceChild(this.newHead, head);\n this.renderElement(this.currentElement, this.newElement);\n }\n\n activateScriptElements() {\n for (const replaceableElement of this.scriptElements) {\n const parentNode = replaceableElement.parentNode;\n if (parentNode) {\n const element = activateScriptElement(replaceableElement);\n parentNode.replaceChild(element, replaceableElement);\n }\n }\n }\n\n get newHead() {\n return this.newSnapshot.headSnapshot.element\n }\n\n get scriptElements() {\n return document.documentElement.querySelectorAll(\"script\")\n }\n}\n\nclass PageRenderer extends Renderer {\n static renderElement(currentElement, newElement) {\n if (document.body && newElement instanceof HTMLBodyElement) {\n document.body.replaceWith(newElement);\n } else {\n document.documentElement.appendChild(newElement);\n }\n }\n\n get shouldRender() {\n return this.newSnapshot.isVisitable && this.trackedElementsAreIdentical\n }\n\n get reloadReason() {\n if (!this.newSnapshot.isVisitable) {\n return {\n reason: \"turbo_visit_control_is_reload\"\n }\n }\n\n if (!this.trackedElementsAreIdentical) {\n return {\n reason: \"tracked_element_mismatch\"\n }\n }\n }\n\n async prepareToRender() {\n this.#setLanguage();\n await this.mergeHead();\n }\n\n async render() {\n if (this.willRender) {\n await this.replaceBody();\n }\n }\n\n finishRendering() {\n super.finishRendering();\n if (!this.isPreview) {\n this.focusFirstAutofocusableElement();\n }\n }\n\n get currentHeadSnapshot() {\n return this.currentSnapshot.headSnapshot\n }\n\n get newHeadSnapshot() {\n return this.newSnapshot.headSnapshot\n }\n\n get newElement() {\n return this.newSnapshot.element\n }\n\n #setLanguage() {\n const { documentElement } = this.currentSnapshot;\n const { dir, lang } = this.newSnapshot;\n\n if (lang) {\n documentElement.setAttribute(\"lang\", lang);\n } else {\n documentElement.removeAttribute(\"lang\");\n }\n if (dir) {\n documentElement.setAttribute(\"dir\", dir);\n } else {\n documentElement.removeAttribute(\"dir\");\n }\n }\n\n async mergeHead() {\n const mergedHeadElements = this.mergeProvisionalElements();\n const newStylesheetElements = this.copyNewHeadStylesheetElements();\n this.copyNewHeadScriptElements();\n\n await mergedHeadElements;\n await newStylesheetElements;\n\n if (this.willRender) {\n this.removeUnusedDynamicStylesheetElements();\n }\n }\n\n async replaceBody() {\n await this.preservingPermanentElements(async () => {\n this.activateNewBody();\n await this.assignNewBody();\n });\n }\n\n get trackedElementsAreIdentical() {\n return this.currentHeadSnapshot.trackedElementSignature == this.newHeadSnapshot.trackedElementSignature\n }\n\n async copyNewHeadStylesheetElements() {\n const loadingElements = [];\n\n for (const element of this.newHeadStylesheetElements) {\n loadingElements.push(waitForLoad(element));\n\n document.head.appendChild(element);\n }\n\n await Promise.all(loadingElements);\n }\n\n copyNewHeadScriptElements() {\n for (const element of this.newHeadScriptElements) {\n document.head.appendChild(activateScriptElement(element));\n }\n }\n\n removeUnusedDynamicStylesheetElements() {\n for (const element of this.unusedDynamicStylesheetElements) {\n document.head.removeChild(element);\n }\n }\n\n async mergeProvisionalElements() {\n const newHeadElements = [...this.newHeadProvisionalElements];\n\n for (const element of this.currentHeadProvisionalElements) {\n if (!this.isCurrentElementInElementList(element, newHeadElements)) {\n document.head.removeChild(element);\n }\n }\n\n for (const element of newHeadElements) {\n document.head.appendChild(element);\n }\n }\n\n isCurrentElementInElementList(element, elementList) {\n for (const [index, newElement] of elementList.entries()) {\n // if title element...\n if (element.tagName == \"TITLE\") {\n if (newElement.tagName != \"TITLE\") {\n continue\n }\n if (element.innerHTML == newElement.innerHTML) {\n elementList.splice(index, 1);\n return true\n }\n }\n\n // if any other element...\n if (newElement.isEqualNode(element)) {\n elementList.splice(index, 1);\n return true\n }\n }\n\n return false\n }\n\n removeCurrentHeadProvisionalElements() {\n for (const element of this.currentHeadProvisionalElements) {\n document.head.removeChild(element);\n }\n }\n\n copyNewHeadProvisionalElements() {\n for (const element of this.newHeadProvisionalElements) {\n document.head.appendChild(element);\n }\n }\n\n activateNewBody() {\n document.adoptNode(this.newElement);\n this.removeNoscriptElements();\n this.activateNewBodyScriptElements();\n }\n\n removeNoscriptElements() {\n for (const noscriptElement of this.newElement.querySelectorAll(\"noscript\")) {\n noscriptElement.remove();\n }\n }\n\n activateNewBodyScriptElements() {\n for (const inertScriptElement of this.newBodyScriptElements) {\n const activatedScriptElement = activateScriptElement(inertScriptElement);\n inertScriptElement.replaceWith(activatedScriptElement);\n }\n }\n\n async assignNewBody() {\n await this.renderElement(this.currentElement, this.newElement);\n }\n\n get unusedDynamicStylesheetElements() {\n return this.oldHeadStylesheetElements.filter((element) => {\n return element.getAttribute(\"data-turbo-track\") === \"dynamic\"\n })\n }\n\n get oldHeadStylesheetElements() {\n return this.currentHeadSnapshot.getStylesheetElementsNotInSnapshot(this.newHeadSnapshot)\n }\n\n get newHeadStylesheetElements() {\n return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot)\n }\n\n get newHeadScriptElements() {\n return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot)\n }\n\n get currentHeadProvisionalElements() {\n return this.currentHeadSnapshot.provisionalElements\n }\n\n get newHeadProvisionalElements() {\n return this.newHeadSnapshot.provisionalElements\n }\n\n get newBodyScriptElements() {\n return this.newElement.querySelectorAll(\"script\")\n }\n}\n\nclass MorphingPageRenderer extends PageRenderer {\n static renderElement(currentElement, newElement) {\n morphElements(currentElement, newElement, {\n callbacks: {\n beforeNodeMorphed: (node, newNode) => {\n if (\n shouldRefreshFrameWithMorphing(node, newNode) &&\n !closestFrameReloadableWithMorphing(node)\n ) {\n node.reload();\n return false\n }\n return true\n }\n }\n });\n\n dispatch(\"turbo:morph\", { detail: { currentElement, newElement } });\n }\n\n async preservingPermanentElements(callback) {\n return await callback()\n }\n\n get renderMethod() {\n return \"morph\"\n }\n\n get shouldAutofocus() {\n return false\n }\n}\n\nclass SnapshotCache extends LRUCache {\n constructor(size) {\n super(size, toCacheKey);\n }\n\n get snapshots() {\n return this.entries\n }\n}\n\nclass PageView extends View {\n snapshotCache = new SnapshotCache(10)\n lastRenderedLocation = new URL(location.href)\n forceReloaded = false\n\n shouldTransitionTo(newSnapshot) {\n return this.snapshot.prefersViewTransitions && newSnapshot.prefersViewTransitions\n }\n\n renderPage(snapshot, isPreview = false, willRender = true, visit) {\n const shouldMorphPage = this.isPageRefresh(visit) && (visit?.refresh?.method || this.snapshot.refreshMethod) === \"morph\";\n const rendererClass = shouldMorphPage ? MorphingPageRenderer : PageRenderer;\n\n const renderer = new rendererClass(this.snapshot, snapshot, isPreview, willRender);\n\n if (!renderer.shouldRender) {\n this.forceReloaded = true;\n } else {\n visit?.changeHistory();\n }\n\n return this.render(renderer)\n }\n\n renderError(snapshot, visit) {\n visit?.changeHistory();\n const renderer = new ErrorRenderer(this.snapshot, snapshot, false);\n return this.render(renderer)\n }\n\n clearSnapshotCache() {\n this.snapshotCache.clear();\n }\n\n async cacheSnapshot(snapshot = this.snapshot) {\n if (snapshot.isCacheable) {\n this.delegate.viewWillCacheSnapshot();\n const { lastRenderedLocation: location } = this;\n await nextEventLoopTick();\n const cachedSnapshot = snapshot.clone();\n this.snapshotCache.put(location, cachedSnapshot);\n return cachedSnapshot\n }\n }\n\n getCachedSnapshotForLocation(location) {\n return this.snapshotCache.get(location)\n }\n\n isPageRefresh(visit) {\n return !visit || (this.lastRenderedLocation.pathname === visit.location.pathname && visit.action === \"replace\")\n }\n\n shouldPreserveScrollPosition(visit) {\n return this.isPageRefresh(visit) && (visit?.refresh?.scroll || this.snapshot.refreshScroll) === \"preserve\"\n }\n\n get snapshot() {\n return PageSnapshot.fromElement(this.element)\n }\n}\n\nclass Preloader {\n selector = \"a[data-turbo-preload]\"\n\n constructor(delegate, snapshotCache) {\n this.delegate = delegate;\n this.snapshotCache = snapshotCache;\n }\n\n start() {\n if (document.readyState === \"loading\") {\n document.addEventListener(\"DOMContentLoaded\", this.#preloadAll);\n } else {\n this.preloadOnLoadLinksForView(document.body);\n }\n }\n\n stop() {\n document.removeEventListener(\"DOMContentLoaded\", this.#preloadAll);\n }\n\n preloadOnLoadLinksForView(element) {\n for (const link of element.querySelectorAll(this.selector)) {\n if (this.delegate.shouldPreloadLink(link)) {\n this.preloadURL(link);\n }\n }\n }\n\n async preloadURL(link) {\n const location = new URL(link.href);\n\n if (this.snapshotCache.has(location)) {\n return\n }\n\n const fetchRequest = new FetchRequest(this, FetchMethod.get, location, new URLSearchParams(), link);\n await fetchRequest.perform();\n }\n\n // Fetch request delegate\n\n prepareRequest(fetchRequest) {\n fetchRequest.headers[\"X-Sec-Purpose\"] = \"prefetch\";\n }\n\n async requestSucceededWithResponse(fetchRequest, fetchResponse) {\n try {\n const responseHTML = await fetchResponse.responseHTML;\n const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n\n this.snapshotCache.put(fetchRequest.url, snapshot);\n } catch (_) {\n // If we cannot preload that is ok!\n }\n }\n\n requestStarted(fetchRequest) {}\n\n requestErrored(fetchRequest) {}\n\n requestFinished(fetchRequest) {}\n\n requestPreventedHandlingResponse(fetchRequest, fetchResponse) {}\n\n requestFailedWithResponse(fetchRequest, fetchResponse) {}\n\n #preloadAll = () => {\n this.preloadOnLoadLinksForView(document.body);\n }\n}\n\nclass Cache {\n constructor(session) {\n this.session = session;\n }\n\n clear() {\n this.session.clearCache();\n }\n\n resetCacheControl() {\n this.#setCacheControl(\"\");\n }\n\n exemptPageFromCache() {\n this.#setCacheControl(\"no-cache\");\n }\n\n exemptPageFromPreview() {\n this.#setCacheControl(\"no-preview\");\n }\n\n #setCacheControl(value) {\n setMetaContent(\"turbo-cache-control\", value);\n }\n}\n\nclass Session {\n navigator = new Navigator(this)\n history = new History(this)\n view = new PageView(this, document.documentElement)\n adapter = new BrowserAdapter(this)\n\n pageObserver = new PageObserver(this)\n cacheObserver = new CacheObserver()\n linkPrefetchObserver = new LinkPrefetchObserver(this, document)\n linkClickObserver = new LinkClickObserver(this, window)\n formSubmitObserver = new FormSubmitObserver(this, document)\n scrollObserver = new ScrollObserver(this)\n streamObserver = new StreamObserver(this)\n formLinkClickObserver = new FormLinkClickObserver(this, document.documentElement)\n frameRedirector = new FrameRedirector(this, document.documentElement)\n streamMessageRenderer = new StreamMessageRenderer()\n cache = new Cache(this)\n\n enabled = true\n started = false\n #pageRefreshDebouncePeriod = 150\n\n constructor(recentRequests) {\n this.recentRequests = recentRequests;\n this.preloader = new Preloader(this, this.view.snapshotCache);\n this.debouncedRefresh = this.refresh;\n this.pageRefreshDebouncePeriod = this.pageRefreshDebouncePeriod;\n }\n\n start() {\n if (!this.started) {\n this.pageObserver.start();\n this.cacheObserver.start();\n this.linkPrefetchObserver.start();\n this.formLinkClickObserver.start();\n this.linkClickObserver.start();\n this.formSubmitObserver.start();\n this.scrollObserver.start();\n this.streamObserver.start();\n this.frameRedirector.start();\n this.history.start();\n this.preloader.start();\n this.started = true;\n this.enabled = true;\n }\n }\n\n disable() {\n this.enabled = false;\n }\n\n stop() {\n if (this.started) {\n this.pageObserver.stop();\n this.cacheObserver.stop();\n this.linkPrefetchObserver.stop();\n this.formLinkClickObserver.stop();\n this.linkClickObserver.stop();\n this.formSubmitObserver.stop();\n this.scrollObserver.stop();\n this.streamObserver.stop();\n this.frameRedirector.stop();\n this.history.stop();\n this.preloader.stop();\n this.started = false;\n }\n }\n\n registerAdapter(adapter) {\n this.adapter = adapter;\n }\n\n visit(location, options = {}) {\n const frameElement = options.frame ? document.getElementById(options.frame) : null;\n\n if (frameElement instanceof FrameElement) {\n const action = options.action || getVisitAction(frameElement);\n\n frameElement.delegate.proposeVisitIfNavigatedWithAction(frameElement, action);\n frameElement.src = location.toString();\n } else {\n this.navigator.proposeVisit(expandURL(location), options);\n }\n }\n\n refresh(url, options = {}) {\n options = typeof options === \"string\" ? { requestId: options } : options;\n\n const { method, requestId, scroll } = options;\n const isRecentRequest = requestId && this.recentRequests.has(requestId);\n const isCurrentUrl = url === document.baseURI;\n if (!isRecentRequest && !this.navigator.currentVisit && isCurrentUrl) {\n this.visit(url, { action: \"replace\", shouldCacheSnapshot: false, refresh: { method, scroll } });\n }\n }\n\n connectStreamSource(source) {\n this.streamObserver.connectStreamSource(source);\n }\n\n disconnectStreamSource(source) {\n this.streamObserver.disconnectStreamSource(source);\n }\n\n renderStreamMessage(message) {\n this.streamMessageRenderer.render(StreamMessage.wrap(message));\n }\n\n clearCache() {\n this.view.clearSnapshotCache();\n }\n\n setProgressBarDelay(delay) {\n console.warn(\n \"Please replace `session.setProgressBarDelay(delay)` with `session.progressBarDelay = delay`. The function is deprecated and will be removed in a future version of Turbo.`\"\n );\n\n this.progressBarDelay = delay;\n }\n\n set progressBarDelay(delay) {\n config.drive.progressBarDelay = delay;\n }\n\n get progressBarDelay() {\n return config.drive.progressBarDelay\n }\n\n set drive(value) {\n config.drive.enabled = value;\n }\n\n get drive() {\n return config.drive.enabled\n }\n\n set formMode(value) {\n config.forms.mode = value;\n }\n\n get formMode() {\n return config.forms.mode\n }\n\n get location() {\n return this.history.location\n }\n\n get restorationIdentifier() {\n return this.history.restorationIdentifier\n }\n\n get pageRefreshDebouncePeriod() {\n return this.#pageRefreshDebouncePeriod\n }\n\n set pageRefreshDebouncePeriod(value) {\n this.refresh = debounce(this.debouncedRefresh.bind(this), value);\n this.#pageRefreshDebouncePeriod = value;\n }\n\n // Preloader delegate\n\n shouldPreloadLink(element) {\n const isUnsafe = element.hasAttribute(\"data-turbo-method\");\n const isStream = element.hasAttribute(\"data-turbo-stream\");\n const frameTarget = element.getAttribute(\"data-turbo-frame\");\n const frame = frameTarget == \"_top\" ?\n null :\n document.getElementById(frameTarget) || findClosestRecursively(element, \"turbo-frame:not([disabled])\");\n\n if (isUnsafe || isStream || frame instanceof FrameElement) {\n return false\n } else {\n const location = new URL(element.href);\n\n return this.elementIsNavigatable(element) && locationIsVisitable(location, this.snapshot.rootLocation)\n }\n }\n\n // History delegate\n\n historyPoppedToLocationWithRestorationIdentifierAndDirection(location, restorationIdentifier, direction) {\n if (this.enabled) {\n this.navigator.startVisit(location, restorationIdentifier, {\n action: \"restore\",\n historyChanged: true,\n direction\n });\n } else {\n this.adapter.pageInvalidated({\n reason: \"turbo_disabled\"\n });\n }\n }\n\n historyPoppedWithEmptyState(location) {\n this.history.replace(location);\n this.view.lastRenderedLocation = location;\n this.view.cacheSnapshot();\n }\n\n // Scroll observer delegate\n\n scrollPositionChanged(position) {\n this.history.updateRestorationData({ scrollPosition: position });\n }\n\n // Form click observer delegate\n\n willSubmitFormLinkToLocation(link, location) {\n return this.elementIsNavigatable(link) && locationIsVisitable(location, this.snapshot.rootLocation)\n }\n\n submittedFormLinkToLocation() {}\n\n // Link hover observer delegate\n\n canPrefetchRequestToLocation(link, location) {\n return (\n this.elementIsNavigatable(link) &&\n locationIsVisitable(location, this.snapshot.rootLocation) &&\n this.navigator.linkPrefetchingIsEnabledForLocation(location)\n )\n }\n\n // Link click observer delegate\n\n willFollowLinkToLocation(link, location, event) {\n return (\n this.elementIsNavigatable(link) &&\n locationIsVisitable(location, this.snapshot.rootLocation) &&\n this.applicationAllowsFollowingLinkToLocation(link, location, event)\n )\n }\n\n followedLinkToLocation(link, location) {\n const action = this.getActionForLink(link);\n const acceptsStreamResponse = link.hasAttribute(\"data-turbo-stream\");\n\n this.visit(location.href, { action, acceptsStreamResponse });\n }\n\n // Navigator delegate\n\n allowsVisitingLocationWithAction(location, action) {\n return this.applicationAllowsVisitingLocation(location)\n }\n\n visitProposedToLocation(location, options) {\n extendURLWithDeprecatedProperties(location);\n this.adapter.visitProposedToLocation(location, options);\n }\n\n // Visit delegate\n\n visitStarted(visit) {\n if (!visit.acceptsStreamResponse) {\n markAsBusy(document.documentElement);\n this.view.markVisitDirection(visit.direction);\n }\n extendURLWithDeprecatedProperties(visit.location);\n this.notifyApplicationAfterVisitingLocation(visit.location, visit.action);\n }\n\n visitCompleted(visit) {\n this.view.unmarkVisitDirection();\n clearBusyState(document.documentElement);\n this.notifyApplicationAfterPageLoad(visit.getTimingMetrics());\n }\n\n // Form submit observer delegate\n\n willSubmitForm(form, submitter) {\n const action = getAction$1(form, submitter);\n\n return (\n this.submissionIsNavigatable(form, submitter) &&\n locationIsVisitable(expandURL(action), this.snapshot.rootLocation)\n )\n }\n\n formSubmitted(form, submitter) {\n this.navigator.submitForm(form, submitter);\n }\n\n // Page observer delegate\n\n pageBecameInteractive() {\n this.view.lastRenderedLocation = this.location;\n this.notifyApplicationAfterPageLoad();\n }\n\n pageLoaded() {\n this.history.assumeControlOfScrollRestoration();\n }\n\n pageWillUnload() {\n this.history.relinquishControlOfScrollRestoration();\n }\n\n // Stream observer delegate\n\n receivedMessageFromStream(message) {\n this.renderStreamMessage(message);\n }\n\n // Page view delegate\n\n viewWillCacheSnapshot() {\n this.notifyApplicationBeforeCachingSnapshot();\n }\n\n allowsImmediateRender({ element }, options) {\n const event = this.notifyApplicationBeforeRender(element, options);\n const {\n defaultPrevented,\n detail: { render }\n } = event;\n\n if (this.view.renderer && render) {\n this.view.renderer.renderElement = render;\n }\n\n return !defaultPrevented\n }\n\n viewRenderedSnapshot(_snapshot, _isPreview, renderMethod) {\n this.view.lastRenderedLocation = this.history.location;\n this.notifyApplicationAfterRender(renderMethod);\n }\n\n preloadOnLoadLinksForView(element) {\n this.preloader.preloadOnLoadLinksForView(element);\n }\n\n viewInvalidated(reason) {\n this.adapter.pageInvalidated(reason);\n }\n\n // Frame element\n\n frameLoaded(frame) {\n this.notifyApplicationAfterFrameLoad(frame);\n }\n\n frameRendered(fetchResponse, frame) {\n this.notifyApplicationAfterFrameRender(fetchResponse, frame);\n }\n\n // Application events\n\n applicationAllowsFollowingLinkToLocation(link, location, ev) {\n const event = this.notifyApplicationAfterClickingLinkToLocation(link, location, ev);\n return !event.defaultPrevented\n }\n\n applicationAllowsVisitingLocation(location) {\n const event = this.notifyApplicationBeforeVisitingLocation(location);\n return !event.defaultPrevented\n }\n\n notifyApplicationAfterClickingLinkToLocation(link, location, event) {\n return dispatch(\"turbo:click\", {\n target: link,\n detail: { url: location.href, originalEvent: event },\n cancelable: true\n })\n }\n\n notifyApplicationBeforeVisitingLocation(location) {\n return dispatch(\"turbo:before-visit\", {\n detail: { url: location.href },\n cancelable: true\n })\n }\n\n notifyApplicationAfterVisitingLocation(location, action) {\n return dispatch(\"turbo:visit\", { detail: { url: location.href, action } })\n }\n\n notifyApplicationBeforeCachingSnapshot() {\n return dispatch(\"turbo:before-cache\")\n }\n\n notifyApplicationBeforeRender(newBody, options) {\n return dispatch(\"turbo:before-render\", {\n detail: { newBody, ...options },\n cancelable: true\n })\n }\n\n notifyApplicationAfterRender(renderMethod) {\n return dispatch(\"turbo:render\", { detail: { renderMethod } })\n }\n\n notifyApplicationAfterPageLoad(timing = {}) {\n return dispatch(\"turbo:load\", {\n detail: { url: this.location.href, timing }\n })\n }\n\n notifyApplicationAfterFrameLoad(frame) {\n return dispatch(\"turbo:frame-load\", { target: frame })\n }\n\n notifyApplicationAfterFrameRender(fetchResponse, frame) {\n return dispatch(\"turbo:frame-render\", {\n detail: { fetchResponse },\n target: frame,\n cancelable: true\n })\n }\n\n // Helpers\n\n submissionIsNavigatable(form, submitter) {\n if (config.forms.mode == \"off\") {\n return false\n } else {\n const submitterIsNavigatable = submitter ? this.elementIsNavigatable(submitter) : true;\n\n if (config.forms.mode == \"optin\") {\n return submitterIsNavigatable && form.closest('[data-turbo=\"true\"]') != null\n } else {\n return submitterIsNavigatable && this.elementIsNavigatable(form)\n }\n }\n }\n\n elementIsNavigatable(element) {\n const container = findClosestRecursively(element, \"[data-turbo]\");\n const withinFrame = findClosestRecursively(element, \"turbo-frame\");\n\n // Check if Drive is enabled on the session or we're within a Frame.\n if (config.drive.enabled || withinFrame) {\n // Element is navigatable by default, unless `data-turbo=\"false\"`.\n if (container) {\n return container.getAttribute(\"data-turbo\") != \"false\"\n } else {\n return true\n }\n } else {\n // Element isn't navigatable by default, unless `data-turbo=\"true\"`.\n if (container) {\n return container.getAttribute(\"data-turbo\") == \"true\"\n } else {\n return false\n }\n }\n }\n\n // Private\n\n getActionForLink(link) {\n return getVisitAction(link) || \"advance\"\n }\n\n get snapshot() {\n return this.view.snapshot\n }\n}\n\n// Older versions of the Turbo Native adapters referenced the\n// `Location#absoluteURL` property in their implementations of\n// the `Adapter#visitProposedToLocation()` and `#visitStarted()`\n// methods. The Location class has since been removed in favor\n// of the DOM URL API, and accordingly all Adapter methods now\n// receive URL objects.\n//\n// We alias #absoluteURL to #toString() here to avoid crashing\n// older adapters which do not expect URL objects. We should\n// consider removing this support at some point in the future.\n\nfunction extendURLWithDeprecatedProperties(url) {\n Object.defineProperties(url, deprecatedLocationPropertyDescriptors);\n}\n\nconst deprecatedLocationPropertyDescriptors = {\n absoluteURL: {\n get() {\n return this.toString()\n }\n }\n};\n\nconst session = new Session(recentRequests);\n\n// Rename `navigator` to avoid shadowing `window.navigator`\nconst { cache, navigator: sessionNavigator } = session;\n\n/**\n * Starts the main session.\n * This initialises any necessary observers such as those to monitor\n * link interactions.\n */\nfunction start() {\n session.start();\n}\n\n/**\n * Registers an adapter for the main session.\n *\n * @param adapter Adapter to register\n */\nfunction registerAdapter(adapter) {\n session.registerAdapter(adapter);\n}\n\n/**\n * Performs an application visit to the given location.\n *\n * @param location Location to visit (a URL or path)\n * @param options Options to apply\n * @param options.action Type of history navigation to apply (\"restore\",\n * \"replace\" or \"advance\")\n * @param options.historyChanged Specifies whether the browser history has\n * already been changed for this visit or not\n * @param options.referrer Specifies the referrer of this visit such that\n * navigations to the same page will not result in a new history entry.\n * @param options.snapshotHTML Cached snapshot to render\n * @param options.response Response of the specified location\n */\nfunction visit(location, options) {\n session.visit(location, options);\n}\n\n/**\n * Connects a stream source to the main session.\n *\n * @param source Stream source to connect\n */\nfunction connectStreamSource(source) {\n session.connectStreamSource(source);\n}\n\n/**\n * Disconnects a stream source from the main session.\n *\n * @param source Stream source to disconnect\n */\nfunction disconnectStreamSource(source) {\n session.disconnectStreamSource(source);\n}\n\n/**\n * Renders a stream message to the main session by appending it to the\n * current document.\n *\n * @param message Message to render\n */\nfunction renderStreamMessage(message) {\n session.renderStreamMessage(message);\n}\n\n/**\n * Sets the delay after which the progress bar will appear during navigation.\n *\n * The progress bar appears after 500ms by default.\n *\n * Note that this method has no effect when used with the iOS or Android\n * adapters.\n *\n * @param delay Time to delay in milliseconds\n */\nfunction setProgressBarDelay(delay) {\n console.warn(\n \"Please replace `Turbo.setProgressBarDelay(delay)` with `Turbo.config.drive.progressBarDelay = delay`. The top-level function is deprecated and will be removed in a future version of Turbo.`\"\n );\n config.drive.progressBarDelay = delay;\n}\n\nfunction setConfirmMethod(confirmMethod) {\n console.warn(\n \"Please replace `Turbo.setConfirmMethod(confirmMethod)` with `Turbo.config.forms.confirm = confirmMethod`. The top-level function is deprecated and will be removed in a future version of Turbo.`\"\n );\n config.forms.confirm = confirmMethod;\n}\n\nfunction setFormMode(mode) {\n console.warn(\n \"Please replace `Turbo.setFormMode(mode)` with `Turbo.config.forms.mode = mode`. The top-level function is deprecated and will be removed in a future version of Turbo.`\"\n );\n config.forms.mode = mode;\n}\n\n/**\n * Morph the state of the currentBody based on the attributes and contents of\n * the newBody. Morphing body elements may dispatch turbo:morph,\n * turbo:before-morph-element, turbo:before-morph-attribute, and\n * turbo:morph-element events.\n *\n * @param currentBody HTMLBodyElement destination of morphing changes\n * @param newBody HTMLBodyElement source of morphing changes\n */\nfunction morphBodyElements(currentBody, newBody) {\n MorphingPageRenderer.renderElement(currentBody, newBody);\n}\n\n/**\n * Morph the child elements of the currentFrame based on the child elements of\n * the newFrame. Morphing turbo-frame elements may dispatch turbo:before-frame-morph,\n * turbo:before-morph-element, turbo:before-morph-attribute, and\n * turbo:morph-element events.\n *\n * @param currentFrame FrameElement destination of morphing children changes\n * @param newFrame FrameElement source of morphing children changes\n */\nfunction morphTurboFrameElements(currentFrame, newFrame) {\n MorphingFrameRenderer.renderElement(currentFrame, newFrame);\n}\n\nvar Turbo = /*#__PURE__*/Object.freeze({\n __proto__: null,\n PageRenderer: PageRenderer,\n PageSnapshot: PageSnapshot,\n FrameRenderer: FrameRenderer,\n fetch: fetchWithTurboHeaders,\n config: config,\n session: session,\n cache: cache,\n navigator: sessionNavigator,\n start: start,\n registerAdapter: registerAdapter,\n visit: visit,\n connectStreamSource: connectStreamSource,\n disconnectStreamSource: disconnectStreamSource,\n renderStreamMessage: renderStreamMessage,\n setProgressBarDelay: setProgressBarDelay,\n setConfirmMethod: setConfirmMethod,\n setFormMode: setFormMode,\n morphBodyElements: morphBodyElements,\n morphTurboFrameElements: morphTurboFrameElements,\n morphChildren: morphChildren,\n morphElements: morphElements\n});\n\nclass TurboFrameMissingError extends Error {}\n\nclass FrameController {\n fetchResponseLoaded = (_fetchResponse) => Promise.resolve()\n #currentFetchRequest = null\n #resolveVisitPromise = () => {}\n #connected = false\n #hasBeenLoaded = false\n #ignoredAttributes = new Set()\n #shouldMorphFrame = false\n action = null\n\n constructor(element) {\n this.element = element;\n this.view = new FrameView(this, this.element);\n this.appearanceObserver = new AppearanceObserver(this, this.element);\n this.formLinkClickObserver = new FormLinkClickObserver(this, this.element);\n this.linkInterceptor = new LinkInterceptor(this, this.element);\n this.restorationIdentifier = uuid();\n this.formSubmitObserver = new FormSubmitObserver(this, this.element);\n }\n\n // Frame delegate\n\n connect() {\n if (!this.#connected) {\n this.#connected = true;\n if (this.loadingStyle == FrameLoadingStyle.lazy) {\n this.appearanceObserver.start();\n } else {\n this.#loadSourceURL();\n }\n this.formLinkClickObserver.start();\n this.linkInterceptor.start();\n this.formSubmitObserver.start();\n }\n }\n\n disconnect() {\n if (this.#connected) {\n this.#connected = false;\n this.appearanceObserver.stop();\n this.formLinkClickObserver.stop();\n this.linkInterceptor.stop();\n this.formSubmitObserver.stop();\n\n if (!this.element.hasAttribute(\"recurse\")) {\n this.#currentFetchRequest?.cancel();\n }\n }\n }\n\n disabledChanged() {\n if (this.disabled) {\n this.#currentFetchRequest?.cancel();\n } else if (this.loadingStyle == FrameLoadingStyle.eager) {\n this.#loadSourceURL();\n }\n }\n\n sourceURLChanged() {\n if (this.#isIgnoringChangesTo(\"src\")) return\n\n if (!this.sourceURL) {\n this.#currentFetchRequest?.cancel();\n }\n\n if (this.element.isConnected) {\n this.complete = false;\n }\n\n if (this.loadingStyle == FrameLoadingStyle.eager || this.#hasBeenLoaded) {\n this.#loadSourceURL();\n }\n }\n\n sourceURLReloaded() {\n const { refresh, src } = this.element;\n\n this.#shouldMorphFrame = src && refresh === \"morph\";\n\n this.element.removeAttribute(\"complete\");\n this.element.src = null;\n this.element.src = src;\n return this.element.loaded\n }\n\n loadingStyleChanged() {\n if (this.loadingStyle == FrameLoadingStyle.lazy) {\n this.appearanceObserver.start();\n } else {\n this.appearanceObserver.stop();\n this.#loadSourceURL();\n }\n }\n\n async #loadSourceURL() {\n if (this.enabled && this.isActive && !this.complete && this.sourceURL) {\n this.element.loaded = this.#visit(expandURL(this.sourceURL));\n this.appearanceObserver.stop();\n await this.element.loaded;\n this.#hasBeenLoaded = true;\n }\n }\n\n async loadResponse(fetchResponse) {\n if (fetchResponse.redirected || (fetchResponse.succeeded && fetchResponse.isHTML)) {\n this.sourceURL = fetchResponse.response.url;\n }\n\n try {\n const html = await fetchResponse.responseHTML;\n if (html) {\n const document = parseHTMLDocument(html);\n const pageSnapshot = PageSnapshot.fromDocument(document);\n\n if (pageSnapshot.isVisitable) {\n await this.#loadFrameResponse(fetchResponse, document);\n } else {\n await this.#handleUnvisitableFrameResponse(fetchResponse);\n }\n }\n } finally {\n this.#shouldMorphFrame = false;\n this.fetchResponseLoaded = () => Promise.resolve();\n }\n }\n\n // Appearance observer delegate\n\n elementAppearedInViewport(element) {\n this.proposeVisitIfNavigatedWithAction(element, getVisitAction(element));\n this.#loadSourceURL();\n }\n\n // Form link click observer delegate\n\n willSubmitFormLinkToLocation(link) {\n return this.#shouldInterceptNavigation(link)\n }\n\n submittedFormLinkToLocation(link, _location, form) {\n const frame = this.#findFrameElement(link);\n if (frame) form.setAttribute(\"data-turbo-frame\", frame.id);\n }\n\n // Link interceptor delegate\n\n shouldInterceptLinkClick(element, _location, _event) {\n return this.#shouldInterceptNavigation(element)\n }\n\n linkClickIntercepted(element, location) {\n this.#navigateFrame(element, location);\n }\n\n // Form submit observer delegate\n\n willSubmitForm(element, submitter) {\n return element.closest(\"turbo-frame\") == this.element && this.#shouldInterceptNavigation(element, submitter)\n }\n\n formSubmitted(element, submitter) {\n if (this.formSubmission) {\n this.formSubmission.stop();\n }\n\n this.formSubmission = new FormSubmission(this, element, submitter);\n\n const { fetchRequest } = this.formSubmission;\n const frame = this.#findFrameElement(element, submitter);\n\n this.prepareRequest(fetchRequest, frame);\n this.formSubmission.start();\n }\n\n // Fetch request delegate\n\n prepareRequest(request, frame = this) {\n request.headers[\"Turbo-Frame\"] = frame.id;\n\n if (this.currentNavigationElement?.hasAttribute(\"data-turbo-stream\")) {\n request.acceptResponseType(StreamMessage.contentType);\n }\n }\n\n requestStarted(_request) {\n markAsBusy(this.element);\n }\n\n requestPreventedHandlingResponse(_request, _response) {\n this.#resolveVisitPromise();\n }\n\n async requestSucceededWithResponse(request, response) {\n await this.loadResponse(response);\n this.#resolveVisitPromise();\n }\n\n async requestFailedWithResponse(request, response) {\n await this.loadResponse(response);\n this.#resolveVisitPromise();\n }\n\n requestErrored(request, error) {\n console.error(error);\n this.#resolveVisitPromise();\n }\n\n requestFinished(_request) {\n clearBusyState(this.element);\n }\n\n // Form submission delegate\n\n formSubmissionStarted({ formElement }) {\n markAsBusy(formElement, this.#findFrameElement(formElement));\n }\n\n formSubmissionSucceededWithResponse(formSubmission, response) {\n const frame = this.#findFrameElement(formSubmission.formElement, formSubmission.submitter);\n\n frame.delegate.proposeVisitIfNavigatedWithAction(frame, getVisitAction(formSubmission.submitter, formSubmission.formElement, frame));\n frame.delegate.loadResponse(response);\n\n if (!formSubmission.isSafe) {\n session.clearCache();\n }\n }\n\n formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n this.element.delegate.loadResponse(fetchResponse);\n session.clearCache();\n }\n\n formSubmissionErrored(formSubmission, error) {\n console.error(error);\n }\n\n formSubmissionFinished({ formElement }) {\n clearBusyState(formElement, this.#findFrameElement(formElement));\n }\n\n // View delegate\n\n allowsImmediateRender({ element: newFrame }, options) {\n const event = dispatch(\"turbo:before-frame-render\", {\n target: this.element,\n detail: { newFrame, ...options },\n cancelable: true\n });\n\n const {\n defaultPrevented,\n detail: { render }\n } = event;\n\n if (this.view.renderer && render) {\n this.view.renderer.renderElement = render;\n }\n\n return !defaultPrevented\n }\n\n viewRenderedSnapshot(_snapshot, _isPreview, _renderMethod) {}\n\n preloadOnLoadLinksForView(element) {\n session.preloadOnLoadLinksForView(element);\n }\n\n viewInvalidated() {}\n\n // Frame renderer delegate\n\n willRenderFrame(currentElement, _newElement) {\n this.previousFrameElement = currentElement.cloneNode(true);\n }\n\n visitCachedSnapshot = ({ element }) => {\n const frame = element.querySelector(\"#\" + this.element.id);\n\n if (frame && this.previousFrameElement) {\n frame.replaceChildren(...this.previousFrameElement.children);\n }\n\n delete this.previousFrameElement;\n }\n\n // Private\n\n async #loadFrameResponse(fetchResponse, document) {\n const newFrameElement = await this.extractForeignFrameElement(document.body);\n const rendererClass = this.#shouldMorphFrame ? MorphingFrameRenderer : FrameRenderer;\n\n if (newFrameElement) {\n const snapshot = new Snapshot(newFrameElement);\n const renderer = new rendererClass(this, this.view.snapshot, snapshot, false, false);\n if (this.view.renderPromise) await this.view.renderPromise;\n this.changeHistory();\n\n await this.view.render(renderer);\n this.complete = true;\n session.frameRendered(fetchResponse, this.element);\n session.frameLoaded(this.element);\n await this.fetchResponseLoaded(fetchResponse);\n } else if (this.#willHandleFrameMissingFromResponse(fetchResponse)) {\n this.#handleFrameMissingFromResponse(fetchResponse);\n }\n }\n\n async #visit(url) {\n const request = new FetchRequest(this, FetchMethod.get, url, new URLSearchParams(), this.element);\n\n this.#currentFetchRequest?.cancel();\n this.#currentFetchRequest = request;\n\n return new Promise((resolve) => {\n this.#resolveVisitPromise = () => {\n this.#resolveVisitPromise = () => {};\n this.#currentFetchRequest = null;\n resolve();\n };\n request.perform();\n })\n }\n\n #navigateFrame(element, url, submitter) {\n const frame = this.#findFrameElement(element, submitter);\n\n frame.delegate.proposeVisitIfNavigatedWithAction(frame, getVisitAction(submitter, element, frame));\n\n this.#withCurrentNavigationElement(element, () => {\n frame.src = url;\n });\n }\n\n proposeVisitIfNavigatedWithAction(frame, action = null) {\n this.action = action;\n\n if (this.action) {\n const pageSnapshot = PageSnapshot.fromElement(frame).clone();\n const { visitCachedSnapshot } = frame.delegate;\n\n frame.delegate.fetchResponseLoaded = async (fetchResponse) => {\n if (frame.src) {\n const { statusCode, redirected } = fetchResponse;\n const responseHTML = await fetchResponse.responseHTML;\n const response = { statusCode, redirected, responseHTML };\n const options = {\n response,\n visitCachedSnapshot,\n willRender: false,\n updateHistory: false,\n restorationIdentifier: this.restorationIdentifier,\n snapshot: pageSnapshot\n };\n\n if (this.action) options.action = this.action;\n\n session.visit(frame.src, options);\n }\n };\n }\n }\n\n changeHistory() {\n if (this.action) {\n const method = getHistoryMethodForAction(this.action);\n session.history.update(method, expandURL(this.element.src || \"\"), this.restorationIdentifier);\n }\n }\n\n async #handleUnvisitableFrameResponse(fetchResponse) {\n console.warn(\n `The response (${fetchResponse.statusCode}) from is performing a full page visit due to turbo-visit-control.`\n );\n\n await this.#visitResponse(fetchResponse.response);\n }\n\n #willHandleFrameMissingFromResponse(fetchResponse) {\n this.element.setAttribute(\"complete\", \"\");\n\n const response = fetchResponse.response;\n const visit = async (url, options) => {\n if (url instanceof Response) {\n this.#visitResponse(url);\n } else {\n session.visit(url, options);\n }\n };\n\n const event = dispatch(\"turbo:frame-missing\", {\n target: this.element,\n detail: { response, visit },\n cancelable: true\n });\n\n return !event.defaultPrevented\n }\n\n #handleFrameMissingFromResponse(fetchResponse) {\n this.view.missing();\n this.#throwFrameMissingError(fetchResponse);\n }\n\n #throwFrameMissingError(fetchResponse) {\n const message = `The response (${fetchResponse.statusCode}) did not contain the expected and will be ignored. To perform a full page visit instead, set turbo-visit-control to reload.`;\n throw new TurboFrameMissingError(message)\n }\n\n async #visitResponse(response) {\n const wrapped = new FetchResponse(response);\n const responseHTML = await wrapped.responseHTML;\n const { location, redirected, statusCode } = wrapped;\n\n return session.visit(location, { response: { redirected, statusCode, responseHTML } })\n }\n\n #findFrameElement(element, submitter) {\n const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n const target = this.#getFrameElementById(id);\n\n return target instanceof FrameElement ? target : this.element\n }\n\n async extractForeignFrameElement(container) {\n let element;\n const id = CSS.escape(this.id);\n\n try {\n element = activateElement(container.querySelector(`turbo-frame#${id}`), this.sourceURL);\n if (element) {\n return element\n }\n\n element = activateElement(container.querySelector(`turbo-frame[src][recurse~=${id}]`), this.sourceURL);\n if (element) {\n await element.loaded;\n return await this.extractForeignFrameElement(element)\n }\n } catch (error) {\n console.error(error);\n return new FrameElement()\n }\n\n return null\n }\n\n #formActionIsVisitable(form, submitter) {\n const action = getAction$1(form, submitter);\n\n return locationIsVisitable(expandURL(action), this.rootLocation)\n }\n\n #shouldInterceptNavigation(element, submitter) {\n const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n\n if (element instanceof HTMLFormElement && !this.#formActionIsVisitable(element, submitter)) {\n return false\n }\n\n if (!this.enabled || id == \"_top\") {\n return false\n }\n\n if (id) {\n const frameElement = this.#getFrameElementById(id);\n if (frameElement) {\n return !frameElement.disabled\n } else if (id == \"_parent\") {\n return false\n }\n }\n\n if (!session.elementIsNavigatable(element)) {\n return false\n }\n\n if (submitter && !session.elementIsNavigatable(submitter)) {\n return false\n }\n\n return true\n }\n\n // Computed properties\n\n get id() {\n return this.element.id\n }\n\n get disabled() {\n return this.element.disabled\n }\n\n get enabled() {\n return !this.disabled\n }\n\n get sourceURL() {\n if (this.element.src) {\n return this.element.src\n }\n }\n\n set sourceURL(sourceURL) {\n this.#ignoringChangesToAttribute(\"src\", () => {\n this.element.src = sourceURL ?? null;\n });\n }\n\n get loadingStyle() {\n return this.element.loading\n }\n\n get isLoading() {\n return this.formSubmission !== undefined || this.#resolveVisitPromise() !== undefined\n }\n\n get complete() {\n return this.element.hasAttribute(\"complete\")\n }\n\n set complete(value) {\n if (value) {\n this.element.setAttribute(\"complete\", \"\");\n } else {\n this.element.removeAttribute(\"complete\");\n }\n }\n\n get isActive() {\n return this.element.isActive && this.#connected\n }\n\n get rootLocation() {\n const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n const root = meta?.content ?? \"/\";\n return expandURL(root)\n }\n\n #isIgnoringChangesTo(attributeName) {\n return this.#ignoredAttributes.has(attributeName)\n }\n\n #ignoringChangesToAttribute(attributeName, callback) {\n this.#ignoredAttributes.add(attributeName);\n callback();\n this.#ignoredAttributes.delete(attributeName);\n }\n\n #withCurrentNavigationElement(element, callback) {\n this.currentNavigationElement = element;\n callback();\n delete this.currentNavigationElement;\n }\n\n #getFrameElementById(id) {\n if (id != null) {\n const element = id === \"_parent\" ?\n this.element.parentElement.closest(\"turbo-frame\") :\n document.getElementById(id);\n if (element instanceof FrameElement) {\n return element\n }\n }\n }\n}\n\nfunction activateElement(element, currentURL) {\n if (element) {\n const src = element.getAttribute(\"src\");\n if (src != null && currentURL != null && urlsAreEqual(src, currentURL)) {\n throw new Error(`Matching element has a source URL which references itself`)\n }\n if (element.ownerDocument !== document) {\n element = document.importNode(element, true);\n }\n\n if (element instanceof FrameElement) {\n element.connectedCallback();\n element.disconnectedCallback();\n return element\n }\n }\n}\n\nconst StreamActions = {\n after() {\n this.removeDuplicateTargetSiblings();\n this.targetElements.forEach((e) => e.parentElement?.insertBefore(this.templateContent, e.nextSibling));\n },\n\n append() {\n this.removeDuplicateTargetChildren();\n this.targetElements.forEach((e) => e.append(this.templateContent));\n },\n\n before() {\n this.removeDuplicateTargetSiblings();\n this.targetElements.forEach((e) => e.parentElement?.insertBefore(this.templateContent, e));\n },\n\n prepend() {\n this.removeDuplicateTargetChildren();\n this.targetElements.forEach((e) => e.prepend(this.templateContent));\n },\n\n remove() {\n this.targetElements.forEach((e) => e.remove());\n },\n\n replace() {\n const method = this.getAttribute(\"method\");\n\n this.targetElements.forEach((targetElement) => {\n if (method === \"morph\") {\n morphElements(targetElement, this.templateContent);\n } else {\n targetElement.replaceWith(this.templateContent);\n }\n });\n },\n\n update() {\n const method = this.getAttribute(\"method\");\n\n this.targetElements.forEach((targetElement) => {\n if (method === \"morph\") {\n morphChildren(targetElement, this.templateContent);\n } else {\n targetElement.innerHTML = \"\";\n targetElement.append(this.templateContent);\n }\n });\n },\n\n refresh() {\n const method = this.getAttribute(\"method\");\n const requestId = this.requestId;\n const scroll = this.getAttribute(\"scroll\");\n\n session.refresh(this.baseURI, { method, requestId, scroll });\n }\n};\n\n//